Skip to content

Commit

Permalink
Merge remote-tracking branch 'ufs-community/develop' into updateRTs_p…
Browse files Browse the repository at this point in the history
…8_to_EP5
  • Loading branch information
NickSzapiro-NOAA committed Jun 6, 2024
2 parents 5c19ed6 + 485ccdf commit 1d2bff1
Show file tree
Hide file tree
Showing 150 changed files with 6,454 additions and 6,284 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/superlinter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
name: Super-Linter

on:
push: null
pull_request: null

jobs:
build:
name: Lint
runs-on: ubuntu-latest

permissions:
contents: read
packages: read
statuses: write

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Super-Linter
uses: super-linter/[email protected]
env:
LINTER_RULES_PATH: /
DEFAULT_BRANCH: origin/develop
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
FILTER_REGEX_EXCLUDE: .*(tests/fv3_conf/.*|tests/ci/.*|tests/auto/.*|tests/auto-jenkins/.*|tests/opnReqTests/.*|tests/opnReqTest|tests/atparse.bash).*
VALIDATE_BASH: true
BASH_SEVERITY: style
#VALIDATE_GITHUB_ACTIONS: true
#VALIDATE_LUA: true
#VALIDATE_MARKDOWN: true
#VALIDATE_PYTHON_PYLINT: true
#VALIDATE_YAML: true
16 changes: 16 additions & 0 deletions .shellcheckrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Global settings for Shellcheck (https://github.com/koalaman/shellcheck)
enable=all

external-sources=true

# Disable variable referenced but not assigned
disable=SC2154

# Disable following non-constant source
disable=SC1090

# Disable non-existent binary
disable=SC1091

# Disable -p -m only applies to deepest directory
disable=SC2174
2 changes: 1 addition & 1 deletion CICE-interface/CICE
Submodule CICE updated 37 files
+1 −2 .github/workflows/test-cice.yml
+51 −4 cicecore/cicedyn/analysis/ice_history.F90
+53 −11 cicecore/cicedyn/analysis/ice_history_shared.F90
+8 −2 cicecore/cicedyn/general/ice_flux.F90
+1 −1 cicecore/cicedyn/general/ice_init.F90
+22 −20 cicecore/cicedyn/general/ice_step_mod.F90
+8 −8 cicecore/cicedyn/infrastructure/io/io_binary/ice_history_write.F90
+97 −93 cicecore/cicedyn/infrastructure/io/io_netcdf/ice_history_write.F90
+87 −83 cicecore/cicedyn/infrastructure/io/io_pio2/ice_history_write.F90
+1 −1 cicecore/cicedyn/infrastructure/io/io_pio2/ice_pio.F90
+5 −3 cicecore/drivers/direct/hadgem3/CICE_RunMod.F90
+5 −3 cicecore/drivers/direct/nemo_concepts/CICE_RunMod.F90
+6 −4 cicecore/drivers/mct/cesm1/CICE_RunMod.F90
+6 −4 cicecore/drivers/nuopc/cmeps/CICE_RunMod.F90
+20 −5 cicecore/drivers/nuopc/cmeps/ice_comp_nuopc.F90
+6 −4 cicecore/drivers/nuopc/dmi/CICE_RunMod.F90
+6 −4 cicecore/drivers/standalone/cice/CICE_RunMod.F90
+2 −1 cicecore/drivers/unittest/opticep/CICE_InitMod.F90
+6 −4 cicecore/drivers/unittest/opticep/CICE_RunMod.F90
+22 −20 cicecore/drivers/unittest/opticep/ice_step_mod.F90
+1 −1 configuration/scripts/cice.batch.csh
+20 −0 configuration/scripts/cice.launch.csh
+8 −0 configuration/scripts/ice_in
+60 −0 configuration/scripts/machines/Macros.carpenter_cray
+69 −0 configuration/scripts/machines/Macros.carpenter_gnu
+69 −0 configuration/scripts/machines/Macros.carpenter_gnuimpi
+59 −0 configuration/scripts/machines/Macros.carpenter_intel
+59 −0 configuration/scripts/machines/Macros.carpenter_intelimpi
+2 −1 configuration/scripts/machines/Macros.conda_macos
+54 −0 configuration/scripts/machines/env.carpenter_cray
+58 −0 configuration/scripts/machines/env.carpenter_gnu
+58 −0 configuration/scripts/machines/env.carpenter_gnuimpi
+57 −0 configuration/scripts/machines/env.carpenter_intel
+57 −0 configuration/scripts/machines/env.carpenter_intelimpi
+1 −0 configuration/scripts/options/set_nml.histinst
+1 −1 doc/source/user_guide/ug_case_settings.rst
+75 −75 doc/source/user_guide/ug_implementation.rst
2 changes: 1 addition & 1 deletion CMEPS-interface/CMEPS
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ set(JEDI_DRIVER OFF CACHE BOOL "Enable JEDI as top level driver")
set(CMEPS_AOFLUX OFF CACHE BOOL "Enable atmosphere-ocean flux calculation in mediator")
set(PDLIB OFF CACHE BOOL "Enable Domain Decomposition in WW3 via PDLIB")
set(CDEPS_INLINE OFF CACHE BOOL "Enable CDEPS inline capability")
set(HYDRO OFF CACHE BOOL "Enable hydrostatic set")

set(CMAKE_Platform $ENV{CMAKE_Platform})
if(CMAKE_Platform)
Expand Down Expand Up @@ -122,6 +123,7 @@ message("PARALLEL_NETCDF .. ${PARALLEL_NETCDF}")
message("JEDI_DRIVER ...... ${JEDI_DRIVER}")
message("CMEPS_AOFLUX ..... ${CMEPS_AOFLUX}")
message("CDEPS_INLINE ..... ${CDEPS_INLINE}")
message("HYDRO ........... ${HYDRO}")

message("")

Expand Down
6 changes: 4 additions & 2 deletions NOAHMP-interface/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,10 @@ endif()

#------------------------------------------------------------------------------
# Add model-specific flags for C/C++/Fortran preprocessor
add_definitions(-DMOIST_CAPPA -DUSE_COND -DNEMS_GSM)
add_definitions(-DINTERNAL_FILE_NML)
if (NOT HYDRO)
add_definitions(-DMOIST_CAPPA -DUSE_COND)
endif()
add_definitions(-DINTERNAL_FILE_NML -DNEMS_GSM)

#------------------------------------------------------------------------------
# NOAHMP
Expand Down
24 changes: 16 additions & 8 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,21 +1,29 @@
#!/bin/bash
set -eu

if [[ $(uname -s) == Darwin ]]; then
readonly UFS_MODEL_DIR=$(cd "$(dirname "$(greadlink -f -n "${BASH_SOURCE[0]}" )" )" && pwd -P)
uname_s=$(uname -s)
if [[ ${uname_s} == Darwin ]]; then
UFS_MODEL_DIR=$(greadlink -f -n "${BASH_SOURCE[0]}")
UFS_MODEL_DIR=$(dirname "${UFS_MODEL_DIR}")
UFS_MODEL_DIR=$(cd "${UFS_MODEL_DIR}" && pwd -P)
else
readonly UFS_MODEL_DIR=$(cd "$(dirname "$(readlink -f -n "${BASH_SOURCE[0]}" )" )" && pwd -P)
UFS_MODEL_DIR=$(readlink -f -n "${BASH_SOURCE[0]}")
UFS_MODEL_DIR=$(dirname "${UFS_MODEL_DIR}")
UFS_MODEL_DIR=$(cd "${UFS_MODEL_DIR}" && pwd -P)
fi
echo "UFS MODEL DIR: ${UFS_MODEL_DIR}"
readonly UFS_MODEL_DIR

export CC=${CC:-mpicc}
export CXX=${CXX:-mpicxx}
export FC=${FC:-mpif90}

BUILD_DIR=${BUILD_DIR:-${UFS_MODEL_DIR}/build}
mkdir -p ${BUILD_DIR}
mkdir -p "${BUILD_DIR}"

cd ${BUILD_DIR}
cmake ${UFS_MODEL_DIR} ${CMAKE_FLAGS}
cd "${BUILD_DIR}"
ARR_CMAKE_FLAGS=()
for i in ${CMAKE_FLAGS}; do ARR_CMAKE_FLAGS+=("${i}") ; done
cmake "${UFS_MODEL_DIR}" "${ARR_CMAKE_FLAGS[@]}"
# Turn off OpenMP threading for parallel builds
# to avoid exhausting the number of user processes
OMP_NUM_THREADS=1 make -j ${BUILD_JOBS:-4} VERBOSE=${BUILD_VERBOSE:-}
OMP_NUM_THREADS=1 make -j "${BUILD_JOBS:-4}" "VERBOSE=${BUILD_VERBOSE:-}"
11 changes: 10 additions & 1 deletion cmake/Intel.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -g -traceback -fpp -fno-alias -auto -safe-cray-ptr -ftz -assume byterecl -nowarn -sox -align array64byte -qno-opt-dynamic-align")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -g -traceback -fpp -fno-alias -auto -safe-cray-ptr -ftz -assume byterecl -sox -align array64byte -qno-opt-dynamic-align")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -qno-opt-dynamic-align -sox -fp-model source")

