Skip to content

Commit

Permalink
Point to new gw spack-stack.
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidHuber-NOAA committed Oct 17, 2023
1 parent 078d16b commit 90efb17
Show file tree
Hide file tree
Showing 17 changed files with 93 additions and 246 deletions.
40 changes: 3 additions & 37 deletions jobs/rocoto/anal.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,43 +4,9 @@ source "${HOMEgfs}/ush/preamble.sh"

###############################################################
# Source FV3GFS workflow modules
#. ${HOMEgfs}/ush/load_fv3gfs_modules.sh
#status=$?
#[[ ${status} -ne 0 ]] && exit ${status}

# TODO: clean this up
#Source appropriate modulefiles based on machine

source "${HOMEgfs}/ush/detect_machine.sh"
if [[ "${MACHINE_ID}" = "wcoss2" ]]; then
# Source FV3GFS workflow modules
. "${HOMEgfs}"/ush/load_fv3gfs_modules.sh
status=$?
[[ ${status} -ne 0 ]] && exit "${status}"
else
# Append compiler (only on machines that have multiple compilers)
COMPILER=${COMPILER:-"intel"}
if [[ "${MACHINE_ID}" = "hera" ]] || [[ "${MACHINE_ID}" = "cheyenne" ]]; then
MACHINE_ID=${MACHINE_ID}.${COMPILER}
fi

# Source machine specific GSI-EnKF modules
set +x
source "${HOMEgfs}/ush/module-setup.sh"
module use "${HOMEgfs}/sorc/gsi_enkf.fd/modulefiles"
module load gsi_"${MACHINE_ID}"

if [[ "${MACHINE_ID}" = "orion" ]]; then
module load miniconda3/4.12.0
set +u
conda activate regional_workflow_cmaq
set_strict
fi

module list
unset MACHINE_ID
set_trace
fi
. ${HOMEgfs}/ush/load_fv3gfs_modules.sh
status=$?
[[ ${status} -ne 0 ]] && exit ${status}

export job="anal"
export jobid="${job}.$$"
Expand Down
21 changes: 3 additions & 18 deletions jobs/rocoto/efcs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,9 @@ source "${HOMEgfs}/ush/preamble.sh"

###############################################################
# Source FV3GFS workflow modules
#. ${HOMEgfs}/ush/load_fv3gfs_modules.sh
#status=$?
#[[ ${status} -ne 0 ]] && exit ${status}

# TODO: clean this up
source "${HOMEgfs}/ush/detect_machine.sh"
set +x
source "${HOMEgfs}/ush/module-setup.sh"
module use "${HOMEgfs}/sorc/ufs_model.fd/tests"
module load modules.ufs_model.lua
# Workflow needs utilities from prod_util (setPDY.sh, ndate, etc.)
module load prod_util
if [[ "${MACHINE_ID}" = "wcoss2" ]]; then
module load cray-pals
fi
module list
unset MACHINE_ID
set_trace
. ${HOMEgfs}/ush/load_fv3gfs_modules.sh
status=$?
[[ ${status} -ne 0 ]] && exit ${status}

export job="efcs"
export jobid="${job}.$$"
Expand Down
40 changes: 3 additions & 37 deletions jobs/rocoto/eobs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,43 +4,9 @@ source "${HOMEgfs}/ush/preamble.sh"

###############################################################
# Source FV3GFS workflow modules
#. ${HOMEgfs}/ush/load_fv3gfs_modules.sh
#status=$?
#[[ ${status} -ne 0 ]] && exit ${status}

# TODO: clean this up
#Source appropriate modulefiles based on machine

source "${HOMEgfs}/ush/detect_machine.sh"
if [[ "${MACHINE_ID}" = "wcoss2" ]]; then
# Source FV3GFS workflow modules
. "${HOMEgfs}"/ush/load_fv3gfs_modules.sh
status=$?
[[ ${status} -ne 0 ]] && exit "${status}"
else
# Append compiler (only on machines that have multiple compilers)
COMPILER=${COMPILER:-"intel"}
if [[ "${MACHINE_ID}" = "hera" ]] || [[ "${MACHINE_ID}" = "cheyenne" ]]; then
MACHINE_ID=${MACHINE_ID}.${COMPILER}
fi

