From d5fdcbf8d6e987dbdfcd6b4da34d0934c8d82c3b Mon Sep 17 00:00:00 2001 From: "kayee.wong" Date: Wed, 18 Sep 2024 07:37:52 +0000 Subject: [PATCH] Fixed missing config.base files. --- parm/config/gfs/config.base.emc | 483 ++++++++++++++++++++++++++++++ parm/config/gfs/config.base.hera | 485 +++++++++++++++++++++++++++++++ 2 files changed, 968 insertions(+) create mode 100644 parm/config/gfs/config.base.emc create mode 100644 parm/config/gfs/config.base.hera diff --git a/parm/config/gfs/config.base.emc b/parm/config/gfs/config.base.emc new file mode 100644 index 0000000000..56005199aa --- /dev/null +++ b/parm/config/gfs/config.base.emc @@ -0,0 +1,483 @@ +#! /usr/bin/env bash + +########## config.base ########## +# Common to all steps + +echo "BEGIN: config.base" + +# Machine environment +export machine="@MACHINE@" + +# EMC parallel or NCO production +export RUN_ENVIR="emc" + +# Account, queue, etc. +export ACCOUNT="@ACCOUNT@" +export QUEUE="@QUEUE@" +export QUEUE_SERVICE="@QUEUE_SERVICE@" +export PARTITION_BATCH="@PARTITION_BATCH@" +export PARTITION_SERVICE="@PARTITION_SERVICE@" +export RESERVATION="@RESERVATION@" +export CLUSTERS="@CLUSTERS@" + +# Project to use in mass store: +export HPSS_PROJECT="@HPSS_PROJECT@" + +# Directories relative to installation areas: +export HOMEgfs=@HOMEgfs@ +export EXECgfs="${HOMEgfs}/exec" +export FIXgfs="${HOMEgfs}/fix" +export PARMgfs="${HOMEgfs}/parm" +export SCRgfs="${HOMEgfs}/scripts" +export USHgfs="${HOMEgfs}/ush" + +export FIXam="${FIXgfs}/am" +export FIXaer="${FIXgfs}/aer" +export FIXcpl="${FIXgfs}/cpl" +export FIXlut="${FIXgfs}/lut" +export FIXcice="${FIXgfs}/cice" +export FIXmom="${FIXgfs}/mom6" +export FIXreg2grb2="${FIXgfs}/reg2grb2" +export FIXgdas="${FIXgfs}/gdas" + +######################################################################## + +# GLOBAL static environment parameters +export PACKAGEROOT="@PACKAGEROOT@" # TODO: set via prod_envir in Ops +export COMROOT="@COMROOT@" # TODO: set via prod_envir in Ops +export COMINsyn="@COMINsyn@" +export DMPDIR="@DMPDIR@" +export BASE_CPLIC="@BASE_CPLIC@" + +# Gempak from external models +# Default locations are to dummy locations for testing +export COMINecmwf=@COMINecmwf@ +export COMINnam=@COMINnam@ +export COMINukmet=@COMINukmet@ + +# USER specific paths +export HOMEDIR="@HOMEDIR@" +export STMP="@STMP@" +export PTMP="@PTMP@" +export NOSCRUB="@NOSCRUB@" + +# Base directories for various builds +export BASE_GIT="@BASE_GIT@" + +# Toggle to turn on/off GFS downstream processing. +export DO_GOES="@DO_GOES@" # GOES products +export DO_BUFRSND="@DO_BUFRSND@" # BUFR sounding products +export DO_GEMPAK="@DO_GEMPAK@" # GEMPAK products +export DO_AWIPS="@DO_AWIPS@" # AWIPS products +export DO_NPOESS="@DO_NPOESS@" # NPOESS products +export DO_TRACKER="@DO_TRACKER@" # Hurricane track verification +export DO_GENESIS="@DO_GENESIS@" # Cyclone genesis verification +export DO_GENESIS_FSU="@DO_GENESIS_FSU@" # Cyclone genesis verification (FSU) +export DO_VERFOZN="YES" # Ozone data assimilation monitoring +export DO_VERFRAD="YES" # Radiance data assimilation monitoring +export DO_VMINMON="YES" # GSI minimization monitoring +export DO_MOS="NO" # GFS Model Output Statistics - Only supported on WCOSS2 + +# NO for retrospective parallel; YES for real-time parallel +# arch.sh uses REALTIME for MOS. Need to set REALTIME=YES +# if want MOS written to HPSS. Should update arch.sh to +# use RUNMOS flag +export REALTIME="YES" + +# Experiment mode (cycled or forecast-only) +export MODE="@MODE@" # cycled/forecast-only + +#################################################### +# DO NOT ADD MACHINE DEPENDENT STUFF BELOW THIS LINE +# IF YOU HAVE TO MAKE MACHINE SPECIFIC CHANGES BELOW +# FEEL FREE TO MOVE THEM ABOVE THIS LINE TO KEEP IT +# CLEAR +#################################################### +# Build paths relative to $HOMEgfs +export FIXgsi="${HOMEgfs}/fix/gsi" +export HOMEpost="${HOMEgfs}" +export HOMEobsproc="${BASE_GIT:-}/obsproc/v${obsproc_run_ver:-1.1.2}" + +# CONVENIENT utility scripts and other environment parameters +export NCP="/bin/cp -p" +export NMV="/bin/mv" +export NLN="/bin/ln -sf" +export VERBOSE="YES" +export KEEPDATA="NO" +export DEBUG_POSTSCRIPT="NO" # PBS only; sets debug=true +export CHGRP_RSTPROD="@CHGRP_RSTPROD@" +export CHGRP_CMD="@CHGRP_CMD@" +export NCDUMP="${NETCDF:-${netcdf_c_ROOT:-}}/bin/ncdump" +export NCLEN="${HOMEgfs}/ush/getncdimlen" + +# Machine environment, jobs, and other utility scripts +export BASE_ENV="${HOMEgfs}/env" +export BASE_JOB="${HOMEgfs}/jobs/rocoto" + +# EXPERIMENT specific environment parameters +export SDATE=@SDATE@ +export EDATE=@EDATE@ +export EXP_WARM_START="@EXP_WARM_START@" +export assim_freq=6 +export PSLOT="@PSLOT@" +export EXPDIR="@EXPDIR@/${PSLOT}" +export ROTDIR="@COMROOT@/${PSLOT}" +export ROTDIR_DUMP="YES" #Note: A value of "NO" does not currently work +export DUMP_SUFFIX="" +if [[ "${PDY}${cyc}" -ge "2019092100" && "${PDY}${cyc}" -le "2019110700" ]]; then + export DUMP_SUFFIX="p" # Use dumps from NCO GFS v15.3 parallel +fi +export ARCDIR="${NOSCRUB}/archive/${PSLOT}" +export ATARDIR="@ATARDIR@" + +# Commonly defined parameters in JJOBS +export envir=${envir:-"prod"} +export NET="gfs" # NET is defined in the job-card (ecf) +export RUN=${RUN:-"gfs"} # RUN is defined in the job-card (ecf) + +# Get all the COM path templates +source "${EXPDIR}/config.com" + +# shellcheck disable=SC2016 +export ERRSCRIPT=${ERRSCRIPT:-'eval [[ $err = 0 ]]'} +export LOGSCRIPT=${LOGSCRIPT:-""} +#export ERRSCRIPT=${ERRSCRIPT:-"err_chk"} +#export LOGSCRIPT=${LOGSCRIPT:-"startmsg"} +export REDOUT="1>" +export REDERR="2>" + +export SENDECF=${SENDECF:-"NO"} +export SENDSDM=${SENDSDM:-"NO"} +export SENDDBN_NTC=${SENDDBN_NTC:-"NO"} +export SENDDBN=${SENDDBN:-"NO"} +export DBNROOT=${DBNROOT:-${UTILROOT:-}/fakedbn} + +# APP settings +export APP=@APP@ + +shopt -s extglob +# Adjust APP based on RUN +case "${RUN}" in + enkf*) # Turn off aerosols and waves + APP="${APP/%+([WA])}" + ;; + *) # Keep app unchanged + ;; +esac +shopt -u extglob + +# Defaults: +export DO_ATM="YES" +export DO_COUPLED="NO" +export DO_WAVE="NO" +export DO_OCN="NO" +export DO_ICE="NO" +export DO_AERO="NO" +export DO_PREP_OBS_AERO="NO" +export AERO_FCST_RUN="" # When to run aerosol forecast: gdas, gfs, or both +export AERO_ANL_RUN="" # When to run aerosol analysis: gdas, gfs, or both +export WAVE_RUN="" # When to include wave suite: gdas, gfs, or both +export DOBNDPNT_WAVE="NO" +export DOIBP_WAV="NO" # Option to create point outputs from input boundary points +export FRAC_GRID=".true." +export DO_NEST="NO" # Whether to run a global-nested domain +if [[ "${DO_NEST:-NO}" == "YES" ]] ; then + export ntiles=7 + export NEST_OUTPUT_GRID="regional_latlon" + export FIXugwd="${FIXgfs}/ugwd_nest" + export FIXorog="${FIXgfs}/orog_nest" +else + export ntiles=6 + export FIXugwd="${FIXgfs}/ugwd" + export FIXorog="${FIXgfs}/orog" +fi + +# Set operational resolution +export OPS_RES="C768" # Do not change # TODO: Why is this needed and where is it used? + +# Resolution specific parameters +export LEVS=128 +export CASE="@CASECTL@" +export CASE_ENS="@CASEENS@" +export OCNRES="@OCNRES@" +export ICERES="${OCNRES}" + +# These are the currently recommended grid-combinations +case "${CASE}" in + "C48") + export waveGRD='uglo_100km' + ;; + "C96" | "C192") + export waveGRD='uglo_100km' + ;; + "C384") + export waveGRD='uglo_100km' + ;; + "C768" | "C1152") + export waveGRD='uglo_m1g16' + ;; + *) + echo "FATAL ERROR: Unrecognized CASE ${CASE}, ABORT!" + exit 1 + ;; +esac + +case "${APP}" in + ATM) + ;; + ATMA) + export DO_AERO="YES" + export AERO_ANL_RUN="both" + export AERO_FCST_RUN="gdas" + ;; + ATMW) + export DO_COUPLED="YES" + export DO_WAVE="YES" + export WAVE_RUN="both" + ;; + NG-GODAS) + export DO_ATM="NO" + export DO_OCN="YES" + export DO_ICE="YES" + ;; + S2S*) + export DO_COUPLED="YES" + export DO_OCN="YES" + export DO_ICE="YES" + + if [[ "${APP}" =~ A$ ]]; then + export DO_AERO="YES" + export AERO_ANL_RUN="both" + export AERO_FCST_RUN="gdas" + fi + + if [[ "${APP}" =~ ^S2SW ]]; then + export DO_WAVE="YES" + export WAVE_RUN="both" + fi + ;; + *) + echo "Unrecognized APP: '${APP}'" + exit 1 + ;; +esac + +# Surface cycle update frequency +if [[ "${RUN}" =~ "gdas" ]] ; then + export FHCYC=1 + export FTSFS=10 +elif [[ "${RUN}" =~ "gfs" ]] ; then + export FHCYC=24 +fi + +# Output frequency of the forecast model (for cycling) +export FHMIN=0 +export FHMAX=9 +export FHOUT=3 # Will be changed to 1 in config.base if (DOHYBVAR set to NO and l4densvar set to false) +export FHOUT_OCN=3 +export FHOUT_ICE=3 + +# Cycle to run EnKF (set to BOTH for both gfs and gdas) +export EUPD_CYC="@EUPD_CYC@" + +# GFS cycle info +export gfs_cyc=@gfs_cyc@ # 0: no GFS cycle, 1: 00Z only, 2: 00Z and 12Z only, 4: all 4 cycles. + +# GFS output and frequency +export FHMIN_GFS=0 +export FHMAX_GFS=@FHMAX_GFS@ +export FHOUT_GFS=3 # 3 for ops +export FHMAX_HF_GFS=@FHMAX_HF_GFS@ +export FHOUT_HF_GFS=1 +export FHOUT_OCN_GFS=6 +export FHOUT_ICE_GFS=6 +export FHMIN_WAV=0 +export FHOUT_WAV=3 +export FHMAX_HF_WAV=120 +export FHOUT_HF_WAV=1 +export FHMAX_WAV=${FHMAX:-9} +export FHMAX_WAV_GFS=${FHMAX_GFS} +if (( gfs_cyc != 0 )); then + export STEP_GFS=$(( 24 / gfs_cyc )) +else + export STEP_GFS="0" +fi +# TODO: Change gempak to use standard out variables (#2348) +export ILPOST=${FHOUT_HF_GFS} # gempak output frequency up to F120 +if (( FHMAX_HF_GFS < 120 )); then + export ILPOST=${FHOUT_GFS} +fi + +# Limit bounds of goes processing +export FHMAX_GOES=180 +export FHOUT_GOES=3 +if (( FHMAX_GOES > FHMAX_GFS )); then + export FHMAX_GOES=${FHMAX_GFS} +fi + +# GFS restart interval in hours +export restart_interval_gfs=12 +# NOTE: Do not set this to zero. Instead set it to $FHMAX_GFS +# TODO: Remove this variable from config.base and reference from config.fcst +# TODO: rework logic in config.wave and push it to parsing_nameslist_WW3.sh where it is actually used + +export QUILTING=".true." +export OUTPUT_GRID="gaussian_grid" +export WRITE_DOPOST=".true." # WRITE_DOPOST=true, use inline POST +export WRITE_NSFLIP=".true." + +# IAU related parameters +export DOIAU="@DOIAU@" # Enable 4DIAU for control with 3 increments +export IAUFHRS="3,6,9" +export IAU_FHROT=${IAUFHRS%%,*} +export IAU_DELTHRS=6 +export IAU_OFFSET=6 +export DOIAU_ENKF=${DOIAU:-"YES"} # Enable 4DIAU for EnKF ensemble +export IAUFHRS_ENKF="3,6,9" +export IAU_DELTHRS_ENKF=6 + +# Use Jacobians in eupd and thereby remove need to run eomg +export lobsdiag_forenkf=".true." + +# if [[ "$SDATE" -lt "2019020100" ]]; then # no rtofs in GDA +# export DO_WAVE="NO" +# echo "WARNING: Wave suite turned off due to lack of RTOFS in GDA for SDATE" +# fi + +# Microphysics Options: 99-ZhaoCarr, 8-Thompson; 6-WSM6, 10-MG, 11-GFDL +export imp_physics=8 + +# Shared parameters +# DA engine +export DO_JEDIATMVAR="@DO_JEDIATMVAR@" +export DO_JEDIATMENS="@DO_JEDIATMENS@" +export DO_JEDIOCNVAR="@DO_JEDIOCNVAR@" +export DO_JEDISNOWDA="@DO_JEDISNOWDA@" +export DO_MERGENSST="@DO_MERGENSST@" + +# Hybrid related +export DOHYBVAR="@DOHYBVAR@" +export NMEM_ENS=@NMEM_ENS@ +export SMOOTH_ENKF="NO" +export l4densvar=".true." +export lwrite4danl=".true." +export DO_CALC_INCREMENT="NO" + +# Early-cycle EnKF parameters +export NMEM_ENS_GFS=30 +export NMEM_ENS_GFS_OFFSET=20 +export DO_CALC_INCREMENT_ENKF_GFS="NO" + +# EnKF output frequency +if [[ ${DOHYBVAR} = "YES" ]]; then + export FHMIN_ENKF=3 + export FHMAX_ENKF=9 + export FHMAX_ENKF_GFS=@FHMAX_ENKF_GFS@ + export FHOUT_ENKF_GFS=3 + if [[ ${l4densvar} = ".true." ]]; then + export FHOUT=1 + export FHOUT_ENKF=1 + else + export FHOUT_ENKF=3 + fi +fi + +# if 3DVAR and IAU +if [[ ${DOHYBVAR} == "NO" && ${DOIAU} == "YES" ]]; then + export IAUFHRS="6" + export IAU_FHROT="3" + export IAU_FILTER_INCREMENTS=".true." + export IAUFHRS_ENKF="6" +fi + +# Generate post-processing ensemble spread files +export ENKF_SPREAD="YES" + +# Check if cycle is cold starting, DOIAU off, or free-forecast mode +if [[ "${MODE}" = "cycled" && "${SDATE}" = "${PDY}${cyc}" && ${EXP_WARM_START} = ".false." ]] || [[ "${DOIAU}" = "NO" ]] || [[ "${MODE}" = "forecast-only" && ${EXP_WARM_START} = ".false." ]] ; then + export IAU_OFFSET=0 + export IAU_FHROT=0 + export IAUFHRS="6" +fi + +if [[ "${DOIAU_ENKF}" = "NO" ]]; then export IAUFHRS_ENKF="6"; fi + +# Determine restart intervals +# For IAU, write restarts at beginning of window also +if [[ "${DOIAU_ENKF:-}" == "YES" ]]; then + export restart_interval_enkfgdas="3" +else + export restart_interval_enkfgdas="6" +fi + +export restart_interval_enkfgfs=${restart_interval_enkfgdas} + +if [[ "${DOIAU}" == "YES" ]]; then + export restart_interval_gdas="3" +else + export restart_interval_gdas="6" +fi + +export GSI_SOILANAL=@GSI_SOILANAL@ + +# turned on nsst in anal and/or fcst steps, and turn off rtgsst +export DONST="YES" +if [[ ${DONST} = "YES" ]]; then export FNTSFA=" "; fi + +# The switch to apply SST elevation correction or not +export nst_anl=.true. + +# Make the nsstbufr file on the fly or use the GDA version +export MAKE_NSSTBUFR="@MAKE_NSSTBUFR@" + +# Make the aircraft prepbufr file on the fly or use the GDA version +export MAKE_ACFTBUFR="@MAKE_ACFTBUFR@" + +# Analysis increments to zero in CALCINCEXEC +export INCREMENTS_TO_ZERO="'liq_wat_inc','icmr_inc','rwmr_inc','snmr_inc','grle_inc'" + +# Stratospheric increments to zero +export INCVARS_ZERO_STRAT="'sphum_inc','liq_wat_inc','icmr_inc','rwmr_inc','snmr_inc','grle_inc'" +export INCVARS_EFOLD="5" + +# Swith to generate netcdf or binary diagnostic files. If not specified, +# script default to binary diagnostic files. Set diagnostic file +# variables here since used in DA job +export netcdf_diag=".true." +export binary_diag=".false." + +# Verification options +export DO_METP="@DO_METP@" # Run METPLUS jobs - set METPLUS settings in config.metp +export DO_FIT2OBS="YES" # Run fit to observations package +export DO_VRFY_OCEANDA="@DO_VRFY_OCEANDA@" # Run SOCA Ocean and Seaice DA verification tasks + +#--online archive of netcdf files for fit2obs verification +export FHMAX_FITS=132 +[[ "${FHMAX_FITS}" -gt "${FHMAX_GFS}" ]] && export FHMAX_FITS=${FHMAX_GFS} + +# Archiving options +export HPSSARCH="@HPSSARCH@" # save data to HPSS archive +export LOCALARCH="@LOCALARCH@" # save data to local archive +if [[ ${HPSSARCH} = "YES" ]] && [[ ${LOCALARCH} = "YES" ]]; then + echo "Both HPSS and local archiving selected. Please choose one or the other." + exit 2 +fi +export ARCH_CYC=00 # Archive data at this cycle for warm_start capability +export ARCH_WARMICFREQ=4 # Archive frequency in days for warm_start capability +export ARCH_FCSTICFREQ=1 # Archive frequency in days for gdas and gfs forecast-only capability + +# The monitor jobs are not yet supported for JEDIATMVAR. +if [[ ${DO_JEDIATMVAR} = "YES" ]]; then + export DO_VERFOZN="NO" # Ozone data assimilation monitoring + export DO_VERFRAD="NO" # Radiance data assimilation monitoring + export DO_VMINMON="NO" # GSI minimization monitoring +fi + +# If starting ICs that are not at cycle hour +export REPLAY_ICS="NO" +export OFFSET_START_HOUR=0 + +# Number of regional collectives to create soundings for +export NUM_SND_COLLECTIVES=${NUM_SND_COLLECTIVES:-9} + +echo "END: config.base" diff --git a/parm/config/gfs/config.base.hera b/parm/config/gfs/config.base.hera new file mode 100644 index 0000000000..f779b4ace1 --- /dev/null +++ b/parm/config/gfs/config.base.hera @@ -0,0 +1,485 @@ +#! /usr/bin/env bash + +########## config.base ########## +# Common to all steps + +echo "BEGIN: config.base" + +# Machine environment +export machine="@MACHINE@" + +# EMC parallel or NCO production +export RUN_ENVIR="emc" + +# Account, queue, etc. +export ACCOUNT="@ACCOUNT@" +export QUEUE="@QUEUE@" +export QUEUE_SERVICE="@QUEUE_SERVICE@" +export PARTITION_BATCH="@PARTITION_BATCH@" +export PARTITION_SERVICE="@PARTITION_SERVICE@" +export RESERVATION="@RESERVATION@" +export CLUSTERS="@CLUSTERS@" + +# Project to use in mass store: +export HPSS_PROJECT="@HPSS_PROJECT@" + +# Directories relative to installation areas: +export HOMEgfs=@HOMEgfs@ +export EXECgfs="${HOMEgfs}/exec" +export FIXgfs="${HOMEgfs}/fix" +export PARMgfs="${HOMEgfs}/parm" +export SCRgfs="${HOMEgfs}/scripts" +export USHgfs="${HOMEgfs}/ush" + +export FIXam="${FIXgfs}/am" +export FIXaer="${FIXgfs}/aer" +export FIXcpl="${FIXgfs}/cpl" +export FIXlut="${FIXgfs}/lut" +export FIXcice="${FIXgfs}/cice" +export FIXmom="${FIXgfs}/mom6" +export FIXreg2grb2="${FIXgfs}/reg2grb2" +export FIXgdas="${FIXgfs}/gdas" + +######################################################################## + +# GLOBAL static environment parameters +export PACKAGEROOT="@PACKAGEROOT@" # TODO: set via prod_envir in Ops +export COMROOT="@COMROOT@" # TODO: set via prod_envir in Ops +export COMINsyn="@COMINsyn@" +export DMPDIR="@DMPDIR@" +export BASE_CPLIC="@BASE_CPLIC@" + +# Gempak from external models +# Default locations are to dummy locations for testing +export COMINecmwf=@COMINecmwf@ +export COMINnam=@COMINnam@ +export COMINukmet=@COMINukmet@ + +# USER specific paths +export HOMEDIR="@HOMEDIR@" +export STMP="@STMP@" +export PTMP="@PTMP@" +export NOSCRUB="@NOSCRUB@" + +# Base directories for various builds +export BASE_GIT="@BASE_GIT@" + +# Toggle to turn on/off GFS downstream processing. +export DO_GOES="@DO_GOES@" # GOES products +export DO_BUFRSND="@DO_BUFRSND@" # BUFR sounding products +export DO_GEMPAK="@DO_GEMPAK@" # GEMPAK products +export DO_AWIPS="@DO_AWIPS@" # AWIPS products +export DO_NPOESS="@DO_NPOESS@" # NPOESS products +export DO_TRACKER="NO" # Hurricane track verification ## JKH +export DO_GENESIS="NO" # Cyclone genesis verification ## JKH +export DO_GENESIS_FSU="@DO_GENESIS_FSU@" # Cyclone genesis verification (FSU) +export DO_VERFOZN="YES" # Ozone data assimilation monitoring +export DO_VERFRAD="YES" # Radiance data assimilation monitoring +export DO_VMINMON="YES" # GSI minimization monitoring +export DO_MOS="NO" # GFS Model Output Statistics - Only supported on WCOSS2 + +# NO for retrospective parallel; YES for real-time parallel +# arch.sh uses REALTIME for MOS. Need to set REALTIME=YES +# if want MOS written to HPSS. Should update arch.sh to +# use RUNMOS flag +export REALTIME="YES" + +# Experiment mode (cycled or forecast-only) +export MODE="@MODE@" # cycled/forecast-only + +#################################################### +# DO NOT ADD MACHINE DEPENDENT STUFF BELOW THIS LINE +# IF YOU HAVE TO MAKE MACHINE SPECIFIC CHANGES BELOW +# FEEL FREE TO MOVE THEM ABOVE THIS LINE TO KEEP IT +# CLEAR +#################################################### +# Build paths relative to $HOMEgfs +export FIXgsi="${HOMEgfs}/fix/gsi" +export HOMEpost="${HOMEgfs}" +export HOMEobsproc="${BASE_GIT:-}/obsproc/v${obsproc_run_ver:-1.1.2}" + +# CONVENIENT utility scripts and other environment parameters +export NCP="/bin/cp -p" +export NMV="/bin/mv" +export NLN="/bin/ln -sf" +export VERBOSE="YES" +export KEEPDATA="NO" +export DEBUG_POSTSCRIPT="NO" # PBS only; sets debug=true +export CHGRP_RSTPROD="@CHGRP_RSTPROD@" +export CHGRP_CMD="@CHGRP_CMD@" +export NCDUMP="${NETCDF:-${netcdf_c_ROOT:-}}/bin/ncdump" +export NCLEN="${HOMEgfs}/ush/getncdimlen" + +# Machine environment, jobs, and other utility scripts +export BASE_ENV="${HOMEgfs}/env" +export BASE_JOB="${HOMEgfs}/jobs/rocoto" + +# EXPERIMENT specific environment parameters +export SDATE=@SDATE@ +export EDATE=@EDATE@ +export EXP_WARM_START="@EXP_WARM_START@" +export assim_freq=6 +export PSLOT="@PSLOT@" +export EXPDIR="@EXPDIR@/${PSLOT}" +export ROTDIR="@COMROOT@/${PSLOT}" +export ROTDIR_DUMP="YES" #Note: A value of "NO" does not currently work +export DUMP_SUFFIX="" +if [[ "${PDY}${cyc}" -ge "2019092100" && "${PDY}${cyc}" -le "2019110700" ]]; then + export DUMP_SUFFIX="p" # Use dumps from NCO GFS v15.3 parallel +fi +export ARCDIR="${NOSCRUB}/archive/${PSLOT}" +export ATARDIR="@ATARDIR@" + +# Commonly defined parameters in JJOBS +export envir=${envir:-"prod"} +export NET="gfs" # NET is defined in the job-card (ecf) +export RUN=${RUN:-"gfs"} # RUN is defined in the job-card (ecf) + +# Get all the COM path templates +source "${EXPDIR}/config.com" + +# shellcheck disable=SC2016 +export ERRSCRIPT=${ERRSCRIPT:-'eval [[ $err = 0 ]]'} +export LOGSCRIPT=${LOGSCRIPT:-""} +#export ERRSCRIPT=${ERRSCRIPT:-"err_chk"} +#export LOGSCRIPT=${LOGSCRIPT:-"startmsg"} +export REDOUT="1>" +export REDERR="2>" + +export SENDECF=${SENDECF:-"NO"} +export SENDSDM=${SENDSDM:-"NO"} +export SENDDBN_NTC=${SENDDBN_NTC:-"NO"} +export SENDDBN=${SENDDBN:-"NO"} +export DBNROOT=${DBNROOT:-${UTILROOT:-}/fakedbn} + +# APP settings +export APP=@APP@ + +shopt -s extglob +# Adjust APP based on RUN +case "${RUN}" in + enkf*) # Turn off aerosols and waves + APP="${APP/%+([WA])}" + ;; + *) # Keep app unchanged + ;; +esac +shopt -u extglob + +# Defaults: +export DO_ATM="YES" +export DO_COUPLED="NO" +export DO_WAVE="NO" +export DO_OCN="NO" +export DO_ICE="NO" +export DO_AERO="NO" +export DO_PREP_OBS_AERO="NO" +export AERO_FCST_RUN="" # When to run aerosol forecast: gdas, gfs, or both +export AERO_ANL_RUN="" # When to run aerosol analysis: gdas, gfs, or both +export WAVE_RUN="" # When to include wave suite: gdas, gfs, or both +export DOBNDPNT_WAVE="NO" +export DOIBP_WAV="NO" # Option to create point outputs from input boundary points +export FRAC_GRID=".true." +export DO_NEST="NO" # Whether to run a global-nested domain +if [[ "${DO_NEST:-NO}" == "YES" ]] ; then + export ntiles=7 + export NEST_OUTPUT_GRID="regional_latlon" + export FIXugwd="${FIXgfs}/ugwd_nest" + export FIXorog="${FIXgfs}/orog_nest" +else + export ntiles=6 + export FIXugwd="${FIXgfs}/ugwd" + export FIXorog="${FIXgfs}/orog" +fi + +# Set operational resolution +export OPS_RES="C768" # Do not change # TODO: Why is this needed and where is it used? + +# Resolution specific parameters +export LEVS=128 +export CASE="@CASECTL@" +export CASE_ENS="@CASEENS@" +export OCNRES="@OCNRES@" +export ICERES="${OCNRES}" + +# These are the currently recommended grid-combinations +case "${CASE}" in + "C48") + export waveGRD='uglo_100km' + ;; + "C96" | "C192") + export waveGRD='uglo_100km' + ;; + "C384") + export waveGRD='uglo_100km' + ;; + "C768" | "C1152") + export waveGRD='uglo_m1g16' + ;; + *) + echo "FATAL ERROR: Unrecognized CASE ${CASE}, ABORT!" + exit 1 + ;; +esac + +case "${APP}" in + ATM) + ;; + ATMA) + export DO_AERO="YES" + export AERO_ANL_RUN="both" + export AERO_FCST_RUN="gdas" + ;; + ATMW) + export DO_COUPLED="YES" + export DO_WAVE="YES" + export WAVE_RUN="both" + ;; + NG-GODAS) + export DO_ATM="NO" + export DO_OCN="YES" + export DO_ICE="YES" + ;; + S2S*) + export DO_COUPLED="YES" + export DO_OCN="YES" + export DO_ICE="YES" + + if [[ "${APP}" =~ A$ ]]; then + export DO_AERO="YES" + export AERO_ANL_RUN="both" + export AERO_FCST_RUN="gdas" + fi + + if [[ "${APP}" =~ ^S2SW ]]; then + export DO_WAVE="YES" + export WAVE_RUN="both" + fi + ;; + *) + echo "Unrecognized APP: '${APP}'" + exit 1 + ;; +esac + +# Surface cycle update frequency +if [[ "${RUN}" =~ "gdas" ]] ; then + export FHCYC=1 + export FTSFS=10 +elif [[ "${RUN}" =~ "gfs" ]] ; then + export FHCYC=24 +fi + +# Output frequency of the forecast model (for cycling) +export FHMIN=0 +export FHMAX=9 +export FHOUT=3 # Will be changed to 1 in config.base if (DOHYBVAR set to NO and l4densvar set to false) +export FHOUT_OCN=3 +export FHOUT_ICE=3 + +# Cycle to run EnKF (set to BOTH for both gfs and gdas) +export EUPD_CYC="@EUPD_CYC@" + +# GFS cycle info +export gfs_cyc=@gfs_cyc@ # 0: no GFS cycle, 1: 00Z only, 2: 00Z and 12Z only, 4: all 4 cycles. + +# GFS output and frequency +export FHMIN_GFS=0 +export FHMAX_GFS=@FHMAX_GFS@ +export FHOUT_GFS=6 # 3 for ops +export FHMAX_HF_GFS=@FHMAX_HF_GFS@ +export FHOUT_HF_GFS=1 +export FHOUT_OCN_GFS=6 +export FHOUT_ICE_GFS=6 +export FHMIN_WAV=0 +export FHOUT_WAV=3 +export FHMAX_HF_WAV=120 +export FHOUT_HF_WAV=1 +export FHMAX_WAV=${FHMAX:-9} +export FHMAX_WAV_GFS=${FHMAX_GFS} +if (( gfs_cyc != 0 )); then + export STEP_GFS=$(( 24 / gfs_cyc )) +else + export STEP_GFS="0" +fi +# TODO: Change gempak to use standard out variables (#2348) +export ILPOST=${FHOUT_HF_GFS} # gempak output frequency up to F120 +if (( FHMAX_HF_GFS < 120 )); then + export ILPOST=${FHOUT_GFS} +fi + +# Limit bounds of goes processing +export FHMAX_GOES=180 +export FHOUT_GOES=3 +if (( FHMAX_GOES > FHMAX_GFS )); then + export FHMAX_GOES=${FHMAX_GFS} +fi + +# GFS restart interval in hours +#JKHexport restart_interval_gfs=12 +#KYWexport restart_interval_gfs=-1 ## JKH +export restart_interval_gfs=$FHMAX_GFS +# NOTE: Do not set this to zero. Instead set it to $FHMAX_GFS +# TODO: Remove this variable from config.base and reference from config.fcst +# TODO: rework logic in config.wave and push it to parsing_nameslist_WW3.sh where it is actually used + +export QUILTING=".true." +export OUTPUT_GRID="gaussian_grid" +export WRITE_DOPOST=".true." # WRITE_DOPOST=true, use inline POST +export WRITE_NSFLIP=".true." + +# IAU related parameters +export DOIAU="@DOIAU@" # Enable 4DIAU for control with 3 increments +export IAUFHRS="3,6,9" +export IAU_FHROT=${IAUFHRS%%,*} +export IAU_DELTHRS=6 +export IAU_OFFSET=6 +export DOIAU_ENKF=${DOIAU:-"YES"} # Enable 4DIAU for EnKF ensemble +export IAUFHRS_ENKF="3,6,9" +export IAU_DELTHRS_ENKF=6 + +# Use Jacobians in eupd and thereby remove need to run eomg +export lobsdiag_forenkf=".true." + +# if [[ "$SDATE" -lt "2019020100" ]]; then # no rtofs in GDA +# export DO_WAVE="NO" +# echo "WARNING: Wave suite turned off due to lack of RTOFS in GDA for SDATE" +# fi + +# Microphysics Options: 99-ZhaoCarr, 8-Thompson; 6-WSM6, 10-MG, 11-GFDL +export imp_physics=8 + +# Shared parameters +# DA engine +export DO_JEDIATMVAR="@DO_JEDIATMVAR@" +export DO_JEDIATMENS="@DO_JEDIATMENS@" +export DO_JEDIOCNVAR="@DO_JEDIOCNVAR@" +export DO_JEDISNOWDA="@DO_JEDISNOWDA@" +export DO_MERGENSST="@DO_MERGENSST@" + +# Hybrid related +export DOHYBVAR="@DOHYBVAR@" +export NMEM_ENS=@NMEM_ENS@ +export SMOOTH_ENKF="NO" +export l4densvar=".true." +export lwrite4danl=".true." +export DO_CALC_INCREMENT="NO" + +# Early-cycle EnKF parameters +export NMEM_ENS_GFS=30 +export NMEM_ENS_GFS_OFFSET=20 +export DO_CALC_INCREMENT_ENKF_GFS="NO" + +# EnKF output frequency +if [[ ${DOHYBVAR} = "YES" ]]; then + export FHMIN_ENKF=3 + export FHMAX_ENKF=9 + export FHMAX_ENKF_GFS=@FHMAX_ENKF_GFS@ + export FHOUT_ENKF_GFS=3 + if [[ ${l4densvar} = ".true." ]]; then + export FHOUT=1 + export FHOUT_ENKF=1 + else + export FHOUT_ENKF=3 + fi +fi + +# if 3DVAR and IAU +if [[ ${DOHYBVAR} == "NO" && ${DOIAU} == "YES" ]]; then + export IAUFHRS="6" + export IAU_FHROT="3" + export IAU_FILTER_INCREMENTS=".true." + export IAUFHRS_ENKF="6" +fi + +# Generate post-processing ensemble spread files +export ENKF_SPREAD="YES" + +# Check if cycle is cold starting, DOIAU off, or free-forecast mode +if [[ "${MODE}" = "cycled" && "${SDATE}" = "${PDY}${cyc}" && ${EXP_WARM_START} = ".false." ]] || [[ "${DOIAU}" = "NO" ]] || [[ "${MODE}" = "forecast-only" && ${EXP_WARM_START} = ".false." ]] ; then + export IAU_OFFSET=0 + export IAU_FHROT=0 + export IAUFHRS="6" +fi + +if [[ "${DOIAU_ENKF}" = "NO" ]]; then export IAUFHRS_ENKF="6"; fi + +# Determine restart intervals +# For IAU, write restarts at beginning of window also +if [[ "${DOIAU_ENKF:-}" == "YES" ]]; then + export restart_interval_enkfgdas="3" +else + export restart_interval_enkfgdas="6" +fi + +export restart_interval_enkfgfs=${restart_interval_enkfgdas} + +if [[ "${DOIAU}" == "YES" ]]; then + export restart_interval_gdas="3" +else + export restart_interval_gdas="6" +fi + +export GSI_SOILANAL=@GSI_SOILANAL@ + +# turned on nsst in anal and/or fcst steps, and turn off rtgsst +export DONST="YES" +if [[ ${DONST} = "YES" ]]; then export FNTSFA=" "; fi + +# The switch to apply SST elevation correction or not +export nst_anl=.true. + +# Make the nsstbufr file on the fly or use the GDA version +export MAKE_NSSTBUFR="@MAKE_NSSTBUFR@" + +# Make the aircraft prepbufr file on the fly or use the GDA version +export MAKE_ACFTBUFR="@MAKE_ACFTBUFR@" + +# Analysis increments to zero in CALCINCEXEC +export INCREMENTS_TO_ZERO="'liq_wat_inc','icmr_inc','rwmr_inc','snmr_inc','grle_inc'" + +# Stratospheric increments to zero +export INCVARS_ZERO_STRAT="'sphum_inc','liq_wat_inc','icmr_inc','rwmr_inc','snmr_inc','grle_inc'" +export INCVARS_EFOLD="5" + +# Swith to generate netcdf or binary diagnostic files. If not specified, +# script default to binary diagnostic files. Set diagnostic file +# variables here since used in DA job +export netcdf_diag=".true." +export binary_diag=".false." + +# Verification options +export DO_METP="@DO_METP@" # Run METPLUS jobs - set METPLUS settings in config.metp +export DO_FIT2OBS="NO" # Run fit to observations package ## JKH +export DO_VRFY_OCEANDA="@DO_VRFY_OCEANDA@" # Run SOCA Ocean and Seaice DA verification tasks + +#--online archive of netcdf files for fit2obs verification +export FHMAX_FITS=132 +[[ "${FHMAX_FITS}" -gt "${FHMAX_GFS}" ]] && export FHMAX_FITS=${FHMAX_GFS} + +# Archiving options +export HPSSARCH="@HPSSARCH@" # save data to HPSS archive +export LOCALARCH="@LOCALARCH@" # save data to local archive +if [[ ${HPSSARCH} = "YES" ]] && [[ ${LOCALARCH} = "YES" ]]; then + echo "Both HPSS and local archiving selected. Please choose one or the other." + exit 2 +fi +export ARCH_CYC=00 # Archive data at this cycle for warm_start capability +export ARCH_WARMICFREQ=4 # Archive frequency in days for warm_start capability +export ARCH_FCSTICFREQ=1 # Archive frequency in days for gdas and gfs forecast-only capability + +# The monitor jobs are not yet supported for JEDIATMVAR. +if [[ ${DO_JEDIATMVAR} = "YES" ]]; then + export DO_VERFOZN="NO" # Ozone data assimilation monitoring + export DO_VERFRAD="NO" # Radiance data assimilation monitoring + export DO_VMINMON="NO" # GSI minimization monitoring +fi + +# If starting ICs that are not at cycle hour +export REPLAY_ICS="NO" +export OFFSET_START_HOUR=0 + +# Number of regional collectives to create soundings for +export NUM_SND_COLLECTIVES=${NUM_SND_COLLECTIVES:-9} + +echo "END: config.base"