Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgeGayno-NOAA committed Nov 2, 2023
2 parents af9f96d + 971cfc5 commit 67700a5
Show file tree
Hide file tree
Showing 118 changed files with 4,903 additions and 5,062 deletions.
3 changes: 3 additions & 0 deletions CICE-interface/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
if(CMAKE_Fortran_COMPILER_ID MATCHES "GNU")
set(CMAKE_Fortran_FLAGS "-g -fbacktrace")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fconvert=big-endian -ffree-line-length-none ")
if(${CMAKE_Fortran_COMPILER_VERSION} VERSION_GREATER_EQUAL 10)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fallow-argument-mismatch -fallow-invalid-boz")
endif()
set(CMAKE_Fortran_FLAGS_RELEASE "-O2")
set(CMAKE_Fortran_FLAGS_DEBUG "-O0 -Wall -Wextra -fcheck=bounds -ffpe-trap=invalid,zero,overflow,underflow" )
set(CMAKE_Fortran_LINK_FLAGS "" )
Expand Down
8 changes: 4 additions & 4 deletions CMEPS-interface/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ endif()
### Source files
###############################################################################

list(APPEND _nems_util_files
list(APPEND _ufs_util_files
CMEPS/ufs/flux_atmocn_mod.F90
CMEPS/ufs/glc_elevclass_mod.F90
CMEPS/ufs/ufs_kind_mod.F90
Expand Down Expand Up @@ -60,7 +60,7 @@ list(APPEND _mediator_files
CMEPS/mediator/med_merge_mod.F90
CMEPS/mediator/med_constants_mod.F90
CMEPS/mediator/med_kind_mod.F90
CMEPS/mediator/esmFldsExchange_nems_mod.F90
CMEPS/mediator/esmFldsExchange_ufs_mod.F90
CMEPS/mediator/med_phases_prep_lnd_mod.F90
CMEPS/mediator/med_phases_prep_atm_mod.F90
CMEPS/mediator/med_phases_prep_ocn_mod.F90
Expand Down Expand Up @@ -134,7 +134,7 @@ if(CMEPS_AOFLUX)
endif(return_code EQUAL 0)

### Add extra driver file to the source
list(APPEND _nems_util_files
list(APPEND _ufs_util_files
CMEPS/ufs/ccpp/driver/med_ccpp_driver.F90
CMEPS/ufs/flux_atmocn_ccpp_mod.F90
CMEPS/ufs/ufs_io_mod.F90)
Expand Down Expand Up @@ -172,7 +172,7 @@ endif()
###############################################################################

### Create target library
add_library(cmeps STATIC ${_nems_util_files} ${_mediator_files} ${SCHEMES} ${CAPS} ${API})
add_library(cmeps STATIC ${_ufs_util_files} ${_mediator_files} ${SCHEMES} ${CAPS} ${API})

### Set PUBLIC interfaces on the library
set_target_properties(cmeps PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/mod)
Expand Down
2 changes: 1 addition & 1 deletion GOCART
Submodule GOCART updated 2 files
+1 −0 CHANGELOG.md
+6 −0 CMakeLists.txt
2 changes: 1 addition & 1 deletion WW3
Submodule WW3 updated 1 files
+8 −1 model/src/w3wavemd.F90
2 changes: 1 addition & 1 deletion driver/UFS.F90
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ PROGRAM UFS
!*** Initialize the ESMF framework.
!-----------------------------------------------------------------------
!
CALL ESMF_Initialize(configFileName="nems.configure" & !<-- top level configuration
CALL ESMF_Initialize(configFileName="ufs.configure" & !<-- top level configuration
,defaultCalKind =ESMF_CALKIND_GREGORIAN & !<-- Set up the default calendar.
,VM =VM & !<-- The ESMF Virtual Machine
,rc =RC)
Expand Down
6 changes: 3 additions & 3 deletions driver/UFSDriver.F90
Original file line number Diff line number Diff line change
Expand Up @@ -199,13 +199,13 @@ SUBROUTINE UFSDriver_SS(driver,RC)
! create, open, and set the config
config = ESMF_ConfigCreate(rc=RC)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
call ESMF_ConfigLoadFile(config, "nems.configure", rc=RC)
call ESMF_ConfigLoadFile(config, "ufs.configure", rc=RC)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
call ESMF_GridCompSet(driver, config=config, rc=RC)
if (ChkErr(rc,__LINE__,u_FILE_u)) return

! Load the required entries from the fd_nems.yaml file
call NUOPC_FieldDictionarySetup("fd_nems.yaml", rc=rc)
! Load the required entries from the fd_ufs.yaml file
call NUOPC_FieldDictionarySetup("fd_ufs.yaml", rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return

!-----------------------------------------------------------------------
Expand Down
3 changes: 1 addition & 2 deletions modulefiles/ufs_acorn.intel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@ help([[
Load environment to build UFS on Acorn with Intel compiler
]])

prepend_path("MODULEPATH", "/lfs/h1/emc/nceplibs/noscrub/spack-stack/spack-stack-1.4.1/envs/ufs-pio-2.5.10/install/modulefiles/Core")
prepend_path("MODULEPATH", "/lfs/h1/emc/nceplibs/noscrub/spack-stack/spack-stack-1.5.0/envs/unified-env/install/modulefiles/Core")

load("stack-intel")
load("stack-cray-mpich")
load("stack-python")

--Avoid production installations; use spack-stack only:
remove_path("MODULEPATH", "/apps/ops/prod/libs/modulefiles/compiler/intel/19.1.3.304")
Expand Down
6 changes: 3 additions & 3 deletions modulefiles/ufs_common.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ local ufs_modules = {
{["crtm"] = "2.4.0"},
{["g2"] = "3.4.5"},
{["g2tmpl"] = "1.10.2"},
{["ip"] = "3.3.3"},
{["ip"] = "4.3.0"},
{["sp"] = "2.3.3"},
{["w3emc"] = "2.9.2"},
{["w3emc"] = "2.10.0"},
{["gftl-shared"] = "1.5.0"},
{["mapl"] = "2.35.2-esmf-8.4.2"},
{["scotch"] = "7.0.3"},
{["scotch"] = "7.0.4"},
}

for i = 1, #ufs_modules do
Expand Down
11 changes: 5 additions & 6 deletions modulefiles/ufs_gaea.intel.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
help([[
This module loads libraries required for building and running UFS Weather Model
This module loads libraries required for building and running UFS Weather Model
on the NOAA RDHPC machine Gaea using Intel-2022.0.2
]])

Expand All @@ -10,18 +10,14 @@ unload("cray-mpich")
unload("cray-python")
unload("darshan")

prepend_path("MODULEPATH", "/lustre/f2/dev/wpo/role.epic/contrib/spack-stack/spack-stack-1.4.1-c4/envs/ufs-pio-2.5.10/install/modulefiles/Core")
prepend_path("MODULEPATH", "/lustre/f2/pdata/esrl/gsd/spack-stack/modulefiles")
prepend_path("MODULEPATH", "/lustre/f2/dev/wpo/role.epic/contrib/spack-stack/c4/spack-stack-1.5.0/envs/unified-env/install/modulefiles/Core")

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

stack_cray_mpich_ver=os.getenv("stack_cray_mpich_ver") or "7.7.20"
load(pathJoin("stack-cray-mpich", stack_cray_mpich_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))

Expand All @@ -30,6 +26,9 @@ load("alps")

load("ufs_common")

nccmp_ver=os.getenv("nccmp_ver") or "1.9.0.1"
load(pathJoin("nccmp", nccmp_ver))

setenv("CC","cc")
setenv("CXX","CC")
setenv("FC","ftn")
Expand Down
9 changes: 5 additions & 4 deletions modulefiles/ufs_hera.gnu.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ help([[
loads UFS Model prerequisites for Hera/GNU
]])

prepend_path("MODULEPATH", "/scratch1/NCEPDEV/nems/role.epic/spack-stack/spack-stack-1.4.1/envs/ufs-pio-2.5.10/install/modulefiles/Core")
prepend_path("MODULEPATH", "/scratch1/NCEPDEV/nems/role.epic/spack-stack/spack-stack-1.5.0/envs/unified-env-noavx512/install/modulefiles/Core")
-- for openmpi, need
prepend_path("MODULEPATH", "/scratch1/NCEPDEV/jcsda/jedipara/spack-stack/modulefiles")

stack_gnu_ver=os.getenv("stack_gnu_ver") or "9.2.0"
Expand All @@ -11,14 +12,14 @@ load(pathJoin("stack-gcc", stack_gnu_ver))
stack_openmpi_ver=os.getenv("stack_openmpi_ver") or "4.1.5"
load(pathJoin("stack-openmpi", stack_openmpi_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))

load("ufs_common")

nccmp_ver=os.getenv("nccmp_ver") or "1.9.0.1"
load(pathJoin("nccmp", nccmp_ver))

setenv("CC", "mpicc")
setenv("CXX", "mpic++")
setenv("FC", "mpif90")
Expand Down
9 changes: 4 additions & 5 deletions modulefiles/ufs_hera.intel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,22 @@ help([[
loads UFS Model prerequisites for Hera/Intel
]])

prepend_path("MODULEPATH", "/scratch1/NCEPDEV/nems/role.epic/spack-stack/spack-stack-1.4.1/envs/ufs-pio-2.5.10/install/modulefiles/Core")
prepend_path("MODULEPATH", "/scratch1/NCEPDEV/jcsda/jedipara/spack-stack/modulefiles")
prepend_path("MODULEPATH", "/scratch1/NCEPDEV/nems/role.epic/spack-stack/spack-stack-1.5.0/envs/unified-env-noavx512/install/modulefiles/Core")

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))

load("ufs_common")

nccmp_ver=os.getenv("nccmp_ver") or "1.9.0.1"
load(pathJoin("nccmp", nccmp_ver))

setenv("CC", "mpiicc")
setenv("CXX", "mpiicpc")
setenv("FC", "mpiifort")
Expand Down
42 changes: 8 additions & 34 deletions modulefiles/ufs_hercules.gnu.lua
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -2,49 +2,23 @@ help([[
loads UFS Model prerequisites for Hercules/GNU
]])

prepend_path("MODULEPATH", "/work/noaa/epic/role-epic/spack-stack/hercules/spack-stack-dev-20230825/envs/ufs-pio-2.5.10/install/modulefiles/Core")
prepend_path("MODULEPATH", "/work/noaa/epic/role-epic/spack-stack/hercules/spack-stack-1.5.0/envs/unified-env-mvap2/install/modulefiles/Core")
-- for mvapich2, need:
prepend_path("MODULEPATH", "/work/noaa/epic/role-epic/spack-stack/hercules/modulefiles")

stack_gnu_ver=os.getenv("stack_gnu_ver") or "11.3.1"
load(pathJoin("stack-gcc", stack_gnu_ver))

stack_openmpi_ver=os.getenv("stack_openmpi_ver") or "4.1.5"
load(pathJoin("stack-openmpi", stack_openmpi_ver))

stack_python_ver=os.getenv("stack_python_ver") or "3.9.14"
load(pathJoin("stack-python", stack_python_ver))
stack_mvapich2_ver=os.getenv("stack_mvapich2_ver") or "2.3.7"
load(pathJoin("stack-mvapich2", stack_mvapich2_ver))

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

local ufs_modules = {
{["jasper"] = "2.0.32"},
{["zlib"] = "1.2.13"},
{["libpng"] = "1.6.37"},
{["hdf5"] = "1.14.0"},
{["netcdf-c"] = "4.9.2"},
{["netcdf-fortran"] = "4.6.0"},
{["parallelio"] = "2.5.10"},
{["esmf"] = "8.4.2"},
{["fms"] = "2023.01"},
{["bacio"] = "2.4.1"},
{["crtm"] = "2.4.0"},
{["g2"] = "3.4.5"},
{["g2tmpl"] = "1.10.2"},
{["ip"] = "3.3.3"},
{["sp"] = "2.3.3"},
{["w3emc"] = "2.9.2"},
{["gftl-shared"] = "1.5.0"},
{["mapl"] = "2.35.2-esmf-8.4.2"},
{["scotch"] = "7.0.4"},
}

for i = 1, #ufs_modules do
for name, default_version in pairs(ufs_modules[i]) do
local env_version_name = string.gsub(name, "-", "_") .. "_ver"
load(pathJoin(name, os.getenv(env_version_name) or default_version))
end
end
load("ufs_common")

nccmp_ver=os.getenv("nccmp_ver") or "1.9.0.1"
load(pathJoin("nccmp", nccmp_ver))

setenv("CC", "mpicc")
setenv("CXX", "mpic++")
Expand Down
38 changes: 5 additions & 33 deletions modulefiles/ufs_hercules.intel.lua
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -2,49 +2,21 @@ help([[
loads UFS Model prerequisites for Hercules/Intel
]])

prepend_path("MODULEPATH", "/work/noaa/epic/role-epic/spack-stack/hercules/spack-stack-dev-20230825/envs/ufs-pio-2.5.10/install/modulefiles/Core")
prepend_path("MODULEPATH", "/work/noaa/epic/role-epic/spack-stack/hercules/modulefiles")
prepend_path("MODULEPATH", "/work/noaa/epic/role-epic/spack-stack/hercules/spack-stack-1.5.0/envs/unified-env/install/modulefiles/Core")

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

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

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

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

local ufs_modules = {
{["jasper"] = "2.0.32"},
{["zlib"] = "1.2.13"},
{["libpng"] = "1.6.37"},
{["hdf5"] = "1.14.0"},
{["netcdf-c"] = "4.9.2"},
{["netcdf-fortran"] = "4.6.0"},
{["parallelio"] = "2.5.10"},
{["esmf"] = "8.4.2"},
{["fms"] = "2023.01"},
{["bacio"] = "2.4.1"},
{["crtm"] = "2.4.0"},
{["g2"] = "3.4.5"},
{["g2tmpl"] = "1.10.2"},
{["ip"] = "3.3.3"},
{["sp"] = "2.3.3"},
{["w3emc"] = "2.9.2"},
{["gftl-shared"] = "1.5.0"},
{["mapl"] = "2.35.2-esmf-8.4.2"},
{["scotch"] = "7.0.4"},
}

for i = 1, #ufs_modules do
for name, default_version in pairs(ufs_modules[i]) do
local env_version_name = string.gsub(name, "-", "_") .. "_ver"
load(pathJoin(name, os.getenv(env_version_name) or default_version))
end
end
load("ufs_common")

nccmp_ver=os.getenv("nccmp_ver") or "1.9.0.1"
load(pathJoin("nccmp", nccmp_ver))

setenv("CC", "mpiicc")
setenv("CXX", "mpiicpc")
Expand Down
9 changes: 4 additions & 5 deletions modulefiles/ufs_jet.intel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,22 @@ help([[
loads UFS Model prerequisites for Jet/Intel
]])

prepend_path("MODULEPATH", "/mnt/lfs4/HFIP/hfv3gfs/role.epic/spack-stack/spack-stack-1.4.1/envs/ufs-pio-2.5.10/install/modulefiles/Core")
prepend_path("MODULEPATH", "/lfs4/HFIP/hfv3gfs/spack-stack/modulefiles")
prepend_path("MODULEPATH", "/mnt/lfs4/HFIP/hfv3gfs/role.epic/spack-stack/spack-stack-1.5.0/envs/unified-env/install/modulefiles/Core")

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))

load("ufs_common")

nccmp_ver=os.getenv("nccmp_ver") or "1.9.0.1"
load(pathJoin("nccmp", nccmp_ver))

setenv("CC", "mpiicc")
setenv("CXX", "mpiicpc")
setenv("FC", "mpiifort")
Expand Down
37 changes: 37 additions & 0 deletions modulefiles/ufs_linux.intel
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/bin/bash

#%Module######################################################################
##
## UFS prerequisites: Linux (tested: Ubuntu) with gcc/gfortran compilers

echo "Setting environment variables for UFS Model on Linux with gcc/gfortran"

##
## load programming environment: compiler, flags, paths
##
export CC=${CC:-mpicc}
export CXX=${CXX:-mpicxx}
export F77=${F77:-mpif77}
export F90=${F90:-mpif90}
export FC=${FC:-mpif90}

##
## set up variables for ../cmake/configure_linux.intel.cmake
##
export CMAKE_Platform=linux.intel

##
## use own NetCDF library
##
export NETCDF=${NETCDF:-/home/builder/opt}

##
## use pre-compiled EMSF library for above compiler / MPI combination
##
export ESMFMKFILE=${ESMFMKFILE:-/home/builder/opt/lib/esmf.mk}

##
## NCEP libraries (need to download and build manually, see doc/README_{UBUNTU,CENTOS,...}.txt and https://github.com/NCAR/NCEPlibs)
##
export NCEPLIBS_DIR=${NCEPLIBS_DIR:-/home/builder/opt}
export CMAKE_PREFIX_PATH=${NCEPLIBS_DIR}
Loading

0 comments on commit 67700a5

Please sign in to comment.