# warning #5462: Global name too long.
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -diag-disable 5462")

# remark #7712: This variable has not been used.
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -diag-disable 7712")

# remark #8291: Recommended relationship between field width 'W' and the number of fractional digits 'D' in this edit descriptor is 'W>=D+7'.
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -diag-disable 8291")

if(CMAKE_Platform STREQUAL "derecho.intel")
set(CMAKE_Fortran_LINK_FLAGS "-Wl,--copy-dt-needed-entries")
endif()
Expand Down
14 changes: 5 additions & 9 deletions doc/UsersGuide/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This file is autogenerated by pip-compile with Python 3.9
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# pip-compile requirements.in
Expand All @@ -12,6 +12,8 @@ certifi==2024.2.2
# via requests
charset-normalizer==3.3.2
# via requests
colorama==0.4.6
# via sphinx
docutils==0.20.1
# via
# pybtex-docutils
Expand All @@ -22,11 +24,7 @@ idna==3.7
# via requests
imagesize==1.4.1
# via sphinx
importlib-metadata==7.0.1
# via
# sphinx
# sphinxcontrib-bibtex
jinja2==3.1.3
jinja2==3.1.4
# via sphinx
latexcodec==2.0.1
# via pybtex
Expand All @@ -44,7 +42,7 @@ pygments==2.17.2
# via sphinx
pyyaml==6.0.1
# via pybtex
requests==2.31.0
requests==2.32.0
# via sphinx
six==1.16.0
# via
Expand Down Expand Up @@ -78,5 +76,3 @@ sphinxcontrib-serializinghtml==1.1.10
# via sphinx
urllib3==2.2.1
# via requests
zipp==3.17.0
# via importlib-metadata
4 changes: 3 additions & 1 deletion doc/UsersGuide/source/BuildingAndRunning.rst
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,9 @@ To run a single test, users can try the following command instead of creating a

