Skip to content

Add ability to read snapshot variable with extra dimension#468

Merged
nusbaume merged 4 commits intoESCOMP:developmentfrom
nusbaume:generic_phys_read
Feb 10, 2026
Merged

Add ability to read snapshot variable with extra dimension#468
nusbaume merged 4 commits intoESCOMP:developmentfrom
nusbaume:generic_phys_read

Conversation

@nusbaume
Copy link
Copy Markdown
Collaborator

@nusbaume nusbaume commented Feb 9, 2026

Tag name (required for release branches):
Originator(s): nusbaume

Description (include the issue title, and the keyword ['closes', 'fixes', 'resolves'] followed by the issue number):

This PR allows for the physics snapshot file-reading capability to read in a variable that contains a horizontal, vertical, and non-constituents third dimension from a NetCDF file, which is needed to bring in the PUMAS microphysics parameterization.

Describe any changes made to build system:

M src/data/write_init_files.py

  • Modify dimension checking to allow for a variable to have an extra non-spatial, non-constituents dimension.

Describe any changes made to the namelist: N/A

List any changes to the defaults for the input datasets (e.g. boundary datasets): N/A

List all files eliminated and why: N/A

List all files added and what they do: N/A

List all existing files that have been modified, and describe the changes:
(Helpful git command: git diff --name-status development...<your_branch_name>)

M src/physics/utils/physics_data.F90
M src/utils/cam_field_read.F90

  • Add new file reading and checking subroutines for three-rank (horizontal, vertical, plus one more dimension) variables.

M test/unit/python/sample_files/write_init_files/phys_vars_init_check_4D.F90
M test/unit/python/sample_files/write_init_files/physics_inputs_4D.F90
M test/unit/python/sample_files/write_init_files/physics_inputs_bvd.F90
M test/unit/python/sample_files/write_init_files/temp_adjust_4D.F90
M test/unit/python/sample_files/write_init_files/temp_adjust_4D.meta
M test/unit/python/sample_files/write_init_files/var_4D_reg.xml
M test/unit/python/test_registry.py
M test/unit/python/test_write_init_files.py

  • Update tests to check that the correct code is generated for three-rank and four-rank variables, and that the new error messages are printed correctly.

If there are new failures (compared to the test/existing-test-failures.txt file),
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:

MS_Ln9.ne3pg3_ne3pg3_mg37.FKESSLER.derecho_intel.cam-outfrq_se_cslam_multitape (Overall: NLFAIL)

  • Expected failure.

derecho/gnu/aux_sima: ALL PASS

derecho/nvhpc/aux_sima: N/A (regression test not in mainline CAM-SIMA yet).

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:

@nusbaume nusbaume self-assigned this Feb 9, 2026
Copy link
Copy Markdown
Member

@jimmielin jimmielin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @nusbaume! Just a couple of minor suggested changes (one that I am not too sure of so it's just a question)

@nusbaume nusbaume requested a review from jimmielin February 9, 2026 18:44
Copy link
Copy Markdown
Member

@jimmielin jimmielin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @nusbaume!

Copy link
Copy Markdown
Collaborator

@peverwhee peverwhee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@nusbaume nusbaume merged commit 7bada0c into ESCOMP:development Feb 10, 2026
16 checks passed
@nusbaume nusbaume deleted the generic_phys_read branch March 9, 2026 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Tag

Development

Successfully merging this pull request may close these issues.

3 participants