Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update modulefiles and UFS Weather model build option #6

Merged
merged 20 commits into from
May 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
20 changes: 19 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ cmake_minimum_required( VERSION 3.12 )
project( LandDA VERSION 0.0.0 LANGUAGES C CXX Fortran)

if(DEFINED ENV{JEDI_INSTALL})
set( JEDI_INSTALL $ENV{JEDI_INSTALL}/fv3-bundle)
set( JEDI_INSTALL $ENV{JEDI_INSTALL}/jedi-bundle)
else()
message(FATAL_ERROR "Define the environment variable 'JEDI_INSTALL' to point to the parent directory of fv3-bundle on your system")
endif()
Expand All @@ -21,6 +21,14 @@ enable_testing()
include( ecbuild_system NO_POLICY_SCOPE )
ecbuild_declare_project()

# Inlcude externalproject
# -----------------------
include(ExternalProject)

# Initialize bundle
# -----------------
ecbuild_bundle_initialize()

list( APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
include( landda_compiler_flags )

Expand All @@ -36,6 +44,16 @@ include_directories( ${NETCDF_INCLUDE_DIRS} )
################################################################################
set( LANDDA_LINKER_LANGUAGE CXX)

ExternalProject_Add(ufs-weather-model
PREFIX ${CMAKE_CURRENT_BINARY_DIR}/ufs-weather-model
GIT_REPOSITORY https://github.com/ufs-community/ufs-weather-model
GIT_SUBMODULES_RECURSE TRUE
GIT_TAG develop
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/ufs-weather-model
CMAKE_ARGS ${SOURCE_DIR} -DAPP=LND -DMPI=ON -DCMAKE_BUILD_TYPE=Release
INSTALL_COMMAND cmake
)

add_subdirectory( vector2tile )
add_subdirectory( ufs-land-driver )
add_subdirectory( DA_update/add_jedi_incr )
Expand Down
75 changes: 75 additions & 0 deletions modulefiles/landda_container.intel.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
help([[
loads Land DA prerequisites for Singularity/Intel
]])

setenv("EPICHOME", "/opt")

prepend_path("MODULEPATH", pathJoin(os.getenv("EPICHOME"),"spack-stack/spack-stack-1.3.0/envs/unified-dev/install/modulefiles/Core"))

load("stack-intel/2021.8.0")
load("stack-intel-oneapi-mpi/2021.8.0")
load("stack-python/3.8.10")
load("cmake/3.23.1")
load("ecbuild/3.6.5")
load("libjpeg/2.1.0")
load("jasper/2.0.32")
load("zlib/1.2.13")
load("libpng/1.6.37")
load("pkg-config/0.29.2")
load("hdf5/1.14.0")
load("curl/7.68.0")
load("zstd/1.5.2")
load("netcdf-c/4.9.2")
load("netcdf-fortran/4.6.0")
load("parallel-netcdf/1.12.2")
load("parallelio/2.5.9")
load("esmf/8.3.0b09")
load("fms/2022.04")
load("bacio/2.4.1")
load("crtm-fix/2.4.0_emc")
load("git-lfs/2.9.2")
load("crtm/2.4.0")
load("g2/3.4.5")
load("g2tmpl/1.10.2")
load("ip/3.3.3")
load("sp/2.3.3")
load("w3emc/2.9.2")
load("gftl/1.8.1")
load("gftl-shared/1.5.0")
load("yafyaml/0.5.1")
load("mapl/2.22.0-esmf-8.3.0b09")
load("openblas/0.3.19")
load("py-setuptools/59.4.0")
load("py-numpy/1.22.3")
load("py-cftime/1.0.3.4")
load("py-cython/0.29.32")
load("py-f90nml/1.4.3")
load("py-markupsafe/2.1.1")
load("py-jinja2/3.1.2")
load("py-netcdf4/1.5.3")
load("py-bottleneck/1.3.5")
load("py-pyparsing/3.0.9")
load("py-packaging/21.3")
load("py-numexpr/2.8.3")
load("py-six/1.16.0")
load("py-python-dateutil/2.8.2")
load("py-pytz/2022.2.1")
load("py-pandas/1.4.0")
load("py-pyyaml/6.0")
--modules below this line used for jedi builds
load("udunits/2.2.28")
load("boost/1.78.0")
load("eigen/3.4.0")
load("eckit/1.20.2")
load("fftw/3.3.10")
load("fckit/0.10.0")
load("fiat/1.1.0")
load("ectrans/1.2.0")
load("atlas/0.32.1")

setenv("CC", "mpiicc")
setenv("CXX", "mpiicpc")
setenv("FC", "mpiifort")

setenv("JEDI_INSTALL", pathJoin(os.getenv("EPICHOME"),""))

90 changes: 76 additions & 14 deletions modulefiles/landda_hera.intel.lua
Original file line number Diff line number Diff line change
@@ -1,26 +1,88 @@
help([[
loads Land DA prerequisites for Hera/Intel
loads UFS Model prerequisites for Hera/Intel
]])

setenv("EPICHOME", "/scratch1/NCEPDEV/nems/role.epic")
prepend_path("MODULEPATH", "/scratch1/NCEPDEV/nems/role.epic/spack-stack/spack-stack-1.3.0/envs/unified-env/install/modulefiles/Core")
prepend_path("MODULEPATH", "/scratch1/NCEPDEV/jcsda/jedipara/spack-stack/modulefiles")

stack_intel_ver=os.getenv("stack_intel_ver") or "2021.5.0"
load(pathJoin("stack-intel", stack_intel_ver))

stack_impi_ver=os.getenv("stack_impi_ver") or "2021.5.1"
load(pathJoin("stack-intel-oneapi-mpi", stack_impi_ver))

stack_python_ver=os.getenv("stack_python_ver") or "3.9.12"
load(pathJoin("stack-python", stack_python_ver))

cmake_ver=os.getenv("cmake_ver") or "3.23.1"
load(pathJoin("cmake", cmake_ver))

ecbuild_ver=os.getenv("ecbuild_ver") or "3.6.5"
load(pathJoin("ecbuild", ecbuild_ver))

jasper_ver=os.getenv("jasper_ver") or "2.0.32"
load(pathJoin("jasper", jasper_ver))

zlib_ver=os.getenv("zlib_ver") or "1.2.13"
load(pathJoin("zlib", zlib_ver))

libpng_ver=os.getenv("libpng_ver") or "1.6.37"
load(pathJoin("libpng", libpng_ver))

hdf5_ver=os.getenv("hdf5_ver") or "1.14.0"
load(pathJoin("hdf5", hdf5_ver))

netcdf_c_ver=os.getenv("netcdf_ver") or "4.9.0"
load(pathJoin("netcdf-c", netcdf_c_ver))

netcdf_fortran_ver=os.getenv("netcdf_fortran_ver") or "4.6.0"
load(pathJoin("netcdf-fortran", netcdf_fortran_ver))

prepend_path("MODULEPATH", pathJoin(os.getenv("EPICHOME"),"miniconda3/modulefiles"))
pio_ver=os.getenv("pio_ver") or "2.5.9"
load(pathJoin("parallelio", pio_ver))

load("miniconda3/4.12.0")
esmf_ver=os.getenv("esmf_ver") or "8.3.0b09"
load(pathJoin("esmf", esmf_ver))

prepend_path("MODULEPATH", pathJoin(os.getenv("EPICHOME"),"spack-stack/envs/landda-release-1.0-intel/install/modulefiles/Core"))
fms_ver=os.getenv("fms_ver") or "2022.04"
load(pathJoin("fms",fms_ver))

load("stack-intel")
load("stack-intel-oneapi-mpi")
load("netcdf-c")
load("netcdf-fortran")
load("cmake")
load("ecbuild")
load("stack-python")
bacio_ver=os.getenv("bacio_ver") or "2.4.1"
load(pathJoin("bacio", bacio_ver))

crtm_ver=os.getenv("crtm_ver") or "2.4.0"
load(pathJoin("crtm", crtm_ver))

g2_ver=os.getenv("g2_ver") or "3.4.5"
load(pathJoin("g2", g2_ver))

g2tmpl_ver=os.getenv("g2tmpl_ver") or "1.10.2"
load(pathJoin("g2tmpl", g2tmpl_ver))

ip_ver=os.getenv("ip_ver") or "3.3.3"
load(pathJoin("ip", ip_ver))

sp_ver=os.getenv("sp_ver") or "2.3.3"
load(pathJoin("sp", sp_ver))

w3emc_ver=os.getenv("w3emc_ver") or "2.9.2"
load(pathJoin("w3emc", w3emc_ver))

gftl_shared_ver=os.getenv("gftl_shared_ver") or "v1.5.0"
load(pathJoin("gftl-shared", gftl_shared_ver))

mapl_ver=os.getenv("mapl_ver") or "2.22.0-esmf-8.3.0b09"
load(pathJoin("mapl", mapl_ver))

load("ufs-pyenv")
load("atlas")

setenv("CC", "mpiicc")
setenv("CXX", "mpiicpc")
setenv("FC", "mpiifort")
setenv("JEDI_INSTALL", pathJoin(os.getenv("EPICHOME"),"contrib"))
setenv("CMAKE_Platform", "hera.intel")

setenv("EPICHOME", "/scratch1/NCEPDEV/nems/role.epic")
setenv("JEDI_INSTALL", pathJoin(os.getenv("EPICHOME"),"contrib/v1.1"))

whatis("Description: Land DA build environment")
whatis("Description: UFS build environment")
90 changes: 76 additions & 14 deletions modulefiles/landda_orion.intel.lua
Original file line number Diff line number Diff line change
@@ -1,26 +1,88 @@
help([[
loads Land DA prerequisites for Orion/Intel
loads UFS Model prerequisites for Orion/Intel
]])

setenv("EPICHOME", "/work/noaa/epic-ps/role-epic-ps")
prepend_path("MODULEPATH", "/work/noaa/epic-ps/role-epic-ps/spack-stack/spack-stack-1.3.0/envs/unified-env/install/modulefiles/Core")
prepend_path("MODULEPATH", "/work/noaa/da/role-da/spack-stack/modulefiles")

stack_intel_ver=os.getenv("stack_intel_ver") or "2022.0.2"
load(pathJoin("stack-intel", stack_intel_ver))

stack_impi_ver=os.getenv("stack_impi_ver") or "2021.5.1"
load(pathJoin("stack-intel-oneapi-mpi", stack_impi_ver))

stack_python_ver=os.getenv("stack_python_ver") or "3.9.7"
load(pathJoin("stack-python", stack_python_ver))

cmake_ver=os.getenv("cmake_ver") or "3.22.1"
load(pathJoin("cmake", cmake_ver))

ecbuild_ver=os.getenv("ecbuild_ver") or "3.6.5"
load(pathJoin("ecbuild", ecbuild_ver))

jasper_ver=os.getenv("jasper_ver") or "2.0.32"
load(pathJoin("jasper", jasper_ver))

zlib_ver=os.getenv("zlib_ver") or "1.2.13"
load(pathJoin("zlib", zlib_ver))

libpng_ver=os.getenv("libpng_ver") or "1.6.37"
load(pathJoin("libpng", libpng_ver))

hdf5_ver=os.getenv("hdf5_ver") or "1.14.0"
load(pathJoin("hdf5", hdf5_ver))

netcdf_c_ver=os.getenv("netcdf_ver") or "4.9.0"
load(pathJoin("netcdf-c", netcdf_c_ver))

netcdf_fortran_ver=os.getenv("netcdf_fortran_ver") or "4.6.0"
load(pathJoin("netcdf-fortran", netcdf_fortran_ver))

prepend_path("MODULEPATH", pathJoin(os.getenv("EPICHOME"),"miniconda3/modulefiles"))
pio_ver=os.getenv("pio_ver") or "2.5.9"
load(pathJoin("parallelio", pio_ver))

load("miniconda3/4.12.0")
esmf_ver=os.getenv("esmf_ver") or "8.3.0b09"
load(pathJoin("esmf", esmf_ver))

prepend_path("MODULEPATH", pathJoin(os.getenv("EPICHOME"),"spack-stack/envs/landda-release-1.0-intel/install/modulefiles/Core"))
fms_ver=os.getenv("fms_ver") or "2022.04"
load(pathJoin("fms",fms_ver))

load("stack-intel")
load("stack-intel-oneapi-mpi")
load("netcdf-c")
load("netcdf-fortran")
load("cmake")
load("ecbuild")
load("stack-python")
bacio_ver=os.getenv("bacio_ver") or "2.4.1"
load(pathJoin("bacio", bacio_ver))

crtm_ver=os.getenv("crtm_ver") or "2.4.0"
load(pathJoin("crtm", crtm_ver))

g2_ver=os.getenv("g2_ver") or "3.4.5"
load(pathJoin("g2", g2_ver))

g2tmpl_ver=os.getenv("g2tmpl_ver") or "1.10.2"
load(pathJoin("g2tmpl", g2tmpl_ver))

ip_ver=os.getenv("ip_ver") or "3.3.3"
load(pathJoin("ip", ip_ver))

sp_ver=os.getenv("sp_ver") or "2.3.3"
load(pathJoin("sp", sp_ver))

w3emc_ver=os.getenv("w3emc_ver") or "2.9.2"
load(pathJoin("w3emc", w3emc_ver))

gftl_shared_ver=os.getenv("gftl_shared_ver") or "v1.5.0"
load(pathJoin("gftl-shared", gftl_shared_ver))

mapl_ver=os.getenv("mapl_ver") or "2.22.0-esmf-8.3.0b09"
load(pathJoin("mapl", mapl_ver))

load("ufs-pyenv")

setenv("CC", "mpiicc")
setenv("CXX", "mpiicpc")
setenv("FC", "mpiifort")
setenv("JEDI_INSTALL", pathJoin(os.getenv("EPICHOME"),"contrib"))
setenv("CMAKE_Platform", "orion.intel")

setenv("EPICHOME", "/work/noaa/epic-ps/role-epic-ps")
setenv("JEDI_INSTALL", pathJoin(os.getenv("EPICHOME"),"contrib/v1.1"))

whatis("Description: UFS build environment")

whatis("Description: Land DA build environment")
Loading