Skip to content

Commit

Permalink
Update for new fix strucutre
Browse files Browse the repository at this point in the history
Global workflow recently updated their fix directory structure to incorporate
versioning using dates within the directory tree. Additionally, some files were
moved and directories renamed (including removing all the 'fix_' prefixes of
subdirectories). This commit updates the fix paths in UFS utils to match the
new directory structure, and also take version numbers for each of the fix
component directories, similar to how versions are used for modulefiles.)

Fixes ufs-community#687
Refs: NOAA-EMC/global-workflow#966
  • Loading branch information
WalterKolczynski-NOAA committed Sep 6, 2022
1 parent c721768 commit 7d3c6b9
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 21 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ install/
exec/
lib/

fix/am
fix/orog
fix/sfc_climo

*.[ao]
*.mod
*.so
Expand Down
15 changes: 10 additions & 5 deletions fix/link_fixdirs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,23 +35,28 @@ pwd=$(pwd -P)
#--model fix fields
#------------------------------
if [ $machine = "hera" ]; then
FIX_DIR="/scratch1/NCEPDEV/global/glopara/fix_NEW"
FIX_DIR="/scratch1/NCEPDEV/global/glopara/fix"
elif [ $machine = "jet" ]; then
FIX_DIR="/lfs4/HFIP/hfv3gfs/glopara/git/fv3gfs/fix_NEW"
elif [ $machine = "orion" ]; then
FIX_DIR="/work/noaa/global/glopara/fix_NEW"
FIX_DIR="/work/noaa/global/glopara/fix"
elif [ $machine = "wcoss2" ]; then
FIX_DIR="/lfs/h2/emc/global/save/emc.global/FIX/fix_NEW"
FIX_DIR="/lfs/h2/emc/global/save/emc.global/FIX/fix"
elif [ $machine = "s4" ]; then
FIX_DIR="/data/prod/glopara/fix"
fi

for dir in fix_am fix_orog fix_fv3_gmted2010 fix_sfc_climo fix_fv3_fracoro; do
am_ver=${am_ver:-20220805}
orog_ver=${orog_ver:-20220805}
sfc_climo_ver=${sfc_climo_ver:-20220805}

for dir in am orog sfc_climo; do
if [ -d $dir ]; then
[[ $RUN_ENVIR = nco ]] && chmod -R 755 $dir
rm -rf $dir
fi
$LINK $FIX_DIR/$dir .
fix_ver="${dir}_ver"
$LINK $FIX_DIR/$dir/${!fix_ver} ${dir}
done

exit 0
2 changes: 1 addition & 1 deletion scripts/exemcsfc_global_sfc_prep.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ RUN=${RUN:-"gfs"}
export HOMEgfs=${HOMEgfs:-$NWROOT/gfs.${gfs_ver:?}}
export USHgfs=${USHgfs:-$HOMEgfs/ush}
export FIXgfs=${FIXgfs:-$HOMEgfs/fix}
FIXgfs_am=${FIXgfs_am:-$HOMEgfs/fix/fix_am}
FIXgfs_am=${FIXgfs_am:-$HOMEgfs/fix/am}
export EXECgfs=${EXECgfs:-$HOMEgfs/exec}

# output com directory.
Expand Down
6 changes: 3 additions & 3 deletions ush/chgres_cube.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ NWROOT=${NWROOT:-/nw${envir}}
HOMEufs=${HOMEufs:-${NWROOT}/ufs_util.${ufs_ver}}
EXECufs=${EXECufs:-$HOMEufs/exec}
FIXufs=${FIXufs:-$HOMEufs/fix}
FIXfv3=${FIXfv3:-$FIXufs/fix_fv3_gmted2010/C${CRES}}
FIXsfc=${FIXsfc:-$FIXfv3/fix_sfc}
FIXam=${FIXam:-$FIXufs/fix_am}
FIXfv3=${FIXfv3:-$FIXufs/orog/C${CRES}}
FIXsfc=${FIXsfc:-$FIXfv3/sfc}
FIXam=${FIXam:-$FIXufs/am}

#----------------------------------------------------------------------------
# CDATE - YYMMDDHH of your run.
Expand Down
2 changes: 1 addition & 1 deletion ush/cpld_gridgen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export DEBUG=.false.
export MASKEDIT=.false.
export DO_POSTWGTS=.false.
export OUTDIR_PATH=${OUTDIR_PATH:-/scratch2/NCEPDEV/climate/Denise.Worthen/grids-20220116}
export MOSAICDIR_PATH=${MOSAICDIR_PATH:-$PATHTR/fix/fix_fv3_gmted2010}
export MOSAICDIR_PATH=${MOSAICDIR_PATH:-$PATHTR/fix/orog}
APRUN=${APRUN:-"srun"}

