Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds extra metadata to fields about their origin #241

Draft
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

uturuncoglu
Copy link
Contributor

This PR aims to enhance NUOPC layer by adding extra metadata to the import and export states and also fields in those states about their origin. By this way, the acceptor component could query the metadata to see the origin of the fields like following,

       ! Get attribute from field
       call NUOPC_GetAttribute(field, name="ProviderCompName", value=cvalue, &
         isPresent=isPresent, isSet=isSet, rc=rc)
       if (ChkErr(rc,__LINE__,u_FILE_u)) return

@uturuncoglu uturuncoglu added the enhancement New feature or request label May 2, 2024
@uturuncoglu
Copy link
Contributor Author

@theurich @oehmke @danrosen25 I could able to query the fields in acceptor side and it looks like following,

 Field, ProviderCompName = ocean_fraction ATM
 Field, ProviderCompName = ocean_mask OCN

At this point I am aiming to create namespaces and nested states in the generic component side based on the information provided by the ProviderCompName metadata and plan to advertise fields to their own nested states. At this point, I am not sure how this will work. The generic component import state is a minor of the attached component export states and all the information is coming to import state in ModifyAdvertised. Is it possible to create namespaces and nested states after this point. If so, which phase need to be used and which phase will define namespaces and nested states. This is done in the Advertise for the mediator but I am not sure about the eugenic component. It is act like a mediator but little bit different.

@uturuncoglu
Copy link
Contributor Author

@theurich @oehmke @danrosen25 BTW, I am not sure this is the right approach to make provider name information available to other components. Anyway, let me know what you think.

@uturuncoglu
Copy link
Contributor Author

@theurich I add a new option transferAllNested to enable having nested states in the mirrored import and export states. I tested at least mirroring import states and it seems it is working. I think this also needs some entry also to documentation. If you don't ming could you point me the right place to add it. I think transferAllNested and also new metadata in field level CompName (provider name indicated in the run sequence) needs to be added. I'll keep testing and making brach synced with develop. When you have please check the implementation and let me know if something missing or logically wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant