Skip to content

Commit

Permalink
Merge pull request #908 from gdicker1/updateext_v8mpas
Browse files Browse the repository at this point in the history
cam6_3_137: Update mpas external to use v8.0.1
  • Loading branch information
gdicker1 authored Nov 29, 2023
2 parents 7cf5966 + 6ae06be commit 00188f3
Show file tree
Hide file tree
Showing 10 changed files with 209 additions and 36 deletions.
2 changes: 1 addition & 1 deletion Externals_CAM.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ local_path = src/dynamics/mpas/dycore
protocol = git
repo_url = https://github.com/MPAS-Dev/MPAS-Model.git
sparse = ../.mpas_sparse_checkout
hash = ff76a231
hash = b8c33daa
required = True

[hemco]
Expand Down
1 change: 1 addition & 0 deletions bld/build-namelist
Original file line number Diff line number Diff line change
Expand Up @@ -4056,6 +4056,7 @@ if ($dyn =~ /mpas/) {
add_default($nl, 'mpas_zd');
add_default($nl, 'mpas_xnutr');
add_default($nl, 'mpas_cam_coef');
add_default($nl, 'mpas_cam_damping_levels');
add_default($nl, 'mpas_print_detailed_minmax_vel');
add_default($nl, 'mpas_rayleigh_damp_u');
add_default($nl, 'mpas_rayleigh_damp_u_timescale_days');
Expand Down
1 change: 1 addition & 0 deletions bld/namelist_files/namelist_defaults_cam.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3176,6 +3176,7 @@
<mpas_zd > 22000.0D0 </mpas_zd>
<mpas_xnutr > 0.2D0 </mpas_xnutr>
<mpas_cam_coef > 0.0D0 </mpas_cam_coef>
<mpas_cam_damping_levels > 0 </mpas_cam_damping_levels>
<mpas_rayleigh_damp_u > .true. </mpas_rayleigh_damp_u>
<mpas_rayleigh_damp_u_timescale_days> 5.0 </mpas_rayleigh_damp_u_timescale_days>
<mpas_number_rayleigh_damp_u_levels> 5 </mpas_number_rayleigh_damp_u_levels>
Expand Down
23 changes: 17 additions & 6 deletions bld/namelist_files/namelist_definition.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8411,15 +8411,26 @@ Default: 0.2

<entry id="mpas_cam_coef" type="real" category="mpas"
group="damping" valid_values="">
Coefficient for scaling the 2nd-order horizontal diffusion in the mpas_cam absorbing layer.
A value of 1.0 will result in layered diffusion similar to CAM-SE and gives damping
coefficients of 0.2216E7, 0.6482E6, 0.1927E6 in the top-most three layers on the dynamics
variables u, w, and theta. The top 3 damping coefficients scale linearly with
mpas_cam_coef. 0.0 disables SE like 2nd-order diffusion in the absorbing layer and is the
current default. Sponge layer absorption can also be provided by Rayleigh damping.
Coefficient for scaling the 2nd-order horizontal diffusion in the mpas_cam absorbing
layer. The absorbing layer depth is controlled with mpas_cam_damping_levels. The damping
coefficients scale linearly with mpas_cam_coef. A value of 0.0 (or
mpas_cam_damping_levels=0) disables the 2nd-order diffusion in the absorbing layer. Sponge
layer absorption can also be provided by Rayleigh damping.

E.g. a value of 1.0 with mpas_cam_damping_levels=3 will result in damping coefficients of
2E6 m^2/s, 6E5, 2E5 in the top-most three layers on the dynamics variables u, w, and
theta.
Default: 0.0
</entry>

<entry id="mpas_cam_damping_levels" type="integer" category="mpas"
group="damping" valid_values="">
Number mpas_cam absorbing layers in which to apply 2nd-order horizontal diffusion.
Viscocity linearly ramps to zero by layer number from the top. mpas_cam_damping_levels and
mpas_cam_coef must both be greater than 0 for the diffusion to be enabled.
Default: 0
</entry>

<entry id="mpas_rayleigh_damp_u" type="logical" category="mpas"
group="damping" valid_values="">
Whether to apply Rayleigh damping on horizontal velocity in the top-most model levels.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ mfilt=1,1,1,1,1,1
ndens=1,1,1,1,1,1
nhtfrq=9,9,9,9,9,9
inithist='ENDOFRUN'
mpas_cam_coef=1.0D0
mpas_cam_damping_levels=3
119 changes: 119 additions & 0 deletions doc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,6 +1,125 @@

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

Tag name: cam6_3_137
Originator(s): gdicker
Date: Nov 29, 2023
One-line Summary: Update MPAS-A within CAM to v8.0
Github PR URL: https://https://github.com/ESCOMP/CAM/pull/908

Purpose of changes (include the issue number and title text for each relevant GitHub issue):
- Update MPAS-A within CAM to v8.0.1: https://github.com/ESCOMP/CAM/issues/861

Describe any changes made to build system: N/A

Describe any changes made to the namelist:
- Added new namelist variable mpas_cam_damping_levels. Determines how many layers from
model top to apply CAM-SE-like horizontal diffusion in MPAS.


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, jtruesdal, PeterHjortLauritzen

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 Externals_CAM.cfg
- Update mpas hash to point a few commits after MPAS-Dev/MPAS-Model 'v8.0.1' tag

M src/dynamics/mpas/Makefile
- Add MPAS_PIO_SUPPORT to CPPFLAGS to ensure PIO is used instead of the new SMIOL
- Rename diagnostics with "mpas_" prefix that was added
- Add mpas_string_utils, mpas_halo, mpas_atm_halos modules

M bld/build-namelist
M bld/namelist_files/namelist_defaults_cam.xml
M bld/namelist_files/namelist_definition.xml
- Add mpas_cam_damping_levels namelist argument and update mpas_cam_coef
description

M src/dynamics/mpas/driver/cam_mpas_subdriver.F90
- Update arguments for {postread,prewrite}_reindex subroutines
- Add calls to create/destroy mpas halo_groups during init and finalize
- Modify some halo exchange calls to use exchange_halo_group routine pointer

M src/dynamics/mpas/dyn_comp.F90
- Add config_halo_exch_method to configs pool with default value 'mpas_halo'
- Add mpas_cam_damping_levels namelist argument

M cime_config/testdefs/testmods_dirs/cam/outfrq9s_mpasa480/user_nl_cam
- Modify F2000climo test using mpasa480_mpasa480 to test the mpas_cam damping

M test/system/archive_baseline.sh
- Modify baselinedir path for derecho to point to /glade/campaign location

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: PEND) details:
PEND ERP_Ln9_Vnuopc.C96_C96_mg17.F2000climo.cheyenne_intel.cam-outfrq9s_mg3 MODEL_BUILD RERUN
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
FAIL ERP_Ln9_Vnuopc.f09_f09_mg17.FCSD_HCO.cheyenne_intel.cam-outfrq9s BASELINE /glade/p/cesm/amwg/cesm_baselines/cam6_3_133: DIFF
- pre-existing failures

