Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 042022 #184

Merged
merged 6 commits into from
Apr 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 reflects the 202107 release of the Finite Volume Cubed-Sphere Dynamical Core (FV3) from GFDL
The source contained herein reflects the 202204 release of the Finite Volume Cubed-Sphere Dynamical Core (FV3) from GFDL

The GFDL Microphysics is also available within this repository.

Expand Down
24 changes: 24 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
# RELEASE NOTES for FV3 202204: Summary
FV3-202204-public --- April 2022
Lucas Harris, GFDL [email protected]

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 FV3 202107: Summary

Expand Down
2 changes: 1 addition & 1 deletion driver/GFDL/atmosphere.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
Loading