Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
9 changes: 9 additions & 0 deletions cime_config/testdefs/testlist_cam.xml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,15 @@
<option name="comment">Test for Holtslag-Boville boundary layer scheme and vertical diffusion</option>
</options>
</test>
<test compset="FPHYStest" grid="ne3pg3_ne3pg3_mg37" name="SMS_Ln2" testmods="cam/outfrq_uw_vdiff_derecho">
<machines>
<machine name="derecho" compiler="gnu" category="aux_sima"/>
</machines>
<options>
<option name="wallclock">00:10:00</option>
<option name="comment">Test for Bretherton-Park (UW) boundary layer scheme and vertical diffusion</option>
</options>
</test>
<test compset="FPHYStest" grid="ne3pg3_ne3pg3_mg37" name="SMS_Ln2" testmods="cam/outfrq_gw_cam4_derecho">
<machines>
<machine name="derecho" compiler="gnu" category="aux_sima"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
./xmlchange CAM_CONFIG_OPTS="--dyn none --physics-suites vdiff_bretherton_park"
Original file line number Diff line number Diff line change
@@ -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
20 changes: 10 additions & 10 deletions src/control/cam_comp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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
!
Expand All @@ -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
Expand Down
56 changes: 55 additions & 1 deletion src/data/registry.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1477,6 +1477,13 @@
<initial_value>273.15_kind_phys</initial_value>
<ic_file_input_names>tpert pbuf_tpert</ic_file_input_names>
</variable>
<variable local_name="wsedl"
standard_name="sedimentation_velocity_of_liquid_stratus_cloud_droplet"
units="m s-1" type="real" kind="kind_phys"
allocatable="allocatable">
<dimensions>horizontal_dimension vertical_layer_dimension</dimensions>
<ic_file_input_names>pbuf_WSEDL</ic_file_input_names>
</variable>

<!-- Temporary initializations for gravity wave parameterizations -->
<variable local_name="ttend_clubb"
Expand Down Expand Up @@ -1577,6 +1584,23 @@
</variable>

<!-- vertical diffusion solver variables - need to be kept in the CAM registry -->
<variable local_name="kvm"
standard_name="eddy_momentum_diffusivity_at_interfaces"
units="m2 s-1" type="real" kind="kind_phys"
allocatable="allocatable">
<dimensions>horizontal_dimension vertical_interface_dimension</dimensions>
<initial_value>0.0_kind_phys</initial_value>
<ic_file_input_names>pbuf_kvm</ic_file_input_names>
</variable>
<variable local_name="kvh"
standard_name="eddy_heat_diffusivity_at_interfaces"
units="m2 s-1" type="real" kind="kind_phys"
allocatable="allocatable">
<dimensions>horizontal_dimension vertical_interface_dimension</dimensions>
<initial_value>0.0_kind_phys</initial_value>
<ic_file_input_names>pbuf_kvh</ic_file_input_names>
</variable>

<variable local_name="tauresx"
standard_name="eastward_reserved_stress_at_surface_on_previous_timestep"
units="N m-2" type="real" kind="kind_phys"
Expand All @@ -1603,7 +1627,7 @@
</variable>
<!-- REMOVECAM: the final standard name for these quantities below are
{east,north}ward_turbulent_orographic_form_drag_stress_at_surface.
however, it is shared with tautmsx; in order to distinguish between these two in CAM snapshots,
however, it is shared with tautms{x,y}; in order to distinguish between these two in CAM snapshots,
an alternate standard name is currently used. When CAM snapshots are retired, only either
Beljaars or TMS (which are mutually exclusive) provide the {east,north}ward_orographic_form_drag_stress_at_surface. -->
<variable local_name="taubljx"
Expand All @@ -1622,6 +1646,36 @@
<initial_value>0.0_kind_phys</initial_value>
<ic_file_input_names>pbuf_taubljy</ic_file_input_names>
</variable>
<!-- REMOVECAM: the final standard name for these quantities below are
{east,north}ward_turbulent_orographic_form_drag_stress_at_surface.
however, it is shared with taublj{x,y}; in order to distinguish between these two in CAM snapshots,
an alternate standard name is currently used. When CAM snapshots are retired, only either
Beljaars or TMS (which are mutually exclusive) provide the {east,north}ward_orographic_form_drag_stress_at_surface. -->
<variable local_name="tautmsx"
standard_name="eastward_turbulent_mountain_surface_stress_tbd"
units="N m-2" type="real" kind="kind_phys"
allocatable="allocatable">
<dimensions>horizontal_dimension</dimensions>
<initial_value>0.0_kind_phys</initial_value>
<ic_file_input_names>pbuf_tautmsx</ic_file_input_names>
</variable>
<variable local_name="tautmsy"
standard_name="northward_turbulent_mountain_surface_stress_tbd"
units="N m-2" type="real" kind="kind_phys"
allocatable="allocatable">
<dimensions>horizontal_dimension</dimensions>
<initial_value>0.0_kind_phys</initial_value>
<ic_file_input_names>pbuf_tautmsy</ic_file_input_names>
</variable>
<variable local_name="ksrftms"
standard_name="turbulent_orographic_form_drag_coefficent_at_surface"
units="kg s-1 m-2" type="real" kind="kind_phys"
allocatable="allocatable">
<dimensions>horizontal_dimension</dimensions>
<initial_value>0.0_kind_phys</initial_value>
<ic_file_input_names>pbuf_ksrftms</ic_file_input_names>
</variable>