ERS_Ln9_P288x1_Vnuopc.mpasa120_mpasa120.F2000climo.cheyenne_intel.cam-outfrq9s_mpasa120 (Overall: NLFAIL) details:
FAIL ERS_Ln9_P288x1_Vnuopc.mpasa120_mpasa120.F2000climo.cheyenne_intel.cam-outfrq9s_mpasa120 NLCOMP
found extra variable: 'mpas_cam_damping_levels'
- expected failure, added mpas_cam_damping_levels to namelist

ERS_Ln9_P36x1_Vnuopc.mpasa480_mpasa480.F2000climo.cheyenne_intel.cam-outfrq9s_mpasa480 (Overall: DIFF) details:
FAIL ERS_Ln9_P36x1_Vnuopc.mpasa480_mpasa480.F2000climo.cheyenne_intel.cam-outfrq9s_mpasa480 NLCOMP
found extra variable: 'mpas_cam_damping_levels'
FAIL ERS_Ln9_P36x1_Vnuopc.mpasa480_mpasa480.F2000climo.cheyenne_intel.cam-outfrq9s_mpasa480 BASELINE /glade/ p/cesm/amwg/cesm_baselines/cam6_3_136: DIFF
- expected failure, added mpas_cam_damping_levels to namelist and modified test via outfrq9s_mpasa480/user_nl_cam

