Skip to content

sima0_08_003: Misc fix: 3-D input field read with dycore enabled; cam_in/cam_out from physics data & Add FADIAB test - #424

Merged
jimmielin merged 7 commits into
ESCOMP:developmentfrom
jimmielin:hplin/fixes_fadiab
Oct 16, 2025
Merged

sima0_08_003: Misc fix: 3-D input field read with dycore enabled; cam_in/cam_out from physics data & Add FADIAB test#424
jimmielin merged 7 commits into
ESCOMP:developmentfrom
jimmielin:hplin/fixes_fadiab

Conversation

@jimmielin

@jimmielin jimmielin commented Sep 11, 2025

Copy link
Copy Markdown
Collaborator

Tag name (required for release branches): sima0_08_003
Originator(s): @jimmielin

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

This PR fixes a set of miscellaneous bugs that were preventing a standalone case to run with the SE dycore - namely, the FADIAB compset.

  • Fixes input field read error (on dynamics INI grid) for all 3-D variables
    Previously the model would crash when reading any 3-D field in ncdata with the SE dycore
INFLD_REAL8_3D: field = U, grid = INI
INFLD_REAL8_3D: field(1:16,0:-1,1:3), file(488,30,1)
 INFLD_REAL8_3D: Mismatch between array bounds and field size for U, dimension 2

the vertical dimension was not being handled correctly in infld_real8_3d. Additionally, a dimensions name check was missing the right index offset.

  • Removes pointer attribute from cam_in and cam_out throughout cam_comp.F90 as this structure no longer has chunks in SIMA.
  • Updates NUOPC atm component to use cam_in and cam_out directly as allocated in physics_types.F90 via the CAM registry. Otherwise there would be
forrtl: severe (408): fort: (7): Attempt to use pointer CAM_OUT when it is not associated with a target
  • Adds FADIAB test on SE dycore. The CAM test uses analytic IC, but I decided to make it read a default ncdata here to have test coverage for this functionality as it was fixed by this PR.

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: 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/control/cam_comp.F90
  - remove pointer from dechunkized cam_in/cam_out

M       src/cpl/nuopc/atm_comp_nuopc.F90
  - use cam_in/cam_out from physics_types, not inline

M       src/utils/cam_field_read.F90
  - fixes to infld_real8_3d

M       cime_config/testdefs/testlist_cam.xml
  - add FADIAB test with read initial condition (for coverage of dycore-enabled ncdata read)

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?

B4B except new tests

derecho/intel/aux_sima:
SMS_Ln9.ne3pg3_ne3pg3_mg37.FADIAB.derecho_intel.cam-outfrq_se_cslam (Overall: DIFF): new baseline

SMS_Ln9.ne3pg3_ne3pg3_mg37.FKESSLER.derecho_intel.cam-outfrq_se_cslam_multitape (Overall: NLFAIL) details:
pre-existing failure

derecho/gnu/aux_sima:
SMS_Ln9.ne3pg3_ne3pg3_mg37.FADIAB.derecho_gnu.cam-outfrq_se_cslam (Overall: DIFF): new baseline

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:

…om physics data. Add FADIAB test

Update comment
@jimmielin jimmielin self-assigned this Sep 11, 2025
@jimmielin jimmielin added the bug-fix This PR was created to fix a specific bug. label Sep 11, 2025
@nusbaume
nusbaume self-requested a review September 12, 2025 15:56

@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 the bug fixes @jimmielin! I have some questions and cleanup requests, but otherwise it looks good!

Comment thread cime_config/testdefs/testlist_cam.xml Outdated
Comment thread src/control/cam_comp.F90 Outdated
Comment thread src/control/cam_comp.F90 Outdated
Comment thread src/control/cam_comp.F90 Outdated
Comment thread src/cpl/nuopc/atm_comp_nuopc.F90 Outdated
Comment thread src/control/cam_comp.F90
!
!-----------------------------------------------------------------------
use stepon, only: stepon_run3
use physics_types, only: cam_out ! Output from CAM to surface

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.

This is an example that will work instead of passing in through the subroutine. In the end they're all the same object.

@peverwhee
peverwhee self-requested a review October 16, 2025 16:29
Comment thread src/control/cam_comp.F90
Comment thread src/utils/cam_field_read.F90
@jimmielin
jimmielin requested a review from peverwhee October 16, 2025 18:07

@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.

Everything looks great to me now. Thanks @jimmielin!

@peverwhee peverwhee 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 @jimmielin !

@jimmielin jimmielin changed the title Misc fix: 3-D input field read with dycore enabled; cam_in/cam_out from physics data & Add FADIAB test sima0_08_003: Misc fix: 3-D input field read with dycore enabled; cam_in/cam_out from physics data & Add FADIAB test Oct 16, 2025
@jimmielin
jimmielin merged commit b19a5b4 into ESCOMP:development Oct 16, 2025
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug-fix This PR was created to fix a specific bug.

Projects

Status: Tag

Development

Successfully merging this pull request may close these issues.

5 participants