28 use vrbls3d,
only: uh, vh, zint, zmid
29 use vrbls2d ,
only: u10h, v10h, u10,v10, fis
30 use params_mod,
only: d25, gi
31 use ctlblk_mod,
only: jsta, jend, spval, jsta_m, jend_m, num_procs, mpi_comm_comp, lm,&
32 modelname, im, jm, jsta_2l, jend_2u, ista, iend, ista_m, iend_m, ista_2l, iend_2u
33 use gridspec_mod,
only: gridtype
43 INTEGER,
intent(in) :: LPBL(ista_2l:iend_2u,jsta_2l:jend_2u)
44 REAL,
intent(in) :: ZPBL(ista_2l:iend_2u,jsta_2l:jend_2u)
45 REAL,
intent(inout) :: GUST(ista_2l:iend_2u,jsta_2l:jend_2u)
47 integer I,J,IE,IW, L, K, ISTART, ISTOP, JSTART, JSTOP
48 integer LMIN,LXXX,IERR
49 real ZSFC,DELWIND,USFC,VSFC,SFCWIND,WIND,U0,V0,DZ
65 IF(gridtype ==
'A')
THEN
75 if ( num_procs > 1 )
then
78 lmin = max(1, minval(lpbl(ista:iend,jsta:jend)))
79 CALL mpi_allreduce(lmin,lxxx,1,mpi_integer,mpi_min,mpi_comm_comp,ierr)
81 CALL exch(uh(ista_2l,jsta_2l,l))
82 CALL exch(vh(ista_2l,jsta_2l,l))
93 IF(gridtype ==
'E')
THEN
97 if(u10h(i,j)<spval.and.uh(i,j+1,l)<spval.and.uh(ie,j,l)<spval.and.uh(iw,j,l)<spval.and.uh(i,j-1,l)<spval)
then
103 sfcwind = sqrt(usfc*usfc + vsfc*vsfc)
104 u0 = d25*(uh(i,j-1,l)+uh(iw,j,l)+uh(ie,j,l)+uh(i,j+1,l))
105 v0 = d25*(vh(i,j-1,l)+vh(iw,j,l)+vh(ie,j,l)+vh(i,j+1,l))
106 wind = sqrt(u0*u0 + v0*v0)
112 ELSE IF(gridtype ==
'B')
THEN
119 if(u10h(i,j)<spval.and.uh(iw,j-1,l)<spval)
then
123 sfcwind = sqrt(usfc*usfc + vsfc*vsfc)
124 u0 = d25*(uh(i,j-1,l)+uh(iw,j,l)+uh(ie,j,l)+uh(iw,j-1,l))
125 v0 = d25*(vh(i,j-1,l)+vh(iw,j,l)+vh(ie,j,l)+vh(iw,j-1,l))
126 wind = sqrt(u0*u0 + v0*v0)
130 ELSE IF(gridtype ==
'A')
THEN
134 if (usfc < spval .and. vsfc < spval)
then
135 sfcwind = sqrt(usfc*usfc + vsfc*vsfc)
139 if(modelname ==
'RAPR' .OR. modelname ==
'GFS' .OR. modelname ==
'FV3R')
then
140 zsfc = zint(i,j,lm+1)
146 if(uh(i,j,l)<spval)
then
149 wind = sqrt(u0*u0 + v0*v0)
150 delwind = wind - sfcwind
151 dz = zmid(i,j,k)-zsfc
152 delwind = delwind*(1.0-min(0.5,dz/2000.))
153 gust(i,j) = max(gust(i,j),sfcwind+delwind)
160 if(uh(i,j,l)<spval)
then
163 wind = sqrt(u0*u0 + v0*v0 )
174 if(modelname /=
'RAPR' .AND. modelname /=
'GFS' .AND. modelname /=
'FV3R')
then
175 if (sfcwind < spval .AND. zpbl(i,j) < spval )
then
176 delwind = wind - sfcwind
178 delwind = delwind*(1.0-min(0.5,zpbl(i,j)/2000.))
179 gust(i,j) = sfcwind + delwind