derecho/intel/aux_cam:
ERP_Ln9_Vnuopc.C96_C96_mg17.F2000climo.derecho_intel.cam-outfrq9s_mg3 (Overall: PEND) details:
PEND ERP_Ln9_Vnuopc.C96_C96_mg17.F2000climo.derecho_intel.cam-outfrq9s_mg3 SHAREDLIB_BUILD RERUN
ERP_Ln9_Vnuopc.f09_f09_mg17.FCSD_HCO.derecho_intel.cam-outfrq9s (Overall: FAIL) details:
FAIL ERP_Ln9_Vnuopc.f09_f09_mg17.FCSD_HCO.derecho_intel.cam-outfrq9s BASELINE /glade/p/cesm/amwg/derecho_baselines/cam6_3_136: DIFF
ERP_Ln9_Vnuopc.ne30pg3_ne30pg3_mg17.FW2000climo.derecho_intel.cam-outfrq9s_wcm_ne30 (Overall: PEND) details:
PEND ERP_Ln9_Vnuopc.ne30pg3_ne30pg3_mg17.FW2000climo.derecho_intel.cam-outfrq9s_wcm_ne30 RUN
PEND ERP_Ln9_Vnuopc.ne30pg3_ne30pg3_mg17.FW2000climo.derecho_intel.cam-outfrq9s_wcm_ne30 COMPARE_base_rest
SMS_Lh12_Vnuopc.f09_f09_mg17.FCSD_HCO.derecho_intel.cam-outfrq3h (Overall: DIFF) details:
FAIL SMS_Lh12_Vnuopc.f09_f09_mg17.FCSD_HCO.derecho_intel.cam-outfrq3h BASELINE /glade/p/cesm/amwg/derecho_baselines/cam6_3_136: DIFF
- pre-existing failures

ERS_Ln9_P288x1_Vnuopc.mpasa120_mpasa120.F2000climo.derecho_intel.cam-outfrq9s_mpasa120 (Overall: NLFAIL) details:
FAIL ERS_Ln9_P288x1_Vnuopc.mpasa120_mpasa120.F2000climo.derecho_intel.cam-outfrq9s_mpasa120 NLCOMP
found extra variable: 'mpas_cam_damping_levels'
- expected failure, added mpas_cam_damping_levels to namelist

ERS_Ln9_P36x1_Vnuopc.mpasa480_mpasa480.F2000climo.derecho_intel.cam-outfrq9s_mpasa480 (Overall: DIFF) details:
FAIL ERS_Ln9_P36x1_Vnuopc.mpasa480_mpasa480.F2000climo.derecho_intel.cam-outfrq9s_mpasa480 NLCOMP
found extra variable: 'mpas_cam_damping_levels'
FAIL ERS_Ln9_P36x1_Vnuopc.mpasa480_mpasa480.F2000climo.derecho_intel.cam-outfrq9s_mpasa480 BASELINE /glade/p/cesm/amwg/derecho_baselines/cam6_3_136: DIFF
- expected failure, added mpas_cam_damping_levels to namelist and modified to use mpas_cam damping

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

ERC_D_Ln9_Vnuopc.mpasa480z32_mpasa480.FHS94.izumi_nag.cam-outfrq3s_usecase (Overall: NLFAIL) details:
FAIL ERC_D_Ln9_Vnuopc.mpasa480z32_mpasa480.FHS94.izumi_nag.cam-outfrq3s_usecase NLCOMP
found extra variable: 'mpas_cam_damping_levels'
- expected failure, added mpas_cam_damping_levels to namelist

izumi/gnu/aux_cam: All PASS

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

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

Tag name: cam6_3_136
Originator(s): cacraig, fischer
Date: Nov 18, 2023
Expand Down
32 changes: 20 additions & 12 deletions src/dynamics/mpas/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CPPFLAGS := -D_MPI -DMPAS_NATIVE_TIMERS -DMPAS_GIT_VERSION=unknown -DMPAS_NAMELIST_SUFFIX=atmosphere -DMPAS_CAM_DYCORE -DMPAS_NO_ESMF_INIT
CPPFLAGS := -D_MPI -DMPAS_NATIVE_TIMERS -DMPAS_GIT_VERSION=unknown -DMPAS_NAMELIST_SUFFIX=atmosphere -DMPAS_CAM_DYCORE -DMPAS_PIO_SUPPORT -DMPAS_NO_ESMF_INIT
ifdef PIODEF
CPPFLAGS += $(PIODEF)
endif
Expand All @@ -18,6 +18,7 @@ INTERFACE_OBJS = \
mpas_atm_core_interface.o \
mpas_atm_dimensions.o \
mpas_atm_threading.o \
mpas_atm_halos.o \
cam_mpas_subdriver.o

