Skip to content

Bring in cam_in/cam_out variables to the registry#402

Merged
cacraigucar merged 26 commits into
ESCOMP:developmentfrom
cacraigucar:cam_sima_caminout
Jul 30, 2025
Merged

Bring in cam_in/cam_out variables to the registry#402
cacraigucar merged 26 commits into
ESCOMP:developmentfrom
cacraigucar:cam_sima_caminout

Conversation

@cacraigucar

@cacraigucar cacraigucar commented Jun 30, 2025

Copy link
Copy Markdown
Collaborator

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

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

Describe any changes made to build system: N/A

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:
D src/control/camsrfexch.F90
D src/control/camsrfexch.meta
- camsrfexch is not needed in CAM-SIMA and was just a temporary routine until cam_in/cam_out were fully implemented

List all files added and what they do:
A test/unit/python/sample_files/physics_types_ddt_mf.F90
A test/unit/python/sample_files/physics_types_ddt_mf.meta
- test new functionality

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

M src/control/cam_comp.F90
M src/cpl/nuopc/atm_comp_nuopc.F90
M src/dynamics/mpas/stepon.F90
M src/dynamics/none/stepon.F90
M src/dynamics/se/stepon.F90
- Use cam_in/cam_out from the registry now (physics_types)

M src/cpl/nuopc/atm_import_export.F90
M src/cpl/nuopc/atm_stream_ndep.F90
- Use cam_in/cam_out from the registry now (physics_types)
- Fix bugs in code which was previously #if def'd out

M src/physics/utils/phys_comp.F90
- New interface for allocate_physics_types_fields

M src/data/generate_registry_data.py
- Grab dimensions via 'use' statements instead of input arguments in the generated 'allocate_physics_types_fields' subroutine to allow for arbitrary registry variable order

M test/unit/python/sample_files/physics_types_complete.F90
M test/unit/python/sample_files/physics_types_complete.meta
M test/unit/python/sample_files/physics_types_ddt2.F90
M test/unit/python/sample_files/physics_types_ddt_array.F90
M test/unit/python/sample_files/physics_types_ddt_eul.F90
M test/unit/python/sample_files/physics_types_ddt_eul.meta
M test/unit/python/sample_files/physics_types_ddt_fv.F90
M test/unit/python/sample_files/physics_types_ddt_fv.meta
M test/unit/python/sample_files/physics_types_ddt_se.F90
M test/unit/python/sample_files/physics_types_ddt_se.meta
M test/unit/python/sample_files/physics_types_parameter.F90
M test/unit/python/sample_files/physics_types_simple.F90
M test/unit/python/sample_files/reg_good_complete.xml
M test/unit/python/sample_files/reg_good_ddt.xml
M test/unit/python/sample_files/reg_good_mf.xml
M test/unit/python/test_registry.py
- update tests as needed with the new code

M src/data/registry.xml
- Fully implement cam_in/cam_out

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: All BFB

derecho/gnu/aux_sima: All BFB

@cacraigucar
cacraigucar marked this pull request as draft June 30, 2025 21:56
@nusbaume

nusbaume commented Jul 7, 2025

Copy link
Copy Markdown
Collaborator

@cacraigucar I believe the registry generator has now been successfully updated to bring in dimensions via Fortran use statements instead of subroutine arguments, which should eliminate any registry dimension ordering issues. Of course if you still find that you are failing tests please let me know. Thanks!

@jimmielin jimmielin left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks @cacraigucar and @nusbaume! I took a first look and everything looks good, I had one minor comment. I can take a more complete look after it's lifted out of draft when you're ready. I'll also pull this into my HB branch to see if everything continues to work.

Comment thread src/physics/utils/musica_ccpp_dependencies.F90 Outdated
@cacraigucar cacraigucar self-assigned this Jul 9, 2025
@cacraigucar
cacraigucar marked this pull request as ready for review July 9, 2025 22:02
@cacraigucar
cacraigucar requested a review from nusbaume July 9, 2025 22:02

@jimmielin jimmielin left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks @cacraigucar! I had a few questions and minor comments. I think we might be able to remove ccpp_constant_four for now as the only field that's declared with it doesn't appear to need that dimension.

Comment thread .gitmodules Outdated
Comment thread src/cpl/nuopc/atm_import_export.F90 Outdated
Comment thread src/cpl/nuopc/atm_import_export.F90 Outdated
Comment thread src/cpl/nuopc/atm_import_export.F90
Comment thread src/data/registry.xml Outdated
Comment thread src/data/registry.xml Outdated

@nusbaume nusbaume left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks @cacraigucar! I have some change requests, but hopefully all of them are minor. Of course if you do run into any problems or issues with any of my requests just let me know. Thanks again!

Comment thread src/cpl/nuopc/atm_import_export.F90
Comment thread src/data/generate_registry_data.py Outdated
Comment thread src/data/generate_registry_data.py Outdated
Comment thread src/data/physconst.F90 Outdated
Comment thread src/data/physconst.meta Outdated
Comment thread src/data/registry.xml Outdated
Comment thread src/data/registry.xml
Comment thread src/data/registry.xml Outdated
Comment thread src/data/registry.xml Outdated
Comment thread src/data/registry.xml Outdated

@cacraigucar cacraigucar left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

First round of review comments addressed

Comment thread src/data/registry.xml Outdated
Comment thread src/data/registry.xml Outdated
Comment thread src/data/registry.xml Outdated
Comment thread src/data/registry.xml
Comment thread src/data/registry.xml Outdated
Comment thread src/cpl/nuopc/atm_import_export.F90
Comment thread src/data/generate_registry_data.py Outdated
Comment thread src/cpl/nuopc/atm_import_export.F90 Outdated
Comment thread src/cpl/nuopc/atm_import_export.F90 Outdated
Comment thread src/physics/utils/musica_ccpp_dependencies.F90 Outdated

@cacraigucar cacraigucar left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

More changes

Comment thread src/control/camsrfexch.F90
Comment thread src/data/physconst.meta Outdated

@jimmielin jimmielin left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks @cacraigucar!

@nusbaume nusbaume left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for resolving all of my concerns @cacraigucar! Everything looks good to me now.

@cacraigucar
cacraigucar merged commit 84a0218 into ESCOMP:development Jul 30, 2025
12 checks passed
@cacraigucar
cacraigucar deleted the cam_sima_caminout branch July 30, 2025 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants