Changes in src/verttransform_gfs.f90 [db91eb7:6ecb30a] in flexpart.git
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/verttransform_gfs.f90
rdb91eb7 r6ecb30a 75 75 integer :: rain_cloud_above,kz_inv 76 76 real :: f_qvsat,pressure 77 real :: rh,lsp,c loudh_min,convp,prec77 real :: rh,lsp,convp 78 78 real :: rhoh(nuvzmax),pinmconv(nzmax) 79 79 real :: ew,pint,tv,tvold,pold,dz1,dz2,dz,ui,vi … … 224 224 tt(ix,jy,1,n)=tth(ix,jy,llev,n) 225 225 qv(ix,jy,1,n)=qvh(ix,jy,llev,n) 226 ! IP & SEC, 201812 add clouds227 if (readclouds) then228 clwc(ix,jy,1,n)=clwch(ix,jy,llev,n)229 endif230 226 pv(ix,jy,1,n)=pvh(ix,jy,llev) 231 227 rho(ix,jy,1,n)=rhoh(llev) … … 235 231 tt(ix,jy,nz,n)=tth(ix,jy,nuvz,n) 236 232 qv(ix,jy,nz,n)=qvh(ix,jy,nuvz,n) 237 ! IP & SEC, 201812 add clouds238 if (readclouds) then239 clwc(ix,jy,nz,n)=clwch(ix,jy,nuvz,n)240 endif241 233 pv(ix,jy,nz,n)=pvh(ix,jy,nuvz) 242 234 rho(ix,jy,nz,n)=rhoh(nuvz) … … 250 242 tt(ix,jy,iz,n)=tt(ix,jy,nz,n) 251 243 qv(ix,jy,iz,n)=qv(ix,jy,nz,n) 252 ! IP & SEC, 201812 add clouds253 if (readclouds) then254 clwc(ix,jy,iz,n)=clwc(ix,jy,nz,n)255 endif256 244 pv(ix,jy,iz,n)=pv(ix,jy,nz,n) 257 245 rho(ix,jy,iz,n)=rho(ix,jy,nz,n) … … 270 258 qv(ix,jy,iz,n)=(qvh(ix,jy,kz-1,n)*dz2 & 271 259 +qvh(ix,jy,kz,n)*dz1)/dz 272 ! IP & SEC, 201812 add clouds273 if (readclouds) then274 clwc(ix,jy,iz,n)=(clwch(ix,jy,kz-1,n)*dz2 &275 +clwch(ix,jy,kz,n)*dz1)/dz276 endif277 260 pv(ix,jy,iz,n)=(pvh(ix,jy,kz-1)*dz2+pvh(ix,jy,kz)*dz1)/dz 278 261 rho(ix,jy,iz,n)=(rhoh(kz-1)*dz2+rhoh(kz)*dz1)/dz … … 513 496 514 497 515 516 !***********************************************************************************517 ! IP & SEC, 201812 GFS clouds read518 if (readclouds) then519 ! The method is loops all grids vertically and constructs the 3D matrix for clouds520 ! Cloud top and cloud bottom gid cells are assigned as well as the total column521 ! cloud water. For precipitating grids, the type and whether it is in or below522 ! cloud scavenging are assigned with numbers 2-5 (following the old metod).523 ! Distinction is done for lsp and convp though they are treated the same in regards524 ! to scavenging. Also clouds that are not precipitating are defined which may be525 ! to include future cloud processing by non-precipitating-clouds.526 !***********************************************************************************527 write(*,*) 'Global NCEP fields: using cloud water'528 clw(:,:,:,n)=0.0529 ctwc(:,:,n)=0.0530 clouds(:,:,:,n)=0531 ! If water/ice are read separately into clwc and ciwc, store sum in clwc532 do jy=0,nymin1533 do ix=0,nxmin1534 lsp=lsprec(ix,jy,1,n)535 convp=convprec(ix,jy,1,n)536 prec=lsp+convp537 ! Find clouds in the vertical538 do kz=1, nz-1 !go from top to bottom539 if (clwc(ix,jy,kz,n).gt.0) then540 ! assuming rho is in kg/m3 and hz in m gives: kg/kg * kg/m3 *m3/kg /m = m2/m3541 clw(ix,jy,kz,n)=(clwc(ix,jy,kz,n)*rho(ix,jy,kz,n))*(height(kz+1)-height(kz))542 ctwc(ix,jy,n) = ctwc(ix,jy,n)+clw(ix,jy,kz,n)543 cloudh_min=min(height(kz+1),height(kz))544 endif545 end do546 547 ! If Precipitation. Define removal type in the vertical548 if ((lsp.gt.0.01).or.(convp.gt.0.01)) then ! cloud and precipitation549 550 do kz=nz,1,-1 !go Bottom up!551 if (clw(ix,jy,kz,n).gt. 0) then ! is in cloud552 cloudsh(ix,jy,n)=cloudsh(ix,jy,n)+height(kz)-height(kz-1)553 clouds(ix,jy,kz,n)=1 ! is a cloud554 if (lsp.ge.convp) then555 clouds(ix,jy,kz,n)=3 ! lsp in-cloud556 else557 clouds(ix,jy,kz,n)=2 ! convp in-cloud558 endif ! convective or large scale559 elseif((clw(ix,jy,kz,n).le.0) .and. (cloudh_min.ge.height(kz))) then ! is below cloud560 if (lsp.ge.convp) then561 clouds(ix,jy,kz,n)=5 ! lsp dominated washout562 else563 clouds(ix,jy,kz,n)=4 ! convp dominated washout564 endif ! convective or large scale565 endif566 567 if (height(kz).ge. 19000) then ! set a max height for removal568 clouds(ix,jy,kz,n)=0569 endif !clw>0570 end do !nz571 endif ! precipitation572 end do573 end do574 else575 write(*,*) 'Global NCEP fields: using cloud water from Parameterization'576 498 ! write (*,*) 'initializing clouds, n:',n,nymin1,nxmin1,nz 577 499 ! create a cloud and rainout/washout field, clouds occur where rh>80% … … 612 534 end do 613 535 end do 614 endif ! IP & SEC 201812, GFS clouds read615 536 616 537
Note: See TracChangeset
for help on using the changeset viewer.