Skip to content

Commit

Permalink
Merge branch 'ufs-community:develop' into rt-refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
FernandoAndrade-NOAA authored May 22, 2024
2 parents ea7b61a + 635890c commit ae803d8
Show file tree
Hide file tree
Showing 166 changed files with 7,058 additions and 6,254 deletions.
41 changes: 24 additions & 17 deletions .github/workflows/aux.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
name: Helpers
name: Repo Check
on:
workflow_run:
workflows: ["Pull Request Tests"]
types:
- requested
#workflow_run:
# workflows: ["Pull Request Tests"]
# types:
# - requested
pull_request:
branches:
- develop
env:
app: Accept:application/vnd.github.v3+json
base_url: $GITHUB_API_URL/repos/$GITHUB_REPOSITORY/actions/runs
Expand All @@ -30,24 +33,28 @@ jobs:
steps:
- name: Check up-to-dateness and post comment
run: |
head_sha=${{ github.event.workflow_run.head_sha }}
git clone -q ${{ github.event.workflow_run.head_repository.html_url }} .
trap 'echo "exit-code=$?" >> "$GITHUB_OUTPUT"' EXIT
head_sha=${{ github.event.pull_request.head.sha }}
head_brc=${{ github.event.pull_request.head.ref }}
head_url=${{ github.event.pull_request.head.repo.html_url }}
git clone -q -b $head_brc $head_url .
git checkout -q $head_sha
git submodule -q update --init --recursive
cd ${{ github.workspace }}/tests/ci
url=$GITHUB_API_URL/repos/$GITHUB_REPOSITORY
pr_number=$(curl -sS -H $app $url/pulls \
| jq -r '.[] | select(.head.sha == "'"$head_sha"'") | .number')
echo "pr_number is $pr_number"
pr_uid=${{ github.event.workflow_run.head_repository.owner.login }}
pr_uid=${{ github.event.pull_request.head.repo.owner.login }}
echo "pr_uid is $pr_uid"
comment="$(./repo_check.sh $pr_uid 2>/dev/null)"
echo "comment is $comment"
if [[ -n $comment ]]; then
curl -sS -X POST -H $app -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
$url/issues/$pr_number/comments -d '{"body": "'"${comment}"'"}'
echo -n "failure" >~/repocheck_file
else
echo -n "success" >~/repocheck_file
fi
./repo_check.sh
#comment="$(./repo_check.sh 2>/dev/null)"
#echo "comment is $comment"
#if [[ -n $comment ]]; then
# curl -sS -X POST -H $app -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
# $url/issues/$pr_number/comments -d '{"body": "'"${comment}"'"}'
# echo -n "failure" >~/repocheck_file
#else
# echo -n "success" >~/repocheck_file
#fi
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 93 files
+1 −1 .github/PULL_REQUEST_TEMPLATE.md
+5 −4 .github/workflows/test-cice.yml
+67 −8 cicecore/cicedyn/analysis/ice_history.F90
+67 −19 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
+9 −2 cicecore/cicedyn/general/ice_flux.F90
+9 −1 cicecore/cicedyn/general/ice_forcing.F90
+248 −57 cicecore/cicedyn/general/ice_init.F90
+2 −0 cicecore/cicedyn/general/ice_state.F90
+22 −20 cicecore/cicedyn/general/ice_step_mod.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
+9 −8 cicecore/cicedyn/infrastructure/io/io_binary/ice_history_write.F90
+12 −12 cicecore/cicedyn/infrastructure/io/io_binary/ice_restart.F90
+1,048 −1,073 cicecore/cicedyn/infrastructure/io/io_netcdf/ice_history_write.F90
+256 −207 cicecore/cicedyn/infrastructure/io/io_netcdf/ice_restart.F90
+718 −593 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
+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
+52 −6 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
+6 −4 cicecore/drivers/nuopc/dmi/CICE_RunMod.F90
+1 −1 cicecore/drivers/standalone/cice/CICE_InitMod.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
+9 −2 cicecore/shared/ice_restart_shared.F90
+1 −1 configuration/scripts/cice.batch.csh
+20 −0 configuration/scripts/cice.launch.csh
+21 −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
+8 −2 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
+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
+1 −0 configuration/scripts/options/set_nml.histinst
+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
+52 −15 doc/source/user_guide/ug_case_settings.rst
+171 −103 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: 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
13 changes: 8 additions & 5 deletions NOAHMP-interface/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ list(APPEND _noahmp_cap_files noahmp/drivers/nuopc/lnd_comp_kind.F90
noahmp/drivers/nuopc/lnd_comp_domain.F90
noahmp/drivers/nuopc/lnd_comp_import_export.F90
noahmp/drivers/nuopc/lnd_comp_nuopc.F90
noahmp/drivers/nuopc/lnd_comp_driver.F90)
noahmp/drivers/nuopc/lnd_comp_driver.F90
noahmp/drivers/nuopc/lnd_comp_cplscalars.F90)