.. code-block:: console
./rt.sh -r -k -n control_p8
./rt.sh -r -k -n "control_p8 <compiler>"
where ``<compiler>`` is ``gnu`` or ``intel``.

Troubleshooting
^^^^^^^^^^^^^^^^^^
Expand Down
2 changes: 1 addition & 1 deletion doc/UsersGuide/source/Glossary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Glossary
Global atmospheric model based on fluid dynamics principles, including Euler's equations of motion.

EMC
The `Environmental Modeling Center <https://www.emc.ncep.noaa.gov/emc_new.php>`__ is one of :term:`NCEP`'s nine centers and leads the :term:`National Weather Service <NWS>`'s modeling efforts.
The `Environmental Modeling Center <https://www.emc.ncep.noaa.gov/emc.php>`_ is one of :term:`NCEP`'s nine centers and leads the :term:`National Weather Service <NWS>`'s modeling efforts.

ESMF
`Earth System Modeling Framework <https://earthsystemmodeling.org/docs/release/latest/ESMF_usrdoc/>`__. The ESMF defines itself as "a suite of software tools for developing high-performance, multi-component Earth science modeling applications." It is a community-developed software infrastructure for building and coupling models.
Expand Down
2 changes: 1 addition & 1 deletion modulefiles/ufs_acorn.intel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ help([[
Load environment to build UFS on Acorn with Intel compiler
]])

