Skip to content

Commit

Permalink
add tests on Gaea.
Browse files Browse the repository at this point in the history
  • Loading branch information
binli2337 committed Apr 30, 2024
2 parents 69a420b + 04bbc15 commit b632963
Show file tree
Hide file tree
Showing 125 changed files with 6,484 additions and 6,082 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/super-linter@v6.3.0
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 70 files
+1 −1 .github/PULL_REQUEST_TEMPLATE.md
+4 −2 .github/workflows/test-cice.yml
+16 −4 cicecore/cicedyn/analysis/ice_history.F90
+14 −8 cicecore/cicedyn/analysis/ice_history_shared.F90
+19 −3 cicecore/cicedyn/dynamics/ice_dyn_eap.F90
+52 −11 cicecore/cicedyn/dynamics/ice_dyn_evp.F90
+104 −10 cicecore/cicedyn/dynamics/ice_dyn_shared.F90
+12 −19 cicecore/cicedyn/dynamics/ice_dyn_vp.F90
+29 −112 cicecore/cicedyn/dynamics/ice_transport_remap.F90
+2 −1 cicecore/cicedyn/general/ice_flux.F90
+9 −1 cicecore/cicedyn/general/ice_forcing.F90
+247 −56 cicecore/cicedyn/general/ice_init.F90
+2 −0 cicecore/cicedyn/general/ice_state.F90
+27 −18 cicecore/cicedyn/infrastructure/comm/mpi/ice_global_reductions.F90
+27 −18 cicecore/cicedyn/infrastructure/comm/serial/ice_global_reductions.F90
+27 −27 cicecore/cicedyn/infrastructure/ice_blocks.F90
+45 −34 cicecore/cicedyn/infrastructure/ice_domain.F90
+50 −141 cicecore/cicedyn/infrastructure/ice_grid.F90
+2 −1 cicecore/cicedyn/infrastructure/ice_memusage.F90
+636 −655 cicecore/cicedyn/infrastructure/ice_read_write.F90
+1 −1 cicecore/cicedyn/infrastructure/ice_restoring.F90
+1 −0 cicecore/cicedyn/infrastructure/io/io_binary/ice_history_write.F90
+12 −12 cicecore/cicedyn/infrastructure/io/io_binary/ice_restart.F90
+1,032 −1,061 cicecore/cicedyn/infrastructure/io/io_netcdf/ice_history_write.F90
+256 −207 cicecore/cicedyn/infrastructure/io/io_netcdf/ice_restart.F90
+656 −535 cicecore/cicedyn/infrastructure/io/io_pio2/ice_history_write.F90
+156 −65 cicecore/cicedyn/infrastructure/io/io_pio2/ice_pio.F90
+589 −541 cicecore/cicedyn/infrastructure/io/io_pio2/ice_restart.F90
+32 −1 cicecore/drivers/nuopc/cmeps/ice_comp_nuopc.F90
+44 −34 cicecore/drivers/nuopc/cmeps/ice_import_export.F90
+1 −7 cicecore/drivers/nuopc/cmeps/ice_mesh_mod.F90
+1 −1 cicecore/drivers/standalone/cice/CICE_InitMod.F90
+9 −2 cicecore/shared/ice_restart_shared.F90
+13 −0 configuration/scripts/ice_in
+6 −1 configuration/scripts/machines/Macros.conda_macos
+2 −0 configuration/scripts/machines/env.derecho_cray
+2 −0 configuration/scripts/machines/env.derecho_gnu
+2 −0 configuration/scripts/machines/env.derecho_intel
+2 −0 configuration/scripts/machines/env.derecho_intelclassic
+2 −0 configuration/scripts/machines/env.derecho_inteloneapi
+2 −0 configuration/scripts/machines/env.derecho_nvhpc
+1 −0 configuration/scripts/machines/environment.yml
+1 −0 configuration/scripts/options/set_env.iopio1
+0 −1 configuration/scripts/options/set_env.iopio1p
+0 −1 configuration/scripts/options/set_env.iopio2p
+1 −0 configuration/scripts/options/set_nml.histall
+1 −0 configuration/scripts/options/set_nml.histdbg
+2 −0 configuration/scripts/options/set_nml.iobinary
+2 −0 configuration/scripts/options/set_nml.iocdf1
+2 −0 configuration/scripts/options/set_nml.iocdf2
+2 −0 configuration/scripts/options/set_nml.iocdf5
+2 −0 configuration/scripts/options/set_nml.iohdf5
+4 −0 configuration/scripts/options/set_nml.iohdf5opts
+0 −2 configuration/scripts/options/set_nml.iopio1
+0 −2 configuration/scripts/options/set_nml.iopio1p
+0 −2 configuration/scripts/options/set_nml.iopio2
+0 −2 configuration/scripts/options/set_nml.iopio2p
+10 −0 configuration/scripts/options/set_nml.iopioopts
+2 −0 configuration/scripts/options/set_nml.iopnetcdf1
+2 −0 configuration/scripts/options/set_nml.iopnetcdf2
+2 −0 configuration/scripts/options/set_nml.iopnetcdf5
+3 −3 configuration/scripts/tests/gridsys_suite.ts
+41 −67 configuration/scripts/tests/io_suite.ts
+13 −0 doc/source/cice_index.rst
+8 −2 doc/source/developer_guide/dg_about.rst
+3 −1 doc/source/developer_guide/dg_infra.rst
+51 −14 doc/source/user_guide/ug_case_settings.rst
+97 −29 doc/source/user_guide/ug_implementation.rst
+65 −18 doc/source/user_guide/ug_running.rst
+5 −0 doc/source/user_guide/ug_testing.rst
2 changes: 1 addition & 1 deletion CICE-interface/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ else()
endif()

