Skip to content

Commit

Permalink
turn off checksum for restart of ufs_model
Browse files Browse the repository at this point in the history
  • Loading branch information
chan-hoo committed Dec 9, 2024
1 parent 2035252 commit c6c118f
Show file tree
Hide file tree
Showing 13 changed files with 66 additions and 47 deletions.
4 changes: 2 additions & 2 deletions jobs/JLANDDA_ANALYSIS
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ export COMOUThofx="${COMOUThofx:-${COMOUT}/hofx}"
mkdir -p ${COMOUThofx}

# Create a teomporary share directory
export DATA_SHARE="${DATA_SHARE:-${DATAROOT}/DATA_SHARE/${PDY}}"
mkdir -p ${DATA_SHARE}
export DATA_RESTART="${DATA_RESTART:-${DATAROOT}/DATA_SHARE/RESTART}"
mkdir -p ${DATA_RESTART}
export DATA_HOFX="${DATA_HOFX:-${DATAROOT}/DATA_SHARE/hofx}"
mkdir -p ${DATA_HOFX}

Expand Down
6 changes: 0 additions & 6 deletions jobs/JLANDDA_FCST_IC
Original file line number Diff line number Diff line change
Expand Up @@ -65,23 +65,17 @@ setpdy.sh
if [ "${MACHINE}" = "WCOSS2" ]; then
export COMIN="${COMIN:-$(compath.py -o ${NET}/${model_ver}/${RUN}.${PDY})}"
export COMOUT="${COMOUT:-$(compath.py -o ${NET}/${model_ver}/${RUN}.${PDY})}"
export COMINm1="${COMINm1:-$(compath.py -o ${NET}/${model_ver}/${RUN}.${PDYm1})}"
export COMINgdas="${COMINgdas:-$(compath.py ${envir}/gdas/${gdas_ver})}"
export COMINgfs="${COMINgfs:-$(compath.py ${envir}/gfs/${gfs_ver})}"
else
export COMIN="${COMIN:-${COMROOT}/${NET}/${model_ver}/${RUN}.${PDY}}"
export COMOUT="${COMOUT:-${COMROOT}/${NET}/${model_ver}/${RUN}.${PDY}}"
export COMINm1="${COMINm1:-${COMROOT}/${NET}/${model_ver}/${RUN}.${PDYm1}}"
export COMINgdas="${COMINgdas:-${FIXlandda}/DATA_gdas}"
export COMINgfs="${COMINgfs:-${FIXlandda}/DATA_gfs}"
fi

mkdir -p ${COMOUT}

# Create a teomporary share directory
export DATA_SHARE="${DATA_SHARE:-${DATAROOT}/DATA_SHARE/${PDY}}"
mkdir -p ${DATA_SHARE}

#
#-----------------------------------------------------------------------
#
Expand Down
2 changes: 0 additions & 2 deletions jobs/JLANDDA_FORECAST
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,6 @@ export COMOUTplot="${COMOUTplot:-${COMOUT}/plot}"
mkdir -p ${COMOUTplot}

# Create a teomporary share directory
export DATA_SHARE="${DATA_SHARE:-${DATAROOT}/DATA_SHARE/${PDY}}"
mkdir -p ${DATA_SHARE}
export DATA_RESTART="${DATA_RESTART:-${DATAROOT}/DATA_SHARE/RESTART}"
mkdir -p ${DATA_RESTART}

Expand Down
2 changes: 0 additions & 2 deletions jobs/JLANDDA_PLOT_STATS
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@ export COMOUTplot="${COMOUTplot:-${COMOUT}/plot}"
mkdir -p ${COMOUTplot}

# Create a teomporary share directory
export DATA_SHARE="${DATA_SHARE:-${DATAROOT}/DATA_SHARE/${PDY}}"
mkdir -p ${DATA_SHARE}
export DATA_HOFX="${DATA_HOFX:-${DATAROOT}/DATA_SHARE/hofx}"
mkdir -p ${DATA_HOFX}

