Skip to content

Commit

Permalink
Update RELEASE.md with tech note pointer (NOAA-EMC#22)
Browse files Browse the repository at this point in the history
* remove trailing whitespace and any tabs

* update the RELEASE.md with the FV3 technical memorandum

* semantic fix in RELEASE.md

* adds default values for nest_*offsets in fv_control

breaks up a too long line in fv_nesting.F90

* change default value of nestupdate to 7
  • Loading branch information
bensonr committed Apr 21, 2020
1 parent 9722519 commit 0d43312
Show file tree
Hide file tree
Showing 8 changed files with 59 additions and 57 deletions.
2 changes: 1 addition & 1 deletion RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ The non-functional gfdl_cloud_microphys.F90 has been removed and replaced with t

The namelist nggps_diag_nml has been eliminated. 'fdiag' is no longer handled by the dynamical core, and should be handled by the physics driver.

For a complete technical description see the [forthcoming] GFDL Technical Memorandum.
For a complete technical description see the NOAA Technical Memorandum OAR GFDL: https://repository.library.noaa.gov/view/noaa/23432
8 changes: 4 additions & 4 deletions model/boundary.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2306,7 +2306,7 @@ subroutine update_coarse_grid_mpp(var_coarse, var_nest, nest_domain, dx, dy, are
position = CENTER
end if

!Note that *_c does not have values on the parent_proc.
!Note that *_c does not have values on the parent_proc.
!Must use isu, etc. to get bounds of update region on parent.
call mpp_get_F2C_index(nest_domain, is_c, ie_c, js_c, je_c, is_f, ie_f, js_f, je_f, nest_level=nest_level, position=position)
if (child_proc) then
Expand Down Expand Up @@ -2477,7 +2477,7 @@ subroutine fill_var_coarse(var_coarse, coarse_dat_recv, isd_p, ied_p, jsd_p, jed
select case (nestupdate)
case (1,2,6,7,8) ! 1 = Conserving update on all variables; 2 = conserving update for cell-centered values; 6 = conserving remap-update

!$OMP parallel do default(none) shared(npz,jsu,jeu,isu,ieu,coarse_dat_recv,parent_grid,var_coarse)
!$OMP parallel do default(none) shared(npz,jsu,jeu,isu,ieu,coarse_dat_recv,parent_grid,var_coarse)
do k=1,npz
do j=jsu,jeu
do i=isu,ieu
Expand All @@ -2500,7 +2500,7 @@ subroutine fill_var_coarse(var_coarse, coarse_dat_recv, isd_p, ied_p, jsd_p, jed
select case (nestupdate)
case (1,6,7,8)

!$OMP parallel do default(none) shared(npz,jsu,jeu,isu,ieu,coarse_dat_recv,parent_grid,var_coarse)
!$OMP parallel do default(none) shared(npz,jsu,jeu,isu,ieu,coarse_dat_recv,parent_grid,var_coarse)
do k=1,npz
do j=jsu,jeu+1
do i=isu,ieu
Expand All @@ -2520,7 +2520,7 @@ subroutine fill_var_coarse(var_coarse, coarse_dat_recv, isd_p, ied_p, jsd_p, jed
select case (nestupdate)
case (1,6,7,8) !averaging update; in-line average for face-averaged values instead of areal average

!$OMP parallel do default(none) shared(npz,jsu,jeu,isu,ieu,coarse_dat_recv,parent_grid,var_coarse)
!$OMP parallel do default(none) shared(npz,jsu,jeu,isu,ieu,coarse_dat_recv,parent_grid,var_coarse)
do k=1,npz
do j=jsu,jeu
do i=isu,ieu+1
Expand Down
2 changes: 1 addition & 1 deletion model/fv_arrays.F90
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ module fv_arrays_mod
logical :: nested = .false.
integer :: nestbctype = 1
integer :: nsponge = 0
integer :: nestupdate = 0
integer :: nestupdate = 7
logical :: twowaynest = .false.
integer :: ioffset, joffset !Position of nest within parent grid
integer :: nlevel = 0 ! levels down from top-most domain
Expand Down
4 changes: 2 additions & 2 deletions model/fv_control.F90
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ subroutine fv_control_init(Atm, dt_atmos, this_grid, grids_on_this_pe, p_split)
integer, dimension(MAX_NNEST) :: grid_pes = 0
integer, dimension(MAX_NNEST) :: grid_coarse = -1
integer, dimension(MAX_NNEST) :: nest_refine = 3
integer, dimension(MAX_NNEST) :: nest_ioffsets, nest_joffsets
integer, dimension(MAX_NNEST) :: nest_ioffsets = -999, nest_joffsets = -999
integer, dimension(MAX_NNEST) :: all_npx = 0
integer, dimension(MAX_NNEST) :: all_npy = 0
integer, dimension(MAX_NNEST) :: all_npz = 0
Expand Down Expand Up @@ -568,7 +568,7 @@ subroutine fv_control_init(Atm, dt_atmos, this_grid, grids_on_this_pe, p_split)

endif

allocate(Atm(this_grid)%neststruct%child_grids(ngrids))
allocate(Atm(this_grid)%neststruct%child_grids(ngrids))
do n=1,ngrids
Atm(this_grid)%neststruct%child_grids(n) = (grid_coarse(n) == this_grid)
allocate(Atm(n)%neststruct%do_remap_bc(ngrids))
Expand Down
8 changes: 5 additions & 3 deletions model/fv_nesting.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1785,7 +1785,7 @@ end subroutine set_BCs_t0

subroutine d2c_setup(u, v, &
ua, va, &
uc, vc, dord4, &
uc, vc, dord4, &
isd,ied,jsd,jed, is,ie,js,je, npx,npy, &
grid_type, bounded_domain, &
se_corner, sw_corner, ne_corner, nw_corner, &
Expand Down Expand Up @@ -2455,7 +2455,7 @@ subroutine twoway_nest_update(npx, npy, npz, zvir, ncnst, sphum, &


!We don't currently have a good way to communicate all namelist items between
! grids (since we cannot assume that we have internal namelists available), so
! grids (since we cannot assume that we have internal namelists available), so
! we get the clutzy structure here.
if ( (neststruct%child_proc .and. .not. flagstruct%hydrostatic) .or. &
(parent_grid%neststruct%parent_proc .and. .not. parent_grid%flagstruct%hydrostatic) ) then
Expand Down Expand Up @@ -2541,7 +2541,9 @@ subroutine twoway_nest_update(npx, npy, npz, zvir, ncnst, sphum, &
bd, isd_p, ied_p, jsd_p, jed_p, isd, ied, jsd, jed, &
neststruct%isu, neststruct%ieu, neststruct%jsu, neststruct%jeu, &
npx, npy, 0, 0, &
neststruct%refinement, neststruct%nestupdate, upoff, 0, parent_grid%neststruct%parent_proc, neststruct%child_proc, parent_grid, grid_number-1)
neststruct%refinement, neststruct%nestupdate, upoff, 0, &
parent_grid%neststruct%parent_proc, neststruct%child_proc, &
parent_grid, grid_number-1)

!!! The mpp version of update_coarse_grid does not return a consistent value of ps
!!! across PEs, as it does not go into the haloes of a given coarse-grid PE. This
Expand Down
4 changes: 2 additions & 2 deletions model/tp_core.F90
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ subroutine fv_tp_2d(q, crx, cry, npx, npy, hord, fx, fy, xfx, yfx, &
ord_ou = hord

if (.not. gridstruct%bounded_domain) &
call copy_corners(q, npx, npy, 2, gridstruct%bounded_domain, bd, &
call copy_corners(q, npx, npy, 2, gridstruct%bounded_domain, bd, &
gridstruct%sw_corner, gridstruct%se_corner, gridstruct%nw_corner, gridstruct%ne_corner)

call yppm(fy2, q, cry, ord_in, isd,ied,isd,ied, js,je,jsd,jed, npx,npy, gridstruct%dya, gridstruct%bounded_domain, gridstruct%grid_type)
Expand All @@ -147,7 +147,7 @@ subroutine fv_tp_2d(q, crx, cry, npx, npy, hord, fx, fy, xfx, yfx, &
call xppm(fx, q_i, crx(is,js), ord_ou, is,ie,isd,ied, js,je,jsd,jed, npx,npy, gridstruct%dxa, gridstruct%bounded_domain, gridstruct%grid_type)

if (.not. gridstruct%bounded_domain) &
call copy_corners(q, npx, npy, 1, gridstruct%bounded_domain, bd, &
call copy_corners(q, npx, npy, 1, gridstruct%bounded_domain, bd, &
gridstruct%sw_corner, gridstruct%se_corner, gridstruct%nw_corner, gridstruct%ne_corner)

call xppm(fx2, q, crx, ord_in, is,ie,isd,ied, jsd,jed,jsd,jed, npx,npy, gridstruct%dxa, gridstruct%bounded_domain, gridstruct%grid_type)
Expand Down
4 changes: 2 additions & 2 deletions tools/external_ic.F90
Original file line number Diff line number Diff line change
Expand Up @@ -655,15 +655,15 @@ subroutine get_nggps_ic (Atm, fv_domain)
Atm%gridstruct%dxc, Atm%gridstruct%dyc, Atm%gridstruct%sin_sg, &
Atm%flagstruct%n_zs_filter, cnst_0p20*Atm%gridstruct%da_min, &
.false., oro_g, Atm%gridstruct%bounded_domain, &
Atm%domain, Atm%bd)
Atm%domain, Atm%bd)
if ( is_master() ) write(*,*) 'Warning !!! del-2 terrain filter has been applied ', &
Atm%flagstruct%n_zs_filter, ' times'
else if( Atm%flagstruct%nord_zs_filter == 4 ) then
call del4_cubed_sphere(Atm%npx, Atm%npy, Atm%phis, Atm%gridstruct%area_64, &
Atm%gridstruct%dx, Atm%gridstruct%dy, &
Atm%gridstruct%dxc, Atm%gridstruct%dyc, Atm%gridstruct%sin_sg, &
Atm%flagstruct%n_zs_filter, .false., oro_g, &
Atm%gridstruct%bounded_domain, &
Atm%gridstruct%bounded_domain, &
Atm%domain, Atm%bd)
if ( is_master() ) write(*,*) 'Warning !!! del-4 terrain filter has been applied ', &
Atm%flagstruct%n_zs_filter, ' times'
Expand Down
84 changes: 42 additions & 42 deletions tools/test_cases.F90
Original file line number Diff line number Diff line change
Expand Up @@ -6279,26 +6279,26 @@ subroutine init_double_periodic(u,v,w,pt,delp,q,phis, ps,pe,peln,pk,pkz, uc,vc,
call hydro_eq(npz, is, ie, js, je, ps, phis, dry_mass, &
delp, ak, bk, pt, delz, area, ng, .false., hydrostatic, hybrid_z, domain)

! *** Add Initial perturbation ***
if (bubble_do) then
r0 = 100.*sqrt(dx_const**2 + dy_const**2)
icenter = npx/2
jcenter = npy/2

do j=js,je
do i=is,ie
dist = (i-icenter)*dx_const*(i-icenter)*dx_const &
+(j-jcenter)*dy_const*(j-jcenter)*dy_const
dist = min(r0, sqrt(dist))
do k=1,npz
prf = ak(k) + ps(i,j)*bk(k)
if ( prf > 100.E2 ) then
pt(i,j,k) = pt(i,j,k) + 0.01*(1. - (dist/r0)) * prf/ps(i,j)
endif
enddo
enddo
enddo
endif
! *** Add Initial perturbation ***
if (bubble_do) then
r0 = 100.*sqrt(dx_const**2 + dy_const**2)
icenter = npx/2
jcenter = npy/2

do j=js,je
do i=is,ie
dist = (i-icenter)*dx_const*(i-icenter)*dx_const &
+(j-jcenter)*dy_const*(j-jcenter)*dy_const
dist = min(r0, sqrt(dist))
do k=1,npz
prf = ak(k) + ps(i,j)*bk(k)
if ( prf > 100.E2 ) then
pt(i,j,k) = pt(i,j,k) + 0.01*(1. - (dist/r0)) * prf/ps(i,j)
endif
enddo
enddo
enddo
endif
if ( hydrostatic ) then
call p_var(npz, is, ie, js, je, ptop, ptop_min, delp, delz, pt, ps, &
pe, peln, pk, pkz, kappa, q, ng, ncnst, area, dry_mass, .false., .false., &
Expand Down Expand Up @@ -6645,26 +6645,26 @@ subroutine init_double_periodic(u,v,w,pt,delp,q,phis, ps,pe,peln,pk,pkz, uc,vc,
.true., hydrostatic, nwat, domain, flagstruct%adiabatic)

! *** Add Initial perturbation ***
if (bubble_do) then
r0 = 10.e3
zc = 1.4e3 ! center of bubble from surface
icenter = (npx-1)/2 + 1
jcenter = (npy-1)/2 + 1
do k=1, npz
zm = 0.5*(ze1(k)+ze1(k+1))
ptmp = ( (zm-zc)/zc ) **2
if ( ptmp < 1. ) then
do j=js,je
do i=is,ie
dist = ptmp+((i-icenter)*dx_const/r0)**2+((j-jcenter)*dy_const/r0)**2
if ( dist < 1. ) then
pt(i,j,k) = pt(i,j,k) + pturb*(1.-sqrt(dist))
endif
enddo
enddo
endif
enddo
endif
if (bubble_do) then
r0 = 10.e3
zc = 1.4e3 ! center of bubble from surface
icenter = (npx-1)/2 + 1
jcenter = (npy-1)/2 + 1
do k=1, npz
zm = 0.5*(ze1(k)+ze1(k+1))
ptmp = ( (zm-zc)/zc ) **2
if ( ptmp < 1. ) then
do j=js,je
do i=is,ie
dist = ptmp+((i-icenter)*dx_const/r0)**2+((j-jcenter)*dy_const/r0)**2
if ( dist < 1. ) then
pt(i,j,k) = pt(i,j,k) + pturb*(1.-sqrt(dist))
endif
enddo
enddo
endif
enddo
endif

case ( 101 )

Expand Down Expand Up @@ -9374,8 +9374,8 @@ subroutine interp_left_edge_1d(qout, qin, dx, ifirst, ilast, order)
!!$ enddo


call mp_stop
stop
call mp_stop
stop

endif

Expand Down

0 comments on commit 0d43312

Please sign in to comment.