58 use vrbls3d,
only: pint, t, q, zint, alpint, pmid, exch_h, uh, &
59 vh, omga, q2, cwm, qqw, qqi, qqr, qqs, cfr, &
63 use params_mod,
only: d50 , pq0, a2, a3, a4, h1, d01, d608, rgamog,&
64 h1m12, d00, h2, rd, g, gi, h99999
65 use ctlblk_mod,
only: jsta_2l, jend_2u, spval, lp1, jsta, jend, lm, &
66 grib, cfld, datapd, fld_info, me, jend_m, im, &
67 jm, im_jm, ista, iend, ista_2l, iend_2u, ista_m, iend_m
68 use rqstfld_mod,
only: iget, lvls, id, iavblfld, lvlsxml
69 use gridspec_mod,
only :gridtype
77 integer,
PARAMETER :: LSIG=22
78 real,
PARAMETER :: PTSIGO=1.0e4
84 LOGICAL DONEFSL1,TSLDONE
85 real,
dimension(ista_2l:iend_2u,jsta_2l:jend_2u) :: FSL, TSL, QSL, OSL, USL, VSL, Q2SL, &
86 fsl1, cfrsig, egrid1, egrid2
88 real,
dimension(ista_2l:iend_2u,jsta_2l:jend_2u) :: grid2
90 REAL SIGO(LSIG+1),DSIGO(LSIG),ASIGO(LSIG)
92 INTEGER,
dimension(ista_2l:iend_2u,jsta_2l:jend_2u) :: NL1X,NL1XF
103 real,
dimension(ista_2l:iend_2u,jsta_2l:jend_2u) :: C1D, QW1, QI1, QR1, QS1, QG1, AKH
105 integer I,J,L,LL,LP,LLMH,II,JJ,JJB,JJE,NHOLD
106 real PFSIGO,APFSIGO,PSIGO,APSIGO,PNL1,PU,ZU,TU,QU,QSAT, &
107 rhu,tvru,tvrabv,tabv,qabv,b,ahf,fac,pl,zl,tl,ql, &
108 rhl,tmt0,ai,bi,tvrl,tvrblo,tblo,qblo,fact, &
109 px,bf,facf,ahff,dpsig,tv,pdv,denom,denomf,pnl1f,dum
125 IF((iget(205)>0).OR.(iget(206)>0).OR. &
126 (iget(207)>0).OR.(iget(208)>0).OR. &
127 (iget(209)>0).OR.(iget(210)>0).OR. &
128 (iget(216)>0).OR.(iget(217)>0).OR. &
129 (iget(211)>0).OR.(iget(212)>0).OR. &
130 (iget(213)>0).OR.(iget(214)>0).OR. &
131 (iget(215)>0).OR.(iget(222)>0).OR. &
145 sigo(l)=sigo(l-1)+dsigo(lsig-l+2)
149 asigo(l)=0.5*(sigo(l)+sigo(l+1))
206 IF(nl1xf(i,j)==lp1.AND.pint(i,j,l)>ptsigo)
THEN
213 DO 167 i=ista_2l,iend_2u
217 pnl1=pint(i,j,nl1xf(i,j))
219 llmh = nint(lmh(i,j))
220 IF(nl1xf(i,j)==1 .AND. t(i,j,1)<spval &
221 .AND. t(i,j,2)<spval .AND. q(i,j,1)<spval &
222 .AND. q(i,j,2)<spval)
THEN
225 tu=d50*(t(i,j,1)+t(i,j,2))
226 qu=d50*(q(i,j,1)+q(i,j,2))
227 qsat=pq0/pu*exp(a2*(tu-a3)/(tu-a4))
239 tvrabv=tvru*(pfsigo/pu)**rgamog
240 tabv=tvrabv/(h1+d608*qu)
241 qsat=pq0/pfsigo*exp(a2*(tabv-a3)/(tabv-a4))
243 qabv =max(h1m12,qabv)
249 ELSEIF(nl1xf(i,j)==lp1 .AND. t(i,j,lm-1)<spval &
250 .AND. t(i,j,lm-2)<spval .AND. q(i,j,lm-1)<spval &
251 .AND. q(i,j,lm-2)<spval)
THEN
254 tl=d50*(t(i,j,lm-2)+t(i,j,lm-1))
255 ql=d50*(q(i,j,lm-2)+q(i,j,lm-1))
259 qsat=pq0/pl*exp(a2*(tl-a3)/(tl-a4))
270 tvrl =tl*(h1+d608*ql)
271 tvrblo=tvrl*(pfsigo/pl)**rgamog
272 tblo =tvrblo/(h1+d608*ql)
273 qsat=pq0/pfsigo*exp(a2*(tblo-a3)/(tblo-a4))
275 qblo =max(h1m12,qblo)
281 ELSEIF(nl1xf(i,j)<lp1)
THEN
282 IF(t(i,j,nl1xf(i,j))<spval &
283 & .AND. q(i,j,nl1xf(i,j))<spval)
THEN
285 b =t(i,j,nl1xf(i,j))*(h1+d608*q(i,j,nl1xf(i,j)))
286 denom=(alpint(i,j,nl1xf(i,j)+1)-alpint(i,j,nl1xf(i,j)-1))
288 ahf =(b-t(i,j,nl1xf(i,j)-1)*(h1+d608*q(i,j,nl1xf(i,j)-1))) &
290 fac =h2*log(pmid(i,j,nl1xf(i,j)))
295 if(donefsl1)fsl1(i,j)=(pnl1-pfsigo)/(pfsigo+pnl1) &
296 *((apfsigo+alpint(i,j,nl1xf(i,j))-fac)*ahf+b)*rd*h2 &
297 +zint(i,j,nl1xf(i,j))*g
299 IF(nl1xf(i,j)<=2 .OR. nl1xf(i,j)>(llmh+1))
THEN
302 fact=(apfsigo-log(pint(i,j,ll)))/ &
303 & (log(pint(i,j,ll))-log(pint(i,j,ll-1)))
305 IF(exch_h(i,j,ll-2)<spval .AND. exch_h(i,j,ll-1)<spval) &
306 & akh(i,j)=exch_h(i,j,ll-1)+(exch_h(i,j,ll-1) &
307 & -exch_h(i,j,ll-2))*fact
312 IF (iget(205)>0)
THEN
313 IF (lvls(1,iget(205))>0)
THEN
317 IF(fsl1(i,j)<spval)
THEN
318 grid1(i,j)=fsl1(i,j)*gi
324 if(grib==
'grib2')
then
326 fld_info(cfld)%ifld=iavblfld(iget(205))
327 datapd(1:iend-ista+1,1:jend-jsta+1,cfld)=grid1(ista:iend,jsta:jend)
333 IF (iget(243)>0)
THEN
334 IF (lvls(1,iget(243))>0)
THEN
341 if(grib==
"grib2" )
then
343 fld_info(cfld)%ifld=iavblfld(iget(243))
344 datapd(1:iend-ista+1,1:jend-jsta+1,cfld)=grid1(ista:iend,jsta:jend)
347 if(me==0)print*,
'output Heat Diffusivity'
383 llmh = nint(lmh(i,j))
384 psigo=ptsigo+asigo(lp)*(pint(i,j,llmh+1)-ptsigo)
385 IF(nl1x(i,j)==lp1.AND.pmid(i,j,l)>psigo)
THEN
395 IF(nl1x(i,j)==lp1.AND.pint(i,j,llmh+1)>=psigo)
THEN
422 llmh = nint(lmh(i,j))
423 psigo=ptsigo+asigo(lp)*(pint(i,j,llmh+1)-ptsigo)
425 IF(nl1x(i,j)<=llmh)
THEN
435 fact=(apsigo-log(pmid(i,j,ll)))/ &
436 & (log(pmid(i,j,ll))-log(pmid(i,j,ll-1)))
437 tsl(i,j)=t(i,j,ll)+(t(i,j,ll)-t(i,j,ll-1))*fact
438 IF(q(i,j,ll)<spval .AND. q(i,j,ll-1)<spval) &
439 & qsl(i,j)=q(i,j,ll)+(q(i,j,ll)-q(i,j,ll-1))*fact
440 IF(gridtype==
'A')
THEN
441 IF(uh(i,j,ll)<spval .AND. uh(i,j,ll-1)<spval) &
442 & usl(i,j)=uh(i,j,ll)+(uh(i,j,ll)-uh(i,j,ll-1))*fact
443 IF(vh(i,j,ll)<spval .AND. vh(i,j,ll-1)<spval) &
444 & vsl(i,j)=vh(i,j,ll)+(vh(i,j,ll)-vh(i,j,ll-1))*fact
446 IF(omga(i,j,ll)<spval .AND. omga(i,j,ll-1)<spval) &
447 & osl(i,j)=omga(i,j,ll)+(omga(i,j,ll)-omga(i,j,ll-1))*fact
448 IF(q2(i,j,ll)<spval .AND. q2(i,j,ll-1)<spval) &
449 & q2sl(i,j)=q2(i,j,ll)+(q2(i,j,ll)-q2(i,j,ll-1))*fact
459 IF(q2sl(i,j)<0.0) q2sl(i,j)=0.0
462 IF(cwm(i,j,ll)<spval .AND. cwm(i,j,ll-1)<spval) &
463 & c1d(i,j)=cwm(i,j,ll)+(cwm(i,j,ll)-cwm(i,j,ll-1))*fact
464 c1d(i,j)=max(c1d(i,j),h1m12)
465 IF(qqw(i,j,ll)<spval .AND. qqw(i,j,ll-1)<spval) &
466 & qw1(i,j)=qqw(i,j,ll)+(qqw(i,j,ll)-qqw(i,j,ll-1))*fact
467 qw1(i,j)=max(qw1(i,j),h1m12)
468 IF(qqi(i,j,ll)<spval .AND. qqi(i,j,ll-1)<spval) &
469 & qi1(i,j)=qqi(i,j,ll)+(qqi(i,j,ll)-qqi(i,j,ll-1))*fact
470 qi1(i,j)=max(qi1(i,j),h1m12)
471 IF(qqr(i,j,ll)<spval .AND. qqr(i,j,ll-1)<spval) &
472 & qr1(i,j)=qqr(i,j,ll)+(qqr(i,j,ll)-qqr(i,j,ll-1))*fact
473 qr1(i,j)=max(qr1(i,j),h1m12)
474 IF(qqs(i,j,ll)<spval .AND. qqs(i,j,ll-1)<spval) &
475 & qs1(i,j)=qqs(i,j,ll)+(qqs(i,j,ll)-qqs(i,j,ll-1))*fact
476 qs1(i,j)=max(qs1(i,j),h1m12)
477 IF(cfr(i,j,ll)<spval .AND. cfr(i,j,ll-1)<spval) &
478 & cfrsig(i,j)=cfr(i,j,ll)+(cfr(i,j,ll)-cfr(i,j,ll-1))*fact
479 cfrsig(i,j)=max(cfrsig(i,j),h1m12)
480 IF(qqs(i,j,ll)<spval .AND. qqs(i,j,ll-1)<spval)
THEN
481 dum=f_rimef(i,j,ll)+(f_rimef(i,j,ll)-f_rimef(i,j,ll-1))*fact
500 tl=0.5*(t(i,j,lm-2)+t(i,j,lm-1))
501 ql=0.5*(q(i,j,lm-2)+q(i,j,lm-1))
509 qsat=pq0/pl*exp(a2*(tl-a3)/(tl-a4))
523 tvrl =tl*(1.+0.608*ql)
524 tvrblo=tvrl*(psigo/pl)**rgamog
525 tblo =tvrblo/(1.+0.608*ql)
534 qsat=pq0/psigo*exp(a2*(tblo-a3)/(tblo-a4))
538 qsl(i,j) = max(1.e-12,qblo)
539 IF(gridtype==
'A')
THEN
540 usl(i,j) = uh(i,j,llmh)
541 vsl(i,j) = vh(i,j,llmh)
543 osl(i,j) = omga(i,j,llmh)
544 q2sl(i,j) = max(0.0,0.5*(q2(i,j,llmh-1)+q2(i,j,llmh)))
545 pnl1 = pint(i,j,nl1x(i,j))
566 llmh = nint(lmh(i,j))
567 psigo=ptsigo+sigo(lp+1)*(pint(i,j,llmh+1)-ptsigo)
569 IF(nl1xf(i,j)==lp1.AND.pint(i,j,l)>psigo)
THEN
581 llmh = nint(lmh(i,j))
582 pfsigo=ptsigo+sigo(lp+1)*(pint(i,j,llmh+1)-ptsigo)
583 psigo=ptsigo+asigo(lp)*(pint(i,j,llmh+1)-ptsigo)
585 pnl1f=pint(i,j,nl1xf(i,j))
587 IF(nl1xf(i,j)==1 .AND. t(i,j,1)<spval &
588 & .AND. t(i,j,2)<spval .AND. q(i,j,1)<spval &
589 & .AND. q(i,j,2)<spval)
THEN
592 tu=d50*(t(i,j,1)+t(i,j,2))
593 qu=d50*(q(i,j,1)+q(i,j,2))
597 qsat=pq0/pu*exp(a2*(tu-a3)/(tu-a4))
611 px=(pfsigo+pnl1f)*0.5
612 tvrabv=tvru*(px/pu)**rgamog
613 tabv=tvrabv/(h1+d608*qu)
622 ELSEIF(nl1xf(i,j)==lp1 .AND. t(i,j,lm-1)<spval &
623 & .AND. t(i,j,lm-2)<spval .AND. q(i,j,lm-1)<spval &
624 & .AND. q(i,j,lm-2)<spval)
THEN
632 tl=d50*(t(i,j,lm-2)+t(i,j,lm-1))
633 ql=d50*(q(i,j,lm-2)+q(i,j,lm-1))
637 qsat=pq0/pl*exp(a2*(tl-a3)/(tl-a4))
648 tvrl =tl*(h1+d608*ql)
650 px=(pfsigo+pnl1f)*0.5
651 tvrblo=tvrl*(px/pl)**rgamog
652 tblo =tvrblo/(h1+d608*ql)
662 ELSEIF(nl1xf(i,j)<lp1)
THEN
663 IF(t(i,j,nl1xf(i,j))<spval &
664 & .AND. q(i,j,nl1xf(i,j))<spval)
THEN
672 bf =t(i,j,nl1xf(i,j))*(h1+d608*q(i,j,nl1xf(i,j)))
674 facf =h2*log(pmid(i,j,nl1xf(i,j)))
675 denomf=(alpint(i,j,nl1xf(i,j)+1)-alpint(i,j,nl1xf(i,j)-1))
677 ahff=(bf-t(i,j,nl1xf(i,j)-1)*(h1+d608*q(i,j,nl1xf(i,j)-1))) &
685 fsl(i,j)=(pnl1f-pfsigo)/(pfsigo+pnl1f) &
686 *((apfsigo+alpint(i,j,nl1xf(i,j))-facf)*ahff+bf)*rd*h2 &
687 +zint(i,j,nl1xf(i,j))*g
689 dpsig=(sigo(lp+1)-sigo(lp))*(pint(i,j,llmh+1)-ptsigo)
692 IF(.NOT.tsldone)
THEN
693 tsl(i,j)=(fsl1(i,j)-fsl(i,j))*psigo/(rd*dpsig)
696 IF(.NOT.tsldone)
THEN
698 tsl(i,j)=tv/(h1+d608*qsl(i,j))
700 qsat=pq0/psigo *exp(a2*(tsl(i,j)-a3)/(tsl(i,j)-a4))
704 IF(rhl>1.) qsl(i,j)=qsat
705 IF(rhl<0.01) qsl(i,j)=0.01*qsat
711 IF(nl1xf(i,j)<=2 .OR. nl1xf(i,j)>(llmh+1))
THEN
714 fact=(apfsigo-log(pint(i,j,ll)))/ &
715 & (log(pint(i,j,ll))-log(pint(i,j,ll-1)))
717 IF(exch_h(i,j,ll-2)<spval .AND. &
718 & exch_h(i,j,ll-1)<spval) &
719 & akh(i,j)=exch_h(i,j,ll-1)+(exch_h(i,j,ll-1) &
720 & -exch_h(i,j,ll-2))*fact
729 if(gridtype==
'B' .or. gridtype==
'E') &
730 call exch(pint(ista_2l:iend_2u,jsta_2l:jend_2u,lp1))
731 IF(gridtype==
'E')
THEN
734 DO i=ista,iend-mod(j,2)
739 llmh = nint(lmh(i,j))
758 IF(j == 1 .AND. i < iend)
THEN
759 pdv=0.5*(pint(i,j,llmh+1)+pint(i+1,j,llmh+1))
760 ELSE IF(j==jm .AND. i<iend)
THEN
761 pdv=0.5*(pint(i,j,llmh+1)+pint(i+1,j,llmh+1))
762 ELSE IF(i == ista .AND. mod(j,2) == 0)
THEN
763 pdv=0.5*(pint(i,j-1,llmh+1)+pint(i,j+1,llmh+1))
764 ELSE IF(i == iend .AND. mod(j,2) == 0)
THEN
765 pdv=0.5*(pint(i,j-1,llmh+1)+pint(i,j+1,llmh+1))
766 ELSE IF (mod(j,2) < 1)
THEN
767 pdv=0.25*(pint(i,j,llmh+1)+pint(i-1,j,llmh+1) &
768 & +pint(i,j+1,llmh+1)+pint(i,j-1,llmh+1))
770 pdv=0.25*(pint(i,j,llmh+1)+pint(i+1,j,llmh+1) &
771 & +pint(i,j+1,llmh+1)+pint(i,j-1,llmh+1))
774 psigo=ptsigo+asigo(lp)*(pdv-ptsigo)
777 IF(nl1x(i,j)==lp1.AND.pmidv(i,j,l)>psigo)
THEN
787 IF(nl1x(i,j)==lp1.AND. pdv>psigo)
THEN
796 DO 230 i=ista,iend-mod(j,2)
798 llmh = nint(lmh(i,j))
817 IF(j == 1 .AND. i < iend)
THEN
818 pdv=0.5*(pint(i,j,llmh+1)+pint(i+1,j,llmh+1))
819 ELSE IF(j==jm .AND. i<iend)
THEN
820 pdv=0.5*(pint(i,j,llmh+1)+pint(i+1,j,llmh+1))
821 ELSE IF(i == ista .AND. mod(j,2) == 0)
THEN
822 pdv=0.5*(pint(i,j-1,llmh+1)+pint(i,j+1,llmh+1))
823 ELSE IF(i == iend .AND. mod(j,2) == 0)
THEN
824 pdv=0.5*(pint(i,j-1,llmh+1)+pint(i,j+1,llmh+1))
825 ELSE IF (mod(j,2) < 1)
THEN
826 pdv=0.25*(pint(i,j,llmh+1)+pint(i-1,j,llmh+1) &
827 & +pint(i,j+1,llmh+1)+pint(i,j-1,llmh+1))
829 pdv=0.25*(pint(i,j,llmh+1)+pint(i+1,j,llmh+1) &
830 & +pint(i,j+1,llmh+1)+pint(i,j-1,llmh+1))
833 psigo=ptsigo+asigo(lp)*(pdv-ptsigo)
841 llmh = nint(lmh(i,j))
842 IF(nl1x(i,j)<=llmh)
THEN
852 fact=(apsigo-log(pmidv(i,j,ll)))/ &
853 & (log(pmidv(i,j,ll))-log(pmidv(i,j,ll-1)))
854 IF(uh(i,j,ll)<spval .AND. uh(i,j,ll-1)<spval) &
855 & usl(i,j)=uh(i,j,ll)+(uh(i,j,ll)-uh(i,j,ll-1))*fact
856 IF(vh(i,j,ll)<spval .AND. vh(i,j,ll-1)<spval) &
857 & vsl(i,j)=vh(i,j,ll)+(vh(i,j,ll)-vh(i,j,ll-1))*fact
864 IF(uh(i,j,llmh)<spval)usl(i,j)=uh(i,j,llmh)
865 IF(vh(i,j,llmh)<spval)vsl(i,j)=vh(i,j,llmh)
869 IF(mod(jsta,2)==0)jjb=jsta+1
871 IF(mod(jend,2)==0)jje=jend-1
873 usl(iend,j)=usl(iend-1,j)
874 vsl(iend,j)=vsl(iend-1,j)
877 ELSE IF (gridtype==
'B')
THEN
884 pdv=0.25*(pint(i,j,lp1)+pint(i+1,j,lp1) &
885 +pint(i,j+1,lp1)+pint(i+1,j+1,lp1))
887 psigo=ptsigo+asigo(lp)*(pdv-ptsigo)
890 IF(nl1x(i,j)==lp1.AND.pmidv(i,j,l)>psigo)
THEN
900 IF(nl1x(i,j)==lp1.AND. pdv>psigo)
THEN
909 pdv=0.25*(pint(i,j,lp1)+pint(i+1,j,lp1) &
910 +pint(i,j+1,lp1)+pint(i+1,j+1,lp1))
911 psigo=ptsigo+asigo(lp)*(pdv-ptsigo)
919 llmh = nint(lmh(i,j))
920 IF(nl1x(i,j)<=llmh)
THEN
930 fact=(apsigo-log(pmidv(i,j,ll)))/ &
931 & (log(pmidv(i,j,ll))-log(pmidv(i,j,ll-1)))
932 IF(uh(i,j,ll)<spval .AND. uh(i,j,ll-1)<spval) &
933 & usl(i,j)=uh(i,j,ll)+(uh(i,j,ll)-uh(i,j,ll-1))*fact
934 IF(vh(i,j,ll)<spval .AND. vh(i,j,ll-1)<spval) &
935 & vsl(i,j)=vh(i,j,ll)+(vh(i,j,ll)-vh(i,j,ll-1))*fact
942 IF(uh(i,j,llmh)<spval)usl(i,j)=uh(i,j,llmh)
943 IF(vh(i,j,llmh)<spval)vsl(i,j)=vh(i,j,llmh)
976 IF(lvls(lp+1,iget(205))>0)
THEN
980 IF(fsl(i,j)<spval)
THEN
981 grid1(i,j)=fsl(i,j)*gi
987 if(grib==
"grib2" )
then
989 fld_info(cfld)%ifld=iavblfld(iget(205))
990 fld_info(cfld)%lvl=lvlsxml(lp+1,iget(205))
991 datapd(1:iend-ista+1,1:jend-jsta+1,cfld)=grid1(ista:iend,jsta:jend)
999 IF (iget(243)>0)
THEN
1000 IF (lvls(lp+1,iget(243))>0)
THEN
1005 IF(lp==(lsig+1))grid1(i,j)=0.0
1008 if(grib==
"grib2" )
then
1010 fld_info(cfld)%ifld=iavblfld(iget(243))
1011 fld_info(cfld)%lvl=lvlsxml(lp+1,iget(243))
1012 datapd(1:iend-ista+1,1:jend-jsta+1,cfld)=grid1(ista:iend,jsta:jend)
1014 if(me==0)print*,
'output Heat Diffusivity'
1020 IF(iget(206)>0)
THEN
1021 IF(lvls(lp,iget(206))>0)
THEN
1027 if(grib==
"grib2" )
then
1029 fld_info(cfld)%ifld=iavblfld(iget(206))
1030 fld_info(cfld)%lvl=lvlsxml(lp,iget(206))
1031 datapd(1:iend-ista+1,1:jend-jsta+1,cfld)=grid1(ista:iend,jsta:jend)
1039 IF(lvls(lp,iget(216))>0)
THEN
1043 llmh = nint(lmh(i,j))
1044 grid1(i,j)=ptsigo+asigo(lp)*(pint(i,j,llmh+1)-ptsigo)
1047 if(grib==
"grib2" )
then
1049 fld_info(cfld)%ifld=iavblfld(iget(216))
1050 fld_info(cfld)%lvl=lvlsxml(lp,iget(216))
1051 datapd(1:iend-ista+1,1:jend-jsta+1,cfld)=grid1(ista:iend,jsta:jend)
1059 IF(lvls(lp,iget(207))>0)
THEN
1065 CALL bound(grid1,h1m12,h99999)
1066 if(grib==
"grib2" )
then
1068 fld_info(cfld)%ifld=iavblfld(iget(207))
1069 fld_info(cfld)%lvl=lvlsxml(lp,iget(207))
1070 datapd(1:iend-ista+1,1:jend-jsta+1,cfld)=grid1(ista:iend,jsta:jend)
1078 IF(lvls(lp,iget(210))>0)
THEN
1084 if(grib==
"grib2" )
then
1086 fld_info(cfld)%ifld=iavblfld(iget(210))
1087 fld_info(cfld)%lvl=lvlsxml(lp,iget(210))
1088 datapd(1:iend-ista+1,1:jend-jsta+1,cfld)=grid1(ista:iend,jsta:jend)
1095 IF(iget(208)>0.OR.iget(209)>0)
THEN
1096 IF(lvls(lp,iget(208))>0.OR.lvls(lp,iget(209))>0)
then
1103 if(grib==
"grib2" )
then
1105 fld_info(cfld)%ifld=iavblfld(iget(208))
1106 fld_info(cfld)%lvl=lvlsxml(lp,iget(208))
1107 datapd(1:iend-ista+1,1:jend-jsta+1,cfld)=grid1(ista:iend,jsta:jend)
1109 fld_info(cfld)%ifld=iavblfld(iget(209))
1110 fld_info(cfld)%lvl=lvlsxml(lp,iget(209))
1111 datapd(1:iend-ista+1,1:jend-jsta+1,cfld)=grid2(ista:iend,jsta:jend)
1118 IF (iget(217)>0)
THEN
1119 IF (lvls(lp,iget(217))>0)
THEN
1122 grid1(i,j)=q2sl(i,j)
1125 if(grib==
"grib2" )
then
1127 fld_info(cfld)%ifld=iavblfld(iget(217))
1128 fld_info(cfld)%lvl=lvlsxml(lp,iget(217))
1129 datapd(1:iend-ista+1,1:jend-jsta+1,cfld)=grid1(ista:iend,jsta:jend)
1136 IF (iget(211)>0)
THEN
1137 IF (lvls(lp,iget(211))>0)
THEN
1143 if(grib==
"grib2" )
then
1145 fld_info(cfld)%ifld=iavblfld(iget(211))
1146 fld_info(cfld)%lvl=lvlsxml(lp,iget(211))
1147 datapd(1:iend-ista+1,1:jend-jsta+1,cfld)=grid1(ista:iend,jsta:jend)
1154 IF (iget(212)>0)
THEN
1155 IF (lvls(lp,iget(212))>0)
THEN
1161 if(grib==
"grib2" )
then
1163 fld_info(cfld)%ifld=iavblfld(iget(212))
1164 fld_info(cfld)%lvl=lvlsxml(lp,iget(212))
1165 datapd(1:iend-ista+1,1:jend-jsta+1,cfld)=grid1(ista:iend,jsta:jend)
1171 IF (iget(213)>0)
THEN
1172 IF (lvls(lp,iget(213))>0)
THEN
1178 if(grib==
"grib2" )
then
1180 fld_info(cfld)%ifld=iavblfld(iget(213))
1181 fld_info(cfld)%lvl=lvlsxml(lp,iget(213))
1182 datapd(1:iend-ista+1,1:jend-jsta+1,cfld)=grid1(ista:iend,jsta:jend)
1188 IF (iget(214)>0)
THEN
1189 IF (lvls(lp,iget(214))>0)
THEN
1195 if(grib==
"grib2" )
then
1197 fld_info(cfld)%ifld=iavblfld(iget(214))
1198 fld_info(cfld)%lvl=lvlsxml(lp,iget(214))
1199 datapd(1:iend-ista+1,1:jend-jsta+1,cfld)=grid1(ista:iend,jsta:jend)
1205 IF (iget(255)>0)
THEN
1206 IF (lvls(lp,iget(255))>0)
THEN
1212 if(grib==
"grib2" )
then
1214 fld_info(cfld)%ifld=iavblfld(iget(255))
1215 fld_info(cfld)%lvl=lvlsxml(lp,iget(255))
1216 datapd(1:iend-ista+1,1:jend-jsta+1,cfld)=grid1(ista:iend,jsta:jend)
1222 IF (iget(215)>0)
THEN
1223 IF (lvls(lp,iget(215))>0)
THEN
1229 if(grib==
"grib2" )
then
1231 fld_info(cfld)%ifld=iavblfld(iget(215))
1232 fld_info(cfld)%lvl=lvlsxml(lp,iget(215))
1233 datapd(1:iend-ista+1,1:jend-jsta+1,cfld)=grid1(ista:iend,jsta:jend)
1239 IF (iget(222)>0)
THEN
1240 IF (lvls(lp,iget(222))>0)
THEN
1243 grid1(i,j)=cfrsig(i,j)
1246 if(grib==
"grib2" )
then
1248 fld_info(cfld)%ifld=iavblfld(iget(222))
1249 fld_info(cfld)%lvl=lvlsxml(lp,iget(222))
1250 datapd(1:iend-ista+1,1:jend-jsta+1,cfld)=grid1(ista:iend,jsta:jend)