Expand Down
4 changes: 2 additions & 2 deletions jobs/JLANDDA_POST_ANAL
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ fi
mkdir -p ${COMOUT}

# Create a teomporary share directory
export DATA_SHARE="${DATA_SHARE:-${DATAROOT}/DATA_SHARE/${PDY}}"
mkdir -p ${DATA_SHARE}
export DATA_RESTART="${DATA_RESTART:-${DATAROOT}/DATA_SHARE/RESTART}"
mkdir -p ${DATA_RESTART}

#
#-----------------------------------------------------------------------
Expand Down
4 changes: 0 additions & 4 deletions jobs/JLANDDA_PREP_OBS
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,6 @@ mkdir -p ${COMOUTobs}
export COMOUTplot="${COMOUTplot:-${COMOUT}/plot}"
mkdir -p ${COMOUTplot}

# Create a teomporary share directory
export DATA_SHARE="${DATA_SHARE:-${DATAROOT}/DATA_SHARE/${PDY}}"
mkdir -p ${DATA_SHARE}

#
#-----------------------------------------------------------------------
#
Expand Down
2 changes: 0 additions & 2 deletions jobs/JLANDDA_PRE_ANAL
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,6 @@ fi
mkdir -p ${COMOUT}

# Create a teomporary share directory
export DATA_SHARE="${DATA_SHARE:-${DATAROOT}/DATA_SHARE/${PDY}}"
mkdir -p ${DATA_SHARE}
export DATA_RESTART="${DATA_RESTART:-${DATAROOT}/DATA_SHARE/RESTART}"
mkdir -p ${DATA_RESTART}

Expand Down
1 change: 1 addition & 0 deletions parm/templates/template.ATML.input.nml.FV3_GFS_v17_p8
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
chksum_debug = .false.
dycore_only = .false.
ccpp_suite = '{{ ccpp_suite }}'
ignore_rst_cksum = .true.
/

&diag_manager_nml
Expand Down
10 changes: 10 additions & 0 deletions parm/templates/template.land_analysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ workflow:
DATADEP_FILE1: "<cyclestr>&DATAROOT;/DATA_SHARE/RESTART/ufs_land_restart.@Y-@m-@[email protected]</cyclestr>"
DATADEP_FILE2: "<cyclestr>&WARMSTART_DIR;/ufs_land_restart.@Y-@m-@[email protected]</cyclestr>"
DATADEP_COLDSTART: "<cyclestr>&EXP_BASEDIR;/exp_case/&EXP_CASE_NAME;/task_skip_coldstart_@Y@m@[email protected]</cyclestr>"
DATADEP_SFCDATA: "<cyclestr>&DATAROOT;/DATA_SHARE/RESTART/@Y@m@[email protected]_data.tile6.nc</cyclestr>"
log: "&LOGDIR;/workflow.log"
tasks:
task_prep_obs:
Expand Down Expand Up @@ -144,6 +145,7 @@ workflow:
join: "&LOGDIR;/fcst_ic&LOGFN_SUFFIX;"
memory: 128G
{%- endif %}
{%- if app == "LND" %}
task_pre_anal:
attrs:
{%- if coldstart == "YES" %}
Expand Down Expand Up @@ -184,6 +186,7 @@ workflow:
attrs:
age: 5
value: "&DATADEP_FILE2;"
{%- endif %}
{%- endif %}
task_analysis:
attrs:
Expand Down Expand Up @@ -226,9 +229,16 @@ workflow:
taskdep_prep_obs:
attrs:
task: prep_obs
{%- if app == "LND" %}
taskdep_pre_anal:
attrs:
task: pre_anal
{%- else %}
datadep_sfcdata:
attrs:
age: 5
value: "&DATADEP_SFCDATA;"
{%- endif %}
task_post_anal:
attrs:
{%- if coldstart == "YES" %}
Expand Down
18 changes: 9 additions & 9 deletions scripts/exlandda_analysis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ B=30 # back ground error std for LETKFOI
# Import input files
for itile in {1..6}
do
cp ${DATA_SHARE}/${FILEDATE}.sfc_data.tile${itile}.nc .
cp ${DATA_RESTART}/${FILEDATE}.sfc_data.tile${itile}.nc .
done
ln -nsf ${COMIN}/obs/GHCN_${YYYY}${MM}${DD}${HH}.nc .