# Configuration Options
set(CICE_IO "NetCDF" CACHE STRING "CICE OPTIONS: Choose IO options.")
set(CICE_IO "PIO" CACHE STRING "CICE OPTIONS: Choose IO options.")
set_property(CACHE CICE_IO PROPERTY STRINGS "NetCDF" "PIO" "Binary")

# Too many files to list, so include them via this file
Expand Down
2 changes: 1 addition & 1 deletion FV3
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:-}"
8 changes: 7 additions & 1 deletion cmake/Intel.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
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")

if(CMAKE_Platform STREQUAL "derecho.intel")
set(CMAKE_Fortran_LINK_FLAGS "-Wl,--copy-dt-needed-entries")
endif()
Expand Down
2 changes: 1 addition & 1 deletion doc/UsersGuide/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ docutils==0.20.1
# sphinx
# sphinx-rtd-theme
# sphinxcontrib-bibtex
idna==3.6
idna==3.7
# via requests
imagesize==1.4.1
# via sphinx
Expand Down
629 changes: 624 additions & 5 deletions doc/UsersGuide/source/Configurations.rst

Large diffs are not rendered by default.

26 changes: 13 additions & 13 deletions doc/UsersGuide/source/FAQ.rst
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ options:
MOM6, CICE6 and CMEPS restart files
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

In ``nems.configure``, set the ALLCOMP_attribute ``restart_n`` to a
In ``ufs.configure``, set the ALLCOMP_attribute ``restart_n`` to a
value greater than the forecast length.

MOM6 history files
Expand Down Expand Up @@ -229,11 +229,11 @@ How do I set the total number of tasks for my job?
In the UFS WM, each component's MPI task information, including the
starting and ending tasks and the number of threads, are specified
using the component-specific ``petlist_bounds`` and
``omp_num_threads`` in ``nems.configure``. In general, the total
``omp_num_threads`` in ``ufs.configure``. In general, the total
number of MPI tasks required is the sum of all the sub-component
tasks, as long as those components do not overlap (i.e., share the
same PETs). An example of a global 5 component coupled configuration
nems.configure at the end of this section.
ufs.configure at the end of this section.

FV3atm
^^^^^^
Expand Down Expand Up @@ -286,7 +286,7 @@ If ESMF-managed threading is used, the total number of PETs for the
atmosphere component is given by the product of the number of threads
requested and the total number of MPI ranks (both forecast and write
grid component). If ``num_threads_atm`` is the number of threads
specified for the FV3atm component, in ``nems.configure`` the ATM PET
specified for the FV3atm component, in ``ufs.configure`` the ATM PET
bounds are given by

::
Expand All @@ -295,7 +295,7 @@ bounds are given by
ATM_omp_num_threads num_threads_atm

Note that in UWM, the ATM component is normally listed first in
``nems.configure`` so that the starting PET for the ATM is 0.
``ufs.configure`` so that the starting PET for the ATM is 0.

GOCART
^^^^^^
Expand Down Expand Up @@ -330,7 +330,7 @@ MPI tasks for CMEPS is given by

total_tasks_med = smaller of (300, FV3atm forecast tasks)

and in ``nems.configure``
and in ``ufs.configure``

::

Expand All @@ -342,7 +342,7 @@ MOM6

For MOM6 the only restriction currently on the number of MPI ranks
used by MOM6 is that it is divisible by 2. The starting PET in
``nems.configure`` will be the last PET of the preceding component,
``ufs.configure`` will be the last PET of the preceding component,
incremented by one. Threading in MOM6 is not recommended at this time.

::
Expand Down Expand Up @@ -388,14 +388,14 @@ For the 1-deg CICE domain for example, ``ice_in`` would be


