Skip to content

Commit

Permalink
Update NEMS and CMEPS, add CDEPS tests, fix bugs in the datm_bulk_gef…
Browse files Browse the repository at this point in the history
…s test (#538)

* Update NEMS component for CDEPS data atmosphere model.
* Update CMEPS to revise land-sea masks used for cfsr and gefs data sources in CDEPS.
* Update CMakeLists.txt to build the mom6_cice6_cdeps application.
* Use a new ESMF configuration file to provide data stream input parameters.
* Use new input forcing files that are CF-1.0 compliant in time axis.
* Use new input mesh files that are generated from existing grid files.
* Add 8 cdeps regression tests.
* Fix bugs in the datm_bulk_gefs test.
  • Loading branch information
binli2337 authored May 5, 2021
1 parent 554aedc commit d7156ad
Show file tree
Hide file tree
Showing 31 changed files with 8,737 additions and 8,237 deletions.
2 changes: 1 addition & 1 deletion CDEPS-interface/CDEPS
Submodule CDEPS updated 50 files
+18 −0 .github/workflows/bumpversion.yml
+8 −6 .github/workflows/extbuild.yml
+29 −6 CMakeLists.txt
+16 −0 Externals_CDEPS.cfg
+1 −1 cime_config/buildlib
+15 −13 cime_config/stream_cdeps.py
+2 −0 datm/CMakeLists.txt
+56 −71 datm/atm_comp_nuopc.F90
+20 −5 datm/cime_config/buildnml
+2 −2 datm/cime_config/config_component.xml
+18 −26 datm/cime_config/namelist_definition_datm.xml
+311 −135 datm/cime_config/stream_definition_datm.xml
+0 −1 datm/cime_config/testdefs/testmods_dirs/datm/scam/shell_commands
+8 −14 datm/datm_datamode_cfsr_mod.F90
+8 −5 datm/datm_datamode_clmncep_mod.F90
+8 −14 datm/datm_datamode_gefs_mod.F90
+0 −7 datm/datm_datamode_jra_mod.F90
+4 −3 dice/CMakeLists.txt
+13 −8 dice/cime_config/buildnml
+4 −15 dice/cime_config/namelist_definition_dice.xml
+0 −1 dice/dice_datamode_ssmi_mod.F90
+52 −47 dice/ice_comp_nuopc.F90
+4 −3 dlnd/CMakeLists.txt
+11 −2 dlnd/cime_config/buildnml
+4 −4 dlnd/cime_config/config_component.xml
+0 −14 dlnd/cime_config/namelist_definition_dlnd.xml
+3 −1 dlnd/cime_config/stream_definition_dlnd.xml
+7 −38 dlnd/lnd_comp_nuopc.F90
+4 −3 docn/CMakeLists.txt
+15 −1 docn/cime_config/buildnml
+13 −0 docn/cime_config/config_component.xml
+5 −18 docn/cime_config/namelist_definition_docn.xml
+1 −3 docn/cime_config/stream_definition_docn.xml
+8 −7 docn/docn_datamode_som_mod.F90
+48 −41 docn/ocn_comp_nuopc.F90
+4 −3 drof/CMakeLists.txt
+11 −3 drof/cime_config/buildnml
+23 −6 drof/cime_config/config_component.xml
+0 −15 drof/cime_config/namelist_definition_drof.xml
+129 −1 drof/cime_config/stream_definition_drof.xml
+7 −35 drof/rof_comp_nuopc.F90
+4 −3 dshr/CMakeLists.txt
+99 −372 dshr/dshr_mod.F90
+4 −3 dwav/CMakeLists.txt
+11 −2 dwav/cime_config/buildnml
+0 −15 dwav/cime_config/namelist_definition_dwav.xml
+6 −35 dwav/wav_comp_nuopc.F90
+15 −11 share/CMakeLists.txt
+8 −6 streams/CMakeLists.txt
+5 −2 streams/dshr_strdata_mod.F90
2 changes: 1 addition & 1 deletion CMEPS-interface/CMEPS
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ endif()

if(NEMSdatm)
add_dependencies(ufs datatm)
list(APPEND _ufs_defs_private FRONT_DATM=datm)
list(APPEND _ufs_defs_private FRONT_NEMS_DATM=datm)
list(APPEND _ufs_libs_public datatm)
endif()

Expand Down Expand Up @@ -315,6 +315,10 @@ endif()

if(CDEPS)
add_dependencies(ufs cdeps::datm)
list(APPEND _ufs_defs_private CDEPS-interface/CDEPS
FRONT_CDEPS_DATM=atm_comp_nuopc)
include_directories(${CMAKE_CURRENT_BINARY_DIR}/CDEPS-interface/CDEPS/datm)
target_link_libraries(ufs PUBLIC cdeps::datm)
endif()

target_compile_definitions(ufs PRIVATE "${_ufs_defs_private}")
Expand Down
2 changes: 1 addition & 1 deletion NEMS
214 changes: 107 additions & 107 deletions tests/RegressionTests_cheyenne.gnu.log

Large diffs are not rendered by default.

789 changes: 446 additions & 343 deletions tests/RegressionTests_cheyenne.intel.log

Large diffs are not rendered by default.

724 changes: 406 additions & 318 deletions tests/RegressionTests_gaea.intel.log

Large diffs are not rendered by default.

210 changes: 105 additions & 105 deletions tests/RegressionTests_hera.gnu.log

Large diffs are not rendered by default.

819 changes: 461 additions & 358 deletions tests/RegressionTests_hera.intel.log

Large diffs are not rendered by default.

1,053 changes: 611 additions & 442 deletions tests/RegressionTests_jet.intel.log

Large diffs are not rendered by default.

11,221 changes: 5,260 additions & 5,961 deletions tests/RegressionTests_orion.intel.log

Large diffs are not rendered by default.

456 changes: 226 additions & 230 deletions tests/RegressionTests_wcoss_cray.log

Large diffs are not rendered by default.

823 changes: 463 additions & 360 deletions tests/RegressionTests_wcoss_dell_p3.log

Large diffs are not rendered by default.

178 changes: 174 additions & 4 deletions tests/default_vars.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,14 @@ elif [[ $MACHINE_ID = wcoss_dell_p3 || $MACHINE_ID = wcoss2 ]]; then
MPB_datm_025="0 39"; APB_datm_025="0 39"
OPB_datm_025="40 159"; IPB_datm_025="160 207"

TASKS_cdeps_100=40; TPN_cdeps_100=28
MPB_cdeps_100="0 11"; APB_cdeps_100="0 11"
OPB_cdeps_100="12 27"; IPB_cdeps_100="28 39"

TASKS_cdeps_025=208; TPN_cdeps_025=28
MPB_cdeps_025="0 39"; APB_cdeps_025="0 39"
OPB_cdeps_025="40 159"; IPB_cdeps_025="160 207"

elif [[ $MACHINE_ID = orion.* ]]; then

TASKS_dflt=150 ; TPN_dflt=40 ; INPES_dflt=3 ; JNPES_dflt=8
Expand Down Expand Up @@ -100,6 +108,14 @@ elif [[ $MACHINE_ID = orion.* ]]; then
MPB_datm_025="0 39"; APB_datm_025="0 39"
OPB_datm_025="40 159"; IPB_datm_025="160 207"

TASKS_cdeps_100=40; TPN_cdeps_100=40
MPB_cdeps_100="0 11"; APB_cdeps_100="0 11"
OPB_cdeps_100="12 27"; IPB_cdeps_100="28 39"

TASKS_cdeps_025=208; TPN_cdeps_025=40
MPB_cdeps_025="0 39"; APB_cdeps_025="0 39"
OPB_cdeps_025="40 159"; IPB_cdeps_025="160 207"

elif [[ $MACHINE_ID = hera.* ]]; then

TASKS_dflt=150 ; TPN_dflt=40 ; INPES_dflt=3 ; JNPES_dflt=8
Expand Down Expand Up @@ -143,6 +159,14 @@ elif [[ $MACHINE_ID = hera.* ]]; then
MPB_datm_025="0 39"; APB_datm_025="0 39"
OPB_datm_025="40 159"; IPB_datm_025="160 207"

TASKS_cdeps_100=40; TPN_cdeps_100=40
MPB_cdeps_100="0 11"; APB_cdeps_100="0 11"
OPB_cdeps_100="12 27"; IPB_cdeps_100="28 39"

TASKS_cdeps_025=208; TPN_cdeps_025=40
MPB_cdeps_025="0 39"; APB_cdeps_025="0 39"
OPB_cdeps_025="40 159"; IPB_cdeps_025="160 207"

elif [[ $MACHINE_ID = linux.* ]]; then

if [[ $CI_TEST = true ]]; then
Expand Down Expand Up @@ -197,6 +221,14 @@ elif [[ $MACHINE_ID = jet.* ]]; then
MPB_datm_025="0 39"; APB_datm_025="0 39"
OPB_datm_025="40 159"; IPB_datm_025="160 207"

TASKS_cdeps_100=40; TPN_cdeps_100=24
MPB_cdeps_100="0 11"; APB_cdeps_100="0 11"
OPB_cdeps_100="12 27"; IPB_cdeps_100="28 39"

TASKS_cdeps_025=208; TPN_cdeps_025=24
MPB_cdeps_025="0 39"; APB_cdeps_025="0 39"
OPB_cdeps_025="40 159"; IPB_cdeps_025="160 207"

elif [[ $MACHINE_ID = gaea.* ]]; then

TASKS_dflt=150 ; TPN_dflt=36 ; INPES_dflt=3 ; JNPES_dflt=8
Expand Down Expand Up @@ -240,6 +272,14 @@ elif [[ $MACHINE_ID = gaea.* ]]; then
MPB_datm_025="0 39"; APB_datm_025="0 39"
OPB_datm_025="40 159"; IPB_datm_025="160 207"

TASKS_cdeps_100=40; TPN_cdeps_100=36
MPB_cdeps_100="0 11"; APB_cdeps_100="0 11"
OPB_cdeps_100="12 27"; IPB_cdeps_100="28 39"

TASKS_cdeps_025=208; TPN_cdeps_025=36
MPB_cdeps_025="0 39"; APB_cdeps_025="0 39"
OPB_cdeps_025="40 159"; IPB_cdeps_025="160 207"

elif [[ $MACHINE_ID = cheyenne.* ]]; then

TASKS_dflt=150 ; TPN_dflt=36 ; INPES_dflt=3 ; JNPES_dflt=8
Expand Down Expand Up @@ -283,6 +323,14 @@ elif [[ $MACHINE_ID = cheyenne.* ]]; then
MPB_datm_025="0 39"; APB_datm_025="0 39"
OPB_datm_025="40 159"; IPB_datm_025="160 207"

TASKS_cdeps_100=40; TPN_cdeps_100=36
MPB_cdeps_100="0 11"; APB_cdeps_100="0 11"
OPB_cdeps_100="12 27"; IPB_cdeps_100="28 39"

TASKS_cdeps_025=208; TPN_cdeps_025=36
MPB_cdeps_025="0 39"; APB_cdeps_025="0 39"
OPB_cdeps_025="40 159"; IPB_cdeps_025="160 207"

elif [[ $MACHINE_ID = stampede.* ]]; then

TASKS_dflt=150 ; TPN_dflt=48 ; INPES_dflt=3 ; JNPES_dflt=8
Expand Down Expand Up @@ -325,6 +373,14 @@ elif [[ $MACHINE_ID = stampede.* ]]; then
MPB_datm_025="0 39"; APB_datm_025="0 39"
OPB_datm_025="40 159"; IPB_datm_025="160 207"

TASKS_cdeps_100=40; TPN_cdeps_100=48
MPB_cdeps_100="0 11"; APB_cdeps_100="0 11"
OPB_cdeps_100="12 27"; IPB_cdeps_100="28 39"

TASKS_cdeps_025=208; TPN_cdeps_025=48
MPB_cdeps_025="0 39"; APB_cdeps_025="0 39"
OPB_cdeps_025="40 159"; IPB_cdeps_025="160 207"

else

echo "Unknown MACHINE_ID ${MACHINE_ID}"
Expand All @@ -343,7 +399,8 @@ export_fv3 ()
{
export FV3=true
export S2S=false
export DATM=false
export DATM_NEMS=false
export DATM_CDEPS=false
export THRD=1
export WLCLK=$WLCLK_dflt
export INPES=$INPES_dflt
Expand Down Expand Up @@ -510,7 +567,8 @@ export_cpl ()
{
export FV3=true
export S2S=true
export DATM=false
export DATM_NEMS=false
export DATM_CDEPS=false

export DAYS="1"
export FHMAX="24"
Expand Down Expand Up @@ -655,8 +713,9 @@ export_datm ()
{
export FV3=false
export S2S=false
export DATM_NEMS=true
export DATM_CDEPS=false
export CPLWAV=.F.
export DATM=true
export DAYS=1
export FHMAX=24
export WLCLK=30
Expand All @@ -680,7 +739,7 @@ export NY_GLB=320
# nems.configure
export NEMS_CONFIGURE="nems.configure.datm.IN"
export med_model="cmeps"
export atm_model="datm"
export atm_model="nems_datm"
export ocn_model="mom6"
export ice_model="cice6"
export atm_petlist_bounds=$APB_datm_100
Expand Down Expand Up @@ -756,3 +815,114 @@ export CICE_HIST_AVG='.true.'
export BL_SUFFIX=""
export RT_SUFFIX=""
}
export_datm_cdeps ()
{
export FV3=false
export S2S=false
export DATM_NEMS=false
export DATM_CDEPS=true
export CPLWAV=.F.
export DAYS=1
export FHMAX=24
export WLCLK=30
export THRD=1
export FHROT='0'
export WARM_START=.F.

# atm/ocn/ice resolution
export IATM=1760
export JATM=880
export ATM_NX_GLB=$IATM
export ATM_NY_GLB=$JATM
export ATMRES='1760x880'
export OCNRES='100'
export ICERES='1.00'
export NX_GLB=360
export NY_GLB=320

# nems.configure
export NEMS_CONFIGURE="nems.configure.datm_cdeps.IN"
export med_model="cmeps"
export atm_model="datm"
export ocn_model="mom6"
export ice_model="cice6"
export atm_petlist_bounds=$APB_cdeps_100
export med_petlist_bounds=$MPB_cdeps_100
export ocn_petlist_bounds=$OPB_cdeps_100
export ice_petlist_bounds=$IPB_cdeps_100
export TASKS=$TASKS_cdeps_100
export TPN=$TPN_cdeps_100
export NPROC_ICE='12'

export ENS_NUM=1
export SYEAR='2011'
export SMONTH='10'
export SDAY='01'
export SHOUR='00'
export CDATE=${SYEAR}${SMONTH}${SDAY}${SHOUR}

export NFHOUT=6
export FDIAG=6
export DT_ATMOS='900'
export DT_CICE=${DT_ATMOS}
export DT_DYNAM_MOM6='1800'
export DT_THERM_MOM6='3600'
export CPL_SLOW=${DT_THERM_MOM6}
export CPL_FAST=${DT_ATMOS}
export coupling_interval_slow_sec=${CPL_SLOW}
export coupling_interval_fast_sec=${CPL_FAST}

export RESTART_N=${FHMAX}
export CPLMODE='nems_orig_data'
export cap_dbug_flag="0"
export use_coldstart="false"
export use_mommesh="false"
export RUNTYPE='startup'
export flux_convergence='0.0'
export flux_iteration='2'
export flux_scheme='0'

export INPUT_NML=input.mom6.nml.IN
export MODEL_CONFIGURE=datm_cdeps_configure.IN
export FIELD_TABLE="field_table"
export DIAG_TABLE="diag_table_template"

# atm defaults
export DATM_SRC="CFSR"
export FILENAME_BASE='cfsr.'
export mesh_file="cfsr_mesh.nc"
export MESH_ATM="DATM_INPUT/${mesh_file}"
export atm_datamode=${DATM_SRC}

# MOM6 defaults; 1 degree
export MOM_INPUT=MOM_input_template_100
export MOM6_RESTART_SETTING='n'
export MOM6_RIVER_RUNOFF='False'
export FRUNOFF=""
export CHLCLIM='"seawifs_1998-2006_smoothed_2X.nc"'
# this must be set False for restart repro
export MOM6_REPRO_LA='False'
# since CPL_SLOW is set to DT_THERM, this should be always be false
export MOM6_THERMO_SPAN='False'
# no WW3
export MOM6_USE_WAVES='False'
export MOM6_ALLOW_LANDMASK_CHANGES='False'

# CICE6 defaults; 1 degree
export MESHOCN_ICE="mesh.mx${OCNRES}.nc"
export CICEGRID="grid_cice_NEMS_mx${OCNRES}.nc"
export CICEMASK="kmtu_cice_NEMS_mx${OCNRES}.nc"
export RUNID='unknown'
# set large; restart frequency now controlled by restart_n in nems.configure
export DUMPFREQ='d'
export DUMPFREQ_N=1000
export USE_RESTART_TIME='.false.'
export RESTART_EXT='.false.'
# setting to true will allow Frazil FW and Salt to be
# included in fluxes sent to ocean
export FRAZIL_FWSALT='.true.'
# default to write CICE average history files
export CICE_HIST_AVG='.true.'
export BL_SUFFIX=""
export RT_SUFFIX=""
}
39 changes: 39 additions & 0 deletions tests/fv3_conf/cpld_datm_cdeps.IN
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
mkdir INPUT DATM_INPUT RESTART history MOM6_OUTPUT

# DATM fixed input
ln -s @[INPUTDATA_ROOT]/DATM_CDEPS/@[DATM_SRC]/@[mesh_file] DATM_INPUT
ln -s @[INPUTDATA_ROOT]/DATM_CDEPS/@[DATM_SRC]/201110/*201110*nc DATM_INPUT

# MOM6 fixed input
ICERES="${OCNRES:0:1}.${OCNRES:1}"
cp @[INPUTDATA_ROOT]/MOM6_FIX/@[OCNRES]/* ./INPUT
cp @[INPUTDATA_ROOT]/MOM6_FIX_DATM/@[OCNRES]/* ./INPUT

# CICE fixed input
cp @[INPUTDATA_ROOT]/CICE_FIX/@[OCNRES]/grid_cice_NEMS_mx@[OCNRES].nc .
cp @[INPUTDATA_ROOT]/CICE_FIX/@[OCNRES]/kmtu_cice_NEMS_mx@[OCNRES].nc .
cp @[INPUTDATA_ROOT]/CICE_FIX/@[OCNRES]/mesh.mx@[OCNRES].nc .

if [ $WARM_START = .F. ]; then
# cold start
if [[ $OCNRES == '025' ]]; then
cp @[INPUTDATA_ROOT]/MOM6_IC/@[OCNRES]/2011100100/MOM*.nc ./INPUT
cp @[INPUTDATA_ROOT]/CICE_IC/@[OCNRES]/cice_model_@[ICERES].cpc*.nc cice_model.res.nc
else
cp @[INPUTDATA_ROOT]/MOM6_IC/@[OCNRES]/2011100100/MOM6_IC_TS*.nc ./INPUT/MOM6_IC_TS.nc
cp @[INPUTDATA_ROOT]/CICE_IC/@[OCNRES]/cice_model_@[ICERES].cpc*.nc cice_model.res.nc
fi
else
# warm start
cp ../${DEP_RUN}${RT_SUFFIX}/RESTART/MOM.res.2011-10-01-12*.nc ./INPUT/MOM.res.nc

# CMEPS restart and pointer files
RFILE="DATM_${DATM_SRC}.cpl.r.2011-10-01-43200.nc"
cp ../${DEP_RUN}${RT_SUFFIX}/RESTART/${RFILE} .
ls -1 ${RFILE}>rpointer.cpl

# CICE restart and pointer files
cp ../${DEP_RUN}${RT_SUFFIX}/RESTART/iced.2011-10-01-43200.nc ./INPUT
RFILE="iced.2011-10-01-43200.nc"
ls -1 "./INPUT/"${RFILE}>ice.restart_file
fi
15 changes: 15 additions & 0 deletions tests/parm/datm.streams.IN
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
stream_info: @[FILENAME_BASE]01
taxmode01: cycle
mapalgo01: bilinear
tInterpAlgo01: linear
readMode01: single
dtlimit01: 1.5
stream_offset01: 0
yearFirst01: 2011
yearLast01: 2011
yearAlign01: 2011
stream_vectors01: "u:v"
stream_mesh_file01: @[MESH_ATM]
stream_lev_dimname01: null
stream_data_files01: "DATM_INPUT/@[FILENAME_BASE]201110.nc"
stream_data_variables01: "slmsksfc Sa_mask" "DSWRF Faxa_swdn" "DLWRF Faxa_lwdn" "vbdsf_ave Faxa_swvdr" "vddsf_ave Faxa_swvdf" "nbdsf_ave Faxa_swndr" "nddsf_ave Faxa_swndf" "u10m Sa_u10m" "v10m Sa_v10m" "hgt_hyblev1 Sa_z" "psurf Sa_pslv" "tmp_hyblev1 Sa_tbot" "spfh_hyblev1 Sa_shum" "ugrd_hyblev1 Sa_u" "vgrd_hyblev1 Sa_v" "q2m Sa_q2m" "t2m Sa_t2m" "pres_hyblev1 Sa_pbot" "precp Faxa_rain" "fprecp Faxa_snow"
20 changes: 20 additions & 0 deletions tests/parm/datm_cdeps_configure.IN
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
print_esmf: .true.
total_member: 1
PE_MEMBER01: @[TASKS]
start_year: @[SYEAR]
start_month: @[SMONTH]
start_day: @[SDAY]
start_hour: @[SHOUR]
start_minute: 0
start_second: 0
nhours_fcst: @[FHMAX]
RUN_CONTINUE: .false.
ENS_SPS: .false.
dt_atmos: @[DT_ATMOS]
atm_coupling_interval_sec: @[coupling_interval_fast_sec]
calendar: 'julian'
fhrot: @[FHROT]
nfhout: @[NFHOUT]
nfhmax_hf: -1
nfhout_hf: 3
nsout: -1
14 changes: 14 additions & 0 deletions tests/parm/datm_in
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
&datm_nml
datamode = "@[atm_datamode]"
factorfn_data = "null"
factorfn_mesh = "null"
flds_co2 = .false.
flds_presaero = .false.
flds_wiso = .false.
iradsw = 1
model_maskfile = "@[MESH_ATM]"
model_meshfile = "@[MESH_ATM]"
nx_global = @[ATM_NX_GLB]
ny_global = @[ATM_NY_GLB]
restfilm = "null"
/
Loading

0 comments on commit d7156ad

Please sign in to comment.