Skip to content

Commit

Permalink
Merge pull request #695 from SMoorthi-emc/SM_May182021b
Browse files Browse the repository at this point in the history
Sm may182021b
  • Loading branch information
climbfuji authored Jul 14, 2021
2 parents 275b14c + bc38771 commit 719c162
Show file tree
Hide file tree
Showing 49 changed files with 1,110 additions and 1,215 deletions.
6 changes: 3 additions & 3 deletions physics/GFS_MP_generic.F90
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ end subroutine GFS_MP_generic_post_init
!!
!> \section gfs_mp_gen GFS MP Generic Post General Algorithm
!> @{
subroutine GFS_MP_generic_post_run(im, levs, kdt, nrcm, ncld, nncl, ntcw, ntrac, imp_physics, imp_physics_gfdl, &
subroutine GFS_MP_generic_post_run(im, levs, kdt, nrcm, nncl, ntcw, ntrac, imp_physics, imp_physics_gfdl, &
imp_physics_thompson, imp_physics_mg, imp_physics_fer_hires, cal_pre, lssav, ldiag3d, qdiag3d, cplflx, cplchm, con_g, dtf, frain, rainc, rain1, &
rann, xlat, xlon, gt0, gq0, prsl, prsi, phii, tsfc, ice, snow, graupel, save_t, save_qv, rain0, ice0, snow0, &
graupel0, del, rain, domr_diag, domzr_diag, domip_diag, doms_diag, tprcp, srflag, sr, cnvprcp, totprcp, totice, &
Expand All @@ -97,7 +97,7 @@ subroutine GFS_MP_generic_post_run(im, levs, kdt, nrcm, ncld, nncl, ntcw, ntrac,

implicit none

integer, intent(in) :: im, levs, kdt, nrcm, ncld, nncl, ntcw, ntrac
integer, intent(in) :: im, levs, kdt, nrcm, nncl, ntcw, ntrac
integer, intent(in) :: imp_physics, imp_physics_gfdl, imp_physics_thompson, imp_physics_mg, imp_physics_fer_hires
logical, intent(in) :: cal_pre, lssav, ldiag3d, qdiag3d, cplflx, cplchm

Expand Down Expand Up @@ -373,7 +373,7 @@ subroutine GFS_MP_generic_post_run(im, levs, kdt, nrcm, ncld, nncl, ntcw, ntrac,
do i=1, im
work1(i) = zero
enddo
if (ncld > 0) then
if (nncl > 0) then
do ic = ntcw, ntcw+nncl-1
do i=1,im
work1(i) = work1(i) + gq0(i,k,ic)
Expand Down
16 changes: 4 additions & 12 deletions physics/GFS_MP_generic.meta
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@
intent = in
optional = F
[nncl]
standard_name = number_of_tracers_for_cloud_condensate
long_name = number of tracers for cloud condensate
standard_name = number_of_cloud_condensate_types
long_name = number of cloud condensate types
units = count
dimensions = ()
type = integer
Expand Down Expand Up @@ -176,17 +176,9 @@
type = integer
intent = in
optional = F
[ncld]
standard_name = number_of_hydrometeors
long_name = choice of cloud scheme / number of hydrometeors
units = count
dimensions = ()
type = integer
intent = in
optional = F
[nncl]
standard_name = number_of_tracers_for_cloud_condensate
long_name = number of tracers for cloud condensate
standard_name = number_of_cloud_condensate_types
long_name = number of cloud condensate types
units = count
dimensions = ()
type = integer
Expand Down
9 changes: 4 additions & 5 deletions physics/GFS_PBL_generic.F90
Original file line number Diff line number Diff line change
Expand Up @@ -326,14 +326,13 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac,
implicit none

integer, parameter :: kp = kind_phys
integer, intent(in) :: im, levs, nvdiff, ntrac, ntchs, ntchm
integer, intent(in) :: im, levs, nvdiff, ntrac, ntchs, ntchm, kdt
integer, intent(in) :: ntqv, ntcw, ntiw, ntrw, ntsw, ntlnc, ntinc, ntrnc, ntsnc, ntgnc, ntwa, ntia, ntgl, ntoz, ntke, ntkev, nqrimef
logical, intent(in) :: trans_aero
integer, intent(in) :: imp_physics, imp_physics_gfdl, imp_physics_thompson, imp_physics_wsm6
integer, intent(in) :: imp_physics_zhao_carr, imp_physics_mg, imp_physics_fer_hires
logical, intent(in) :: ltaerosol, cplflx, cplchm, lssav, ldiag3d, qdiag3d, lsidea
logical, intent(in) :: hybedmf, do_shoc, satmedmf, shinhong, do_ysu
integer, intent(in) :: kdt

logical, intent(in) :: flag_for_pbl_generic_tend
real(kind=kind_phys), dimension(:,:), intent(in) :: save_u, save_v, save_t
Expand Down Expand Up @@ -534,14 +533,14 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac,

if (cplflx) then
do i=1,im
if (oceanfrac(i) > zero) then ! Ocean only, NO LAKES
if (oceanfrac(i) > zero) then ! Ocean only, NO LAKES
if ( .not. wet(i)) then ! no open water
if ( kdt > 1 ) then !use results from CICE
if (kdt > 1) then !use results from CICE
dusfci_cpl(i) = dusfc_cice(i)
dvsfci_cpl(i) = dvsfc_cice(i)
dtsfci_cpl(i) = dtsfc_cice(i)
dqsfci_cpl(i) = dqsfc_cice(i)
else !use PBL fluxes when CICE fluxes is unavailable
else !use PBL fluxes when CICE fluxes is unavailable
dusfci_cpl(i) = dusfc1(i)
dvsfci_cpl(i) = dvsfc1(i)
dtsfci_cpl(i) = dtsfc1(i)
Expand Down
8 changes: 4 additions & 4 deletions physics/GFS_debug.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1307,8 +1307,8 @@ subroutine GFS_interstitialtoscreen_run (Model, Statein, Stateout, Sfcprop, Coup
call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%slopetype ', Interstitial%slopetype )
call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%snowc ', Interstitial%snowc )
call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%snowd_ice ', Interstitial%snowd_ice )
call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%snowd_land ', Interstitial%snowd_land )
call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%snowd_water ', Interstitial%snowd_water )
! call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%snowd_land ', Interstitial%snowd_land )
! call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%snowd_water ', Interstitial%snowd_water )
call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%snohf ', Interstitial%snohf )
call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%snowmt ', Interstitial%snowmt )
call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%soiltype ', Interstitial%soiltype )
Expand Down Expand Up @@ -1342,8 +1342,8 @@ subroutine GFS_interstitialtoscreen_run (Model, Statein, Stateout, Sfcprop, Coup
call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%vegtype ', Interstitial%vegtype )
call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%wcbmax ', Interstitial%wcbmax )
call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%weasd_ice ', Interstitial%weasd_ice )
call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%weasd_land ', Interstitial%weasd_land )
call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%weasd_water ', Interstitial%weasd_water )
! call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%weasd_land ', Interstitial%weasd_land )
! call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%weasd_water ', Interstitial%weasd_water )
call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%wind ', Interstitial%wind )
call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%work1 ', Interstitial%work1 )
call print_var(mpirank, omprank, blkno, Grid%xlat_d, Grid%xlon_d, 'Interstitial%work2 ', Interstitial%work2 )
Expand Down
30 changes: 15 additions & 15 deletions physics/GFS_phys_time_vary.fv3.F90
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ 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_lnd, albdnir_lnd, albivis_lnd, albinir_lnd, albdvis_ice, &
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, &
Expand Down Expand Up @@ -319,10 +319,10 @@ subroutine GFS_phys_time_vary_init (
jindx2_aer, ddy_aer, xlon_d, &
iindx1_aer, iindx2_aer, ddx_aer, &
me, master)
iamin=min(minval(iindx1_aer), iamin)
iamax=max(maxval(iindx2_aer), iamax)
jamin=min(minval(jindx1_aer), jamin)
jamax=max(maxval(jindx2_aer), jamax)
iamin = min(minval(iindx1_aer), iamin)
iamax = max(maxval(iindx2_aer), iamax)
jamin = min(minval(jindx1_aer), jamin)
jamax = max(maxval(jindx2_aer), jamax)
endif

!$OMP section
Expand Down Expand Up @@ -723,7 +723,7 @@ subroutine GFS_phys_time_vary_timestep_init (
lakefrac, min_seaice, min_lakeice, smc, slc, stc, smois, sh2o, tslb, tiice, tg3, tref, &
tsfc, tsfco, tisfc, hice, fice, facsf, facwf, alvsf, alvwf, alnsf, alnwf, zorli, zorll, &
zorlo, weasd, slope, snoalb, canopy, vfrac, vtype, stype, shdmin, shdmax, snowd, &
cv, cvb, cvt, oro, oro_uf, xlat_d, xlon_d, slmsk, &
cv, cvb, cvt, oro, oro_uf, xlat_d, xlon_d, slmsk, landfrac, &
do_ugwp_v1, jindx1_tau, jindx2_tau, ddy_j1tau, ddy_j2tau, tau_amf, errmsg, errflg)

implicit none
Expand Down Expand Up @@ -760,7 +760,7 @@ subroutine GFS_phys_time_vary_timestep_init (
character(len=*), intent(in) :: input_nml_file(:)
logical, intent(in) :: use_ufo, nst_anl, frac_grid
real(kind_phys), intent(in) :: fhcyc, phour, lakefrac(:), min_seaice, min_lakeice, &
xlat_d(:), xlon_d(:)
xlat_d(:), xlon_d(:), landfrac(:)
real(kind_phys), intent(inout) :: smc(:,:), slc(:,:), stc(:,:), smois(:,:), sh2o(:,:), &
tslb(:,:), tiice(:,:), tg3(:), tref(:), &
tsfc(:), tsfco(:), tisfc(:), hice(:), fice(:), &
Expand Down Expand Up @@ -888,7 +888,7 @@ subroutine GFS_phys_time_vary_timestep_init (
! aerinterpol is using threading inside, don't
! move into OpenMP parallel section above
call aerinterpol (me, master, nthrds, im, idate, &
fhour, jindx1_aer, jindx2_aer,&
fhour, jindx1_aer, jindx2_aer, &
ddy_aer, iindx1_aer, &
iindx2_aer, ddx_aer, &
levs, prsl, aer_nm)
Expand All @@ -897,13 +897,13 @@ subroutine GFS_phys_time_vary_timestep_init (
!> - Call gcycle() to repopulate specific time-varying surface properties for AMIP/forecast runs
if (nscyc > 0) then
if (mod(kdt,nscyc) == 1) THEN
call gcycle (me, nthrds, nx, ny, isc, jsc, nsst, tile_num, nlunit, &
input_nml_file, lsoil, lsoil_lsm, kice, idate, ialb, isot, ivegsrc, &
use_ufo, nst_anl, fhcyc, phour, lakefrac, min_seaice, min_lakeice, &
frac_grid, smc, slc, stc, smois, sh2o, tslb, tiice, tg3, tref, tsfc, &
tsfco, tisfc, hice, fice, facsf, facwf, alvsf, alvwf, alnsf, alnwf, &
zorli, zorll, zorlo, weasd, slope, snoalb, canopy, vfrac, vtype, &
stype, shdmin, shdmax, snowd, cv, cvb, cvt, oro, oro_uf, &
call gcycle (me, nthrds, nx, ny, isc, jsc, nsst, tile_num, nlunit, &
input_nml_file, lsoil, lsoil_lsm, kice, idate, ialb, isot, ivegsrc, &
use_ufo, nst_anl, fhcyc, phour, landfrac, lakefrac, min_seaice, min_lakeice,&
frac_grid, smc, slc, stc, smois, sh2o, tslb, tiice, tg3, tref, tsfc, &
tsfco, tisfc, hice, fice, facsf, facwf, alvsf, alvwf, alnsf, alnwf, &
zorli, zorll, zorlo, weasd, slope, snoalb, canopy, vfrac, vtype, &
stype, shdmin, shdmax, snowd, cv, cvb, cvt, oro, oro_uf, &
xlat_d, xlon_d, slmsk, imap, jmap)
endif
endif
Expand Down
9 changes: 9 additions & 0 deletions physics/GFS_phys_time_vary.fv3.meta
Original file line number Diff line number Diff line change
Expand Up @@ -2006,6 +2006,15 @@
kind = kind_phys
intent = inout
optional = F
[landfrac]
standard_name = land_area_fraction
long_name = fraction of horizontal grid area occupied by land
units = frac
dimensions = (horizontal_dimension)
type = real
kind = kind_phys
intent = in
optional = F
[slmsk]
standard_name = sea_land_ice_mask_real
long_name = landmask: sea/land/ice=0/1/2
Expand Down
37 changes: 18 additions & 19 deletions physics/GFS_phys_time_vary.scm.F90
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ 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_lnd, albdnir_lnd, albivis_lnd, albinir_lnd, albdvis_ice, &
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, &
Expand Down Expand Up @@ -281,10 +281,10 @@ subroutine GFS_phys_time_vary_init (
jindx2_aer, ddy_aer, xlon_d, &
iindx1_aer, iindx2_aer, ddx_aer, &
me, master)
iamin=min(minval(iindx1_aer), iamin)
iamax=max(maxval(iindx2_aer), iamax)
jamin=min(minval(jindx1_aer), jamin)
jamax=max(maxval(jindx2_aer), jamax)
iamin = min(minval(iindx1_aer), iamin)
iamax = max(maxval(iindx2_aer), iamax)
jamin = min(minval(jindx1_aer), jamin)
jamax = max(maxval(jindx2_aer), jamax)
endif

!> - Call setindxci() to initialize IN and CCN data
Expand Down Expand Up @@ -691,8 +691,7 @@ subroutine GFS_phys_time_vary_timestep_init (
integer, intent(out) :: errflg

! Local variables
integer :: i, j, k, iseed, iskip, ix, kdt_rad
real(kind=kind_phys) :: sec_zero, rsnow
integer :: i, j, k, iseed, iskip, ix
real(kind=kind_phys) :: wrk(1)
real(kind=kind_phys) :: rannie(cny)
real(kind=kind_phys) :: rndval(cnx*cny*nrcm)
Expand Down Expand Up @@ -792,18 +791,18 @@ subroutine GFS_phys_time_vary_timestep_init (

! Not needed for SCM:
!> - Call gcycle() to repopulate specific time-varying surface properties for AMIP/forecast runs
!if (nscyc > 0) then
! if (mod(kdt,nscyc) == 1) THEN
! call gcycle (me, nthrds, nx, ny, isc, jsc, nsst, tile_num, nlunit, &
! input_nml_file, lsoil, lsoil_lsm, kice, idate, ialb, isot, ivegsrc, &
! use_ufo, nst_anl, fhcyc, phour, lakefrac, min_seaice, min_lakeice, &
! frac_grid, smc, slc, stc, smois, sh2o, tslb, tiice, tg3, tref, tsfc, &
! tsfco, tisfc, hice, fice, facsf, facwf, alvsf, alvwf, alnsf, alnwf, &
! zorli, zorll, zorlo, weasd, slope, snoalb, canopy, vfrac, vtype, &
! stype, shdmin, shdmax, snowd, cv, cvb, cvt, oro, oro_uf, &
! xlat_d, xlon_d, slmsk, imap, jmap)
! endif
!endif
! if (nscyc > 0) then
! if (mod(kdt,nscyc) == 1) THEN
! call gcycle (me, nthrds, nx, ny, isc, jsc, nsst, tile_num, nlunit, &
! input_nml_file, lsoil, lsoil_lsm, kice, idate, ialb, isot, ivegsrc, &
! use_ufo, nst_anl, fhcyc, phour, landfrac, lakefrac, min_seaice, min_lakeice,&
! frac_grid, smc, slc, stc, smois, sh2o, tslb, tiice, tg3, tref, tsfc, &
! tsfco, tisfc, hice, fice, facsf, facwf, alvsf, alvwf, alnsf, alnwf, &
! zorli, zorll, zorlo, weasd, slope, snoalb, canopy, vfrac, vtype, &
! stype, shdmin, shdmax, snowd, cv, cvb, cvt, oro, oro_uf, &
! xlat_d, xlon_d, slmsk, imap, jmap)
! endif
! endif

end subroutine GFS_phys_time_vary_timestep_init
!! @}
Expand Down
4 changes: 2 additions & 2 deletions physics/GFS_radiation_surface.F90
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ subroutine GFS_radiation_surface_run ( &
if (lslwr) then
!> - Call module_radiation_surface::setemis(),to set up surface
!! emissivity for LW radiation.
call setemis (lsm, lsm_noahmp, lsm_ruc, vtype, landfrac, &
call setemis (lsm, lsm_noahmp, lsm_ruc, vtype, &
frac_grid, min_seaice, xlon, xlat, slmsk, &
snowd, sncovr, sncovr_ice, zorl, tsfg, tsfa, &
hprime, semis_lnd, semis_ice, im, &
Expand All @@ -182,7 +182,7 @@ subroutine GFS_radiation_surface_run ( &
!! albedor for SW radiation.

call setalb (slmsk, lsm, lsm_noahmp, lsm_ruc, snowd, sncovr, sncovr_ice, snoalb, &
zorl, coszen, tsfg, tsfa, hprime, landfrac, frac_grid, min_seaice, &
zorl, coszen, tsfg, tsfa, hprime, frac_grid, min_seaice, &
alvsf, alnsf, alvwf, alnwf, facsf, facwf, fice, tisfc, &
albdvis_lnd, albdnir_lnd, albivis_lnd, albinir_lnd, &
albdvis_ice, albdnir_ice, albivis_ice, albinir_ice, &
Expand Down
Loading

0 comments on commit 719c162

Please sign in to comment.