<variable local_name="apply_non_wv_cflx_in_free_atm_vdiff"
standard_name="do_apply_ccpp_constituent_fluxes_excluding_water_vapor_in_vertical_diffusion"
units="flag" type="logical">
Expand Down
13 changes: 13 additions & 0 deletions src/dynamics/none/stepon.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

!===========================================================================
Expand Down
2 changes: 1 addition & 1 deletion src/physics/ncar_ccpp
Submodule ncar_ccpp updated 38 files
+58 −2 phys_utils/atmos_phys_pbl_utils.F90
+731 −0 schemes/bretherton_park/bretherton_park_diff.F90
+832 −0 schemes/bretherton_park/bretherton_park_diff.meta
+160 −0 schemes/bretherton_park/bretherton_park_diff_namelist.xml
+3,386 −0 schemes/bretherton_park/eddy_diff.F90
+89 −0 schemes/bretherton_park/eddy_diffusivity_adjustment_above_pbl.F90
+86 −0 schemes/bretherton_park/eddy_diffusivity_adjustment_above_pbl.meta
+124 −0 schemes/bretherton_park/eddy_diffusivity_adjustment_above_pbl_namelist.xml
+2 −5 schemes/cloud_fraction/compute_cloud_fraction.F90
+257 −171 schemes/holtslag_boville/holtslag_boville_diff.F90
+17 −77 schemes/holtslag_boville/holtslag_boville_diff.meta
+1 −121 schemes/holtslag_boville/holtslag_boville_diff_interstitials.F90
+0 −138 schemes/holtslag_boville/holtslag_boville_diff_interstitials.meta
+3 −2 schemes/musica/tuvx/musica_ccpp_tuvx.F90
+11 −11 schemes/radiation_utils/prescribe_radiative_gas_concentrations.F90
+2 −2 schemes/rrtmgp/rrtmgp_inputs.meta
+434 −0 schemes/sima_diagnostics/bretherton_park_diff_diagnostics.F90
+449 −0 schemes/sima_diagnostics/bretherton_park_diff_diagnostics.meta
+1 −1 schemes/sima_diagnostics/diffusion_solver_diagnostics.F90
+4 −4 schemes/sima_diagnostics/diffusion_solver_diagnostics.meta
+1 −1 schemes/sima_diagnostics/holtslag_boville_diff_diagnostics.meta
+4 −7 schemes/sima_diagnostics/rrtmgp_cloud_diagnostics.F90
+2 −2 schemes/sima_diagnostics/rrtmgp_cloud_diagnostics.meta
+0 −2 schemes/sima_diagnostics/sima_state_diagnostics.F90
+34 −6 schemes/vertical_diffusion/diffusion_solver.F90
+22 −24 schemes/vertical_diffusion/diffusion_solver.meta
+103 −1 schemes/vertical_diffusion/diffusion_stubs.F90
+133 −0 schemes/vertical_diffusion/diffusion_stubs.meta
+206 −0 schemes/vertical_diffusion/vertical_diffusion_interstitials.F90
+294 −0 schemes/vertical_diffusion/vertical_diffusion_interstitials.meta
+1 −1 schemes/zhang_mcfarlane/zm_conv_momtran.F90
+57 −0 schemes/zhang_mcfarlane/zm_prepare_flux_for_check_energy.F90
+61 −0 schemes/zhang_mcfarlane/zm_prepare_flux_for_check_energy.meta
+24 −13 suites/suite_cam4.xml
+308 −0 suites/suite_cam5.xml
+2 −0 suites/suite_cam7.xml
+98 −0 test/test_suites/suite_vdiff_bretherton_park.xml
+23 −13 test/test_suites/suite_vdiff_holtslag_boville.xml
10 changes: 10 additions & 0 deletions src/physics/utils/physics_data.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/existing-test-failures.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading