Skip to content

Commit

Permalink
Merge pull request #139 from tanyasmirnova/rrfs_snow_ini
Browse files Browse the repository at this point in the history
The change gets around snow initialization with the use of RUC LSM
  • Loading branch information
SamuelTrahanNOAA authored Mar 18, 2022
2 parents f0d6dcc + 9624299 commit 5a8a8f9
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 10 deletions.
29 changes: 22 additions & 7 deletions physics/GFS_surface_composites.F90
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ 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, flag_init, flag_restart, lkm, frac_grid, &
flag_cice, cplflx, cplice, cplwav2atm, landfrac, lakefrac, lakedepth, oceanfrac, frland, &
subroutine GFS_surface_composites_pre_run (im, xlat_d, xlon_d, flag_init, lsm_cold_start, lkm, frac_grid, &
flag_cice, cplflx, cplice, cplwav2atm, lsm, lsm_ruc, &
landfrac, lakefrac, lakedepth, oceanfrac, frland, &
dry, icy, lake, use_flake, wet, hice, cice, zorlo, zorll, zorli, &
snowd, snowd_lnd, snowd_ice, tprcp, tprcp_wat, &
tprcp_lnd, tprcp_ice, uustar, uustar_wat, uustar_lnd, uustar_ice, &
Expand All @@ -40,10 +41,11 @@ subroutine GFS_surface_composites_pre_run (im, flag_init, flag_restart, lkm, fra
implicit none

! Interface variables
integer, intent(in ) :: im, lkm, kdt
logical, intent(in ) :: flag_init, flag_restart, frac_grid, cplflx, cplice, cplwav2atm
integer, intent(in ) :: im, lkm, kdt, lsm, lsm_ruc
logical, intent(in ) :: flag_init, lsm_cold_start, frac_grid, cplflx, cplice, cplwav2atm
logical, dimension(:), intent(inout) :: flag_cice
logical, dimension(:), intent(inout) :: dry, icy, lake, use_flake, wet
real(kind=kind_phys), dimension(:), intent(in ) :: xlat_d, xlon_d
real(kind=kind_phys), dimension(:), intent(in ) :: landfrac, lakefrac, lakedepth, oceanfrac
real(kind=kind_phys), dimension(:), intent(inout) :: cice, hice
real(kind=kind_phys), dimension(:), intent( out) :: frland
Expand Down Expand Up @@ -201,12 +203,13 @@ subroutine GFS_surface_composites_pre_run (im, flag_init, flag_restart, lkm, fra
endif
endif
enddo
endif
endif ! frac_grid

do i=1,im
tprcp_wat(i) = tprcp(i)
tprcp_lnd(i) = tprcp(i)
tprcp_ice(i) = tprcp(i)

if (wet(i)) then ! Water
uustar_wat(i) = uustar(i)
tsfc_wat(i) = tsfco(i)
Expand All @@ -219,7 +222,6 @@ subroutine GFS_surface_composites_pre_run (im, flag_init, flag_restart, lkm, fra
endif
if (dry(i)) then ! Land
uustar_lnd(i) = uustar(i)
weasd_lnd(i) = weasd(i)
tsurf_lnd(i) = tsfcl(i)
! DH*
else
Expand All @@ -230,7 +232,6 @@ subroutine GFS_surface_composites_pre_run (im, flag_init, flag_restart, lkm, fra
endif
if (icy(i)) then ! Ice
uustar_ice(i) = uustar(i)
weasd_ice(i) = weasd(i)
tsurf_ice(i) = tisfc(i)
ep1d_ice(i) = zero
gflx_ice(i) = zero
Expand Down Expand Up @@ -258,6 +259,7 @@ subroutine GFS_surface_composites_pre_run (im, flag_init, flag_restart, lkm, fra
endif
enddo
!
if(lsm /= lsm_ruc) then ! do not do snow initialization with RUC lsm
if (frac_grid) then
do i=1,im
if (dry(i)) then
Expand All @@ -280,6 +282,15 @@ subroutine GFS_surface_composites_pre_run (im, flag_init, flag_restart, lkm, fra
enddo
else
do i=1,im
!-- print ice point
!if ( (xlon_d(i) > 298.6) .and. (xlon_d(i) < 298.7) .and. &
! (xlat_d(i) > 68.6 ) .and. (xlat_d(i) < 68.7 )) then
! print *,'Composit weasd_ice(i),snowd_ice',kdt,i,xlat_d(i),xlon_d(i),weasd_ice(i),snowd_ice(i)
!endif
!if ( (xlon_d(i) > 284.35) .and. (xlon_d(i) < 284.6) .and. &
! (xlat_d(i) > 41.0 ) .and. (xlat_d(i) < 41.2 )) then
! print *,'Composit2 weasd_lnd(i),snowd_lnd',kdt,i,xlat_d(i),xlon_d(i),weasd_lnd(i),snowd_lnd(i)
!endif
if (icy(i)) then
if (kdt == 1 .or. (.not. cplflx .or. lakefrac(i) > zero)) then
snowd_lnd(i) = zero
Expand All @@ -291,6 +302,7 @@ subroutine GFS_surface_composites_pre_run (im, flag_init, flag_restart, lkm, fra
endif
enddo
endif
endif ! lsm/=lsm_ruc

! write(0,*)' minmax of ice snow=',minval(snowd_ice),maxval(snowd_ice)

Expand Down Expand Up @@ -644,6 +656,7 @@ subroutine GFS_surface_composites_post_run (

do i=1,im
if (islmsk(i) == 1) then
!-- land
zorl(i) = zorll(i)
cd(i) = cd_lnd(i)
cdq(i) = cdq_lnd(i)
Expand All @@ -669,6 +682,7 @@ subroutine GFS_surface_composites_post_run (
hice(i) = zero
cice(i) = zero
elseif (islmsk(i) == 0) then
!-- water
zorl(i) = zorlo(i)
cd(i) = cd_wat(i)
cdq(i) = cdq_wat(i)
Expand All @@ -695,6 +709,7 @@ subroutine GFS_surface_composites_post_run (
hice(i) = zero
cice(i) = zero
else ! islmsk(i) == 2
!-- ice
zorl(i) = zorli(i)
cd(i) = cd_ice(i)
cdq(i) = cdq_ice(i)
Expand Down
36 changes: 33 additions & 3 deletions physics/GFS_surface_composites.meta
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,32 @@
dimensions = ()
type = integer
intent = in
[xlat_d]
standard_name = latitude_in_degree
long_name = latitude in degree north
units = degree_north
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
intent = in
[xlon_d]
standard_name = longitude_in_degree
long_name = longitude in degree east
units = degree_east
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
intent = in
[flag_init]
standard_name = flag_for_first_timestep
long_name = flag signaling first time step for time integration loop
units = flag
dimensions = ()
type = logical
intent = in
[flag_restart]
standard_name = flag_for_restart
long_name = flag for restart (warmstart) or coldstart
[lsm_cold_start]
standard_name = do_lsm_cold_start
long_name = flag to signify LSM is cold-started
units = flag
dimensions = ()
type = logical
Expand Down Expand Up @@ -70,6 +86,20 @@
dimensions = ()
type = logical
intent = in
[lsm]
standard_name = control_for_land_surface_scheme
long_name = flag for land surface model
units = flag
dimensions = ()
type = integer
intent = in
[lsm_ruc]
standard_name = identifier_for_ruc_land_surface_scheme
long_name = flag for RUC land surface model
units = flag
dimensions = ()
type = integer
intent = in
[landfrac]
standard_name = land_area_fraction
long_name = fraction of horizontal grid area occupied by land
Expand Down

0 comments on commit 5a8a8f9

Please sign in to comment.