Skip to content

Commit

Permalink
Merge branch 'main' into feature/ufs_case_gen_exact_mode
Browse files Browse the repository at this point in the history
  • Loading branch information
grantfirl committed Jun 5, 2024
2 parents 8b2f4de + dd7f9b3 commit 66519d7
Show file tree
Hide file tree
Showing 43 changed files with 1,984 additions and 417 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/build_and_push_docker_latest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: build_test_and_push_docker

on:
push:
branches:
# Only build containers when pushing to main
- "main"

env:
LATEST_TAG: dtcenter/ccpp-scm:latest

jobs:
docker:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Push latest tag
uses: docker/build-push-action@v5
with:
context: .
file: docker/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ env.LATEST_TAG }}
42 changes: 15 additions & 27 deletions .github/workflows/ci_build_scm_ubuntu_22.04.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ jobs:
sp_ROOT: /home/runner/NCEPLIBS-sp
w3emc_ROOT: /home/runner/myw3emc
SCM_ROOT: /home/runner/work/ccpp-scm/ccpp-scm
intel_ROOT: /home/runner/intel
suites: SCM_GFS_v15p2,SCM_GFS_v16,SCM_GFS_v17_p8,SCM_HRRR,SCM_RRFS_v1beta,SCM_RAP,SCM_WoFS_v0,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
Expand Down Expand Up @@ -57,33 +56,17 @@ jobs:
#######################################################################################
# Install FORTRAN dependencies
#######################################################################################
- name: Environment for ifort compiler
if: contains(matrix.fortran-compiler, 'ifort')
- name: Install openmpi
run: |
echo "CC=icx" >> $GITHUB_ENV
echo "FC=ifort" >> $GITHUB_ENV
echo "NFVERSION=v4.4.4" >> $GITHUB_ENV
- name: Cache Intel compilers
id: cache-intel-compilers
if: contains(matrix.fortran-compiler, 'ifort')
uses: actions/cache@v2
with:
path: /home/runner/intel
key: intel-${{ runner.os }}-compilers-b

# https://software.intel.com/content/www/us/en/develop/articles/installing-intel-oneapi-toolkits-via-apt.html
# List of packages from Docker file at
# https://github.com/intel/oneapi-containers/blob/master/images/docker/hpckit-devel-ubuntu18.04/Dockerfile
- name: Install Intel compilers and libraries
if: contains(matrix.fortran-compiler, 'ifort') && steps.cache-intel-compilers.outputs.cache-hit != 'true'
run: |
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
sudo add-apt-repository "deb https://apt.repos.intel.com/oneapi all main"
sudo apt-get update
sudo apt-get install intel-hpckit-getting-started intel-oneapi-clck intel-oneapi-common-licensing intel-oneapi-common-vars
sudo apt-get install intel-oneapi-dev-utilities intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic intel-oneapi-compiler-fortran intel-oneapi-itac
wget https://github.com/open-mpi/ompi/archive/refs/tags/v4.1.6.tar.gz
tar -xvf v4.1.6.tar.gz
cd ompi-4.1.6
./autogen.pl
./configure --prefix=/home/runner/ompi-4.1.6
make -j4
make install
echo "LD_LIBRARY_PATH=/home/runner/ompi-4.1.6/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV
echo "PATH=/home/runner/ompi-4.1.6/bin:$PATH" >> $GITHUB_ENV
- name: Cache bacio library v2.4.1
id: cache-bacio-fortran
Expand Down Expand Up @@ -158,6 +141,11 @@ jobs:
sudo make install
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${NFHOME}/lib
- name: Environment for openmpi compiler
run: |
echo "FC=mpif90" >> $GITHUB_ENV
echo "CC=mpicc" >> $GITHUB_ENV
#######################################################################################
# Build SCM.
#######################################################################################
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_build_scm_ubuntu_22.04_nvidia.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: CI test to build the CCPP-SCM on ubuntu v22.04

on: [push,pull_request,workflow_dispatch]
on: [pull_request,workflow_dispatch]

jobs:

