Skip to content

Commit

Permalink
Merge pull request NCAR#11 from climbfuji/update_dtc_develop_from_dev…
Browse files Browse the repository at this point in the history
…_emc_20200409

Update dtc/develop from dev/emc 2020/04/09
  • Loading branch information
climbfuji authored Apr 10, 2020
2 parents ce66d6a + f9bbb4f commit 86c127f
Show file tree
Hide file tree
Showing 11 changed files with 16,638 additions and 617 deletions.
7 changes: 4 additions & 3 deletions driver/fvGFS/atmosphere.F90
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ module atmosphere_mod
! <tr>
! <td>mpp_mod</td>
! <td>mpp_error, stdout, FATAL, NOTE, input_nml_file, mpp_root_pe,
! mpp_npes, mpp_pe, mpp_chksum,mpp_get_current_pelist,
! mpp_npes, mpp_pe, mpp_chksum,mpp_get_current_pelist,
! mpp_set_current_pelist</td>
! </tr>
! <tr>
Expand Down Expand Up @@ -509,7 +509,7 @@ subroutine atmosphere_init (Time_init, Time, Time_step, Grid_box, area)
! --- initiate the start for a restarted regional forecast
if ( Atm(mytile)%gridstruct%regional .and. Atm(mytile)%flagstruct%warm_start ) then

call start_regional_restart(Atm(1), &
call start_regional_restart(Atm(1), dt_atmos, &
isc, iec, jsc, jec, &
isd, ied, jsd, jed )
endif
Expand Down Expand Up @@ -1269,7 +1269,7 @@ subroutine atmosphere_get_bottom_layer (Atm_block, DYCORE_Data)
rrg = rdgas / grav

if (first_time) then
print *, 'calculating slp kr value'
if (mpp_pe() == mpp_root_pe()) print *, 'calculating slp kr value'
! determine 0.8 sigma reference level
sigtop = Atm(mytile)%ak(1)/pstd_mks+Atm(mytile)%bk(1)
do k = 1, npz
Expand Down Expand Up @@ -1630,6 +1630,7 @@ subroutine atmosphere_state_update (Time, IPD_Data, IAU_Data, Atm_block, flip_vc

call nullify_domain()
call timing_on('FV_DIAG')

call fv_diag(Atm(mytile:mytile), zvir, fv_time, Atm(mytile)%flagstruct%print_freq)
first_diag = .false.
call timing_off('FV_DIAG')
Expand Down
5 changes: 5 additions & 0 deletions model/fv_arrays.F90
Original file line number Diff line number Diff line change
Expand Up @@ -985,6 +985,7 @@ module fv_arrays_mod
!< The default value is 4 (recommended); fourth-order interpolation
!< is used unless c2l_ord = 2.

integer :: nrows_blend = 0 !< # of blending rows in the outer integration domain.

real(kind=R_GRID) :: dx_const = 1000. !< Specifies the (uniform) grid-cell-width in the x-direction
!< on a doubly-periodic grid (grid_type = 4) in meters.
Expand All @@ -1006,6 +1007,10 @@ module fv_arrays_mod

integer :: bc_update_interval = 3 !< Default setting for interval (hours) between external regional BC data files.

logical :: regional_bcs_from_gsi = .false. !< Default setting for using DA-updated BC files.

logical :: write_restart_with_bcs = .false. !< Default setting for writing restart files with boundary rows.

!>Convenience pointers
integer, pointer :: grid_number

Expand Down
15 changes: 14 additions & 1 deletion model/fv_control.F90
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,9 @@ module fv_control_mod
logical, pointer :: nested, twowaynest
logical, pointer :: regional
integer, pointer :: bc_update_interval
integer, pointer :: nrows_blend
logical, pointer :: regional_bcs_from_gsi
logical, pointer :: write_restart_with_bcs
integer, pointer :: parent_tile, refinement, nestbctype, nestupdate, nsponge, ioffset, joffset
real, pointer :: s_weight, update_blend

Expand Down Expand Up @@ -670,7 +673,8 @@ subroutine run_setup(Atm, dt_atmos, grids_on_this_pe, p_split)
nested, twowaynest, parent_grid_num, parent_tile, nudge_qv, &
refinement, nestbctype, nestupdate, nsponge, s_weight, &
ioffset, joffset, check_negative, nudge_ic, halo_update_type, gfs_phil, agrid_vel_rst, &
do_uni_zfull, adj_mass_vmr, fac_n_spl, fhouri, regional, bc_update_interval
do_uni_zfull, adj_mass_vmr, fac_n_spl, fhouri, regional, bc_update_interval, &
regional_bcs_from_gsi, write_restart_with_bcs, nrows_blend

namelist /test_case_nml/test_case, bubble_do, alpha, nsolitons, soliton_Umax, soliton_size
#ifdef MULTI_GASES
Expand Down Expand Up @@ -892,6 +896,12 @@ subroutine run_setup(Atm, dt_atmos, grids_on_this_pe, p_split)
Atm(n)%neststruct%refinement = -1
end if

if (Atm(n)%flagstruct%regional) then
if ( consv_te > 0.) then
call mpp_error(FATAL, 'The global energy fixer cannot be used on a regional grid. consv_te must be set to 0.')
end if
end if

if (Atm(n)%neststruct%nested) then
if (Atm(n)%flagstruct%grid_type >= 4 .and. Atm(n)%parent_grid%flagstruct%grid_type >= 4) then
Atm(n)%flagstruct%dx_const = Atm(n)%parent_grid%flagstruct%dx_const / real(Atm(n)%neststruct%refinement)
Expand Down Expand Up @@ -1233,6 +1243,9 @@ subroutine setup_pointers(Atm)
target_lon => Atm%flagstruct%target_lon
regional => Atm%flagstruct%regional
bc_update_interval => Atm%flagstruct%bc_update_interval
nrows_blend => Atm%flagstruct%nrows_blend
regional_bcs_from_gsi => Atm%flagstruct%regional_bcs_from_gsi
write_restart_with_bcs => Atm%flagstruct%write_restart_with_bcs
reset_eta => Atm%flagstruct%reset_eta
p_fac => Atm%flagstruct%p_fac
a_imp => Atm%flagstruct%a_imp
Expand Down
Loading

0 comments on commit 86c127f

Please sign in to comment.