Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MOM6 IAU and atmos stochy restart test #668

Merged
merged 19 commits into from
Jul 22, 2021
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
1 change: 1 addition & 0 deletions MOM6-interface/mom6_files.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ list(APPEND mom6_src_files
MOM6/src/user/user_revise_forcing.F90

MOM6/src/ocean_data_assim/MOM_oda_driver.F90
MOM6/src/ocean_data_assim/MOM_oda_incupd.F90

MOM6/config_src/external/GFDL_ocean_BGC/FMS_coupler_util.F90
MOM6/config_src/external/GFDL_ocean_BGC/generic_tracer.F90
Expand Down
2 changes: 1 addition & 1 deletion stochastic_physics
190 changes: 95 additions & 95 deletions tests/RegressionTests_cheyenne.gnu.log

Large diffs are not rendered by default.

925 changes: 475 additions & 450 deletions tests/RegressionTests_cheyenne.intel.log

Large diffs are not rendered by default.

901 changes: 463 additions & 438 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.

935 changes: 480 additions & 455 deletions tests/RegressionTests_hera.intel.log

Large diffs are not rendered by default.

899 changes: 462 additions & 437 deletions tests/RegressionTests_jet.intel.log

Large diffs are not rendered by default.

925 changes: 475 additions & 450 deletions tests/RegressionTests_orion.intel.log

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions tests/default_vars.sh
Original file line number Diff line number Diff line change
Expand Up @@ -578,6 +578,7 @@ export PRINT_DIFF_PGR=.false.
export MAX_OUTPUT_FIELDS=300

# Stochastic physics
export STOCHINI=.F.
export DO_SPPT=.F.
export DO_SHUM=.F.
export DO_SKEB=.F.
Expand All @@ -593,6 +594,7 @@ export LNDP_PRT_LISY=-999
#IAU
export IAU_INC_FILES="''"


#Cellular automata
export DO_CA=.F.
export CA_SGS=.F.
Expand Down Expand Up @@ -733,6 +735,9 @@ export MOM6_THERMO_SPAN='False'
# no WW3
export MOM6_USE_WAVES='False'
export MOM6_ALLOW_LANDMASK_CHANGES='False'
# MOM6 IAU
export MOM_IAU='False'
export MOM_IAU_HRS=6

# CICE6 defaults; 1 degree
export NPROC_ICE='12'
Expand Down Expand Up @@ -851,6 +856,9 @@ export MOM6_RESTART_SETTING='n'
export MOM6_RIVER_RUNOFF='False'
export FRUNOFF=""
export CHLCLIM='"seawifs_1998-2006_smoothed_2X.nc"'
# MOM6 IAU
export MOM_IAU='False'
export MOM_IAU_HRS=6
# 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
Expand Down Expand Up @@ -968,6 +976,9 @@ export MOM6_RESTART_SETTING='n'
export MOM6_RIVER_RUNOFF='False'
export FRUNOFF=""
export CHLCLIM='"seawifs_1998-2006_smoothed_2X.nc"'
# MOM6 IAU
export MOM_IAU='False'
export MOM_IAU_HRS=6
# 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
Expand Down
2 changes: 2 additions & 0 deletions tests/edit_inputs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ function edit_mom_input {
-e "s/MOM6_REPRO_LA/$MOM6_REPRO_LA/g" \
-e "s/MOM6_USE_WAVES/$MOM6_USE_WAVES/g" \
-e "s/MOM6_ALLOW_LANDMASK_CHANGES/$MOM6_ALLOW_LANDMASK_CHANGES/g" \
-e "s/MOM_IAU_HRS/$MOM_IAU_HRS/g" \
-e "s/MOM_IAU/$MOM_IAU/g" \
-e "s/NX_GLB/$NX_GLB/g" \
-e "s/NY_GLB/$NY_GLB/g" \
-e "s/CHLCLIM/$CHLCLIM/g"
Expand Down
150 changes: 150 additions & 0 deletions tests/fv3_conf/control_stochy_run.IN
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
rm -fr INPUT RESTART
if [ $NPX = 97 ]; then
inputdir=FV3_input_data
elif [ $NPX = 193 ]; then
inputdir=FV3_input_data192
elif [ $NPX = 385 ]; then
inputdir=FV3_input_data384
elif [ $NPX = 769 ]; then
inputdir=FV3_input_data_c768
fi
echo "inputdir=$inputdir,NPX=$NPX"

UNIT_TEST=${UNIT_TEST:-false}
SUFFIX=${RT_SUFFIX}
if [ $WARM_START = .F. ]; then
mkdir INPUT RESTART
cp -r @[INPUTDATA_ROOT]/${inputdir}/INPUT_L127/* ./INPUT/.
else
mkdir INPUT RESTART

if [[ ${UNIT_TEST} == true ]]; then
SUFFIX=${BL_SUFFIX}
fi

if [ $MODEL_INITIALIZATION = false ]; then
#read_inc and iau tests restart from fh=24
CURRDIR=`pwd`
FILEDIR=${CURRDIR}/../control_stochy${SUFFIX}/RESTART/
else
#for warm start from initialiation time
FILEDIR=@[INPUTDATA_ROOT]/${inputdir}/INPUT_L127_GDAS
fi

if [[ ${IAU_OFFSET} != 0 ]] || [[ $READ_INCREMENT = '.T.' ]]; then

if [ $MODEL_INITIALIZATION = false ]; then
cp ${FILEDIR}/../INPUT/fv3_increment.nc INPUT/.
cp ${FILEDIR}/../INPUT/grid_spec.nc INPUT/.
cp ${FILEDIR}/../INPUT/*_grid.tile*.nc INPUT/.
cp ${FILEDIR}/../INPUT/oro_data.tile*.nc INPUT/.
else
cp ${FILEDIR}/fv_increment*.nc INPUT/.
cp ${FILEDIR}/grid_spec.nc INPUT/.
cp ${FILEDIR}/*_grid.tile*.nc INPUT/.
cp ${FILEDIR}/oro_data.tile*.nc INPUT/.
fi
cp ${FILEDIR}/coupler.res INPUT/.
cp ${FILEDIR}/fv_core.res.* INPUT/.
cp ${FILEDIR}/fv_srf_wnd.res.* INPUT/.
cp ${FILEDIR}/fv_tracer.* INPUT/.
cp ${FILEDIR}/phy_data.* INPUT/.
cp ${FILEDIR}/sfc_data.* INPUT/.
else
#restart test start from fh=06
rsync -arv ${FILEDIR} INPUT/
cp ${FILEDIR}/20210322.120000.* INPUT/.
cp ${FILEDIR}/../INPUT/grid_spec.nc INPUT/.
cp ${FILEDIR}/../INPUT/*_grid.tile*.nc INPUT/.
cp ${FILEDIR}/../INPUT/oro_data.tile*.nc INPUT/.
cd INPUT
for RFILE in 20210322.120000.*; do
[ -e $RFILE ] || exit 1
mv $RFILE ${RFILE#20210322.120000.}
done
cd ..
fi

fi

cp @[INPUTDATA_ROOT]/${inputdir}/INPUT/aerosol.dat .
cp @[INPUTDATA_ROOT]/${inputdir}/INPUT/co2historicaldata_201*.txt .
cp @[INPUTDATA_ROOT]/${inputdir}/INPUT/sfc_emissivity_idx.txt .
cp @[INPUTDATA_ROOT]/${inputdir}/INPUT/solarconstant_noaa_an.txt .
cp @[INPUTDATA_ROOT]/${inputdir}/global_o3prdlos.f77 .
cp @[INPUTDATA_ROOT]/${inputdir}/global_h2o_pltc.f77 ./global_h2oprdlos.f77
cp @[INPUTDATA_ROOT]/${inputdir}/*grb .
cp @[INPUTDATA_ROOT]/${inputdir}/diag_table_gfsv16 ./diag_table
cp @[INPUTDATA_ROOT]/${inputdir}/field_table_gfsv16 ./field_table

if [ $NEW_DIAGTABLE != '' ]; then
cp @[INPUTDATA_ROOT]/${inputdir}/$NEW_DIAGTABLE ./diag_table
fi

if [ $NEW_FIELDTABLE != '' ]; then
cp @[INPUTDATA_ROOT]/${inputdir}/$NEW_FIELDTABLE ./field_table
fi

if [ $CPLWAV = .T. ]; then
cp @[INPUTDATA_ROOT_WW3]/mod_def.* .
cp @[INPUTDATA_ROOT_WW3]/rmp_src* .
fi

#inline post
if [[ $POSTAPP = 'global' ]]; then
cp ${PATHRT}/parm/post_itag itag
cp ${PATHRT}/parm/postxconfig-NT.txt postxconfig-NT.txt
cp ${PATHRT}/parm/postxconfig-NT_FH00.txt postxconfig-NT_FH00.txt
cp ${PATHRT}/parm/params_grib2_tbl_new params_grib2_tbl_new
fi

#rrtmgp
if [ $DO_RRTMGP = .T. ]; then
cp @[INPUTDATA_ROOT]/FV3_input_data_RRTMGP/* .
fi

#merra2
if [ $USE_MERRA2 = .T. ]; then
for n in 01 02 03 04 05 06 07 08 09 10 11 12; do
cp @[INPUTDATA_ROOT]/FV3_input_data_INCCN_aeroclim/MERRA2/merra2.aerclim.2003-2014.m${n}.nc aeroclim.m${n}.nc
done
cp @[INPUTDATA_ROOT]/FV3_input_data_INCCN_aeroclim/aer_data/LUTS/optics_BC.v1_3.dat optics_BC.dat
cp @[INPUTDATA_ROOT]/FV3_input_data_INCCN_aeroclim/aer_data/LUTS/optics_OC.v1_3.dat optics_OC.dat
cp @[INPUTDATA_ROOT]/FV3_input_data_INCCN_aeroclim/aer_data/LUTS/optics_DU.v15_3.dat optics_DU.dat
cp @[INPUTDATA_ROOT]/FV3_input_data_INCCN_aeroclim/aer_data/LUTS/optics_SS.v3_3.dat optics_SS.dat
cp @[INPUTDATA_ROOT]/FV3_input_data_INCCN_aeroclim/aer_data/LUTS/optics_SU.v1_3.dat optics_SU.dat
fi

#ugwpv1
if [ $DO_UGWP_V1 = .T. ]; then
cp @[INPUTDATA_ROOT]/FV3_input_data/ugwp_c384_tau.nc ./ugwp_limb_tau.nc
fi

#Thompson
if [ $IMP_PHYSICS = 8 ]; then
if [ $LTAEROSOL = .T. ]; then
if [ $DO_MYNNEDMF = .T. ] || [ $SATMEDMF = .T. ]; then
cp @[INPUTDATA_ROOT]/FV3_input_data_gsd/field_table_gsd field_table
else
cp @[INPUTDATA_ROOT]/FV3_input_data_gsd/field_table_gf_thompson field_table
fi
else
if [ $DO_MYNNEDMF = .T. ] || [ $SATMEDMF = .T. ]; then
cp @[INPUTDATA_ROOT]/FV3_input_data_gsd/field_table_thompson_noaero_tke field_table
else
cp @[INPUTDATA_ROOT]/FV3_input_data_gsd/field_table_thompson_noaero field_table
fi
fi
cp @[INPUTDATA_ROOT]/FV3_input_data_gsd/qr_acr_qsV2.dat .
cp @[INPUTDATA_ROOT]/FV3_input_data_gsd/qr_acr_qgV2.dat .
cp @[INPUTDATA_ROOT]/FV3_input_data_gsd/freezeH2O.dat .
cp @[INPUTDATA_ROOT]/FV3_input_data_gsd/CCN_ACTIVATE.BIN .
fi

#prognostic aerosols
if [ $CPLCHM = .T. ]; then
cp @[INPUTDATA_ROOT]/GOCART/diag_table .
cp @[INPUTDATA_ROOT]/GOCART/field_table .
cp @[INPUTDATA_ROOT]/GOCART/rc/* .
ln -sf @[INPUTDATA_ROOT]/GOCART/ExtData .
fi
2 changes: 2 additions & 0 deletions tests/fv3_conf/cpld_datm_gefs.IN
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,6 @@ if [[ $OCNRES == '025' ]]; then
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
# MOM6 increment file
cp @[INPUTDATA_ROOT]/MOM6_IC/@[OCNRES]/2011100100/mom6_increment.nc ./INPUT/mom6_increment.nc
fi
25 changes: 25 additions & 0 deletions tests/parm/MOM_input_template_100
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,31 @@ WRITE_GEOM = 2 ! default = 1
SAVE_INITIAL_CONDS = True ! [Boolean] default = False
! If true, write the initial conditions to a file given by IC_OUTPUT_FILE.

! === module MOM_oda_incupd ===
ODA_INCUPD = MOM_IAU ! [Boolean] default = False
! If true, oda incremental updates will be applied
! everywhere in the domain.
ODA_INCUPD_FILE = "mom6_increment.nc" ! The name of the file with the T,S,h increments.

ODA_TEMPINC_VAR = "pt_inc" ! default = "ptemp_inc"
! The name of the potential temperature inc. variable in
! ODA_INCUPD_FILE.
ODA_SALTINC_VAR = "s_inc" ! default = "sal_inc"
! The name of the salinity inc. variable in
! ODA_INCUPD_FILE.
ODA_THK_VAR = "h_fg" ! default = "h"
! The name of the int. depth inc. variable in
! ODA_INCUPD_FILE.

ODA_UINC_VAR = "u_inc" ! default = "u_inc"
! The name of the zonal vel. inc. variable in
! ODA_INCUPD_UV_FILE.
ODA_VINC_VAR = "v_inc" ! default = "v_inc"
! The name of the meridional vel. inc. variable in
! ODA_INCUPD_UV_FILE.
ODA_INCUPD_NHOURS = MOM_IAU_HRS ! default=3.0
! Number of hours for full update (0=direct insertion).

! === module MOM_domains ===
TRIPOLAR_N = True ! [Boolean] default = False
! Use tripolar connectivity at the northern edge of the domain. With
Expand Down
1 change: 1 addition & 0 deletions tests/parm/control.nml.IN
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ deflate_level=1
/

&nam_stochy
STOCHINI=@[STOCHINI],
SKEBNORM=1,
SKEB_NPASS=30,
SKEB_VDOF=5,
Expand Down
2 changes: 2 additions & 0 deletions tests/rt.conf
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ RUN | control_c192
RUN | control_c384 | - gaea.intel wcoss_cray | fv3 |
RUN | control_c384gdas | - gaea.intel wcoss_cray | fv3 |
RUN | control_stochy | | fv3 |
RUN | control_stochy_restart | | fv3 | control_stochy
RUN | control_ca | | fv3 |
RUN | control_lndp | | fv3 |
RUN | control_lheatstrg | | fv3 |
Expand Down Expand Up @@ -151,6 +152,7 @@ COMPILE | -DAPP=NG-GODAS-NEMSDATM
RUN | datm_control_cfsr | - wcoss_cray | fv3 |
RUN | datm_restart_cfsr | - wcoss_cray | | datm_control_cfsr
RUN | datm_control_gefs | - wcoss_cray | fv3 |
RUN | datm_control_iau_gefs | - wcoss_cray | fv3 |

RUN | datm_bulk_cfsr | - wcoss_cray | fv3 |
RUN | datm_bulk_gefs | - wcoss_cray | fv3 |
Expand Down
2 changes: 1 addition & 1 deletion tests/rt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ if [[ $TESTS_FILE =~ '35d' ]]; then
TEST_35D=true
fi

BL_DATE=20210720
BL_DATE=20210721
if [[ $MACHINE_ID = hera.* ]] || [[ $MACHINE_ID = orion.* ]] || [[ $MACHINE_ID = cheyenne.* ]] || [[ $MACHINE_ID = gaea.* ]] || [[ $MACHINE_ID = jet.* ]]; then
RTPWD=${RTPWD:-$DISKNM/NEMSfv3gfs/develop-${BL_DATE}/${RT_COMPILER^^}}
else
Expand Down
3 changes: 2 additions & 1 deletion tests/tests/control_stochy
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,12 @@ export IAER=5111
export DO_SPPT=.T.
export DO_SHUM=.T.
export DO_SKEB=.T.
export RESTART_INTERVAL=6
export SKEB=0.3
export SHUM=0.003
export SPPT=0.2


export FV3_RUN=control_run.IN
export FV3_RUN=control_stochy_run.IN
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems to me the only difference between the control_run.IN and control_stochy_run.IN is that the stochy is using 6hr restart files while control is using 12, maybe in the future we can add a restart file time to the script and unify the two scripts so that we don't need to maintain two scripts.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that can be added so we don't have 2 scripts.

export CCPP_SUITE=FV3_GFS_v16
export INPUT_NML=control.nml.IN
47 changes: 47 additions & 0 deletions tests/tests/control_stochy_restart
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
###############################################################################
#
# Global control stochy restart test
#
###############################################################################

export TEST_DESCR="Compare global restart wth stochsatics results with previous trunk version"

export CNTL_DIR=control_stochy

export LIST_FILES="sfcf012.nc \
atmf012.nc \
GFSFLX.GrbF12 \
GFSPRS.GrbF12 "

export_fv3
export NPZ=127
export NPZP=128
export DT_ATMOS=600
export SYEAR=2021
export SMONTH=03
export SDAY=22
export SHOUR=06
export FHMAX=12
export OUTPUT_GRID='gaussian_grid'
export NSTF_NAME='2,0,0,0,0'
export WRITE_DOPOST=.true.
export IAER=5111
export FHROT=06

export WARM_START=.T.
export NGGPS_IC=.F.
export EXTERNAL_IC=.F.
export MAKE_NH=.F.
export MOUNTAIN=.T.
export NA_INIT=0
export DO_SPPT=.T.
export DO_SHUM=.T.
export DO_SKEB=.T.
export SKEB=0.3
export SHUM=0.003
export SPPT=0.2
export STOCHINI=.T.

export FV3_RUN=control_stochy_run.IN
export CCPP_SUITE=FV3_GFS_v16
export INPUT_NML=control.nml.IN
16 changes: 16 additions & 0 deletions tests/tests/datm_control_iau_gefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#
# DATM_MOM6_CICE_CMEPS_GEFS test
#

export TEST_DESCR="DATM-MOM6-CICE-CMEPS_GEFS - IAU"

export CNTL_DIR="datm_control_iau_gefs"

export LIST_FILES="RESTART/MOM.res.nc \
RESTART/iced.2011-10-02-00000.nc \
RESTART/DATM_GEFS.cpl.r.2011-10-02-00000.nc"

export_datm
export FV3_RUN=cpld_datm_gefs.IN
export eps_imesh='2.5e-1'
export MOM_IAU="True"