Skip to content

Commit

Permalink
Retire getic.sh and init.sh jobs from global-workflow (#1578)
Browse files Browse the repository at this point in the history
This PR removes:
- `getic.sh` - job used to get initial conditions from HPSS from a past experiment/ops
- `init.sh` - job used to create experiment resolution specific initial conditions from the ones fetched by `getic.sh`.

Both these jobs were primarily used by the atmosphere model component developers in the past.
They have since been staging pre-generated ICs making these jobs obsolete.

Documentation will point to ufs-utils to generate the initial conditions.  The utilities from ufs-utils were used to identify the appropriate HPSS tarball as well as performing interpolation for the atmospheric model component.
There is no such utility available for the other model components making these scripts only partially useful.

In a future PR, an update to the definition of `BASE_CPLIC` and `coupled_ic` jobs will be made to make use of `--icsdir` to point to pre-staged locations of initial conditions.

Fixes #1569
  • Loading branch information
aerorahul committed May 5, 2023
1 parent 63d5522 commit dd19f05
Show file tree
Hide file tree
Showing 18 changed files with 61 additions and 539 deletions.
3 changes: 0 additions & 3 deletions docs/source/configure.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@ The global-workflow configs contain switches that change how the system runs. Ma
| QUILTING | Use I/O quilting | .true. | NO | If .true. choose OUTPUT_GRID as cubed_sphere_grid |
| | | | | in netcdf or gaussian_grid |
+----------------+------------------------------+---------------+-------------+---------------------------------------------------+
| RETRO | Use retrospective parallel | NO | NO | Default of NO will tell getic job to pull from |
| | for ICs | | | production tapes. |
+----------------+------------------------------+---------------+-------------+---------------------------------------------------+
| WAFSF | Run jobs to produce WAFS | NO | YES | downstream processing, ops only |
| | products | | | |
+----------------+------------------------------+---------------+-------------+---------------------------------------------------+
Expand Down
4 changes: 1 addition & 3 deletions docs/source/init.rst
Original file line number Diff line number Diff line change
Expand Up @@ -261,9 +261,7 @@ Coupled initial conditions are currently only generated offline and copied prior
Forecast-only mode (atm-only)
-----------------------------

Forecast-only mode in global workflow includes ``getic`` and ``init`` jobs for the gfs suite. The ``getic`` job pulls inputs for ``chgres_cube`` (init job) or warm start ICs into your ``ROTDIR/COMROT``. The ``init`` job then ingests those files to produce initial conditions for your experiment.

Users on machines without HPSS access (e.g. Orion) need to perform the ``getic`` step manually and stage inputs for the ``init`` job. The table below lists the needed files for ``init`` and where to place them in your ``ROTDIR``.
The table below lists the needed initial condition files from past GFS versions to be used by the UFS_UTILS gdas_init utility. The utility will pull these files for you. See the next section (Manual Generation) for how to run the UFS_UTILS gdas_init utility and create initial conditions for your experiment.

Note for table: yyyy=year; mm=month; dd=day; hh=cycle

Expand Down
4 changes: 0 additions & 4 deletions env/HERA.env
Original file line number Diff line number Diff line change
Expand Up @@ -261,10 +261,6 @@ elif [[ "${step}" = "epos" ]]; then
[[ ${NTHREADS_EPOS} -gt ${nth_max} ]] && export NTHREADS_EPOS=${nth_max}
export APRUN_EPOS="${launcher} -n ${npe_epos}"

elif [[ "${step}" = "init" ]]; then

export APRUN="${launcher} -n ${npe_init}"

elif [[ "${step}" = "postsnd" ]]; then

export CFP_MP="YES"
Expand Down
4 changes: 0 additions & 4 deletions env/JET.env
Original file line number Diff line number Diff line change
Expand Up @@ -231,10 +231,6 @@ elif [[ "${step}" = "epos" ]]; then
[[ ${NTHREADS_EPOS} -gt ${nth_max} ]] && export NTHREADS_EPOS=${nth_max}
export APRUN_EPOS="${launcher} -n ${npe_epos}"

elif [[ "${step}" = "init" ]]; then

export APRUN="${launcher} -n ${npe_init}"

elif [[ "${step}" = "postsnd" ]]; then

export CFP_MP="YES"
Expand Down
4 changes: 0 additions & 4 deletions env/ORION.env
Original file line number Diff line number Diff line change
Expand Up @@ -260,10 +260,6 @@ elif [[ "${step}" = "epos" ]]; then
[[ ${NTHREADS_EPOS} -gt ${nth_max} ]] && export NTHREADS_EPOS=${nth_max}
export APRUN_EPOS="${launcher} -n ${npe_epos}"

elif [[ "${step}" = "init" ]]; then

export APRUN="${launcher} -n ${npe_init}"

elif [[ "${step}" = "postsnd" ]]; then

export CFP_MP="YES"
Expand Down
4 changes: 0 additions & 4 deletions env/S4.env
Original file line number Diff line number Diff line change
Expand Up @@ -234,10 +234,6 @@ elif [[ "${step}" = "epos" ]]; then
[[ ${NTHREADS_EPOS} -gt ${nth_max} ]] && export NTHREADS_EPOS=${nth_max}
export APRUN_EPOS="${launcher} -n ${npe_epos}"

elif [[ "${step}" = "init" ]]; then

export APRUN="${launcher} -n ${npe_init}"

elif [[ "${step}" = "postsnd" ]]; then

export CFP_MP="YES"
Expand Down
4 changes: 0 additions & 4 deletions env/WCOSS2.env
Original file line number Diff line number Diff line change
Expand Up @@ -249,10 +249,6 @@ elif [[ "${step}" = "epos" ]]; then
[[ ${NTHREADS_EPOS} -gt ${nth_max} ]] && export NTHREADS_EPOS=${nth_max}
export APRUN_EPOS="${launcher} -n ${npe_epos} -ppn ${npe_node_epos} --cpu-bind depth --depth ${NTHREADS_EPOS}"

elif [[ "${step}" = "init" ]]; then

export APRUN="${launcher}"

elif [[ "${step}" = "postsnd" ]]; then

export MPICH_MPIIO_HINTS_DISPLAY=1
Expand Down
95 changes: 48 additions & 47 deletions jobs/rocoto/coupled_ic.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,25 +44,22 @@ error_message(){
echo "FATAL ERROR: Unable to copy ${1} to ${2} (Error code ${3})"
}

YMD=${PDY} HH=${cyc} generate_com -rx COM_ATMOS_INPUT COM_ICE_RESTART COM_WAVE_RESTART
YMD=${gPDY} HH=${gcyc} generate_com -rx COM_OCEAN_RESTART

###############################################################
# Start staging

# Stage the FV3 initial conditions to ROTDIR (cold start)
ATMdir="${COM_ATMOS_INPUT}"
[[ ! -d "${ATMdir}" ]] && mkdir -p "${ATMdir}"
YMD=${PDY} HH=${cyc} generate_com -r COM_ATMOS_INPUT
[[ ! -d "${COM_ATMOS_INPUT}" ]] && mkdir -p "${COM_ATMOS_INPUT}"
source="${BASE_CPLIC}/${CPL_ATMIC}/${PDY}${cyc}/${CDUMP}/${CASE}/INPUT/gfs_ctrl.nc"
target="${ATMdir}/gfs_ctrl.nc"
target="${COM_ATMOS_INPUT}/gfs_ctrl.nc"
${NCP} "${source}" "${target}"
rc=$?
[[ ${rc} -ne 0 ]] && error_message "${source}" "${target}" "${rc}"
err=$((err + rc))
for ftype in gfs_data sfc_data; do
for tt in $(seq 1 6); do
source="${BASE_CPLIC}/${CPL_ATMIC}/${PDY}${cyc}/${CDUMP}/${CASE}/INPUT/${ftype}.tile${tt}.nc"
target="${ATMdir}/${ftype}.tile${tt}.nc"
target="${COM_ATMOS_INPUT}/${ftype}.tile${tt}.nc"
${NCP} "${source}" "${target}"
rc=$?
[[ ${rc} -ne 0 ]] && error_message "${source}" "${target}" "${rc}"
Expand All @@ -71,52 +68,56 @@ for ftype in gfs_data sfc_data; do
done

# Stage ocean initial conditions to ROTDIR (warm start)
OCNdir="${COM_OCEAN_RESTART}"
[[ ! -d "${OCNdir}" ]] && mkdir -p "${OCNdir}"
source="${BASE_CPLIC}/${CPL_OCNIC}/${PDY}${cyc}/ocn/${OCNRES}/MOM.res.nc"
target="${OCNdir}/${PDY}.${cyc}0000.MOM.res.nc"
${NCP} "${source}" "${target}"
rc=$?
[[ ${rc} -ne 0 ]] && error_message "${source}" "${target}" "${rc}"
err=$((err + rc))
case $OCNRES in
"025")
for nn in $(seq 1 4); do
source="${BASE_CPLIC}/${CPL_OCNIC}/${PDY}${cyc}/ocn/${OCNRES}/MOM.res_${nn}.nc"
if [[ -f "${source}" ]]; then
target="${OCNdir}/${PDY}.${cyc}0000.MOM.res_${nn}.nc"
${NCP} "${source}" "${target}"
rc=$?
[[ ${rc} -ne 0 ]] && error_message "${source}" "${target}" "${rc}"
err=$((err + rc))
fi
done
;;
*)
echo "FATAL ERROR: Unsupported ocean resolution ${OCNRES}"
rc=1
err=$((err + rc))
;;
esac
if [[ "${DO_OCN:-}" = "YES" ]]; then
YMD=${gPDY} HH=${gcyc} generate_com -r COM_OCEAN_RESTART
[[ ! -d "${COM_OCEAN_RESTART}" ]] && mkdir -p "${COM_OCEAN_RESTART}"
source="${BASE_CPLIC}/${CPL_OCNIC}/${PDY}${cyc}/ocn/${OCNRES}/MOM.res.nc"
target="${COM_OCEAN_RESTART}/${PDY}.${cyc}0000.MOM.res.nc"
${NCP} "${source}" "${target}"
rc=$?
[[ ${rc} -ne 0 ]] && error_message "${source}" "${target}" "${rc}"
err=$((err + rc))
case "${OCNRES}" in
"025")
for nn in $(seq 1 4); do
source="${BASE_CPLIC}/${CPL_OCNIC}/${PDY}${cyc}/ocn/${OCNRES}/MOM.res_${nn}.nc"
if [[ -f "${source}" ]]; then
target="${COM_OCEAN_RESTART}/${PDY}.${cyc}0000.MOM.res_${nn}.nc"
${NCP} "${source}" "${target}"
rc=$?
[[ ${rc} -ne 0 ]] && error_message "${source}" "${target}" "${rc}"
err=$((err + rc))
fi
done
;;
*)
echo "FATAL ERROR: Unsupported ocean resolution ${OCNRES}"
rc=1
err=$((err + rc))
;;
esac
fi