# Source machine specific GSI-EnKF modules
set +x
source "${HOMEgfs}/ush/module-setup.sh"
module use "${HOMEgfs}/sorc/gsi_enkf.fd/modulefiles"
module load gsi_"${MACHINE_ID}"

if [[ "${MACHINE_ID}" = "orion" ]]; then
module load miniconda3/4.12.0
set +u
conda activate regional_workflow_cmaq
set_strict
fi

module list
unset MACHINE_ID
set_trace
fi
. ${HOMEgfs}/ush/load_fv3gfs_modules.sh
status=$?
[[ ${status} -ne 0 ]] && exit ${status}

export job="eobs"
export jobid="${job}.$$"
Expand Down
40 changes: 3 additions & 37 deletions jobs/rocoto/eupd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,43 +4,9 @@ source "${HOMEgfs}/ush/preamble.sh"

###############################################################
# Source FV3GFS workflow modules
#. ${HOMEgfs}/ush/load_fv3gfs_modules.sh
#status=$?
#[[ ${status} -ne 0 ]] && exit ${status}

# TODO: clean this up
#Source appropriate modulefiles based on machine

source "${HOMEgfs}/ush/detect_machine.sh"
if [[ "${MACHINE_ID}" = "wcoss2" ]]; then
# Source FV3GFS workflow modules
. "${HOMEgfs}"/ush/load_fv3gfs_modules.sh
status=$?
[[ ${status} -ne 0 ]] && exit "${status}"
else
# Append compiler (only on machines that have multiple compilers)
COMPILER=${COMPILER:-"intel"}
if [[ "${MACHINE_ID}" = "hera" ]] || [[ "${MACHINE_ID}" = "cheyenne" ]]; then
MACHINE_ID=${MACHINE_ID}.${COMPILER}
fi

# Source machine specific GSI-EnKF modules
set +x
source "${HOMEgfs}/ush/module-setup.sh"
module use "${HOMEgfs}/sorc/gsi_enkf.fd/modulefiles"
module load gsi_"${MACHINE_ID}"

if [[ "${MACHINE_ID}" = "orion" ]]; then
module load miniconda3/4.12.0
set +u
conda activate regional_workflow_cmaq
set_strict
fi

module list
unset MACHINE_ID
set_trace
fi
. ${HOMEgfs}/ush/load_fv3gfs_modules.sh
status=$?
[[ ${status} -ne 0 ]] && exit ${status}

export job="eupd"
export jobid="${job}.$$"
Expand Down
54 changes: 3 additions & 51 deletions jobs/rocoto/fcst.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,57 +4,9 @@ source "${HOMEgfs}/ush/preamble.sh"

###############################################################
# Source FV3GFS workflow modules
#. ${HOMEgfs}/ush/load_fv3gfs_modules.sh
#status=$?
#[[ ${status} -ne 0 ]] && exit ${status}

# TODO: clean this up
source "${HOMEgfs}/ush/detect_machine.sh"
set +x
source "${HOMEgfs}/ush/module-setup.sh"
if [[ "${MACHINE_ID}" != "noaacloud" ]]; then
module use "${HOMEgfs}/sorc/ufs_model.fd/tests"
module load modules.ufs_model.lua
module load prod_util
fi

if [[ "${MACHINE_ID}" = "wcoss2" ]]; then
module load cray-pals
fi
if [[ "${MACHINE_ID}" = "hera" ]]; then
module use "/scratch2/NCEPDEV/ensemble/save/Walter.Kolczynski/modulefiles/core"
module load "miniconda3/4.6.14"
module load "gfs_workflow/1.0.0"
# TODO: orion and wcoss2 will be uncommented when they are ready. This comment block will be removed in the next PR
#elif [[ "${MACHINE_ID}" = "orion" ]]; then
# module use "/home/rmahajan/opt/global-workflow/modulefiles/core"
# module load "python/3.7.5"
# module load "gfs_workflow/1.0.0"
#elif [[ "${MACHINE_ID}" = "wcoss2" ]]; then
# module load "python/3.7.5"
fi
if [[ "${MACHINE_ID}" == "noaacloud" ]]; then
if [[ "${PW_CSP:-}" = "aws" ]]; then

