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

Add an option to use zero-gradient BC to reconstruct interface u/v for height advection; change dz_min as a input #53

Merged
merged 4 commits into from
Jan 25, 2021
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
5 changes: 3 additions & 2 deletions model/dyn_core.F90
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,7 @@ subroutine dyn_core(npx, npy, npz, ng, sphum, nq, bdt, n_map, n_split, zvir, cp,
call timing_on('UPDATE_DZ_C')
call update_dz_c(is, ie, js, je, npz, ng, dt2, dp_ref, zs, gridstruct%area, ut, vt, gz, ws3, &
npx, npy, gridstruct%sw_corner, gridstruct%se_corner, &
gridstruct%ne_corner, gridstruct%nw_corner, bd, gridstruct%grid_type)
gridstruct%ne_corner, gridstruct%nw_corner, bd, gridstruct%grid_type, flagstruct%dz_min)
call timing_off('UPDATE_DZ_C')

call timing_on('Riem_Solver')
Expand Down Expand Up @@ -1029,7 +1029,8 @@ subroutine dyn_core(npx, npy, npz, ng, sphum, nq, bdt, n_map, n_split, zvir, cp,
#ifndef SW_DYNAMICS
call timing_on('UPDATE_DZ')
call update_dz_d(nord_v, damp_vt, flagstruct%hord_tm, is, ie, js, je, npz, ng, npx, npy, gridstruct%area, &
gridstruct%rarea, dp_ref, zs, zh, crx, cry, xfx, yfx, ws, rdt, gridstruct, bd, flagstruct%lim_fac)
gridstruct%rarea, dp_ref, zs, zh, crx, cry, xfx, yfx, ws, rdt, gridstruct, bd, flagstruct%lim_fac, &
flagstruct%dz_min, flagstruct%psm_bc)
call timing_off('UPDATE_DZ')
if ( flagstruct%fv_debug ) then
if ( .not. flagstruct%hydrostatic ) &
Expand Down
7 changes: 7 additions & 0 deletions model/fv_arrays.F90
Original file line number Diff line number Diff line change
Expand Up @@ -991,6 +991,13 @@ module fv_arrays_mod
!< at the center of the domain (the center of tile 1), if set to .true.
!< The default value is .false.

real :: dz_min = 2 !< Minimum thickness depth to to enforce monotonicity of height to prevent blowup.
!< 2 by default

integer :: psm_bc = 0 !< Option to use origional BCs (0) or zero-gradient BCs (1)
!< to reconstruct interface u/v with the Parabolic Spline Method
!< for the advection of height. 0 by default.

integer :: a2b_ord = 4 !< Order of interpolation used by the pressure gradient force
!< to interpolate cell-centered (A-grid) values to the grid corners.
!< The default value is 4 (recommended), which uses fourth-order
Expand Down
10 changes: 9 additions & 1 deletion model/fv_control.F90
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,8 @@ subroutine fv_control_init(Atm, dt_atmos, this_grid, grids_on_this_pe, p_split)
logical , pointer :: nudge_qv
real, pointer :: add_noise
logical , pointer :: butterfly_effect
real , pointer :: dz_min
integer , pointer :: psm_bc

integer , pointer :: a2b_ord
integer , pointer :: c2l_ord
Expand Down Expand Up @@ -908,6 +910,8 @@ subroutine set_namelist_pointers(Atm)
nudge_qv => Atm%flagstruct%nudge_qv
add_noise => Atm%flagstruct%add_noise
butterfly_effect => Atm%flagstruct%butterfly_effect
dz_min => Atm%flagstruct%dz_min
psm_bc => Atm%flagstruct%psm_bc
a2b_ord => Atm%flagstruct%a2b_ord
c2l_ord => Atm%flagstruct%c2l_ord
ndims => Atm%flagstruct%ndims
Expand Down Expand Up @@ -1047,6 +1051,10 @@ subroutine read_namelist_fv_core_nml(Atm)
!!
!> \param[in] butterfly\_effect Logical: whether to flip the least-significant-bit of the lowest level temperature. False by default.
!!
!> \param[in] dz\_min Real: Minimum layer thickness to enforce monotonicity of height to prevent blowup. Set to 2 by default.
!!
!> \param[in] psm\_bc Integer: Options to use origional BCs (0) or zero-gradient BCs (1) to reconstruct interface u/v for the advection of height. Set to 0 by default.
!!
!> \param[in] adjust\_dry\_mass Logical: whether to adjust the global dry-air mass to the value set by dry\_mass. This is only done in an initialization step, particularly when using an initial condition from an external dataset, interpolated from another resolution (either horizontal or vertical), or when changing the topography, so that the global mass of the atmosphere matches some estimate of observed value. False by default. It is recommended to only set this to True when initializing the model.
!!
!> \param[in] breed\_vortex\_inline Logical: whether to bogus tropical cyclones into the model, which are specified by an external file. Options are set in fv\_nwp\_nudge\_nml. False by default.
Expand Down Expand Up @@ -1438,7 +1446,7 @@ subroutine read_namelist_fv_core_nml(Atm)
c2l_ord, dx_const, dy_const, umax, deglat, &
deglon_start, deglon_stop, deglat_start, deglat_stop, &
phys_hydrostatic, use_hydro_pressure, make_hybrid_z, old_divg_damp, add_noise, butterfly_effect, &
nested, twowaynest, nudge_qv, &
dz_min, psm_bc, nested, twowaynest, nudge_qv, &
nestbctype, nestupdate, nsponge, s_weight, &
check_negative, nudge_ic, halo_update_type, gfs_phil, agrid_vel_rst, &
do_uni_zfull, adj_mass_vmr, fac_n_spl, fhouri, update_blend, regional, bc_update_interval, &
Expand Down
Loading