Skip to content

Commit

Permalink
Dev/gfdl test (#222)
Browse files Browse the repository at this point in the history
* updated fv_regional_bc.F90 to read levsp from GFS_ctl file (#152)

* Updating a continue statement in fv_nudge (#153)

* update in fv_nudge to fix 666 label logic

* fix logic errors (#138)

* update to external_ic::remap_scale to skip remapping non-existent IC tracers (#159)

* Fix nudge logic (#157)

* fix logic errors

* fix answer changes

* adding back a line that was mistakenly deleted in a previous commit (#166)

* Release 042022 (#184)

* Merge of updates from GFDL Weather and Climate Dynamics Division (202204):

    *add license header to missing files and fix typo in header

    *updates needed for fv3_gfsphysics to have access to bounded_domain

    *remove obsoleted driver/SHiELD files

    *updating to fix bug where long_name and units attributes were not being captured in the RESTARTS

    *remove unused function fv_diagnostics::max_vorticity_hy1

    *remove avec timer remnants

    *adding ability to specify prefix and directory when reading and writing restarts

    *remove old style namelist read in favor of read from internal character variable

    *Added option for a mean wind

    *The planetary radius and rotation rate are now re-scalable by a namelist parameter (small_earth_scale) instead of using exclusively the hard-coded FMS constant.

    *fv_mapz: Cleanup and added helpful annotations to avoid getting lost so easily

    * remove duplicate code and fix lstatus on all grids depending on gfs_data and gfs_data.tile1

    * New idealized tests

    *Makes the non-hydrostatic restart variables optional for reads to allow hydrostatic ICs

    *Fix the hydrostatic TE remapping; Add GMAO cubic for TE remapping, which is used if kord_tm=0 and remap_te=.true.

    *Add a TE remapping option (kord_tm=0)

    *Addressing GNU Warnings

    *Add the L75 vertical config from HAFS

    * clean up fms_mp_mod and remove mp_bcst

* cherry pick 5193c6b from dev/emc

* Attempt at integrating fixes on top of dev/emc branch. (#173)

* remove outdated GFDL_tools/fv_diag_column.F90 which exists as the result of an improper merge.  The correct file is tools/fv_diag_column.F90 (#191)

* various io fixes (#192)

* fixes io performance issues by making everyone a reader when io_layout=1,1

adds capability to use FMS feature to ignore data integrity checksums in restarts

* rename enforce_rst_cksum to ignore_rst_cksum and change the default value for compatibility

* fix index error (#196)

* New notebooks (#190)

* Moving source files into source directory

* Added advection notebook

* Fixed subplot spacing

* New 3D case notebooks

* New idealized tests

Updated mtn_wave_tests_1km to restore missing graphics.

* first try at held-suarez

* Updated H-S superrotation notebook

* New level placement tool in an interactive note

* Minor updates to notebooks; deleted fv_eta binary.

* Regional decomposition test fix (when nrows_blend > 0) (#194) (#200)

* Regional bc blend changes to extend into interior halos and overlap on corners. Still not working for u and v.

dyn_core.F90 : Fix from Jun Wang to correct sync of u,v
fv_regional_bc.F90 : add check for nrows_blend > tile size; fix error when nrows_blend=1

Conflicts (not taken during chery-pick):
	driver/SHiELD/atmosphere.F90
	model/fv_sg.F90

Co-authored-by: Ted Mansell <[email protected]>

* Implementing CI (#207)

* CI Parallelworks update (#211)

* Update call to read_input_nml and remove unnecessary code. (#161)

* Removing use of INTERNAL_FILE_NML and cleaning up read_namelist_test_cases to remove unused argument

* deleting duplicate call to read_namelist_test_case_nml in fv_control

* removing commented code in fv_control

Co-authored-by: Rusty Benson <[email protected]>
Co-authored-by: menzel-gfdl <[email protected]>
Co-authored-by: Rusty Benson <[email protected]>
Co-authored-by: MatthewPyle-NOAA <[email protected]>
Co-authored-by: lharris4 <[email protected]>
Co-authored-by: Ted Mansell <[email protected]>
  • Loading branch information
7 people committed Oct 13, 2022
1 parent 6702139 commit 721e6f7
Show file tree
Hide file tree
Showing 70 changed files with 22,456 additions and 4,980 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/SHiELD_parallelworks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Compile SHiELD SOLO and run tests

on:
pull_request:
branches:
- main
jobs:
checkout:
runs-on: [self-hosted]
name: Checkout Code
steps:
- run: python3 /pw/storage/PWscripts/FV3checkoutStartClusters.py $GITHUB_REF

build:
runs-on: [self-hosted]
name: SOLO SHiELD build
needs: [checkout]
strategy:
fail-fast: true
max-parallel: 3
matrix:
runpath: [/pw/storage/PWscripts]
runscript: [FV3swStartClusters.py, FV3nhStartClusters.py, FV3hydroStartClusters.py]
steps:
- env:
RUNPATH: ${{ matrix.runpath }}
RUNSCRIPT: ${{ matrix.runscript }}
run: python3 $RUNPATH/$RUNSCRIPT $GITHUB_REF

test:
runs-on: [self-hosted]
name: SOLO SHiELD test suite
needs: [checkout, build]
strategy:
fail-fast: false
max-parallel: 3
matrix:
runpath: [/pw/storage/PWscripts]
runscript: [FV3C128r20.solo.superCStartClusters.py]
steps:
- env:
RUNPATH: ${{ matrix.runpath }}
RUNSCRIPT: ${{ matrix.runscript }}
run: python3 $RUNPATH/$RUNSCRIPT $GITHUB_REF

shutdowncluster:
runs-on: [self-hosted]
name: Shutdown cluster
if: always()
needs: [checkout, build, test]
steps:
- run: python3 /home/Lauren.Chilutti/pw/storage/PWscripts/stopClusters.py cifv3
2 changes: 1 addition & 1 deletion CODE_STYLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
!* (at your option) any later version.
!*
!* The FV3 dynamical core is distributed in the hope that it will be
!* useful, but WITHOUT ANYWARRANTY; without even the implied warranty
!* useful, but WITHOUT ANY WARRANTY; without even the implied warranty
!* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
!* See the GNU General Public License for more details.
!*
Expand Down
55 changes: 37 additions & 18 deletions GFDL_tools/fv_ada_nudge.F90
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
!* (at your option) any later version.
!*
!* The FV3 dynamical core is distributed in the hope that it will be
!* useful, but WITHOUT ANYWARRANTY; without even the implied warranty
!* useful, but WITHOUT ANY WARRANTY; without even the implied warranty
!* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
!* See the GNU General Public License for more details.
!*
Expand Down Expand Up @@ -262,7 +262,7 @@ module fv_ada_nudge_mod
contains


subroutine fv_ada_nudge ( Time, dt, npx, npy, npz, ps_dt, u_dt, v_dt, t_dt, q_dt, zvir, ptop, &
subroutine fv_ada_nudge ( Time, dt, npx, npy, npz, ps_dt, u_dt, v_dt, t_dt, q_dt, zvir, &
ak, bk, ts, ps, delp, ua, va, pt, nwat, q, phis, gridstruct, &
bd, domain )

Expand All @@ -271,7 +271,7 @@ subroutine fv_ada_nudge ( Time, dt, npx, npy, npz, ps_dt, u_dt, v_dt, t_dt, q_dt
integer, intent(in):: npz ! vertical dimension
integer, intent(in):: nwat
real, intent(in):: dt
real, intent(in):: zvir, ptop
real, intent(in):: zvir
type(domain2d), intent(INOUT), target :: domain
type(fv_grid_bounds_type), intent(IN) :: bd
real, intent(in ), dimension(npz+1):: ak, bk
Expand Down Expand Up @@ -435,7 +435,7 @@ subroutine fv_ada_nudge ( Time, dt, npx, npy, npz, ps_dt, u_dt, v_dt, t_dt, q_dt


call get_obs(Time, dt, zvir, ak, bk, ps, ts, ps_obs, delp, pt, nwat, q, u_obs, v_obs, t_obs, q_obs, &
phis, gz_int, ua, va, u_dt, v_dt, npx, npy, npz, factor, mask, ptop, bd, gridstruct, domain)
phis, gz_int, ua, va, u_dt, v_dt, npx, npy, npz, factor, mask, bd, gridstruct, domain)
! *t_obs* is virtual temperature
#ifdef ENABLE_ADA ! snz

Expand Down Expand Up @@ -1269,10 +1269,10 @@ end subroutine compute_slp


subroutine get_obs(Time, dt, zvir, ak, bk, ps, ts, ps_obs, delp, pt, nwat, q, u_obs, v_obs, t_obs, q_obs, &
phis, gz_int, ua, va, u_dt, v_dt, npx, npy, npz, factor, mask, ptop, bd, gridstruct, domain)
phis, gz_int, ua, va, u_dt, v_dt, npx, npy, npz, factor, mask, bd, gridstruct, domain)
type(time_type), intent(in):: Time
integer, intent(in):: npz, nwat, npx, npy
real, intent(in):: zvir, ptop
real, intent(in):: zvir
real, intent(in):: dt, factor
real, intent(in), dimension(npz+1):: ak, bk
type(fv_grid_bounds_type), intent(IN) :: bd
Expand Down Expand Up @@ -1423,26 +1423,26 @@ subroutine get_obs(Time, dt, zvir, ak, bk, ps, ts, ps_obs, delp, pt, nwat, q, u_
if ( nudge_winds ) then

call remap_uv(npz, ak, bk, ps(is:ie,js:je), delp, ut, vt, &
km, ps_dat(is:ie,js:je,1), u_dat(:,:,:,1), v_dat(:,:,:,1), ptop, bd )
km, ps_dat(is:ie,js:je,1), u_dat(:,:,:,1), v_dat(:,:,:,1), bd )

u_obs(:,:,:) = alpha*ut(:,:,:)
v_obs(:,:,:) = alpha*vt(:,:,:)

call remap_uv(npz, ak, bk, ps(is:ie,js:je), delp, ut, vt, &
km, ps_dat(is:ie,js:je,2), u_dat(:,:,:,2), v_dat(:,:,:,2), ptop, bd )
km, ps_dat(is:ie,js:je,2), u_dat(:,:,:,2), v_dat(:,:,:,2), bd )

u_obs(:,:,:) = u_obs(:,:,:) + beta*ut(:,:,:)
v_obs(:,:,:) = v_obs(:,:,:) + beta*vt(:,:,:)
endif

call remap_tq(npz, ak, bk, ps(is:ie,js:je), delp, ut, vt, &
km, ps_dat(is:ie,js:je,1), t_dat(:,:,:,1), q_dat(:,:,:,1), zvir, ptop, bd)
km, ps_dat(is:ie,js:je,1), t_dat(:,:,:,1), q_dat(:,:,:,1), zvir, bd)

t_obs(:,:,:) = alpha*ut(:,:,:)
q_obs(:,:,:) = alpha*vt(:,:,:)

call remap_tq(npz, ak, bk, ps(is:ie,js:je), delp, ut, vt, &
km, ps_dat(is:ie,js:je,2), t_dat(:,:,:,2), q_dat(:,:,:,2), zvir, ptop, bd)
km, ps_dat(is:ie,js:je,2), t_dat(:,:,:,2), q_dat(:,:,:,2), zvir, bd)

t_obs(:,:,:) = t_obs(:,:,:) + beta*ut(:,:,:)
q_obs(:,:,:) = q_obs(:,:,:) + beta*vt(:,:,:)
Expand Down Expand Up @@ -2309,9 +2309,9 @@ end subroutine get_int_hght


subroutine remap_tq( npz, ak, bk, ps, delp, t, q, &
kmd, ps0, ta, qa, zvir, ptop, bd)
kmd, ps0, ta, qa, zvir, bd)
integer, intent(in):: npz, kmd
real, intent(in):: zvir, ptop
real, intent(in):: zvir
real, intent(in):: ak(npz+1), bk(npz+1)
type(fv_grid_bounds_type), intent(IN) :: bd
real, intent(in), dimension(bd%is:bd%ie,bd%js:bd%je):: ps0
Expand Down Expand Up @@ -2373,7 +2373,7 @@ subroutine remap_tq( npz, ak, bk, ps, delp, t, q, &
qp(i,k) = qa(i,j,k)
enddo
enddo
call mappm(kmd, pe0, qp, npz, pe1, qn1, is,ie, 0, kord_data, ptop)
call mappm(kmd, pe0, qp, npz, pe1, qn1, is,ie, 0, kord_data)
do k=1,npz
do i=is,ie
q(i,j,k) = qn1(i,k)
Expand All @@ -2388,7 +2388,7 @@ subroutine remap_tq( npz, ak, bk, ps, delp, t, q, &
tp(i,k) = ta(i,j,k)
enddo
enddo
call mappm(kmd, pn0, tp, npz, pn1, qn1, is,ie, 1, kord_data, ptop)
call mappm(kmd, pn0, tp, npz, pn1, qn1, is,ie, 1, kord_data)

do k=1,npz
do i=is,ie
Expand All @@ -2401,9 +2401,8 @@ subroutine remap_tq( npz, ak, bk, ps, delp, t, q, &
end subroutine remap_tq


subroutine remap_uv(npz, ak, bk, ps, delp, u, v, kmd, ps0, u0, v0, ptop, bd)
subroutine remap_uv(npz, ak, bk, ps, delp, u, v, kmd, ps0, u0, v0, bd)
integer, intent(in):: npz
real, intent(IN):: ptop
real, intent(in):: ak(npz+1), bk(npz+1)
type(fv_grid_bounds_type), intent(IN) :: bd
real, intent(inout):: ps(bd%is:bd%ie,bd%js:bd%je)
Expand Down Expand Up @@ -2460,7 +2459,7 @@ subroutine remap_uv(npz, ak, bk, ps, delp, u, v, kmd, ps0, u0, v0, ptop, bd)
qt(i,k) = u0(i,j,k)
enddo
enddo
call mappm(kmd, pe0, qt, npz, pe1, qn1, is,ie, -1, kord_data, ptop)
call mappm(kmd, pe0, qt, npz, pe1, qn1, is,ie, -1, kord_data)
do k=1,npz
do i=is,ie
u(i,j,k) = qn1(i,k)
Expand All @@ -2474,7 +2473,7 @@ subroutine remap_uv(npz, ak, bk, ps, delp, u, v, kmd, ps0, u0, v0, ptop, bd)
qt(i,k) = v0(i,j,k)
enddo
enddo
call mappm(kmd, pe0, qt, npz, pe1, qn1, is,ie, -1, kord_data, ptop)
call mappm(kmd, pe0, qt, npz, pe1, qn1, is,ie, -1, kord_data)
do k=1,npz
do i=is,ie
v(i,j,k) = qn1(i,k)
Expand Down Expand Up @@ -2516,14 +2515,34 @@ subroutine fv_ada_nudge_end
call fv_io_register_axis(ada_driver_restart, numx=1, numy=1, numz=1, zsize=(/size(Atm_var%u_adj,3)/))
call register_restart_field(ada_driver_restart, &
& "u_adj", Atm_var%u_adj(:,:,:), dim_names_4d)
call register_variable_attribute(ada_driver_restart, &
& "u_adj", "long_name", "u_adj", str_len=len("u_adj"))
call register_variable_attribute(ada_driver_restart, &
& "u_adj", "units", "none", str_len=len("none"))
call register_restart_field(ada_driver_restart, &
& "v_adj", Atm_var%v_adj(:,:,:), dim_names_4d)
call register_variable_attribute(ada_driver_restart, &
& "v_adj", "long_name", "v_adj", str_len=len("v_adj"))
call register_variable_attribute(ada_driver_restart, &
& "v_adj", "units", "none", str_len=len("none"))
call register_restart_field(ada_driver_restart, &
& "t_adj", Atm_var%t_adj(:,:,:), dim_names_4d)
call register_variable_attribute(ada_driver_restart, &
& "t_adj", "long_name", "t_adj", str_len=len("t_adj"))
call register_variable_attribute(ada_driver_restart, &
& "t_adj", "units", "none", str_len=len("none"))
call register_restart_field(ada_driver_restart, &
& "q_adj", Atm_var%q_adj(:,:,:), dim_names_4d)
call register_variable_attribute(ada_driver_restart, &
& "q_adj", "long_name", "q_adj", str_len=len("q_adj"))
call register_variable_attribute(ada_driver_restart, &
& "q_adj", "units", "none", str_len=len("none"))
call register_restart_field(ada_driver_restart, &
& "ps_adj", Atm_var%ps_adj(:,:), dim_names_4d)
call register_variable_attribute(ada_driver_restart, &
& "ps_adj", "long_name", "ps_adj", str_len=len("ps_adj"))
call register_variable_attribute(ada_driver_restart, &
& "ps_adj", "units", "none", str_len=len("none"))
call write_restart(ada_driver_restart)
call close_file(ada_driver_restart)
endif
Expand Down
18 changes: 8 additions & 10 deletions GFDL_tools/fv_climate_nudge.F90
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
!* (at your option) any later version.
!*
!* The FV3 dynamical core is distributed in the hope that it will be
!* useful, but WITHOUT ANYWARRANTY; without even the implied warranty
!* useful, but WITHOUT ANY WARRANTY; without even the implied warranty
!* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
!* See the GNU General Public License for more details.
!*
Expand Down Expand Up @@ -262,12 +262,11 @@ end subroutine fv_climate_nudge_init
!###################################################################################

subroutine fv_climate_nudge (Time, dt, is, ie, js, je, npz, pfull, &
lon, lat, phis, ptop, ak, bk, &
lon, lat, phis, ak, bk, &
ps, u, v, t, q, psdt, udt, vdt, tdt, qdt )
type(time_type), intent(in) :: Time
real, intent(in) :: dt
integer, intent(in) :: is, ie, js, je, npz
real, intent(IN) :: ptop

real, intent(in) :: phis(is:ie,js:je)
real, intent(in) :: lon (is:ie,js:je)
Expand Down Expand Up @@ -439,15 +438,15 @@ subroutine fv_climate_nudge (Time, dt, is, ie, js, je, npz, pfull, &
enddo

if (get_wind) then
call remap_3d (is, ie, js, je, nlev_obs, npz, phaf_obs, u_obs, phaf, State(n)%u, -1, ptop)
call remap_3d (is, ie, js, je, nlev_obs, npz, phaf_obs, v_obs, phaf, State(n)%v, -1, ptop)
call remap_3d (is, ie, js, je, nlev_obs, npz, phaf_obs, u_obs, phaf, State(n)%u, -1)
call remap_3d (is, ie, js, je, nlev_obs, npz, phaf_obs, v_obs, phaf, State(n)%v, -1)
endif
if (get_qhum .or. get_temp) then
call remap_3d (is, ie, js, je, nlev_obs, npz, phaf_obs, q_obs, phaf, State(n)%q(:,:,:,1), 0, ptop)
call remap_3d (is, ie, js, je, nlev_obs, npz, phaf_obs, q_obs, phaf, State(n)%q(:,:,:,1), 0)
endif
if (get_temp) then
! use logp
call remap_3d (is, ie, js, je, nlev_obs, npz, lphaf_obs, t_obs, lphaf, State(n)%t, 1, ptop)
call remap_3d (is, ie, js, je, nlev_obs, npz, lphaf_obs, t_obs, lphaf, State(n)%t, 1)
State(n)%t = State(n)%t/(1.+ZVIR*State(n)%q(:,:,:,1)) ! virtual effect
endif

Expand Down Expand Up @@ -1023,7 +1022,7 @@ end subroutine remap_ps
!---------------------------------------------------

subroutine remap_3d( is, ie, js, je, km, npz, &
pe0, qn0, pe1, qn1, n, ptop )
pe0, qn0, pe1, qn1, n )

!--------
! Input:
Expand All @@ -1035,7 +1034,6 @@ subroutine remap_3d( is, ie, js, je, km, npz, &
real, intent(in):: qn0(is:ie,js:je,km) ! scalar quantity on input data levels
real, intent(in):: pe1(is:ie,js:je,npz+1) ! pressure at layer interfaces for model data
integer, intent(in):: n ! -1 wind; 0 sphum; +1 ptemp
real, intent(IN):: ptop

!--------
! Output:
Expand All @@ -1046,7 +1044,7 @@ subroutine remap_3d( is, ie, js, je, km, npz, &
integer :: i, j, k

do j = js,je
call mappm(km, pe0(is:ie,j,:), qn0(is:ie,j,:), npz, pe1(is:ie,j,:), qn1(is:ie,j,:), is,ie, n, 8, ptop)
call mappm(km, pe0(is:ie,j,:), qn0(is:ie,j,:), npz, pe1(is:ie,j,:), qn1(is:ie,j,:), is,ie, n, 8)
enddo

end subroutine remap_3d
Expand Down
2 changes: 1 addition & 1 deletion GFDL_tools/fv_cmip_diag.F90
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
!* (at your option) any later version.
!*
!* The FV3 dynamical core is distributed in the hope that it will be
!* useful, but WITHOUT ANYWARRANTY; without even the implied warranty
!* useful, but WITHOUT ANY WARRANTY; without even the implied warranty
!* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
!* See the GNU General Public License for more details.
!*
Expand Down
2 changes: 1 addition & 1 deletion GFDL_tools/read_climate_nudge_data.F90
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
!* (at your option) any later version.
!*
!* The FV3 dynamical core is distributed in the hope that it will be
!* useful, but WITHOUT ANYWARRANTY; without even the implied warranty
!* useful, but WITHOUT ANY WARRANTY; without even the implied warranty
!* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
!* See the GNU General Public License for more details.
!*
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# GFDL_atmos_cubed_sphere

The source contained herein merges in the [2021 January Release](https://github.com/NOAA-GFDL/GFDL_atmos_cubed_sphere/releases/tag/FV3-202101-public) of the Finite Volume Cubed-Sphere Dynamical Core (FV3) for use in the current GFDL models (AM4/CM4/ESM4/SPEAR).
The source contained herein merges in the [2022 April Release](https://github.com/NOAA-GFDL/GFDL_atmos_cubed_sphere/releases/tag/FV3-202204-public) of the Finite Volume Cubed-Sphere Dynamical Core (FV3) for use in the current GFDL models (AM4/CM4/ESM4/SPEAR).

# Where to find information

Expand Down
22 changes: 22 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,26 @@
# RELEASE NOTES for GFDL FV3: Summary
GFDL_2022.XX.YY --- July 2022

This version has been tested against the current SHiELD physics
and with FMS release 2022.01 from https://github.com/NOAA-GFDL/FMS

This release includes the following:
- Release of stand-alone solo_core functionality with simple physics.
- Updated GFDL Microphysics, used for real-time 2021 C-SHiELD and T-SHiELD. (L Zhou)
- Merges numerous updates from dev/emc.
- Leverage DA functionality from UFS with additional changes (M Tong).
- Updates to use the latest FMS release, including fms2_io.
- Adds license header to missing files and fixes typo in header.
- Fixes a bug where long_name and units attributes were not being captured in restart files.
- Adds the ability to specify prefix and directory when reading and writing restarts.
- The planetary radius and rotation rate are now re-scalable by a namelist parameter (small_earth_scale) instead of using exclusively the hard-coded FMS constant.
- Removes obsolete driver/SHiELD files.
- Removes unused function fv_diagnostics::max_vorticity_hy1.
- Removes avec timer remnants.
- Removes old style namelist read in favor of read from internal character variable.
- Adds option for a mean wind.
- Addresses GNU warnings.


# RELEASE NOTES for GFDL_2021.03.01: Summary
GFDL_2021.03.01 --- August 2021
Expand Down
Loading

0 comments on commit 721e6f7

Please sign in to comment.