Skip to content

Commit

Permalink
Merge pull request #471 from YihuaWu-NOAA/flake
Browse files Browse the repository at this point in the history
EMC flake
  • Loading branch information
climbfuji authored Jul 20, 2020
2 parents 168932b + 9d43e41 commit 82a73dd
Show file tree
Hide file tree
Showing 9 changed files with 4,079 additions and 10 deletions.
21 changes: 17 additions & 4 deletions physics/GFS_surface_composites.F90
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ end subroutine GFS_surface_composites_pre_finalize
!> \section arg_table_GFS_surface_composites_pre_run Argument Table
!! \htmlinclude GFS_surface_composites_pre_run.html
!!
subroutine GFS_surface_composites_pre_run (im, frac_grid, flag_cice, cplflx, cplwav2atm, &
landfrac, lakefrac, oceanfrac, &
subroutine GFS_surface_composites_pre_run (im, lkm, frac_grid, flag_cice, cplflx, cplwav2atm, &
landfrac, lakefrac, lakedepth, oceanfrac, &
frland, dry, icy, lake, ocean, wet, cice, cimin, zorl, zorlo, zorll, zorl_wat, &
zorl_lnd, zorl_ice, snowd, snowd_wat, snowd_lnd, snowd_ice, tprcp, tprcp_wat, &
tprcp_lnd, tprcp_ice, uustar, uustar_wat, uustar_lnd, uustar_ice, &
Expand All @@ -38,12 +38,12 @@ subroutine GFS_surface_composites_pre_run (im, frac_grid, flag_cice, cplflx, cpl
implicit none

! Interface variables
integer, intent(in ) :: im
integer, intent(in ) :: im, lkm
logical, intent(in ) :: frac_grid, cplflx, cplwav2atm
logical, dimension(im), intent(in ) :: flag_cice
logical, dimension(im), intent(inout) :: dry, icy, lake, ocean, wet
real(kind=kind_phys), intent(in ) :: cimin
real(kind=kind_phys), dimension(im), intent(in ) :: landfrac, lakefrac, oceanfrac
real(kind=kind_phys), dimension(im), intent(in ) :: landfrac, lakefrac, lakedepth, oceanfrac
real(kind=kind_phys), dimension(im), intent(inout) :: cice
real(kind=kind_phys), dimension(im), intent( out) :: frland
real(kind=kind_phys), dimension(im), intent(in ) :: zorl, snowd, tprcp, uustar, weasd, qss, hflx
Expand Down Expand Up @@ -182,6 +182,19 @@ subroutine GFS_surface_composites_pre_run (im, frac_grid, flag_cice, cplflx, cpl
endif
enddo

! to prepare to separate lake from ocean under water category
do i = 1, im
if(lkm == 1) then
if(lakefrac(i) .ge. 0.15 .and. lakedepth(i) .gt. 1.0) then
lake(i) = .true.
else
lake(i) = .false.
endif
else
lake(i) = .false.
endif
enddo

! Assign sea ice temperature to interstitial variable
do i = 1, im
tice(i) = tisfc(i)
Expand Down
17 changes: 17 additions & 0 deletions physics/GFS_surface_composites.meta
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@
type = integer
intent = in
optional = F
[lkm]
standard_name = flag_for_lake_surface_scheme
long_name = flag for lake surface model
units = flag
dimensions = ()
type = integer
intent = in
optional = F
[frac_grid]
standard_name = flag_for_fractional_grid
long_name = flag for fractional grid
Expand Down Expand Up @@ -59,6 +67,15 @@
kind = kind_phys
intent = in
optional = F
[lakedepth]
standard_name = lake_depth
long_name = lake depth
units = m
dimensions = (horizontal_dimension)
type = real
kind = kind_phys
intent = in
optional = F
[oceanfrac]
standard_name = sea_area_fraction
long_name = fraction of horizontal grid area occupied by ocean
Expand Down
9 changes: 5 additions & 4 deletions physics/GFS_time_vary_pre.fv3.F90
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ end subroutine GFS_time_vary_pre_finalize
!> \section arg_table_GFS_time_vary_pre_run Argument Table
!! \htmlinclude GFS_time_vary_pre_run.html
!!
subroutine GFS_time_vary_pre_run (jdat, idat, dtp, lsm, lsm_noahmp, nsswr, &
nslwr, nhfrad, idate, debug, me, master, nscyc, sec, phour, zhour, fhour, &
subroutine GFS_time_vary_pre_run (jdat, idat, dtp, lkm, lsm, lsm_noahmp, nsswr, &
nslwr, nhfrad, idate, debug, me, master, nscyc, sec, phour, zhour, fhour, &
kdt, julian, yearlen, ipt, lprnt, lssav, lsswr, lslwr, solhr, errmsg, errflg)

use machine, only: kind_phys
Expand All @@ -75,7 +75,7 @@ subroutine GFS_time_vary_pre_run (jdat, idat, dtp, lsm, lsm_noahmp, nsswr, &

integer, intent(in) :: idate(4)
integer, intent(in) :: jdat(1:8), idat(1:8)
integer, intent(in) :: lsm, lsm_noahmp, &
integer, intent(in) :: lkm, lsm, lsm_noahmp, &
nsswr, nslwr, me, &
master, nscyc, nhfrad
logical, intent(in) :: debug
Expand Down Expand Up @@ -121,7 +121,8 @@ subroutine GFS_time_vary_pre_run (jdat, idat, dtp, lsm, lsm_noahmp, nsswr, &
fhour = (sec + dtp)/con_hr
kdt = nint((sec + dtp)/dtp)

if(lsm == lsm_noahmp) then
if(lsm == lsm_noahmp .or. lkm == 1) then
! flake need this too
!GJF* These calculations were originally in GFS_physics_driver.F90 for
! NoahMP. They were moved to this routine since they only depend
! on time (not space). Note that this code is included as-is from
Expand Down
8 changes: 8 additions & 0 deletions physics/GFS_time_vary_pre.fv3.meta
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,14 @@
kind = kind_phys
intent = in
optional = F
[lkm]
standard_name = flag_for_lake_surface_scheme
long_name = flag for lake surface model
units = flag
dimensions = ()
type = integer
intent = in
optional = F
[lsm]
standard_name = flag_for_land_surface_scheme
long_name = flag for land surface model
Expand Down
Loading

0 comments on commit 82a73dd

Please sign in to comment.