if [ $RESNAME = 400 ]; then
Expand Down
2 changes: 1 addition & 1 deletion ush/emcsfc_ice_blend.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ envir=${envir:-"prod"}
NWROOT=${NWROOT:-"/nw${envir}"}

HOMEgfs=${HOMEgfs:-${NWPROD:-$NWROOT/gfs.${gfs_ver:?}}}
FIXam=${FIXam:-$HOMEgfs/fix/fix_am}
FIXam=${FIXam:-$HOMEgfs/fix/am}
EXECgfs=${EXECgfs:-$HOMEgfs/exec}

# output com directory.
Expand Down
2 changes: 1 addition & 1 deletion ush/emcsfc_snow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ envir=${envir:-"prod"}
NWROOT=${NWROOT:-"/nw${envir}"}
HOMEgfs=${HOMEgfs:-$NWROOT/gfs.${gfs_ver:?}}
EXECgfs=${EXECgfs:-$HOMEgfs/exec}
FIXam=${FIXam:-$HOMEgfs/fix/fix_am}
FIXam=${FIXam:-$HOMEgfs/fix/am}

COMOUT=${COMOUT:-$PWD}

Expand Down
4 changes: 2 additions & 2 deletions ush/fv3gfs_driver_grid.sh
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export out_dir=${out_dir:?}
export home_dir=${home_dir:-"$PWD/../"}
export script_dir=$home_dir/ush
export exec_dir=${exec_dir:-"$home_dir/exec"}
export topo=$home_dir/fix/fix_orog
export topo=$home_dir/fix/orog

export NCDUMP=${NCDUMP:-ncdump}

Expand Down Expand Up @@ -483,7 +483,7 @@ export WORK_DIR=$TEMP_DIR/sfcfields
export SAVE_DIR=$out_dir/fix_sfc
export BASE_DIR=$home_dir
export FIX_FV3=$out_dir
export input_sfc_climo_dir=$home_dir/fix/fix_sfc_climo
export input_sfc_climo_dir=$home_dir/fix/sfc_climo

if [ $gtype = regional_gfdl ] || [ $gtype = regional_esg ]; then
export HALO=$halop1
Expand Down
10 changes: 5 additions & 5 deletions ush/global_cycle.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@
# HOMEgfs Directory for gfs. Default is
# $BASEDIR/gfs.v15.0.0.
# FIXSUBDA Sub-directory where fixed climatology files reside.
# Defaults to fix/fix_am.
# Defaults to fix/am.
# FIXam Directory for the global fixed climatology files.
# Defaults to $HOMEgfs/fix/fix_am
# Defaults to $HOMEgfs/fix/am
# FIXfv3 Directory for the model grid and orography netcdf
# files. Defaults to $HOMEgfs/fix/fix_fv3/${CASE}
# files. Defaults to $HOMEgfs/fix/orog/${CASE}
# EXECgfs Directory of the program executable. Defaults to
# $HOMEgfs/exec
# DATA Working directory
Expand Down Expand Up @@ -234,8 +234,8 @@ 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/fix_fv3_gmted2010/$CASE}
FIXam=${FIXam:-$HOMEgfs/fix/fix_am}
FIXfv3=${FIXfv3:-$HOMEgfs/fix/orog/$CASE}
FIXam=${FIXam:-$HOMEgfs/fix/am}
DATA=${DATA:-$(pwd)}
COMIN=${COMIN:-$(pwd)}
COMOUT=${COMOUT:-$(pwd)}
Expand Down
4 changes: 2 additions & 2 deletions ush/global_cycle_driver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ pwd=$(pwd)
export NWPROD=${NWPROD:-$pwd}
export DMPDIR=${DMPDIR:-$NWPROD}
export HOMEgfs=${HOMEgfs:-$NWPROD/gfs.v15.0.0}
export FIXam=${FIXam:-$HOMEgfs/fix/fix_am}
export FIXfv3=${FIXfv3:-$HOMEgfs/fix/fix_fv3_gmted2010}
export FIXam=${FIXam:-$HOMEgfs/fix/am}
export FIXfv3=${FIXfv3:-$HOMEgfs/fix/orog}

ntiles=${ntiles:-6}
DONST=${DONST:-"NO"}
Expand Down

0 comments on commit 7d3c6b9

Please sign in to comment.