Skip to content

Commit

Permalink
Merge pull request #1 from climbfuji/first_n_radiation_calls_on_physi…
Browse files Browse the repository at this point in the history
…cs_timestep_for_spinup

Add capability to call radiation on physics timestep for first N time steps
  • Loading branch information
DomHeinzeller authored Dec 12, 2019
2 parents cc0f89a + 77bb53e commit 502ef17
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ccpp/physics
23 changes: 23 additions & 0 deletions gfsphysics/GFS_layer/GFS_typedefs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,9 @@ module GFS_typedefs
real(kind=kind_phys) :: fhlwr !< frequency for longwave radiation (secs)
integer :: nsswr !< integer trigger for shortwave radiation
integer :: nslwr !< integer trigger for longwave radiation
#ifdef CCPP
integer :: nhfrad !< number of timesteps for which to call radiation on physics timestep (coldstarts)
#endif
integer :: levr !< number of vertical levels for radiation calculations
#ifdef CCPP
integer :: levrp1 !< number of vertical levels for radiation calculations plus one
Expand Down Expand Up @@ -2703,6 +2706,9 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
!--- radiation parameters
real(kind=kind_phys) :: fhswr = 3600. !< frequency for shortwave radiation (secs)
real(kind=kind_phys) :: fhlwr = 3600. !< frequency for longwave radiation (secs)
#ifdef CCPP
integer :: nhfrad = 0 !< number of timesteps for which to call radiation on physics timestep (coldstarts)
#endif
integer :: levr = -99 !< number of vertical levels for radiation calculations
integer :: nfxr = 39+6 !< second dimension of input/output array fluxr
logical :: aero_in = .false. !< flag for initializing aero data
Expand Down Expand Up @@ -3072,6 +3078,9 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
fhswr, fhlwr, levr, nfxr, aero_in, iflip, isol, ico2, ialb, &
isot, iems, iaer, icliq_sw, iovr_sw, iovr_lw, ictm, isubc_sw,&
isubc_lw, crick_proof, ccnorm, lwhtr, swhtr, &
#ifdef CCPP
nhfrad, &
#endif
! IN CCN forcing
iccn, &
!--- microphysical parameterizations
Expand Down Expand Up @@ -3277,6 +3286,17 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
Model%fhlwr = fhlwr
Model%nsswr = nint(fhswr/Model%dtp)
Model%nslwr = nint(fhlwr/Model%dtp)
#ifdef CCPP
if (restart) then
Model%nhfrad = 0
if (Model%me == Model%master .and. nhfrad>0) &
write(*,'(a)') 'Disable high-frequency radiation calls for restart run'
else
Model%nhfrad = nhfrad
if (Model%me == Model%master .and. nhfrad>0) &
write(*,'(a,i0)') 'Number of high-frequency radiation calls for coldstart run: ', nhfrad
endif
#endif
if (levr < 0) then
Model%levr = levs
else
Expand Down Expand Up @@ -4384,6 +4404,9 @@ subroutine control_print(Model)
print *, ' fhlwr : ', Model%fhlwr
print *, ' nsswr : ', Model%nsswr
print *, ' nslwr : ', Model%nslwr
#ifdef CCPP
print *, ' nhfrad : ', Model%nhfrad
#endif
print *, ' levr : ', Model%levr
print *, ' nfxr : ', Model%nfxr
print *, ' aero_in : ', Model%aero_in
Expand Down
6 changes: 6 additions & 0 deletions gfsphysics/GFS_layer/GFS_typedefs.meta
Original file line number Diff line number Diff line change
Expand Up @@ -2025,6 +2025,12 @@
dimensions = ()
type = real
kind = kind_phys
[nhfrad]
standard_name = number_of_timesteps_for_radiation_calls_on_physics_timestep
long_name = number of timesteps for radiation calls on physics timestep (coldstarts only)
units = count
dimensions = ()
type = integer
[levr]
standard_name = number_of_vertical_layers_for_radiation_calculations
long_name = number of vertical levels for radiation calculations
Expand Down

0 comments on commit 502ef17

Please sign in to comment.