Skip to content

Commit

Permalink
Merge branch 'develop' into feature/hafsv2_baseline_with_ssc
Browse files Browse the repository at this point in the history
  • Loading branch information
binli2337 committed Jan 14, 2024
2 parents c1ee9a4 + 138aab1 commit 6a89f6a
Show file tree
Hide file tree
Showing 58 changed files with 1,145 additions and 352 deletions.
83 changes: 83 additions & 0 deletions .github/workflows/GCC.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# This is a CI workflow for the fv3atm project.
#
# This workflow builds and tests the fv3atm library using GCC, and it tests
# different CMake build options.
#
# Alex Richert, 6 Dec 2023

name: GCC
on:
push:
branches:
- develop
pull_request:
branches:
- develop

jobs:
GCC:
runs-on: ubuntu-latest

strategy:
matrix:
cmake_opts: ["-D32BIT=ON", "-D32BIT=OFF"]
gcc_ver: ["11"]
mpi: ["mpich"]

steps:

- name: checkout-fv3atm
uses: actions/checkout@v3
with:
path: ${{ github.workspace }}/fv3atm
submodules: recursive

- name: cache-spack
id: cache-spack
uses: actions/cache@v3
with:
path: ${{ github.workspace }}/spack-develop
key: spack-${{ hashFiles('fv3atm/ci/spack.yaml') }}-gcc${{ matrix.gcc_ver }}-2

# Building dependencies takes 40+ min
- name: spack-install
if: steps.cache-spack.outputs.cache-hit != 'true'
run: |
wget --no-verbose https://github.com/spack/spack/archive/refs/heads/develop.zip
unzip develop.zip -d ${GITHUB_WORKSPACE}/ &> unzip.out
. ${GITHUB_WORKSPACE}/spack-develop/share/spack/setup-env.sh
spack env create gcc${{ matrix.gcc_ver }} ${GITHUB_WORKSPACE}/fv3atm/ci/spack.yaml
spack env activate gcc${{ matrix.gcc_ver }}
spack compiler find | grep gcc@${{ matrix.gcc_ver }}
spack external find gmake cmake git git-lfs perl python ${{ matrix.mpi }}
spack config add "packages:all:require:['%gcc@${{ matrix.gcc_ver }}']"
spack config add "packages:mpi:require:'${{ matrix.mpi }}'"
spack concretize |& tee ${SPACK_ENV}/log.concretize
spack install -j2 --fail-fast
- name: cache-save
uses: actions/cache/save@v3
if: ${{ always() }}
with:
path: ${{ github.workspace }}/spack-develop
key: spack-${{ hashFiles('fv3atm/ci/spack.yaml') }}-gcc${{ matrix.gcc_ver }}-2

- name: build-fv3atm
run: |
. ${GITHUB_WORKSPACE}/spack-develop/share/spack/setup-env.sh
spack env activate gcc${{ matrix.gcc_ver }}
spack load $(spack find --format "{name}")
cd ${GITHUB_WORKSPACE}/fv3atm
git clone https://github.com/NOAA-EMC/CMakeModules
git clone --recurse-submodules https://github.com/NOAA-PSL/stochastic_physics stochastic_physics_repo
mkdir ${GITHUB_WORKSPACE}/build
cd ${GITHUB_WORKSPACE}/build
cmake ${GITHUB_WORKSPACE}/fv3atm -DBUILD_TESTING=ON ${{ matrix.cmake_opts }}
make -j2
- name: debug-artifacts
uses: actions/upload-artifact@v3
if: ${{ failure() }}
with:
name: ccpp_prebuild_logs
path: ${{ github.workspace }}/build/ccpp/ccpp_prebuild.*
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Enable CI build & unit testing:
if(BUILD_TESTING)
cmake_minimum_required(VERSION 3.19)
project(fv3atm VERSION 1.0 LANGUAGES C CXX Fortran)
include(ci/CMakeLists.txt)
endif()

