-
Notifications
You must be signed in to change notification settings - Fork 12
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
Add ability for registry to specify input (IC) file variable names for constituents #259
Add ability for registry to specify input (IC) file variable names for constituents #259
Conversation
…eeded for constituents.
…erator (found via pylint test).
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.
one question and a couple of typos
src/data/write_init_files.py
Outdated
else: | ||
# We need to work with the host model version of this variable | ||
missing = _find_and_add_host_variable(stdname, host_dict, | ||
const_dicts, req_vars) |
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.
do we still need to pass in const_dicts and include the constituents logic in _find_and_add_host_variable()?
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.
Well I tried running all of my tests (including doing snapshot runs) without it and it made no difference, so I am going to go with "no". const_dicsts
has now been removed.
src/data/write_init_files.py
Outdated
outfile.blank_line() | ||
outfile.comment("Check if constituent standard name in registered SIMA standard names list:", 6) | ||
outfile.write("if(any(phys_var_stdnames == ccpp_required_data(req_idx))) then", 6) | ||
outfile.comment("Find array index to extract coorect input names:", 7) |
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.
typo - "correct" (i think)
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.
I think you are "correct"! Typo fixed.
src/data/write_init_files.py
Outdated
outfile.blank_line() | ||
outfile.comment("Check if constituent standard name in registered SIMA standard names list:", 5) | ||
outfile.write("if(any(phys_var_stdnames == ccpp_required_data(req_idx))) then", 5) | ||
outfile.comment("Find array index to extract coorect input names:", 6) |
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.
same thrilling typo
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.
It was a harrowing journey, but I believe I have fixed it.
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.
Looks great @nusbaume!
Was hoping to at least find more spelling errors but it looks like @peverwhee beat me to the punch on them.
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.
looks great!
Add the ability for the registry to specify the possible variable names for constituents on an input or Initial Conditions (IC) file in CAM-SIMA. This should eliminate the need for an IC file to have only standard names for each variable, as long as the variable has the possible names listed in the registry.
Also, the
inputnames_to_stdnames.py
script and associatedstdnames_to_inputnames_dictionary.xml
file have now been moved to a newtools
directory, as they should no longer be required for running CAM-SIMA (but could still potentially be useful for other situations).Finally, changes were made to remove the unused
config
variable from the registry generator, as pylint found that it wasn't actually being used for anything.Fixes #255