From fb2f8fbb6b9913a86ba74eda1904500dbc2c525c Mon Sep 17 00:00:00 2001 From: Jiarui Dong Date: Tue, 28 Feb 2023 19:25:46 -0500 Subject: [PATCH 01/27] Add initial land DA cycling. --- env/HERA.env | 12 ++++- env/ORION.env | 14 ++++- jobs/JGLOBAL_LAND_ANALYSIS_FINALIZE | 63 ++++++++++++++++++++++ jobs/JGLOBAL_LAND_ANALYSIS_INITIALIZE | 57 ++++++++++++++++++++ jobs/JGLOBAL_LAND_ANALYSIS_RUN | 57 ++++++++++++++++++++ jobs/rocoto/landanlfinal.sh | 23 ++++++++ jobs/rocoto/landanlinit.sh | 24 +++++++++ jobs/rocoto/landanlrun.sh | 18 +++++++ parm/config/config.base.emc.dyn | 5 ++ parm/config/config.landanl | 20 +++++++ parm/config/config.landanlfinal | 10 ++++ parm/config/config.landanlinit | 10 ++++ parm/config/config.landanlrun | 11 ++++ parm/config/config.resources | 75 +++++++++++++++++++++++++++ parm/config/yaml/defaults.yaml | 4 ++ 15 files changed, 400 insertions(+), 3 deletions(-) create mode 100755 jobs/JGLOBAL_LAND_ANALYSIS_FINALIZE create mode 100755 jobs/JGLOBAL_LAND_ANALYSIS_INITIALIZE create mode 100755 jobs/JGLOBAL_LAND_ANALYSIS_RUN create mode 100755 jobs/rocoto/landanlfinal.sh create mode 100755 jobs/rocoto/landanlinit.sh create mode 100755 jobs/rocoto/landanlrun.sh create mode 100755 parm/config/config.landanl create mode 100755 parm/config/config.landanlfinal create mode 100755 parm/config/config.landanlinit create mode 100755 parm/config/config.landanlrun diff --git a/env/HERA.env b/env/HERA.env index f2be166dce..0068c90c13 100755 --- a/env/HERA.env +++ b/env/HERA.env @@ -5,7 +5,7 @@ if [[ $# -ne 1 ]]; then echo "Must specify an input argument to set runtime environment variables!" echo "argument can be any one of the following:" echo "atmanalrun atmensanalrun" - echo "aeroanlrun" + echo "aeroanlrun landanlrun" echo "anal sfcanl fcst post vrfy metp" echo "eobs eupd ecen efcs epos" echo "postsnd awips gempak" @@ -83,6 +83,16 @@ elif [[ "${step}" = "aeroanlrun" ]]; then [[ ${NTHREADS_AEROANL} -gt ${nth_max} ]] && export NTHREADS_AEROANL=${nth_max} export APRUN_AEROANL="${launcher} -n ${npe_aeroanlrun}" +elif [[ "${step}" = "landanlrun" ]]; then + + export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}" + + nth_max=$((npe_node_max / npe_node_landanlrun)) + + export NTHREADS_LANDANL=${nth_landanlrun:-${nth_max}} + [[ ${NTHREADS_LANDANL} -gt ${nth_max} ]] && export NTHREADS_LANDANL=${nth_max} + export APRUN_LANDANL="${launcher} -n ${npe_landanlrun}" + elif [[ "${step}" = "ocnanalbmat" ]]; then export APRUNCFP="${launcher} -n \$ncmd --multi-prog" diff --git a/env/ORION.env b/env/ORION.env index 918748fda3..f019ec54c3 100755 --- a/env/ORION.env +++ b/env/ORION.env @@ -5,7 +5,7 @@ if [[ $# -ne 1 ]]; then echo "Must specify an input argument to set runtime environment variables!" echo "argument can be any one of the following:" echo "atmanalrun atmensanalrun" - echo "aeroanlrun" + echo "aeroanlrun landanlrun" echo "anal sfcanl fcst post vrfy metp" echo "eobs eupd ecen efcs epos" echo "postsnd awips gempak" @@ -83,6 +83,16 @@ elif [[ "${step}" = "aeroanlrun" ]]; then [[ ${NTHREADS_AEROANL} -gt ${nth_max} ]] && export NTHREADS_AEROANL=${nth_max} export APRUN_AEROANL="${launcher} -n ${npe_aeroanlrun}" +elif [[ "${step}" = "landanlrun" ]]; then + + export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}" + + nth_max=$((npe_node_max / npe_node_landanlrun)) + + export NTHREADS_LANDANL=${nth_landanlrun:-${nth_max}} + [[ ${NTHREADS_LANDANL} -gt ${nth_max} ]] && export NTHREADS_LANDANL=${nth_max} + export APRUN_LANDANL="${launcher} -n ${npe_landanlrun}" + elif [[ "${step}" = "ocnanalbmat" ]]; then export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}" @@ -306,7 +316,7 @@ elif [[ "${step}" = "gempak" ]]; then npe_gempak=${npe_gempak_gfs} npe_node_gempak=${npe_node_gempak_gfs} fi - + nth_max=$((npe_node_max / npe_node_gempak)) export NTHREADS_GEMPAK=${nth_gempak:-1} diff --git a/jobs/JGLOBAL_LAND_ANALYSIS_FINALIZE b/jobs/JGLOBAL_LAND_ANALYSIS_FINALIZE new file mode 100755 index 0000000000..02bd766e73 --- /dev/null +++ b/jobs/JGLOBAL_LAND_ANALYSIS_FINALIZE @@ -0,0 +1,63 @@ +#! /usr/bin/env bash + +source "${HOMEgfs}/ush/preamble.sh" +export WIPE_DATA="NO" +export DATA=${DATA:-${DATAROOT}/${RUN}landanl_${cyc}} +source "${HOMEgfs}/ush/jjob_header.sh" -e "landanlfinal" -c "base landanl landanlfinal" + +############################################## +# Set variables used in the script +############################################## +export CDATE=${CDATE:-${PDY}${cyc}} +export CDUMP=${CDUMP:-${RUN:-"gfs"}} +export COMPONENT="atmos" + + +############################################## +# Begin JOB SPECIFIC work +############################################## + +GDATE=$(date +%Y%m%d%H -d "${CDATE:0:8} ${CDATE:8:2} - ${assim_freq} hours") +export GDATE +gPDY=${GDATE:0:8} +export gcyc=${GDATE:8:2} +export GDUMP=${GDUMP:-"gdas"} + +export OPREFIX="${CDUMP}.t${cyc}z." +export GPREFIX="${GDUMP}.t${gcyc}z." +export APREFIX="${CDUMP}.t${cyc}z." + +export COMOUT=${COMOUT:-${ROTDIR}/${CDUMP}.${PDY}/${cyc}/${COMPONENT}} + +mkdir -p "${COMOUT}" + +# COMIN_GES and COMIN_GES_ENS are used in script +export COMIN_GES="${ROTDIR}/${GDUMP}.${gPDY}/${gcyc}/${COMPONENT}" +export COMIN_GES_ENS="${ROTDIR}/enkf${GDUMP}.${gPDY}/${gcyc}/${COMPONENT}" + +############################################################### +# Run relevant script + +EXSCRIPT=${GDASLANDFINALPY:-${HOMEgfs}/scripts/exglobal_land_analysis_finalize.py} +${EXSCRIPT} +status=$? +[[ ${status} -ne 0 ]] && exit "${status}" + +############################################## +# End JOB SPECIFIC work +############################################## + +############################################## +# Final processing +############################################## +if [[ -e "${pgmout}" ]] ; then + cat "${pgmout}" +fi + +########################################## +# Remove the Temporary working directory +########################################## +cd "${DATAROOT}" || exit 1 +[[ ${KEEPDATA} = "NO" ]] && rm -rf "${DATA}" + +exit 0 diff --git a/jobs/JGLOBAL_LAND_ANALYSIS_INITIALIZE b/jobs/JGLOBAL_LAND_ANALYSIS_INITIALIZE new file mode 100755 index 0000000000..196548603d --- /dev/null +++ b/jobs/JGLOBAL_LAND_ANALYSIS_INITIALIZE @@ -0,0 +1,57 @@ +#! /usr/bin/env bash + +source "${HOMEgfs}/ush/preamble.sh" +export DATA=${DATA:-${DATAROOT}/${RUN}landanl_${cyc}} +source "${HOMEgfs}/ush/jjob_header.sh" -e "landanlinit" -c "base landanl landanlinit" + +############################################## +# Set variables used in the script +############################################## +export CDATE=${CDATE:-${PDY}${cyc}} +export CDUMP=${CDUMP:-${RUN:-"gfs"}} +export COMPONENT="atmos" + +############################################## +# Begin JOB SPECIFIC work +############################################## + +GDATE=$(date +%Y%m%d%H -d "${CDATE:0:8} ${CDATE:8:2} - ${assim_freq} hours") +export GDATE +gPDY=${GDATE:0:8} +export gcyc=${GDATE:8:2} +export GDUMP=${GDUMP:-"gdas"} + +export OPREFIX="${CDUMP}.t${cyc}z." +export GPREFIX="${GDUMP}.t${gcyc}z." +export APREFIX="${CDUMP}.t${cyc}z." + +export COMOUT=${COMOUT:-${ROTDIR}/${CDUMP}.${PDY}/${cyc}/${COMPONENT}} + +mkdir -p ${COMOUT} + +# COMIN_GES and COMIN_GES_ENS are used in script +export COMIN_GES="${ROTDIR}/${GDUMP}.${gPDY}/${gcyc}/${COMPONENT}" +export COMIN_GES_ENS="${ROTDIR}/enkf${GDUMP}.${gPDY}/${gcyc}/${COMPONENT}" + +# Add UFSDA to PYTHONPATH +export PYTHONPATH=${HOMEgfs}/sorc/gdas.cd/ush/:${PYTHONPATH} + +############################################################### +# Run relevant script +EXSCRIPT=${GDASLANDINITPY:-${HOMEgfs}/scripts/exglobal_land_analysis_initialize.py} +${EXSCRIPT} +status=$? +[[ ${status} -ne 0 ]] && exit "${status}" + +############################################## +# End JOB SPECIFIC work +############################################## + +############################################## +# Final processing +############################################## +if [[ -e "${pgmout}" ]] ; then + cat "${pgmout}" +fi + +exit 0 diff --git a/jobs/JGLOBAL_LAND_ANALYSIS_RUN b/jobs/JGLOBAL_LAND_ANALYSIS_RUN new file mode 100755 index 0000000000..51e84f3182 --- /dev/null +++ b/jobs/JGLOBAL_LAND_ANALYSIS_RUN @@ -0,0 +1,57 @@ +#! /usr/bin/env bash + +source "${HOMEgfs}/ush/preamble.sh" +export WIPE_DATA="NO" +export DATA=${DATA:-${DATAROOT}/${RUN}landanl_${cyc}} +source "${HOMEgfs}/ush/jjob_header.sh" -e "landanlrun" -c "base landanl landanlrun" + +############################################## +# Set variables used in the script +############################################## +export CDATE=${CDATE:-${PDY}${cyc}} +export CDUMP=${CDUMP:-${RUN:-"gfs"}} +export COMPONENT="atmos" + + +############################################## +# Begin JOB SPECIFIC work +############################################## + +GDATE=$(date +%Y%m%d%H -d "${CDATE:0:8} ${CDATE:8:2} - ${assim_freq} hours") +export GDATE +gPDY=${GDATE:0:8} +export gcyc=${GDATE:8:2} +export GDUMP=${GDUMP:-"gdas"} + +export OPREFIX="${CDUMP}.t${cyc}z." +export GPREFIX="${GDUMP}.t${gcyc}z." +export APREFIX="${CDUMP}.t${cyc}z." + +export COMOUT=${COMOUT:-${ROTDIR}/${CDUMP}.${PDY}/${cyc}/${COMPONENT}} + +mkdir -p "${COMOUT}" + +# COMIN_GES and COMIN_GES_ENS are used in script +export COMIN_GES="${ROTDIR}/${GDUMP}.${gPDY}/${gcyc}/${COMPONENT}" +export COMIN_GES_ENS="${ROTDIR}/enkf${GDUMP}.${gPDY}/${gcyc}/${COMPONENT}" + +############################################################### +# Run relevant script + +EXSCRIPT=${GDASLANDRUNSH:-${HOMEgfs}/scripts/exglobal_land_analysis_run.sh} +${EXSCRIPT} +status=$? +[[ ${status} -ne 0 ]] && exit "${status}" + +############################################## +# End JOB SPECIFIC work +############################################## + +############################################## +# Final processing +############################################## +if [[ -e "${pgmout}" ]] ; then + cat "${pgmout}" +fi + +exit 0 diff --git a/jobs/rocoto/landanlfinal.sh b/jobs/rocoto/landanlfinal.sh new file mode 100755 index 0000000000..a6fa48c679 --- /dev/null +++ b/jobs/rocoto/landanlfinal.sh @@ -0,0 +1,23 @@ +#! /usr/bin/env bash + +source "${HOMEgfs}/ush/preamble.sh" + +############################################################### +# Source UFSDA workflow modules +. "${HOMEgfs}/ush/load_ufsda_modules.sh" +status=$? +[[ ${status} -ne 0 ]] && exit "${status}" + +export job="landanlfinal" +export jobid="${job}.$$" + +############################################################### +# setup python path for workflow utilities and tasks +pygwPATH="${HOMEgfs}/ush/python:${HOMEgfs}/ush/python/pygw/src" +PYTHONPATH="${PYTHONPATH:+${PYTHONPATH}:}${pygwPATH}" +export PYTHONPATH +############################################################### +# Execute the JJOB +"${HOMEgfs}/jobs/JGLOBAL_LAND_ANALYSIS_FINALIZE" +status=$? +exit "${status}" diff --git a/jobs/rocoto/landanlinit.sh b/jobs/rocoto/landanlinit.sh new file mode 100755 index 0000000000..e9c0b2d7a2 --- /dev/null +++ b/jobs/rocoto/landanlinit.sh @@ -0,0 +1,24 @@ +#! /usr/bin/env bash + +source "${HOMEgfs}/ush/preamble.sh" + +############################################################### +# Source UFSDA workflow modules +. "${HOMEgfs}/ush/load_ufsda_modules.sh" +status=$? +[[ ${status} -ne 0 ]] && exit "${status}" + +export job="landanlinit" +export jobid="${job}.$$" + +############################################################### +# setup python path for workflow utilities and tasks +pygwPATH="${HOMEgfs}/ush/python:${HOMEgfs}/ush/python/pygw/src" +PYTHONPATH="${PYTHONPATH:+${PYTHONPATH}:}${pygwPATH}" +export PYTHONPATH + +############################################################### +# Execute the JJOB +"${HOMEgfs}/jobs/JGLOBAL_LAND_ANALYSIS_INITIALIZE" +status=$? +exit "${status}" diff --git a/jobs/rocoto/landanlrun.sh b/jobs/rocoto/landanlrun.sh new file mode 100755 index 0000000000..29dfc23bba --- /dev/null +++ b/jobs/rocoto/landanlrun.sh @@ -0,0 +1,18 @@ +#! /usr/bin/env bash + +source "${HOMEgfs}/ush/preamble.sh" + +############################################################### +# Source UFSDA workflow modules +. "${HOMEgfs}/ush/load_ufsda_modules.sh" +status=$? +[[ ${status} -ne 0 ]] && exit "${status}" + +export job="landanlrun" +export jobid="${job}.$$" + +############################################################### +# Execute the JJOB +"${HOMEgfs}/jobs/JGLOBAL_LAND_ANALYSIS_RUN" +status=$? +exit "${status}" diff --git a/parm/config/config.base.emc.dyn b/parm/config/config.base.emc.dyn index 96705ac6bd..952cf47360 100644 --- a/parm/config/config.base.emc.dyn +++ b/parm/config/config.base.emc.dyn @@ -157,6 +157,7 @@ export DO_WAVE="NO" export DO_OCN="NO" export DO_ICE="NO" export DO_AERO="NO" +export DO_LAND="NO" export CCPP_SUITE="@CCPP_SUITE@" export WAVE_CDUMP="" # When to include wave suite: gdas, gfs, or both export DOBNDPNT_WAVE="NO" @@ -184,6 +185,10 @@ case "${APP}" in ATM) export confignamevarfornems="atm" ;; + ATML) + export DO_LAND="YES" + export confignamevarfornems="atm_land" + ;; ATMA) export DO_AERO="YES" export confignamevarfornems="atm_aero" diff --git a/parm/config/config.landanl b/parm/config/config.landanl new file mode 100755 index 0000000000..3d7ed5d93e --- /dev/null +++ b/parm/config/config.landanl @@ -0,0 +1,20 @@ +#!/bin/bash -x + +########## config.landanl ########## +# configuration common to all land analysis tasks + +echo "BEGIN: config.landanl" + +export OBS_YAML_DIR=${HOMEgfs}/sorc/gdas.cd/parm/land/obs/config/ +export OBS_LIST=${HOMEgfs}/sorc/gdas.cd/parm/land/obs/lists/gdas_land_prototype.yaml +export LANDVARYAML=${HOMEgfs}/sorc/gdas.cd/parm/land/letkfoi/letkfoi.yaml +##export STATICB_TYPE="identity" +##export BERROR_YAML=${HOMEgfs}/sorc/gdas.cd/parm/atm/berror/staticb_${STATICB_TYPE}.yaml +export FV3JEDI_FIX=${HOMEgfs}/fix/gdas + +export io_layout_x=@IO_LAYOUT_X@ +export io_layout_y=@IO_LAYOUT_Y@ + +export JEDIVAREXE=${HOMEgfs}/exec/fv3jedi_letkf.x + +echo "END: config.landanl" diff --git a/parm/config/config.landanlfinal b/parm/config/config.landanlfinal new file mode 100755 index 0000000000..a5439fbbe0 --- /dev/null +++ b/parm/config/config.landanlfinal @@ -0,0 +1,10 @@ +#!/bin/bash -x + +########## config.landanlfinal ########## +# Post Land Analysis specific + +echo "BEGIN: config.landanlfinal" + +# Get task specific resources +. ${EXPDIR}/config.resources landanlfinal +echo "END: config.landanlfinal" diff --git a/parm/config/config.landanlinit b/parm/config/config.landanlinit new file mode 100755 index 0000000000..acef0c2614 --- /dev/null +++ b/parm/config/config.landanlinit @@ -0,0 +1,10 @@ +#!/bin/bash -x + +########## config.landanlinit ########## +# Pre Land Analysis specific + +echo "BEGIN: config.landanlinit" + +# Get task specific resources +. ${EXPDIR}/config.resources landanlinit +echo "END: config.landanlinit" diff --git a/parm/config/config.landanlrun b/parm/config/config.landanlrun new file mode 100755 index 0000000000..b85558cfd7 --- /dev/null +++ b/parm/config/config.landanlrun @@ -0,0 +1,11 @@ +#!/bin/bash -x + +########## config.landanlrun ########## +# Land Analysis specific + +echo "BEGIN: config.landanlrun" + +# Get task specific resources +. ${EXPDIR}/config.resources landanlrun + +echo "END: config.landanlrun" diff --git a/parm/config/config.resources b/parm/config/config.resources index c6418c4423..91abe99d53 100644 --- a/parm/config/config.resources +++ b/parm/config/config.resources @@ -11,6 +11,7 @@ if [ $# -ne 1 ]; then echo "getic init coupled_ic aerosol_init" echo "atmanalprep atmanalrun atmanalpost" echo "atmensanalprep atmensanalrun atmensanalpost" + echo "landanlinit landanlrun landanlfinal" echo "aeroanlinit aeroanlrun aeroanlfinal" echo "anal sfcanl analcalc analdiag gldas fcst post vrfy metp arch echgres" echo "eobs ediag eomg eupd ecen esfc efcs epos earc" @@ -191,6 +192,80 @@ elif [[ "${step}" = "atmanalpost" ]]; then export npe_node_atmanalpost export is_exclusive=True +elif [[ "${step}" = "landanlinit" ]]; then + + # below lines are for creating JEDI YAML + case ${CASE} in + C768) + layout_x=6 + layout_y=6 + ;; + C384) + layout_x=5 + layout_y=5 + ;; + C192 | C96 | C48) + layout_x=8 + layout_y=8 + ;; + *) + echo "FATAL ERROR: Resolution not supported for land analysis'" + exit 1 + esac + + export layout_x + export layout_y + + export wtime_landanlinit="00:10:00" + export npe_landanlinit=1 + export nth_landanlinit=1 + npe_node_landanlinit=$(echo "${npe_node_max} / ${nth_landanlinit}" | bc) + export npe_node_landanlinit + export memory_landanlinit="3072M" + +elif [[ "${step}" = "landanlrun" ]]; then + + case ${CASE} in + C768) + layout_x=6 + layout_y=6 + ;; + C384) + layout_x=5 + layout_y=5 + ;; + C192 | C96 | C48) + layout_x=8 + layout_y=8 + ;; + *) + echo "FATAL: Resolution not supported'" + exit 1 + esac + + export layout_x + export layout_y + + export wtime_landanlrun="00:30:00" + npe_landanlrun=$(echo "${layout_x} * ${layout_y} * 6" | bc) + export npe_landanlrun + npe_landanlrun_gfs=$(echo "${layout_x} * ${layout_y} * 6" | bc) + export npe_landanlrun_gfs + export nth_landanlrun=1 + export nth_landanlrun_gfs=1 + npe_node_landanlrun=$(echo "${npe_node_max} / ${nth_landanlrun}" | bc) + export npe_node_landanlrun + export is_exclusive=True + +elif [[ "${step}" = "landanlfinal" ]]; then + + export wtime_landanlfinal="00:10:00" + export npe_landanlfinal=1 + export nth_landanlfinal=1 + npe_node_landanlfinal=$(echo "${npe_node_max} / ${nth_landanlfinal}" | bc) + export npe_node_landanlfinal + export memory_landanlfinal="3072M" + elif [[ "${step}" = "aeroanlinit" ]]; then # below lines are for creating JEDI YAML diff --git a/parm/config/yaml/defaults.yaml b/parm/config/yaml/defaults.yaml index 8289974668..4c3817ef01 100644 --- a/parm/config/yaml/defaults.yaml +++ b/parm/config/yaml/defaults.yaml @@ -2,6 +2,10 @@ aeroanl: IO_LAYOUT_X: 1 IO_LAYOUT_Y: 1 +landanl: + IO_LAYOUT_X: 1 + IO_LAYOUT_Y: 1 + ocnanal: SOCA_INPUT_FIX_DIR: '/scratch2/NCEPDEV/ocean/Guillaume.Vernieres/data/static/72x35x25' CASE_ANL: 'C48' From 3e6a3a5e3eb0bd2729d4b2d78b5e567265aececc Mon Sep 17 00:00:00 2001 From: Jiarui Dong Date: Wed, 1 Mar 2023 08:07:45 -0500 Subject: [PATCH 02/27] Fix shellcheck error. --- jobs/JGLOBAL_LAND_ANALYSIS_INITIALIZE | 2 +- parm/config/config.landanlfinal | 2 +- parm/config/config.landanlinit | 2 +- parm/config/config.landanlrun | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/jobs/JGLOBAL_LAND_ANALYSIS_INITIALIZE b/jobs/JGLOBAL_LAND_ANALYSIS_INITIALIZE index 196548603d..b67d216e6c 100755 --- a/jobs/JGLOBAL_LAND_ANALYSIS_INITIALIZE +++ b/jobs/JGLOBAL_LAND_ANALYSIS_INITIALIZE @@ -27,7 +27,7 @@ export APREFIX="${CDUMP}.t${cyc}z." export COMOUT=${COMOUT:-${ROTDIR}/${CDUMP}.${PDY}/${cyc}/${COMPONENT}} -mkdir -p ${COMOUT} +mkdir -p "${COMOUT}" # COMIN_GES and COMIN_GES_ENS are used in script export COMIN_GES="${ROTDIR}/${GDUMP}.${gPDY}/${gcyc}/${COMPONENT}" diff --git a/parm/config/config.landanlfinal b/parm/config/config.landanlfinal index a5439fbbe0..2970f1e097 100755 --- a/parm/config/config.landanlfinal +++ b/parm/config/config.landanlfinal @@ -6,5 +6,5 @@ echo "BEGIN: config.landanlfinal" # Get task specific resources -. ${EXPDIR}/config.resources landanlfinal +. "${EXPDIR}/config.resources" landanlfinal echo "END: config.landanlfinal" diff --git a/parm/config/config.landanlinit b/parm/config/config.landanlinit index acef0c2614..721179284d 100755 --- a/parm/config/config.landanlinit +++ b/parm/config/config.landanlinit @@ -6,5 +6,5 @@ echo "BEGIN: config.landanlinit" # Get task specific resources -. ${EXPDIR}/config.resources landanlinit +. "${EXPDIR}/config.resources" landanlinit echo "END: config.landanlinit" diff --git a/parm/config/config.landanlrun b/parm/config/config.landanlrun index b85558cfd7..280e96953f 100755 --- a/parm/config/config.landanlrun +++ b/parm/config/config.landanlrun @@ -6,6 +6,6 @@ echo "BEGIN: config.landanlrun" # Get task specific resources -. ${EXPDIR}/config.resources landanlrun +. "${EXPDIR}/config.resources" landanlrun echo "END: config.landanlrun" From da71eba971e8038cc27ce49be6ddee4b7d4c7052 Mon Sep 17 00:00:00 2001 From: Jiarui Dong Date: Thu, 2 Mar 2023 05:16:00 -0500 Subject: [PATCH 03/27] Address the reviwer's comments. --- jobs/JGLOBAL_LAND_ANALYSIS_FINALIZE | 8 +++----- parm/config/config.resources | 8 ++++---- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/jobs/JGLOBAL_LAND_ANALYSIS_FINALIZE b/jobs/JGLOBAL_LAND_ANALYSIS_FINALIZE index 02bd766e73..1cee029930 100755 --- a/jobs/JGLOBAL_LAND_ANALYSIS_FINALIZE +++ b/jobs/JGLOBAL_LAND_ANALYSIS_FINALIZE @@ -10,8 +10,6 @@ source "${HOMEgfs}/ush/jjob_header.sh" -e "landanlfinal" -c "base landanl landan ############################################## export CDATE=${CDATE:-${PDY}${cyc}} export CDUMP=${CDUMP:-${RUN:-"gfs"}} -export COMPONENT="atmos" - ############################################## # Begin JOB SPECIFIC work @@ -27,13 +25,13 @@ export OPREFIX="${CDUMP}.t${cyc}z." export GPREFIX="${GDUMP}.t${gcyc}z." export APREFIX="${CDUMP}.t${cyc}z." -export COMOUT=${COMOUT:-${ROTDIR}/${CDUMP}.${PDY}/${cyc}/${COMPONENT}} +export COMOUT=${COMOUT:-${ROTDIR}/${CDUMP}.${PDY}/${cyc}/atmos} mkdir -p "${COMOUT}" # COMIN_GES and COMIN_GES_ENS are used in script -export COMIN_GES="${ROTDIR}/${GDUMP}.${gPDY}/${gcyc}/${COMPONENT}" -export COMIN_GES_ENS="${ROTDIR}/enkf${GDUMP}.${gPDY}/${gcyc}/${COMPONENT}" +export COMIN_GES="${ROTDIR}/${GDUMP}.${gPDY}/${gcyc}/atmos" +export COMIN_GES_ENS="${ROTDIR}/enkf${GDUMP}.${gPDY}/${gcyc}/atmos" ############################################################### # Run relevant script diff --git a/parm/config/config.resources b/parm/config/config.resources index 91abe99d53..54b222d79c 100644 --- a/parm/config/config.resources +++ b/parm/config/config.resources @@ -205,8 +205,8 @@ elif [[ "${step}" = "landanlinit" ]]; then layout_y=5 ;; C192 | C96 | C48) - layout_x=8 - layout_y=8 + layout_x=1 + layout_y=1 ;; *) echo "FATAL ERROR: Resolution not supported for land analysis'" @@ -235,8 +235,8 @@ elif [[ "${step}" = "landanlrun" ]]; then layout_y=5 ;; C192 | C96 | C48) - layout_x=8 - layout_y=8 + layout_x=1 + layout_y=1 ;; *) echo "FATAL: Resolution not supported'" From 67cfc2370235f4c4a989d88debe22febaefc841e Mon Sep 17 00:00:00 2001 From: Jiarui Dong Date: Fri, 3 Mar 2023 09:23:47 -0500 Subject: [PATCH 04/27] Remove "COMPONENT" and replaced with hard-coded "land". --- jobs/JGLOBAL_LAND_ANALYSIS_FINALIZE | 6 +++--- jobs/JGLOBAL_LAND_ANALYSIS_INITIALIZE | 7 +++---- jobs/JGLOBAL_LAND_ANALYSIS_RUN | 8 +++----- parm/config/config.base.emc.dyn | 2 ++ 4 files changed, 11 insertions(+), 12 deletions(-) diff --git a/jobs/JGLOBAL_LAND_ANALYSIS_FINALIZE b/jobs/JGLOBAL_LAND_ANALYSIS_FINALIZE index 1cee029930..ca751b03ee 100755 --- a/jobs/JGLOBAL_LAND_ANALYSIS_FINALIZE +++ b/jobs/JGLOBAL_LAND_ANALYSIS_FINALIZE @@ -25,13 +25,13 @@ export OPREFIX="${CDUMP}.t${cyc}z." export GPREFIX="${GDUMP}.t${gcyc}z." export APREFIX="${CDUMP}.t${cyc}z." -export COMOUT=${COMOUT:-${ROTDIR}/${CDUMP}.${PDY}/${cyc}/atmos} +export COMOUT=${COMOUT:-${ROTDIR}/${CDUMP}.${PDY}/${cyc}/land} mkdir -p "${COMOUT}" # COMIN_GES and COMIN_GES_ENS are used in script -export COMIN_GES="${ROTDIR}/${GDUMP}.${gPDY}/${gcyc}/atmos" -export COMIN_GES_ENS="${ROTDIR}/enkf${GDUMP}.${gPDY}/${gcyc}/atmos" +export COMIN_GES="${ROTDIR}/${GDUMP}.${gPDY}/${gcyc}/land" +export COMIN_GES_ENS="${ROTDIR}/enkf${GDUMP}.${gPDY}/${gcyc}/land" ############################################################### # Run relevant script diff --git a/jobs/JGLOBAL_LAND_ANALYSIS_INITIALIZE b/jobs/JGLOBAL_LAND_ANALYSIS_INITIALIZE index b67d216e6c..966948c682 100755 --- a/jobs/JGLOBAL_LAND_ANALYSIS_INITIALIZE +++ b/jobs/JGLOBAL_LAND_ANALYSIS_INITIALIZE @@ -9,7 +9,6 @@ source "${HOMEgfs}/ush/jjob_header.sh" -e "landanlinit" -c "base landanl landanl ############################################## export CDATE=${CDATE:-${PDY}${cyc}} export CDUMP=${CDUMP:-${RUN:-"gfs"}} -export COMPONENT="atmos" ############################################## # Begin JOB SPECIFIC work @@ -25,13 +24,13 @@ export OPREFIX="${CDUMP}.t${cyc}z." export GPREFIX="${GDUMP}.t${gcyc}z." export APREFIX="${CDUMP}.t${cyc}z." -export COMOUT=${COMOUT:-${ROTDIR}/${CDUMP}.${PDY}/${cyc}/${COMPONENT}} +export COMOUT=${COMOUT:-${ROTDIR}/${CDUMP}.${PDY}/${cyc}/land} mkdir -p "${COMOUT}" # COMIN_GES and COMIN_GES_ENS are used in script -export COMIN_GES="${ROTDIR}/${GDUMP}.${gPDY}/${gcyc}/${COMPONENT}" -export COMIN_GES_ENS="${ROTDIR}/enkf${GDUMP}.${gPDY}/${gcyc}/${COMPONENT}" +export COMIN_GES="${ROTDIR}/${GDUMP}.${gPDY}/${gcyc}/land" +export COMIN_GES_ENS="${ROTDIR}/enkf${GDUMP}.${gPDY}/${gcyc}/land" # Add UFSDA to PYTHONPATH export PYTHONPATH=${HOMEgfs}/sorc/gdas.cd/ush/:${PYTHONPATH} diff --git a/jobs/JGLOBAL_LAND_ANALYSIS_RUN b/jobs/JGLOBAL_LAND_ANALYSIS_RUN index 51e84f3182..59e0635818 100755 --- a/jobs/JGLOBAL_LAND_ANALYSIS_RUN +++ b/jobs/JGLOBAL_LAND_ANALYSIS_RUN @@ -10,8 +10,6 @@ source "${HOMEgfs}/ush/jjob_header.sh" -e "landanlrun" -c "base landanl landanlr ############################################## export CDATE=${CDATE:-${PDY}${cyc}} export CDUMP=${CDUMP:-${RUN:-"gfs"}} -export COMPONENT="atmos" - ############################################## # Begin JOB SPECIFIC work @@ -27,13 +25,13 @@ export OPREFIX="${CDUMP}.t${cyc}z." export GPREFIX="${GDUMP}.t${gcyc}z." export APREFIX="${CDUMP}.t${cyc}z." -export COMOUT=${COMOUT:-${ROTDIR}/${CDUMP}.${PDY}/${cyc}/${COMPONENT}} +export COMOUT=${COMOUT:-${ROTDIR}/${CDUMP}.${PDY}/${cyc}/land} mkdir -p "${COMOUT}" # COMIN_GES and COMIN_GES_ENS are used in script -export COMIN_GES="${ROTDIR}/${GDUMP}.${gPDY}/${gcyc}/${COMPONENT}" -export COMIN_GES_ENS="${ROTDIR}/enkf${GDUMP}.${gPDY}/${gcyc}/${COMPONENT}" +export COMIN_GES="${ROTDIR}/${GDUMP}.${gPDY}/${gcyc}/land" +export COMIN_GES_ENS="${ROTDIR}/enkf${GDUMP}.${gPDY}/${gcyc}/land" ############################################################### # Run relevant script diff --git a/parm/config/config.base.emc.dyn b/parm/config/config.base.emc.dyn index 952cf47360..ee1905b57a 100644 --- a/parm/config/config.base.emc.dyn +++ b/parm/config/config.base.emc.dyn @@ -132,6 +132,8 @@ export COMINice=${ROTDIR}/${CDUMP}.${PDY}/${cyc}/ice export COMOUTice=${ROTDIR}/${CDUMP}.${PDY}/${cyc}/ice export COMINaero=${ROTDIR}/${CDUMP}.${PDY}/${cyc}/chem export COMOUTaero=${ROTDIR}/${CDUMP}.${PDY}/${cyc}/chem +export COMINland=${ROTDIR}/${CDUMP}.${PDY}/${cyc}/land +export COMOUTland=${ROTDIR}/${CDUMP}.${PDY}/${cyc}/land export ERRSCRIPT=${ERRSCRIPT:-'eval [[ $err = 0 ]]'} export LOGSCRIPT=${LOGSCRIPT:-""} From 70c0b79a9b117e75bfe9b9bc34fe748a0afc9255 Mon Sep 17 00:00:00 2001 From: Jiarui Dong Date: Fri, 3 Mar 2023 18:58:50 -0500 Subject: [PATCH 05/27] Revert back to use atmos/ for land component. --- jobs/JGLOBAL_LAND_ANALYSIS_FINALIZE | 6 +++--- jobs/JGLOBAL_LAND_ANALYSIS_INITIALIZE | 6 +++--- jobs/JGLOBAL_LAND_ANALYSIS_RUN | 6 +++--- parm/config/config.base.emc.dyn | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/jobs/JGLOBAL_LAND_ANALYSIS_FINALIZE b/jobs/JGLOBAL_LAND_ANALYSIS_FINALIZE index ca751b03ee..1cee029930 100755 --- a/jobs/JGLOBAL_LAND_ANALYSIS_FINALIZE +++ b/jobs/JGLOBAL_LAND_ANALYSIS_FINALIZE @@ -25,13 +25,13 @@ export OPREFIX="${CDUMP}.t${cyc}z." export GPREFIX="${GDUMP}.t${gcyc}z." export APREFIX="${CDUMP}.t${cyc}z." -export COMOUT=${COMOUT:-${ROTDIR}/${CDUMP}.${PDY}/${cyc}/land} +export COMOUT=${COMOUT:-${ROTDIR}/${CDUMP}.${PDY}/${cyc}/atmos} mkdir -p "${COMOUT}" # COMIN_GES and COMIN_GES_ENS are used in script -export COMIN_GES="${ROTDIR}/${GDUMP}.${gPDY}/${gcyc}/land" -export COMIN_GES_ENS="${ROTDIR}/enkf${GDUMP}.${gPDY}/${gcyc}/land" +export COMIN_GES="${ROTDIR}/${GDUMP}.${gPDY}/${gcyc}/atmos" +export COMIN_GES_ENS="${ROTDIR}/enkf${GDUMP}.${gPDY}/${gcyc}/atmos" ############################################################### # Run relevant script diff --git a/jobs/JGLOBAL_LAND_ANALYSIS_INITIALIZE b/jobs/JGLOBAL_LAND_ANALYSIS_INITIALIZE index 966948c682..5a66da0378 100755 --- a/jobs/JGLOBAL_LAND_ANALYSIS_INITIALIZE +++ b/jobs/JGLOBAL_LAND_ANALYSIS_INITIALIZE @@ -24,13 +24,13 @@ export OPREFIX="${CDUMP}.t${cyc}z." export GPREFIX="${GDUMP}.t${gcyc}z." export APREFIX="${CDUMP}.t${cyc}z." -export COMOUT=${COMOUT:-${ROTDIR}/${CDUMP}.${PDY}/${cyc}/land} +export COMOUT=${COMOUT:-${ROTDIR}/${CDUMP}.${PDY}/${cyc}/atmos} mkdir -p "${COMOUT}" # COMIN_GES and COMIN_GES_ENS are used in script -export COMIN_GES="${ROTDIR}/${GDUMP}.${gPDY}/${gcyc}/land" -export COMIN_GES_ENS="${ROTDIR}/enkf${GDUMP}.${gPDY}/${gcyc}/land" +export COMIN_GES="${ROTDIR}/${GDUMP}.${gPDY}/${gcyc}/atmos" +export COMIN_GES_ENS="${ROTDIR}/enkf${GDUMP}.${gPDY}/${gcyc}/atmos" # Add UFSDA to PYTHONPATH export PYTHONPATH=${HOMEgfs}/sorc/gdas.cd/ush/:${PYTHONPATH} diff --git a/jobs/JGLOBAL_LAND_ANALYSIS_RUN b/jobs/JGLOBAL_LAND_ANALYSIS_RUN index 59e0635818..90bf149f61 100755 --- a/jobs/JGLOBAL_LAND_ANALYSIS_RUN +++ b/jobs/JGLOBAL_LAND_ANALYSIS_RUN @@ -25,13 +25,13 @@ export OPREFIX="${CDUMP}.t${cyc}z." export GPREFIX="${GDUMP}.t${gcyc}z." export APREFIX="${CDUMP}.t${cyc}z." -export COMOUT=${COMOUT:-${ROTDIR}/${CDUMP}.${PDY}/${cyc}/land} +export COMOUT=${COMOUT:-${ROTDIR}/${CDUMP}.${PDY}/${cyc}/atmos} mkdir -p "${COMOUT}" # COMIN_GES and COMIN_GES_ENS are used in script -export COMIN_GES="${ROTDIR}/${GDUMP}.${gPDY}/${gcyc}/land" -export COMIN_GES_ENS="${ROTDIR}/enkf${GDUMP}.${gPDY}/${gcyc}/land" +export COMIN_GES="${ROTDIR}/${GDUMP}.${gPDY}/${gcyc}/atmos" +export COMIN_GES_ENS="${ROTDIR}/enkf${GDUMP}.${gPDY}/${gcyc}/atmos" ############################################################### # Run relevant script diff --git a/parm/config/config.base.emc.dyn b/parm/config/config.base.emc.dyn index 00c4c1383f..52d43502a9 100644 --- a/parm/config/config.base.emc.dyn +++ b/parm/config/config.base.emc.dyn @@ -132,8 +132,8 @@ export COMINice=${ROTDIR}/${CDUMP}.${PDY}/${cyc}/ice export COMOUTice=${ROTDIR}/${CDUMP}.${PDY}/${cyc}/ice export COMINaero=${ROTDIR}/${CDUMP}.${PDY}/${cyc}/chem export COMOUTaero=${ROTDIR}/${CDUMP}.${PDY}/${cyc}/chem -export COMINland=${ROTDIR}/${CDUMP}.${PDY}/${cyc}/land -export COMOUTland=${ROTDIR}/${CDUMP}.${PDY}/${cyc}/land +export COMINland=${ROTDIR}/${CDUMP}.${PDY}/${cyc}/atmos +export COMOUTland=${ROTDIR}/${CDUMP}.${PDY}/${cyc}/atmos export ERRSCRIPT=${ERRSCRIPT:-'eval [[ $err = 0 ]]'} export LOGSCRIPT=${LOGSCRIPT:-""} From a89b2802c95a6345c6bd3366bb36127bc9329178 Mon Sep 17 00:00:00 2001 From: Jiarui Dong Date: Sat, 4 Mar 2023 10:23:36 -0500 Subject: [PATCH 06/27] Address the reviewer's questions. --- parm/config/config.resources | 76 ++++++++++++++++++------------------ 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/parm/config/config.resources b/parm/config/config.resources index 032c416c8a..c299b9ef86 100644 --- a/parm/config/config.resources +++ b/parm/config/config.resources @@ -200,7 +200,7 @@ elif [[ "${step}" = "landanlinit" ]]; then layout_x=6 layout_y=6 ;; - C384) + C384) layout_x=5 layout_y=5 ;; @@ -208,20 +208,20 @@ elif [[ "${step}" = "landanlinit" ]]; then layout_x=1 layout_y=1 ;; - *) - echo "FATAL ERROR: Resolution not supported for land analysis'" - exit 1 - esac + *) + echo "FATAL ERROR: Resolution not supported for land analysis'" + exit 1 + esac - export layout_x - export layout_y + export layout_x + export layout_y - export wtime_landanlinit="00:10:00" - export npe_landanlinit=1 - export nth_landanlinit=1 - npe_node_landanlinit=$(echo "${npe_node_max} / ${nth_landanlinit}" | bc) - export npe_node_landanlinit - export memory_landanlinit="3072M" + export wtime_landanlinit="00:10:00" + export npe_landanlinit=1 + export nth_landanlinit=1 + npe_node_landanlinit=$(echo "${npe_node_max} / ${nth_landanlinit}" | bc) + export npe_node_landanlinit + export memory_landanlinit="3072M" elif [[ "${step}" = "landanlrun" ]]; then @@ -230,7 +230,7 @@ elif [[ "${step}" = "landanlrun" ]]; then layout_x=6 layout_y=6 ;; - C384) + C384) layout_x=5 layout_y=5 ;; @@ -238,33 +238,33 @@ elif [[ "${step}" = "landanlrun" ]]; then layout_x=1 layout_y=1 ;; - *) - echo "FATAL: Resolution not supported'" - exit 1 - esac - - export layout_x - export layout_y - - export wtime_landanlrun="00:30:00" - npe_landanlrun=$(echo "${layout_x} * ${layout_y} * 6" | bc) - export npe_landanlrun - npe_landanlrun_gfs=$(echo "${layout_x} * ${layout_y} * 6" | bc) - export npe_landanlrun_gfs - export nth_landanlrun=1 - export nth_landanlrun_gfs=1 - npe_node_landanlrun=$(echo "${npe_node_max} / ${nth_landanlrun}" | bc) - export npe_node_landanlrun - export is_exclusive=True + *) + echo "FATAL: Resolution not supported'" + exit 1 + esac + + export layout_x + export layout_y + + export wtime_landanlrun="00:30:00" + npe_landanlrun=$(echo "${layout_x} * ${layout_y} * 6" | bc) + export npe_landanlrun + npe_landanlrun_gfs=$(echo "${layout_x} * ${layout_y} * 6" | bc) + export npe_landanlrun_gfs + export nth_landanlrun=1 + export nth_landanlrun_gfs=1 + npe_node_landanlrun=$(echo "${npe_node_max} / ${nth_landanlrun}" | bc) + export npe_node_landanlrun + export is_exclusive=True elif [[ "${step}" = "landanlfinal" ]]; then - export wtime_landanlfinal="00:10:00" - export npe_landanlfinal=1 - export nth_landanlfinal=1 - npe_node_landanlfinal=$(echo "${npe_node_max} / ${nth_landanlfinal}" | bc) - export npe_node_landanlfinal - export memory_landanlfinal="3072M" + export wtime_landanlfinal="00:10:00" + export npe_landanlfinal=1 + export nth_landanlfinal=1 + npe_node_landanlfinal=$(echo "${npe_node_max} / ${nth_landanlfinal}" | bc) + export npe_node_landanlfinal + export memory_landanlfinal="3072M" elif [[ "${step}" = "aeroanlinit" ]]; then From 02108f54d754e3dee4a3a15dac56882f4aa4aad7 Mon Sep 17 00:00:00 2001 From: Jiarui Dong Date: Mon, 6 Mar 2023 17:30:24 -0500 Subject: [PATCH 07/27] Address the reviewer's comments. --- jobs/JGLOBAL_LAND_ANALYSIS_INITIALIZE | 4 +--- parm/config/config.base.emc.dyn | 2 -- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/jobs/JGLOBAL_LAND_ANALYSIS_INITIALIZE b/jobs/JGLOBAL_LAND_ANALYSIS_INITIALIZE index 5a66da0378..6f93c5bf29 100755 --- a/jobs/JGLOBAL_LAND_ANALYSIS_INITIALIZE +++ b/jobs/JGLOBAL_LAND_ANALYSIS_INITIALIZE @@ -32,11 +32,9 @@ mkdir -p "${COMOUT}" export COMIN_GES="${ROTDIR}/${GDUMP}.${gPDY}/${gcyc}/atmos" export COMIN_GES_ENS="${ROTDIR}/enkf${GDUMP}.${gPDY}/${gcyc}/atmos" -# Add UFSDA to PYTHONPATH -export PYTHONPATH=${HOMEgfs}/sorc/gdas.cd/ush/:${PYTHONPATH} - ############################################################### # Run relevant script + EXSCRIPT=${GDASLANDINITPY:-${HOMEgfs}/scripts/exglobal_land_analysis_initialize.py} ${EXSCRIPT} status=$? diff --git a/parm/config/config.base.emc.dyn b/parm/config/config.base.emc.dyn index 52d43502a9..0dec0f3eb8 100644 --- a/parm/config/config.base.emc.dyn +++ b/parm/config/config.base.emc.dyn @@ -132,8 +132,6 @@ export COMINice=${ROTDIR}/${CDUMP}.${PDY}/${cyc}/ice export COMOUTice=${ROTDIR}/${CDUMP}.${PDY}/${cyc}/ice export COMINaero=${ROTDIR}/${CDUMP}.${PDY}/${cyc}/chem export COMOUTaero=${ROTDIR}/${CDUMP}.${PDY}/${cyc}/chem -export COMINland=${ROTDIR}/${CDUMP}.${PDY}/${cyc}/atmos -export COMOUTland=${ROTDIR}/${CDUMP}.${PDY}/${cyc}/atmos export ERRSCRIPT=${ERRSCRIPT:-'eval [[ $err = 0 ]]'} export LOGSCRIPT=${LOGSCRIPT:-""} From a951ffa35a5553651f5f8f82c73b27819ce9887f Mon Sep 17 00:00:00 2001 From: Jiarui Dong Date: Fri, 10 Mar 2023 15:37:53 -0500 Subject: [PATCH 08/27] Handle using different observations in different cycles. --- parm/config/config.landanl | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/parm/config/config.landanl b/parm/config/config.landanl index 3d7ed5d93e..2c948a6a17 100755 --- a/parm/config/config.landanl +++ b/parm/config/config.landanl @@ -5,11 +5,14 @@ echo "BEGIN: config.landanl" +obs_list_name=gdas_land_adpsfc_only.yaml +if [[ "${cyc}" == "18" ]]; then + obs_list_name=gdas_land_prototype.yaml +fi + export OBS_YAML_DIR=${HOMEgfs}/sorc/gdas.cd/parm/land/obs/config/ -export OBS_LIST=${HOMEgfs}/sorc/gdas.cd/parm/land/obs/lists/gdas_land_prototype.yaml +export OBS_LIST=${HOMEgfs}/sorc/gdas.cd/parm/land/obs/lists/${obs_list_name} export LANDVARYAML=${HOMEgfs}/sorc/gdas.cd/parm/land/letkfoi/letkfoi.yaml -##export STATICB_TYPE="identity" -##export BERROR_YAML=${HOMEgfs}/sorc/gdas.cd/parm/atm/berror/staticb_${STATICB_TYPE}.yaml export FV3JEDI_FIX=${HOMEgfs}/fix/gdas export io_layout_x=@IO_LAYOUT_X@ From 138bb8f46bec23b3134b52c51075f522157a14ff Mon Sep 17 00:00:00 2001 From: Jiarui Dong Date: Sat, 11 Mar 2023 18:28:55 -0500 Subject: [PATCH 09/27] Address the reviewer's comments. --- parm/config/config.resources | 42 ++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/parm/config/config.resources b/parm/config/config.resources index c299b9ef86..a17945ddd9 100644 --- a/parm/config/config.resources +++ b/parm/config/config.resources @@ -216,12 +216,12 @@ elif [[ "${step}" = "landanlinit" ]]; then export layout_x export layout_y - export wtime_landanlinit="00:10:00" - export npe_landanlinit=1 - export nth_landanlinit=1 - npe_node_landanlinit=$(echo "${npe_node_max} / ${nth_landanlinit}" | bc) - export npe_node_landanlinit - export memory_landanlinit="3072M" + declare -x wtime_${step}="00:10:00" + declare -x npe_${step}=1 + declare -x ${step}=1 + npe_node_${step}=$(echo "${npe_node_max} / ${nth_${step}}" | bc) + declare -x npe_node_${step} + declare -x memory_${step}="3072M" elif [[ "${step}" = "landanlrun" ]]; then @@ -246,25 +246,25 @@ elif [[ "${step}" = "landanlrun" ]]; then export layout_x export layout_y - export wtime_landanlrun="00:30:00" - npe_landanlrun=$(echo "${layout_x} * ${layout_y} * 6" | bc) - export npe_landanlrun - npe_landanlrun_gfs=$(echo "${layout_x} * ${layout_y} * 6" | bc) - export npe_landanlrun_gfs - export nth_landanlrun=1 - export nth_landanlrun_gfs=1 - npe_node_landanlrun=$(echo "${npe_node_max} / ${nth_landanlrun}" | bc) - export npe_node_landanlrun + declare -x wtime_${step}="00:30:00" + npe_${step}=$(echo "${layout_x} * ${layout_y} * 6" | bc) + declare -x npe_${step} + npe_${step}_gfs=$(echo "${layout_x} * ${layout_y} * 6" | bc) + declare -x npe_${step}_gfs + declare -x nth_${step}=1 + declare -x nth_${step}_gfs=1 + npe_node_${step}=$(echo "${npe_node_max} / ${nth_${step}}" | bc) + declare -x npe_node_${step} export is_exclusive=True elif [[ "${step}" = "landanlfinal" ]]; then - export wtime_landanlfinal="00:10:00" - export npe_landanlfinal=1 - export nth_landanlfinal=1 - npe_node_landanlfinal=$(echo "${npe_node_max} / ${nth_landanlfinal}" | bc) - export npe_node_landanlfinal - export memory_landanlfinal="3072M" + declare -x wtime_${step}="00:10:00" + declare -x npe_${step}=1 + declare -x nth_${step}=1 + npe_node_${step}=$(echo "${npe_node_max} / ${nth_${step}}" | bc) + declare -x npe_node_${step} + declare -x memory_${step}="3072M" elif [[ "${step}" = "aeroanlinit" ]]; then From c10af3d8b3c264b6380885ed47a31f16df2b60c3 Mon Sep 17 00:00:00 2001 From: Jiarui Dong Date: Sat, 11 Mar 2023 18:44:34 -0500 Subject: [PATCH 10/27] Fix shellcheck warning. --- parm/config/config.resources | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/parm/config/config.resources b/parm/config/config.resources index a17945ddd9..9f97489993 100644 --- a/parm/config/config.resources +++ b/parm/config/config.resources @@ -219,7 +219,7 @@ elif [[ "${step}" = "landanlinit" ]]; then declare -x wtime_${step}="00:10:00" declare -x npe_${step}=1 declare -x ${step}=1 - npe_node_${step}=$(echo "${npe_node_max} / ${nth_${step}}" | bc) + npe_node_landanlinit=$(echo "${npe_node_max} / ${nth_landanlinit}" | bc) declare -x npe_node_${step} declare -x memory_${step}="3072M" @@ -247,13 +247,13 @@ elif [[ "${step}" = "landanlrun" ]]; then export layout_y declare -x wtime_${step}="00:30:00" - npe_${step}=$(echo "${layout_x} * ${layout_y} * 6" | bc) + npe_landanlrun=$(echo "${layout_x} * ${layout_y} * 6" | bc) declare -x npe_${step} - npe_${step}_gfs=$(echo "${layout_x} * ${layout_y} * 6" | bc) + npe_landanlrun_gfs=$(echo "${layout_x} * ${layout_y} * 6" | bc) declare -x npe_${step}_gfs declare -x nth_${step}=1 declare -x nth_${step}_gfs=1 - npe_node_${step}=$(echo "${npe_node_max} / ${nth_${step}}" | bc) + npe_node_landanlrun=$(echo "${npe_node_max} / ${nth_landanlrun}" | bc) declare -x npe_node_${step} export is_exclusive=True @@ -262,7 +262,7 @@ elif [[ "${step}" = "landanlfinal" ]]; then declare -x wtime_${step}="00:10:00" declare -x npe_${step}=1 declare -x nth_${step}=1 - npe_node_${step}=$(echo "${npe_node_max} / ${nth_${step}}" | bc) + npe_node_landanlfinal=$(echo "${npe_node_max} / ${nth_landanlfinal}" | bc) declare -x npe_node_${step} declare -x memory_${step}="3072M" From ffa2e1cd397f0880446b2c811ff36d0e834a0901 Mon Sep 17 00:00:00 2001 From: Jiarui Dong Date: Sat, 11 Mar 2023 18:55:53 -0500 Subject: [PATCH 11/27] Fix the shellcheck errors. --- parm/config/config.resources | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/parm/config/config.resources b/parm/config/config.resources index 9f97489993..76e6c18906 100644 --- a/parm/config/config.resources +++ b/parm/config/config.resources @@ -220,7 +220,7 @@ elif [[ "${step}" = "landanlinit" ]]; then declare -x npe_${step}=1 declare -x ${step}=1 npe_node_landanlinit=$(echo "${npe_node_max} / ${nth_landanlinit}" | bc) - declare -x npe_node_${step} + export npe_node_landanlinit declare -x memory_${step}="3072M" elif [[ "${step}" = "landanlrun" ]]; then @@ -248,13 +248,13 @@ elif [[ "${step}" = "landanlrun" ]]; then declare -x wtime_${step}="00:30:00" npe_landanlrun=$(echo "${layout_x} * ${layout_y} * 6" | bc) - declare -x npe_${step} + export npe_landanlrun npe_landanlrun_gfs=$(echo "${layout_x} * ${layout_y} * 6" | bc) - declare -x npe_${step}_gfs + export npe_landanlrun_gfs declare -x nth_${step}=1 declare -x nth_${step}_gfs=1 npe_node_landanlrun=$(echo "${npe_node_max} / ${nth_landanlrun}" | bc) - declare -x npe_node_${step} + export npe_node_landanlrun export is_exclusive=True elif [[ "${step}" = "landanlfinal" ]]; then @@ -263,7 +263,7 @@ elif [[ "${step}" = "landanlfinal" ]]; then declare -x npe_${step}=1 declare -x nth_${step}=1 npe_node_landanlfinal=$(echo "${npe_node_max} / ${nth_landanlfinal}" | bc) - declare -x npe_node_${step} + export npe_node_landanlfinal declare -x memory_${step}="3072M" elif [[ "${step}" = "aeroanlinit" ]]; then From ca947c7cb13bd136e5b7585a5a6b15db5acacb09 Mon Sep 17 00:00:00 2001 From: Jiarui Dong Date: Sat, 11 Mar 2023 19:10:16 -0500 Subject: [PATCH 12/27] Revert back. --- parm/config/config.resources | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/parm/config/config.resources b/parm/config/config.resources index 76e6c18906..c299b9ef86 100644 --- a/parm/config/config.resources +++ b/parm/config/config.resources @@ -216,12 +216,12 @@ elif [[ "${step}" = "landanlinit" ]]; then export layout_x export layout_y - declare -x wtime_${step}="00:10:00" - declare -x npe_${step}=1 - declare -x ${step}=1 + export wtime_landanlinit="00:10:00" + export npe_landanlinit=1 + export nth_landanlinit=1 npe_node_landanlinit=$(echo "${npe_node_max} / ${nth_landanlinit}" | bc) export npe_node_landanlinit - declare -x memory_${step}="3072M" + export memory_landanlinit="3072M" elif [[ "${step}" = "landanlrun" ]]; then @@ -246,25 +246,25 @@ elif [[ "${step}" = "landanlrun" ]]; then export layout_x export layout_y - declare -x wtime_${step}="00:30:00" + export wtime_landanlrun="00:30:00" npe_landanlrun=$(echo "${layout_x} * ${layout_y} * 6" | bc) export npe_landanlrun npe_landanlrun_gfs=$(echo "${layout_x} * ${layout_y} * 6" | bc) export npe_landanlrun_gfs - declare -x nth_${step}=1 - declare -x nth_${step}_gfs=1 + export nth_landanlrun=1 + export nth_landanlrun_gfs=1 npe_node_landanlrun=$(echo "${npe_node_max} / ${nth_landanlrun}" | bc) export npe_node_landanlrun export is_exclusive=True elif [[ "${step}" = "landanlfinal" ]]; then - declare -x wtime_${step}="00:10:00" - declare -x npe_${step}=1 - declare -x nth_${step}=1 + export wtime_landanlfinal="00:10:00" + export npe_landanlfinal=1 + export nth_landanlfinal=1 npe_node_landanlfinal=$(echo "${npe_node_max} / ${nth_landanlfinal}" | bc) export npe_node_landanlfinal - declare -x memory_${step}="3072M" + export memory_landanlfinal="3072M" elif [[ "${step}" = "aeroanlinit" ]]; then From 754ef8b1439d7bf5b9b688a42f8f308dbca133a2 Mon Sep 17 00:00:00 2001 From: Jiarui Dong Date: Sat, 11 Mar 2023 19:22:43 -0500 Subject: [PATCH 13/27] Try. --- parm/config/config.resources | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/parm/config/config.resources b/parm/config/config.resources index c299b9ef86..1f9796d7ec 100644 --- a/parm/config/config.resources +++ b/parm/config/config.resources @@ -216,9 +216,9 @@ elif [[ "${step}" = "landanlinit" ]]; then export layout_x export layout_y - export wtime_landanlinit="00:10:00" - export npe_landanlinit=1 - export nth_landanlinit=1 + declare -x wtime_${step}="00:10:00" + declare -x npe_${step}=1 + declare -x nth_${step}=1 npe_node_landanlinit=$(echo "${npe_node_max} / ${nth_landanlinit}" | bc) export npe_node_landanlinit export memory_landanlinit="3072M" From 4d20e8baef3201e44f9f91ddfbc25a578d566ef2 Mon Sep 17 00:00:00 2001 From: Jiarui Dong Date: Tue, 14 Mar 2023 17:33:29 -0400 Subject: [PATCH 14/27] Adress the reviewer's comments. --- parm/config/config.resources | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/parm/config/config.resources b/parm/config/config.resources index bb2cfec5c1..73106fd9f0 100644 --- a/parm/config/config.resources +++ b/parm/config/config.resources @@ -192,7 +192,7 @@ elif [[ "${step}" = "atmanalpost" ]]; then export npe_node_atmanalpost export is_exclusive=True -elif [[ "${step}" = "landanlinit" ]]; then +elif [[ "${step}" = "landanlinit" || "${step}" = "landanlfinal" ]]; then # below lines are for creating JEDI YAML case ${CASE} in @@ -219,9 +219,8 @@ elif [[ "${step}" = "landanlinit" ]]; then declare -x wtime_${step}="00:10:00" declare -x npe_${step}=1 declare -x nth_${step}=1 - npe_node_landanlinit=$(echo "${npe_node_max} / ${nth_landanlinit}" | bc) - export npe_node_landanlinit - export memory_landanlinit="3072M" + declare -x npe_node_${step}=$(echo "${npe_node_max} / ${nth_${step}}" | bc) + declare -x memory_${step}="3072M" elif [[ "${step}" = "landanlrun" ]]; then @@ -257,15 +256,6 @@ elif [[ "${step}" = "landanlrun" ]]; then export npe_node_landanlrun export is_exclusive=True -elif [[ "${step}" = "landanlfinal" ]]; then - - export wtime_landanlfinal="00:10:00" - export npe_landanlfinal=1 - export nth_landanlfinal=1 - npe_node_landanlfinal=$(echo "${npe_node_max} / ${nth_landanlfinal}" | bc) - export npe_node_landanlfinal - export memory_landanlfinal="3072M" - elif [[ "${step}" = "aeroanlinit" ]]; then # below lines are for creating JEDI YAML From 949b4c99a5d8baea0d914dfd57505b239f02620a Mon Sep 17 00:00:00 2001 From: Jiarui Dong Date: Tue, 14 Mar 2023 18:05:20 -0400 Subject: [PATCH 15/27] bugfix --- parm/config/config.resources | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/parm/config/config.resources b/parm/config/config.resources index 73106fd9f0..9961cad87f 100644 --- a/parm/config/config.resources +++ b/parm/config/config.resources @@ -219,7 +219,8 @@ elif [[ "${step}" = "landanlinit" || "${step}" = "landanlfinal" ]]; then declare -x wtime_${step}="00:10:00" declare -x npe_${step}=1 declare -x nth_${step}=1 - declare -x npe_node_${step}=$(echo "${npe_node_max} / ${nth_${step}}" | bc) + npe_node_step=$(echo "${npe_node_max} / ${nth_${step}}" | bc) + declare -a npe_node_step declare -x memory_${step}="3072M" elif [[ "${step}" = "landanlrun" ]]; then From 587fb867f120c986a7d386ce0c50a02b05d1d953 Mon Sep 17 00:00:00 2001 From: Jiarui Dong Date: Tue, 14 Mar 2023 18:27:38 -0400 Subject: [PATCH 16/27] bugfix2. --- parm/config/config.resources | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/parm/config/config.resources b/parm/config/config.resources index 9961cad87f..eab5c389d2 100644 --- a/parm/config/config.resources +++ b/parm/config/config.resources @@ -219,8 +219,9 @@ elif [[ "${step}" = "landanlinit" || "${step}" = "landanlfinal" ]]; then declare -x wtime_${step}="00:10:00" declare -x npe_${step}=1 declare -x nth_${step}=1 - npe_node_step=$(echo "${npe_node_max} / ${nth_${step}}" | bc) - declare -a npe_node_step + temp_landname="${npe_node_max} / ${nth_${step}}" +## npe_node_step=$(echo "${!temp_landname}" | bc) + declare -x npe_node_${step}=$(echo "${!temp_landname}" | bc) declare -x memory_${step}="3072M" elif [[ "${step}" = "landanlrun" ]]; then From f18d7dc8de7ed545c04a030632da81695b81569c Mon Sep 17 00:00:00 2001 From: Jiarui Dong Date: Tue, 14 Mar 2023 19:09:44 -0400 Subject: [PATCH 17/27] bugfix try. --- parm/config/config.resources | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/parm/config/config.resources b/parm/config/config.resources index eab5c389d2..ed0236b0eb 100644 --- a/parm/config/config.resources +++ b/parm/config/config.resources @@ -219,9 +219,9 @@ elif [[ "${step}" = "landanlinit" || "${step}" = "landanlfinal" ]]; then declare -x wtime_${step}="00:10:00" declare -x npe_${step}=1 declare -x nth_${step}=1 - temp_landname="${npe_node_max} / ${nth_${step}}" -## npe_node_step=$(echo "${!temp_landname}" | bc) - declare -x npe_node_${step}=$(echo "${!temp_landname}" | bc) + temp_landname1="nth_${step}" + temp_landname2="${npe_node_max} / ${!temp_landname1}" + declare -x npe_node_${step}=$(echo "${!temp_landname2}" | bc) declare -x memory_${step}="3072M" elif [[ "${step}" = "landanlrun" ]]; then From 25f832c83ba9e4227e5ad29977e9009aac18baf1 Mon Sep 17 00:00:00 2001 From: Jiarui Dong Date: Tue, 14 Mar 2023 19:19:15 -0400 Subject: [PATCH 18/27] Bugfix try. --- parm/config/config.resources | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/parm/config/config.resources b/parm/config/config.resources index ed0236b0eb..dd87f6197b 100644 --- a/parm/config/config.resources +++ b/parm/config/config.resources @@ -219,9 +219,10 @@ elif [[ "${step}" = "landanlinit" || "${step}" = "landanlfinal" ]]; then declare -x wtime_${step}="00:10:00" declare -x npe_${step}=1 declare -x nth_${step}=1 - temp_landname1="nth_${step}" - temp_landname2="${npe_node_max} / ${!temp_landname1}" - declare -x npe_node_${step}=$(echo "${!temp_landname2}" | bc) + temp_stepname="nth_${step}" +## temp_landname2="${npe_node_max} / ${!temp_landname1}" +## declare -x npe_node_${step}=$(echo "${!temp_landname2}" | bc) + declare -x npe_node_${step}=$(echo "${npe_node_max} / ${!temp_stepname}" | bc) declare -x memory_${step}="3072M" elif [[ "${step}" = "landanlrun" ]]; then From 186a2036564335d1e7263e853e82929981ed751d Mon Sep 17 00:00:00 2001 From: Jiarui Dong Date: Tue, 14 Mar 2023 19:32:42 -0400 Subject: [PATCH 19/27] Combine landanlinit and landanlfinal into a single block --- parm/config/config.resources | 2 -- 1 file changed, 2 deletions(-) diff --git a/parm/config/config.resources b/parm/config/config.resources index dd87f6197b..bd37e212b5 100644 --- a/parm/config/config.resources +++ b/parm/config/config.resources @@ -220,8 +220,6 @@ elif [[ "${step}" = "landanlinit" || "${step}" = "landanlfinal" ]]; then declare -x npe_${step}=1 declare -x nth_${step}=1 temp_stepname="nth_${step}" -## temp_landname2="${npe_node_max} / ${!temp_landname1}" -## declare -x npe_node_${step}=$(echo "${!temp_landname2}" | bc) declare -x npe_node_${step}=$(echo "${npe_node_max} / ${!temp_stepname}" | bc) declare -x memory_${step}="3072M" From e5fb5487c32a4c437cbfae611d1ff3866487d2fc Mon Sep 17 00:00:00 2001 From: Jiarui Dong Date: Wed, 29 Mar 2023 10:07:01 -0400 Subject: [PATCH 20/27] Modify the scripts to align with the aerosol analysis task. --- jobs/JGLOBAL_LAND_ANALYSIS_FINALIZE | 21 +++++---------------- jobs/JGLOBAL_LAND_ANALYSIS_INITIALIZE | 21 +++++---------------- jobs/JGLOBAL_LAND_ANALYSIS_RUN | 21 +++++---------------- jobs/rocoto/landanlrun.sh | 6 ++++++ 4 files changed, 21 insertions(+), 48 deletions(-) diff --git a/jobs/JGLOBAL_LAND_ANALYSIS_FINALIZE b/jobs/JGLOBAL_LAND_ANALYSIS_FINALIZE index 1cee029930..ec10e1fbb0 100755 --- a/jobs/JGLOBAL_LAND_ANALYSIS_FINALIZE +++ b/jobs/JGLOBAL_LAND_ANALYSIS_FINALIZE @@ -8,30 +8,19 @@ source "${HOMEgfs}/ush/jjob_header.sh" -e "landanlfinal" -c "base landanl landan ############################################## # Set variables used in the script ############################################## -export CDATE=${CDATE:-${PDY}${cyc}} -export CDUMP=${CDUMP:-${RUN:-"gfs"}} +GDATE=$(date +%Y%m%d%H -d "${PDY} ${cyc} - ${assim_freq} hours") +GDUMP="gdas" ############################################## # Begin JOB SPECIFIC work ############################################## -GDATE=$(date +%Y%m%d%H -d "${CDATE:0:8} ${CDATE:8:2} - ${assim_freq} hours") -export GDATE -gPDY=${GDATE:0:8} -export gcyc=${GDATE:8:2} -export GDUMP=${GDUMP:-"gdas"} - -export OPREFIX="${CDUMP}.t${cyc}z." -export GPREFIX="${GDUMP}.t${gcyc}z." -export APREFIX="${CDUMP}.t${cyc}z." - -export COMOUT=${COMOUT:-${ROTDIR}/${CDUMP}.${PDY}/${cyc}/atmos} - +export COMOUT=${COMOUT:-${ROTDIR}/${RUN}.${PDY}/${cyc}/atmos} mkdir -p "${COMOUT}" # COMIN_GES and COMIN_GES_ENS are used in script -export COMIN_GES="${ROTDIR}/${GDUMP}.${gPDY}/${gcyc}/atmos" -export COMIN_GES_ENS="${ROTDIR}/enkf${GDUMP}.${gPDY}/${gcyc}/atmos" +export COMIN_GES="${ROTDIR}/${GDUMP}.${GDATE:0:8}/${GDATE:8:2}/atmos" +export COMIN_GES_ENS="${ROTDIR}/enkf${GDUMP}.${GDATE:0:8}/${GDATE:8:2}/atmos" ############################################################### # Run relevant script diff --git a/jobs/JGLOBAL_LAND_ANALYSIS_INITIALIZE b/jobs/JGLOBAL_LAND_ANALYSIS_INITIALIZE index 6f93c5bf29..5f71d58a00 100755 --- a/jobs/JGLOBAL_LAND_ANALYSIS_INITIALIZE +++ b/jobs/JGLOBAL_LAND_ANALYSIS_INITIALIZE @@ -7,30 +7,19 @@ source "${HOMEgfs}/ush/jjob_header.sh" -e "landanlinit" -c "base landanl landanl ############################################## # Set variables used in the script ############################################## -export CDATE=${CDATE:-${PDY}${cyc}} -export CDUMP=${CDUMP:-${RUN:-"gfs"}} +GDATE=$(date +%Y%m%d%H -d "${PDY} ${cyc} - ${assim_freq} hours") +GDUMP="gdas" ############################################## # Begin JOB SPECIFIC work ############################################## -GDATE=$(date +%Y%m%d%H -d "${CDATE:0:8} ${CDATE:8:2} - ${assim_freq} hours") -export GDATE -gPDY=${GDATE:0:8} -export gcyc=${GDATE:8:2} -export GDUMP=${GDUMP:-"gdas"} - -export OPREFIX="${CDUMP}.t${cyc}z." -export GPREFIX="${GDUMP}.t${gcyc}z." -export APREFIX="${CDUMP}.t${cyc}z." - -export COMOUT=${COMOUT:-${ROTDIR}/${CDUMP}.${PDY}/${cyc}/atmos} - +export COMOUT=${COMOUT:-${ROTDIR}/${RUN}.${PDY}/${cyc}/atmos} mkdir -p "${COMOUT}" # COMIN_GES and COMIN_GES_ENS are used in script -export COMIN_GES="${ROTDIR}/${GDUMP}.${gPDY}/${gcyc}/atmos" -export COMIN_GES_ENS="${ROTDIR}/enkf${GDUMP}.${gPDY}/${gcyc}/atmos" +export COMIN_GES="${ROTDIR}/${GDUMP}.${GDATE:0:8}/${GDATE:8:2}/atmos" +export COMIN_GES_ENS="${ROTDIR}/enkf${GDUMP}.${GDATE:0:8}/${GDATE:8:2}/atmos" ############################################################### # Run relevant script diff --git a/jobs/JGLOBAL_LAND_ANALYSIS_RUN b/jobs/JGLOBAL_LAND_ANALYSIS_RUN index 90bf149f61..d489b603f4 100755 --- a/jobs/JGLOBAL_LAND_ANALYSIS_RUN +++ b/jobs/JGLOBAL_LAND_ANALYSIS_RUN @@ -8,30 +8,19 @@ source "${HOMEgfs}/ush/jjob_header.sh" -e "landanlrun" -c "base landanl landanlr ############################################## # Set variables used in the script ############################################## -export CDATE=${CDATE:-${PDY}${cyc}} -export CDUMP=${CDUMP:-${RUN:-"gfs"}} +GDATE=$(date +%Y%m%d%H -d "${PDY} ${cyc} - ${assim_freq} hours") +GDUMP="gdas" ############################################## # Begin JOB SPECIFIC work ############################################## -GDATE=$(date +%Y%m%d%H -d "${CDATE:0:8} ${CDATE:8:2} - ${assim_freq} hours") -export GDATE -gPDY=${GDATE:0:8} -export gcyc=${GDATE:8:2} -export GDUMP=${GDUMP:-"gdas"} - -export OPREFIX="${CDUMP}.t${cyc}z." -export GPREFIX="${GDUMP}.t${gcyc}z." -export APREFIX="${CDUMP}.t${cyc}z." - -export COMOUT=${COMOUT:-${ROTDIR}/${CDUMP}.${PDY}/${cyc}/atmos} - +export COMOUT=${COMOUT:-${ROTDIR}/${RUN}.${PDY}/${cyc}/atmos} mkdir -p "${COMOUT}" # COMIN_GES and COMIN_GES_ENS are used in script -export COMIN_GES="${ROTDIR}/${GDUMP}.${gPDY}/${gcyc}/atmos" -export COMIN_GES_ENS="${ROTDIR}/enkf${GDUMP}.${gPDY}/${gcyc}/atmos" +export COMIN_GES="${ROTDIR}/${GDUMP}.${GDATE:0:8}/${GDATE:8:2}/atmos" +export COMIN_GES_ENS="${ROTDIR}/enkf${GDUMP}.${GDATE:0:8}/${GDATE:8:2}/atmos" ############################################################### # Run relevant script diff --git a/jobs/rocoto/landanlrun.sh b/jobs/rocoto/landanlrun.sh index 29dfc23bba..3f306a32be 100755 --- a/jobs/rocoto/landanlrun.sh +++ b/jobs/rocoto/landanlrun.sh @@ -11,6 +11,12 @@ status=$? export job="landanlrun" export jobid="${job}.$$" +############################################################### +# setup python path for workflow utilities and tasks +pygwPATH="${HOMEgfs}/ush/python:${HOMEgfs}/ush/python/pygw/src" +PYTHONPATH="${PYTHONPATH:+${PYTHONPATH}:}${pygwPATH}" +export PYTHONPATH + ############################################################### # Execute the JJOB "${HOMEgfs}/jobs/JGLOBAL_LAND_ANALYSIS_RUN" From 973e2f58c2afb782f5e90e41136486437e4904ac Mon Sep 17 00:00:00 2001 From: Jiarui Dong Date: Wed, 19 Apr 2023 17:49:17 -0400 Subject: [PATCH 21/27] Remove ATML app and add do_JEDILANDDA option. --- parm/config/config.base.emc.dyn | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/parm/config/config.base.emc.dyn b/parm/config/config.base.emc.dyn index 32f7c76028..50f39f050b 100644 --- a/parm/config/config.base.emc.dyn +++ b/parm/config/config.base.emc.dyn @@ -157,7 +157,6 @@ export DO_WAVE="NO" export DO_OCN="NO" export DO_ICE="NO" export DO_AERO="NO" -export DO_LAND="NO" export CCPP_SUITE="@CCPP_SUITE@" export WAVE_CDUMP="" # When to include wave suite: gdas, gfs, or both export DOBNDPNT_WAVE="NO" @@ -188,10 +187,6 @@ case "${APP}" in ATM) export confignamevarfornems="atm" ;; - ATML) - export DO_LAND="YES" - export confignamevarfornems="atm_land" - ;; ATMA) export DO_AERO="YES" export confignamevarfornems="atm_aero" @@ -316,6 +311,7 @@ export imp_physics=@IMP_PHYSICS@ export DO_JEDIVAR="NO" export DO_JEDIENS="NO" export DO_JEDIOCNVAR="NO" +export DO_JEDILANDDA=NO" # Hybrid related export DOHYBVAR="@DOHYBVAR@" From fcaf0ea4a8b557dae603f1a7f43870b35c93e71e Mon Sep 17 00:00:00 2001 From: Jiarui Dong Date: Wed, 19 Apr 2023 18:01:54 -0400 Subject: [PATCH 22/27] Made a minor correction. --- parm/config/config.base.emc.dyn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parm/config/config.base.emc.dyn b/parm/config/config.base.emc.dyn index 50f39f050b..474e72be9f 100644 --- a/parm/config/config.base.emc.dyn +++ b/parm/config/config.base.emc.dyn @@ -311,7 +311,7 @@ export imp_physics=@IMP_PHYSICS@ export DO_JEDIVAR="NO" export DO_JEDIENS="NO" export DO_JEDIOCNVAR="NO" -export DO_JEDILANDDA=NO" +export DO_JEDILANDDA="NO" # Hybrid related export DOHYBVAR="@DOHYBVAR@" From 66833f010531d4cadf963f0cc582f552f651acc6 Mon Sep 17 00:00:00 2001 From: Jiarui Dong Date: Wed, 19 Apr 2023 19:56:17 -0400 Subject: [PATCH 23/27] Correct the shell norm errors --- parm/config/config.resources | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/parm/config/config.resources b/parm/config/config.resources index 9c8252ea3e..6522a6e279 100644 --- a/parm/config/config.resources +++ b/parm/config/config.resources @@ -227,12 +227,12 @@ elif [[ "${step}" = "landanlinit" || "${step}" = "landanlfinal" ]]; then export layout_x export layout_y - declare -x wtime_${step}="00:10:00" - declare -x npe_${step}=1 - declare -x nth_${step}=1 + declare -x "wtime_${step}"="00:10:00" + declare -x "npe_${step}"=1 + declare -x "nth_${step}"=1 temp_stepname="nth_${step}" - declare -x npe_node_${step}=$(echo "${npe_node_max} / ${!temp_stepname}" | bc) - declare -x memory_${step}="3072M" + declare -x "npe_node_${step}"=$(echo "${npe_node_max} / ${!temp_stepname}" | bc) + declare -x "memory_${step}"="3072M" elif [[ "${step}" = "landanlrun" ]]; then From deb80808f3ccdff6be190f38d3a6ba7858704490 Mon Sep 17 00:00:00 2001 From: Jiarui Dong Date: Wed, 19 Apr 2023 20:00:26 -0400 Subject: [PATCH 24/27] Correct shell check warning. --- parm/config/config.resources | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parm/config/config.resources b/parm/config/config.resources index 6522a6e279..a63997712b 100644 --- a/parm/config/config.resources +++ b/parm/config/config.resources @@ -231,7 +231,7 @@ elif [[ "${step}" = "landanlinit" || "${step}" = "landanlfinal" ]]; then declare -x "npe_${step}"=1 declare -x "nth_${step}"=1 temp_stepname="nth_${step}" - declare -x "npe_node_${step}"=$(echo "${npe_node_max} / ${!temp_stepname}" | bc) + declare -x "npe_node_${step}"="$(echo "${npe_node_max} / ${!temp_stepname}" | bc)" declare -x "memory_${step}"="3072M" elif [[ "${step}" = "landanlrun" ]]; then From cfab1d3e2c8d31746e3256e9813e9ed90111fed4 Mon Sep 17 00:00:00 2001 From: Jiarui Dong Date: Fri, 21 Apr 2023 09:43:57 -0400 Subject: [PATCH 25/27] Made changes by comparing the Russ's PR for the ATM DA. --- env/CONTAINER.env | 2 +- env/JET.env | 12 +++++++++++- env/S4.env | 12 +++++++++++- env/WCOSS2.env | 12 +++++++++++- jobs/JGLOBAL_LAND_ANALYSIS_FINALIZE | 2 +- 5 files changed, 35 insertions(+), 5 deletions(-) diff --git a/env/CONTAINER.env b/env/CONTAINER.env index d06ca91a9b..a4e23d95d4 100755 --- a/env/CONTAINER.env +++ b/env/CONTAINER.env @@ -4,7 +4,7 @@ if [[ $# -ne 1 ]]; then echo "Must specify an input argument to set runtime environment variables!" echo "argument can be any one of the following:" - echo "atmanlrun atmensanalrun aeroanlrun" + echo "atmanlrun atmensanalrun aeroanlrun landanlrun" echo "anal sfcanl fcst post vrfy metp" echo "eobs eupd ecen efcs epos" echo "postsnd awips gempak" diff --git a/env/JET.env b/env/JET.env index e5fd85aaa3..068e3c1fab 100755 --- a/env/JET.env +++ b/env/JET.env @@ -4,7 +4,7 @@ if [[ $# -ne 1 ]]; then echo "Must specify an input argument to set runtime environment variables!" echo "argument can be any one of the following:" - echo "atmanlrun atmensanalrun aeroanlrun" + echo "atmanlrun atmensanalrun aeroanlrun landanlrun" echo "anal sfcanl fcst post vrfy metp" echo "eobs eupd ecen efcs epos" echo "postsnd awips gempak" @@ -77,6 +77,16 @@ elif [[ "${step}" = "aeroanlrun" ]]; then [[ ${NTHREADS_AEROANL} -gt ${nth_max} ]] && export NTHREADS_AEROANL=${nth_max} export APRUN_AEROANL="${launcher} -n ${npe_aeroanlrun}" +elif [[ "${step}" = "landanlrun" ]]; then + + export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}" + + nth_max=$((npe_node_max / npe_node_landanlrun)) + + export NTHREADS_LANDANL=${nth_landanlrun:-${nth_max}} + [[ ${NTHREADS_LANDANL} -gt ${nth_max} ]] && export NTHREADS_LANDANL=${nth_max} + export APRUN_LANDANL="${launcher} -n ${npe_landanlrun}" + elif [[ "${step}" = "ocnanalbmat" ]]; then export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}" diff --git a/env/S4.env b/env/S4.env index 9a62d515a4..06fd5f934c 100755 --- a/env/S4.env +++ b/env/S4.env @@ -4,7 +4,7 @@ if [[ $# -ne 1 ]]; then echo "Must specify an input argument to set runtime environment variables!" echo "argument can be any one of the following:" - echo "atmanlrun atmensanalrun aeroanlrun" + echo "atmanlrun atmensanalrun aeroanlrun landanlrun" echo "anal sfcanl fcst post vrfy metp" echo "eobs eupd ecen efcs epos" echo "postsnd awips gempak" @@ -76,6 +76,16 @@ elif [[ "${step}" = "aeroanlrun" ]]; then [[ ${NTHREADS_AEROANL} -gt ${nth_max} ]] && export NTHREADS_AEROANL=${nth_max} export APRUN_AEROANL="${launcher} -n ${npe_aeroanlrun}" +elif [[ "${step}" = "landanlrun" ]]; then + + export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}" + + nth_max=$((npe_node_max / npe_node_landanlrun)) + + export NTHREADS_LANDANL=${nth_landanlrun:-${nth_max}} + [[ ${NTHREADS_LANDANL} -gt ${nth_max} ]] && export NTHREADS_LANDANL=${nth_max} + export APRUN_LANDANL="${launcher} -n ${npe_landanlrun}" + elif [[ "${step}" = "ocnanalbmat" ]]; then echo "WARNING: ${step} is not enabled on S4!" diff --git a/env/WCOSS2.env b/env/WCOSS2.env index 8110b94b5b..9eb39d9265 100755 --- a/env/WCOSS2.env +++ b/env/WCOSS2.env @@ -4,7 +4,7 @@ if [[ $# -ne 1 ]]; then echo "Must specify an input argument to set runtime environment variables!" echo "argument can be any one of the following:" - echo "atmanlrun atmensanalrun aeroanlrun" + echo "atmanlrun atmensanalrun aeroanlrun landanlrun" echo "anal sfcanl fcst post vrfy metp" echo "eobs eupd ecen esfc efcs epos" echo "postsnd awips gempak" @@ -65,6 +65,16 @@ elif [[ "${step}" = "aeroanlrun" ]]; then [[ ${NTHREADS_AEROANL} -gt ${nth_max} ]] && export NTHREADS_AEROANL=${nth_max} export APRUN_AEROANL="${launcher} -n ${npe_aeroanlrun}" +elif [[ "${step}" = "landanlrun" ]]; then + + export APRUNCFP="${launcher} -np \$ncmd ${mpmd_opt}" + + nth_max=$((npe_node_max / npe_node_landanlrun)) + + export NTHREADS_LANDANL=${nth_landanlrun:-${nth_max}} + [[ ${NTHREADS_LANDANL} -gt ${nth_max} ]] && export NTHREADS_LANDANL=${nth_max} + export APRUN_LANDANL="${launcher} -n ${npe_landanlrun}" + elif [[ "${step}" = "anal" ]] || [[ "${step}" = "analcalc" ]]; then export OMP_PLACES=cores diff --git a/jobs/JGLOBAL_LAND_ANALYSIS_FINALIZE b/jobs/JGLOBAL_LAND_ANALYSIS_FINALIZE index ec10e1fbb0..39b20ba662 100755 --- a/jobs/JGLOBAL_LAND_ANALYSIS_FINALIZE +++ b/jobs/JGLOBAL_LAND_ANALYSIS_FINALIZE @@ -44,7 +44,7 @@ fi ########################################## # Remove the Temporary working directory ########################################## -cd "${DATAROOT}" || exit 1 +cd "${DATAROOT}" || ( echo "FATAL ERROR: ${DATAROOT} does not exist, ABORT!"; exit 1 ) [[ ${KEEPDATA} = "NO" ]] && rm -rf "${DATA}" exit 0 From 3b8974b4f8b2c8b3c0c1c6baf63c8a783a9b8f4c Mon Sep 17 00:00:00 2001 From: Jiarui Dong Date: Fri, 21 Apr 2023 19:30:14 -0400 Subject: [PATCH 26/27] Address the reviwer's comments and suggestions. --- env/HERA.env | 2 -- env/JET.env | 2 -- env/ORION.env | 2 -- env/S4.env | 2 -- env/WCOSS2.env | 2 -- parm/config/config.landanl | 4 +-- parm/config/config.landanlfinal | 2 +- parm/config/config.landanlinit | 2 +- parm/config/config.landanlrun | 2 +- parm/config/config.resources | 62 +++++++++++---------------------- 10 files changed, 25 insertions(+), 57 deletions(-) diff --git a/env/HERA.env b/env/HERA.env index 8e67fd760b..89b4874a93 100755 --- a/env/HERA.env +++ b/env/HERA.env @@ -78,8 +78,6 @@ elif [[ "${step}" = "aeroanlrun" ]]; then elif [[ "${step}" = "landanlrun" ]]; then - export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}" - nth_max=$((npe_node_max / npe_node_landanlrun)) export NTHREADS_LANDANL=${nth_landanlrun:-${nth_max}} diff --git a/env/JET.env b/env/JET.env index 068e3c1fab..a497bc7b0e 100755 --- a/env/JET.env +++ b/env/JET.env @@ -79,8 +79,6 @@ elif [[ "${step}" = "aeroanlrun" ]]; then elif [[ "${step}" = "landanlrun" ]]; then - export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}" - nth_max=$((npe_node_max / npe_node_landanlrun)) export NTHREADS_LANDANL=${nth_landanlrun:-${nth_max}} diff --git a/env/ORION.env b/env/ORION.env index d7f2aa875e..cffd02ac40 100755 --- a/env/ORION.env +++ b/env/ORION.env @@ -80,8 +80,6 @@ elif [[ "${step}" = "aeroanlrun" ]]; then elif [[ "${step}" = "landanlrun" ]]; then - export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}" - nth_max=$((npe_node_max / npe_node_landanlrun)) export NTHREADS_LANDANL=${nth_landanlrun:-${nth_max}} diff --git a/env/S4.env b/env/S4.env index 06fd5f934c..5719148449 100755 --- a/env/S4.env +++ b/env/S4.env @@ -78,8 +78,6 @@ elif [[ "${step}" = "aeroanlrun" ]]; then elif [[ "${step}" = "landanlrun" ]]; then - export APRUNCFP="${launcher} -n \$ncmd ${mpmd_opt}" - nth_max=$((npe_node_max / npe_node_landanlrun)) export NTHREADS_LANDANL=${nth_landanlrun:-${nth_max}} diff --git a/env/WCOSS2.env b/env/WCOSS2.env index 9eb39d9265..b094b11d04 100755 --- a/env/WCOSS2.env +++ b/env/WCOSS2.env @@ -67,8 +67,6 @@ elif [[ "${step}" = "aeroanlrun" ]]; then elif [[ "${step}" = "landanlrun" ]]; then - export APRUNCFP="${launcher} -np \$ncmd ${mpmd_opt}" - nth_max=$((npe_node_max / npe_node_landanlrun)) export NTHREADS_LANDANL=${nth_landanlrun:-${nth_max}} diff --git a/parm/config/config.landanl b/parm/config/config.landanl index 2c948a6a17..89bb8a4b7b 100755 --- a/parm/config/config.landanl +++ b/parm/config/config.landanl @@ -1,4 +1,4 @@ -#!/bin/bash -x +#! /usr/bin/env bash ########## config.landanl ########## # configuration common to all land analysis tasks @@ -18,6 +18,6 @@ export FV3JEDI_FIX=${HOMEgfs}/fix/gdas export io_layout_x=@IO_LAYOUT_X@ export io_layout_y=@IO_LAYOUT_Y@ -export JEDIVAREXE=${HOMEgfs}/exec/fv3jedi_letkf.x +export JEDIEXE=${HOMEgfs}/exec/fv3jedi_letkf.x echo "END: config.landanl" diff --git a/parm/config/config.landanlfinal b/parm/config/config.landanlfinal index 2970f1e097..242089325a 100755 --- a/parm/config/config.landanlfinal +++ b/parm/config/config.landanlfinal @@ -1,4 +1,4 @@ -#!/bin/bash -x +#! /usr/bin/env bash ########## config.landanlfinal ########## # Post Land Analysis specific diff --git a/parm/config/config.landanlinit b/parm/config/config.landanlinit index 721179284d..62054525c8 100755 --- a/parm/config/config.landanlinit +++ b/parm/config/config.landanlinit @@ -1,4 +1,4 @@ -#!/bin/bash -x +#! /usr/bin/env bash ########## config.landanlinit ########## # Pre Land Analysis specific diff --git a/parm/config/config.landanlrun b/parm/config/config.landanlrun index 280e96953f..0f44011c1d 100755 --- a/parm/config/config.landanlrun +++ b/parm/config/config.landanlrun @@ -1,4 +1,4 @@ -#!/bin/bash -x +#! /usr/bin/env bash ########## config.landanlrun ########## # Land Analysis specific diff --git a/parm/config/config.resources b/parm/config/config.resources index a63997712b..074b14eef5 100644 --- a/parm/config/config.resources +++ b/parm/config/config.resources @@ -203,8 +203,7 @@ elif [[ "${step}" = "atmanlfinal" ]]; then export npe_node_atmanlfinal export is_exclusive=True -elif [[ "${step}" = "landanlinit" || "${step}" = "landanlfinal" ]]; then - +elif [[ "${step}" = "landanlinit" || "${step}" = "landanlrun" || "${step}" = "landanlfinal" ]]; then # below lines are for creating JEDI YAML case ${CASE} in C768) @@ -227,46 +226,25 @@ elif [[ "${step}" = "landanlinit" || "${step}" = "landanlfinal" ]]; then export layout_x export layout_y - declare -x "wtime_${step}"="00:10:00" - declare -x "npe_${step}"=1 - declare -x "nth_${step}"=1 - temp_stepname="nth_${step}" - declare -x "npe_node_${step}"="$(echo "${npe_node_max} / ${!temp_stepname}" | bc)" - declare -x "memory_${step}"="3072M" - -elif [[ "${step}" = "landanlrun" ]]; then - - case ${CASE} in - C768) - layout_x=6 - layout_y=6 - ;; - C384) - layout_x=5 - layout_y=5 - ;; - C192 | C96 | C48) - layout_x=1 - layout_y=1 - ;; - *) - echo "FATAL: Resolution not supported'" - exit 1 - esac - - export layout_x - export layout_y - - export wtime_landanlrun="00:30:00" - npe_landanlrun=$(echo "${layout_x} * ${layout_y} * 6" | bc) - export npe_landanlrun - npe_landanlrun_gfs=$(echo "${layout_x} * ${layout_y} * 6" | bc) - export npe_landanlrun_gfs - export nth_landanlrun=1 - export nth_landanlrun_gfs=1 - npe_node_landanlrun=$(echo "${npe_node_max} / ${nth_landanlrun}" | bc) - export npe_node_landanlrun - export is_exclusive=True + if [[ "${step}" = "landanlinit" || "${step}" = "landanlfinal" ]]; then + declare -x "wtime_${step}"="00:10:00" + declare -x "npe_${step}"=1 + declare -x "nth_${step}"=1 + temp_stepname="nth_${step}" + declare -x "npe_node_${step}"="$(echo "${npe_node_max} / ${!temp_stepname}" | bc)" + declare -x "memory_${step}"="3072M" + elif [[ "${step}" = "landanlrun" ]]; then + export wtime_landanlrun="00:30:00" + npe_landanlrun=$(echo "${layout_x} * ${layout_y} * 6" | bc) + export npe_landanlrun + npe_landanlrun_gfs=$(echo "${layout_x} * ${layout_y} * 6" | bc) + export npe_landanlrun_gfs + export nth_landanlrun=1 + export nth_landanlrun_gfs=1 + npe_node_landanlrun=$(echo "${npe_node_max} / ${nth_landanlrun}" | bc) + export npe_node_landanlrun + export is_exclusive=True + fi elif [[ "${step}" = "aeroanlinit" ]]; then From 13a567a3106f87c723c01c4152a807ea8b99dbe3 Mon Sep 17 00:00:00 2001 From: Jiarui Dong Date: Sat, 22 Apr 2023 20:11:27 -0400 Subject: [PATCH 27/27] Remove the '_gfs' resource. --- parm/config/config.resources | 3 --- 1 file changed, 3 deletions(-) diff --git a/parm/config/config.resources b/parm/config/config.resources index 074b14eef5..1ab5a189d6 100644 --- a/parm/config/config.resources +++ b/parm/config/config.resources @@ -237,10 +237,7 @@ elif [[ "${step}" = "landanlinit" || "${step}" = "landanlrun" || "${step}" = "l export wtime_landanlrun="00:30:00" npe_landanlrun=$(echo "${layout_x} * ${layout_y} * 6" | bc) export npe_landanlrun - npe_landanlrun_gfs=$(echo "${layout_x} * ${layout_y} * 6" | bc) - export npe_landanlrun_gfs export nth_landanlrun=1 - export nth_landanlrun_gfs=1 npe_node_landanlrun=$(echo "${npe_node_max} / ${nth_landanlrun}" | bc) export npe_node_landanlrun export is_exclusive=True