Allow reading fields with a constituent dimension#401
Merged
jimmielin merged 13 commits intoJul 16, 2025
Conversation
jimmielin
marked this pull request as ready for review
June 26, 2025 23:04
peverwhee
requested changes
Jul 1, 2025
peverwhee
left a comment
Collaborator
There was a problem hiding this comment.
thanks so much @jimmielin
A couple (hopefully) small changes!
nusbaume
requested changes
Jul 16, 2025
nusbaume
left a comment
Collaborator
There was a problem hiding this comment.
Looks good @jimmielin! Just had a few questions and (hopefully) minor requests. Thanks!
Co-authored-by: Jesse Nusbaumer <nusbaume@ucar.edu>
Co-authored-by: Jesse Nusbaumer <nusbaume@ucar.edu>
Co-authored-by: Jesse Nusbaumer <nusbaume@ucar.edu>
…CAM-SIMA into hplin/read_constituent_fields
nusbaume
approved these changes
Jul 16, 2025
nusbaume
left a comment
Collaborator
There was a problem hiding this comment.
Looks great now, thanks @jimmielin!
Collaborator
Author
|
Thanks @nusbaume and @peverwhee! Will merge this in once I run regression tests. Code is confirmed to work in my HB branch. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tag name (required for release branches): sima0_06_001
Originator(s): @jimmielin
Description (include the issue title, and the keyword ['closes', 'fixes', 'resolves'] followed by the issue number):
Background
Certain fields written in the CAM snapshot (e.g.,
cam_in%cflx) have a constituent dimension. Reading such snapshot fields is necessary for testing vertical diffusion which needs this field.Presently, the registry is configured to accept the definition of fields with a
number_of_ccpp_constituentsdimension but the initial value read infrastructure does not accept it with the error:cflx already has an initial_value, using it now. It also cannot be read from file: cflx has unsupported dimension, number_of_ccpp_constituents.This PR enables the reading of 2-D variables with the dimension
horizontal_dimension number_of_ccpp_constituentswith the ability to trivially expand it to 3-D fields in the future.Details
cam_in%cflxascam_in_cflx_<constituent name>(i.e.,cam_in_cflx_Q,cam_in_cflx_CLDICE, ...)read_constituent_dimensioned_fieldwill read fields with a constituent dimension, reading variables one-by-one with a name constructed from a "base name" (cam_in_cflx) + "constituent short name" (_Q,_CLDICE, ...)Tested by vertical diffusion work in progress code in SIMA.
Describe any changes made to build system:
write_init_files.pyupdated infrastructure to allow constituent dimension inputDescribe any changes made to the namelist: N/A
List any changes to the defaults for the input datasets (e.g. boundary datasets):
List all files eliminated and why: N/A
List all files added and what they do:
List all existing files that have been modified, and describe the changes:
(Helpful git command:
git diff --name-status development...<your_branch_name>)If there are new failures (compared to the
test/existing-test-failures.txtfile),have them OK'd by the gatekeeper, note them here, and add them to the file.
If there are baseline differences, include the test and the reason for the
diff. What is the nature of the change? Roundoff?
derecho/intel/aux_sima: NLFAIL chemistry_nl - making baseline for #405
derecho/gnu/aux_sima: NLFAIL chemistry_nl - making baseline for #405
If this changes climate describe any run(s) done to evaluate the new
climate in enough detail that it(they) could be reproduced:
CAM-SIMA date used for the baseline comparison tests if different than latest: