Skip to content

Commit

Permalink
Update script variables to be consistent with the
Browse files Browse the repository at this point in the history
current workflow.

Fixes ufs-community#549.
  • Loading branch information
GeorgeGayno-NOAA committed Oct 23, 2023
1 parent 0b5c4a3 commit 99ea7fa
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 24 deletions.
35 changes: 15 additions & 20 deletions ush/global_cycle.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,8 @@
# Default is /nwprod2.
# HOMEgfs Directory for gfs. Default is
# $BASEDIR/gfs.v15.0.0.
# FIXSUBDA Sub-directory where fixed climatology files reside.
# Defaults to fix/am.
# FIXam Directory for the global fixed climatology files.
# Defaults to $HOMEgfs/fix/am
# FIXfv3 Directory for the model grid and orography netcdf
# files. Defaults to $HOMEgfs/fix/orog/${CASE}
# EXECgfs Directory of the program executable. Defaults to
# $HOMEgfs/exec
# DATA Working directory
Expand Down Expand Up @@ -228,14 +224,17 @@ if [[ "$VERBOSE" = "YES" ]] ; then
fi

CASE=${CASE:-C768}
OCNRES=${OCNRES:-100}

# Directories.
gfs_ver=${gfs_ver:-v15.0.0}
BASEDIR=${BASEDIR:-${NWROOT:-/nwprod2}}
HOMEgfs=${HOMEgfs:-$BASEDIR/gfs_ver.${gfs_ver}}
EXECgfs=${EXECgfs:-$HOMEgfs/exec}
FIXfv3=${FIXfv3:-$HOMEgfs/fix/orog/$CASE}
FIXam=${FIXam:-$HOMEgfs/fix/am}
FIX_DIR=${FIX_DIR:-$HOMEgfs/fix}
FIXam=${FIXam:-$FIX_DIR/am}
OROFIX=${OROFIX:-$FIX_DIR/orog/${CASE}.mx${OCNRES}_frac}
FIX_SFC=${FIX_SFC:-$OROFIX/sfc}
DATA=${DATA:-$(pwd)}
COMIN=${COMIN:-$(pwd)}
COMOUT=${COMOUT:-$(pwd)}
Expand Down Expand Up @@ -280,18 +279,18 @@ FNTSFC=${FNTSFC:-${FIXam}/RTGSST.1982.2012.monthly.clim.grb}
FNSALC=${FNSALC:-${FIXam}/global_salclm.t1534.3072.1536.nc}
FNSNOC=${FNSNOC:-${FIXam}/global_snoclim.1.875.grb}
FNZORC=${FNZORC:-igbp}
FNALBC2=${FNALBC2:-${FIXam}/global_albedo4.1x1.grb}
FNAISC=${FNAISC:-${FIXam}/IMS-NIC.blended.ice.monthly.clim.grb}
FNTG3C=${FNTG3C:-${FIXam}/global_tg3clim.2.6x1.5.grb}
FNVEGC=${FNVEGC:-${FIXam}/global_vegfrac.0.144.decpercent.grb}
FNALBC=${FNALBC:-${FIXam}/global_snowfree_albedo.bosu.t$JCAP_CASE.$LONB_CASE.$LATB_CASE.rg.grb}
FNVETC=${FNVETC:-${FIXam}/global_vegtype.igbp.t$JCAP_CASE.$LONB_CASE.$LATB_CASE.rg.grb}
FNSOTC=${FNSOTC:-${FIXam}/global_soiltype.statsgo.t$JCAP_CASE.$LONB_CASE.$LATB_CASE.rg.grb}
FNSMCC=${FNSMCC:-${FIXam}/global_soilmgldas.statsgo.t$JCAP_CASE.$LONB_CASE.$LATB_CASE.grb}
FNABSC=${FNABSC:-${FIXam}/global_mxsnoalb.uariz.t$JCAP_CASE.$LONB_CASE.$LATB_CASE.rg.grb}
FNVMNC=${FNVMNC:-${FIXam}/global_shdmin.0.144x0.144.grb}
FNVMXC=${FNVMXC:-${FIXam}/global_shdmax.0.144x0.144.grb}
FNSLPC=${FNSLPC:-${FIXam}/global_slope.1x1.grb}
FNALBC2=${FNALBC2:-${FIX_SFC}/${CASE}.mx${OCNRES}.facsf.tileX.nc}
FNTG3C=${FNTG3C:-${FIX_SFC}/${CASE}.mx${OCNRES}.substrate_temperature.tileX.nc}
FNVEGC=${FNVEGC:-${FIX_SFC}/${CASE}.mx${OCNRES}.vegetation_greenness.tileX.nc}
FNALBC=${FNALBC:-${FIX_SFC}/${CASE}.mx${OCNRES}.snowfree_albedo.tileX.nc}
FNVETC=${FNVETC:-${FIX_SFC}/${CASE}.mx${OCNRES}.vegetation_type.tileX.nc}
FNSOTC=${FNSOTC:-${FIX_SFC}/${CASE}.mx${OCNRES}.soil_type.tileX.nc}
FNABSC=${FNABSC:-${FIX_SFC}/${CASE}.mx${OCNRES}.maximum_snow_albedo.tileX.nc}
FNVMNC=${FNVMNC:-${FIX_SFC}/${CASE}.mx${OCNRES}.vegetation_greenness.tileX.nc}
FNVMXC=${FNVMXC:-${FIX_SFC}/${CASE}.mx${OCNRES}.vegetation_greenness.tileX.nc}
FNSLPC=${FNSLPC:-${FIX_SFC}/${CASE}.mx${OCNRES}.slope_type.tileX.nc}
FNMSKH=${FNMSKH:-${FIXam}/global_slmask.t1534.3072.1536.grb}
NST_FILE=${NST_FILE:-"NULL"}
LND_SOI_FILE=${LND_SOI_FILE:-"NULL"}
Expand Down Expand Up @@ -326,10 +325,6 @@ ln -fs $FNTSFC sstclm
ln -fs $FNSALC salclm

# If the appropriate resolution fix file is not present, use the highest resolution available (T1534)
[[ ! -f $FNALBC ]] && FNALBC="$FIXam/global_snowfree_albedo.bosu.t1534.3072.1536.rg.grb"
[[ ! -f $FNVETC ]] && FNVETC="$FIXam/global_vegtype.igbp.t1534.3072.1536.rg.grb"
[[ ! -f $FNSOTC ]] && FNSOTC="$FIXam/global_soiltype.statsgo.t1534.3072.1536.rg.grb"
[[ ! -f $FNABSC ]] && FNABSC="$FIXam/global_mxsnoalb.uariz.t1534.3072.1536.rg.grb"
[[ ! -f $FNSMCC ]] && FNSMCC="$FIXam/global_soilmgldas.statsgo.t1534.3072.1536.grb"

################################################################################
Expand Down
11 changes: 7 additions & 4 deletions ush/global_cycle_driver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ set -eux
#-------------------------------------------------------------------------------------------------

export CASE=${CASE:-C768} # resolution of tile: 48, 96, 192, 384, 768, 1152, 3072
export OCNRES=${OCNRES:-100}
export CDATE=${CDATE:-${cdate:-2017031900}} # format yyyymmddhh yyyymmddhh ...
export CDUMP=${CDUMP:-gfs} # gfs or gdas
export COMPONENT=${COMPONENT:-atmos}
Expand All @@ -17,8 +18,10 @@ pwd=$(pwd)
export NWPROD=${NWPROD:-$pwd}
export DMPDIR=${DMPDIR:-$NWPROD}
export HOMEgfs=${HOMEgfs:-$NWPROD/gfs.v15.0.0}
export FIXam=${FIXam:-$HOMEgfs/fix/am}
export FIXfv3=${FIXfv3:-$HOMEgfs/fix/orog}
export FIX_DIR=${FIX_DIR:-$HOMEgfs/fix}
export FIXam=${FIXam:-$FIX_DIR/am}
export OROFIX=${OROFIX:-$FIX_DIR/orog/${CASE}.mx${OCNRES}_frac}
export FIX_SFC=${FIX_SFC:-$OROFIX/sfc}

ntiles=${ntiles:-6}
DONST=${DONST:-"NO"}
Expand Down Expand Up @@ -85,8 +88,8 @@ for n in $(seq 1 $ntiles); do
chmod 644 $COMOUT/$PDY.${cyc}0000.sfcanl_data.tile${n}.nc
ln -fs $COMOUT/$PDY.${cyc}0000.sfcanl_data.tile${n}.nc $DATA/fnbgso.00$n

ln -fs $FIXfv3/C${CRES}/C${CRES}_grid.tile${n}.nc $DATA/fngrid.00$n
ln -fs $FIXfv3/C${CRES}/C${CRES}_oro_data.tile${n}.nc $DATA/fnorog.00$n
ln -fs ${OROFIX}/C${CRES}_grid.tile${n}.nc $DATA/fngrid.00$n
ln -fs ${OROFIX}/oro_C${CRES}.mx${OCNRES}.tile${n}.nc $DATA/fnorog.00$n
if [[ "$DO_SNO_INC" == ".true." ]] ; then
ln -fs $COMIN/$PDY.${cyc}0000.xainc.tile${n}.nc $DATA/xainc.00$n
fi
Expand Down

0 comments on commit 99ea7fa

Please sign in to comment.