From 6e8b0d9447c5b96977ed933155db7e1e9beebb0a Mon Sep 17 00:00:00 2001 From: "Walter.Kolczynski" Date: Mon, 29 Aug 2022 04:30:05 +0000 Subject: [PATCH] Update for new fix strucutre 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 #687 Refs: NOAA-EMC/global-workflow#966 --- .gitignore | 4 ++++ fix/link_fixdirs.sh | 15 ++++++++++----- scripts/exemcsfc_global_sfc_prep.sh | 2 +- ush/chgres_cube.sh | 6 +++--- ush/cpld_gridgen.sh | 2 +- ush/emcsfc_ice_blend.sh | 2 +- ush/emcsfc_snow.sh | 2 +- ush/fv3gfs_driver_grid.sh | 4 ++-- ush/global_cycle.sh | 10 +++++----- ush/global_cycle_driver.sh | 4 ++-- 10 files changed, 30 insertions(+), 21 deletions(-) diff --git a/.gitignore b/.gitignore index 683f653b3..6c3693e17 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,10 @@ install/ exec/ lib/ +fix/am +fix/orog +fix/sfc_climo + *.[ao] *.mod *.so diff --git a/fix/link_fixdirs.sh b/fix/link_fixdirs.sh index 413d85d42..ee19afa22 100755 --- a/fix/link_fixdirs.sh +++ b/fix/link_fixdirs.sh @@ -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 diff --git a/scripts/exemcsfc_global_sfc_prep.sh b/scripts/exemcsfc_global_sfc_prep.sh index 9587f2a07..bea65decb 100755 --- a/scripts/exemcsfc_global_sfc_prep.sh +++ b/scripts/exemcsfc_global_sfc_prep.sh @@ -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. diff --git a/ush/chgres_cube.sh b/ush/chgres_cube.sh index ec13ff75a..027b1e372 100755 --- a/ush/chgres_cube.sh +++ b/ush/chgres_cube.sh @@ -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. diff --git a/ush/cpld_gridgen.sh b/ush/cpld_gridgen.sh index bce186a62..f9c61ccea 100755 --- a/ush/cpld_gridgen.sh +++ b/ush/cpld_gridgen.sh @@ -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 diff --git a/ush/emcsfc_ice_blend.sh b/ush/emcsfc_ice_blend.sh index 20ddbb373..f1b9421b1 100755 --- a/ush/emcsfc_ice_blend.sh +++ b/ush/emcsfc_ice_blend.sh @@ -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. diff --git a/ush/emcsfc_snow.sh b/ush/emcsfc_snow.sh index 8071a18b5..2db1ebdfb 100755 --- a/ush/emcsfc_snow.sh +++ b/ush/emcsfc_snow.sh @@ -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} diff --git a/ush/fv3gfs_driver_grid.sh b/ush/fv3gfs_driver_grid.sh index 8e1250206..7aed682b4 100755 --- a/ush/fv3gfs_driver_grid.sh +++ b/ush/fv3gfs_driver_grid.sh @@ -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} @@ -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 diff --git a/ush/global_cycle.sh b/ush/global_cycle.sh index 92ad3a274..ec3c1da97 100755 --- a/ush/global_cycle.sh +++ b/ush/global_cycle.sh @@ -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 @@ -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)} diff --git a/ush/global_cycle_driver.sh b/ush/global_cycle_driver.sh index e5327970b..7a6b9e8ee 100755 --- a/ush/global_cycle_driver.sh +++ b/ush/global_cycle_driver.sh @@ -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"}