Skip to content

Commit

Permalink
Merge pull request #14 from grantfirl/move_sfc_emis_alb_calculation_t…
Browse files Browse the repository at this point in the history
…o_its_own_scheme_and_z0_composite_consistent_gjf

Copy FV3 changes in GFS_phys_time_vary.fv3.F90/meta to SCM versions
  • Loading branch information
climbfuji authored May 18, 2021
2 parents 60b873f + 7468bf8 commit a20fc32
Show file tree
Hide file tree
Showing 2 changed files with 109 additions and 37 deletions.
63 changes: 41 additions & 22 deletions physics/GFS_phys_time_vary.scm.F90
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,18 @@ subroutine GFS_phys_time_vary_init (
isot, ivegsrc, nlunit, sncovr, sncovr_ice, lsm, lsm_noahmp, lsm_ruc, min_seaice, &
fice, landfrac, vtype, weasd, lsoil, zs, dzs, lsnow_lsm_lbound, lsnow_lsm_ubound, &
tvxy, tgxy, tahxy, canicexy, canliqxy, eahxy, cmxy, chxy, fwetxy, sneqvoxy, alboldxy,&
qsnowxy, wslakexy, albdvis, albdnir, albivis, albinir, emiss, taussxy, waxy, wtxy, &
qsnowxy, wslakexy, albdvis_lnd, albdnir_lnd, albivis_lnd, albinir_lnd, albdvis_ice, &
albdnir_ice, albivis_ice, albinir_ice, emiss_lnd, emiss_ice, taussxy, waxy, wtxy, &
zwtxy, xlaixy, xsaixy, lfmassxy, stmassxy, rtmassxy, woodxy, stblcpxy, fastcpxy, &
smcwtdxy, deeprechxy, rechxy, snowxy, snicexy, snliqxy, tsnoxy , smoiseq, zsnsoxy, &
slc, smc, stc, tsfcl, snowd, canopy, tg3, stype, con_t0c, nthrds, errmsg, errflg)
slc, smc, stc, tsfcl, snowd, canopy, tg3, stype, con_t0c, flag_restart, nthrds, &
errmsg, errflg)

implicit none

! Interface variables
integer, intent(in) :: me, master, ntoz, iccn, iflip, im, nx, ny
logical, intent(in) :: h2o_phys, iaerclm
logical, intent(in) :: h2o_phys, iaerclm, flag_restart
integer, intent(in) :: idate(:)
real(kind_phys), intent(in) :: xlat_d(:), xlon_d(:)

