Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
5d0bafa
Adding step set_nb
pedro-jm Jun 30, 2017
3875d90
Adding step UPDATE_CALTRIGS
pedro-jm Jun 30, 2017
e1ef23f
Adding step SET_BUCKET_H
pedro-jm Jun 30, 2017
c4a0291
Adding steps SET_RAD_TRIGGERS SET_SOLARH PRINT_DEBUG
pedro-jm Jun 30, 2017
f016d82
Adding steps USE_NEW_RAD_TIME_VARY USE_NEW_GCYCLE SET_BUCKETS
pedro-jm Jun 30, 2017
05da163
Cleaning if statements
pedro-jm Jul 3, 2017
80317a7
GFS_time_vary_step factorized
pedro-jm Jul 3, 2017
a89f088
Addin step SET_INT
pedro-jm Jul 3, 2017
5d4f3c1
Adding several steps tot he radiation driver
pedro-jm Jul 5, 2017
0b0cdfb
Adding step PREP_T_MOIST
pedro-jm Jul 5, 2017
1bc1139
Adding step GET_CLD_INFO
pedro-jm Jul 5, 2017
c6d4496
Adding step DO_SW
pedro-jm Jul 5, 2017
b34a452
Adding step DO_LW
pedro-jm Jul 5, 2017
3a863c1
Adding step ORGANIZE_OUT
pedro-jm Jul 5, 2017
40d1dab
Cleaning if statements GFS_radiation_driver
pedro-jm Jul 6, 2017
2336c4a
Some small changes, in route to split apart SASAS
davegill Aug 28, 2017
bdd679a
comments for each entry var, rename subrs, enclose in module
davegill Aug 29, 2017
aebb1a4
few more table entries added
davegill Aug 30, 2017
781b445
separate ql into ql1 and ql2
davegill Aug 30, 2017
f5bc3e2
fill in table from Jongil Han information
davegill Aug 31, 2017
7fca15c
split out cloud ice and water, pass in qv only
davegill Aug 31, 2017
ecb8737
swap name from mfdeepcnv to sasasdeep_run
davegill Aug 31, 2017
3a62e3d
add the optional column
davegill Sep 1, 2017
7638477
Index errors, found by Julie
davegill Sep 5, 2017
91b4f17
... and commas are important, too!
davegill Sep 5, 2017
530288f
bringing in Tim +Laurie mods to GFSPHYSICS
davegill Sep 6, 2017
4c9b73a
column 7 for module name, turn "=" to "-" in variable table
davegill Sep 7, 2017
4b5618d
better names for u and v
davegill Sep 7, 2017
59a0626
maybe some of the doxygen things
davegill Sep 12, 2017
dae06e8
Table longname for time step is time_step_for_physics
davegill Sep 21, 2017
05d8559
Add subroutine sasasdeep_finalize (just a stub right now).
davegill Sep 21, 2017
ab8c931
Not just convection, DEEP convection in top description
davegill Sep 21, 2017
f4b556a
Added doxygen formatted comments for all of 2017 GFS operational physics
grantfirl Oct 5, 2017
b6c72e1
updated doxygen formatted comments in GFS_radiation_driver.F90
grantfirl Oct 5, 2017
15cdb5d
Merge pull request #15 from grantfirl/doxygen_formatted
grantfirl Oct 5, 2017
a4a6a0f
added doxygen formatting to mfdeepcnv.f
grantfirl Oct 9, 2017
2e5607e
changed ccpp_dox setting repeat_brief = NO to not repeat the brief de…
grantfirl Oct 10, 2017
ebfdaac
fixed typo in ccpp_dox
grantfirl Oct 10, 2017
b65316e
fixed line continuation characters on lines 77,78,79 of physics/gwdc.f
Oct 10, 2017
884d9e4
Merge pull request #16 from grantfirl/master
grantfirl Oct 10, 2017
9ca704c
Merge branch 'master' into gfs_separator_SASS
grantfirl Oct 10, 2017
82a1ca4
changed some longnames in the table for sasasdeep_run
grantfirl Nov 7, 2017
09c2ce5
longname updates
grantfirl Nov 18, 2017
40ef1e0
fixed cnvc units from flag to frac in mfdeepcnv.f
grantfirl Dec 7, 2017
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
216 changes: 172 additions & 44 deletions GFS_layer/GFS_driver.F90
Original file line number Diff line number Diff line change
Expand Up @@ -250,69 +250,41 @@ subroutine GFS_time_vary_step (Model, Statein, Stateout, Sfcprop, Coupling, &
type(GFS_radtend_type), intent(inout) :: Radtend(:)
type(GFS_diag_type), intent(inout) :: Diag(:)
!--- local variables
integer :: nb, nblks
integer :: nblks
real(kind=kind_phys) :: rinc(5)
real(kind=kind_phys) :: sec

nblks = size(blksz)

! Set the value of nblks
call Set_nblks (nblks)

!--- Model%jdat is being updated directly inside of FV3GFS_cap.F90
!--- update calendars and triggers
rinc(1:5) = 0
call w3difdat(Model%jdat,Model%idat,4,rinc)
sec = rinc(4)
Model%phour = sec/con_hr
!--- set current bucket hour
Model%zhour = Model%phour
Model%fhour = (sec + Model%dtp)/con_hr
Model%kdt = nint((sec + Model%dtp)/Model%dtp)
call Update_cal_and_triggers (Model, rinc, sec)

Model%ipt = 1
Model%lprnt = .false.
Model%lssav = .true.
!--- set current bucket hour
call Set_bucket_hour (Model, sec)

!--- radiation triggers
Model%lsswr = (mod(Model%kdt, Model%nsswr) == 1)
Model%lslwr = (mod(Model%kdt, Model%nslwr) == 1)
!--- radiation triggers
call Set_radiation_triggers (Model)

!--- set the solar hour based on a combination of phour and time initial hour
Model%solhr = mod(Model%phour+Model%idate(1),con_24)
call Set_solar_h (Model)

if ((Model%debug) .and. (Model%me == Model%master)) then
print *,' sec ', sec
print *,' kdt ', Model%kdt
print *,' nsswr ', Model%nsswr
print *,' nslwr ', Model%nslwr
print *,' nscyc ', Model%nscyc
print *,' lsswr ', Model%lsswr
print *,' lslwr ', Model%lslwr
print *,' fhour ', Model%fhour
print *,' phour ', Model%phour
print *,' solhr ', Model%solhr
endif
! Print debug info
call Print_debug_info (Model, sec)

!--- radiation time varying routine
if (Model%lsswr .or. Model%lslwr) then
call GFS_rad_time_vary (Model, Statein, Tbd, sec)
endif
call Gfs_rad_time_vary_driver (Model, Statein, Tbd, sec)

!--- physics time varying routine
call GFS_phys_time_vary (Model, Grid, Tbd)

!--- repopulate specific time-varying sfc properties for AMIP/forecast runs
if (Model%nscyc > 0) then
if (mod(Model%kdt,Model%nscyc) == 1) THEN
call gcycle (nblks, Model, Grid(:), Sfcprop(:), Cldprop(:))
endif
endif
call Gcycle_driver (nblks, Model, Grid, Sfcprop, Cldprop)

!--- determine if diagnostics buckets need to be cleared
if (mod(Model%kdt,Model%nszero) == 1) then
do nb = 1,nblks
call Diag(nb)%rad_zero (Model)
call Diag(nb)%phys_zero (Model)
!!!! THIS IS THE POINT AT WHICH DIAG%ZHOUR NEEDS TO BE UPDATED
enddo
endif
call Clear_buckets (Model, Diag, nblks)

end subroutine GFS_time_vary_step

Expand Down Expand Up @@ -582,5 +554,161 @@ subroutine GFS_grid_populate (Grid, xlon, xlat, area)

end subroutine GFS_grid_populate


! Subroutines added by PAJ

subroutine Set_nblks (nblks)

implicit none

integer, intent(out) :: nblks

! blksz is a global var
nblks = size(blksz)

end subroutine Set_nblks


subroutine Update_cal_and_triggers (Model, rinc, sec)

implicit none

type(GFS_control_type), intent(inout) :: Model
real(kind=kind_phys), intent(inout) :: rinc(:)
real(kind=kind_phys), intent(inout) :: sec


rinc(1:5) = 0
call W3difdat (Model%jdat, Model%idat, 4, rinc)
sec = rinc(4)
Model%phour = sec/con_hr

end subroutine Update_cal_and_triggers


subroutine Set_bucket_hour (Model, sec)

implicit none

type(GFS_control_type), intent(inout) :: Model
real(kind=kind_phys), intent(in) :: sec

Model%zhour = Model%phour
! con_hr is a global var
Model%fhour = (sec + Model%dtp)/con_hr
Model%kdt = nint((sec + Model%dtp)/Model%dtp)

Model%ipt = 1
Model%lprnt = .false.
Model%lssav = .true.

end subroutine Set_bucket_hour


subroutine Set_radiation_triggers (Model)

implicit none

type(GFS_control_type), intent(inout) :: Model

Model%lsswr = (mod (Model%kdt, Model%nsswr) == 1)
Model%lslwr = (mod (Model%kdt, Model%nslwr) == 1)

end subroutine Set_radiation_triggers


subroutine Set_solar_h (Model)

implicit none

type(GFS_control_type), intent(inout) :: Model

! con_24 is a global variable
Model%solhr = mod (Model%phour + Model%idate(1), con_24)

end subroutine Set_solar_h


subroutine Print_debug_info (Model, sec)

implicit none

type(GFS_control_type), intent(inout) :: Model
real(kind=kind_phys), intent(in) :: sec

if ((Model%debug) .and. (Model%me == Model%master)) then
print *,' sec ', sec
print *,' kdt ', Model%kdt
print *,' nsswr ', Model%nsswr
print *,' nslwr ', Model%nslwr
print *,' nscyc ', Model%nscyc
print *,' lsswr ', Model%lsswr
print *,' lslwr ', Model%lslwr
print *,' fhour ', Model%fhour
print *,' phour ', Model%phour
print *,' solhr ', Model%solhr
endif

end subroutine Print_debug_info


subroutine Gfs_rad_time_vary_driver (Model, Statein, Tbd, sec)

implicit none

type(GFS_control_type), intent(inout) :: Model
type(GFS_statein_type), intent(in) :: Statein(:)
type(GFS_tbd_type), intent(inout) :: Tbd(:)
real(kind=kind_phys), intent(in) :: sec

if (Model%lsswr .or. Model%lslwr) then
call GFS_rad_time_vary (Model, Statein, Tbd, sec)
endif

end subroutine Gfs_rad_time_vary_driver


subroutine Gcycle_driver (nblks, Model, Grid, Sfcprop, Cldprop)

implicit none

integer, intent(in) :: nblks
type(GFS_control_type), intent(in) :: Model
type(GFS_grid_type), intent(in) :: Grid(nblks)
type(GFS_sfcprop_type), intent(inout) :: Sfcprop(nblks)
type(GFS_cldprop_type), intent(inout) :: Cldprop(nblks)


if (Model%nscyc > 0) then
if (mod (Model%kdt, Model%nscyc) == 1) then
call gcycle (nblks, Model, Grid(:), Sfcprop(:), Cldprop(:))
end if
end if

end subroutine Gcycle_driver


subroutine Clear_buckets (Model, Diag, nblks)

implicit none

type(GFS_control_type), intent(in) :: Model
type(GFS_diag_type), intent(inout) :: Diag(:)
integer, intent(in) :: nblks

! Local vars
integer :: nb


if (mod (Model%kdt, Model%nszero) == 1) then
do nb = 1, nblks
call Diag(nb)%rad_zero (Model)
call Diag(nb)%phys_zero (Model)
enddo
endif

end subroutine Clear_buckets


end module GFS_driver

5 changes: 3 additions & 2 deletions GFS_layer/GFS_physics_driver.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1680,8 +1680,9 @@ subroutine GFS_physics_driver &
islmsk, Statein%vvl, Model%ncld, ud_mf, dd_mf, &
dt_mf, cnvw, cnvc)
elseif (Model%imfdeepcnv == 2) then
call mfdeepcnv (im, ix, levs, dtp, del, Statein%prsl, &
Statein%pgr, Statein%phil, clw(:,:,1:2), Stateout%gq0, &
call sasasdeep_run (im, ix, levs, dtp, del, Statein%prsl, &
Statein%pgr, Statein%phil, clw(:,:,1), &
clw(:,:,2), Stateout%gq0(:,:,1), &
Stateout%gt0, Stateout%gu0, Stateout%gv0, &
cld1d, rain1, kbot, ktop, kcnv, islmsk, &
garea, Statein%vvl, Model%ncld, ud_mf, dd_mf, &
Expand Down
20 changes: 10 additions & 10 deletions GFS_layer/GFS_radiation_driver.F90
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
!> \file grrad.f This file is the radiation driver module. It prepares
!! the atmospheric profiles and invokes the main radiation calculation.

!> \defgroup rad RRTMG Shortwave/Longwave Radiation Scheme
!> \defgroup RRTMG RRTMG Shortwave/Longwave Radiation
!> @{
!! \brief The GFS radiation scheme
!! \details Radiative processes are among the most complex and
Expand Down Expand Up @@ -1018,7 +1018,7 @@ subroutine GFS_radiation_driver &
type(GFS_cldprop_type), intent(in) :: Cldprop
type(GFS_radtend_type), intent(inout) :: Radtend
type(GFS_diag_type), intent(inout) :: Diag


! ================= subprogram documentation block ================ !
! !
Expand Down Expand Up @@ -1180,7 +1180,7 @@ subroutine GFS_radiation_driver &
integer, dimension(size(Grid%xlon,1),3) :: mbota, mtopa

!--- REAL VARIABLES
real(kind=kind_phys) :: raddt, es, qs, delt, tem0d
real(kind=kind_phys) :: raddt, es, qs, delt, tem0d

real(kind=kind_phys), dimension(size(Grid%xlon,1)) :: &
tsfa, cvt1, cvb1, tem1d, tsfg, tskn
Expand Down Expand Up @@ -1328,7 +1328,7 @@ subroutine GFS_radiation_driver &

!> - Call coszmn(), to compute cosine of zenith angle.
call coszmn (Grid%xlon,Grid%sinlat, & ! --- inputs
Grid%coslat,Model%solhr, IM, me, &
Grid%coslat,Model%solhr, IM, me, &
Radtend%coszen, Radtend%coszdg) ! --- outputs

!> - Call getgases(), to set up non-prognostic gas volume mixing
Expand Down Expand Up @@ -1609,12 +1609,12 @@ subroutine GFS_radiation_driver &
htswc, Diag%topfsw, Radtend%sfcfsw, & ! --- outputs
hsw0=htsw0, fdncmp=scmpsw) ! --- optional
else
call swrad (plyr, plvl, tlyr, tlvl, qlyr, olyr, & ! --- inputs
call swrad (plyr, plvl, tlyr, tlvl, qlyr, olyr, & ! --- inputs
gasvmr, clouds, Tbd%icsdsw, faersw, &
sfcalb, Radtend%coszen, Model%solcon, &
nday, idxday, IM, LMK, LMP, Model%lprnt,&
htswc, Diag%topfsw, Radtend%sfcfsw, & ! --- outputs
FDNCMP=scmpsw) ! --- optional
htswc, Diag%topfsw, Radtend%sfcfsw, & ! --- outputs
FDNCMP=scmpsw) ! --- optional
endif

do k = 1, LM
Expand All @@ -1636,7 +1636,7 @@ subroutine GFS_radiation_driver &
! --- repopulate the points above levr
if (Model%levr < Model%levs) then
do k = LM,Model%levs
Radtend%swhc(:,k) = Radtend%swhc(:,LM)
Radtend%swhc(:,k) = Radtend%swhc(:,LM)
enddo
endif
endif
Expand Down Expand Up @@ -1693,7 +1693,7 @@ subroutine GFS_radiation_driver &

call setemis (Grid%xlon, Grid%xlat, Sfcprop%slmsk, & ! --- inputs
Sfcprop%snowd, Sfcprop%sncovr, Sfcprop%zorl, &
tsfg, tsfa, Sfcprop%hprim, IM, &
tsfg, tsfa, Sfcprop%hprim, IM, &
Radtend%semis) ! --- outputs

!> - Call module_radlw_main::lwrad(), to compute LW heating rates and
Expand Down Expand Up @@ -1736,7 +1736,7 @@ subroutine GFS_radiation_driver &
! --- repopulate the points above levr
if (Model%levr < Model%levs) then
do k = LM,Model%levs
Radtend%lwhc(:,k) = Radtend%lwhc(:,LM)
Radtend%lwhc(:,k) = Radtend%lwhc(:,LM)
enddo
endif
endif
Expand Down
Loading