# TODO: This can be cleaned-up; most of this is a hack for now.
module use "/contrib/spack-stack/envs/ufswm/install/modulefiles/Core"
module load "stack-intel"
module load "stack-intel-oneapi-mpi"
module use -a "/contrib/spack-stack/miniconda/modulefiles/miniconda/"
module load "py39_4.12.0"
module load "ufs-weather-model-env/1.0.0"
export NETCDF="/contrib/spack-stack/miniconda/apps/miniconda/py39_4.12.0"
# TODO: Are there plans for EPIC to maintain this package or should GW provide support?
export UTILROOT="/contrib/global-workflow/NCEPLIBS-prod_util"
export PATH="${PATH}:/contrib/global-workflow/bin"
ndate_path="$(command -v ndate)"
export NDATE="${ndate_path}"
fi
fi

module list
unset MACHINE_ID
set_trace
. ${HOMEgfs}/ush/load_fv3gfs_modules.sh
status=$?
[[ ${status} -ne 0 ]] && exit ${status}

###############################################################
# exglobal_forecast.py requires the following in PYTHONPATH
Expand Down
1 change: 0 additions & 1 deletion jobs/rocoto/prep.sh
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ if [[ ${MAKE_PREPBUFR} = "YES" ]]; then
fi

export job="j${CDUMP}_prep_${cyc}"
export DATAROOT="${RUNDIR}/${CDATE}/${CDUMP}/prepbufr"
export COMIN=${COM_OBS}
export COMOUT=${COM_OBS}
RUN="gdas" YMD=${PDY} HH=${cyc} generate_com -rx COMINgdas:COM_ATMOS_HISTORY_TMPL
Expand Down
41 changes: 22 additions & 19 deletions modulefiles/module_base.hera.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,46 +2,49 @@ help([[
Load environment to run GFS on Hera
]])

prepend_path("MODULEPATH", "/scratch2/NCEPDEV/nwprod/hpc-stack/libs/hpc-stack/modulefiles/stack")
prepend_path("MODULEPATH", "/scratch1/NCEPDEV/nems/Alexander.Richert/spack-stack-1.4.1-gw/envs/gw/install/modulefiles/Core")
prepend_path("MODULEPATH", "/scratch1/NCEPDEV/jcsda/jedipara/spack-stack/modulefiles")

load(pathJoin("hpc", os.getenv("hpc_ver")))
load(pathJoin("hpc-intel", os.getenv("hpc_intel_ver")))
load(pathJoin("hpc-impi", os.getenv("hpc_impi_ver")))
load(pathJoin("stack-intel", os.getenv("stack_intel_ver")))
load(pathJoin("stack-intel-oneapi-mpi", os.getenv("stack_impi_ver")))
load(pathJoin("stack-python", os.getenv("stack_python_ver")))
load(pathJoin("miniconda", os.getenv("miniconda_ver")))

load(pathJoin("hpss", os.getenv("hpss_ver")))
load(pathJoin("gempak", os.getenv("gempak_ver")))
load(pathJoin("ncl", os.getenv("ncl_ver")))
load(pathJoin("jasper", os.getenv("jasper_ver")))
load(pathJoin("png", os.getenv("libpng_ver")))
load(pathJoin("libpng", os.getenv("libpng_ver")))
load(pathJoin("cdo", os.getenv("cdo_ver")))
load(pathJoin("R", os.getenv("R_ver")))

load(pathJoin("hdf5", os.getenv("hdf5_ver")))
load(pathJoin("netcdf", os.getenv("netcdf_ver")))
load(pathJoin("netcdf-c", os.getenv("netcdf_c_ver")))
load(pathJoin("netcdf-fortran", os.getenv("netcdf_fortran_ver")))

