Skip to content

Commit

Permalink
Push more local changes to remote: hsd_case subdirs fv3_conf, parm, t…
Browse files Browse the repository at this point in the history
…ests.
  • Loading branch information
ulmononian committed Aug 27, 2024
1 parent 5abac39 commit 1083a62
Show file tree
Hide file tree
Showing 11 changed files with 330 additions and 392 deletions.
4 changes: 0 additions & 4 deletions tests-dev/hsd_cases.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,4 @@ atm_dyn32_intel:
compiler: 'intel'
option: '-DAPP=ATM -DCCPP_SUITES=FV3_GFS_v16,FV3_GFS_v16_flake,FV3_GFS_v17_p8,FV3_GFS_v17_p8_rrtmgp,FV3_GFS_v15_thompson_mynn_lam3km,FV3_WoFS_v0,FV3_GFS_v17_p8_mynn,FV3_GFS_v17_p8_ugwpv1 -D32BIT=ON'
tests:
- control_c48: {'project':['daily'],'turnoff':['noaacloud']}
- control_c48.v2.sfc: {'project':['daily'],'turnoff':['noaacloud']}
- 2020_CAPE: {'project':['daily'],'turnoff':['noaacloud']}
- baroclinic_wave: {'project':['daily'],'turnoff':['noaacloud']}
- tropical_cyclone: {'project':['daily'],'turnoff':['noaacloud']}
22 changes: 22 additions & 0 deletions tests-dev/hsd_cases/fv3_conf/compile_slurm.IN_hera
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash
#SBATCH -e err
#SBATCH -o out
#SBATCH --account=@[ACCNR]
#SBATCH --qos=@[QUEUE]
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=8
#SBATCH --time=30
#SBATCH --job-name="@[JBNME]"

set -eux
date_s_start=$(date +%s)
date_start=$(date)
echo -n "${date_s_start}," > job_timestamp.txt
echo "Compile started: ${date_start}"

"@[PATHRT]/compile.sh" "@[MACHINE_ID]" "@[MAKE_OPT]" "@[COMPILE_ID]" "@[RT_COMPILER]"

date_end=$(date)
echo "Compile ended: ${date_end}"
date_s_end=$(date +%s)
echo -n "${date_s_end}," >> job_timestamp.txt
173 changes: 173 additions & 0 deletions tests-dev/hsd_cases/fv3_conf/control_run.IN
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
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,NESTED=$NESTED"

