diff --git a/doc/ChangeLog b/doc/ChangeLog index c2c22669a0..27d34bf57c 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,5 +1,57 @@ =============================================================== +Tag name: cam6_4_101 +Originator(s): jimmielin +Date: July 1, 2025 +One-line Summary: Write cam_in%cflx for all constituents in snapshots, not just Q +Github PR URL: https://github.com/ESCOMP/CAM/pull/1336 + +Purpose of changes (include the issue number and title text for each relevant GitHub issue): +- For CAM snaphots, write cam_in%cflx for all constituents instead of just Q as it was declared horiz_only. Now write out as cam_in_cflx_(constituent name) - https://github.com/ESCOMP/CAM/issues/1335 + +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 boundary datasets: N/A + +Describe any substantial timing or memory changes: N/A + +Code reviewed by: cacraig + +List all files eliminated: N/A + +List all files added and what they do: N/A + +List all existing files that have been modified, and describe the changes: +M src/control/cam_snapshot_common.F90 + - fix #1335 +M src/control/cam_history.F90 + - fix typo in comment + +If there were any failures reported from running test_driver.sh on any test +platform, and checkin with these failures has been OK'd by the gatekeeper, +then copy the lines from the td.*.status files for the failed tests to the +appropriate machine below. All failed tests must be justified. + +derecho/intel/aux_cam: + +SMS_D_Ln9_P1280x1.ne0CONUSne30x8_ne0CONUSne30x8_mt12.FCHIST.derecho_intel.cam-outfrq9s (Overall: FAIL) +- pre-existing failure due to build-namelist error requiring CLM/CTSM external update + +derecho/nvhpc/aux_cam: All PASS + +izumi/nag/aux_cam: All PASS + +izumi/gnu/aux_cam: All PASS + +CAM tag used for the baseline comparison tests if different than previous +tag: + +Summarize any changes to answers: B4B - only new fields to snapshots + +=============================================================== + Tag name: cam6_4_100 Originator(s): peverwhee, gdicker1 Date: 26 June 2025 @@ -69,7 +121,7 @@ Github PR URL: https://github.com/ESCOMP/CAM/pull/1331 Purpose of changes (include the issue number and title text for each relevant GitHub issue): -. Resolve #1329 - Create an F compset for CAM4 +. Resolve #1329 - Create an F compset for CAM4 - Add compset FHIST_C4 . Modify some MPAS tests. @@ -79,7 +131,7 @@ Purpose of changes (include the issue number and title text for each relevant Gi . Resolve #1332 - ne0ARCTICne30x4 test fails with 1280 tasks and fixed CTSM, because of too few processors - increase pe count from 1280 to 1920. Make this the default in the - config_pes.xml file. + config_pes.xml file. . Resolve #1326 - Add MPAS-O and MPAS-SI from EarthWorksOrg/EarthWorks - add "mpaso" as a valid value in the configure definition file @@ -157,7 +209,7 @@ cime_config/testdefs/testlist_cam.xml ERC_D_Ln9.f10_f10_mg37.QPC5.izumi_gnu.cam-outfrq3s_unicon . Increase PEs for ARCTIC test by modifying config_pes.xml and remove the specification from the test definition. - Replace + Replace SMS_D_Ln9_P1280x1.ne0CONUSne30x8_ne0CONUSne30x8_mt12.FCHIST.derecho_intel.cam-outfrq9s by SMS_D_Ln9.ne0CONUSne30x8_ne0CONUSne30x8_mt12.FCHIST.derecho_intel.cam-outfrq9s diff --git a/src/control/cam_history.F90 b/src/control/cam_history.F90 index 5957ac7252..21080d3462 100644 --- a/src/control/cam_history.F90 +++ b/src/control/cam_history.F90 @@ -7023,7 +7023,7 @@ end subroutine cam_history_snapshot_deactivate subroutine cam_history_snapshot_activate(name, tape) - ! This subroutine activates (set aftflag to true) for the requested tape number + ! This subroutine activates (set actflag to true) for the requested tape number character(len=*), intent(in) :: name integer, intent(in) :: tape diff --git a/src/control/cam_snapshot_common.F90 b/src/control/cam_snapshot_common.F90 index 0f49d27a02..859295a4ba 100644 --- a/src/control/cam_snapshot_common.F90 +++ b/src/control/cam_snapshot_common.F90 @@ -433,9 +433,16 @@ subroutine cam_in_snapshot_init(cam_snapshot_before_num, cam_snapshot_after_num, ! This subroutine does the addfld calls for cam_in fields !-------------------------------------------------------- + use constituents, only: cnst_name + type(cam_in_t), intent(in) :: cam_in - integer,intent(in) :: cam_snapshot_before_num, cam_snapshot_after_num + integer, intent(in) :: cam_snapshot_before_num, cam_snapshot_after_num + + ! for constituent loop. + integer :: mcnst + character(len=64) :: fname + character(len=128) :: lname ncam_in_var = 0 @@ -464,8 +471,15 @@ subroutine cam_in_snapshot_init(cam_snapshot_before_num, cam_snapshot_after_num, call snapshot_addfld( ncam_in_var, cam_in_snapshot, cam_snapshot_before_num, cam_snapshot_after_num, & 'cam_in%shf', 'cam_in_shf', 'unset', horiz_only) - call snapshot_addfld( ncam_in_var, cam_in_snapshot, cam_snapshot_before_num, cam_snapshot_after_num, & - 'cam_in%cflx', 'cam_in_cflx', 'unset', horiz_only) + ! cam_in%cflx is sized (pcols, pcnst); because the constituent indices at the model that reads this + ! data may not match the indices in the model outputting the snapshot, + ! cam_in%cflx is split into a series of snapshot variables cam_in_cflx_(constituent name). + do mcnst = 1, pcnst + fname = 'cam_in_cflx_'//trim(cnst_name(mcnst)) + lname = 'cam_in_cflx_'//trim(cnst_name(mcnst)) + call snapshot_addfld( ncam_in_var, cam_in_snapshot, cam_snapshot_before_num, cam_snapshot_after_num, & + fname, lname, 'kg m-2 s-1', horiz_only) + enddo call snapshot_addfld( ncam_in_var, cam_in_snapshot, cam_snapshot_before_num, cam_snapshot_after_num, & 'cam_in%wsx', 'cam_in_wsx', 'unset', horiz_only) @@ -988,11 +1002,15 @@ end subroutine tend_snapshot_all_outfld subroutine cam_in_snapshot_all_outfld(lchnk, file_num, cam_in) + use constituents, only: cnst_name + integer, intent(in) :: lchnk integer, intent(in) :: file_num type(cam_in_t), intent(in) :: cam_in integer :: i + integer :: mcnst + character(len=64) :: fname do i=1, ncam_in_var @@ -1057,7 +1075,11 @@ subroutine cam_in_snapshot_all_outfld(lchnk, file_num, cam_in) call outfld(cam_in_snapshot(i)%standard_name, cam_in%dstflx, pcols, lchnk) case default - call endrun('ERROR in cam_in_snapshot_all_outfld: no match found for '//trim(cam_in_snapshot(i)%ddt_string)) + if (cam_in_snapshot(i)%ddt_string(1:12) == 'cam_in_cflx_') then + ! This case is handled below in a loop (not looked up here as it would be i*pcnst iterations) + else + call endrun('ERROR in cam_in_snapshot_all_outfld: no match found for '//trim(cam_in_snapshot(i)%ddt_string)) + endif end select @@ -1065,6 +1087,15 @@ subroutine cam_in_snapshot_all_outfld(lchnk, file_num, cam_in) end do + ! Handle cam_in%cflx constituent loop + do mcnst = 1, pcnst + fname = 'cam_in_cflx_'//trim(cnst_name(mcnst)) + + call cam_history_snapshot_activate(trim(fname), file_num) + call outfld(fname, cam_in%cflx(:,mcnst), pcols, lchnk) + call cam_history_snapshot_deactivate(trim(fname)) + end do + end subroutine cam_in_snapshot_all_outfld subroutine cam_out_snapshot_all_outfld(lchnk, file_num, cam_out)