Expand Down Expand Up @@ -70,7 +70,7 @@ if [ $GFSv17 == "YES" ]; then
else
SNOWDEPTHVAR="snwdph"
# replace field overwrite file
cp ${PARMlandda}/jedi/gfs-land.yaml ${DATA}/gfs-land.yaml
cp -p ${PARMlandda}/jedi/gfs-land.yaml ${DATA}/gfs-land.yaml
fi
# FOR LETKFOI, CREATE THE PSEUDO-ENSEMBLE
for ens in pos neg
Expand All @@ -79,8 +79,8 @@ do
rm -r $DATA/mem_${ens}
fi
mkdir -p $DATA/mem_${ens}
cp ${FILEDATE}.sfc_data.tile*.nc ${DATA}/mem_${ens}
cp ${DATA}/${FILEDATE}.coupler.res ${DATA}/mem_${ens}/${FILEDATE}.coupler.res
cp -p ${FILEDATE}.sfc_data.tile*.nc ${DATA}/mem_${ens}
cp -p ${DATA}/${FILEDATE}.coupler.res ${DATA}/mem_${ens}/${FILEDATE}.coupler.res
done

# using ioda mods to get a python version with netCDF4
Expand Down Expand Up @@ -207,8 +207,8 @@ if [[ $do_DA == "YES" ]]; then
cat << EOF > apply_incr_nml
&noahmp_snow
date_str=${YYYY}${MM}${DD}
hour_str=$HH
res=$RES
hour_str=${HH}
res=${RES}
frac_grid=$GFSv17
orog_path="${FIXlandda}/FV3_fix_tiled/C${RES}"
otype="C${RES}_oro_data"
Expand Down Expand Up @@ -237,21 +237,21 @@ do
cp -p ${DATA}/${FILEDATE}.sfc_data.tile${itile}.nc ${COMOUT}
done

