Skip to content

Commit

Permalink
merge to cam6_3_135
Browse files Browse the repository at this point in the history
  • Loading branch information
brian-eaton committed Nov 17, 2023
2 parents f1cfe38 + 408f014 commit 4578ae9
Show file tree
Hide file tree
Showing 27 changed files with 730 additions and 298 deletions.
25 changes: 10 additions & 15 deletions Externals_CAM.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,18 @@ required = True

[cosp2]
local_path = src/physics/cosp2/src
protocol = svn
repo_url = https://github.com/CFMIP/COSPv2.0/tags/
tag = v2.1.4cesm/src
protocol = git
repo_url = https://github.com/CFMIP/COSPv2.0
sparse = ../.cosp_sparse_checkout
tag = v2.1.4cesm
required = True

[clubb]
local_path = src/physics/clubb
protocol = svn
repo_url = https://github.com/larson-group/clubb_release/tags/
tag = clubb_4ncar_20221129_59cb19f_20230330_branchtag/src/CLUBB_core
required = True

[silhs]
local_path = src/physics/silhs
protocol = svn
repo_url = https://github.com/larson-group/clubb_release/tags/
tag = clubb_4ncar_20221129_59cb19f_20230330_branchtag/src/SILHS
protocol = git
repo_url = https://github.com/larson-group/clubb_release
sparse = ../.clubb_sparse_checkout
tag = clubb_4ncar_20221129_59cb19f_20230330_branchtag
required = True

[pumas]
Expand All @@ -55,9 +50,9 @@ tag = ALI_ARMS_v1.0.1
required = True

[atmos_phys]
tag = atmos_phys0_00_011
tag = atmos_phys0_01_000
protocol = git
repo_url = https://github.com/NCAR/atmospheric_physics
repo_url = https://github.com/ESCOMP/atmospheric_physics
required = True
local_path = src/atmos_phys

Expand Down
19 changes: 10 additions & 9 deletions bld/configure
Original file line number Diff line number Diff line change
Expand Up @@ -2225,11 +2225,11 @@ sub write_filepath
}

if ($clubb_sgs) {
print $fh "$camsrcdir/src/physics/clubb\n";
print $fh "$camsrcdir/src/physics/clubb/src/CLUBB_core\n";
}

if ($silhs) {
print $fh "$camsrcdir/src/physics/silhs\n";
print $fh "$camsrcdir/src/physics/clubb/src/SILHS\n";
}

