diff --git a/.gitmodules b/.gitmodules index 5ed8165dff..fe71efabc0 100644 --- a/.gitmodules +++ b/.gitmodules @@ -28,10 +28,10 @@ [submodule "atmos_phys"] path = src/atmos_phys - url = https://github.com/ESCOMP/atmospheric_physics - fxtag = atmos_phys0_26_000 + url = https://github.com/nusbaume/atmospheric_physics + fxtag = 2797786 fxrequired = AlwaysRequired - fxDONOTUSEurl = https://github.com/ESCOMP/atmospheric_physics + fxDONOTUSEurl = https://github.com/nusbaume/atmospheric_physics [submodule "cam-sima"] path = src/utils/cam-sima diff --git a/bld/build-namelist b/bld/build-namelist index faad098c53..8987a78fb8 100755 --- a/bld/build-namelist +++ b/bld/build-namelist @@ -5334,7 +5334,8 @@ sub check_snapshot_settings { # cam7 physpkg push(@validList_ac, ("'chem_emissions'", "'clubb_tend_cam'", - "'microp_section'")); + "'microp_section'", + "'pumas_tend'")); if ($use_subcol_microp =~ /$TRUE/io) { push (@validList_bc, ("'microp_driver_tend_subcol'")); } @@ -5375,7 +5376,8 @@ sub check_snapshot_settings { } else { push (@validList_bc, ("'macrop_driver_tend'")); } - push (@validList_bc, ("'microp_section'")); + push (@validList_bc, ("'microp_section'", + "'pumas_tend'")); if ($use_subcol_microp =~ /$TRUE/io) { push (@validList_bc, ("'microp_driver_tend_subcol'")); } diff --git a/bld/namelist_files/namelist_definition.xml b/bld/namelist_files/namelist_definition.xml index ca66966f56..4ffe96c2f5 100644 --- a/bld/namelist_files/namelist_definition.xml +++ b/bld/namelist_files/namelist_definition.xml @@ -3864,7 +3864,7 @@ the dynamics core. Very experimental. Causes advance_clubb_core to run in ascending mode, where the surface is at k=1, which is opposite -of the descending cam grid. This is mainly a testing/debugging option - it requires an expensive +of the descending cam grid. This is mainly a testing/debugging option - it requires an expensive data flipping step and should not change answers significantly. @@ -4144,7 +4144,7 @@ Valid values: 0 (no grid adaptation), 1 (use Lscale and wp2) -Selects which algorithm the fill_holes routine uses to correct +Selects which algorithm the fill_holes routine uses to correct below threshold values in field solutions. 0: off - Skip the mass conservative hole filling step, rely on blunt clipping 1: global - Fast but minimally local, most methods use this as a fallback step @@ -4376,7 +4376,7 @@ calculated by down-gradient diffusion. -Flag to implement the nontraditional Coriolis terms in the +Flag to implement the nontraditional Coriolis terms in the prognostic equations of w'w', u'w', and u'u. @@ -5900,7 +5900,7 @@ Default: + group="phys_ctl_nl" valid_values="pumas_tend,chem_emissions,aoa_tracers_timestep_tend,co2_cycle_set_ptend,chem_timestep_tend,orographic_form_drag_stress,vertical_diffusion_section,aero_model_drydep,gw_tend,qbo_relax,iondrag_calc_section,physics_dme_adjust,physics_dme_adjust,dadadj_tend,convect_deep_tend,convect_shallow_tend,convect_diagnostics_calc,macrop_driver_tend,clubb_tend_cam,microp_section,microp_driver_tend_subcol,aero_model_wetdep,radiation_tend,held_suarez_tend,kessler_tend,thatcher_jablonowski_precip_tend,rk_stratiform_tend,rayleigh_friction_tend,user_set" > Name of parameterization to take snapshot before running user_set is used when a user inserts a call to cam_snapshot_all_outfld using cam_snapshot_before_num as the first argument. @@ -5908,7 +5908,7 @@ Default: Unused + group="phys_ctl_nl" valid_values="pumas_tend,chem_emissions,aoa_tracers_timestep_tend,co2_cycle_set_ptend,chem_timestep_tend,orographic_form_drag_stress,vertical_diffusion_section,aero_model_drydep,gw_tend,qbo_relax,iondrag_calc_section,physics_dme_adjust,physics_dme_adjust,dadadj_tend,convect_deep_tend,convect_shallow_tend,convect_diagnostics_calc,macrop_driver_tend,clubb_tend_cam,microp_section,microp_driver_tend_subcol,aero_model_wetdep,radiation_tend,held_suarez_tend,kessler_tend,thatcher_jablonowski_precip_tend,rk_stratiform_tend,rayleigh_friction_tend,user_set" > Name of parameterization to take snapshot after running user_set is used when a user inserts a call to cam_snapshot_all_outfld using cam_snapshot_after_num as the first argument. diff --git a/src/physics/cam/physpkg.F90 b/src/physics/cam/physpkg.F90 index 3d6d260b23..852b29d20f 100644 --- a/src/physics/cam/physpkg.F90 +++ b/src/physics/cam/physpkg.F90 @@ -2817,6 +2817,10 @@ subroutine tphysbc (ztodt, state, & call microp_aero_run(state, ptend_aero, cld_macmic_ztodt, pbuf) call t_stopf('microp_aero_run') + if (trim(cam_take_snapshot_before) == "pumas_tend") then + call cam_snapshot_all_outfld_tphysbc(cam_snapshot_before_num, state, tend, cam_in, cam_out, pbuf, & + flx_heat, cmfmc, cmfcme, zdu, rliq, dlf, dlf2, rliq2, det_s, det_ice, net_flx) + end if call t_startf('microp_tend') if (use_subcol_microp) then @@ -2908,12 +2912,20 @@ subroutine tphysbc (ztodt, state, & (trim(cam_take_snapshot_before) == trim(cam_take_snapshot_after))) then call cam_snapshot_ptend_outfld(ptend, lchnk) end if + if ( (trim(cam_take_snapshot_after) == "pumas_tend") .and. & + (trim(cam_take_snapshot_before) == trim(cam_take_snapshot_after))) then + call cam_snapshot_ptend_outfld(ptend, lchnk) + end if call physics_update (state, ptend, ztodt, tend) if (trim(cam_take_snapshot_after) == "microp_section") then call cam_snapshot_all_outfld_tphysbc(cam_snapshot_after_num, state, tend, cam_in, cam_out, pbuf, & flx_heat, cmfmc, cmfcme, zdu, rliq, dlf, dlf2, rliq2, det_s, det_ice, net_flx) end if + if (trim(cam_take_snapshot_after) == "pumas_tend") then + call cam_snapshot_all_outfld_tphysbc(cam_snapshot_after_num, state, tend, cam_in, cam_out, pbuf, & + flx_heat, cmfmc, cmfcme, zdu, rliq, dlf, dlf2, rliq2, det_s, det_ice, net_flx) + end if call check_energy_cam_chng(state, tend, "microp_tend", nstep, ztodt, & zero, prec_str(:ncol)/cld_macmic_num_steps, & diff --git a/src/physics/cam7/micro_pumas_cam.F90 b/src/physics/cam7/micro_pumas_cam.F90 index 00731a3ef5..e4515681ce 100644 --- a/src/physics/cam7/micro_pumas_cam.F90 +++ b/src/physics/cam7/micro_pumas_cam.F90 @@ -1925,6 +1925,7 @@ subroutine micro_pumas_cam_tend(state, ptend, dtime, pbuf) integer :: nlev integer :: num_dust_bins + character(len=64) :: scheme_name character(512) :: ccpp_errmsg ! CCPP return status (non-blank for error return) character(128) :: pumas_errstring ! PUMAS return status (non-blank for error return) @@ -2474,7 +2475,9 @@ subroutine micro_pumas_cam_tend(state, ptend, dtime, pbuf) tnd_qsnow(:ncol,top_lev:), tnd_nsnow(:ncol,top_lev:), & re_ice(:ncol,top_lev:), & frzimm(:ncol,top_lev:), frzcnt(:ncol,top_lev:), & - frzdep(:ncol,top_lev:), rate1cld(:ncol,top_lev:), & + frzdep(:ncol,top_lev:), & + micro_mg_warm_rain, & + rate1cld(:ncol,top_lev:), & tlat(:ncol,top_lev:), qvlat(:ncol,top_lev:), & qcten(:ncol,top_lev:), qiten(:ncol,top_lev:), & ncten(:ncol,top_lev:), niten(:ncol,top_lev:), & @@ -2512,7 +2515,7 @@ subroutine micro_pumas_cam_tend(state, ptend, dtime, pbuf) freqs(:ncol,top_lev:), freqr(:ncol,top_lev:), & nfice(:ncol,top_lev:), qcrat(:ncol,top_lev:), & prer_evap(:ncol,top_lev:), proc_rates, & - ccpp_errmsg, ierr ) + scheme_name, ccpp_errmsg, ierr ) call handle_errmsg(ccpp_errmsg, subname="micro_pumas_cam_tend") diff --git a/src/physics/cam7/physpkg.F90 b/src/physics/cam7/physpkg.F90 index 78d1deba92..9cd9991d8f 100644 --- a/src/physics/cam7/physpkg.F90 +++ b/src/physics/cam7/physpkg.F90 @@ -1845,13 +1845,18 @@ subroutine tphysac (ztodt, cam_in, & call cam_snapshot_all_outfld_tphysac(cam_snapshot_before_num, state, tend, cam_in, cam_out, pbuf, & fh2o, surfric, obklen, flx_heat, cmfmc, dlf, det_s, det_ice, net_flx) end if - call t_startf('microp_aero_run') call microp_aero_run(state, ptend_aero, cld_macmic_ztodt, pbuf) call t_stopf('microp_aero_run') call t_startf('microp_tend') + if (trim(cam_take_snapshot_before) == "pumas_tend") then + call cam_snapshot_all_outfld_tphysac(cam_snapshot_before_num, state, tend, cam_in, cam_out, pbuf, & + fh2o, surfric, obklen, flx_heat, cmfmc, dlf, det_s, det_ice, net_flx) + end if + + if (use_subcol_microp) then if (trim(cam_take_snapshot_before) == "microp_driver_tend_subcol") then @@ -1904,12 +1909,20 @@ subroutine tphysac (ztodt, cam_in, & (trim(cam_take_snapshot_before) == trim(cam_take_snapshot_after))) then call cam_snapshot_ptend_outfld(ptend, lchnk) end if + if ( (trim(cam_take_snapshot_after) == "pumas_tend") .and. & + (trim(cam_take_snapshot_before) == trim(cam_take_snapshot_after))) then + call cam_snapshot_ptend_outfld(ptend, lchnk) + end if call physics_update (state_sc, ptend_sc, ztodt, tend_sc) if (trim(cam_take_snapshot_after) == "microp_driver_tend_subcol") then call cam_snapshot_all_outfld_tphysac(cam_snapshot_after_num, state_sc, tend_sc, cam_in, cam_out, pbuf, & fh2o, surfric, obklen, flx_heat, cmfmc, dlf, det_s, det_ice, net_flx) end if + if (trim(cam_take_snapshot_after) == "pumas_tend") then + call cam_snapshot_all_outfld_tphysac(cam_snapshot_after_num, state_sc, tend_sc, cam_in, cam_out, pbuf, & + fh2o, surfric, obklen, flx_heat, cmfmc, dlf, det_s, det_ice, net_flx) + end if call check_energy_cam_chng(state_sc, tend_sc, "microp_tend_subcol", & nstep, ztodt, zero_sc, & @@ -1936,12 +1949,20 @@ subroutine tphysac (ztodt, cam_in, & (trim(cam_take_snapshot_before) == trim(cam_take_snapshot_after))) then call cam_snapshot_ptend_outfld(ptend, lchnk) end if + if ( (trim(cam_take_snapshot_after) == "pumas_tend") .and. & + (trim(cam_take_snapshot_before) == trim(cam_take_snapshot_after))) then + call cam_snapshot_ptend_outfld(ptend, lchnk) + end if call physics_update (state, ptend, ztodt, tend) if (trim(cam_take_snapshot_after) == "microp_section") then call cam_snapshot_all_outfld_tphysac(cam_snapshot_after_num, state, tend, cam_in, cam_out, pbuf, & fh2o, surfric, obklen, flx_heat, cmfmc, dlf, det_s, det_ice, net_flx) end if + if (trim(cam_take_snapshot_after) == "pumas_tend") then + call cam_snapshot_all_outfld_tphysac(cam_snapshot_after_num, state, tend, cam_in, cam_out, pbuf, & + fh2o, surfric, obklen, flx_heat, cmfmc, dlf, det_s, det_ice, net_flx) + end if call check_energy_cam_chng(state, tend, "microp_tend", nstep, ztodt, & zero, prec_str(:ncol)/cld_macmic_num_steps, &