# Stage ice initial conditions to ROTDIR (cold start as these are SIS2 generated)
ICEdir="${COM_ICE_RESTART}"
[[ ! -d "${ICEdir}" ]] && mkdir -p "${ICEdir}"
ICERESdec=$(echo "${ICERES}" | awk '{printf "%0.2f", $1/100}')
source="${BASE_CPLIC}/${CPL_ICEIC}/${PDY}${cyc}/ice/${ICERES}/cice5_model_${ICERESdec}.res_${PDY}${cyc}.nc"
target="${ICEdir}/${PDY}.${cyc}0000.cice_model.res.nc"
${NCP} "${source}" "${target}"
rc=$?
[[ ${rc} -ne 0 ]] && error_message "${source}" "${target}" "${rc}"
err=$((err + rc))
if [[ "${DO_ICE:-}" = "YES" ]]; then
YMD=${PDY} HH=${cyc} generate_com -r COM_ICE_RESTART
[[ ! -d "${COM_ICE_RESTART}" ]] && mkdir -p "${COM_ICE_RESTART}"
ICERESdec=$(echo "${ICERES}" | awk '{printf "%0.2f", $1/100}')
source="${BASE_CPLIC}/${CPL_ICEIC}/${PDY}${cyc}/ice/${ICERES}/cice5_model_${ICERESdec}.res_${PDY}${cyc}.nc"
target="${COM_ICE_RESTART}/${PDY}.${cyc}0000.cice_model.res.nc"
${NCP} "${source}" "${target}"
rc=$?
[[ ${rc} -ne 0 ]] && error_message "${source}" "${target}" "${rc}"
err=$((err + rc))
fi

