Skip to content

Commit

Permalink
Add SPP to MYNN SFC scheme
Browse files Browse the repository at this point in the history
  • Loading branch information
Laurie Carson committed Mar 8, 2021
1 parent fde5588 commit cc4cdd7
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 5 deletions.
23 changes: 18 additions & 5 deletions physics/module_MYNNSFC_wrapper.F90
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ SUBROUTINE mynnsfc_wrapper_run( &
& FLHC, FLQC, &
& U10, V10, TH2, T2, Q2, &
& wstar, CHS2, CQS2, &
& do_spp, spp_wts_sfc, &
! & CP, G, ROVCP, R, XLV, &
! & SVP1, SVP2, SVP3, SVPT0, &
! & EP1,EP2,KARMAN, &
Expand Down Expand Up @@ -125,24 +126,26 @@ SUBROUTINE mynnsfc_wrapper_run( &

!MISC CONFIGURATION OPTIONS
INTEGER, PARAMETER :: &
& spp_pbl = 0, &
& isftcflx = 0, & !control: 0
& iz0tlnd = 0, & !control: 0
& isfflx = 1

integer, intent(in) :: ivegsrc
integer, intent(in) :: sfc_z0_type ! option for calculating surface roughness length over ocean
logical, intent(in) :: redrag ! reduced drag coeff. flag for high wind over sea (j.han)
logical, intent(in) :: do_spp ! flag for using SPP perturbations

!Input data
integer, dimension(im), intent(in) :: vegtype
real(kind=kind_phys), dimension(im), intent(in) :: &
& sigmaf,shdmax,z0pert,ztpert
! spp_wts_sfc only allocated if do_spp == .true.
real(kind_phys), dimension(:,:), intent(in) :: spp_wts_sfc

!MYNN-1D
REAL :: delt
INTEGER :: im, levs
INTEGER :: iter, k, i, itimestep, lsm, lsm_ruc
INTEGER :: iter, k, i, itimestep, lsm, lsm_ruc, spp_sfc
LOGICAL :: flag_init,flag_restart,lprnt
INTEGER :: IDS,IDE,JDS,JDE,KDS,KDE, &
& IMS,IME,JMS,JME,KMS,KME, &
Expand All @@ -155,7 +158,7 @@ SUBROUTINE mynnsfc_wrapper_run( &
& u, v, t3d, qvsh, qc

real(kind=kind_phys), dimension(im,levs) :: &
& pattern_spp_pbl, dz, th, qv
& pattern_spp_sfc, dz, th, qv

logical, dimension(im), intent(in) :: wet, dry, icy

Expand Down Expand Up @@ -214,9 +217,19 @@ SUBROUTINE mynnsfc_wrapper_run( &
th(i,k)=t3d(i,k)/exner(i,k)
!qc(i,k)=MAX(qgrs(i,k,ntcw),0.0)
qv(i,k)=qvsh(i,k)/(1.0 - qvsh(i,k))
pattern_spp_pbl(i,k)=0.0
pattern_spp_sfc(i,k)=0.0
enddo
enddo

if ( do_spp ) then
spp_sfc=1
do k=1,levs
do i=1,im
pattern_spp_sfc(i,k)=spp_wts_sfc(i,k)
enddo
enddo
endif

do i=1,im
if (slmsk(i)==1. .or. slmsk(i)==2.)then !sea/land/ice mask (=0/1/2) in FV3
xland(i)=1.0 !but land/water = (1/2) in SFCLAY_mynn
Expand Down Expand Up @@ -310,7 +323,7 @@ SUBROUTINE mynnsfc_wrapper_run( &
QGH=qgh,QSFC=qsfc,QSFC_RUC=qsfc_ruc, &
U10=u10,V10=v10,TH2=th2,T2=t2,Q2=q2, &
GZ1OZ0=GZ1OZ0,WSPD=wspd,wstar=wstar, &
spp_pbl=spp_pbl,pattern_spp_pbl=pattern_spp_pbl, &
spp_pbl=spp_sfc,pattern_spp_pbl=pattern_spp_sfc, &
ids=1,ide=im, jds=1,jde=1, kds=1,kde=levs, &
ims=1,ime=im, jms=1,jme=1, kms=1,kme=levs, &
its=1,ite=im, jts=1,jte=1, kts=1,kte=levs )
Expand Down
17 changes: 17 additions & 0 deletions physics/module_MYNNSFC_wrapper.meta
Original file line number Diff line number Diff line change
Expand Up @@ -932,6 +932,23 @@
kind = kind_phys
intent = inout
optional = F
[spp_wts_sfc]
standard_name = weights_for_stochastic_spp_sfc_perturbation
long_name = weights for stochastic spp sfc perturbation
units = none
dimensions = (horizontal_loop_extent,vertical_dimension)
type = real
kind = kind_phys
intent = in
optional = F
[do_spp]
standard_name = flag_for_stochastic_spp_option
long_name = flag for stochastic spp option
units = flag
dimensions = ()
type = logical
intent = in
optional = F
[lprnt]
standard_name = flag_print
long_name = control flag for diagnostic print out
Expand Down

0 comments on commit cc4cdd7

Please sign in to comment.