Expand Down
17 changes: 17 additions & 0 deletions .github/workflows/ci_run_scm_DEPHY.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,18 @@ jobs:
#######################################################################################
# Install FORTRAN dependencies
#######################################################################################
- name: Install openmpi
run: |
wget https://github.com/open-mpi/ompi/archive/refs/tags/v4.1.6.tar.gz
tar -xvf v4.1.6.tar.gz
cd ompi-4.1.6
./autogen.pl
./configure --prefix=/home/runner/ompi-4.1.6
make -j4
make install
echo "LD_LIBRARY_PATH=/home/runner/ompi-4.1.6/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV
echo "PATH=/home/runner/ompi-4.1.6/bin:$PATH" >> $GITHUB_ENV
- name: Cache bacio library v2.4.1
id: cache-bacio-fortran
uses: actions/cache@v3
Expand Down Expand Up @@ -128,6 +140,11 @@ jobs:
#######################################################################################
# Build SCM. Run DEPHYv1 case.
#######################################################################################
- name: Environment for openmpi compiler
run: |
echo "FC=mpif90" >> $GITHUB_ENV
echo "CC=mpicc" >> $GITHUB_ENV
- name: Download data for SCM
run: |
cd ${SCM_ROOT}
Expand Down
41 changes: 27 additions & 14 deletions .github/workflows/ci_run_scm_rts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ jobs:
sp_ROOT: /home/runner/NCEPLIBS-sp
w3emc_ROOT: /home/runner/myw3emc
SCM_ROOT: /home/runner/work/ccpp-scm/ccpp-scm
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
suites: SCM_GFS_v15p2,SCM_GFS_v16,SCM_GFS_v17_p8,SCM_HRRR,SCM_RRFS_v1beta,SCM_RAP,SCM_WoFS_v0,SCM_RRFS_v1,SCM_GFS_v17_HR3,SCM_GFS_v17_HR3_RRTMGP
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,SCM_RRFS_v1_ps,SCM_GFS_v17_HR3_ps,SCM_GFS_v17_HR3_RRTMGP_ps
dir_rt: /home/runner/work/ccpp-scm/ccpp-scm/test/artifact-${{matrix.build-type}}
dir_bl: /home/runner/work/ccpp-scm/ccpp-scm/test/BL-${{matrix.build-type}}

Expand Down Expand Up @@ -51,25 +51,26 @@ jobs:
- name: Install NetCDF Python libraries
run: |
conda install --yes -c conda-forge h5py>=3.4 netCDF4 f90nml
conda install --yes -c conda-forge h5py>=3.4 netCDF4 f90nml matplotlib
- name: Update system packages
run: sudo apt-get update

#######################################################################################
# Install FORTRAN dependencies
#######################################################################################
- name: Environment for gfortran compiler
if: contains(matrix.fortran-compiler, 'gnu')
run: |
echo "FC=gfortran-11" >> $GITHUB_ENV
echo "CC=gcc-11" >> $GITHUB_ENV

- name: Environment for ifort compiler
if: contains(matrix.fortran-compiler, 'intel')
- name: Install openmpi
run: |
echo "CC=icx" >> $GITHUB_ENV
echo "FC=ifort" >> $GITHUB_ENV
wget https://github.com/open-mpi/ompi/archive/refs/tags/v4.1.6.tar.gz
tar -xvf v4.1.6.tar.gz
cd ompi-4.1.6
./autogen.pl
./configure --prefix=/home/runner/ompi-4.1.6
make -j4
make install
echo "LD_LIBRARY_PATH=/home/runner/ompi-4.1.6/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV
echo "PATH=/home/runner/ompi-4.1.6/bin:$PATH" >> $GITHUB_ENV
- name: Cache bacio library v2.4.1
id: cache-bacio-fortran
Expand Down Expand Up @@ -142,6 +143,11 @@ jobs:
sudo make install
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${NFHOME}/lib
- name: Environment for openmpi compiler
run: |
echo "FC=mpif90" >> $GITHUB_ENV
echo "CC=mpicc" >> $GITHUB_ENV
#######################################################################################
# Build SCM. Run regression tests.
#######################################################################################
Expand All @@ -150,6 +156,7 @@ jobs:
cd ${SCM_ROOT}
./contrib/get_all_static_data.sh
./contrib/get_thompson_tables.sh
./contrib/get_aerosol_climo.sh
- name: Configure build with CMake (Release)
if: contains(matrix.build-type, 'Release')
Expand Down Expand Up @@ -187,13 +194,19 @@ jobs:
- name: Download SCM RT baselines
run: |
cd ${dir_bl}
wget ftp://ftp.rap.ucar.edu:/pub/ccpp-scm/rt-baselines-${{matrix.build-type}}.zip
wget https://dtcenter.ucar.edu/ccpp/users/rt/rt-baselines-${{matrix.build-type}}.zip
unzip rt-baselines-${{matrix.build-type}}.zip
- name: Compare SCM RT output to baselines
run: |
cd ${SCM_ROOT}/test
./cmp_rt2bl.py --build_type ${{matrix.build-type}} --dir_rt ${dir_rt} --dir_bl ${dir_bl}
./cmp_rt2bl.py --dir_rt ${dir_rt} --dir_bl ${dir_bl}
- name: Upload plots of SCM Baselines/RTs as GitHub Artifact.
uses: actions/upload-artifact@v2
with:
name: rt-plots-${{matrix.build-type}}
path: /home/runner/work/ccpp-scm/ccpp-scm/test/scm_rt_out

