-
Notifications
You must be signed in to change notification settings - Fork 18
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
Allow alternative mangle for LONG_NAME (R21C) #2860
Conversation
@acollow Can you try this branch out? You'll want to change the GOCART as said above. Once you do, please make sure history looks like what you want. Especially look at:
Please see if it is doing what you want or not. If not, tell us what you want and then @atrayano can get the appropriate fix in |
This PR is being prevented from merging because you have not added one of our required labels: 0 diff, 0 diff trivial, Non 0-diff, 0 diff structural, 0-diff trivial, Not 0-diff, 0-diff, automatic, 0-diff uncoupled, github_actions. Please add one so that the PR can be merged. |
This PR is being prevented from merging because you have not added one of our required labels: 0 diff, 0 diff trivial, Non 0-diff, 0 diff structural, 0-diff trivial, Not 0-diff, 0-diff, automatic, 0-diff uncoupled, github_actions. Please add one so that the PR can be merged. |
@mathomp4, @darianboggs Is it possible to clarify which CMakeLists.txt to add this too? |
@acollow It's the Cmake for whatever component needs this. So in this case, CA. So edit mapl_acg (${this} CA2G_StateSpecs.rc
IMPORT_SPECS EXPORT_SPECS INTERNAL_SPECS
GET_POINTERS DECLARE_POINTERS) to: mapl_acg (${this} CA2G_StateSpecs.rc
IMPORT_SPECS EXPORT_SPECS INTERNAL_SPECS
GET_POINTERS DECLARE_POINTERS
LONG_NAME_PREFIX "GCsuffix") where that last line is added. |
I am confirming that I tested the branch and the carbon long names are now being written in an ideal manner. Thank you! The branch however still has the bug for the dust and sea salt bins. I copied below the output from ncdump on a file I generated showing what should be SS001 and SS002.
|
@acollow Allie, could you please point me to your History.rc file. I just want to make sure I fully understand the requirements. My dilemma is when the user provides a single alias, do we always append 00n to the alias, or we take the alias value and leave it as is. One quick workaround (but not a fix), is to always provide an alias for the field as in the following example 'DUEM' , 'DU' , 'DUEM001;DUEM002;DUEM003;DUEM004;DUEM005' |
@atrayano, you're right! Neither my HISTORY.rc nor the one for M21C have the aliases. I just ran a quick test and that solved it. Thanks! |
@acollow I am happy now! Thanks! The rules for split names are a bit confusing. If you do not have alias(es), then MAPL tries to keep the field name in the output the same. But in case of multiple bins, having two different fields with the same name is not possible, and to disambiguate, we append 00n, but starting at 2 to keep the original name the same in case of a single bin. On the other hand, if you provide enough split-field-aliases, we keep them as is. |
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.
@elakkraoui They can be taken separately, so we can merge this in at any time (same for #2852). This just adds the ability for @acollow to make a change in GOCART to enable it. |
Sounds good. |
Totally spaced that I needed to add the PR to GOCART! Sorry about that! I just added it - GEOS-ESM/GOCART#278 |
Types of change(s)
Checklist
make tests
)Based on user request, this PR adds the capability to supply an alternative prefix for mangling
LONG_NAME
instead of the defaultcomp_name
. In spec files,*
can be added to theSHORT_NAME
andLONG_NAME
, and this PR allows the alternative prefix.In order to use this in GEOS, you'll need to update your
CMakeLists.txt
with the new option. For example, this:would tell the ACG to use the variable
GCsuffix
for thelong_name
.NOTE1: This variable must be in the GC where this is being used. This works for CA because of this code:
which fills in
GCsuffix
for each instance.NOTE2: This is 0-diff in the sense that the state of the model does not change if you enable this option. But it will change both restarts and history output due to the change in metadata.
Related Issue
#2847