Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into mp_pr162_HR3
Browse files Browse the repository at this point in the history
* upstream/main:
  Add GP SDFs/NMLs to SCM
  minor fix/cleanup
  Add namelist option and sigmab (tracer) for HR3
  add SCM_RRFS_v1 SDF, nml, tracer file; update suite_info; update scm_type_defs to recgonize new tracers
  add script to download and stage climatological aerosol data and fix typo in HR3 namelist
  merge in changes from NCAR#428 from @hertneky
  add CITATION.cff file from @scrasmussen from NCAR#458
  merge changes from @hertneky in NCAR#446
  add HR3 suite and physics namelist from NCAR#445 from @bluefinweiwei
  changes from @bluefinweiwei for PR#419
  Revert submodules
  Update physics
  Address reviewers comments
  update ccpp/physics submodule pointer
  Moving documentation to ReadTheDocs (NCAR#438)
  Synced physics
  update ccpp/physics submodule
  update ccpp/framework
  update CCPP_typedefs to work with PR#181
  update ccpp/physics and .gitmodules
  Added step to skip gridpoint in ensemble if error during case generation
  Added utility script to create input file containing replay points
  Omission from previous commit
  Add capability to use input file with longitude and latitude lists
  update ccpp/physics submodule
  update .gitmodules for whitespace change removal
  update ccpp/physics and .gitmodules
  update ccpp/physics and .gitmodules
  update ccpp/physics submodule pointer
  point .gitmodules back to my branch for CI testing
  update ccpp/physics and .gitmodules
  update ccpp/physics and .gitmodules
  update ccpp/physics and .gitmodules
  Cleanup/Housekeeping. Remove unnecessary interpolation step
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Revert change to CMakeLists
  Revert change to CMakeLists
  Revert change to CMakeLists
  Revert change to CMakeLists
  Update CI
  Update CI
  Add file for Nvidia RTS
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update cmakelists
  Updated CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CMakeLists for Nvidia support
  Update CMakeLists for Nvidia support
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Update CI
  Foundatio for Nvidia CI script
  Synced physics
  Small cahnge from physics needed for replay
  Replay with RUC and NoahMP LSM working
  Some changes for Man to test
  If using model initial conditions and forcing from the UFS (e.g. Replay mode) with an active LSM, the SCM performs a cold-start initialization for the LSM. That is, UFS replay mode currently support cases generated from UFS Restart files (e.g spun up (warm) LSM parameters)
  update ccpp/physics and revert .gitmodules
  update ccpp/physics submodule and revert .gitmodules
  changes to work with ufs/dev PR#155
  update for ufs/dev PR#94
  update ccpp/physics and .gitmodules
  update ccpp/physics and .gitmodules after testing
  • Loading branch information
mzhangw committed May 22, 2024
2 parents 769f18d + 148b068 commit ba91f2a
Show file tree
Hide file tree
Showing 70 changed files with 5,268 additions and 2,671 deletions.
264 changes: 264 additions & 0 deletions .github/workflows/ci_build_scm_ubuntu_22.04_nvidia.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,264 @@
name: CI test to build the CCPP-SCM on ubuntu v22.04

on: [push,pull_request,workflow_dispatch]

jobs:

build_scm:
# The type of runner that the job will run on
runs-on: ubuntu-22.04
strategy:
matrix:
fortran-compiler: [nvfortran]
build-type: [Release]#, Debug]
enable-gpu-acc: [False, True]
py-version: [3.7.13, 3.9.12]

# Environmental variables
env:
NETCDF: /home/runner/netcdf
bacio_ROOT: /home/runner/bacio
sp_ROOT: /home/runner/NCEPLIBS-sp
w3emc_ROOT: /home/runner/myw3emc
SCM_ROOT: /home/runner/work/ccpp-scm/ccpp-scm
zlib_ROOT: /home/runner/zlib
HDF5_ROOT: /home/runner/hdf5
suites: SCM_GFS_v15p2,SCM_GFS_v16,SCM_GFS_v17_p8,SCM_HRRR,SCM_RRFS_v1beta,SCM_RAP,SCM_WoFS_v0
suites_ps: SCM_GFS_v15p2_ps,SCM_GFS_v16_ps,SCM_GFS_v17_p8_ps,SCM_HRRR_ps,SCM_RRFS_v1beta_ps,SCM_RAP_ps,SCM_WoFS_v0_ps

# Workflow steps
steps:

#######################################################################################
# Cleanup space
#######################################################################################
- name: Check space (pre)
run: |
df -h
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
# this might remove tools that are actually needed,
# if set to "true" but frees about 6 GB
tool-cache: false

# all of these default to true, but feel free to set to
# "false" if necessary for your workflow
android: false
dotnet: false
haskell: true
large-packages: true
docker-images: false
swap-storage: false

- name: Check space (post)
run: |
df -h
#######################################################################################
# Initial
#######################################################################################
- name: Checkout SCM code (into /home/runner/work/ccpp-scm/)
uses: actions/checkout@v3

- name: Initialize submodules
run: git submodule update --init --recursive

#######################################################################################
# Python setup
#######################################################################################
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: ${{matrix.py-version}}

- name: Add conda to system path
run: |
echo $CONDA/bin >> $GITHUB_PATH
- name: Install NetCDF Python libraries
run: |
conda install --yes -c conda-forge h5py>=3.4 netCDF4 f90nml
#######################################################################################
# Install Nvidia.
#######################################################################################

- name: Nvidia setup compilers.
env:
NVCOMPILERS: /home/runner/hpc_sdk
NVARCH: Linux_x86_64
NVHPC_SILENT: true
NVHPC_INSTALL_DIR: /home/runner/hpc_sdk
NVHPC_INSTALL_TYPE: network
NVHPC_INSTALL_LOCAL_DIR: /home/runner/hpc_sdk
run: |
mkdir /home/runner/hpc_sdk && cd /home/runner/hpc_sdk
wget -q https://developer.download.nvidia.com/hpc-sdk/24.1/nvhpc_2024_241_Linux_x86_64_cuda_12.3.tar.gz
tar xpzf nvhpc_2024_241_Linux_x86_64_cuda_12.3.tar.gz
nvhpc_2024_241_Linux_x86_64_cuda_12.3/install
export PATH=${PATH}:${NVCOMPILERS}/${NVARCH}/24.1/compilers/bin
export MANPATH=${MANPATH}:${NVCOMPILERS}/${NVARCH}/24.1/compilers/man
echo "The nvfortran installed is:"
nvfortran --version
echo "The path to nvfortran is:"
command -v nvfortran
echo "Removing tarball"
rm nvhpc_2024_241_Linux_x86_64_cuda_12.3.tar.gz
- name: Set environment for Nvidia compiler.
run: |
echo "CC=/home/runner/hpc_sdk/Linux_x86_64/24.1/compilers/bin/nvc" >> $GITHUB_ENV
echo "FC=/home/runner/hpc_sdk/Linux_x86_64/24.1/compilers/bin/nvfortran" >> $GITHUB_ENV
echo "CMAKE_C_COMPILER=/home/runner/hpc_sdk/Linux_x86_64/24.1/compilers/bin/nvc" >> $GITHUB_ENV
echo "CMAKE_Fortran_COMPILER=/home/runner/hpc_sdk/Linux_x86_64/24.1/compilers/bin/nvfortran" >> $GITHUB_ENV
#######################################################################################
# Install FORTRAN dependencies
#######################################################################################

- name: Install zlib
env:
CFLAGS: -fPIC
run: |
wget https://github.com/madler/zlib/releases/download/v1.2.13/zlib-1.2.13.tar.gz
tar -zxvf zlib-1.2.13.tar.gz
cd zlib-1.2.13
./configure --prefix=${zlib_ROOT}
make
make install
echo "LD_LIBRARY_PATH=$zlib_ROOT/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV
- name: Install HDF5
env:
CPPFLAGS: -I${zlib_ROOT}/include
LDFLAGS: -L${zlib_ROOT}/lib
run: |
wget https://github.com/HDFGroup/hdf5/archive/refs/tags/hdf5-1_14_1-2.tar.gz
tar -zxvf hdf5-1_14_1-2.tar.gz
cd hdf5-hdf5-1_14_1-2
./configure --prefix=${HDF5_ROOT} --with-zlib=${zlib_ROOT}
make -j4
make install
echo "LD_LIBRARY_PATH=$HDF5_ROOT/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV
echo "PATH=$HDF5_ROOT/lib:$PATH" >> $GITHUB_ENV
- name: Install Curl
run: |
sudo apt-get install curl
sudo apt-get install libssl-dev libcurl4-openssl-dev
- name: Cache NetCDF C library
id: cache-netcdf-c
uses: actions/cache@v3
with:
path: /home/runner/netcdf-c
key: cache-netcdf-c-${{matrix.fortran-compiler}}-key

- name: Install NetCDF C library
if: steps.cache-netcdf-c.outputs.cache-hit != 'true'
run: |
wget https://github.com/Unidata/netcdf-c/archive/refs/tags/v4.7.4.tar.gz
tar -zvxf v4.7.4.tar.gz
cd netcdf-c-4.7.4
CPPFLAGS="-I/home/runner/hdf5/include -I/home/runner/zlib/include" LDFLAGS="-L/home/runner/hdf5/lib -L/home/runner/zlib/lib" ./configure --prefix=${NETCDF}
make
make install
echo "LD_LIBRARY_PATH=$NETCDF/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV
echo "PATH=$NETCDF/lib:$PATH" >> $GITHUB_ENV
- name: Cache NetCDF Fortran library
id: cache-netcdf-fortran
uses: actions/cache@v3
with:
path: /home/runner/netcdf-fortran
key: cache-netcdf-fortran-${{matrix.fortran-compiler}}-key

- name: Install NetCDF Fortran library
if: steps.cache-netcdf-fortran.outputs.cache-hit != 'true'
run: |
wget https://github.com/Unidata/netcdf-fortran/archive/refs/tags/v4.6.1.tar.gz
tar -zvxf v4.6.1.tar.gz
cd netcdf-fortran-4.6.1
FCFLAGS="-fPIC" FFLAGS="-fPIC" CPPFLAGS="-I/home/runner/hdf5/include -I/home/runner/zlib/include -I/home/runner/netcdf/include" LDFLAGS="-L/home/runner/hdf5/lib -L/home/runner/zlib/lib -L/home/runner/netcdf/lib" ./configure --prefix=${NETCDF}
make
make install
- name: Cache bacio library v2.4.1
id: cache-bacio-fortran
uses: actions/cache@v3
with:
path: /home/runner/bacio
key: cache-bacio-fortran-${{matrix.fortran-compiler}}-key

- name: Install bacio library v2.4.1
if: steps.cache-bacio-fortran.outputs.cache-hit != 'true'
run: |
git clone --branch v2.4.1 https://github.com/NOAA-EMC/NCEPLIBS-bacio.git bacio
cd bacio && mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=${bacio_ROOT} ../
make -j2
make install
echo "bacio_DIR=/home/runner/bacio/lib/cmake/bacio" >> $GITHUB_ENV
- name: Cache SP-library v2.3.3
id: cache-sp-fortran
uses: actions/cache@v3
with:
path: /home/runner/NCEPLIBS-sp
key: cache-sp-fortran-${{matrix.fortran-compiler}}-key

- name: Install SP-library v2.3.3
if: steps.cache-sp-fortran.outputs.cache-hit != 'true'
run: |
git clone --branch v2.3.3 https://github.com/NOAA-EMC/NCEPLIBS-sp.git NCEPLIBS-sp
cd NCEPLIBS-sp && mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=${sp_ROOT} ../
make -j2
make install
echo "sp_DIR=/home/runner/NCEPLIBS-sp/lib/cmake/sp" >> $GITHUB_ENV
- name: Cache w3emc library v2.9.2
id: cache-w3emc-fortran
uses: actions/cache@v3
with:
path: /home/runner/myw3emc
key: cache-w3emc-fortran-${{matrix.fortran-compiler}}-key

- name: Install w3emc library v2.9.2
if: steps.cache-w3emc-fortran.outputs.cache-hit != 'true'
run: |
git clone --branch v2.9.2 https://github.com/NOAA-EMC/NCEPLIBS-w3emc.git NCEPLIBS-w3emc
cd NCEPLIBS-w3emc && mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=${w3emc_ROOT} ../
make -j2
make install
echo "w3emc_DIR=/home/runner/myw3emc/lib/cmake/w3emc" >> $GITHUB_ENV
#######################################################################################
# Build and run SCM regression tests (ccpp-scm/test/rt_test_cases.py)
#######################################################################################

- name: Configure build with CMake
run: |
cd ${SCM_ROOT}/scm
mkdir bin && cd bin
cmake -DCCPP_SUITES=${suites},${suites_ps} -DCMAKE_BUILD_TYPE=${{matrix.build-type}} -DENABLE_NVIDIA_OPENACC=${{matrix.enable-gpu-acc}} ../src
- name: Build SCM.
run: |
cd ${SCM_ROOT}/scm/bin
make -j4
- name: Download data for SCM
run: |
cd ${SCM_ROOT}
./contrib/get_all_static_data.sh
./contrib/get_thompson_tables.sh
- name: Run SCM RTs (w/o GPU)
if: contains(matrix.enable-gpu-acc, 'False')
run: |
cd ${SCM_ROOT}/scm/bin
./run_scm.py --file /home/runner/work/ccpp-scm/ccpp-scm/test/rt_test_cases.py --runtime_mult 0.1 -v
33 changes: 33 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the OS, Python version and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.12"
# You can also specify other tool versions:
# nodejs: "19"
# rust: "1.64"
# golang: "1.19"

# Build documentation in the "docs/" directory with Sphinx
sphinx:
configuration: scm/doc/TechGuide/conf.py

# Optionally build your docs in additional formats such as PDF and ePub
formats:
- htmlzip
- pdf
- epub

# Optional but recommended, declare the Python requirements required
# to build your documentation
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
install:
- requirements: scm/doc/TechGuide/requirements.txt
54 changes: 54 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
title: "CCPP Single Column Model (SCM)"
version: 6.0.0
message: "Please cite this software using the metadata from this file."
type: software
identifiers:
- description: "This is the archived snapshot of all versions of CCPP SCM"
type: doi
value: 10.5281/zenodo.6896437
- description: "This is the archived snapshot of CCPP SCM v6.0.0"
type: doi
value: 10.5281/zenodo.6896438
repository-code: "https://github.com/NCAR/ccpp-scm"
url: "https://dtcenter.org/community-code/common-community-physics-package-ccpp"
authors:
- given-names: Grant
family-names: Firl
affiliation: >-
Cooperative Institute for Research in the Atmosphere,
Developmental Testbed Center,
National Oceanic and Atmospheric Administration Global Systems Laboratory
orcid: 0009-0001-7076-2735
- given-names: Dustin
family-names: Swales
affiliation: >-
Developmental Testbed Center and
National Oceanic and Atmospheric Administration Global Systems Laboratory
orcid: 0000-0002-5322-4521
- given-names: Laurie
family-names: Carson
affiliation: >-
Developmental Testbed Center and National Center for Atmospheric Research
- given-names: Ligia
family-names: Bernardet
affiliation: >-
Developmental Testbed Center and
National Oceanic and Atmospheric Administration Global Systems Laboratory
orcid: 0000-0002-4952-4038
- given-names: Dominikus
family-names: Heinzeller
affiliation: Joint Center for Satellite Data Assimilation
orcid: 0000-0003-2962-1049
- given-names: Michelle
family-names: Harrold
affiliation: >-
Developmental Testbed Center and National Center for Atmospheric Research
- given-names: Tracy
family-names: Hertneky
affiliation: >-
Developmental Testbed Center and National Center for Atmospheric Research
- given-names: Michael
family-names: Kavulich
affiliation: >-
Developmental Testbed Center and National Center for Atmospheric Research
cff-version: 1.2.0
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2022, NOAA, UCAR/NCAR, CU/CIRES, CSU/CIRA
Copyright 2024, NOAA, UCAR/NCAR, CU/CIRES, CSU/CIRA

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -10,4 +10,4 @@ Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
limitations under the License.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# User's Guide

Please find the up-to-date User's Guide located in this repository in [`scm/doc/TechGuide/main.pdf`](https://github.com/NCAR/ccpp-scm/blob/main/scm/doc/TechGuide/main.pdf)
Please find the up-to-date User's Guide located on ReadTheDocs: https://ccpp-scm.readthedocs.io/en/latest/
1 change: 1 addition & 0 deletions ccpp/config/ccpp_prebuild_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@
'ccpp/physics/physics/SFC_Layer/UFS/sfc_nst_post.f90',
'ccpp/physics/physics/SFC_Models/Land/RUC/lsm_ruc.F90',
'ccpp/physics/physics/SFC_Models/SeaIce/CICE/sfc_cice.f',
'ccpp/physics/physics/SFC_Models/Land/sfc_land.F90',
'ccpp/physics/physics/SFC_Models/Land/Noah/lsm_noah.f',
'ccpp/physics/physics/SFC_Models/Land/Noahmp/noahmpdrv.F90',
'ccpp/physics/physics/SFC_Models/Lake/Flake/flake_driver.F90',
Expand Down
Loading

0 comments on commit ba91f2a

Please sign in to comment.