In UFS, only a single thread is used for CICE so for ``nprocs`` set in
``ice_in``, the tasks in ``nems.configure`` are set as:
``ice_in``, the tasks in ``ufs.configure`` are set as:

::

ICE_petlist_bounds: starting_ICE_PET nprocs+starting_ICE_PET-1
ICE_omp_num_threads: 1

The starting ICE PET in ``nems.configure`` will be the last PET of the
The starting ICE PET in ``ufs.configure`` will be the last PET of the
preceding component, incremented by one.

WW3
Expand All @@ -409,20 +409,20 @@ for WW3 and the number of threads to be used.
WAV_petlist_bounds: starting_WAV_PET num_tasks_wav*num_threads_wav+starting_WAV_PET-1
WAV_omp_num_threads: num_threads_wav

The starting WAV PET in ``nems.configure`` will be the last PET of the
The starting WAV PET in ``ufs.configure`` will be the last PET of the
preceding component, incremented by one.


Example: 5-component nems.configure
Example: 5-component ufs.configure
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

For the fully coupled S2SWA application, a sample ``nems.configure`` is shown below :
For the fully coupled S2SWA application, a sample ``ufs.configure`` is shown below :


.. code-block:: console
#############################################
#### NEMS Run-Time Configuration File #####
#### UFS Run-Time Configuration File #####
#############################################
# ESMF #
Expand Down
2 changes: 1 addition & 1 deletion doc/UsersGuide/source/InputsOutputs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2288,7 +2288,7 @@ on the monthly, daily, hourly, yearly or timestep intervals set by the *histfreq
*0* for both monthly and daily frequencies and neither yearly nor per-timestep output is requested, only 6-hour
mean history files will be produced.

Further details of the configuration of CICE model output can be found in the CICE documentation `Section 3.1.4 <https://cice-consortium-cice.readthedocs.io/en/main/user_guide/ug_implementation.html#model-output>`__.
Further details of the configuration of CICE model output can be found in the CICE documentation `Section 3.1.4 <https://cice-consortium-cice.readthedocs.io/en/main/user_guide/ug_implementation.html#model-input-and-output>`__.

.. _ww3-out:

Expand Down
4 changes: 3 additions & 1 deletion doc/UsersGuide/source/Introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ The UFS WM code is portable and can be used with Linux or Mac operating systems
Those wishing to contribute development to the UFS WM should become familiar with the procedures for running the model as a standalone component and for executing the regression tests described in the UFS WM GitHub `wiki <https://github.com/ufs-community/ufs-weather-model/wiki/Making-code-changes-in-the-UFS-weather-model-and-its-subcomponents>`__ to make sure no inadvertent changes to the results have been introduced during the development process.

Support for the UFS WM is provided through the `UFS Forum <https://forums.ufscommunity.org/forum/ufs-weather-model>`__ by the Developmental Testbed Center (DTC) and other groups involved in UFS development, such as NOAA's Environmental Modeling Center (:term:`EMC`), NOAA research laboratories (GFDL, NSSL, ESRL, and AOML), and :term:`NCAR`. UFS users and developers are encouraged not only to post questions, but also to help address questions posted by other members of the community.
Support for the UFS WM is provided through the `UFS Forum <https://github.com/ufs-community/ufs-weather-model/discussions>`__ by the Developmental Testbed Center (DTC) and other groups involved in UFS development, such as NOAA's Environmental Modeling Center (:term:`EMC`), NOAA research laboratories (GFDL, NSSL, ESRL, and AOML), and :term:`NCAR`. UFS users and developers are encouraged not only to post questions, but also to help address questions posted by other members of the community.

This WM User's Guide is organized as follows:

Expand All @@ -57,6 +57,8 @@ This WM User's Guide is organized as follows:

* :numref:`Chapter %s <InputsOutputs>` (Data: Input, Model Configuration, and Output Files) lists the model inputs and outputs and has a description of the key files.

* :numref:`Chapter %s <Configurations>` (Configurations) lists the currently supported configurations for the UFS WM.

* :numref:`Chapter %s <ConfigParams>` (Configuration Parameters) lists the purpose and valid values for various configuration parameters.

* :numref:`Chapter %s <AutomatedTesting>` (Automated Testing) describes UFS WM automated testing options.
Expand Down
9 changes: 6 additions & 3 deletions doc/UsersGuide/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,12 @@
# The master toctree document.
master_doc = 'index'

# The language for content autogenerated by Sphinx.
# Not set because default is 'en'.
# language = 'en'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = 'en'

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
Expand Down
2 changes: 1 addition & 1 deletion tests/bl_date.conf
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export BL_DATE=20240401
export BL_DATE=20240419
Loading

0 comments on commit b632963

Please sign in to comment.