Skip to content

Commit

Permalink
Load modules for each task on job-card level (rocoto XML) (ufs-commun…
Browse files Browse the repository at this point in the history
…ity#105)

* remove ptime ntime from rocoto yaml

* add ptime ntime to j-job

* load task modules from job card level
  • Loading branch information
chan-hoo authored Jun 3, 2024
1 parent 2f8d537 commit 66b096c
Show file tree
Hide file tree
Showing 22 changed files with 71 additions and 51 deletions.
3 changes: 3 additions & 0 deletions jobs/JLANDDA_ANALYSIS
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ mkdir -p ${COMOUT}
# Create a teomporary share directory
export DATA_SHARE="${DATA_SHARE:-${DATAROOT}/DATA_SHARE/${PDY}}"
mkdir -p ${DATA_SHARE}

# Set other dates
export PTIME=$($NDATE -24 $PDY$cyc)
#
#-----------------------------------------------------------------------
#
Expand Down
3 changes: 3 additions & 0 deletions jobs/JLANDDA_FORECAST
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ export DATA_SHARE="${DATA_SHARE:-${DATAROOT}/DATA_SHARE/${PDY}}"
mkdir -p ${DATA_SHARE}
export DATA_RESTART="${DATA_RESTART:-${DATAROOT}/DATA_SHARE/RESTART}"
mkdir -p ${DATA_RESTART}

# Set other dates
export NTIME=$($NDATE 24 $PDY$cyc)
#
#-----------------------------------------------------------------------
#
Expand Down
3 changes: 3 additions & 0 deletions jobs/JLANDDA_POST_ANAL
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ export DATA_SHARE="${DATA_SHARE:-${DATAROOT}/DATA_SHARE/${PDY}}"
mkdir -p ${DATA_SHARE}
export DATA_RESTART="${DATA_RESTART:-${DATAROOT}/DATA_SHARE/RESTART}"
mkdir -p ${DATA_RESTART}

# Set other dates
export NTIME=$($NDATE 24 $PDY$cyc)
#
#-----------------------------------------------------------------------
#
Expand Down
3 changes: 3 additions & 0 deletions jobs/JLANDDA_PREP_OBS
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ mkdir -p ${COMOUT}
# Create a teomporary share directory
export DATA_SHARE="${DATA_SHARE:-${DATAROOT}/DATA_SHARE/${PDY}}"
mkdir -p ${DATA_SHARE}

# Set other dates
export PTIME=$($NDATE -24 $PDY$cyc)
#
#-----------------------------------------------------------------------
#
Expand Down
3 changes: 3 additions & 0 deletions jobs/JLANDDA_PRE_ANAL
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ export DATA_SHARE="${DATA_SHARE:-${DATAROOT}/DATA_SHARE/${PDY}}"
mkdir -p ${DATA_SHARE}
export DATA_RESTART="${DATA_RESTART:-${DATAROOT}/DATA_SHARE/RESTART}"
mkdir -p ${DATA_RESTART}

# Set other dates
export PTIME=$($NDATE -24 $PDY$cyc)
#
#-----------------------------------------------------------------------
#
Expand Down
4 changes: 1 addition & 3 deletions modulefiles/build_hera_intel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ load(pathJoin("w3emc", w3emc_ver))
load(pathJoin("gftl-shared", gftl_shared_ver))
load(pathJoin("mapl", mapl_ver))
load(pathJoin("prod_util", prod_util_ver))

load("ufs-pyenv")
load("atlas")
load(pathJoin("ufs-pyenv", ufs_pyenv_ver))

setenv("CC", "mpiicc")
setenv("CXX", "mpiicpc")
Expand Down
3 changes: 1 addition & 2 deletions modulefiles/build_orion_intel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ load(pathJoin("w3emc", w3emc_ver))
load(pathJoin("gftl-shared", gftl_shared_ver))
load(pathJoin("mapl", mapl_ver))
load(pathJoin("prod_util", prod_util_ver))

load("ufs-pyenv")
load(pathJoin("ufs-pyenv", ufs_pyenv_ver))

setenv("CC", "mpiicc")
setenv("CXX", "mpiicpc")
Expand Down
1 change: 1 addition & 0 deletions modulefiles/tasks/hera/task.analysis.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ load(pathJoin("stack-intel-oneapi-mpi", stack_intel_oneapi_mpi_ver))
load(pathJoin("stack-python", stack_python_ver))

load(pathJoin("prod_util", prod_util_ver))
load(pathJoin("ufs-pyenv", ufs_pyenv_ver))
19 changes: 19 additions & 0 deletions modulefiles/tasks/hera/task.forecast.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,23 @@ load(pathJoin("stack-intel", stack_intel_ver))
load(pathJoin("stack-intel-oneapi-mpi", stack_intel_oneapi_mpi_ver))
load(pathJoin("stack-python", stack_python_ver))

load(pathJoin("jasper", jasper_ver))
load(pathJoin("zlib", zlib_ver))
load(pathJoin("libpng", libpng_ver))
load(pathJoin("hdf5", hdf5_ver))
load(pathJoin("netcdf-c", netcdf_c_ver))
load(pathJoin("netcdf-fortran", netcdf_fortran_ver))
load(pathJoin("parallelio", parallelio_ver))
load(pathJoin("esmf", esmf_ver))
load(pathJoin("fms",fms_ver))
load(pathJoin("bacio", bacio_ver))
load(pathJoin("crtm", crtm_ver))
load(pathJoin("g2", g2_ver))
load(pathJoin("g2tmpl", g2tmpl_ver))
load(pathJoin("ip", ip_ver))
load(pathJoin("sp", sp_ver))
load(pathJoin("w3emc", w3emc_ver))
load(pathJoin("gftl-shared", gftl_shared_ver))
load(pathJoin("mapl", mapl_ver))
load(pathJoin("prod_util", prod_util_ver))
load(pathJoin("ufs-pyenv", ufs_pyenv_ver))
3 changes: 3 additions & 0 deletions modulefiles/tasks/hera/task.post_anal.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,7 @@ load(pathJoin("stack-intel", stack_intel_ver))
load(pathJoin("stack-intel-oneapi-mpi", stack_intel_oneapi_mpi_ver))
load(pathJoin("stack-python", stack_python_ver))

load(pathJoin("hdf5", hdf5_ver))
load(pathJoin("netcdf-c", netcdf_c_ver))
load(pathJoin("netcdf-fortran", netcdf_fortran_ver))
load(pathJoin("prod_util", prod_util_ver))
3 changes: 3 additions & 0 deletions modulefiles/tasks/hera/task.pre_anal.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,7 @@ load(pathJoin("stack-intel", stack_intel_ver))
load(pathJoin("stack-intel-oneapi-mpi", stack_intel_oneapi_mpi_ver))
load(pathJoin("stack-python", stack_python_ver))

load(pathJoin("hdf5", hdf5_ver))
load(pathJoin("netcdf-c", netcdf_c_ver))
load(pathJoin("netcdf-fortran", netcdf_fortran_ver))
load(pathJoin("prod_util", prod_util_ver))
1 change: 1 addition & 0 deletions modulefiles/tasks/orion/task.analysis.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ load(pathJoin("stack-intel-oneapi-mpi", stack_intel_oneapi_mpi_ver))
load(pathJoin("stack-python", stack_python_ver))

load(pathJoin("prod_util", prod_util_ver))
load(pathJoin("ufs-pyenv", ufs_pyenv_ver))
19 changes: 19 additions & 0 deletions modulefiles/tasks/orion/task.forecast.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,23 @@ load(pathJoin("stack-intel", stack_intel_ver))
load(pathJoin("stack-intel-oneapi-mpi", stack_intel_oneapi_mpi_ver))
load(pathJoin("stack-python", stack_python_ver))

load(pathJoin("jasper", jasper_ver))
load(pathJoin("zlib", zlib_ver))
load(pathJoin("libpng", libpng_ver))
load(pathJoin("hdf5", hdf5_ver))
load(pathJoin("netcdf-c", netcdf_c_ver))
load(pathJoin("netcdf-fortran", netcdf_fortran_ver))
load(pathJoin("parallelio", parallelio_ver))
load(pathJoin("esmf", esmf_ver))
load(pathJoin("fms",fms_ver))
load(pathJoin("bacio", bacio_ver))
load(pathJoin("crtm", crtm_ver))
load(pathJoin("g2", g2_ver))
load(pathJoin("g2tmpl", g2tmpl_ver))
load(pathJoin("ip", ip_ver))
load(pathJoin("sp", sp_ver))
load(pathJoin("w3emc", w3emc_ver))
load(pathJoin("gftl-shared", gftl_shared_ver))
load(pathJoin("mapl", mapl_ver))
load(pathJoin("prod_util", prod_util_ver))
load(pathJoin("ufs-pyenv", ufs_pyenv_ver))
3 changes: 3 additions & 0 deletions modulefiles/tasks/orion/task.post_anal.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,7 @@ load(pathJoin("stack-intel", stack_intel_ver))
load(pathJoin("stack-intel-oneapi-mpi", stack_intel_oneapi_mpi_ver))
load(pathJoin("stack-python", stack_python_ver))

load(pathJoin("hdf5", hdf5_ver))
load(pathJoin("netcdf-c", netcdf_c_ver))
load(pathJoin("netcdf-fortran", netcdf_fortran_ver))
load(pathJoin("prod_util", prod_util_ver))
3 changes: 3 additions & 0 deletions modulefiles/tasks/orion/task.pre_anal.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,7 @@ load(pathJoin("stack-intel", stack_intel_ver))
load(pathJoin("stack-intel-oneapi-mpi", stack_intel_oneapi_mpi_ver))
load(pathJoin("stack-python", stack_python_ver))

load(pathJoin("hdf5", hdf5_ver))
load(pathJoin("netcdf-c", netcdf_c_ver))
load(pathJoin("netcdf-fortran", netcdf_fortran_ver))
load(pathJoin("prod_util", prod_util_ver))
9 changes: 0 additions & 9 deletions parm/land_analysis_hera.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ workflow:
PATHRT: "&EXP_BASEDIR;"
PDY: "<cyclestr>@Y@m@d</cyclestr>"
cyc: "<cyclestr>@H</cyclestr>"
PTIME: "<cyclestr offset='-24:00:00'>@Y@m@d@H</cyclestr>"
NTIME: "<cyclestr offset='24:00:00'>@Y@m@d@H</cyclestr>"
DATADEP_FILE1: "<cyclestr>&WARMSTART_DIR;/ufs_land_restart.@Y-@m-@d_@H-00-00.tile1.nc</cyclestr>"
DATADEP_FILE2: "<cyclestr>&WARMSTART_DIR;/ufs_land_restart.@Y-@m-@d_@H-00-00.nc</cyclestr>"
DATADEP_FILE3: "<cyclestr>&DATAROOT;/DATA_SHARE/RESTART/ufs_land_restart.@Y-@m-@d_@H-00-00.tile1.nc</cyclestr>"
Expand All @@ -70,7 +68,6 @@ workflow:
KEEPDATA: "&KEEPDATA;"
PDY: "&PDY;"
cyc: "&cyc;"
PTIME: "&PTIME;"
account: "&ACCOUNT;"
command: '&HOMElandda;/parm/task_load_modules_run_jjob.sh "prep_obs" "&HOMElandda;" "&MACHINE;"'
jobname: prep_obs
Expand Down Expand Up @@ -99,7 +96,6 @@ workflow:
KEEPDATA: "&KEEPDATA;"
PDY: "&PDY;"
cyc: "&cyc;"
PTIME: "&PTIME;"
account: "&ACCOUNT;"
command: '&HOMElandda;/parm/task_load_modules_run_jjob.sh "pre_anal" "&HOMElandda;" "&MACHINE;"'
jobname: pre_anal
Expand Down Expand Up @@ -145,8 +141,6 @@ workflow:
KEEPDATA: "&KEEPDATA;"
PDY: "&PDY;"
cyc: "&cyc;"
PTIME: "&PTIME;"
NTIME: "&NTIME;"
DAtype: "&DAtype;"
SNOWDEPTHVAR: "&SNOWDEPTHVAR;"
NPROC_JEDI: "&NPROCS_ANALYSIS;"
Expand Down Expand Up @@ -182,8 +176,6 @@ workflow:
KEEPDATA: "&KEEPDATA;"
PDY: "&PDY;"
cyc: "&cyc;"
PTIME: "&PTIME;"
NTIME: "&NTIME;"
FCSTHR: "&FCSTHR;"
account: "&ACCOUNT;"
command: '&HOMElandda;/parm/task_load_modules_run_jjob.sh "post_anal" "&HOMElandda;" "&MACHINE;"'
Expand Down Expand Up @@ -216,7 +208,6 @@ workflow:
LOGDIR: "&LOGDIR;"
PDY: "&PDY;"
cyc: "&cyc;"
NTIME: "&NTIME;"
DAtype: "&DAtype;"
FCSTHR: "&FCSTHR;"
account: "&ACCOUNT;"
Expand Down
9 changes: 0 additions & 9 deletions parm/land_analysis_orion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ workflow:
PATHRT: "&EXP_BASEDIR;"
PDY: "<cyclestr>@Y@m@d</cyclestr>"
cyc: "<cyclestr>@H</cyclestr>"
PTIME: "<cyclestr offset='-24:00:00'>@Y@m@d@H</cyclestr>"
NTIME: "<cyclestr offset='24:00:00'>@Y@m@d@H</cyclestr>"
DATADEP_FILE1: "<cyclestr>&WARMSTART_DIR;/ufs_land_restart.@Y-@m-@d_@H-00-00.tile1.nc</cyclestr>"
DATADEP_FILE2: "<cyclestr>&WARMSTART_DIR;/ufs_land_restart.@Y-@m-@d_@H-00-00.nc</cyclestr>"
DATADEP_FILE3: "<cyclestr>&DATAROOT;/DATA_SHARE/RESTART/ufs_land_restart.@Y-@m-@d_@H-00-00.tile1.nc</cyclestr>"
Expand All @@ -70,7 +68,6 @@ workflow:
KEEPDATA: "&KEEPDATA;"
PDY: "&PDY;"
cyc: "&cyc;"
PTIME: "&PTIME;"
account: "&ACCOUNT;"
command: '&HOMElandda;/parm/task_load_modules_run_jjob.sh "prep_obs" "&HOMElandda;" "&MACHINE;"'
jobname: prep_obs
Expand Down Expand Up @@ -99,7 +96,6 @@ workflow:
KEEPDATA: "&KEEPDATA;"
PDY: "&PDY;"
cyc: "&cyc;"
PTIME: "&PTIME;"
account: "&ACCOUNT;"
command: '&HOMElandda;/parm/task_load_modules_run_jjob.sh "pre_anal" "&HOMElandda;" "&MACHINE;"'
jobname: pre_anal
Expand Down Expand Up @@ -145,8 +141,6 @@ workflow:
KEEPDATA: "&KEEPDATA;"
PDY: "&PDY;"
cyc: "&cyc;"
PTIME: "&PTIME;"
NTIME: "&NTIME;"
DAtype: "&DAtype;"
SNOWDEPTHVAR: "&SNOWDEPTHVAR;"
NPROC_JEDI: "&NPROCS_ANALYSIS;"
Expand Down Expand Up @@ -182,8 +176,6 @@ workflow:
KEEPDATA: "&KEEPDATA;"
PDY: "&PDY;"
cyc: "&cyc;"
PTIME: "&PTIME;"
NTIME: "&NTIME;"
FCSTHR: "&FCSTHR;"
account: "&ACCOUNT;"
command: '&HOMElandda;/parm/task_load_modules_run_jjob.sh "post_anal" "&HOMElandda;" "&MACHINE;"'
Expand Down Expand Up @@ -216,7 +208,6 @@ workflow:
LOGDIR: "&LOGDIR;"
PDY: "&PDY;"
cyc: "&cyc;"
NTIME: "&NTIME;"
DAtype: "&DAtype;"
FCSTHR: "&FCSTHR;"
account: "&ACCOUNT;"
Expand Down
8 changes: 0 additions & 8 deletions scripts/exlandda_analysis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,6 @@ FILEDATE=${YYYY}${MM}${DD}.${HH}0000
JEDI_STATICDIR=${JEDI_INSTALL}/jedi-bundle/fv3-jedi/test/Data
JEDI_EXECDIR=${JEDI_INSTALL}/build/bin

# load modulefiles
BUILD_VERSION_FILE="${HOMElandda}/versions/build.ver_${MACHINE}"
if [ -e ${BUILD_VERSION_FILE} ]; then
. ${BUILD_VERSION_FILE}
fi
mkdir -p modulefiles
cp ${HOMElandda}/modulefiles/build_${MACHINE}_intel.lua $DATA/modulefiles/modules.landda.lua
module use modulefiles; module load modules.landda
MPIEXEC=`which mpiexec`

#SNOWDEPTHVAR=snwdph
Expand Down
10 changes: 0 additions & 10 deletions scripts/exlandda_forecast.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,8 @@ nMM=${NTIME:4:2}
nDD=${NTIME:6:2}
nHH=${NTIME:8:2}

# load modulefiles
BUILD_VERSION_FILE="${HOMElandda}/versions/build.ver_${MACHINE}"
if [ -e ${BUILD_VERSION_FILE} ]; then
. ${BUILD_VERSION_FILE}
fi
mkdir -p modulefiles
cp ${HOMElandda}/modulefiles/build_${MACHINE}_intel.lua $DATA/modulefiles/modules.landda.lua
module use modulefiles; module load modules.landda

MPIEXEC=`which mpiexec`


# convert back to UFS tile, run model (all members)
if [[ ${ATMOS_FORC} == "gswp3" ]]; then

Expand Down
10 changes: 0 additions & 10 deletions scripts/exlandda_pre_anal.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,6 @@ HP=${PTIME:8:2}

FILEDATE=${YYYY}${MM}${DD}.${HH}0000

mkdir -p modulefiles
cp ${HOMElandda}/modulefiles/build_${MACHINE}_intel.lua $DATA/modulefiles/modules.landda.lua

# load modulefiles
BUILD_VERSION_FILE="${HOMElandda}/versions/build.ver_${MACHINE}"
if [ -e ${BUILD_VERSION_FILE} ]; then
. ${BUILD_VERSION_FILE}
fi
module use modulefiles; module load modules.landda

if [[ $ATMOS_FORC == "era5" ]]; then
# vector2tile for DA
# copy restarts into work directory
Expand Down
1 change: 1 addition & 0 deletions versions/build.ver_hera
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export sp_ver="2.5.0"
export stack_intel_oneapi_mpi_ver="2021.5.1"
export stack_intel_ver="2021.5.0"
export stack_python_ver="3.10.13"
export ufs_pyenv_ver="1.0.0"
export w3emc_ver="2.10.0"
export zlib_ver="1.2.13"

1 change: 1 addition & 0 deletions versions/build.ver_orion
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export sp_ver="2.5.0"
export stack_intel_oneapi_mpi_ver="2021.5.1"
export stack_intel_ver="2022.0.2"
export stack_python_ver="3.10.13"
export ufs_pyenv_ver="1.0.0"
export w3emc_ver="2.10.0"
export zlib_ver="1.2.13"

0 comments on commit 66b096c

Please sign in to comment.