# CCPP interface
# CCPP interface
list(APPEND _noahmp_ccpp_files noahmp/drivers/ccpp/noahmpdrv.F90
noahmp/drivers/ccpp/sfc_diff.f
noahmp/drivers/ccpp/machine.F
Expand All @@ -25,7 +26,7 @@ list(APPEND _noahmp_files noahmp/src/module_sf_noahmplsm.F90
noahmp/src/module_sf_noahmp_glacier.F90)

#------------------------------------------------------------------------------
# Set CCPP flags for C/C++/Fortran preprocessor
# Set CCPP flags for C/C++/Fortran preprocessor
add_definitions(-DCCPP)

#------------------------------------------------------------------------------
Expand Down Expand Up @@ -55,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
2 changes: 1 addition & 1 deletion WW3
Submodule WW3 updated 39 files
+13 −5 .github/workflows/intel.yml
+38 −11 model/inp/ww3_grid.inp
+1 −1 model/inp/ww3_ounf.inp
+4 −3 model/inp/ww3_shel.inp
+24 −52 model/src/w3adatmd.F90
+11 −0 model/src/w3gdatmd.F90
+17 −1 model/src/w3gridmd.F90
+6 −15 model/src/w3idatmd.F90
+21 −12 model/src/w3initmd.F90
+71 −172 model/src/w3iogomd.F90
+3 −6 model/src/w3iogoncdmd.F90
+10 −0 model/src/w3iogrmd.F90
+18 −0 model/src/w3iorsmd.F90
+2 −4 model/src/w3odatmd.F90
+25 −0 model/src/w3ounfmetamd.F90
+12 −2 model/src/wav_comp_nuopc.F90
+4 −3 model/src/wav_grdout.F90
+46 −10 model/src/wav_import_export.F90
+18 −1 model/src/ww3_ounf.F90
+52 −1 model/src/ww3_outf.F90
+121 −110 regtests/bin/matrix.base
+7 −6 regtests/bin/matrix_cmake_datarmor
+9 −8 regtests/bin/matrix_cmake_milhydro
+1 −0 regtests/bin/matrix_cmake_ncep
+6 −5 regtests/bin/matrix_cmake_ukmo_cray
+58 −0 regtests/ww3_tp2.22/info
+1 −0 regtests/ww3_tp2.22/input/switch
+6 −0 regtests/ww3_tp2.22/input/track_i.ww3
+33 −0 regtests/ww3_tp2.22/input/ww3_grid.inp
+33 −0 regtests/ww3_tp2.22/input/ww3_grid_sdtail.inp
+43 −0 regtests/ww3_tp2.22/input/ww3_ounf.inp
+119 −0 regtests/ww3_tp2.22/input/ww3_ounp.inp
+10 −0 regtests/ww3_tp2.22/input/ww3_outf.inp
+11 −0 regtests/ww3_tp2.22/input/ww3_outp_spec.inp
+10 −0 regtests/ww3_tp2.22/input/ww3_outp_tab51.inp
+10 −0 regtests/ww3_tp2.22/input/ww3_outp_tab52.inp
+10 −0 regtests/ww3_tp2.22/input/ww3_outp_tab53.inp
+42 −0 regtests/ww3_tp2.22/input/ww3_shel.inp
+5 −0 regtests/ww3_tp2.22/input/ww3_strt.inp
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
4 changes: 2 additions & 2 deletions doc/UsersGuide/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ docutils==0.20.1
# sphinx
# sphinx-rtd-theme
# sphinxcontrib-bibtex
idna==3.6
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 Down
Loading

0 comments on commit ae803d8

Please sign in to comment.