Skip to content
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

Fix constituent handling #272

Merged
merged 4 commits into from
Jul 5, 2024

Conversation

peverwhee
Copy link
Collaborator

Main fix:

  • physics/utils/physics_data.F90: update the logic to not return after determining if a variable is a constituent. This keeps the "initialized" logic so that SIMA doesn't try to read in constituents that are initialized by the SE dycore.
    • Basically, only set find_input_name_idx to "const_idx" (the parameter that determines if a variable is a constituent to be read in from file) if it's not marked as initialized or protected.

Smaller fixes

  • dynamics/se/namelist_definition_se_dycore.xml: add namelist default for ne3 grid
  • data/write_init_files.py: trim constituent standard names output to log

@peverwhee peverwhee requested a review from nusbaume July 3, 2024 22:57
@peverwhee peverwhee self-assigned this Jul 3, 2024
Copy link
Collaborator

@nusbaume nusbaume left a comment

Choose a reason for hiding this comment

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

Thanks for tracking down this bug! I just had one (optional) code clean-up request.

Also, an FYI that I have added instructions for the current CAM-SIMA regression tests here:
https://github.com/ESCOMP/CAM-SIMA/wiki/CAM-SIMA-testing#regression-testing-manual

Please let me know if you have any questions!

src/physics/utils/physics_data.F90 Outdated Show resolved Hide resolved
@peverwhee
Copy link
Collaborator Author

tests run and passed through model_build:
SMS_Ln2.ne3pg3_ne3pg3_mg37.FPHYStest.derecho_intel.cam-outfrq_kessler_derecho_nooutput
SMS_Ln2.mpasa480_mpasa480.FKESSLER.derecho_gnu.cam-outfrq_kessler_mpas_derecho_nooutput
SMS_Ln2.ne3pg3_ne3pg3_mg37.FPHYStest.derecho_gnu.cam-outfrq_held_suarez_derecho_nooutput

@peverwhee peverwhee requested a review from mwaxmonsky July 5, 2024 17:03
Copy link
Collaborator

@mwaxmonsky mwaxmonsky left a comment

Choose a reason for hiding this comment

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

Looks great @peverwhee!

@peverwhee
Copy link
Collaborator Author

Requesting re-review for new fix:

  • control/cam_comp.F90: move call to stepon_run1 to cam_timestep_init so that host variables are initialized before any call to CCPP physics. Also rename stepon_run1 to stepon_timestep_init
  • dynamics/*/stepon.F90: rename stepon_run1 to stepon_timestep_init

All regression tests pass.

@peverwhee peverwhee merged commit 7bdc70e into ESCOMP:development Jul 5, 2024
6 checks passed
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