DYN_OBJS = \
Expand All @@ -31,10 +32,11 @@ DIAG_OBJS = \

DIAGNOSTICS = \
mpas_atm_diagnostic_template.o \
isobaric_diagnostics.o \
convective_diagnostics.o \
pv_diagnostics.o \
soundings.o
mpas_isobaric_diagnostics.o \
mpas_cloud_diagnostics.o \
mpas_convective_diagnostics.o \
mpas_pv_diagnostics.o \
mpas_soundings.o

REG_OBJS = \
parse.o \
Expand Down Expand Up @@ -90,7 +92,10 @@ FRAME_OBJS = \
mpas_pool_routines.o \
xml_stream_parser.o \
regex_matching.o \
mpas_log.o
mpas_log.o \
mpas_halo.o \
mpas_string_utils.o


UTIL_OBJS = \
ezxml.o
Expand Down Expand Up @@ -129,7 +134,8 @@ mpas_framework.o: mpas_dmpar.o \
mpas_io_units.o \
mpas_block_decomp.o \
mpas_stream_manager.o \
mpas_c_interfacing.o
mpas_c_interfacing.o \
mpas_halo.o

mpas_abort.o: mpas_kind_types.o mpas_io_units.o mpas_threading.o

Expand All @@ -155,7 +161,7 @@ mpas_dmpar.o: mpas_sort.o mpas_kind_types.o mpas_derived_types.o mpas_hash.o mpa

mpas_sort.o: mpas_kind_types.o mpas_log.o

mpas_timekeeping.o: mpas_kind_types.o mpas_derived_types.o mpas_dmpar.o mpas_threading.o mpas_log.o
mpas_timekeeping.o: mpas_string_utils.o mpas_kind_types.o mpas_derived_types.o mpas_dmpar.o mpas_threading.o mpas_log.o

mpas_timer.o: mpas_kind_types.o mpas_dmpar.o mpas_threading.o mpas_log.o

Expand All @@ -179,6 +185,7 @@ mpas_stream_manager.o: mpas_io_streams.o mpas_timekeeping.o mpas_derived_types.o

mpas_forcing.o: mpas_derived_types.o mpas_timekeeping.o mpas_stream_manager.o mpas_log.o mpas_io_units.o

mpas_halo.o: mpas_derived_types.o mpas_pool_routines.o mpas_log.o

#
# Operator dependencies
Expand Down Expand Up @@ -234,17 +241,18 @@ mpas_atm_time_integration.o: mpas_atm_iau.o mpas_atm_dimensions.o mpas_atm_bound
#
mpas_atm_diagnostics_manager.o: mpas_atm_diagnostics_utils.o $(DIAGNOSTICS)

convective_diagnostics.o: mpas_atm_diagnostics_utils.o
isobaric_diagnostics.o: mpas_atm_diagnostics_utils.o
pv_diagnostics.o: mpas_atm_diagnostics_utils.o
mpas_cloud_diagnostics.o: mpas_atm_diagnostics_utils.o
mpas_convective_diagnostics.o: mpas_atm_diagnostics_utils.o
mpas_isobaric_diagnostics.o: mpas_atm_diagnostics_utils.o
mpas_pv_diagnostics.o: mpas_atm_diagnostics_utils.o


#
# Core interface objects
#
mpas_atm_core_interface.o: mpas_atm_core.o incs

mpas_atm_core.o: mpas_atm_threading.o mpas_atm_time_integration.o mpas_atm_diagnostics_manager.o
mpas_atm_core.o: mpas_atm_threading.o mpas_atm_time_integration.o mpas_atm_diagnostics_manager.o mpas_atm_halos.o

cam_mpas_subdriver.o: mpas_atm_core_interface.o mpas_derived_types.o mpas_framework.o mpas_domain_routines.o mpas_pool_routines.o

Expand Down
Loading

0 comments on commit 00188f3

Please sign in to comment.