###############################################################################
### CCPP
Expand Down
4 changes: 2 additions & 2 deletions atmos_model.F90
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ module atmos_model_mod
use fv_ufs_restart_io_mod, only: fv_dyn_restart_register, &
fv_dyn_restart_output
use fv_iau_mod, only: iau_external_data_type,getiauforcing,iau_initialize
use module_fv3_config, only: first_kdt, nsout, output_fh, &
use module_fv3_config, only: first_kdt, output_fh, &
fcst_mpi_comm, fcst_ntasks, &
quilting_restart
use module_block_data, only: block_atmos_copy, block_data_copy, &
Expand Down Expand Up @@ -976,7 +976,7 @@ subroutine update_atmos_model_state (Atmos, rc)
call get_time (Atmos%Time - diag_time, isec)
call get_time (Atmos%Time - Atmos%Time_init, seconds)
call atmosphere_nggps_diag(Atmos%Time,ltavg=.true.,avg_max_length=avg_max_length)
if (ANY(nint(output_fh(:)*3600.0) == seconds) .or. (GFS_control%kdt == first_kdt) .or. nsout > 0) then
if (ANY(nint(output_fh(:)*3600.0) == seconds) .or. (GFS_control%kdt == first_kdt)) then
if (mpp_pe() == mpp_root_pe()) write(6,*) "---isec,seconds",isec,seconds
time_int = real(isec)
if(Atmos%iau_offset > zero) then
Expand Down
268 changes: 132 additions & 136 deletions ccpp/config/ccpp_prebuild_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,11 @@
VARIABLE_DEFINITION_FILES = [
# actual variable definition files
'framework/src/ccpp_types.F90',
'physics/physics/machine.F',
'physics/physics/radsw_param.f',
'physics/physics/radlw_param.f',
'physics/physics/h2o_def.f',
'physics/physics/radiation_surface.f',
'physics/physics/module_ozphys.F90',
'physics/physics/hooks/machine.F',
'physics/physics/Radiation/RRTMG/radsw_param.f',
'physics/physics/Radiation/RRTMG/radlw_param.f',
'physics/physics/photochem/h2o_def.f',
'physics/physics/photochem/module_ozphys.F90',
'data/CCPP_typedefs.F90',
'data/GFS_typedefs.F90',
'data/CCPP_data.F90',
Expand Down Expand Up @@ -74,138 +73,135 @@
# Relative path to source (from where ccpp_prebuild.py is called) : [ list of physics sets in which scheme may be called ];
# current restrictions are that each scheme can only belong to one physics set, and all schemes within one group in the
# suite definition file have to belong to the same physics set
'physics/physics/GFS_DCNV_generic_pre.F90',
'physics/physics/GFS_DCNV_generic_post.F90',
'physics/physics/GFS_GWD_generic_pre.F90',
'physics/physics/GFS_GWD_generic_post.F90',
'physics/physics/GFS_MP_generic_pre.F90',
'physics/physics/GFS_MP_generic_post.F90',
'physics/physics/GFS_PBL_generic_pre.F90',
'physics/physics/GFS_PBL_generic_post.F90',
'physics/physics/GFS_SCNV_generic_pre.F90',
'physics/physics/GFS_SCNV_generic_post.F90',
'physics/physics/GFS_debug.F90',
'physics/physics/GFS_phys_time_vary.fv3.F90',
'physics/physics/GFS_rad_time_vary.fv3.F90',
'physics/physics/GFS_radiation_surface.F90',
'physics/physics/GFS_rrtmg_post.F90',
'physics/physics/GFS_rrtmg_pre.F90',
'physics/physics/GFS_rrtmg_setup.F90',
'physics/physics/GFS_stochastics.F90',
'physics/physics/GFS_suite_interstitial_rad_reset.F90',
'physics/physics/GFS_suite_interstitial_phys_reset.F90',
'physics/physics/GFS_suite_interstitial_1.F90',
'physics/physics/GFS_suite_interstitial_2.F90',
'physics/physics/GFS_suite_stateout_reset.F90',
'physics/physics/GFS_suite_stateout_update.F90',
'physics/physics/GFS_suite_interstitial_3.F90',
'physics/physics/GFS_suite_interstitial_4.F90',
'physics/physics/GFS_suite_interstitial_5.F90',
'physics/physics/GFS_surface_generic_pre.F90',
'physics/physics/GFS_surface_generic_post.F90',
'physics/physics/GFS_surface_composites_pre.F90',
'physics/physics/GFS_surface_composites_inter.F90',
'physics/physics/GFS_surface_composites_post.F90',
'physics/physics/GFS_surface_loop_control_part1.F90',
'physics/physics/GFS_surface_loop_control_part2.F90',
'physics/physics/GFS_time_vary_pre.fv3.F90',
'physics/physics/GFS_physics_post.F90',
'physics/physics/cires_ugwp.F90',
'physics/physics/cires_ugwp_post.F90',
'physics/physics/unified_ugwp.F90',
'physics/physics/unified_ugwp_post.F90',
'physics/physics/ugwpv1_gsldrag.F90',
'physics/physics/ugwpv1_gsldrag_post.F90',
'physics/physics/cnvc90.f',
'physics/physics/cs_conv_pre.F90',
'physics/physics/cs_conv.F90',
'physics/physics/cs_conv_post.F90',
'physics/physics/cs_conv_aw_adj.F90',
'physics/physics/cu_ntiedtke_pre.F90',
'physics/physics/cu_ntiedtke.F90',
'physics/physics/cu_ntiedtke_post.F90',
'physics/physics/dcyc2t3.f',
'physics/physics/drag_suite.F90',
'physics/physics/shoc.F90',
'physics/physics/get_prs_fv3.F90',
'physics/physics/get_phi_fv3.F90',
'physics/physics/gfdl_cloud_microphys.F90',
'physics/physics/fv_sat_adj.F90',
'physics/physics/gfdl_sfc_layer.F90',
'physics/physics/zhaocarr_gscond.f',
'physics/physics/gwdc_pre.f',
'physics/physics/gwdc.f',
'physics/physics/gwdc_post.f',
'physics/physics/gwdps.f',
'physics/physics/h2ophys.f',
'physics/physics/samfdeepcnv.f',
'physics/physics/samfshalcnv.f',
'physics/physics/sascnvn.F',
'physics/physics/shalcnv.F',
'physics/physics/maximum_hourly_diagnostics.F90',
'physics/physics/m_micro.F90',
'physics/physics/m_micro_pre.F90',
'physics/physics/m_micro_post.F90',
'physics/physics/cu_gf_driver_pre.F90',
'physics/physics/cu_gf_driver.F90',
'physics/physics/cu_gf_driver_post.F90',
'physics/physics/cu_c3_driver_pre.F90',
'physics/physics/cu_c3_driver.F90',
'physics/physics/cu_c3_driver_post.F90',
'physics/physics/hedmf.f',
'physics/physics/moninshoc.f',
'physics/physics/satmedmfvdif.F',
'physics/physics/satmedmfvdifq.F',
'physics/physics/shinhongvdif.F90',
'physics/physics/ysuvdif.F90',
'physics/physics/mynnedmf_wrapper.F90',
'physics/physics/mynnsfc_wrapper.F90',
'physics/physics/sgscloud_radpre.F90',
'physics/physics/sgscloud_radpost.F90',
'physics/physics/myjsfc_wrapper.F90',
'physics/physics/myjpbl_wrapper.F90',
'physics/physics/mp_thompson_pre.F90',
'physics/physics/mp_thompson.F90',
'physics/physics/mp_thompson_post.F90',
'physics/physics/mp_nssl.F90',
'physics/physics/zhaocarr_precpd.f',
'physics/physics/radlw_main.F90',
'physics/physics/radsw_main.F90',
'physics/physics/rascnv.F90',
'physics/physics/rayleigh_damp.f',
'physics/physics/rrtmg_lw_post.F90',
'physics/physics/rrtmg_lw_pre.F90',
'physics/physics/rrtmg_sw_post.F90',
'physics/physics/rad_sw_pre.F90',
'physics/physics/sfc_diag.f',
'physics/physics/sfc_diag_post.F90',
'physics/physics/lsm_ruc.F90',
'physics/physics/sfc_cice.f',
'physics/physics/sfc_diff.f',
'physics/physics/lsm_noah.f',
'physics/physics/noahmpdrv.F90',
'physics/physics/flake_driver.F90',
'physics/physics/clm_lake.f90',
'physics/physics/sfc_nst_pre.f90',
'physics/physics/sfc_nst.f90',
'physics/physics/sfc_nst_post.f90',
'physics/physics/sfc_ocean.F',
'physics/physics/sfc_sice.f',
# HAFS FER_HIRES
'physics/physics/mp_fer_hires.F90',
# SMOKE
'physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_DCNV_generic_pre.F90',
'physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_DCNV_generic_post.F90',
'physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_GWD_generic_pre.F90',
'physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_GWD_generic_post.F90',
'physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_MP_generic_pre.F90',
'physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_MP_generic_post.F90',
'physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_PBL_generic_pre.F90',
'physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_PBL_generic_post.F90',
'physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_SCNV_generic_pre.F90',
'physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_SCNV_generic_post.F90',
'physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_debug.F90',
'physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_phys_time_vary.fv3.F90',
'physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rad_time_vary.fv3.F90',
'physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_radiation_surface.F90',
'physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_post.F90',
'physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_pre.F90',
'physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_setup.F90',
'physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_setup.F90',
'physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_pre.F90',
'physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_cloud_diagnostics.F90',
'physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_cloud_mp.F90',
'physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_cloud_overlap.F90',
'physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_post.F90',
'physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_stochastics.F90',
'physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_suite_interstitial_rad_reset.F90',
'physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_suite_interstitial_phys_reset.F90',
'physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_suite_interstitial_1.F90',
'physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_suite_interstitial_2.F90',
'physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_suite_stateout_reset.F90',
'physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_suite_stateout_update.F90',
'physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_suite_interstitial_3.F90',
'physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_suite_interstitial_4.F90',
'physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_suite_interstitial_5.F90',
'physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_surface_generic_pre.F90',
'physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_surface_generic_post.F90',
'physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_surface_composites_pre.F90',
'physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_surface_composites_inter.F90',
'physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_surface_composites_post.F90',
'physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_surface_loop_control_part1.F90',
'physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_surface_loop_control_part2.F90',
'physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_time_vary_pre.fv3.F90',
'physics/physics/Interstitials/UFS_SCM_NEPTUNE/cnvc90.f',
'physics/physics/Interstitials/UFS_SCM_NEPTUNE/dcyc2t3.f',
'physics/physics/Interstitials/UFS_SCM_NEPTUNE/maximum_hourly_diagnostics.F90',
'physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_physics_post.F90',
'physics/physics/Interstitials/UFS_SCM_NEPTUNE/sgscloud_radpre.F90',
'physics/physics/Interstitials/UFS_SCM_NEPTUNE/sgscloud_radpost.F90',
'physics/physics/CONV/Chikira_Sugiyama/cs_conv_pre.F90',
'physics/physics/CONV/Chikira_Sugiyama/cs_conv.F90',
'physics/physics/CONV/Chikira_Sugiyama/cs_conv_post.F90',
'physics/physics/CONV/Chikira_Sugiyama/cs_conv_aw_adj.F90',
'physics/physics/CONV/nTiedtke/cu_ntiedtke_pre.F90',
'physics/physics/CONV/nTiedtke/cu_ntiedtke.F90',
'physics/physics/CONV/nTiedtke/cu_ntiedtke_post.F90',
'physics/physics/CONV/SAMF/samfdeepcnv.f',
'physics/physics/CONV/SAMF/samfshalcnv.f',
'physics/physics/CONV/SAS/sascnvn.F',
'physics/physics/CONV/SAS/shalcnv.F',
'physics/physics/CONV/Grell_Freitas/cu_gf_driver_pre.F90',
'physics/physics/CONV/Grell_Freitas/cu_gf_driver.F90',
'physics/physics/CONV/Grell_Freitas/cu_gf_driver_post.F90',
'physics/physics/CONV/C3/cu_c3_driver_pre.F90',
'physics/physics/CONV/C3/cu_c3_driver.F90',
'physics/physics/CONV/C3/cu_c3_driver_post.F90',
'physics/physics/CONV/RAS/rascnv.F90',
'physics/physics/GWD/cires_ugwp.F90',
'physics/physics/GWD/cires_ugwp_post.F90',
'physics/physics/GWD/unified_ugwp.F90',
'physics/physics/GWD/unified_ugwp_post.F90',
'physics/physics/GWD/ugwpv1_gsldrag.F90',
'physics/physics/GWD/ugwpv1_gsldrag_post.F90',
'physics/physics/GWD/drag_suite.F90',
'physics/physics/GWD/gwdc_pre.f',
'physics/physics/GWD/gwdc.f',
'physics/physics/GWD/gwdc_post.f',
'physics/physics/GWD/gwdps.f',
'physics/physics/GWD/rayleigh_damp.f',
'physics/physics/photochem/h2ophys.f',
'physics/physics/photochem/module_ozphys.F90',
'physics/physics/MP/Ferrier_Aligo/mp_fer_hires.F90',
'physics/physics/MP/GFDL/gfdl_cloud_microphys.F90',
'physics/physics/MP/GFDL/fv_sat_adj.F90',
'physics/physics/MP/Morrison_Gettelman/m_micro.F90',
'physics/physics/MP/Morrison_Gettelman/m_micro_pre.F90',
'physics/physics/MP/Morrison_Gettelman/m_micro_post.F90',
'physics/physics/MP/NSSL/mp_nssl.F90',
'physics/physics/MP/Thompson/mp_thompson_pre.F90',
'physics/physics/MP/Thompson/mp_thompson.F90',
'physics/physics/MP/Thompson/mp_thompson_post.F90',
'physics/physics/MP/Zhao_Carr/zhaocarr_gscond.f',
'physics/physics/MP/Zhao_Carr/zhaocarr_precpd.f',
'physics/physics/PBL/HEDMF/hedmf.f',
'physics/physics/PBL/SHOC/moninshoc.f',
'physics/physics/PBL/SHOC/shoc.F90',
'physics/physics/PBL/MYJ/myjpbl_wrapper.F90',
'physics/physics/PBL/MYNN_EDMF/mynnedmf_wrapper.F90',
'physics/physics/PBL/SATMEDMF/satmedmfvdif.F',
'physics/physics/PBL/SATMEDMF/satmedmfvdifq.F',
'physics/physics/PBL/YSU/ysuvdif.F90',
'physics/physics/PBL/saYSU/shinhongvdif.F90',
'physics/physics/Radiation/RRTMG/radsw_main.F90',
'physics/physics/Radiation/RRTMG/radlw_main.F90',
'physics/physics/Radiation/RRTMG/rrtmg_lw_post.F90',
'physics/physics/Radiation/RRTMG/rrtmg_sw_post.F90',
'physics/physics/Radiation/RRTMG/rad_sw_pre.F90',
'physics/physics/Radiation/RRTMGP/rrtmgp_aerosol_optics.F90',
'physics/physics/Radiation/RRTMGP/rrtmgp_lw_main.F90',
'physics/physics/Radiation/RRTMGP/rrtmgp_sw_main.F90',
'physics/physics/SFC_Layer/GFDL/gfdl_sfc_layer.F90',
'physics/physics/SFC_Layer/MYNN/mynnsfc_wrapper.F90',
'physics/physics/SFC_Layer/MYJ/myjsfc_wrapper.F90',
'physics/physics/SFC_Layer/UFS/sfc_diag.f',
'physics/physics/SFC_Layer/UFS/sfc_diag_post.F90',
'physics/physics/SFC_Layer/UFS/sfc_diff.f',
'physics/physics/SFC_Layer/UFS/sfc_nst_pre.f90',
'physics/physics/SFC_Layer/UFS/sfc_nst.f90',
'physics/physics/SFC_Layer/UFS/sfc_nst_post.f90',
'physics/physics/SFC_Models/Land/RUC/lsm_ruc.F90',
'physics/physics/SFC_Models/SeaIce/CICE/sfc_cice.f',
'physics/physics/SFC_Models/Land/Noah/lsm_noah.f',
'physics/physics/SFC_Models/Land/Noahmp/noahmpdrv.F90',
'physics/physics/SFC_Models/Lake/Flake/flake_driver.F90',
'physics/physics/SFC_Models/Lake/CLM/clm_lake.f90',
'physics/physics/SFC_Models/Ocean/UFS/sfc_ocean.F',
'physics/physics/SFC_Models/SeaIce/CICE/sfc_sice.f',
'physics/physics/smoke_dust/rrfs_smoke_wrapper.F90',
'physics/physics/smoke_dust/rrfs_smoke_postpbl.F90',
# RRTMGP
'physics/physics/rrtmgp_aerosol_optics.F90',
'physics/physics/rrtmgp_lw_main.F90',
'physics/physics/rrtmgp_sw_main.F90',
'physics/physics/GFS_rrtmgp_setup.F90',
'physics/physics/GFS_rrtmgp_pre.F90',
'physics/physics/GFS_cloud_diagnostics.F90',
'physics/physics/GFS_rrtmgp_cloud_mp.F90',
'physics/physics/GFS_rrtmgp_cloud_overlap.F90',
'physics/physics/GFS_rrtmgp_post.F90'
'physics/physics/tools/get_prs_fv3.F90',
'physics/physics/tools/get_phi_fv3.F90'
]

# Default build dir, relative to current working directory,
Expand Down
Loading

0 comments on commit 6a89f6a

Please sign in to comment.