load(pathJoin("nco", os.getenv("nco_ver")))
load(pathJoin("prod_util", os.getenv("prod_util_ver")))
load(pathJoin("grib_util", os.getenv("grib_util_ver")))
load(pathJoin("prod-util", os.getenv("prod_util_ver")))
load(pathJoin("grib-util", os.getenv("grib_util_ver")))
load(pathJoin("g2tmpl", os.getenv("g2tmpl_ver")))
load(pathJoin("ncdiag", os.getenv("ncdiag_ver")))
load(pathJoin("gsi-ncdiag", os.getenv("gsi_ncdiag_ver")))
load(pathJoin("crtm", os.getenv("crtm_ver")))
load(pathJoin("bufr", os.getenv("bufr_ver")))
load(pathJoin("wgrib2", os.getenv("wgrib2_ver")))
load(pathJoin("py-netcdf4", os.getenv("py_netcdf4_ver")))
load(pathJoin("py-pyyaml", os.getenv("py_pyyaml_ver")))
load(pathJoin("py-jinja2", os.getenv("py_jinja2_ver")))

load(pathJoin("met", os.getenv("met_ver")))
load(pathJoin("metplus", os.getenv("metplus_ver")))

setenv("WGRIB2","wgrib2")
setenv("UTILROOT",os.getenv("prod_util_ROOT"))

--prepend_path("MODULEPATH", pathJoin("/scratch1/NCEPDEV/global/glopara/git/prepobs/v" .. os.getenv("prepobs_run_ver"), "modulefiles"))
prepend_path("MODULEPATH", pathJoin("/scratch1/NCEPDEV/global/glopara/git/prepobs/feature-GFSv17_com_reorg_log_update/modulefiles"))
load(pathJoin("prepobs", os.getenv("prepobs_run_ver")))

prepend_path("MODULEPATH", pathJoin("/scratch1/NCEPDEV/global/glopara/git/Fit2Obs/v" .. os.getenv("fit2obs_ver"), "modulefiles"))
prepend_path("MODULEPATH", pathJoin("/scratch1/NCEPDEV/global/glopara/git/Fit2Obs/v" .. (os.getenv("fit2obs_ver") or "None"), "modulefiles"))
load(pathJoin("fit2obs", os.getenv("fit2obs_ver")))

-- Temporary until official hpc-stack is updated
prepend_path("MODULEPATH", "/scratch2/NCEPDEV/ensemble/save/Walter.Kolczynski/hpc-stack/modulefiles/stack")
load(pathJoin("hpc", "1.2.0"))
load(pathJoin("hpc-intel", "18.0.5.274"))
load(pathJoin("hpc-miniconda3", "4.6.14"))
load(pathJoin("gfs_workflow", "1.0.0"))
load(pathJoin("met", "9.1"))
load(pathJoin("metplus", "3.1"))

whatis("Description: GFS run environment")
13 changes: 7 additions & 6 deletions modulefiles/module_gwci.hera.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ help([[
Load environment to run GFS workflow setup scripts on Hera
]])

prepend_path("MODULEPATH", "/scratch2/NCEPDEV/nwprod/hpc-stack/libs/hpc-stack/modulefiles/stack")
prepend_path("MODULEPATH", "/scratch1/NCEPDEV/nems/Alexander.Richert/spack-stack-1.4.1-gw/envs/gw/install/modulefiles/Core")
prepend_path("MODULEPATH", "/scratch1/NCEPDEV/jcsda/jedipara/spack-stack/modulefiles")

load(pathJoin("hpc", "1.1.0"))
load(pathJoin("hpc-intel", "18.0.5.274"))
load(pathJoin("hpc-impi", "2018.0.4"))
load(pathJoin("stack-intel", os.getenv("2021.5.0")))
load(pathJoin("stack-intel-oneapi-mpi", os.getenv("2021.5.1")))

load(pathJoin("netcdf","4.7.4"))
load(pathJoin("nccmp","1.8.7.0"))
load(pathJoin("netcdf-c", os.getenv("4.9.2")))
load(pathJoin("netcdf-fortran", os.getenv("4.6.0")))
load(pathJoin("nccmp","1.9.0.1"))
load(pathJoin("wgrib2", "2.0.8"))