# Stage the WW3 initial conditions to ROTDIR (warm start; TODO: these should be placed in $RUN.$gPDY/$gcyc)
if [[ "${DO_WAVE}" = "YES" ]]; then
WAVdir="${COM_WAVE_RESTART}"
[[ ! -d "${WAVdir}" ]] && mkdir -p "${WAVdir}"
if [[ "${DO_WAVE:-}" = "YES" ]]; then
YMD=${PDY} HH=${cyc} generate_com -r COM_WAVE_RESTART
[[ ! -d "${COM_WAVE_RESTART}" ]] && mkdir -p "${COM_WAVE_RESTART}"
for grdID in ${waveGRD}; do # TODO: check if this is a bash array; if so adjust
source="${BASE_CPLIC}/${CPL_WAVIC}/${PDY}${cyc}/wav/${grdID}/${PDY}.${cyc}0000.restart.${grdID}"
target="${WAVdir}/${PDY}.${cyc}0000.restart.${grdID}"
target="${COM_WAVE_RESTART}/${PDY}.${cyc}0000.restart.${grdID}"
${NCP} "${source}" "${target}"
rc=$?
[[ ${rc} -ne 0 ]] && error_message "${source}" "${target}" "${rc}"
Expand Down
169 changes: 0 additions & 169 deletions jobs/rocoto/getic.sh

This file was deleted.

Loading

0 comments on commit dd19f05

Please sign in to comment.