Changeset db91eb7 in flexpart.git
- Timestamp:
- Dec 5, 2018, 11:52:16 AM (5 years ago)
- Branches:
- master, 10.4.1_pesei, GFS_025, bugfixes+enhancements, dev, release-10, release-10.4.1, scaling-bug
- Children:
- e9e0f06, 3d7eebf
- Parents:
- 79e0349
- Location:
- src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/readwind_gfs.f90
r6ecb30a rdb91eb7 1 !********************************************************************** 1 2 2 ! Copyright 1998,1999,2000,2001,2002,2005,2007,2008,2009,2010 * 3 3 ! Andreas Stohl, Petra Seibert, A. Frank, Gerhard Wotawa, * … … 108 108 character(len=24) :: gribErrorMsg = 'Error reading grib file' 109 109 character(len=20) :: gribFunction = 'readwind_gfs' 110 character(len=20) :: shortname 110 111 111 112 … … 120 121 121 122 !HSO 122 5call grib_open_file(ifile,path(3)(1:length(3)) &123 call grib_open_file(ifile,path(3)(1:length(3)) & 123 124 //trim(wfname(indj)),'r',iret) 124 125 if (iret.ne.GRIB_SUCCESS) then … … 162 163 163 164 !read the grib2 identifiers 165 call grib_get_string(igrib,'shortName',shortname,iret) 166 164 167 call grib_get_int(igrib,'discipline',discipl,iret) 165 168 ! call grib_check(iret,gribFunction,gribErrorMsg) … … 173 176 valSurf,iret) 174 177 ! call grib_check(iret,gribFunction,gribErrorMsg) 175 178 179 ! write(*,*) 'Field: ',ifield,parCat,parNum,typSurf,shortname 176 180 !convert to grib1 identifiers 177 181 isec1(6)=-1 … … 214 218 isec1(7)=105 ! indicatorOfTypeOfLevel 215 219 isec1(8)=10 220 elseif ((parCat.eq.1).and.(parNum.eq.22).and.(typSurf.eq.100)) then ! CLWMR Cloud Mixing Ratio [kg/kg]: 221 isec1(6)=153 ! indicatorOfParameter 222 isec1(7)=100 ! indicatorOfTypeOfLevel 223 isec1(8)=valSurf/100 ! level, convert to hPa 216 224 elseif ((parCat.eq.3).and.(parNum.eq.1).and.(typSurf.eq.101)) then ! SLP 217 225 isec1(6)=2 ! indicatorOfParameter … … 548 556 endif 549 557 endif 558 ! SEC & IP 12/2018 read GFS clouds 559 if(isec1(6).eq.153) then !! CLWCR Cloud liquid water content [kg/kg] 560 clwch(i,j,nlev_ec-k+2,n)=zsec4(nxfield*(ny-j-1)+i+1) 561 readclouds=.true. 562 sumclouds=.true. 563 endif 564 550 565 551 566 end do … … 675 690 call shift_field(vvh,nxfield,ny,nuvzmax,nuvz,1,1) 676 691 call shift_field(wwh,nxfield,ny,nwzmax,nwz,1,1) 692 ! IP & SEC adding GFS Clouds 20181205 693 call shift_field(clwch,nxfield,ny,nuvzmax,nuvz,2,n) 677 694 endif 678 695 -
src/verttransform_gfs.f90
r6ecb30a rdb91eb7 75 75 integer :: rain_cloud_above,kz_inv 76 76 real :: f_qvsat,pressure 77 real :: rh,lsp,c onvp77 real :: rh,lsp,cloudh_min,convp,prec 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 clouds 227 if (readclouds) then 228 clwc(ix,jy,1,n)=clwch(ix,jy,llev,n) 229 endif 226 230 pv(ix,jy,1,n)=pvh(ix,jy,llev) 227 231 rho(ix,jy,1,n)=rhoh(llev) … … 231 235 tt(ix,jy,nz,n)=tth(ix,jy,nuvz,n) 232 236 qv(ix,jy,nz,n)=qvh(ix,jy,nuvz,n) 237 ! IP & SEC, 201812 add clouds 238 if (readclouds) then 239 clwc(ix,jy,nz,n)=clwch(ix,jy,nuvz,n) 240 endif 233 241 pv(ix,jy,nz,n)=pvh(ix,jy,nuvz) 234 242 rho(ix,jy,nz,n)=rhoh(nuvz) … … 242 250 tt(ix,jy,iz,n)=tt(ix,jy,nz,n) 243 251 qv(ix,jy,iz,n)=qv(ix,jy,nz,n) 252 ! IP & SEC, 201812 add clouds 253 if (readclouds) then 254 clwc(ix,jy,iz,n)=clwc(ix,jy,nz,n) 255 endif 244 256 pv(ix,jy,iz,n)=pv(ix,jy,nz,n) 245 257 rho(ix,jy,iz,n)=rho(ix,jy,nz,n) … … 258 270 qv(ix,jy,iz,n)=(qvh(ix,jy,kz-1,n)*dz2 & 259 271 +qvh(ix,jy,kz,n)*dz1)/dz 272 ! IP & SEC, 201812 add clouds 273 if (readclouds) then 274 clwc(ix,jy,iz,n)=(clwch(ix,jy,kz-1,n)*dz2 & 275 +clwch(ix,jy,kz,n)*dz1)/dz 276 endif 260 277 pv(ix,jy,iz,n)=(pvh(ix,jy,kz-1)*dz2+pvh(ix,jy,kz)*dz1)/dz 261 278 rho(ix,jy,iz,n)=(rhoh(kz-1)*dz2+rhoh(kz)*dz1)/dz … … 496 513 497 514 515 516 !*********************************************************************************** 517 ! IP & SEC, 201812 GFS clouds read 518 if (readclouds) then 519 ! The method is loops all grids vertically and constructs the 3D matrix for clouds 520 ! Cloud top and cloud bottom gid cells are assigned as well as the total column 521 ! cloud water. For precipitating grids, the type and whether it is in or below 522 ! 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 regards 524 ! to scavenging. Also clouds that are not precipitating are defined which may be 525 ! to include future cloud processing by non-precipitating-clouds. 526 !*********************************************************************************** 527 write(*,*) 'Global NCEP fields: using cloud water' 528 clw(:,:,:,n)=0.0 529 ctwc(:,:,n)=0.0 530 clouds(:,:,:,n)=0 531 ! If water/ice are read separately into clwc and ciwc, store sum in clwc 532 do jy=0,nymin1 533 do ix=0,nxmin1 534 lsp=lsprec(ix,jy,1,n) 535 convp=convprec(ix,jy,1,n) 536 prec=lsp+convp 537 ! Find clouds in the vertical 538 do kz=1, nz-1 !go from top to bottom 539 if (clwc(ix,jy,kz,n).gt.0) then 540 ! assuming rho is in kg/m3 and hz in m gives: kg/kg * kg/m3 *m3/kg /m = m2/m3 541 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 endif 545 end do 546 547 ! If Precipitation. Define removal type in the vertical 548 if ((lsp.gt.0.01).or.(convp.gt.0.01)) then ! cloud and precipitation 549 550 do kz=nz,1,-1 !go Bottom up! 551 if (clw(ix,jy,kz,n).gt. 0) then ! is in cloud 552 cloudsh(ix,jy,n)=cloudsh(ix,jy,n)+height(kz)-height(kz-1) 553 clouds(ix,jy,kz,n)=1 ! is a cloud 554 if (lsp.ge.convp) then 555 clouds(ix,jy,kz,n)=3 ! lsp in-cloud 556 else 557 clouds(ix,jy,kz,n)=2 ! convp in-cloud 558 endif ! convective or large scale 559 elseif((clw(ix,jy,kz,n).le.0) .and. (cloudh_min.ge.height(kz))) then ! is below cloud 560 if (lsp.ge.convp) then 561 clouds(ix,jy,kz,n)=5 ! lsp dominated washout 562 else 563 clouds(ix,jy,kz,n)=4 ! convp dominated washout 564 endif ! convective or large scale 565 endif 566 567 if (height(kz).ge. 19000) then ! set a max height for removal 568 clouds(ix,jy,kz,n)=0 569 endif !clw>0 570 end do !nz 571 endif ! precipitation 572 end do 573 end do 574 else 575 write(*,*) 'Global NCEP fields: using cloud water from Parameterization' 498 576 ! write (*,*) 'initializing clouds, n:',n,nymin1,nxmin1,nz 499 577 ! create a cloud and rainout/washout field, clouds occur where rh>80% … … 534 612 end do 535 613 end do 614 endif ! IP & SEC 201812, GFS clouds read 536 615 537 616
Note: See TracChangeset
for help on using the changeset viewer.