prepend_path("MODULEPATH", "/lfs/h1/emc/nceplibs/noscrub/spack-stack/spack-stack-1.5.1/envs/unified-env/install/modulefiles/Core")
prepend_path("MODULEPATH", "/lfs/h1/emc/nceplibs/noscrub/spack-stack/spack-stack-1.6.0/envs/unified-env/install/modulefiles/Core")

load("stack-intel")
load("stack-cray-mpich")
Expand Down
10 changes: 5 additions & 5 deletions modulefiles/ufs_common.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ local ufs_modules = {
{["libpng"] = "1.6.37"},
{["hdf5"] = "1.14.0"},
{["netcdf-c"] = "4.9.2"},
{["netcdf-fortran"] = "4.6.0"},
{["netcdf-fortran"] = "4.6.1"},
{["parallelio"] = "2.5.10"},
{["esmf"] = "8.5.0"},
{["fms"] = "2023.02.01"},
{["esmf"] = "8.6.0"},
{["fms"] = "2023.04"},
{["bacio"] = "2.4.1"},
{["crtm"] = "2.4.0"},
{["g2"] = "3.4.5"},
{["g2tmpl"] = "1.10.2"},
{["ip"] = "4.3.0"},
{["sp"] = "2.3.3"},
{["sp"] = "2.5.0"},
{["w3emc"] = "2.10.0"},
{["gftl-shared"] = "1.6.1"},
{["mapl"] = "2.40.3-esmf-8.5.0"},
{["mapl"] = "2.40.3-esmf-8.6.0"},
{["scotch"] = "7.0.4"},
}

Expand Down
4 changes: 2 additions & 2 deletions modulefiles/ufs_gaea.intel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ load("intel-classic/2023.1.0")
load("cray-mpich/8.1.25")
load("python/3.9.12")

prepend_path("MODULEPATH", "/ncrc/proj/epic/spack-stack/spack-stack-1.5.1/envs/unified-env/install/modulefiles/Core")
prepend_path("MODULEPATH", "/ncrc/proj/epic/spack-stack/spack-stack-1.6.0/envs/unified-env/install/modulefiles/Core")
prepend_path("MODULEPATH", "/ncrc/proj/epic/spack-stack/modulefiles")

stack_intel_ver=os.getenv("stack_intel_ver") or "2023.1.0"
Expand All @@ -19,7 +19,7 @@ load(pathJoin("stack-intel", stack_intel_ver))
stack_cray_mpich_ver=os.getenv("stack_cray_mpich_ver") or "8.1.25"
load(pathJoin("stack-cray-mpich", stack_cray_mpich_ver))

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

load("ufs_common")
Expand Down
11 changes: 8 additions & 3 deletions modulefiles/ufs_hera.gnu.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@ help([[
loads UFS Model prerequisites for Hera/GNU
]])

prepend_path("MODULEPATH", "/scratch1/NCEPDEV/nems/role.epic/spack-stack/spack-stack-1.5.1/envs/unified-env-rocky8/install/modulefiles/Core")
prepend_path("MODULEPATH", "/scratch2/NCEPDEV/stmp1/role.epic/installs/gnu/modulefiles")
prepend_path("MODULEPATH", "/scratch2/NCEPDEV/stmp1/role.epic/installs/openmpi/modulefiles")
prepend_path("MODULEPATH", "/scratch2/NCEPDEV/stmp1/role.epic/spack-stack/spack-stack-1.6.0_gnu13/envs/ufs-wm-srw-rocky8/install/modulefiles/Core")

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

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

cmake_ver=os.getenv("cmake_ver") or "3.23.1"
Expand All @@ -18,6 +20,9 @@ load("ufs_common")
nccmp_ver=os.getenv("nccmp_ver") or "1.9.0.1"
load(pathJoin("nccmp", nccmp_ver))

prepend_path("CPPFLAGS", " -I/apps/slurm_hera/23.11.3/include/slurm"," ")
prepend_path("LD_LIBRARY_PATH", "/apps/slurm_hera/23.11.3/lib")

setenv("CC", "mpicc")
setenv("CXX", "mpic++")
setenv("FC", "mpif90")
Expand Down
2 changes: 1 addition & 1 deletion modulefiles/ufs_hera.intel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ help([[
loads UFS Model prerequisites for Hera/Intel
]])

