Skip to content

Commit

Permalink
Merge branch 'NOAA-GFDL:main' into shiemom_topush
Browse files Browse the repository at this point in the history
  • Loading branch information
JosephMouallem authored Jun 13, 2024
2 parents f7767bd + adb3417 commit e410c40
Show file tree
Hide file tree
Showing 17 changed files with 2,607 additions and 2,294 deletions.
44 changes: 0 additions & 44 deletions .github/workflows/SHiELD_parallelworks.yml

This file was deleted.

163 changes: 163 additions & 0 deletions .github/workflows/SHiELD_parallelworks_intel.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
name: Compile SHiELD SOLO and run tests

# This GitHub Action Workflow is running on the cloud devcimultiintel cluster
# The tests are run inside of a container with the following software/libraries:
# -intel: 2023.2.0
# -hdf5: 1.14.0
# -netcdf-c: 4.9.2
# -netcdf-fortran: 4.6.0
# -cmake
# -libyaml

on:
pull_request:
branches:
- main
# run weekly on Sunday
schedule:
- cron: '0 0 * * 0'

#this should cancel in progress ci runs for the same PR
#(e.g. a second commit on the same PR comes in while CI is still running)
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
checkout:
if: github.repository == 'NOAA-GFDL/GFDL_atmos_cubed_sphere'
runs-on: [gfdlacsciintel]
name: Checkout Code
steps:
# It can take a long time (5-15 minutes) to spinup nodes
# so this salloc will prompt 46 nodes to startup and stay active for 20 min
# this is enough nodes for the first 17 tests to run in parallel, and we
# have 17 runners configured.
- run: salloc --partition=p2 -N 46 -J $GITHUB_SHA sleep 20m &
- run: /contrib/fv3/GFDL_atmos_cubed_sphere_CI/checkout.sh $GITHUB_REF $GITHUB_SHA

build:
if: github.repository == 'NOAA-GFDL/GFDL_atmos_cubed_sphere'
runs-on: [gfdlacsciintel]
name: SOLO SHiELD build
needs: [checkout]
strategy:
fail-fast: true
max-parallel: 3
matrix:
runpath: [/contrib/fv3/GFDL_atmos_cubed_sphere_CI/]
runscript: [swcompile.sh, nhcompile.sh, hydrocompile.sh]
steps:
- env:
RUNPATH: ${{ matrix.runpath }}
RUNSCRIPT: ${{ matrix.runscript }}
run: $RUNPATH/$RUNSCRIPT $GITHUB_REF $GITHUB_SHA

test:
if: github.repository == 'NOAA-GFDL/GFDL_atmos_cubed_sphere'
runs-on: [gfdlacsciintel]
name: SOLO SHiELD test suite
needs: [checkout, build]
strategy:
fail-fast: false
max-parallel: 17
matrix:
runpath: [/contrib/fv3/GFDL_atmos_cubed_sphere_CI/]
runscript:
# These are placed in order of largest to smallest jobs
#layout 8,8 needs 8 nodes on dvcimultiintel cluster
- C512r20.solo.superC.sh
- C768.sw.BTwave.sh
#layout 4,8 needs 4 nodes on dvcimultiintel cluster
- C256r20.solo.superC.sh
- C384.sw.BLvortex.sh
#layout 4,4 needs 2 nodes on dvcimultiintel cluster
- C128r20.solo.superC.sh
- C128r3.solo.TC.d1.sh
- C128r3.solo.TC.h6.sh
- C128r3.solo.TC.sh
- C128r3.solo.TC.tr8.sh
- C192.sw.BLvortex.sh
- C192.sw.BTwave.sh
- C192.sw.modon.sh
- C384.sw.BTwave.sh
#layout 4,1 and 2,2 need 1 node on dvcimultiintel cluster
- C96.solo.BCdry.hyd.sh
- C96.solo.BCdry.sh
- C96.solo.BCmoist.hyd.d3.sh
- C96.solo.BCmoist.hyd.sh
- C96.solo.BCmoist.nhK.sh
- C96.solo.BCmoist.sh
- C96.solo.mtn_rest.hyd.diff2.sh
- C96.solo.mtn_rest.hyd.sh
- C96.solo.mtn_rest.nonmono.diff2.sh
- C96.solo.mtn_rest.sh
- C96.sw.BLvortex.sh
- C96.sw.BTwave.sh
- C96.sw.modon.sh
- C96.sw.RHwave.sh
- d96_1k.solo.mtn_rest_shear.olddamp.sh
- d96_1k.solo.mtn_rest_shear.sh
- d96_1k.solo.mtn_schar.mono.sh
- d96_1k.solo.mtn_schar.sh
- d96_2k.solo.bubble.n0.sh
- d96_2k.solo.bubble.nhK.sh
- d96_2k.solo.bubble.sh
- d96_500m.solo.mtn_schar.sh
steps:
# This will end the slurm job started in the checkout job
- run: scancel -n $GITHUB_SHA
- env:
RUNPATH: ${{ matrix.runpath }}
RUNSCRIPT: ${{ matrix.runscript }}
run: $RUNPATH/$RUNSCRIPT $GITHUB_REF $GITHUB_SHA
shutdown:
if: always() && github.repository == 'NOAA-GFDL/GFDL_atmos_cubed_sphere'
runs-on: [gfdlacsciintel]
name: Shutdown Processes
needs: [checkout, build, test]
strategy:
fail-fast: false
max-parallel: 17
matrix:
test:
- C512r20.solo.superC
- C768.sw.BTwave
- C256r20.solo.superC
- C384.sw.BLvortex
- C128r20.solo.superC
- C128r3.solo.TC.d1
- C128r3.solo.TC.h6
- C128r3.solo.TC
- C128r3.solo.TC.tr8
- C192.sw.BLvortex
- C192.sw.BTwave
- C192.sw.modon
- C384.sw.BTwave
- C96.solo.BCdry.hyd
- C96.solo.BCdry
- C96.solo.BCmoist.hyd.d3
- C96.solo.BCmoist.hyd
- C96.solo.BCmoist.nhK
- C96.solo.BCmoist
- C96.solo.mtn_rest.hyd.diff2
- C96.solo.mtn_rest.hyd
- C96.solo.mtn_rest.nonmono.diff2
- C96.solo.mtn_rest
- C96.sw.BLvortex
- C96.sw.BTwave
- C96.sw.modon
- C96.sw.RHwave
- d96_1k.solo.mtn_rest_shear.olddamp
- d96_1k.solo.mtn_rest_shear
- d96_1k.solo.mtn_schar.mono
- d96_1k.solo.mtn_schar
- d96_2k.solo.bubble.n0
- d96_2k.solo.bubble.nhK
- d96_2k.solo.bubble
- d96_500m.solo.mtn_schar
steps:
- run: scancel -n $GITHUB_SHA
- env:
JOB: ${{ github.sha }}_${{ matrix.test }}
run: scancel -n $JOB
18 changes: 18 additions & 0 deletions .github/workflows/daily_cleanup_parallelworks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Old Build Cleanup

