Skip to content

Commit

Permalink
Merge pull request NCAR#93 from climbfuji/update_gsl_develop_from_mai…
Browse files Browse the repository at this point in the history
…n_20210531

Update gsl/develop from main 2021/05/31
  • Loading branch information
SamuelTrahanNOAA authored Jun 7, 2021
2 parents 9346bb7 + ef5db31 commit 40ad71e
Show file tree
Hide file tree
Showing 89 changed files with 3,796 additions and 1,918 deletions.
151 changes: 130 additions & 21 deletions physics/GFS_debug.F90

Large diffs are not rendered by default.

92 changes: 92 additions & 0 deletions physics/GFS_debug.meta
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,52 @@
intent = out
optional = F

########################################################################
[ccpp-arg-table]
name = GFS_diagtoscreen_timestep_init
type = scheme
[Model]
standard_name = GFS_control_type_instance
long_name = instance of derived type GFS_control_type in FV3
units = DDT
dimensions = ()
type = GFS_control_type
intent = in
optional = F
[Data]
standard_name = GFS_data_type_instance_all_blocks
long_name = instance of derived type GFS_data_type
units = DDT
dimensions = (ccpp_block_count)
type = GFS_data_type
intent = in
optional = F
[Interstitial]
standard_name = GFS_interstitial_type_instance_all_threads
long_name = instance of derived type GFS_interstitial_type
units = DDT
dimensions = (omp_threads)
type = GFS_interstitial_type
intent = in
optional = F
[errmsg]
standard_name = ccpp_error_message
long_name = error message for error handling in CCPP
units = none
dimensions = ()
type = character
kind = len=*
intent = out
optional = F
[errflg]
standard_name = ccpp_error_flag
long_name = error flag for error handling in CCPP
units = flag
dimensions = ()
type = integer
intent = out
optional = F

########################################################################
[ccpp-arg-table]
name = GFS_diagtoscreen_run
Expand Down Expand Up @@ -227,6 +273,52 @@
intent = out
optional = F

########################################################################
[ccpp-arg-table]
name = GFS_interstitialtoscreen_timestep_init
type = scheme
[Model]
standard_name = GFS_control_type_instance
long_name = instance of derived type GFS_control_type in FV3
units = DDT
dimensions = ()
type = GFS_control_type
intent = in
optional = F
[Data]
standard_name = GFS_data_type_instance_all_blocks
long_name = instance of derived type GFS_data_type
units = DDT
dimensions = (ccpp_block_count)
type = GFS_data_type
intent = in
optional = F
[Interstitial]
standard_name = GFS_interstitial_type_instance_all_threads
long_name = instance of derived type GFS_interstitial_type
units = DDT
dimensions = (omp_threads)
type = GFS_interstitial_type
intent = in
optional = F
[errmsg]
standard_name = ccpp_error_message
long_name = error message for error handling in CCPP
units = none
dimensions = ()
type = character
kind = len=*
intent = out
optional = F
[errflg]
standard_name = ccpp_error_flag
long_name = error flag for error handling in CCPP
units = flag
dimensions = ()
type = integer
intent = out
optional = F

########################################################################
[ccpp-arg-table]
name = GFS_interstitialtoscreen_run
Expand Down
64 changes: 41 additions & 23 deletions physics/GFS_phys_time_vary.fv3.F90
Original file line number Diff line number Diff line change
Expand Up @@ -75,16 +75,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 @@ -125,11 +127,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 @@ -385,9 +392,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 @@ -406,11 +434,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 @@ -441,7 +464,7 @@ subroutine GFS_phys_time_vary_init (
!$OMP shared(im,lsoil,con_t0c,landfrac,tsfcl,tvxy,tgxy,tahxy) &
!$OMP shared(snowd,canicexy,canliqxy,canopy,eahxy,cmxy,chxy) &
!$OMP shared(fwetxy,sneqvoxy,weasd,alboldxy,qsnowxy,wslakexy) &
!$OMP shared(taussxy,albdvis,albdnir,albivis,albinir,emiss) &
!$OMP shared(taussxy) &
!$OMP shared(waxy,wtxy,zwtxy,imn,vtype,xlaixy,xsaixy,lfmassxy) &
!$OMP shared(stmassxy,rtmassxy,woodxy,stblcpxy,fastcpxy) &
!$OMP shared(isbarren_table,isice_table,isurban_table) &
Expand Down Expand Up @@ -480,11 +503,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 @@ -655,8 +673,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.fv3.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
Loading

0 comments on commit 40ad71e

Please sign in to comment.