prepend_path("MODULEPATH", "/scratch1/NCEPDEV/nems/role.epic/spack-stack/spack-stack-1.5.1/envs/unified-env-rocky8/install/modulefiles/Core")
prepend_path("MODULEPATH", "/scratch1/NCEPDEV/nems/role.epic/spack-stack/spack-stack-1.6.0/envs/unified-env-rocky8/install/modulefiles/Core")

stack_intel_ver=os.getenv("stack_intel_ver") or "2021.5.0"
load(pathJoin("stack-intel", stack_intel_ver))
Expand Down
2 changes: 1 addition & 1 deletion modulefiles/ufs_hercules.gnu.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ help([[
loads UFS Model prerequisites for Hercules/GNU
]])

prepend_path("MODULEPATH", "/work/noaa/epic/role-epic/spack-stack/hercules/spack-stack-1.5.1/envs/unified-env/install/modulefiles/Core")
prepend_path("MODULEPATH", "/work/noaa/epic/role-epic/spack-stack/hercules/spack-stack-1.6.0/envs/unified-env/install/modulefiles/Core")
-- for mvapich2, need:
prepend_path("MODULEPATH", "/work/noaa/epic/role-epic/spack-stack/hercules/modulefiles")

Expand Down
2 changes: 1 addition & 1 deletion modulefiles/ufs_hercules.intel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ help([[
loads UFS Model prerequisites for Hercules/Intel
]])

prepend_path("MODULEPATH", "/work/noaa/epic/role-epic/spack-stack/hercules/spack-stack-1.5.1/envs/unified-env/install/modulefiles/Core")
prepend_path("MODULEPATH", "/work/noaa/epic/role-epic/spack-stack/hercules/spack-stack-1.6.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))
Expand Down
2 changes: 1 addition & 1 deletion modulefiles/ufs_jet.intel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ help([[
loads UFS Model prerequisites for Jet/Intel
]])

prepend_path("MODULEPATH", "/mnt/lfs4/HFIP/hfv3gfs/role.epic/spack-stack/spack-stack-1.5.1/envs/unified-env-rocky8/install/modulefiles/Core")
prepend_path("MODULEPATH", "/mnt/lfs4/HFIP/hfv3gfs/role.epic/spack-stack/spack-stack-1.6.0/envs/unified-env-rocky8/install/modulefiles/Core")

stack_intel_ver=os.getenv("stack_intel_ver") or "2021.5.0"
load(pathJoin("stack-intel", stack_intel_ver))
Expand Down
3 changes: 1 addition & 2 deletions modulefiles/ufs_noaacloud.intel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ help([[
loads UFS Model prerequisites for NOAA Parallelworks/Intel
]])


prepend_path("MODULEPATH", "/contrib/spack-stack/spack-stack-1.5.1/envs/unified-env/install/modulefiles/Core")
prepend_path("MODULEPATH", "/contrib/spack-stack/spack-stack-1.6.0/envs/unified-env/install/modulefiles/Core")

stack_intel_ver=os.getenv("stack_intel_ver") or "2021.3.0"
load(pathJoin("stack-intel", stack_intel_ver))
Expand Down
2 changes: 1 addition & 1 deletion modulefiles/ufs_orion.intel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ help([[
loads UFS Model prerequisites for Orion/Intel
]])

prepend_path("MODULEPATH", "/work/noaa/epic/role-epic/spack-stack/orion/spack-stack-1.5.1/envs/unified-env/install/modulefiles/Core")
prepend_path("MODULEPATH", "/work/noaa/epic/role-epic/spack-stack/orion/spack-stack-1.6.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))
Expand Down
2 changes: 1 addition & 1 deletion modulefiles/ufs_s4.intel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ help([[
loads UFS Model prerequisites for S4/Intel
]])

prepend_path("MODULEPATH", "/data/prod/jedi/spack-stack/spack-stack-1.5.0/envs/unified-env/install/modulefiles/Core")
prepend_path("MODULEPATH", "/data/prod/jedi/spack-stack/spack-stack-1.6.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))
Expand Down
Loading

0 comments on commit 1d2bff1

Please sign in to comment.