-
Notifications
You must be signed in to change notification settings - Fork 0
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
[FRAMEWORK] Add a new name_in_output
registry attribute to variables
#23
[FRAMEWORK] Add a new name_in_output
registry attribute to variables
#23
Conversation
91dfcd1
to
55b8ad6
Compare
dc620a3
to
60c17dc
Compare
These new attributes will be used to allow different names in ouput than in the code. Currently, the output name must be unique, but this causes trouble in time mean output, particularly for coordinate variables.
This can be used to set a different name in output streams than the name in code or the unique name required for input.
60c17dc
to
3781e1d
Compare
@mark-petersen and @akturner this is the groundwork for supporting To accomplish this, I have simply added an The first level of testing I would request from each of you is to run a standalone test of your choice to make sure things don't break. @akturner, if there is a test you have that produces Finally, if you actually want to test the I successfully gave I have also tested this with further changes in #19 that implement the |
@cbegeman, I've added you as well. Whatever testing and/or looking over the code you'd like to do would be most appreciated. |
I compiled and tested with gnu and intel on badger, both with debug. I added
and those did indeed show up in the output as those names. As Xylar said, this breaks restart files. If I only add |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This all looks great to me! I tested changing an output name with mpas-o standalone on chrysalis with the intel-mpi compiler.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Miraculously, I was able to change outputFieldName
directly inside the code be dealing with the statePool
structure directly. I first tried this:
statePool % layerThickness % outputFieldName = 'layerThicknessChanged'
but that was how you managed variables before pools. What I actually needed to do was this (with print statements added)
print *, statePool % iteration_head % key
print *, statePool % iteration_head % keyLen
print *, statePool % iteration_head % data % r2a % fieldName
statePool % iteration_head % data % r2a % outputFieldName = 'normalVelocityChanged'
print *, statePool % iteration_head % data % r2a % outputFieldName
which feels like running electrical wires outside of the conduit. We don't ever do this because you need to know where your variable is in the linked list, and what type it is (r2a for 2D real array). After all that, the new name does appear in the output!
@mark-petersen, the "right' way to do what you're trying to do would be first to pick a field that isn't in a restart file as you noted. I will use
I haven't tested this exact example but you can see similar things in my |
Yes, good point. Using |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Built MPAS-Seaice and run standard standalone tests, including with the daily time series stats AM. Verified that output name can be changed with the name_in_output attribute in standard output stream.
Moved to E3SM-Project#5120 |
…w-icepack Corrects use of snow flags and adds flag consistency checks
This can be used to set a different name in output streams than the name in code or the unique name required for input.
This merge also adds corresponding
outputFieldName
andoutputConstituentNames
to each field. These new attributes will be used to allow different names in output than in the code. Currently, the output name must be unique, but this causes trouble in time mean output, particularly for coordinate variables.