if ($phys_pkg eq 'cam_dev') {
Expand Down Expand Up @@ -2290,6 +2290,7 @@ sub write_filepath
print $fh "$camsrcdir/src/cpl/$cpl\n";
print $fh "$camsrcdir/src/control\n";
print $fh "$camsrcdir/src/utils\n";
print $fh "$camsrcdir/src/utils/cam_ccpp\n";
print $fh "$camsrcdir/src/atmos_phys/utilities\n";


Expand Down Expand Up @@ -2325,13 +2326,13 @@ sub write_cosp_makefile
CAM_BLD := $cam_bld
COSP_PATH := $cam_dir/src/physics/cosp2
ISCCP_PATH := $cam_dir/src/physics/cosp2/src/simulator/icarus
RS_PATH := $cam_dir/src/physics/cosp2/src/simulator/quickbeam
RT_PATH := $cam_dir/src/physics/cosp2/src/simulator/rttov
CS_PATH := $cam_dir/src/physics/cosp2/src/simulator/actsim
MISR_PATH := $cam_dir/src/physics/cosp2/src/simulator/MISR_simulator
MODIS_PATH := $cam_dir/src/physics/cosp2/src/simulator/MODIS_simulator
PARASOL_PATH := $cam_dir/src/physics/cosp2/src/simulator/parasol
ISCCP_PATH := $cam_dir/src/physics/cosp2/src/src/simulator/icarus
RS_PATH := $cam_dir/src/physics/cosp2/src/src/simulator/quickbeam
RT_PATH := $cam_dir/src/physics/cosp2/src/src/simulator/rttov
CS_PATH := $cam_dir/src/physics/cosp2/src/src/simulator/actsim
MISR_PATH := $cam_dir/src/physics/cosp2/src/src/simulator/MISR_simulator
MODIS_PATH := $cam_dir/src/physics/cosp2/src/src/simulator/MODIS_simulator
PARASOL_PATH := $cam_dir/src/physics/cosp2/src/src/simulator/parasol
EOF

Expand Down
203 changes: 203 additions & 0 deletions doc/ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,209 @@ Summarize any changes to answers: None.
===============================================================
===============================================================

Tag name: cam6_3_135
Originator(s): jedwards, nusbaume
Date: 16 Nov 2023
One-line Summary: removes svn sparse checkout
Github PR URL: https://github.com/ESCOMP/CAM/pull/913

Purpose of changes (include the issue number and title text for each relevant GitHub issue):

Use git sparse checkout for all repos, combine clubb and silhs into clubb.
git sparse checkout has been available in manage_externals since version 1.2.1.

Fixes #912 -> cosp2 svn access to github support is ending soon

Describe any changes made to build system:

Build path were modified in the "configure" Perl script, as well
as in the COSP Makefile.in file, in order to account for the
new source code paths.

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: nusbaume, cacraigucar, gold2718

List all files eliminated: N/A

List all files added and what they do:

A src/physics/.clubb_sparse_checkout
- Provides information on how to do the git sparse checkout of CLUBB and SILHS

A src/physics/cosp2/.cosp_sparse_checkout
- Provides information on how to do the git sparse checkout of COSP

List all existing files that have been modified, and describe the changes:

M Externals_CAM.cfg
- Change the Github-SVN bridge method to git sparse checkout

M bld/configure
- Update source code paths for CLUBB, SILHS, and COSP

M src/physics/cosp2/Makefile.in
- Update source code paths for relevant COSP files.

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.

cheyenne/intel/aux_cam:

ERP_Ln9_Vnuopc.C96_C96_mg17.F2000climo.cheyenne_intel.cam-outfrq9s_mg3 (Overall: FAIL) details:
FAIL ERP_Ln9_Vnuopc.C96_C96_mg17.F2000climo.cheyenne_intel.cam-outfrq9s_mg3 MODEL_BUILD time=3
ERP_Ln9_Vnuopc.f09_f09_mg17.FCSD_HCO.cheyenne_intel.cam-outfrq9s (Overall: FAIL) details:
FAIL ERP_Ln9_Vnuopc.f09_f09_mg17.FCSD_HCO.cheyenne_intel.cam-outfrq9s COMPARE_base_rest
SMS_Lh12_Vnuopc.f09_f09_mg17.FCSD_HCO.cheyenne_intel.cam-outfrq3h (Overall: DIFF) details:
FAIL SMS_Lh12_Vnuopc.f09_f09_mg17.FCSD_HCO.cheyenne_intel.cam-outfrq3h BASELINE /glade/p/cesm/amwg/cesm_baselines/cam6_3_134: DIFF
- pre-existing failure

izumi/nag/aux_cam:

DAE_Vnuopc.f45_f45_mg37.FHS94.izumi_nag.cam-dae (Overall: FAIL) details:
FAIL DAE_Vnuopc.f45_f45_mg37.FHS94.izumi_nag.cam-dae RUN time=10
- pre-existing failure

izumi/gnu/aux_cam: ALL PASS

Summarize any changes to answers: bit-for-bit unchanged

===============================================================

Tag name: cam6_3_134
Originator(s): nusbaume, jimmielin
Date: 31 Oct 2023
One-line Summary: Update atmospheric_physics external
Github PR URL: https://github.com/ESCOMP/CAM/pull/891

Purpose of changes (include the issue number and title text for each relevant GitHub issue):

This PR updates the atmospheric_physics external in CAM,
which requires some source modifications on the CAM-side.
There has also been some replacement of CAM code with CCPP
physics routines in order to reduce duplication.

This PR also fixes a bug found in Kessler where it was using
the wrong pressure when converting to/from potential temperature
via the exner function.

Finally, this change also brings in a rename of the SE
dycore's 'time_mod' module to 'se_dyn_time_mod' in order
to avoid name collision with GEOS-Chem code.

Fixes #752 -> Update atmospheric_physics external
Fixes #802 -> Kessler physics using inconsistent reference pressures

Closes #904 -> Rename SE dycore time_mod to dyn_time_mod (PR)

Describe any changes made to build system:

Added the "src/utils/cam_ccpp" and "src/atmos_phys/utilities" directory
to the list of directories used during compilation.

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: cacraigucar, PeterHjortLauritzen, jtruesdal, peverwhee

List all files eliminated:

R src/dynamics/se/dycore/time_mod.F90
- Renamed to 'se_dyn_time_mod'
R src/utils/ccpp_kinds.F90
- Moved to 'src/utils/cam_ccpp/ccpp_kinds.F90'

List all files added and what they do:

A src/utils/cam_ccpp/ccpp_constituent_prop_mod.F90
- Creates a "CCPP Constituent Properties" object for CAM.

List all existing files that have been modified, and describe the changes:

M Externals_CAM.cfg
- Update 'atmospheric_physics' external

M bld/configure
- Add 'src/utils/cam_ccpp' and 'src/atmos_phys/utilities' to build file paths

M src/dynamics/se/dp_coupling.F90
- Use CCPP-ized 'update_dry_static_energy_run' subroutine

M src/physics/cam/geopotential.F90
- Use CCPP-ized 'geopotential_temp_run' subroutine

M src/physics/cam/ref_pres.F90
- Update comment in order to avoid future confusion

M src/physics/cam/physpkg.F90
M src/physics/cam_dev/physpkg.F90
M src/physics/simple/held_suarez_cam.F90
M src/physics/simple/physpkg.F90
- Update physics calls and add new const. prop. DDT to work with new
atmospheric_physics external

M src/physics/simple/kessler_cam.F90
- Update physics calls and add new const. prop. DDT to work with new
atmospheric_physics external. Also replace use of "standard pressure"
with "reference pressure" in order to avoid unphysical mismatches.

M src/dynamics/se/dycore/fvm_consistent_se_cslam.F90
M src/dynamics/se/dycore/prim_advance_mod.F90
M src/dynamics/se/dycore/prim_advection_mod.F90
M src/dynamics/se/dycore/prim_driver_mod.F90
M src/dynamics/se/dycore/prim_init.F90
M src/dynamics/se/dycore/prim_state_mod.F90
M src/dynamics/se/stepon.F90
- Replace 'time_mod' with 'se_dyn_time_mod'

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.

cheyenne/intel/aux_cam:

All tests have NLCOMP failures due to changes in input data paths on Cheyenne.

ERP_Ln9_Vnuopc.C96_C96_mg17.F2000climo.cheyenne_intel.cam-outfrq9s_mg3 (Overall: FAIL) details:
FAIL ERP_Ln9_Vnuopc.C96_C96_mg17.F2000climo.cheyenne_intel.cam-outfrq9s_mg3 NLCOMP
FAIL ERP_Ln9_Vnuopc.C96_C96_mg17.F2000climo.cheyenne_intel.cam-outfrq9s_mg3 MODEL_BUILD time=3
ERP_Ln9_Vnuopc.f09_f09_mg17.FCSD_HCO.cheyenne_intel.cam-outfrq9s (Overall: FAIL) details:
FAIL ERP_Ln9_Vnuopc.f09_f09_mg17.FCSD_HCO.cheyenne_intel.cam-outfrq9s NLCOMP
FAIL ERP_Ln9_Vnuopc.f09_f09_mg17.FCSD_HCO.cheyenne_intel.cam-outfrq9s COMPARE_base_rest
SMS_Lh12_Vnuopc.f09_f09_mg17.FCSD_HCO.cheyenne_intel.cam-outfrq3h (Overall: DIFF) details:
FAIL SMS_Lh12_Vnuopc.f09_f09_mg17.FCSD_HCO.cheyenne_intel.cam-outfrq3h NLCOMP
FAIL SMS_Lh12_Vnuopc.f09_f09_mg17.FCSD_HCO.cheyenne_intel.cam-outfrq3h BASELINE /glade/p/cesm/amwg/cesm_baselines/cam6_3_133: DIFF
- pre-existing failure

izumi/nag/aux_cam:

DAE_Vnuopc.f45_f45_mg37.FHS94.izumi_nag.cam-dae (Overall: FAIL) details:
FAIL DAE_Vnuopc.f45_f45_mg37.FHS94.izumi_nag.cam-dae RUN time=9
- pre-existing failure

ERS_Ln27_Vnuopc.ne5pg3_ne5pg3_mg37.FKESSLER.izumi_nag.cam-outfrq9s (Overall: DIFF) details:
FAIL ERS_Ln27_Vnuopc.ne5pg3_ne5pg3_mg37.FKESSLER.izumi_nag.cam-outfrq9s BASELINE /fs/cgd/csm/models/atm/cam/pretag_bl/cam6_3_133_nag: DIFF
- expected failure

izumi/gnu/aux_cam: All PASS

Summarize any changes to answers:
All compsets which use Kessler idealized physics
will have larger-than-roundoff answer changes due
to reference pressure bug fix.

===============================================================

Tag name: cam6_3_133
Originator(s): fvitt
Date: 19 Oct 2023
Expand Down
29 changes: 17 additions & 12 deletions src/dynamics/se/dp_coupling.F90
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ subroutine d_p_coupling(phys_state, phys_tend, pbuf2d, dyn_out)
use phys_control, only: use_gw_front, use_gw_front_igw
use hycoef, only: hyai, ps0
use fvm_mapping, only: dyn2phys_vector, dyn2phys_all_vars
use time_mod, only: timelevel_qdp
use se_dyn_time_mod, only: timelevel_qdp
use control_mod, only: qsplit
use test_fvm_mapping, only: test_mapping_overwrite_dyn_state, test_mapping_output_phys_state
use prim_advance_mod, only: tot_energy_dyn
Expand Down Expand Up @@ -546,15 +546,17 @@ subroutine derived_phys_dry(phys_state, phys_tend, pbuf2d)
use shr_const_mod, only: shr_const_rwv
use phys_control, only: waccmx_is
use geopotential, only: geopotential_t
use static_energy, only: update_dry_static_energy_run
use check_energy, only: check_energy_timestep_init
use hycoef, only: hyai, ps0
use shr_vmath_mod, only: shr_vmath_log
use qneg_module, only: qneg3
use dyn_tests_utils, only: vc_dry_pressure
use shr_kind_mod, only: shr_kind_cx
! arguments
type(physics_state), intent(inout), dimension(begchunk:endchunk) :: phys_state
type(physics_tend ), intent(inout), dimension(begchunk:endchunk) :: phys_tend
type(physics_buffer_desc), pointer :: pbuf2d(:,:)
type(physics_buffer_desc), pointer :: pbuf2d(:,:)

! local variables
integer :: lchnk
Expand All @@ -564,6 +566,10 @@ subroutine derived_phys_dry(phys_state, phys_tend, pbuf2d)

integer :: m, i, k, ncol, m_cnst
type(physics_buffer_desc), pointer :: pbuf_chnk(:)

!Needed for "update_dry_static_energy" CCPP scheme
integer :: errflg
character(len=shr_kind_cx) :: errmsg
!----------------------------------------------------------------------------

! Evaluate derived quantities
Expand Down Expand Up @@ -686,18 +692,17 @@ subroutine derived_phys_dry(phys_state, phys_tend, pbuf2d)
end do

! Compute initial geopotential heights - based on full pressure
call geopotential_t (phys_state(lchnk)%lnpint, phys_state(lchnk)%lnpmid , phys_state(lchnk)%pint , &
phys_state(lchnk)%pmid , phys_state(lchnk)%pdel , phys_state(lchnk)%rpdel , &
phys_state(lchnk)%t , phys_state(lchnk)%q(:,:,:), rairv(:,:,lchnk), gravit, zvirv , &
phys_state(lchnk)%zi , phys_state(lchnk)%zm , ncol )
call geopotential_t(phys_state(lchnk)%lnpint, phys_state(lchnk)%lnpmid , phys_state(lchnk)%pint, &
phys_state(lchnk)%pmid , phys_state(lchnk)%pdel , phys_state(lchnk)%rpdel , &
phys_state(lchnk)%t , phys_state(lchnk)%q(:,:,:), rairv(:,:,lchnk), gravit, zvirv , &
phys_state(lchnk)%zi , phys_state(lchnk)%zm , ncol)

! Compute initial dry static energy, include surface geopotential
do k = 1, pver
do i = 1, ncol
phys_state(lchnk)%s(i,k) = cpairv(i,k,lchnk)*phys_state(lchnk)%t(i,k) &
+ gravit*phys_state(lchnk)%zm(i,k) + phys_state(lchnk)%phis(i)
end do
end do
call update_dry_static_energy_run(pver, gravit, phys_state(lchnk)%t(1:ncol,:), &
phys_state(lchnk)%zm(1:ncol,:), &
phys_state(lchnk)%phis(1:ncol), &
phys_state(lchnk)%s(1:ncol,:), &
cpairv(1:ncol,:,lchnk), errflg, errmsg)

! Ensure tracers are all positive
call qneg3('D_P_COUPLING',lchnk ,ncol ,pcols ,pver , &
Expand Down
2 changes: 1 addition & 1 deletion src/dynamics/se/dycore/fvm_consistent_se_cslam.F90
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module fvm_consistent_se_cslam
use cam_abortutils, only: endrun
use cam_logfile, only: iulog

use time_mod, only: timelevel_t
use se_dyn_time_mod, only: timelevel_t
use element_mod, only: element_t
use fvm_control_volume_mod, only: fvm_struct
use hybrid_mod, only: hybrid_t, config_thread_region, get_loop_ranges, threadOwnsVertLevel
Expand Down
2 changes: 1 addition & 1 deletion src/dynamics/se/dycore/prim_advance_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ subroutine prim_advance_exp(elem, fvm, deriv, hvcoord, hybrid,dt, tl, nets, net
use element_mod, only: element_t
use hybvcoord_mod, only: hvcoord_t
use hybrid_mod, only: hybrid_t
use time_mod, only: TimeLevel_t, timelevel_qdp, tevolve
use se_dyn_time_mod, only: TimeLevel_t, timelevel_qdp, tevolve
use fvm_control_volume_mod, only: fvm_struct
use cam_thermo, only: get_kappa_dry
use air_composition, only: thermodynamic_active_species_num
Expand Down
2 changes: 1 addition & 1 deletion src/dynamics/se/dycore/prim_advection_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ module prim_advection_mod
use element_mod, only: element_t
use fvm_control_volume_mod, only: fvm_struct
use hybvcoord_mod, only: hvcoord_t
use time_mod, only: TimeLevel_t, TimeLevel_Qdp
use se_dyn_time_mod, only: TimeLevel_t, TimeLevel_Qdp
use control_mod, only: nu_q, nu_p, limiter_option, hypervis_subcycle_q, rsplit
use edge_mod, only: edgevpack, edgevunpack, initedgebuffer, initedgesbuffer

Expand Down
Loading

0 comments on commit 4578ae9

Please sign in to comment.