Skip to content

Commit 42379a7

Browse files
committed
initial implementation of new tendency application control options
1 parent 20fbb43 commit 42379a7

File tree

4 files changed

+87
-2
lines changed

4 files changed

+87
-2
lines changed

ccpp/physics

Submodule physics updated 98 files

scm/src/CCPP_typedefs.F90

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,10 @@ module CCPP_typedefs
282282
real (kind=kind_phys), pointer :: stress_land(:) => null() !<
283283
real (kind=kind_phys), pointer :: stress_water(:) => null() !<
284284
real (kind=kind_phys), pointer :: t2mmp(:) => null() !<
285+
real (kind=kind_phys), pointer :: ten_q(:,:,:) => null()
286+
real (kind=kind_phys), pointer :: ten_t(:,:) => null()
287+
real (kind=kind_phys), pointer :: ten_u(:,:) => null()
288+
real (kind=kind_phys), pointer :: ten_v(:,:) => null()
285289
real (kind=kind_phys), pointer :: theta(:) => null() !<
286290
real (kind=kind_phys), pointer :: tlvl(:,:) => null() !<
287291
real (kind=kind_phys), pointer :: tlyr(:,:) => null() !<
@@ -630,6 +634,10 @@ subroutine gfs_interstitial_create (Interstitial, IM, Model)
630634
allocate (Interstitial%stress_ice (IM))
631635
allocate (Interstitial%stress_land (IM))
632636
allocate (Interstitial%stress_water (IM))
637+
allocate (Interstitial%ten_q (IM,Model%levs,Model%ntrac))
638+
allocate (Interstitial%ten_t (IM,Model%levs))
639+
allocate (Interstitial%ten_u (IM,Model%levs))
640+
allocate (Interstitial%ten_v (IM,Model%levs))
633641
allocate (Interstitial%theta (IM))
634642
allocate (Interstitial%tlvl (IM,Model%levr+1+LTP))
635643
allocate (Interstitial%tlyr (IM,Model%levr+LTP))
@@ -1312,6 +1320,10 @@ subroutine gfs_interstitial_phys_reset (Interstitial, Model)
13121320
Interstitial%stress_ice = Model%huge
13131321
Interstitial%stress_land = Model%huge
13141322
Interstitial%stress_water = Model%huge
1323+
Interstitial%ten_q = clear_val
1324+
Interstitial%ten_t = clear_val
1325+
Interstitial%ten_u = clear_val
1326+
Interstitial%ten_v = clear_val
13151327
Interstitial%theta = clear_val
13161328
Interstitial%tprcp_ice = Model%huge
13171329
Interstitial%tprcp_land = Model%huge

scm/src/CCPP_typedefs.meta

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2026,6 +2026,34 @@
20262026
type = real
20272027
kind = kind_phys
20282028
active = (control_for_land_surface_scheme == identifier_for_noahmp_land_surface_scheme)
2029+
[ten_q]
2030+
standard_name = tendency_of_tracer_concentration
2031+
long_name = tendency of tracer concentration calculated by one physics scheme
2032+
units = kg kg-1 s-1
2033+
dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_tracers)
2034+
type = real
2035+
kind = kind_phys
2036+
[ten_t]
2037+
standard_name = tendency_of_air_temperature
2038+
long_name = tendency of air temperature calculated by one physics scheme
2039+
units = K s-1
2040+
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
2041+
type = real
2042+
kind = kind_phys
2043+
[ten_u]
2044+
standard_name = tendency_of_x_wind
2045+
long_name = tendency of x wind calculated by one physics scheme
2046+
units = m s-2
2047+
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
2048+
type = real
2049+
kind = kind_phys
2050+
[ten_v]
2051+
standard_name = tendency_of_y_wind
2052+
long_name = tendency of y wind calculated by one physics scheme
2053+
units = m s-2
2054+
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
2055+
type = real
2056+
kind = kind_phys
20292057
[theta]
20302058
standard_name = angle_from_east_of_maximum_subgrid_orographic_variations
20312059
long_name = angle with_respect to east of maximum subgrid orographic variations