OPNREQ_TEST=${OPNREQ_TEST:-false}
V2_SFC_FILE=${V2_SFC_FILE:-false}
SUFFIX=${RT_SUFFIX}
if [ $WARM_START = .false. ]; then
mkdir INPUT RESTART
if [ "$NESTED" = .true. ]; then
cp -r @[INPUTDATA_ROOT]/${inputdir}/INPUT_L127_nested/* ./INPUT/.
elif [ "$V2_SFC_FILE" = "true" ]; then
cp -r @[INPUTDATA_ROOT]/${inputdir}/INPUT_L127_v2_sfc/* ./INPUT/.
else
cp -r @[INPUTDATA_ROOT]/${inputdir}/INPUT_L127_gfsv17/* ./INPUT/.
fi
else
mkdir INPUT RESTART

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

# WAVE restart file for ATMW ORT tests
if [[ $CPLWAV == .true. ]]; then
if [[ $med_model == cmeps ]] && [[ $RUNTYPE == continue ]]; then
# CMEPS restart and pointer files
RFILE=ufs.atmw.cpl.r.${RESTART_FILE_SUFFIX_SECS}.nc
cp ../${DEP_RUN}${SUFFIX}/RESTART/${RFILE} .
ls -1 ${RFILE}>rpointer.cpl
fi
RFILE=ufs.atmw.ww3.r.${RESTART_FILE_SUFFIX_SECS}
cp ../${DEP_RUN}${SUFFIX}/${RFILE} .
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 ${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 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
if [ $CPLLND == .true. ]; then
cp @[INPUTDATA_ROOT]/FV3_fix_tiled/@[ATMRES]/@[ATMRES]*.nc INPUT/.
else
cp @[INPUTDATA_ROOT]/FV3_fix_tiled/@[ATMRES]/@[ATMRES]*.nc .
fi
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/IMS-NIC.blended.ice.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
if [ $WW3_MULTIGRID = 'true' ]; then
cp @[INPUTDATA_ROOT_WW3]/mod_def.pointsatmw mod_def.points
cp @[INPUTDATA_ROOT_WW3]/@[WW3_MODDEF] .
cp @[INPUTDATA_ROOT_WW3]/rmp_src* .
else
cp @[INPUTDATA_ROOT_WW3]/@[WW3_MODDEF] mod_def.ww3
cp @[INPUTDATA_ROOT_WW3]/@[MESH_WAV] .
fi
fi

#inline post
if [[ $POSTAPP = 'global' ]]; then
cp ${PATHRT}/parm/@[POST_ITAG] itag
cp ${PATHRT}/parm/@[POSTXCONFIG] postxconfig-NT.txt
cp ${PATHRT}/parm/@[POSTXCONFIG_FH00] 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_y14_24/merra2_1423_${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

#rad_c_gocart
if [ $IAER = 2011 ]; then
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_fix/qr_acr_qsV2.dat .
cp @[INPUTDATA_ROOT]/FV3_fix/qr_acr_qgV2.dat .
cp @[INPUTDATA_ROOT]/FV3_fix/freezeH2O.dat .
cp @[INPUTDATA_ROOT]/FV3_fix/CCN_ACTIVATE.BIN .
fi

#prognostic aerosols
if [ $CPLCHM = .true. ]; then
cp ${PATHRT}/parm/gocart/*.rc .
ln -sf @[INPUTDATA_ROOT]/GOCART/p8/ExtData .
fi
54 changes: 54 additions & 0 deletions tests-dev/hsd_cases/fv3_conf/fv3_slurm.IN_hera
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#!/bin/bash
#SBATCH -e err
#SBATCH -o out
#SBATCH --account=@[ACCNR]
#SBATCH --qos=@[QUEUE]
### #SBATCH --ntasks=@[TASKS]
#SBATCH --nodes=@[NODES]
#SBATCH --ntasks-per-node=@[TPN]
#SBATCH --time=@[WLCLK]
#SBATCH --job-name="@[JBNME]"
### #SBATCH --exclusive

set -eux
date_s_start=$(date +%s)
echo -n "${date_s_start}," > job_timestamp.txt

set +x
export MACHINE_ID=hera
source ./module-setup.sh
module use "${PWD}/modulefiles"
module load modules.fv3
module list
set -x

date_start=$(date)
echo "Model started: ${date_start}"

export MPI_TYPE_DEPTH=20
export OMP_STACKSIZE=512M
# shellcheck disable=SC2125
export OMP_NUM_THREADS=@[THRD]
export ESMF_RUNTIME_COMPLIANCECHECK=OFF:depth=4
export ESMF_RUNTIME_PROFILE=ON
export ESMF_RUNTIME_PROFILE_OUTPUT="SUMMARY"
export PSM_RANKS_PER_CONTEXT=4
export PSM_SHAREDCONTEXTS=1

# Avoid job errors because of filesystem synchronization delays
sync && sleep 1

# This "if" block is part of the rt.sh self-tests in error-test.conf. It emulates the model failing to run.
if [ "${JOB_SHOULD_FAIL:-NO}" = WHEN_RUNNING ] ; then
echo "The job should abort now, with exit status 1." 1>&2
echo "If error checking is working, the metascheduler should mark the job as failed." 1>&2
false
fi

# shellcheck disable=SC2102
srun --label -n @[TASKS] ./fv3.exe

date_end=$(date)
echo "Model ended: ${date_end}"
date_s_end=$(date +%s)
echo -n "${date_s_end}," >> job_timestamp.txt
38 changes: 38 additions & 0 deletions tests-dev/hsd_cases/parm/model_configure.IN
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
start_year: @[SYEAR]
start_month: @[SMONTH]
start_day: @[SDAY]
start_hour: @[SHOUR]
start_minute: 0
start_second: 0
nhours_fcst: @[FHMAX]
fhrot: @[FHROT]

dt_atmos: @[DT_ATMOS]
restart_interval: @[RESTART_INTERVAL]

quilting: @[QUILTING]
quilting_restart: @[QUILTING_RESTART]
write_groups: @[WRITE_GROUP]
write_tasks_per_group: @[WRTTASK_PER_GROUP]
itasks: @[ITASKS]
output_history: @[OUTPUT_HISTORY]
history_file_on_native_grid: @[HISTORY_FILE_ON_NATIVE_GRID]
write_dopost: @[WRITE_DOPOST]
write_nsflip: @[WRITE_NSFLIP]
num_files: @[NUM_FILES]
filename_base: @[FILENAME_BASE]
output_grid: @[OUTPUT_GRID]
output_file: @[OUTPUT_FILE]
zstandard_level: @[ZSTANDARD_LEVEL]
ideflate: @[IDEFLATE]
quantize_mode: 'quantize_bitround'
quantize_nsd: @[QUANTIZE_NSD]
ichunk2d: @[ICHUNK2D]
jchunk2d: @[JCHUNK2D]
ichunk3d: @[ICHUNK3D]
jchunk3d: @[JCHUNK3D]
kchunk3d: @[KCHUNK3D]
imo: @[IMO]
jmo: @[JMO]
output_fh: @[OUTPUT_FH]
iau_offset: @[IAU_OFFSET]
27 changes: 27 additions & 0 deletions tests-dev/hsd_cases/parm/ufs.configure.atm_esmf.IN
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#############################################
#### UFS Run-Time Configuration File ######
#############################################

# ESMF #
logKindFlag: @[esmf_logkind]
globalResourceControl: true

# EARTH #
EARTH_component_list: ATM
EARTH_attributes::
Verbosity = 0
::

# ATM #
ATM_model: @[atm_model]
ATM_petlist_bounds: @[atm_petlist_bounds]
ATM_omp_num_threads: @[atm_omp_num_threads]
ATM_attributes::
Verbosity = 0
Diagnostic = 0
::

# Run Sequence #
runSeq::
ATM
::
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

export TEST_DESCR="Compare global control C48L127 v2.sfc results with previous trunk version"

export CNTL_DIR=2020_cape
export CNTL_DIR=2020_CAPE

export LIST_FILES="sfcf000.nc \
sfcf024.nc \
Expand Down
Loading

0 comments on commit 1083a62

Please sign in to comment.