whatis("Description: GFS run setup CI environment")
16 changes: 11 additions & 5 deletions modulefiles/module_gwsetup.hera.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,16 @@ Load environment to run GFS workflow setup scripts on Hera

load(pathJoin("rocoto"))

-- Temporary until official hpc-stack is updated
prepend_path("MODULEPATH", "/scratch2/NCEPDEV/ensemble/save/Walter.Kolczynski/hpc-stack/modulefiles/stack")
load(pathJoin("hpc", "1.2.0"))
load(pathJoin("hpc-miniconda3", "4.6.14"))
load(pathJoin("gfs_workflow", "1.0.0"))
prepend_path("MODULEPATH", "/scratch1/NCEPDEV/nems/Alexander.Richert/spack-stack-1.4.1-gw/envs/gw/install/modulefiles/Core")
prepend_path("MODULEPATH", "/scratch1/NCEPDEV/jcsda/jedipara/spack-stack/modulefiles")

local stack_intel_ver=os.getenv("stack_intel_ver") or "2021.5.0"
local stack_python_ver=os.getenv("stack_python_ver") or "3.9.12"

load(pathJoin("stack-intel", stack_intel_ver))
load(pathJoin("stack-python", stack_python_ver))
load("py-jinja2")
load("py-pyyaml")
load("py-numpy")

whatis("Description: GFS run setup environment")
4 changes: 2 additions & 2 deletions parm/config/gefs/config.base.emc.dyn
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export VERBOSE="YES"
export KEEPDATA="NO"
export CHGRP_RSTPROD="@CHGRP_RSTPROD@"
export CHGRP_CMD="@CHGRP_CMD@"
export NCDUMP="${NETCDF}/bin/ncdump"
export NCDUMP="${NETCDF:-${netcdf_c_ROOT:-}}/bin/ncdump"
export NCLEN="${HOMEgfs}/ush/getncdimlen"

# Machine environment, jobs, and other utility scripts
Expand Down Expand Up @@ -126,7 +126,7 @@ export SENDCOM=${SENDCOM:-"YES"}
export SENDSDM=${SENDSDM:-"NO"}
export SENDDBN_NTC=${SENDDBN_NTC:-"NO"}
export SENDDBN=${SENDDBN:-"NO"}
export DBNROOT=${DBNROOT:-${UTILROOT}/fakedbn}
export DBNROOT=${DBNROOT:-${UTILROOT:-}/fakedbn}

# APP settings
export APP=@APP@
Expand Down
2 changes: 1 addition & 1 deletion parm/config/gfs/config.base.emc.dyn
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export VERBOSE="YES"
export KEEPDATA="NO"
export CHGRP_RSTPROD="@CHGRP_RSTPROD@"
export CHGRP_CMD="@CHGRP_CMD@"
export NCDUMP="${NETCDF:-}/bin/ncdump"
export NCDUMP="${NETCDF:-${netcdf_c_ROOT:-}}/bin/ncdump"
export NCLEN="${HOMEgfs}/ush/getncdimlen"

# Machine environment, jobs, and other utility scripts
Expand Down
2 changes: 1 addition & 1 deletion scripts/exglobal_diag.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export NMV=${NMV:-"/bin/mv"}
export NLN=${NLN:-"/bin/ln -sf"}
export CHGRP_CMD=${CHGRP_CMD:-"chgrp ${group_name:-rstprod}"}
export NCLEN=${NCLEN:-$HOMEgfs/ush/getncdimlen}
export CATEXEC=${CATEXEC:-$ncdiag_ROOT/bin/ncdiag_cat_serial.x}
export CATEXEC=${CATEXEC:-${ncdiag_ROOT:-${gsi_ncdiag_ROOT}}/bin/ncdiag_cat_serial.x}
COMPRESS=${COMPRESS:-gzip}
UNCOMPRESS=${UNCOMPRESS:-gunzip}
APRUNCFP=${APRUNCFP:-""}
Expand Down
Loading

0 comments on commit 90efb17

Please sign in to comment.