Expand Down Expand Up @@ -119,11 +121,16 @@ subroutine GFS_phys_time_vary_init (
real(kind_phys), intent(inout) :: alboldxy(:)
real(kind_phys), intent(inout) :: qsnowxy(:)
real(kind_phys), intent(inout) :: wslakexy(:)
real(kind_phys), intent(inout) :: albdvis(:)
real(kind_phys), intent(inout) :: albdnir(:)
real(kind_phys), intent(inout) :: albivis(:)
real(kind_phys), intent(inout) :: albinir(:)
real(kind_phys), intent(inout) :: emiss(:)
real(kind_phys), intent(inout) :: albdvis_lnd(:)
real(kind_phys), intent(inout) :: albdnir_lnd(:)
real(kind_phys), intent(inout) :: albivis_lnd(:)
real(kind_phys), intent(inout) :: albinir_lnd(:)
real(kind_phys), intent(inout) :: albdvis_ice(:)
real(kind_phys), intent(inout) :: albdnir_ice(:)
real(kind_phys), intent(inout) :: albivis_ice(:)
real(kind_phys), intent(inout) :: albinir_ice(:)
real(kind_phys), intent(inout) :: emiss_lnd(:)
real(kind_phys), intent(inout) :: emiss_ice(:)
real(kind_phys), intent(inout) :: taussxy(:)
real(kind_phys), intent(inout) :: waxy(:)
real(kind_phys), intent(inout) :: wtxy(:)
Expand Down Expand Up @@ -339,8 +346,30 @@ subroutine GFS_phys_time_vary_init (
if (errflg/=0) return
end if

if (lsm == lsm_noahmp) then
if (all(tvxy <= zero)) then
!--- For Noah MP or RUC LSMs: initialize four components of albedo for
!--- land and ice - not for restart runs
lsm_init: if (.not.flag_restart) then
if (lsm == lsm_noahmp .or. lsm == lsm_ruc) then
if (me == master ) write(0,'(a)') 'GFS_phys_time_vary_init: initialize albedo for land and ice'
do ix=1,im
albdvis_lnd(ix) = 0.2_kind_phys
albdnir_lnd(ix) = 0.2_kind_phys
albivis_lnd(ix) = 0.2_kind_phys
albinir_lnd(ix) = 0.2_kind_phys
emiss_lnd(ix) = 0.95_kind_phys
enddo
endif
if (lsm == lsm_ruc) then
do ix=1,im
albdvis_ice(ix) = 0.6_kind_phys
albdnir_ice(ix) = 0.6_kind_phys
albivis_ice(ix) = 0.6_kind_phys
albinir_ice(ix) = 0.6_kind_phys
emiss_ice(ix) = 0.97_kind_phys
enddo
endif

noahmp_init: if (lsm == lsm_noahmp) then
allocate(dzsno (lsnow_lsm_lbound:lsnow_lsm_ubound))
allocate(dzsnso(lsnow_lsm_lbound:lsoil) )
dzsno(:) = missing_value
Expand All @@ -359,11 +388,6 @@ subroutine GFS_phys_time_vary_init (
alboldxy(:) = missing_value
qsnowxy(:) = missing_value
wslakexy(:) = missing_value
albdvis(:) = missing_value
albdnir(:) = missing_value
albivis(:) = missing_value
albinir(:) = missing_value
emiss(:) = missing_value
taussxy(:) = missing_value
waxy(:) = missing_value
wtxy(:) = missing_value
Expand Down Expand Up @@ -418,11 +442,6 @@ subroutine GFS_phys_time_vary_init (
! already set to 0.0
wslakexy(ix) = zero
taussxy(ix) = zero
albdvis(ix) = 0.2_kind_phys
albdnir(ix) = 0.2_kind_phys
albivis(ix) = 0.2_kind_phys
albinir(ix) = 0.2_kind_phys
emiss(ix) = 0.95_kind_phys

waxy(ix) = 4900.0_kind_phys
wtxy(ix) = waxy(ix)
Expand Down Expand Up @@ -592,8 +611,8 @@ subroutine GFS_phys_time_vary_init (
deallocate(dzsno)
deallocate(dzsnso)

endif
endif !if Noah MP cold start ends
endif noahmp_init
endif lsm_init

is_initialized = .true.

Expand Down
83 changes: 68 additions & 15 deletions physics/GFS_phys_time_vary.scm.meta
Original file line number Diff line number Diff line change
Expand Up @@ -755,45 +755,90 @@
kind = kind_phys
intent = inout
optional = F
[albdvis]
standard_name = surface_albedo_direct_visible
long_name = direct surface albedo visible band
[albdvis_lnd]
standard_name = surface_albedo_direct_visible_over_land
long_name = direct surface albedo visible band over land
units = frac
dimensions = (horizontal_dimension)
type = real
kind = kind_phys
intent = inout
optional = F
[albdnir]
standard_name = surface_albedo_direct_NIR
long_name = direct surface albedo NIR band
[albdnir_lnd]
standard_name = surface_albedo_direct_NIR_over_land
long_name = direct surface albedo NIR band over land
units = frac
dimensions = (horizontal_dimension)
type = real
kind = kind_phys
intent = inout
optional = F
[albivis]
standard_name = surface_albedo_diffuse_visible
long_name = diffuse surface albedo visible band
[albivis_lnd]
standard_name = surface_albedo_diffuse_visible_over_land
long_name = diffuse surface albedo visible band over land
units = frac
dimensions = (horizontal_dimension)
type = real
kind = kind_phys
intent = inout
optional = F
[albinir]
standard_name = surface_albedo_diffuse_NIR
long_name = diffuse surface albedo NIR band
[albinir_lnd]
standard_name = surface_albedo_diffuse_NIR_over_land
long_name = diffuse surface albedo NIR band over land
units = frac
dimensions = (horizontal_dimension)
type = real
kind = kind_phys
intent = inout
optional = F
[emiss]
standard_name = surface_emissivity_lsm
long_name = surface emissivity from lsm
[albdvis_ice]
standard_name = surface_albedo_direct_visible_over_ice
long_name = direct surface albedo visible band over ice
units = frac
dimensions = (horizontal_dimension)
type = real
kind = kind_phys
intent = inout
optional = F
[albdnir_ice]
standard_name = surface_albedo_direct_NIR_over_ice
long_name = direct surface albedo NIR band over ice
units = frac
dimensions = (horizontal_dimension)
type = real
kind = kind_phys
intent = inout
optional = F
[albivis_ice]
standard_name = surface_albedo_diffuse_visible_over_ice
long_name = diffuse surface albedo visible band over ice
units = frac
dimensions = (horizontal_dimension)
type = real
kind = kind_phys
intent = inout
optional = F
[albinir_ice]
standard_name = surface_albedo_diffuse_NIR_over_ice
long_name = diffuse surface albedo NIR band over ice
units = frac
dimensions = (horizontal_dimension)
type = real
kind = kind_phys
intent = inout
optional = F
[emiss_lnd]
standard_name = surface_longwave_emissivity_over_land
long_name = surface lw emissivity in fraction over land
units = frac
dimensions = (horizontal_dimension)
type = real
kind = kind_phys
intent = inout
optional = F
[emiss_ice]
standard_name = surface_longwave_emissivity_over_ice
long_name = surface lw emissivity in fraction over ice
units = frac
dimensions = (horizontal_dimension)
type = real
Expand Down Expand Up @@ -935,6 +980,14 @@
kind = kind_phys
intent = in
optional = F
[flag_restart]
standard_name = flag_for_restart
long_name = flag for restart (warmstart) or coldstart
units = flag
dimensions = ()
type = logical
intent = in
optional = F
[nthrds]
standard_name = omp_threads
long_name = number of OpenMP threads available for physics schemes
Expand Down

0 comments on commit a20fc32

Please sign in to comment.