From 2f0478c5c48b9f51cff1485815add0de509ee38d Mon Sep 17 00:00:00 2001 From: Soren Rasmussen Date: Wed, 22 May 2024 17:45:25 -0600 Subject: [PATCH 01/16] Updating Github action versions that the CI is warning will be deprecated. Checkout to v4, setup-python to v5, cache to v4, upload-artifact to v4, setup-miniconda to v3. --- .github/workflows/ci_build_scm_ubuntu_22.04.yml | 12 ++++++------ .../workflows/ci_build_scm_ubuntu_22.04_nvidia.yml | 14 +++++++------- .github/workflows/ci_run_scm_DEPHY.yml | 12 ++++++------ .github/workflows/ci_run_scm_rts.yml | 14 +++++++------- .github/workflows/ci_run_scm_ufs_replay.yml | 10 +++++----- .github/workflows/ci_scm_ccpp_prebuild.yml | 6 +++--- 6 files changed, 34 insertions(+), 34 deletions(-) diff --git a/.github/workflows/ci_build_scm_ubuntu_22.04.yml b/.github/workflows/ci_build_scm_ubuntu_22.04.yml index 6c33a30e5..cd709a3a3 100644 --- a/.github/workflows/ci_build_scm_ubuntu_22.04.yml +++ b/.github/workflows/ci_build_scm_ubuntu_22.04.yml @@ -30,7 +30,7 @@ jobs: # Initial ####################################################################################### - name: Checkout SCM code (into /home/runner/work/ccpp-scm/) - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Initialize submodules run: git submodule update --init --recursive @@ -39,7 +39,7 @@ jobs: # Python setup ####################################################################################### - name: Set up Python - uses: actions/setup-python@v3 + uses: actions/setup-python@v5 with: python-version: ${{matrix.py-version}} @@ -87,7 +87,7 @@ jobs: - name: Cache bacio library v2.4.1 id: cache-bacio-fortran - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: /home/runner/bacio key: cache-bacio-fortran-${{matrix.fortran-compiler}}-key @@ -104,7 +104,7 @@ jobs: - name: Cache SP-library v2.3.3 id: cache-sp-fortran - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: /home/runner/NCEPLIBS-sp key: cache-sp-fortran-${{matrix.fortran-compiler}}-key @@ -121,7 +121,7 @@ jobs: - name: Cache w3emc library v2.9.2 id: cache-w3emc-fortran - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: /home/runner/myw3emc key: cache-w3emc-fortran-${{matrix.fortran-compiler}}-key @@ -143,7 +143,7 @@ jobs: - name: Cache NetCDF Fortran library id: cache-netcdf-fortran - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: /home/runner/netcdf-fortran key: cache-netcdf-fortran-${{matrix.fortran-compiler}}-key diff --git a/.github/workflows/ci_build_scm_ubuntu_22.04_nvidia.yml b/.github/workflows/ci_build_scm_ubuntu_22.04_nvidia.yml index 8bb7fcedb..cef900f9b 100644 --- a/.github/workflows/ci_build_scm_ubuntu_22.04_nvidia.yml +++ b/.github/workflows/ci_build_scm_ubuntu_22.04_nvidia.yml @@ -60,7 +60,7 @@ jobs: # Initial ####################################################################################### - name: Checkout SCM code (into /home/runner/work/ccpp-scm/) - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Initialize submodules run: git submodule update --init --recursive @@ -69,7 +69,7 @@ jobs: # Python setup ####################################################################################### - name: Set up Python - uses: actions/setup-python@v3 + uses: actions/setup-python@v5 with: python-version: ${{matrix.py-version}} @@ -151,7 +151,7 @@ jobs: - name: Cache NetCDF C library id: cache-netcdf-c - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: /home/runner/netcdf-c key: cache-netcdf-c-${{matrix.fortran-compiler}}-key @@ -170,7 +170,7 @@ jobs: - name: Cache NetCDF Fortran library id: cache-netcdf-fortran - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: /home/runner/netcdf-fortran key: cache-netcdf-fortran-${{matrix.fortran-compiler}}-key @@ -187,7 +187,7 @@ jobs: - name: Cache bacio library v2.4.1 id: cache-bacio-fortran - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: /home/runner/bacio key: cache-bacio-fortran-${{matrix.fortran-compiler}}-key @@ -204,7 +204,7 @@ jobs: - name: Cache SP-library v2.3.3 id: cache-sp-fortran - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: /home/runner/NCEPLIBS-sp key: cache-sp-fortran-${{matrix.fortran-compiler}}-key @@ -221,7 +221,7 @@ jobs: - name: Cache w3emc library v2.9.2 id: cache-w3emc-fortran - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: /home/runner/myw3emc key: cache-w3emc-fortran-${{matrix.fortran-compiler}}-key diff --git a/.github/workflows/ci_run_scm_DEPHY.yml b/.github/workflows/ci_run_scm_DEPHY.yml index eeba4c7fe..bc1193f24 100644 --- a/.github/workflows/ci_run_scm_DEPHY.yml +++ b/.github/workflows/ci_run_scm_DEPHY.yml @@ -28,7 +28,7 @@ jobs: # Initial ####################################################################################### - name: Checkout SCM code (into /home/runner/work/ccpp-scm/) - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Initialize submodules run: git submodule update --init --recursive @@ -37,7 +37,7 @@ jobs: # Python setup ####################################################################################### - name: Set up Python - uses: actions/setup-python@v3 + uses: actions/setup-python@v5 with: python-version: ${{matrix.py-version}} @@ -56,7 +56,7 @@ jobs: ####################################################################################### - name: Cache bacio library v2.4.1 id: cache-bacio-fortran - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: /home/runner/bacio key: cache-bacio-fortran-${{matrix.fortran-compiler}}-key @@ -73,7 +73,7 @@ jobs: - name: Cache SP-library v2.3.3 id: cache-sp-fortran - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: /home/runner/NCEPLIBS-sp key: cache-sp-fortran-${{matrix.fortran-compiler}}-key @@ -90,7 +90,7 @@ jobs: - name: Cache w3emc library v2.9.2 id: cache-w3emc-fortran - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: /home/runner/myw3emc key: cache-w3emc-fortran-${{matrix.fortran-compiler}}-key @@ -110,7 +110,7 @@ jobs: - name: Cache NetCDF Fortran library v4.4.4 id: cache-netcdf-fortran - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: /home/runner/netcdf-fortran key: cache-netcdf-fortran-${{matrix.fortran-compiler}}-key diff --git a/.github/workflows/ci_run_scm_rts.yml b/.github/workflows/ci_run_scm_rts.yml index d58a10cdd..24a26f3eb 100644 --- a/.github/workflows/ci_run_scm_rts.yml +++ b/.github/workflows/ci_run_scm_rts.yml @@ -32,7 +32,7 @@ jobs: # Initial ####################################################################################### - name: Checkout SCM code (into /home/runner/work/ccpp-scm/) - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Initialize submodules run: git submodule update --init --recursive @@ -41,7 +41,7 @@ jobs: # Python setup ####################################################################################### - name: Set up Python - uses: actions/setup-python@v3 + uses: actions/setup-python@v5 with: python-version: ${{matrix.py-version}} @@ -73,7 +73,7 @@ jobs: - name: Cache bacio library v2.4.1 id: cache-bacio-fortran - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: /home/runner/bacio key: cache-bacio-fortran-${{matrix.fortran-compiler}}-key @@ -90,7 +90,7 @@ jobs: - name: Cache SP-library v2.3.3 id: cache-sp-fortran - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: /home/runner/NCEPLIBS-sp key: cache-sp-fortran-${{matrix.fortran-compiler}}-key @@ -107,7 +107,7 @@ jobs: - name: Cache w3emc library v2.9.2 id: cache-w3emc-fortran - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: /home/runner/myw3emc key: cache-w3emc-fortran-${{matrix.fortran-compiler}}-key @@ -127,7 +127,7 @@ jobs: - name: Cache NetCDF Fortran library id: cache-netcdf-fortran - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: /home/runner/netcdf-fortran key: cache-netcdf-fortran-${{matrix.fortran-compiler}}-key @@ -196,7 +196,7 @@ jobs: ./cmp_rt2bl.py --build_type ${{matrix.build-type}} --dir_rt ${dir_rt} --dir_bl ${dir_bl} - name: Upload SCM RTs as GitHub Artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: rt-baselines-${{matrix.build-type}} path: /home/runner/work/ccpp-scm/ccpp-scm/test/artifact-${{matrix.build-type}} diff --git a/.github/workflows/ci_run_scm_ufs_replay.yml b/.github/workflows/ci_run_scm_ufs_replay.yml index 0bd6a161d..508d3c490 100644 --- a/.github/workflows/ci_run_scm_ufs_replay.yml +++ b/.github/workflows/ci_run_scm_ufs_replay.yml @@ -23,7 +23,7 @@ jobs: ####################################################################################### - name: Checkout SCM. - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Initialize SCM submodules. run: git submodule update --init --recursive @@ -32,13 +32,13 @@ jobs: run: sudo apt-get update - name: Cache conda - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/conda_pkgs_dir key: conda-pkgs - name: Setup python. - uses: conda-incubator/setup-miniconda@v2 + uses: conda-incubator/setup-miniconda@v3 with: activate-environment: env_ufsreplay environment-file: environment-ufsreplay.yml @@ -51,7 +51,7 @@ jobs: ####################################################################################### - name: Cache UWM regression test output. - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ${dir_rt_cache} key: ufs-rt-files @@ -72,4 +72,4 @@ jobs: ####################################################################################### # Done - ####################################################################################### \ No newline at end of file + ####################################################################################### diff --git a/.github/workflows/ci_scm_ccpp_prebuild.yml b/.github/workflows/ci_scm_ccpp_prebuild.yml index bb9e3bd17..fbcaa169d 100644 --- a/.github/workflows/ci_scm_ccpp_prebuild.yml +++ b/.github/workflows/ci_scm_ccpp_prebuild.yml @@ -11,13 +11,13 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Initialize submodules run: git submodule update --init --recursive - + - name: Set up Python 3.8.5 - uses: actions/setup-python@v3 + uses: actions/setup-python@v5 with: python-version: 3.8.5 From a19a29d26c257e88d36aaef0c035feff467d5608 Mon Sep 17 00:00:00 2001 From: Robert Pincus Date: Wed, 22 May 2024 21:51:36 -0400 Subject: [PATCH 02/16] Add dependabot.yml to keep Github actions up to date --- .github/dependabot.yml | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..257a9e2d6 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,8 @@ +version: 2 +updates: + # Maintain dependencies for GitHub Actions + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" + target-branch: "main" From 8cb1c75b1d489c9c182de3cc32b1f70020d68a46 Mon Sep 17 00:00:00 2001 From: Soren Rasmussen Date: Wed, 22 May 2024 20:11:53 -0600 Subject: [PATCH 03/16] Pointing to bugfix/build_scm_nvfortran branch --- ccpp/physics | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccpp/physics b/ccpp/physics index 6d8fccbea..bc62070cf 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 6d8fccbea12c11387c0bc457dcb3855574cd29aa +Subproject commit bc62070cf7b2fb14a1f01d714e2e842b80125cc7 From fdeba64abe6068701cfda562b441054500fb3a2a Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Tue, 4 Jun 2024 15:04:53 -0400 Subject: [PATCH 04/16] update ccpp/physics submodule --- ccpp/physics | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccpp/physics b/ccpp/physics index bc62070cf..76cf93fc2 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit bc62070cf7b2fb14a1f01d714e2e842b80125cc7 +Subproject commit 76cf93fc26d7b843f6d89ed0ba4799fd5f2c21f7 From 7a6cf52994872106f0664336bfe814f07bf57967 Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Wed, 5 Jun 2024 13:12:32 -0400 Subject: [PATCH 05/16] GFS_typedefs changes for ufs-dev-PR205 --- scm/src/GFS_typedefs.F90 | 8 +++++--- scm/src/GFS_typedefs.meta | 3 ++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/scm/src/GFS_typedefs.F90 b/scm/src/GFS_typedefs.F90 index 51e6ae1ed..4e6ff77b1 100644 --- a/scm/src/GFS_typedefs.F90 +++ b/scm/src/GFS_typedefs.F90 @@ -302,7 +302,7 @@ module GFS_typedefs real (kind=kind_phys), pointer :: ffmm (:) => null() !< fm parameter from PBL scheme real (kind=kind_phys), pointer :: ffhh (:) => null() !< fh parameter from PBL scheme real (kind=kind_phys), pointer :: f10m (:) => null() !< fm at 10m - Ratio of sigma level 1 wind and 10m wind - real (kind=kind_phys), pointer :: rca (:) => null() !< canopy resistance + real (kind=kind_phys), pointer :: rca (:) => null() !< canopy resistance real (kind=kind_phys), pointer :: tprcp (:) => null() !< sfc_fld%tprcp - total precipitation real (kind=kind_phys), pointer :: srflag (:) => null() !< sfc_fld%srflag - snow/rain flag for precipitation real (kind=kind_phys), pointer :: slc (:,:) => null() !< liquid soil moisture @@ -2568,11 +2568,13 @@ subroutine sfcprop_create (Sfcprop, IM, Model) Sfcprop%dt_cool = zero Sfcprop%qrain = zero endif + if (Model%lsm == Model%lsm_noah .or. Model%lsm == Model%lsm_noahmp) then + allocate (Sfcprop%rca (IM)) + Sfcprop%rca = clear_val + end if if (Model%lsm == Model%lsm_noah) then allocate (Sfcprop%xlaixy (IM)) - allocate (Sfcprop%rca (IM)) Sfcprop%xlaixy = clear_val - Sfcprop%rca = clear_val end if if (Model%lsm == Model%lsm_ruc .or. Model%lsm == Model%lsm_noahmp .or. & (Model%lkm>0 .and. Model%iopt_lake==Model%iopt_lake_clm)) then diff --git a/scm/src/GFS_typedefs.meta b/scm/src/GFS_typedefs.meta index 2b2d485bf..14eacccff 100644 --- a/scm/src/GFS_typedefs.meta +++ b/scm/src/GFS_typedefs.meta @@ -1259,6 +1259,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys + active = (control_for_land_surface_scheme == identifier_for_noah_land_surface_scheme .or. control_for_land_surface_scheme == identifier_for_noahmp_land_surface_scheme) [tprcp] standard_name = nonnegative_lwe_thickness_of_precipitation_amount_on_dynamics_timestep long_name = total precipitation amount in each time step @@ -5230,7 +5231,7 @@ long_name = model 2m diagnostics use the temperature and humidity calculated by the lake model units = flag dimensions = () - type = integer + type = logical [lkm] standard_name = control_for_lake_model_execution_method long_name = control for lake model execution: 0=no lake, 1=lake, 2=lake+nsst From 1c7d5c60eb04624701daa054862b9adf8d6624f7 Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Wed, 5 Jun 2024 13:34:58 -0400 Subject: [PATCH 06/16] host changes to work with ufs-dev #189 --- ccpp/framework | 2 +- ccpp/physics | 2 +- scm/src/CCPP_typedefs.meta | 8 ++++---- scm/src/GFS_typedefs.F90 | 13 +++++++------ scm/src/GFS_typedefs.meta | 40 ++++---------------------------------- 5 files changed, 17 insertions(+), 48 deletions(-) diff --git a/ccpp/framework b/ccpp/framework index 011db4f80..ccfefcd0b 160000 --- a/ccpp/framework +++ b/ccpp/framework @@ -1 +1 @@ -Subproject commit 011db4f80a02cba6d65958ace56e8efb197be62b +Subproject commit ccfefcd0b426e011f94137031d5f7c2a4dda2659 diff --git a/ccpp/physics b/ccpp/physics index 76cf93fc2..a1a387275 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 76cf93fc26d7b843f6d89ed0ba4799fd5f2c21f7 +Subproject commit a1a3872755cce83f51ea9a3ee62d258612eea7df diff --git a/scm/src/CCPP_typedefs.meta b/scm/src/CCPP_typedefs.meta index 8208bd1d5..adffe90c2 100644 --- a/scm/src/CCPP_typedefs.meta +++ b/scm/src/CCPP_typedefs.meta @@ -344,7 +344,7 @@ dimensions = (horizontal_loop_extent,4) type = real kind = kind_phys - active = (control_for_drag_suite_gravity_wave_drag == 3 .or. control_for_drag_suite_gravity_wave_drag == 33) + active = (control_for_drag_suite_gravity_wave_drag == 2 .or. control_for_drag_suite_gravity_wave_drag == 3 .or. control_for_drag_suite_gravity_wave_drag == 22 .or. control_for_drag_suite_gravity_wave_drag == 33) [cmm_water] standard_name = surface_drag_wind_speed_for_momentum_in_air_over_water long_name = momentum exchange coefficient over water @@ -1526,7 +1526,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - active = (control_for_drag_suite_gravity_wave_drag == 3 .or. control_for_drag_suite_gravity_wave_drag == 33) + active = (control_for_drag_suite_gravity_wave_drag == 2 .or. control_for_drag_suite_gravity_wave_drag == 3 .or. control_for_drag_suite_gravity_wave_drag == 22 .or. control_for_drag_suite_gravity_wave_drag == 33) [oa4ss] standard_name = asymmetry_of_subgrid_orography_small_scale long_name = asymmetry of subgrid height_above_mean_sea_level small scale @@ -1534,7 +1534,7 @@ dimensions = (horizontal_loop_extent,4) type = real kind = kind_phys - active = (control_for_drag_suite_gravity_wave_drag == 3 .or. control_for_drag_suite_gravity_wave_drag == 33) + active = (control_for_drag_suite_gravity_wave_drag == 2 .or. control_for_drag_suite_gravity_wave_drag == 3 .or. control_for_drag_suite_gravity_wave_drag == 22 .or. control_for_drag_suite_gravity_wave_drag == 33) [oc] standard_name = convexity_of_subgrid_orography long_name = convexity of subgrid height_above_mean_sea_level @@ -1549,7 +1549,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - active = (control_for_drag_suite_gravity_wave_drag == 3 .or. control_for_drag_suite_gravity_wave_drag == 33) + active = (control_for_drag_suite_gravity_wave_drag == 2 .or. control_for_drag_suite_gravity_wave_drag == 3 .or. control_for_drag_suite_gravity_wave_drag == 22 .or. control_for_drag_suite_gravity_wave_drag == 33) [olyr] standard_name = ozone_concentration_at_layer_for_radiation long_name = ozone concentration layer diff --git a/scm/src/GFS_typedefs.F90 b/scm/src/GFS_typedefs.F90 index 4e6ff77b1..d1218b8da 100644 --- a/scm/src/GFS_typedefs.F90 +++ b/scm/src/GFS_typedefs.F90 @@ -2735,12 +2735,13 @@ subroutine sfcprop_create (Sfcprop, IM, Model) ! end if - allocate (Sfcprop%rmol (IM )) - allocate (Sfcprop%flhc (IM )) - allocate (Sfcprop%flqc (IM )) - Sfcprop%rmol = clear_val - Sfcprop%flhc = clear_val - Sfcprop%flqc = clear_val + allocate (Sfcprop%rmol (IM )) + allocate (Sfcprop%flhc (IM )) + allocate (Sfcprop%flqc (IM )) + Sfcprop%rmol = clear_val + Sfcprop%flhc = clear_val + Sfcprop%flqc = clear_val + if (Model%do_mynnsfclay) then ! For MYNN surface layer scheme !print*,"Allocating all MYNN-sfclay variables" diff --git a/scm/src/GFS_typedefs.meta b/scm/src/GFS_typedefs.meta index 14eacccff..617a109e1 100644 --- a/scm/src/GFS_typedefs.meta +++ b/scm/src/GFS_typedefs.meta @@ -992,7 +992,6 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - active = (control_for_land_surface_scheme == identifier_for_ruc_land_surface_scheme) [fire_heat_flux] standard_name = surface_fire_heat_flux long_name = heat flux of fire at the surface @@ -1179,7 +1178,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - active = (control_for_deep_convection_scheme == identifier_for_grell_freitas_deep_convection) + active = (control_for_deep_convection_scheme == identifier_for_grell_freitas_deep_convection .or. control_for_deep_convection_scheme == identifier_for_c3_deep_convection) [conv_act] standard_name = consecutive_calls_for_grell_freitas_convection long_name = Memory counter for GF @@ -1957,7 +1956,6 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - active = (flag_for_mellor_yamada_nakanishi_niino_surface_layer_scheme) [flhc] standard_name = surface_exchange_coefficient_for_heat long_name = surface exchange coefficient for heat @@ -1965,7 +1963,6 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - active = (flag_for_mellor_yamada_nakanishi_niino_surface_layer_scheme) [flqc] standard_name = surface_exchange_coefficient_for_moisture long_name = surface exchange coefficient for moisture @@ -1973,7 +1970,6 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - active = (flag_for_mellor_yamada_nakanishi_niino_surface_layer_scheme) [chs2] standard_name = surface_exchange_coefficient_for_heat_at_2m long_name = exchange coefficient for heat at 2 meters @@ -2777,7 +2773,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - active = (flag_for_surface_flux_coupling .or. flag_for_ocean_wave_coupling) + active = (flag_for_surface_flux_coupling .or. flag_for_chemistry_coupling .or. flag_for_ocean_wave_coupling) [v10mi_cpl] standard_name = y_wind_at_10m_for_coupling long_name = instantaneous V10m @@ -2785,7 +2781,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - active = (flag_for_surface_flux_coupling .or. flag_for_ocean_wave_coupling) + active = (flag_for_surface_flux_coupling .or. flag_for_chemistry_coupling .or. flag_for_ocean_wave_coupling) [tsfci_cpl] standard_name = surface_skin_temperature_for_coupling long_name = instantaneous sfc temperature @@ -2793,7 +2789,7 @@ dimensions = (horizontal_loop_extent) type = real kind = kind_phys - active = (flag_for_surface_flux_coupling) + active = (flag_for_surface_flux_coupling .or. flag_for_chemistry_coupling .or. flag_for_land_coupling) [psurfi_cpl] standard_name = surface_air_pressure_for_coupling long_name = instantaneous sfc pressure @@ -3393,7 +3389,6 @@ dimensions = (number_of_lines_in_internal_namelist) type = character kind = len=256 - active = (number_of_lines_in_internal_namelist > 0) [logunit] standard_name = iounit_of_log long_name = fortran unit number for logfile @@ -6735,14 +6730,12 @@ units = flag dimensions = () type = logical - active = (do_smoke_coupling) [enh_mix] standard_name = do_planetary_boundary_layer_fire_enhancement long_name = flag for rrfs smoke mynn enh vermix units = flag dimensions = () type = logical - active = (do_smoke_coupling) [smoke_dir_fdb_coef] standard_name = smoke_dust_direct_fdb_coef long_name = smoke dust direct feedback coefficents @@ -6750,7 +6743,6 @@ dimensions = (7) type = real kind = kind_phys - active = (do_smoke_coupling) [smoke_conv_wet_coef] standard_name = smoke_dust_conv_wet_coef long_name = smoke dust convetive wet scavanging coefficents @@ -6758,7 +6750,6 @@ dimensions = (3) type = real kind = kind_phys - active = (do_smoke_coupling) [dust_moist_correction] standard_name = dust_moist_correction_fengsha_dust_scheme long_name = moisture correction term for fengsha dust emission @@ -6766,7 +6757,6 @@ dimensions = () type = real kind = kind_phys - active = (do_smoke_coupling) [dust_drylimit_factor] standard_name = dust_drylimit_factor_fengsha_dust_scheme long_name = moisture correction term for drylimit in fengsha dust emission @@ -6774,14 +6764,12 @@ dimensions = () type = real kind = kind_phys - active = (do_smoke_coupling) [dust_moist_opt] standard_name = control_for_dust_soil_moisture_option long_name = smoke dust moisture parameterization 1 - fecan 2 - shao units = index dimensions = () type = integer - active = (do_smoke_coupling) [dust_alpha] standard_name = alpha_fengsha_dust_scheme long_name = alpha paramter for fengsha dust scheme @@ -6789,7 +6777,6 @@ dimensions = () type = real kind = kind_phys - active = (do_smoke_coupling) [dust_gamma] standard_name = gamma_fengsha_dust_scheme long_name = gamma paramter for fengsha dust scheme @@ -6797,7 +6784,6 @@ dimensions = () type = real kind = kind_phys - active = (do_smoke_coupling) [wetdep_ls_alpha] standard_name = alpha_for_ls_wet_depoistion long_name = alpha paramter for ls wet deposition @@ -6805,126 +6791,108 @@ dimensions = () type = real kind = kind_phys - active = (do_smoke_coupling) [ebb_dcycle] standard_name = control_for_diurnal_cycle_of_biomass_burning_emissions long_name = rrfs smoke diurnal cycle option units = index dimensions = () type = integer - active = (do_smoke_coupling) [seas_opt] standard_name = control_for_smoke_sea_salt long_name = rrfs smoke sea salt emission option units = index dimensions = () type = integer - active = (do_smoke_coupling) [dust_opt] standard_name = control_for_smoke_dust long_name = rrfs smoke dust chem option units = index dimensions = () type = integer - active = (do_smoke_coupling) [drydep_opt] standard_name = control_for_smoke_dry_deposition long_name = rrfs smoke dry deposition option units = index dimensions = () type = integer - active = (do_smoke_coupling) [coarsepm_settling] standard_name = control_for_smoke_pm_settling long_name = rrfs smoke coarsepm settling option units = index dimensions = () type = integer - active = (do_smoke_coupling) [plume_wind_eff] standard_name = option_for_wind_effects_on_smoke_plumerise long_name = wind effect plumerise option units = index dimensions = () type = integer - active = (do_smoke_coupling) [extended_sd_diags] standard_name = flag_for_extended_smoke_dust_diagnostics long_name = flag for extended smoke dust diagnostics units = flag dimensions = () type = logical - active = (do_smoke_coupling) [wetdep_ls_opt] standard_name = control_for_smoke_wet_deposition long_name = rrfs smoke large scale wet deposition option units = index dimensions = () type = integer - active = (do_smoke_coupling) [do_plumerise] standard_name = do_smoke_plumerise long_name = rrfs smoke plumerise option units = index dimensions = () type = logical - active = (do_smoke_coupling) [plumerisefire_frq] standard_name = smoke_plumerise_frequency long_name = rrfs smoke add smoke option units = min dimensions = () type = integer - active = (do_smoke_coupling) [n_dbg_lines] standard_name = smoke_debug_lines long_name = rrfs smoke add smoke option units = index dimensions = () type = integer - active = (do_smoke_coupling) [addsmoke_flag] standard_name = control_for_smoke_biomass_burning_emissions long_name = rrfs smoke add smoke option units = index dimensions = () type = integer - active = (do_smoke_coupling) [smoke_forecast] standard_name = do_smoke_forecast long_name = index for rrfs smoke forecast units = index dimensions = () type = integer - active = (do_smoke_coupling) [aero_ind_fdb] standard_name = do_smoke_aerosol_indirect_feedback long_name = flag for wfa ifa emission indirect feedback units = flag dimensions = () type = logical - active = (do_smoke_coupling) [aero_dir_fdb] standard_name = do_smoke_aerosol_direct_feedback long_name = flag for smoke and dust radiation feedback units = flag dimensions = () type = logical - active = (do_smoke_coupling) [rrfs_smoke_debug] standard_name = do_smoke_debug long_name = flag for rrfs smoke plumerise debug units = flag dimensions = () type = logical - active = (do_smoke_coupling) [do_smoke_transport] standard_name = do_smoke_conv_transport long_name = flag for rrfs smoke convective transport units = flag dimensions = () type = logical - active = (do_smoke_coupling) [ncnvcld3d] standard_name = number_of_convective_cloud_variables_in_xyz_dimensioned_restart_array long_name = number of convective 3d clouds fields From 679a679ec08eb7db0e1346d3664682bcf3166271 Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Wed, 5 Jun 2024 13:40:53 -0400 Subject: [PATCH 07/16] add MPI include statements to SCM CMakeLists.txt --- scm/src/CMakeLists.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scm/src/CMakeLists.txt b/scm/src/CMakeLists.txt index e8e8f7bbb..9bf76bdbb 100644 --- a/scm/src/CMakeLists.txt +++ b/scm/src/CMakeLists.txt @@ -72,6 +72,14 @@ find_package(bacio REQUIRED) find_package(sp REQUIRED) find_package(w3emc REQUIRED) +find_package(MPI REQUIRED Fortran) +if(NOT MPI_Fortran_HAVE_F08_MODULE) + message(FATAL_ERROR "MPI implementation does not support the Fortran 2008 mpi_f08 interface") +endif() + +message(STATUS "MPI Include Path: ${MPI_INCLUDE_PATH}") +message(STATUS "MPI Libraries: ${MPI_LIBRARIES}") + SET(CCPP_FRAMEWORK_SRC ${CMAKE_SOURCE_DIR}/../../ccpp/framework) SET(CCPP_PHYSICS_SRC ${CMAKE_SOURCE_DIR}/../../ccpp/physics) @@ -90,6 +98,7 @@ endif() INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/ccpp/framework/src) INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/ccpp/physics) +INCLUDE_DIRECTORIES(${MPI_INCLUDE_PATH}) #------------------------------------------------------------------------------ # Add required preprocessor flags for build type From 9d2bb113765ac603a80767040a847213164e1d63 Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Wed, 5 Jun 2024 15:10:13 -0400 Subject: [PATCH 08/16] update ccpp/physics submodule pointer --- ccpp/physics | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccpp/physics b/ccpp/physics index a1a387275..47dec94d6 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit a1a3872755cce83f51ea9a3ee62d258612eea7df +Subproject commit 47dec94d6bfcc006a5fabd20d2e0ce8b5cd6b131 From 893cb7ed6f08ff01c35c7a417a94d03ee7a2e130 Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Wed, 5 Jun 2024 19:48:58 -0600 Subject: [PATCH 09/16] set cdata%thread_cnt in scm.F90 --- scm/src/scm.F90 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scm/src/scm.F90 b/scm/src/scm.F90 index 9a05e974a..ff28593f0 100644 --- a/scm/src/scm.F90 +++ b/scm/src/scm.F90 @@ -176,7 +176,8 @@ subroutine scm_main_sub() cdata%blk_no = 1 cdata%thrd_no = 1 - + cdata%thrd_cnt = 1 + call physics%associate(scm_state) call physics%set(scm_input_instance, scm_state) From 53d962866152e6b3d139e75d03b7db5359ced47b Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Thu, 6 Jun 2024 14:02:09 -0400 Subject: [PATCH 10/16] update .gitmodules for testing --- .gitmodules | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index dc0798c32..d4f9936d0 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,8 +4,10 @@ branch = main [submodule "ccpp-physics"] path = ccpp/physics - url = https://github.com/NCAR/ccpp-physics - branch = main + #url = https://github.com/NCAR/ccpp-physics + #branch = main + url = https://github.com/grantfirl/ccpp-physics + branch = ufs-dev-PR189 [submodule "CMakeModules"] path = CMakeModules url = https://github.com/noaa-emc/CMakeModules From 33bf2b0fe2c8ae2412195d9c338def75bf6a72a5 Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Thu, 6 Jun 2024 15:12:14 -0400 Subject: [PATCH 11/16] update ccpp/physics submodule pointer --- ccpp/physics | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccpp/physics b/ccpp/physics index 47dec94d6..f4e0fa187 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 47dec94d6bfcc006a5fabd20d2e0ce8b5cd6b131 +Subproject commit f4e0fa187121d266634df4779d11b95ad1280d61 From a47774b3baf8b5dc34a994535285d93dd9876640 Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Thu, 6 Jun 2024 17:03:15 -0400 Subject: [PATCH 12/16] add Debug mode to DEPHY CI test to debug --- .github/workflows/ci_run_scm_DEPHY.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci_run_scm_DEPHY.yml b/.github/workflows/ci_run_scm_DEPHY.yml index 7e64bf9e1..52a9993e4 100644 --- a/.github/workflows/ci_run_scm_DEPHY.yml +++ b/.github/workflows/ci_run_scm_DEPHY.yml @@ -10,6 +10,7 @@ jobs: strategy: matrix: fortran-compiler: [gfortran-12] + build-type: [Release, Debug] py-version: [3.7.13] # Environmental variables @@ -150,13 +151,21 @@ jobs: cd ${SCM_ROOT} ./contrib/get_all_static_data.sh ./contrib/get_thompson_tables.sh - - - name: Configure build with CMake + + - name: Configure build with CMake (Release) + if: contains(matrix.build-type, 'Release') run: | cd ${SCM_ROOT}/scm mkdir bin && cd bin cmake -DCCPP_SUITES=${suites} ../src + - name: Configure build with CMake (Debug) + if: contains(matrix.build-type, 'Debug') + run: | + cd ${SCM_ROOT}/scm + mkdir bin && cd bin + cmake -DCCPP_SUITES=${suites} -DCMAKE_BUILD_TYPE=Debug ../src + - name: Build SCM run: | cd ${SCM_ROOT}/scm/bin From 505a473c9adecf181e8a00c25903be4bfd94e931 Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Tue, 11 Jun 2024 16:14:12 +0000 Subject: [PATCH 13/16] update Hera modulefiles to match the latest UFS --- scm/etc/modules/hera_gnu.lua | 19 +++++++++---------- scm/etc/modules/hera_intel.lua | 15 ++++++--------- 2 files changed, 15 insertions(+), 19 deletions(-) diff --git a/scm/etc/modules/hera_gnu.lua b/scm/etc/modules/hera_gnu.lua index 0e28df2d0..48188e850 100644 --- a/scm/etc/modules/hera_gnu.lua +++ b/scm/etc/modules/hera_gnu.lua @@ -5,23 +5,22 @@ the NOAA RDHPC machine Hera using GNU 9.2.0 whatis([===[Loads libraries needed for building the CCPP SCM on Hera with GNU compilers ]===]) -prepend_path("MODULEPATH", "/scratch1/NCEPDEV/jcsda/jedipara/spack-stack/modulefiles") -load("cmake/3.28.1") -load("miniconda/3.9.12") +prepend_path("MODULEPATH", "/scratch2/NCEPDEV/stmp1/role.epic/installs/gnu/modulefiles") +prepend_path("MODULEPATH", "/scratch2/NCEPDEV/stmp1/role.epic/installs/openmpi/modulefiles") +prepend_path("MODULEPATH", "/scratch2/NCEPDEV/stmp1/role.epic/spack-stack/spack-stack-1.6.0_gnu13/envs/ufs-wm-srw-rocky8/install/modulefiles/Core") -prepend_path("MODULEPATH", "/scratch1/NCEPDEV/nems/role.epic/spack-stack/spack-stack-1.5.1/envs/unified-env-rocky8/install/modulefiles/Core") - -load("stack-gcc/9.2.0") -load("stack-openmpi/4.1.5") -load("stack-python/3.10.8") +load("stack-gcc/13.3.0") +load("stack-openmpi/4.1.6") +load("cmake/3.23.1") +load("stack-python/3.10.13") load("py-f90nml") load("py-netcdf4/1.5.8") load("netcdf-c/4.9.2") -load("netcdf-fortran/4.6.0") +load("netcdf-fortran/4.6.1") load("bacio/2.4.1") -load("sp/2.3.3") +load("sp/2.5.0") load("w3emc") setenv("CMAKE_C_COMPILER","mpicc") diff --git a/scm/etc/modules/hera_intel.lua b/scm/etc/modules/hera_intel.lua index 6cdbf7d4c..e682bef4e 100644 --- a/scm/etc/modules/hera_intel.lua +++ b/scm/etc/modules/hera_intel.lua @@ -5,23 +5,20 @@ the NOAA RDHPC machine Hera using Intel-2021.5.0 whatis([===[Loads libraries needed for building the CCPP SCM on Hera with Intel compilers ]===]) -prepend_path("MODULEPATH", "/scratch1/NCEPDEV/jcsda/jedipara/spack-stack/modulefiles") -load("cmake/3.28.1") -load("miniconda/3.9.12") - -prepend_path("MODULEPATH", "/scratch1/NCEPDEV/nems/role.epic/spack-stack/spack-stack-1.5.1/envs/unified-env-rocky8/install/modulefiles/Core") +prepend_path("MODULEPATH", "/scratch1/NCEPDEV/nems/role.epic/spack-stack/spack-stack-1.6.0/envs/unified-env-rocky8/install/modulefiles/Core") load("stack-intel/2021.5.0") load("stack-intel-oneapi-mpi/2021.5.1") -load("stack-python/3.10.8") +load("cmake/3.23.1") +load("stack-python/3.10.13") load("py-f90nml") load("py-netcdf4/1.5.8") load("netcdf-c/4.9.2") -load("netcdf-fortran/4.6.0") +load("netcdf-fortran/4.6.1") load("bacio/2.4.1") -load("sp/2.3.3") -load("w3emc") +load("sp/2.5.0") +load("w3emc/2.10.0") setenv("CMAKE_C_COMPILER","mpiicc") setenv("CMAKE_CXX_COMPILER","mpiicpc") From 8a479e8548617ecc61b9d5db65a33eeb677cbd99 Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Tue, 11 Jun 2024 16:26:50 +0000 Subject: [PATCH 14/16] be specific about w3emc in hera_gnu.lua --- scm/etc/modules/hera_gnu.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scm/etc/modules/hera_gnu.lua b/scm/etc/modules/hera_gnu.lua index 48188e850..10d0c82f4 100644 --- a/scm/etc/modules/hera_gnu.lua +++ b/scm/etc/modules/hera_gnu.lua @@ -21,7 +21,7 @@ load("netcdf-c/4.9.2") load("netcdf-fortran/4.6.1") load("bacio/2.4.1") load("sp/2.5.0") -load("w3emc") +load("w3emc/2.10.0") setenv("CMAKE_C_COMPILER","mpicc") setenv("CMAKE_CXX_COMPILER","mpicxx") From e10149bb8ac11e328d4f300eb3b170441278066c Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Mon, 1 Jul 2024 14:58:26 -0400 Subject: [PATCH 15/16] change RT artifact dir on server --- .github/workflows/ci_run_scm_rts.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_run_scm_rts.yml b/.github/workflows/ci_run_scm_rts.yml index 7ce607cfb..319576f5d 100644 --- a/.github/workflows/ci_run_scm_rts.yml +++ b/.github/workflows/ci_run_scm_rts.yml @@ -208,7 +208,7 @@ jobs: - name: Download SCM RT baselines run: | cd ${dir_bl} - wget https://dtcenter.ucar.edu/ccpp/users/rt/rt-baselines-${{matrix.build-type}}.zip + wget https://dtcenter.ucar.edu/ccpp/rt/rt-baselines-${{matrix.build-type}}.zip unzip rt-baselines-${{matrix.build-type}}.zip - name: Compare SCM RT output to baselines From dbff20b031f2ab1f86d107ed70b760e60926f4cc Mon Sep 17 00:00:00 2001 From: Grant Firl Date: Mon, 8 Jul 2024 15:05:03 -0400 Subject: [PATCH 16/16] update ccpp/physics submodule pointer and .gitmodules --- .gitmodules | 6 ++---- ccpp/physics | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.gitmodules b/.gitmodules index d4f9936d0..dc0798c32 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,10 +4,8 @@ branch = main [submodule "ccpp-physics"] path = ccpp/physics - #url = https://github.com/NCAR/ccpp-physics - #branch = main - url = https://github.com/grantfirl/ccpp-physics - branch = ufs-dev-PR189 + url = https://github.com/NCAR/ccpp-physics + branch = main [submodule "CMakeModules"] path = CMakeModules url = https://github.com/noaa-emc/CMakeModules diff --git a/ccpp/physics b/ccpp/physics index f4e0fa187..3a1969102 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit f4e0fa187121d266634df4779d11b95ad1280d61 +Subproject commit 3a19691021b779748f4b448d3f21ab381fcc6c6e