# This GitHub Action Workflow is runing on the GFDL_ACS_CIINTEL cluster
# This will delete all build directories older than 30 days
# Build directories are on the cloud at /contrib/fv3/2023.2.0

on:
schedule:
# run daily at midnight
- cron: '0 0 * * *'

jobs:
delete:
if: github.repository == 'NOAA-GFDL/GFDL_atmos_cubed_sphere'
runs-on: [gfdlacsciintel]
name: Delete Builds
steps:
- run: find /contrib/fv3/2023.2.0/GFDL_atmos_cubed_sphere/refs/pull -maxdepth 1 -mindepth 1 -mtime +30 -type d -print -exec rm -rf "{}" \;
5 changes: 3 additions & 2 deletions driver/GFDL/atmosphere.F90
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ module atmosphere_mod
#endif

use mpp_domains_mod, only: mpp_get_data_domain, mpp_get_compute_domain
use gfdl_mp_mod, only: gfdl_mp_init, gfdl_mp_end
use gfdl_mp_mod, only: qs_init, gfdl_mp_init, gfdl_mp_end
use coarse_graining_mod, only: coarse_graining_init
use coarse_grained_diagnostics_mod, only: fv_coarse_diag_init, fv_coarse_diag
use coarse_grained_restart_files_mod, only: fv_coarse_restart_init
Expand Down Expand Up @@ -206,7 +206,6 @@ subroutine atmosphere_init (Time_init, Time, Time_step, Surf_diff, Grid_box)
!For regional
a_step = 0
current_time_in_seconds = time_type_to_real( Time - Time_init )
if (mpp_pe() == 0) write(0,"('atmosphere_init: current_time_seconds = ',f9.1)")current_time_in_seconds

allocate(pelist(mpp_npes()))
call mpp_get_current_pelist(pelist)
Expand Down Expand Up @@ -314,6 +313,8 @@ subroutine atmosphere_init (Time_init, Time, Time_step, Surf_diff, Grid_box)

if (Atm(mygrid)%flagstruct%do_inline_mp) then
call gfdl_mp_init(input_nml_file, stdlog(), Atm(mygrid)%flagstruct%hydrostatic)
else
call qs_init
endif

call timing_on('FV_RESTART')
Expand Down
2 changes: 1 addition & 1 deletion model/fv_dynamics.F90
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ subroutine fv_dynamics(npx, npy, npz, nq_tot, ng, bdt, consv_te, fill,
!---------------------
if ( (consv_te > 0. .or. idiag%id_te>0) .and. (.not.do_adiabatic_init) ) then
call compute_total_energy(is, ie, js, je, isd, ied, jsd, jed, npz, &
u, v, w, delz, pt, delp, q, dp1, pe, peln, phis, &
u, v, w, delz, pt, delp, q, dp1, q_con, pe, peln, phis, &
gridstruct%rsin2, gridstruct%cosa_s, &
zvir, cp_air, rdgas, hlv, te_2d, ua, va, teq, &
flagstruct%moist_phys, nwat, sphum, liq_wat, rainwat, &
Expand Down
8 changes: 4 additions & 4 deletions model/fv_grid_utils.F90
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ module fv_grid_utils_mod
implicit none
private
logical:: symm_grid
#ifdef NO_QUAD_PRECISION
! 64-bit precision (kind=8)
integer, parameter:: f_p = selected_real_kind(15)
#else
#ifdef ENABLE_QUAD_PRECISION
! Higher precision (kind=16) for grid geometrical factors:
integer, parameter:: f_p = selected_real_kind(20)
#else
! 64-bit precision (kind=8)
integer, parameter:: f_p = selected_real_kind(15)
#endif
real, parameter:: big_number=1.d8
real, parameter:: tiny_number=1.d-8
Expand Down
Loading

0 comments on commit e410c40

Please sign in to comment.