scm/src/GFS_typedefs.F90

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -792,6 +792,18 @@ module GFS_typedefs
792792
!< (yr, mon, day, t-zone, hr, min, sec, mil-sec)
793793
integer :: idate(4) !< initial date with different size and ordering
794794
!< (hr, mon, day, yr)
795+
!--- tendency control
796+
integer :: tend_opt_swrad
797+
integer :: tend_opt_lwrad
798+
integer :: tend_opt_rad_scaler
799+
integer :: tend_opt_surface
800+
integer :: tend_opt_pbl
801+
integer :: tend_opt_gwd
802+
integer :: tend_opt_photochem
803+
integer :: tend_opt_deep_conv
804+
integer :: tend_opt_shal_conv
805+
integer :: tend_opt_mp
806+
integer :: tend_opt_stoch
795807
!--- radiation control parameters
796808
real(kind=kind_phys) :: fhswr !< frequency for shortwave radiation (secs)
797809
real(kind=kind_phys) :: fhlwr !< frequency for longwave radiation (secs)
@@ -3375,6 +3387,23 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
33753387
integer :: thermodyn_id = 1 !< valid for GFS only for get_prs/phi
33763388
integer :: sfcpress_id = 1 !< valid for GFS only for get_prs/phi
33773389

3390+
!--- time-coupling options after a scheme completes
3391+
! 1 = immediately apply tendencies
3392+
! 2 = add tendencies to a sum to be applied later
3393+
! 3 = add tendencies to a sum and apply the accumulated sum to the state
3394+
! 4 = ignore output tendencies (e.g. some other scheme may use/apply them)
3395+
integer :: tend_opt_swrad = 4
3396+
integer :: tend_opt_lwrad = 4
3397+
integer :: tend_opt_rad_scaler = 2
3398+
integer :: tend_opt_surface = 2
3399+
integer :: tend_opt_pbl = 2
3400+
integer :: tend_opt_gwd = 3
3401+
integer :: tend_opt_photochem = 1
3402+
integer :: tend_opt_deep_conv = 1
3403+
integer :: tend_opt_shal_conv = 1
3404+
integer :: tend_opt_mp = 1
3405+
integer :: tend_opt_stoch = 1
3406+
33783407
!--- coupling parameters
33793408
logical :: cplflx = .false. !< default no cplflx collection
33803409
logical :: cplice = .false. !< default no cplice collection (used together with cplflx)
@@ -4045,6 +4074,11 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
40454074
fhzero, fhzero_array, fhzero_fhour, ldiag3d, qdiag3d, lssav, &
40464075
naux2d, dtend_select, naux3d, aux2d_time_avg, &
40474076
aux3d_time_avg, fhcyc, thermodyn_id, sfcpress_id, &
4077+
!--- tendency application controls
4078+
tend_opt_swrad, tend_opt_lwrad, tend_opt_rad_scaler, &
4079+
tend_opt_surface, tend_opt_pbl, tend_opt_gwd, &
4080+
tend_opt_photochem, tend_opt_deep_conv, tend_opt_shal_conv, &
4081+
tend_opt_mp, tend_opt_stoch, &
40484082
!--- coupling parameters
40494083
cplflx, cplice, cplocn2atm, cplwav, cplwav2atm, cplaqm, &
40504084
cplchm, cpllnd, cpllnd2atm, cpl_imp_mrg, cpl_imp_dbg, &
@@ -4444,7 +4478,18 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
44444478
Model%chunk_begin(i) = Model%chunk_end(i-1) + 1
44454479
Model%chunk_end(i) = Model%chunk_begin(i) + blksz(i) - 1
44464480
end do
4447-
4481+
!--- tendency controls
4482+
Model%tend_opt_swrad = tend_opt_swrad
4483+
Model%tend_opt_lwrad = tend_opt_lwrad
4484+
Model%tend_opt_rad_scaler = tend_opt_rad_scaler
4485+
Model%tend_opt_surface = tend_opt_surface
4486+
Model%tend_opt_pbl = tend_opt_pbl
4487+
Model%tend_opt_gwd = tend_opt_gwd
4488+
Model%tend_opt_photochem = tend_opt_photochem
4489+
Model%tend_opt_deep_conv = tend_opt_deep_conv
4490+
Model%tend_opt_shal_conv = tend_opt_shal_conv
4491+
Model%tend_opt_mp = tend_opt_mp
4492+
Model%tend_opt_stoch = tend_opt_stoch
44484493
!--- coupling parameters
44494494
Model%cplflx = cplflx
44504495
Model%cplice = cplice

0 commit comments

Comments
 (0)