Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/noaa csp aws rtd update #1960

Closed
wants to merge 9 commits into from
Closed
2 changes: 1 addition & 1 deletion docs/source/noaa_csp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ global-workflow execution may be loaded as follows.

user@host:$ module unuse /opt/cray/craype/default/modulefiles
user@host:$ module unuse /opt/cray/modulefiles
user@host:$ module use /contrib/global-workflow/spack-stack/miniconda/modulefiles/miniconda
user@host:$ module use /contrib/emc_static/spack-stack/miniconda/modulefiles/miniconda
user@host:$ module load py39_4.12.0
user@host:$ module load rocoto/1.3.3

Expand Down
105 changes: 105 additions & 0 deletions jobs/JGLOBAL_ATMOSANL_POST
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
#! /usr/bin/env bash

source "${HOMEgfs}/ush/preamble.sh"
source "${HOMEgfs}/ush/jjob_header.sh" -e "post" -c "base post"


####################################
# Specify version numbers
####################################
export crtm_ver=${post_crtm_ver:-v2.2.6}
export gfs_ver=${gfs_ver:-v15.0.0}
export hwrf_ver=${hwrf_ver:-v11.0.5}
export g2tmpl_ver=${g2tmpl_ver:-v1.5.0}

##############################################
# Set variables used in the exglobal script
##############################################
export CDUMP=${RUN/enkf}

##############################################
# Begin JOB SPECIFIC work
##############################################
export APRUNP=${APRUN:-${APRUN_NP}}
export RERUN=${RERUN:-NO}
export HOMECRTM=${HOMECRTM:-${PACKAGEROOT}/lib/crtm/${crtm_ver}}
export FIXCRTM=${CRTM_FIX:-${HOMECRTM}/fix}
export PARMpost=${PARMpost:-${HOMEgfs}/parm/post}
export INLINE_POST=${WRITE_DOPOST:-".false."}

# Construct COM variables from templates
YMD=${PDY} HH=${cyc} generate_com -rx COM_ATMOS_RESTART COM_ATMOS_ANALYSIS COM_ATMOS_HISTORY COM_ATMOS_MASTER
if [[ ! -d ${COM_ATMOS_MASTER} ]]; then mkdir -m 775 -p "${COM_ATMOS_MASTER}"; fi

if [[ ${GOESF} == "YES" ]]; then
YMD=${PDY} HH=${cyc} generate_com -rx COM_ATMOS_GOES
if [[ ! -d ${COM_ATMOS_GOES} ]]; then mkdir -m 775 -p "${COM_ATMOS_GOES}"; fi
fi

for grid in '0p25' '0p50' '1p00'; do
prod_dir="COM_ATMOS_GRIB_${grid}"
GRID=${grid} YMD=${PDY} HH=${cyc} generate_com -rx "${prod_dir}:COM_ATMOS_GRIB_GRID_TMPL"
if [[ ! -d "${!prod_dir}" ]]; then mkdir -m 775 -p "${!prod_dir}"; fi
done

if [ "${RUN}" = gfs ];then

Check notice

Code scanning / shellcheck

Prefer [[ ]] over [ ] for tests in Bash/Ksh. Note

Prefer [[ ]] over [ ] for tests in Bash/Ksh.
export FHOUT_PGB=${FHOUT_GFS:-3} #Output frequency of gfs pgb file at 1.0 and 0.5 deg.
fi
if [ "${RUN}" = gdas ]; then

Check notice

Code scanning / shellcheck

Prefer [[ ]] over [ ] for tests in Bash/Ksh. Note

Prefer [[ ]] over [ ] for tests in Bash/Ksh.
export IGEN_GFS="gfs_avn"
export IGEN_ANL="anal_gfs"
export IGEN_FCST="gfs_avn"
export IGEN_GDAS_ANL="anal_gdas"
export FHOUT_PGB=${FHOUT:-1} #Output frequency of gfs pgb file at 1.0 and 0.5 deg.
fi

if [ "${GRIBVERSION}" = grib2 ]; then

Check notice

Code scanning / shellcheck

Prefer [[ ]] over [ ] for tests in Bash/Ksh. Note

Prefer [[ ]] over [ ] for tests in Bash/Ksh.
export IGEN_ANL="anal_gfs"
export IGEN_FCST="gfs_avn"
export IGEN_GFS="gfs_avn"
fi

#######################################
# Specify Restart File Name to Key Off
#######################################
# TODO Improve the name of this variable
export restart_file=${COM_ATMOS_HISTORY}/${RUN}.t${cyc}z.atm.logf

####################################
# Specify Timeout Behavior of Post
#
# SLEEP_TIME - Amount of time to wait for
# a restart file before exiting
# SLEEP_INT - Amount of time to wait between
# checking for restart files
####################################
export SLEEP_TIME=900
export SLEEP_INT=5


###############################################################
# Run relevant exglobal script

"${HOMEgfs}/scripts/ex${RUN}_atmosanl_post.sh"
status=$?
(( status != 0 )) && exit "${status}"

##############################################
# End JOB SPECIFIC work
##############################################

##############################################
# Final processing
##############################################
if [ -e "${pgmout}" ]; then

Check notice

Code scanning / shellcheck

Prefer [[ ]] over [ ] for tests in Bash/Ksh. Note

Prefer [[ ]] over [ ] for tests in Bash/Ksh.
cat "${pgmout}"
fi

##########################################
# Remove the Temporary working directory
##########################################
cd "${DATAROOT}" || exit 1
[[ "${KEEPDATA:-NO}" = "NO" ]] && rm -rf "${DATA}"


exit 0
21 changes: 21 additions & 0 deletions jobs/rocoto/atmanlpost.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#! /usr/bin/env bash

source "${HOMEgfs}/ush/preamble.sh"

###############################################################
## NCEP atmanlpost driver script
###############################################################

# Source FV3GFS workflow modules
. ${HOMEgfs}/ush/load_fv3gfs_modules.sh

Check notice

Code scanning / shellcheck

Double quote to prevent globbing and word splitting. Note

Double quote to prevent globbing and word splitting.
status=$?
[[ ${status} -ne 0 ]] && exit ${status}

Check notice

Code scanning / shellcheck

Prefer double quoting even when variables don't contain special characters. Note

Prefer double quoting even when variables don't contain special characters.

export job="atmanlpost"
export jobid="${job}.$$"

${HOMEgfs}/jobs/JGLOBAL_ATMOSANL_POST

Check notice

Code scanning / shellcheck

Double quote to prevent globbing and word splitting. Note

Double quote to prevent globbing and word splitting.
status=$?
[[ ${status} -ne 0 ]] && exit ${status}

Check notice

Code scanning / shellcheck

Prefer double quoting even when variables don't contain special characters. Note

Prefer double quoting even when variables don't contain special characters.

exit 0
Loading
Loading