Skip to content

Commit

Permalink
Add CLM Lake Model and update Flake (#1509)
Browse files Browse the repository at this point in the history
setup RT for flake

* add fv3-conf for flake

* add clm lake to FV3

* bug fixes, clm lake restart, and clm lake suite

* flake_control_run.IN => lake_control_run.IN
  • Loading branch information
SamuelTrahanNOAA committed Apr 26, 2023
1 parent 46ef6d5 commit 3cc95d6
Show file tree
Hide file tree
Showing 52 changed files with 9,318 additions and 9,130 deletions.
2 changes: 1 addition & 1 deletion CMEPS-interface/CMEPS
2,436 changes: 1,202 additions & 1,234 deletions tests/RegressionTests_acorn.intel.log

Large diffs are not rendered by default.

1,197 changes: 604 additions & 593 deletions tests/RegressionTests_cheyenne.gnu.log

Large diffs are not rendered by default.

2,461 changes: 1,214 additions & 1,247 deletions tests/RegressionTests_cheyenne.intel.log

Large diffs are not rendered by default.

1,185 changes: 591 additions & 594 deletions tests/RegressionTests_hera.gnu.log

Large diffs are not rendered by default.

2,496 changes: 1,232 additions & 1,264 deletions tests/RegressionTests_hera.intel.log

Large diffs are not rendered by default.

3,352 changes: 1,671 additions & 1,681 deletions tests/RegressionTests_jet.intel.log

Large diffs are not rendered by default.

1,074 changes: 537 additions & 537 deletions tests/RegressionTests_orion.intel.log

Large diffs are not rendered by default.

3,209 changes: 1,539 additions & 1,670 deletions tests/RegressionTests_wcoss2.intel.log

Large diffs are not rendered by default.

8 changes: 6 additions & 2 deletions tests/default_vars.sh
Original file line number Diff line number Diff line change
Expand Up @@ -457,8 +457,12 @@ export OZ_PHYS_OLD=.true.
export OZ_PHYS_NEW=.false.
export H2O_PHYS=.false.

# Flake model
export LKM=0
# Lake models
export LKM=0 # 0=no lake, 1=run lake model, 2=run both lake and nsst on lake points
export IOPT_LAKE=2 # 1=flake, 2=clm lake
export LAKEFRAC_THRESHOLD=0.0 # lake fraction must be higher for lake model to run it
export LAKEDEPTH_THRESHOLD=1.0 # lake must be deeper (in meters) for a lake model to run it
export FRAC_ICE=.false.

export CPL=.false.
export CPLCHM=.false.
Expand Down
152 changes: 152 additions & 0 deletions tests/fv3_conf/lake_control_run.IN
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
rm -fr INPUT RESTART
if [ $NPX = 97 ]; then
inputdir=FV3_input_data
elif [ $NPX = 49 ]; then
inputdir=FV3_input_data48
elif [ $NPX = 193 ]; then
inputdir=FV3_input_data192
elif [ $NPX = 385 ]; then
inputdir=FV3_input_data384
elif [ $NPX = 769 ]; then
inputdir=FV3_input_data768
fi
echo "inputdir=$inputdir,NPX=$NPX"

LAKE_DATA_PATH=@[INPUTDATA_ROOT]/lake_p8_water_fraction2020

OPNREQ_TEST=${OPNREQ_TEST:-false}
SUFFIX=${RT_SUFFIX}
if [ $WARM_START = .false. ]; then
mkdir INPUT RESTART
cp -r @[INPUTDATA_ROOT]/${inputdir}/INPUT_L127/* ./INPUT/.
# cp -r @[INPUTDATA_ROOT]/${inputdir}/ORO_FLAKE/* ./INPUT/.
cp $LAKE_DATA_PATH/oro_C96.mx100.tile1.nc ./INPUT/oro_data.tile1.nc
cp $LAKE_DATA_PATH/oro_C96.mx100.tile2.nc ./INPUT/oro_data.tile2.nc
cp $LAKE_DATA_PATH/oro_C96.mx100.tile3.nc ./INPUT/oro_data.tile3.nc
cp $LAKE_DATA_PATH/oro_C96.mx100.tile4.nc ./INPUT/oro_data.tile4.nc
cp $LAKE_DATA_PATH/oro_C96.mx100.tile5.nc ./INPUT/oro_data.tile5.nc
cp $LAKE_DATA_PATH/oro_C96.mx100.tile6.nc ./INPUT/oro_data.tile6.nc
else
mkdir INPUT RESTART

if [[ ${OPNREQ_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}/../${DEP_RUN}${SUFFIX}/RESTART
else
#for warm start from initialiation time
FILEDIR=@[INPUTDATA_ROOT]/${inputdir}/INPUT_L127_GDAS
fi

if [[ ${IAU_OFFSET} != 0 ]] || [[ $READ_INCREMENT = .true. ]]; 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 -r @[INPUTDATA_ROOT]/${inputdir}/INPUT_L127/* ./INPUT/.
# cp -r @[INPUTDATA_ROOT]/${inputdir}/ORO_FLAKE/* ./INPUT/.
cp $LAKE_DATA_PATH/oro_C96.mx100.tile1.nc ./INPUT/oro_data.tile1.nc
cp $LAKE_DATA_PATH/oro_C96.mx100.tile2.nc ./INPUT/oro_data.tile2.nc
cp $LAKE_DATA_PATH/oro_C96.mx100.tile3.nc ./INPUT/oro_data.tile3.nc
cp $LAKE_DATA_PATH/oro_C96.mx100.tile4.nc ./INPUT/oro_data.tile4.nc
cp $LAKE_DATA_PATH/oro_C96.mx100.tile5.nc ./INPUT/oro_data.tile5.nc
cp $LAKE_DATA_PATH/oro_C96.mx100.tile6.nc ./INPUT/oro_data.tile6.nc
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 FHROT
cp -r ../${DEP_RUN}${SUFFIX}/RESTART/${RESTART_FILE_PREFIX}.* ./INPUT
rm -f INPUT/fv_core.res.*
rm -f INPUT/fv_srf_wnd.res.*
rm -f INPUT/fv_tracer.res.*
rm -f INPUT/phy_data.*
rm -f INPUT/sfc_data.*
cp ${FILEDIR}/../INPUT/grid_spec.nc INPUT/.
cp ${FILEDIR}/../INPUT/*_grid.tile*.nc INPUT/.
cp ${FILEDIR}/../INPUT/oro_data*.nc INPUT/.
for RFILE in ../${DEP_RUN}${SUFFIX}/RESTART/${RESTART_FILE_PREFIX}.*; do
[ -e $RFILE ] || exit 1
RFILE_OLD=$(basename $RFILE)
RFILE_NEW="${RFILE_OLD//${RESTART_FILE_PREFIX}./}"
cp $RFILE INPUT/${RFILE_NEW}
done
fi

fi

if [ $TILEDFIX = .true. ]; then
cp @[INPUTDATA_ROOT]/FV3_fix_tiled/@[ATMRES]/@[ATMRES]*.nc .
cp @[INPUTDATA_ROOT]/FV3_fix/global_glacier.2x2.grb .
cp @[INPUTDATA_ROOT]/FV3_fix/global_maxice.2x2.grb .
cp @[INPUTDATA_ROOT]/FV3_fix/RTGSST.1982.2012.monthly.clim.grb .
cp @[INPUTDATA_ROOT]/FV3_fix/global_snoclim.1.875.grb .
cp @[INPUTDATA_ROOT]/FV3_fix/CFSR.SEAICE.1982.2012.monthly.clim.grb .
cp @[INPUTDATA_ROOT]/${inputdir}/@[FNSMCC] .
cp @[INPUTDATA_ROOT]/${inputdir}/@[FNMSKH_control] .
else
cp @[INPUTDATA_ROOT]/${inputdir}/*grb .
fi

if [ $CPLWAV = .true. ]; 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_gfs itag
cp ${PATHRT}/parm/postxconfig-NT-gfs.txt postxconfig-NT.txt
cp ${PATHRT}/parm/postxconfig-NT-gfs_FH00.txt postxconfig-NT_FH00.txt
cp ${PATHRT}/parm/params_grib2_tbl_new params_grib2_tbl_new
fi

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

#merra2
if [ $USE_MERRA2 = .true. ]; 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 = .true. ]; then
cp @[INPUTDATA_ROOT]/FV3_input_data/ugwp_c384_tau.nc ./ugwp_limb_tau.nc
fi

#Thompson
if [ $IMP_PHYSICS = 8 ]; then
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 = .true. ]; then
cp ${PATHRT}/parm/gocart/*.rc .
ln -sf @[INPUTDATA_ROOT]/GOCART/ExtData .
fi
6 changes: 6 additions & 0 deletions tests/parm/control_flake.nml.IN
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,12 @@ deflate_level=1
/

&gfs_physics_nml
lkm = @[LKM]
iopt_lake = @[IOPT_LAKE]
lakefrac_threshold = @[LAKEFRAC_THRESHOLD] ! 0.15
lakedepth_threshold = @[LAKEDEPTH_THRESHOLD] ! 0.5
clm_lake_debug = .false.

fhzero = 6
h2o_phys = .true.
ldiag3d = .false.
Expand Down
2 changes: 2 additions & 0 deletions tests/parm/rap.nml.IN
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ deflate_level=1
pdfcld = .false.
fhswr = 3600.
fhlwr = 3600.
frac_ice = @[FRAC_ICE]
ialb = @[IALB]
iems = @[IEMS]
iaer = @[IAER]
Expand Down Expand Up @@ -190,6 +191,7 @@ deflate_level=1
nstf_name = 2,0,0,0,0
nst_anl = .true.
lkm = @[LKM]
iopt_lake = @[IOPT_LAKE]
psautco = 0.0008,0.0005
prautco = 0.00015,0.00015
lgfdlmprad = .true.
Expand Down
2 changes: 2 additions & 0 deletions tests/parm/rrfs_conus13km_hrrr.nml.IN
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@
fhlwr = 1200.0
fhswr = 1200.0
fhzero = @[FHZERO]
frac_ice = @[FRAC_ICE]
! fscav_aero = @[FSCAV_AERO]
gwd_opt = @[GWD_OPT]
h2o_phys = .true.
Expand Down Expand Up @@ -240,6 +241,7 @@
! lfnc_p0 = @[LFNC_P0]
lheatstrg = @[LHEATSTRG]
lkm = @[LKM]
iopt_lake = @[IOPT_LAKE]
lndp_type = @[LNDP_TYPE]
lradar = @[LRADAR]
lrefres = .true.
Expand Down
18 changes: 11 additions & 7 deletions tests/rt.conf
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ RUN | cpld_control_p8_faster
# ATM tests #
###################################################################################################################################################################################

COMPILE | -DAPP=ATM -DCCPP_SUITES=FV3_GFS_v16,FV3_GFS_v15_thompson_mynn,FV3_GFS_v17_p8,FV3_GFS_v17_p8_rrtmgp,FV3_GFS_v15_thompson_mynn_lam3km,FV3_WoFS_v0,FV3_GFS_v17_p8_mynn -D32BIT=ON | | fv3 |
COMPILE | -DAPP=ATM -DCCPP_SUITES=FV3_GFS_v16,FV3_GFS_v16_flake,FV3_GFS_v15_thompson_mynn,FV3_GFS_v17_p8,FV3_GFS_v17_p8_rrtmgp,FV3_GFS_v15_thompson_mynn_lam3km,FV3_WoFS_v0,FV3_GFS_v17_p8_mynn -D32BIT=ON | | fv3 |
RUN | control_flake | | fv3 |
RUN | control_CubedSphereGrid | | fv3 |
RUN | control_CubedSphereGrid_parallel | - wcoss2.intel acorn.intel | fv3 |
RUN | control_latlon | | fv3 |
Expand Down Expand Up @@ -92,7 +93,7 @@ RUN | regional_ifi_control
RUN | regional_ifi_decomp | + acorn.intel | |
RUN | regional_ifi_2threads | + acorn.intel | |

COMPILE | -DAPP=ATM -DCCPP_SUITES=FV3_RAP,FV3_RAP_sfcdiff,FV3_HRRR,FV3_RRFS_v1beta,FV3_RRFS_v1nssl -D32BIT=ON | | fv3 |
COMPILE | -DAPP=ATM -DCCPP_SUITES=FV3_RAP,FV3_RAP_sfcdiff,FV3_HRRR,FV3_HRRR_flake,FV3_RRFS_v1beta,FV3_RRFS_v1nssl -D32BIT=ON | | fv3 |

RUN | rap_control | | fv3 |
RUN | regional_spp_sppt_shum_skeb | | fv3 |
Expand All @@ -106,6 +107,7 @@ RUN | hrrr_control
RUN | hrrr_control_decomp | | |
RUN | hrrr_control_2threads | | |
RUN | hrrr_control_restart | | | hrrr_control

RUN | rrfs_v1beta | | fv3 |
RUN | rrfs_v1nssl | | fv3 |
RUN | rrfs_v1nssl_nohailnoccn | | fv3 |
Expand Down Expand Up @@ -139,7 +141,7 @@ RUN | regional_control_faster
# DEBUG ATM tests #
###################################################################################################################################################################################

COMPILE | -DAPP=ATM -DDEBUG=ON -D32BIT=ON -DCCPP_SUITES=FV3_HRRR,FV3_GFS_v16,FV3_GFS_v16_csawmg,FV3_GFS_v16_ras,FV3_GFS_v17_p8,FV3_GFS_v15_thompson_mynn_lam3km,FV3_RAP,FV3_HRRR,FV3_RAP_unified_ugwp,FV3_RAP_cires_ugwp,FV3_RAP_flake,FV3_RAP_noah,FV3_RAP_sfcdiff,FV3_RAP_noah_sfcdiff_cires_ugwp,FV3_RRFS_v1beta | | fv3 |
COMPILE | -DAPP=ATM -DDEBUG=ON -D32BIT=ON -DCCPP_SUITES=FV3_HRRR,FV3_HRRR_flake,FV3_GFS_v16,FV3_GFS_v16_csawmg,FV3_GFS_v16_ras,FV3_GFS_v17_p8,FV3_GFS_v15_thompson_mynn_lam3km,FV3_RAP,FV3_HRRR,FV3_RAP_unified_ugwp,FV3_RAP_cires_ugwp,FV3_RAP_flake,FV3_RAP_clm_lake,FV3_RAP_noah,FV3_RAP_sfcdiff,FV3_RAP_noah_sfcdiff_cires_ugwp,FV3_RRFS_v1beta | | fv3 |

RUN | rrfs_smoke_conus13km_hrrr_warm_debug | | fv3 |
RUN | rrfs_smoke_conus13km_hrrr_warm_debug_2threads | | |
Expand All @@ -166,13 +168,15 @@ RUN | rap_diag_debug
RUN | rap_cires_ugwp_debug | | fv3 |
RUN | rap_unified_ugwp_debug | | |
RUN | rap_lndp_debug | | fv3 |
RUN | rap_flake_debug | | fv3 |
RUN | rap_progcld_thompson_debug | | fv3 |
RUN | rap_noah_debug | | fv3 |
RUN | rap_sfcdiff_debug | | fv3 |
RUN | rap_noah_sfcdiff_cires_ugwp_debug | | fv3 |
RUN | rrfs_v1beta_debug | | fv3 |

RUN | rap_clm_lake_debug | | fv3 |
RUN | rap_flake_debug | | fv3 |

COMPILE | -DAPP=ATM -DCCPP_SUITES=FV3_GFS_v16_fv3wam -D32BIT=ON -DMULTI_GASES=ON -DDEBUG=ON | | fv3 |
RUN | control_wam_debug | | fv3 |

Expand All @@ -181,7 +185,7 @@ RUN | control_wam_debug
###################################################################################################################################################################################
#

COMPILE | -DAPP=ATM -DCCPP_SUITES=FV3_RAP,FV3_HRRR -D32BIT=ON -DCCPP_32BIT=ON | | fv3 |
COMPILE | -DAPP=ATM -DCCPP_SUITES=FV3_RAP,FV3_HRRR,FV3_HRRR_flake -D32BIT=ON -DCCPP_32BIT=ON | | fv3 |
RUN | regional_spp_sppt_shum_skeb_dyn32_phy32 | | fv3 |
RUN | rap_control_dyn32_phy32 | | fv3 |
RUN | hrrr_control_dyn32_phy32 | | fv3 |
Expand All @@ -194,11 +198,11 @@ RUN | hrrr_control_restart_dyn32_phy32
COMPILE | -DAPP=ATM -DCCPP_SUITES=FV3_RAP,FV3_HRRR -DCCPP_32BIT=ON | | fv3 |
RUN | rap_control_dyn64_phy32 | | fv3 |

COMPILE | -DAPP=ATM -DCCPP_SUITES=FV3_RAP,FV3_HRRR -D32BIT=ON -DCCPP_32BIT=ON -DDEBUG=ON | | fv3 |
COMPILE | -DAPP=ATM -DCCPP_SUITES=FV3_RAP,FV3_HRRR,FV3_HRRR_flake -D32BIT=ON -DCCPP_32BIT=ON -DDEBUG=ON | | fv3 |
RUN | rap_control_debug_dyn32_phy32 | | fv3 |
RUN | hrrr_control_debug_dyn32_phy32 | | fv3 |

COMPILE | -DAPP=ATM -DCCPP_SUITES=FV3_RAP,FV3_HRRR -DCCPP_32BIT=ON -DDEBUG=ON | | fv3 |
COMPILE | -DAPP=ATM -DCCPP_SUITES=FV3_RAP,FV3_HRRR,FV3_HRRR_flake -DCCPP_32BIT=ON -DDEBUG=ON | | fv3 |
RUN | rap_control_dyn64_phy32_debug | | fv3 |

###################################################################################################################################################################################
Expand Down
2 changes: 1 addition & 1 deletion tests/rt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ if [[ $TESTS_FILE =~ '35d' ]] || [[ $TESTS_FILE =~ 'weekly' ]]; then
fi


BL_DATE=20230418
BL_DATE=20230424

RTPWD=${RTPWD:-$DISKNM/NEMSfv3gfs/develop-${BL_DATE}/${RT_COMPILER^^}}

Expand Down
Loading

0 comments on commit 3cc95d6

Please sign in to comment.