diff --git a/.gitmodules b/.gitmodules index bb3e3a50a..1325b4228 100644 --- a/.gitmodules +++ b/.gitmodules @@ -20,7 +20,7 @@ [submodule "ncar-physics"] path = src/physics/ncar_ccpp url = https://github.com/ESCOMP/atmospheric_physics - fxtag = 26f4f553da47fc4b347f0ee80ea1041dd0da7988 + fxtag = d2e6f343356f02229bcc66427d300e578e09c64f fxrequired = AlwaysRequired fxDONOTUSEurl = https://github.com/ESCOMP/atmospheric_physics [submodule "rrtmgp-data"] diff --git a/cime_config/testdefs/testlist_cam.xml b/cime_config/testdefs/testlist_cam.xml index 5b1f8c55d..4681270a8 100644 --- a/cime_config/testdefs/testlist_cam.xml +++ b/cime_config/testdefs/testlist_cam.xml @@ -88,6 +88,15 @@ + + + + + + + + + diff --git a/cime_config/testdefs/testmods_dirs/cam/outfrq_hb_vdiff_derecho/user_nl_cam b/cime_config/testdefs/testmods_dirs/cam/outfrq_hb_vdiff_derecho/user_nl_cam index 82e619371..6831304d1 100644 --- a/cime_config/testdefs/testmods_dirs/cam/outfrq_hb_vdiff_derecho/user_nl_cam +++ b/cime_config/testdefs/testmods_dirs/cam/outfrq_hb_vdiff_derecho/user_nl_cam @@ -1,6 +1,6 @@ ! these are FHIST_C4 snapshots -ncdata = '/glade/campaign/cesm/community/amwg/sima_baselines/cam_sima_test_snapshots/cam_ne3pg3_fhistc4_vertical_diffusion_hb_snapshot_derecho_gnu_before_c20250717.nc' -ncdata_check = '/glade/campaign/cesm/community/amwg/sima_baselines/cam_sima_test_snapshots/cam_ne3pg3_fhistc4_vertical_diffusion_hb_snapshot_derecho_gnu_after_c20250717.nc' +ncdata = '/glade/campaign/cesm/community/amwg/sima_baselines/cam_sima_test_snapshots/cam_ne3pg3_fhistc4_vertical_diffusion_hb_snapshot_derecho_gnu_before_c20260609.nc' +ncdata_check = '/glade/campaign/cesm/community/amwg/sima_baselines/cam_sima_test_snapshots/cam_ne3pg3_fhistc4_vertical_diffusion_hb_snapshot_derecho_gnu_after_c20260609.nc' ! tolerances for testing ncdata_check_err = .true. diff --git a/cime_config/testdefs/testmods_dirs/cam/outfrq_uw_vdiff_derecho/shell_commands b/cime_config/testdefs/testmods_dirs/cam/outfrq_uw_vdiff_derecho/shell_commands new file mode 100644 index 000000000..c409a410f --- /dev/null +++ b/cime_config/testdefs/testmods_dirs/cam/outfrq_uw_vdiff_derecho/shell_commands @@ -0,0 +1 @@ + ./xmlchange CAM_CONFIG_OPTS="--dyn none --physics-suites vdiff_bretherton_park" diff --git a/cime_config/testdefs/testmods_dirs/cam/outfrq_uw_vdiff_derecho/user_nl_cam b/cime_config/testdefs/testmods_dirs/cam/outfrq_uw_vdiff_derecho/user_nl_cam new file mode 100644 index 000000000..cfecff331 --- /dev/null +++ b/cime_config/testdefs/testmods_dirs/cam/outfrq_uw_vdiff_derecho/user_nl_cam @@ -0,0 +1,45 @@ +! these are FHIST_C5 snapshots +ncdata = '/glade/campaign/cesm/community/amwg/sima_baselines/cam_sima_test_snapshots/cam_ne3pg3_fhist_c5_vertical_diffusion_uw_snapshot_derecho_gnu_before_c20260309.nc' +ncdata_check = '/glade/campaign/cesm/community/amwg/sima_baselines/cam_sima_test_snapshots/cam_ne3pg3_fhist_c5_vertical_diffusion_uw_snapshot_derecho_gnu_after_c20260309.nc' + +! tolerances for testing +ncdata_check_err = .true. +min_difference = 2e-15 + +! cam5 vertical levels. +pver = 30 + +! namelist options for CAM5 UW PBL. +am_correction = .false. +do_iss = .true. +eddy_lbulk_max = 40.D3 +eddy_leng_max = 40.D3 +eddy_max_bot_pressure = 100.D3 +eddy_moist_entrain_a2l = 30.D0 +eddy_wstarent = .true. +kv_freetrop_scale = 1.D0 +kv_top_pressure = 0.D0 +kv_top_scale = 1.D0 + +! history output +hist_output_frequency;h1: 1*nsteps +hist_max_frames;h1: 1 +hist_add_inst_fields;h1:WGUSTD,UW_errorPBL,UW_pblh,UW_pblhp +hist_add_inst_fields;h1:UW_tpert,UW_qpert,UW_wpert,UW_ustar +hist_add_inst_fields;h1:UW_tkes,UW_minpblh +hist_add_inst_fields;h1:UW_ncvfin_o,UW_ncvfin_mg,UW_ncvfin_f +hist_add_inst_fields;h1:UW_n2,UW_s2,UW_ri +hist_add_inst_fields;h1:UW_sfuh,UW_sflh,UW_cldn,UW_qrl,UW_ql +hist_add_inst_fields;h1:BPROD,SFI,SPROD +hist_add_inst_fields;h1:UW_sfi,UW_chu,UW_chs,UW_cmu,UW_cms +hist_add_inst_fields;h1:UW_tke,UW_wcap +hist_add_inst_fields;h1:UW_kvh,UW_kvm,UW_turbtype +hist_add_inst_fields;h1:UW_gh,UW_sh,UW_sm,UW_ria,UW_leng +hist_add_inst_fields;h1:UW_kbase_o,UW_ktop_o,UW_kbase_mg,UW_ktop_mg +hist_add_inst_fields;h1:UW_kbase_f,UW_ktop_f,UW_wet,UW_web +hist_add_inst_fields;h1:UW_jtbu,UW_jbbu,UW_evhc,UW_jt2slv +hist_add_inst_fields;h1:UW_n2ht,UW_n2hb,UW_lwp,UW_optdepth +hist_add_inst_fields;h1:UW_radfrac,UW_radf,UW_wstar,UW_wstar3fact +hist_add_inst_fields;h1:UW_ebrk,UW_wbrk,UW_lbrk +hist_add_inst_fields;h1:UW_ricl,UW_ghcl,UW_shcl,UW_smcl,UW_wsed +hist_precision;h1: REAL64 diff --git a/src/control/cam_comp.F90 b/src/control/cam_comp.F90 index 0930ff759..186299fc1 100644 --- a/src/control/cam_comp.F90 +++ b/src/control/cam_comp.F90 @@ -320,16 +320,6 @@ subroutine cam_timestep_init() is_first_timestep = is_first_step() nstep = get_nstep() - !---------------------------------------------------------- - ! First phase of dynamics (at least couple from dynamics to physics) - ! Return time-step for physics from dynamics. - !---------------------------------------------------------- - call t_barrierf('sync_stepon_timestep_init', mpicom) - call t_startf('stepon_timestep_init') - call stepon_timestep_init(dtime_phys, cam_runtime_opts, phys_state, phys_tend, & - dyn_in, dyn_out) - call t_stopf('stepon_timestep_init') - !---------------------------------------------------------- ! TEMPORARY: Set initial MUSICA constituent values ! @@ -346,6 +336,16 @@ subroutine cam_timestep_init() constituent_properties) end if + !---------------------------------------------------------- + ! First phase of dynamics (at least couple from dynamics to physics) + ! Return time-step for physics from dynamics. + !---------------------------------------------------------- + call t_barrierf('sync_stepon_timestep_init', mpicom) + call t_startf('stepon_timestep_init') + call stepon_timestep_init(dtime_phys, cam_runtime_opts, phys_state, phys_tend, & + dyn_in, dyn_out) + call t_stopf('stepon_timestep_init') + ! !---------------------------------------------------------- ! PHYS_TIMESTEP_INIT Call the Physics package diff --git a/src/data/registry.xml b/src/data/registry.xml index 9df2e3dbd..fd9a8aa0c 100644 --- a/src/data/registry.xml +++ b/src/data/registry.xml @@ -1477,6 +1477,13 @@ 273.15_kind_phys tpert pbuf_tpert + + horizontal_dimension vertical_layer_dimension + pbuf_WSEDL + + + horizontal_dimension vertical_interface_dimension + 0.0_kind_phys + pbuf_kvm + + + horizontal_dimension vertical_interface_dimension + 0.0_kind_phys + pbuf_kvh + + 0.0_kind_phys pbuf_taubljy + + + horizontal_dimension + 0.0_kind_phys + pbuf_tautmsx + + + horizontal_dimension + 0.0_kind_phys + pbuf_tautmsy + + + horizontal_dimension + 0.0_kind_phys + pbuf_ksrftms + + diff --git a/src/dynamics/none/stepon.F90 b/src/dynamics/none/stepon.F90 index 153a7b4e6..b562cddec 100644 --- a/src/dynamics/none/stepon.F90 +++ b/src/dynamics/none/stepon.F90 @@ -37,6 +37,10 @@ subroutine stepon_timestep_init(dtime_out, cam_runtime_opts, phys_state, & use time_manager, only: get_step_size use cam_abortutils, only: endrun + use physics_types, only: is_first_timestep + use phys_comp, only: ncdata_check + use cam_initfiles, only: unset_path_str + ! Dummy arguments real(r8), intent(out) :: dtime_out ! Time-step (s) type(runtime_options), intent(in) :: cam_runtime_opts @@ -54,6 +58,15 @@ subroutine stepon_timestep_init(dtime_out, cam_runtime_opts, phys_state, & if (dtime_out <= 0) call endrun('stepon_timestep_init: bad dtime') end if + if (trim(ncdata_check) /= trim(unset_path_str)) then + !Because when running with snapshots (using the null dycore) + !for snapshot validation, + !the snapshots are always from the second timestep onwards, + !override here the value of is_first_timestep to .false. as it is + !never truly the first timestep for the physics + is_first_timestep = .false. + end if + end subroutine stepon_timestep_init !=========================================================================== diff --git a/src/physics/ncar_ccpp b/src/physics/ncar_ccpp index 26f4f553d..d2e6f3433 160000 --- a/src/physics/ncar_ccpp +++ b/src/physics/ncar_ccpp @@ -1 +1 @@ -Subproject commit 26f4f553da47fc4b347f0ee80ea1041dd0da7988 +Subproject commit d2e6f343356f02229bcc66427d300e578e09c64f diff --git a/src/physics/utils/physics_data.F90 b/src/physics/utils/physics_data.F90 index 155afc18d..67eb78919 100644 --- a/src/physics/utils/physics_data.F90 +++ b/src/physics/utils/physics_data.F90 @@ -589,6 +589,16 @@ subroutine read_constituent_dimensioned_field_2d(const_props, file, std_name, ba var_found = .false. call cam_pio_find_var(file, [file_var_name], found_name, vardesc, var_found) + ! Some constituents whose names are not specified in the registry + ! will have cnst_ prepended to them (e.g., cnst_dst_a1); also try reading + ! from file by removing this prefix: + if (.not. var_found) then + if (constituent_name(1:5) == 'cnst_') then + file_var_name = trim(base_var_names(base_idx)) // '_' // trim(constituent_name(6:)) + call cam_pio_find_var(file, [file_var_name], found_name, vardesc, var_found) + end if + end if + if (var_found) then ! Read the variable if (masterproc) then diff --git a/test/existing-test-failures.txt b/test/existing-test-failures.txt index 1b9153871..06a8c5afd 100644 --- a/test/existing-test-failures.txt +++ b/test/existing-test-failures.txt @@ -2,7 +2,7 @@ SMS_Ln9.ne3pg3_ne3pg3_mg37.FKESSLER.derecho_intel.cam-outfrq_se_cslam_multitape - known NLFAIL due to cime validation error on multiple history tapes (#430) SMS_Ln9.ne3pg3_ne3pg3_mg37.FADIAB.derecho_gnu.cam-outfrq_se_cslam - - known FAIL on shr_reprosum_calc call from src/dynamics/se/dycore/global_norms_mod.F90 + - known FAIL on shr_reprosum_calc call due to commented out cnst_init_default (constituent default value initialization) in src/dynamics/se/dyn_comp.F90 (#509) SMS_Ln2.ne3pg3_ne3pg3_mg37.FPHYStest.derecho_gnu.cam-outfrq_zm_derecho (Overall: DIFF) details: - known failure due to ZM science update after merging atmos_phys #392