if [[ -d output/DA/hofx ]]; then
if [ -d output/DA/hofx ]; then
cp -p output/DA/hofx/* ${COMOUThofx}
ln -nsf ${COMOUThofx}/* ${DATA_HOFX}
fi

###########################################################
# WE2E test
###########################################################
if [[ "${WE2E_TEST}" == "YES" ]]; then
if [ "${WE2E_TEST}" == "YES" ]; then
path_fbase="${FIXlandda}/test_base/we2e_com/${RUN}.${PDY}"
fn_sfc="${FILEDATE}.sfc_data.tile"
fn_inc="${FILEDATE}.xainc.sfc_data.tile"
fn_hofx="letkf_hofx_ghcn_${PDY}${cyc}.nc"
we2e_log_fp="${LOGDIR}/${WE2E_LOG_FN}"
if [[ ! -e "${we2e_log_fp}" ]]; then
if [ ! -f "${we2e_log_fp}" ]; then
touch ${we2e_log_fp}
fi
# surface data tiles
Expand Down
36 changes: 27 additions & 9 deletions scripts/exlandda_forecast.sh
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,9 @@ ${USHlandda}/fill_jinja_template.py -u "${settings}" -t "${fp_template}" -o "${f
if [ "${APP}" = "LND" ]; then
# CDEPS restart and pointer files for DATM (LND)
rfile2="ufs.cpld.datm.r.${YYYY}-${MM}-${DD}-${HHsec_5d}.nc"
if [[ -e "${COMINm1}/${rfile2}" ]]; then
if [ -f "${COMINm1}/${rfile2}" ]; then
ln -nsf "${COMINm1}/${rfile2}" .
elif [[ -e "${WARMSTART_DIR}/${rfile2}" ]]; then
elif [ -f "${WARMSTART_DIR}/${rfile2}" ]; then
ln -nsf "${WARMSTART_DIR}/${rfile2}" .
else
ln -nsf ${FIXlandda}/restarts/${ATMOS_FORC}/${rfile2} .
Expand Down Expand Up @@ -266,31 +266,44 @@ if [ "${APP}" = "ATML" ]; then
if [ "${COLDSTART}" = "NO" ] || [ "${PDY}${cyc}" != "${DATE_FIRST_CYCLE:0:10}" ]; then
# Set path to directory where restart files exist
if [ "${COLDSTART}" = "NO" ] && [ "${PDY}${cyc}" = "${DATE_FIRST_CYCLE:0:10}" ]; then
data_dir="${WARMSTART_DIR}"
data_dir="${WARMSTART_DIR}/RESTART"
else
data_dir="${COMINm1}"
data_dir="${COMINm1}/RESTART"
fi

rst_fns=( "ca_data" "fv_core.res" "fv_srf_wnd.res" "fv_tracer.res" "phy_data" "sfc_data" )
rst_fns=( "ca_data" "fv_core.res" "fv_srf_wnd.res" "fv_tracer.res" "phy_data" )
for ifn in "${rst_fns[@]}" ; do
for itile in {1..6};
do
r_fp="${data_dir}/RESTART/${YYYY}${MM}${DD}.${HH}0000.${ifn}.tile${itile}.nc"
r_fp="${data_dir}/${YYYY}${MM}${DD}.${HH}0000.${ifn}.tile${itile}.nc"
if [ -f "${r_fp}" ]; then
ln -nsf "${r_fp}" "${ifn}.tile${itile}.nc"
else
err_exit "${r_fp} file does not exist."
fi
done
if [ "${ifn}" = "fv_core.res" ]; then
r_fp="${data_dir}/RESTART/${YYYY}${MM}${DD}.${HH}0000.${ifn}.nc"
r_fp="${data_dir}/${YYYY}${MM}${DD}.${HH}0000.${ifn}.nc"
if [ -f "${r_fp}" ]; then
ln -nsf "${r_fp}" "${ifn}.nc"
else
err_exit "${r_fp} file does not exist."
fi
fi
done
# link sfc_data from COMIN because they were upated by JEDI Analysis task
if [ "${PDY}${cyc}" != "${DATE_FIRST_CYCLE:0:10}" ]; then
data_dir="${COMIN}"
fi
for itile in {1..6};
do
r_fp="${data_dir}/${YYYY}${MM}${DD}.${HH}0000.sfc_data.tile${itile}.nc"
if [ -f "${r_fp}" ]; then
ln -nsf "${r_fp}" "sfc_data.tile${itile}.nc"
else
err_exit "${r_fp} file does not exist."
fi
done

# update coupler.res file
settings="\
Expand Down Expand Up @@ -395,18 +408,23 @@ elif [ "${APP}" = "ATML" ]; then
cp -p "${DATA}/RESTART/${nYYYY}${nMM}${nDD}.${nHH}0000.${ifn}.tile${itile}.nc" ${COMOUT}/RESTART/.
done
done
# Set sfc_data to DATA_RESTART to trigger ANALYSIS task in next cycle
for itile in {1..6};
do
cp -p "${COMOUT}/RESTART/${nYYYY}${nMM}${nDD}.${nHH}0000.sfc_data.tile${itile}.nc" ${DATA_RESTART}/.
done
fi


###########################################################
# WE2E test
###########################################################
if [[ "${WE2E_TEST}" == "YES" ]]; then
if [ "${WE2E_TEST}" == "YES" ]; then
path_fbase="${FIXlandda}/test_base/we2e_com/${RUN}.${PDY}/RESTART"
fn_res="ufs_land_restart.${nYYYY}-${nMM}-${nDD}_${nHH}-00-00.tile"
we2e_log_fp="${LOGDIR}/${WE2E_LOG_FN}"

if [[ ! -e "${we2e_log_fp}" ]]; then
if [ ! -f "${we2e_log_fp}" ]; then
touch ${we2e_log_fp}
fi
# restart files
Expand Down
16 changes: 12 additions & 4 deletions scripts/exlandda_post_anal.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,24 @@ esac
FILEDATE=${YYYY}${MM}${DD}.${HH}0000
for itile in {1..6}
do
cp ${DATA_SHARE}/${FILEDATE}.sfc_data.tile${itile}.nc .
cp -p ${COMIN}/${FILEDATE}.sfc_data.tile${itile}.nc .
done

# convert back to UFS tile
echo '************************************************'
echo 'calling tile2tile'

# copy restarts into work directory
for itile in {1..6}
do
cp ${DATA_SHARE}/ufs_land_restart.${YYYY}-${MM}-${DD}_${HH}-00-00.tile${itile}.nc .
rst_fn="ufs_land_restart.${YYYY}-${MM}-${DD}_${HH}-00-00.tile${itile}.nc"
if [ -f ${DATA_RESTART}/${rst_fn} ]; then
cp ${DATA_RESTART}/${rst_fn} .
elif [ -f ${WARMSTART_DIR}/${rst_fn} ]; then
cp ${WARMSTART_DIR}/${rst_fn} .
else
err_exit "Initial restart files do not exist"
fi
done

# update tile2tile namelist
Expand Down Expand Up @@ -81,11 +89,11 @@ do
done

# WE2E test
if [[ "${WE2E_TEST}" == "YES" ]]; then
if [ "${WE2E_TEST}" == "YES" ]; then
path_fbase="${FIXlandda}/test_base/we2e_com/${RUN}.${PDY}"
fn_res="ufs_land_restart.anal.${YYYY}-${MM}-${DD}_${HH}-00-00.tile"
we2e_log_fp="${LOGDIR}/${WE2E_LOG_FN}"
if [[ ! -e "${we2e_log_fp}" ]]; then
if [ ! -f "${we2e_log_fp}" ]; then
touch ${we2e_log_fp}
fi
# restart files
Expand Down
8 changes: 3 additions & 5 deletions scripts/exlandda_pre_anal.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,13 @@ FILEDATE=${YYYY}${MM}${DD}.${HH}0000
for itile in {1..6}
do
rst_fn="ufs_land_restart.${YYYY}-${MM}-${DD}_${HH}-00-00.tile${itile}.nc"
if [[ -e ${DATA_RESTART}/${rst_fn} ]]; then
if [ -f ${DATA_RESTART}/${rst_fn} ]; then
cp ${DATA_RESTART}/${rst_fn} .
elif [[ -e ${WARMSTART_DIR}/${rst_fn} ]]; then
elif [ -f ${WARMSTART_DIR}/${rst_fn} ]; then
cp ${WARMSTART_DIR}/${rst_fn} .
else
err_exit "Initial restart files do not exist"
fi
# copy restart to data share dir for post_anal
cp -p ${rst_fn} ${DATA_SHARE}
done

# update tile2tile namelist
Expand Down Expand Up @@ -52,6 +50,6 @@ fi
#stage restarts for applying JEDI update to intermediate directory
for itile in {1..6}
do
cp -p ${DATA}/${FILEDATE}.sfc_data.tile${itile}.nc ${DATA_SHARE}/${FILEDATE}.sfc_data.tile${itile}.nc
cp -p ${DATA}/${FILEDATE}.sfc_data.tile${itile}.nc ${DATA_RESTART}/${FILEDATE}.sfc_data.tile${itile}.nc
done

0 comments on commit c6c118f

Please sign in to comment.