- name: Upload SCM RTs as GitHub Artifact
uses: actions/upload-artifact@v2
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/ci_test_docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: build_test_and_push_docker

on: [pull_request,workflow_dispatch]

env:
TEST_TAG: dtcenter/ccpp-scm:test

jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and export test tag
uses: docker/build-push-action@v5
with:
context: .
file: docker/Dockerfile
load: true
tags: ${{ env.TEST_TAG }}
- name: Test
run: |
mkdir $HOME/output
chmod a+rw $HOME/output
docker run --rm -v $HOME/output:/home ${{ env.TEST_TAG }} ./run_scm.py -f ../../test/rt_test_cases.py --runtime_mult 0.1 -d
1 change: 1 addition & 0 deletions ccpp/config/ccpp_prebuild_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
TYPEDEFS_NEW_METADATA = {
'ccpp_types' : {
'ccpp_types' : '',
'MPI_Comm' : '',
'ccpp_t' : 'cdata',
},
'machine' : {
Expand Down
2 changes: 1 addition & 1 deletion ccpp/framework
Submodule framework updated 102 files
2 changes: 1 addition & 1 deletion ccpp/physics
Submodule physics updated 34 files
+8 −1 CMakeLists.txt
+1 −8 physics/GWD/cires_tauamf_data.F90
+2 −2 physics/Interstitials/UFS_SCM_NEPTUNE/GFS_debug.F90
+2 −9 physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.fv3.F90
+3 −3 physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_pre.F90
+7 −0 physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_pre.meta
+3 −15 physics/Interstitials/UFS_SCM_NEPTUNE/GFS_time_vary_pre.fv3.F90
+3 −15 physics/Interstitials/UFS_SCM_NEPTUNE/GFS_time_vary_pre.scm.F90
+22 −29 physics/Interstitials/UFS_SCM_NEPTUNE/iccninterp.F90
+13 −2 physics/Interstitials/UFS_SCM_NEPTUNE/maximum_hourly_diagnostics.F90
+3 −3 physics/Interstitials/UFS_SCM_NEPTUNE/maximum_hourly_diagnostics.meta
+13 −67 physics/Interstitials/UFS_SCM_NEPTUNE/sfcsub.F
+2 −1 physics/MP/Ferrier_Aligo/mp_fer_hires.F90
+1 −1 physics/MP/Ferrier_Aligo/mp_fer_hires.meta
+6 −23 physics/MP/Morrison_Gettelman/aerinterp.F90
+2 −2 physics/MP/NSSL/mp_nssl.F90
+1 −1 physics/MP/NSSL/mp_nssl.meta
+5 −4 physics/MP/Thompson/module_mp_thompson.F90
+3 −2 physics/MP/Thompson/mp_thompson.F90
+2 −2 physics/MP/Thompson/mp_thompson.meta
+2 −1 physics/MP/Thompson/mp_thompson_post.F90
+1 −1 physics/MP/Thompson/mp_thompson_post.meta
+3 −2 physics/Radiation/RRTMGP/rrtmgp_lw_cloud_optics.F90
+3 −2 physics/Radiation/RRTMGP/rrtmgp_lw_gas_optics.F90
+3 −1 physics/Radiation/RRTMGP/rrtmgp_lw_main.F90
+1 −1 physics/Radiation/RRTMGP/rrtmgp_lw_main.meta
+3 −2 physics/Radiation/RRTMGP/rrtmgp_sw_cloud_optics.F90
+3 −2 physics/Radiation/RRTMGP/rrtmgp_sw_gas_optics.F90
+3 −1 physics/Radiation/RRTMGP/rrtmgp_sw_main.F90
+1 −1 physics/Radiation/RRTMGP/rrtmgp_sw_main.meta
+30 −8 physics/Radiation/radiation_clouds.f
+3 −11 physics/photochem/h2ointerp.f90
+2 −1 physics/smoke_dust/rrfs_smoke_wrapper.F90
+1 −1 physics/smoke_dust/rrfs_smoke_wrapper.meta
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
ltaerosol = .false.
lradar = .true.
ttendlim = -999
dt_inner = 225.0
dt_inner = 150
sedi_semi = .true.
decfl = 10
oz_phys = .false.
Expand All @@ -36,14 +36,18 @@
do_gsl_drag_tofd = .true.
do_ugwp_v1_orog_only = .false.
min_lakeice = 0.15
min_seaice = 0.15
use_cice_alb = .false.
min_seaice = 1.0e-6
use_cice_alb = .true.
pdfcld = .false.
fhswr = 1200.
fhlwr = 1200.
ialb = 1
iems = 1
iaer = 5111
progsigma = .true.
betascu = 8.0
betamcu = 1.0
betadcu = 2.0
ialb = 2
iems = 2
iaer = 1011
icliq_sw = 2
ico2 = 2
isubc_sw = 2
Expand All @@ -67,7 +71,7 @@
imfshalcnv = 2
imfdeepcnv = 2
ras = .false.
cdmbgwd = 10.0,3.5,1.0,1.0
cdmbgwd = 2.5,7.5,1.0,1.0
prslrd0 = 0.
ivegsrc = 1
isot = 1
Expand All @@ -87,14 +91,13 @@
iopt_tbot = 2
iopt_stc = 3
debug = .false.
nstf_name = 2,1,0,0,0
nstf_name = 2,0,0,0,0
nst_anl = .true.
psautco = 0.0008,0.0005
prautco = 0.00015,0.00015
lgfdlmprad = .false.
effr_in = .true.
ldiag_ugwp = .false.
fscav_aero = "'*:0.0'"
do_sppt = .false.
do_shum = .false.
do_skeb = .false.
Expand All @@ -120,7 +123,7 @@
cplwav2atm = .false.
do_ca = .false.
ca_global = .false.
ca_sgs = .false.
ca_sgs = .true.
nca = 1
ncells = 5
nlives = 12
Expand All @@ -129,10 +132,7 @@
nthresh = 18
ca_trigger = .true.
nspinup = 1
iseed_ca = 12345
lndp_type = 0
n_var_lndp = 0
do_ccpp_suite_sim = .false.
iseed_ca = 1448371824
/

&cires_ugwp_nml
Expand All @@ -148,12 +148,12 @@
knob_ugwp_dokdis = 2
knob_ugwp_ndx4lh = 4
knob_ugwp_palaunch = 275.0e2
knob_ugwp_nslope = 0
knob_ugwp_nslope = 1
knob_ugwp_lzmax = 15.750e3
knob_ugwp_lzmin = 0.75e3
knob_ugwp_lzstar = 2.0e3
knob_ugwp_taumin = 0.25e-3
knob_ugwp_tauamp = 1.5e-3
knob_ugwp_tauamp = 0.5e-3
knob_ugwp_lhmet = 200.0e3
knob_ugwp_orosolv = 'pss-1986'
/
Expand Down
Loading

0 comments on commit 66519d7

Please sign in to comment.