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

Gfs separator shalcnv #7

Closed
wants to merge 36 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 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
2afb255
Branch commit for shallow convection code separation:
Sep 7, 2017
9342d67
- Add sasasshal_finalize subroutine
Sep 19, 2017
2c422b7
- Change longname for variable phil to geopotential
Sep 21, 2017
004c501
- Update long names in table to be consistent with other modules.
Sep 26, 2017
07c4f7e
- Move variable table above 'subourine sasasshal_run' definition
Sep 29, 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
8f7dbdf
added doxygen formatting to mfshalcnv.f along with generic doxygen fo…
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
a191af6
Merge branch 'master' into gfs_separator_shalcnv
grantfirl Oct 10, 2017
bfa2fb7
Resolve table conflicts for variables: phil, t1, u1, v1, kbot, ktop, rn
Nov 3, 2017
6f52985
Commit GFS_diagnostics.F90 without optimization to avoid compilation …
DomHeinzeller Nov 21, 2017
29dea6e
Merge pull request #20 from climbfuji/master_compile_on_intel_17
climbfuji Nov 21, 2017
255f587
Merge branch 'master' into gfs_separator_shalcnv
grantfirl Nov 28, 2017
4ae07dd
added sasas_shal_post
grantfirl Nov 28, 2017
dfd9a5e
changed line continuation to reflect fixed format
grantfirl Nov 28, 2017
cfa2beb
fixed some standard name conflicts in mfshalcnv.f
grantfirl Dec 4, 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

Loading