27 use vrbls3d, only: t, u, uh, v, vh, wh, q, pmid, t, omga, pint, alpint, &
28 qqr, qqs, qqi, qqg, qqnw, qqni,qqnr, cwm, qqw, qqi, qqr, qqs, extcof55,&
29 f_ice, f_rain, f_rimef, q2, zint, zmid, ttnd, cfr, cfr_raw, qc_bl, ref_10cm, &
30 qqnwfa,qqnifa,taod5503d,aextc55
31 use vrbls2d, only: tmax, qrmax, htop, hbot, cuppt, fis, cfrach, cfracl, &
32 sr, cfrach, cfracm, wspd10max, w_up_max, w_dn_max, w_mean, refd_max, &
33 up_heli_max, up_heli_max16, grpl_max, up_heli, up_heli16, &
34 up_heli_min,up_heli_min16,up_heli_max02,up_heli_min02, &
35 up_heli_max03,up_heli_min03,rel_vort_max,rel_vort_max01, &
36 wspd10umax,wspd10vmax,refdm10c_max, &
37 hail_max2d,hail_maxk1,hail_maxhailcast,ltg1_max, &
38 ltg2_max, ltg3_max, nci_ltg, nca_ltg, nci_wq, nca_wq, nci_refd, &
39 u10, v10, th10, q10, tshltr, mrshltr, &
40 nca_refd, qv2m, qshltr, smstav, smstot, ssroff, bgroff, sfcevp, &
41 sfcexc, vegfrc, acsnow, cmc, sst, thz0, qz0, uz0, vz0, qs, qvg, &
42 z0, ustar, akhs, akms, radot, ths, acsnom, cuprec, ancprc, acprec, &
43 rainc_bucket, pcp_bucket, cprate, prec, snownc, snow_bucket, &
44 graup_bucket, swddni, swddif, mean_frp, acgraup, acfrain, &
45 graupelnc, albedo, rswin, rswout, swdnbc, swddnic, &
46 swddifc, swupbc, swupt, czen, czmean, rlwin, lwdnbc, lwupbc, &
47 rainnc_bucket, taod5502d, aerasy2d, aerssa2d, lwp, iwp, &
48 sigt4, rlwtoa, rswinc, aswin, aswout, alwin, alwout, alwtoa, aswtoa, &
49 tg, soiltb, twbs, qwbs,grnflx, sfcshx, sfclhx, subshx, snopcx, &
50 sfcuvx, potevp, ncfrcv, ncfrst, sno, si, pctsno, snonc, tsnow, &
51 ivgtyp, isltyp, islope, pblh, pblhgust, f, &
52 qvl1,refc_10cm,ref1km_10cm,ref4km_10cm, &
53 swradmean,u10mean,v10mean,spduv10mean,swnormmean,snfden,sndepac, &
54 hbotd,hbots,rainc_bucket1,rainnc_bucket1,pcp_bucket1,snow_bucket1, &
55 graup_bucket1, shdmin, shdmax, lai, htopd,htops
56 use soil, only: smc, sh2o, stc, sldpth, sllevel
57 use masks, only: lmv, lmh, vtm, sice, gdlat, gdlon, sm, dx, dy, htm
58 use ctlblk_mod
, only: jsta_2l, jend_2u, filename, datahandle, datestr, &
59 ihrst, imin, idat, sdat, ifhr, ifmin, imp_physics, jsta, jend, &
60 spval,gdsdegr, modelname, pt, icu_physics, jsta_m, jend_m, nsoil, &
61 isf_surface_physics, nsoil, ardlw, ardsw, asrfc, me, mpi_comm_comp, &
62 nphs, smflag, spl, lsm, dt, prec_acc_dt, dtq2, tsrfc, trdlw, &
63 trdsw, theat, tclod, tprec, nprec, alsl, im, jm, lm, grib, &
64 prec_acc_dt1, submodelname
65 use params_mod, only: capa, g, rd, d608, tfrz, ad05, cft0, stbol, &
66 p1000, pi, rtd, lheat, dtr, erad
67 use lookup_mod, only: thl, plq, ptbl, ttbl, rdq, rdth, rdp, rdthe, pl, &
68 qs0, sqs, sthe, the0, ttblq, rdpq, rdtheq, stheq, the0q
69 use gridspec_mod
, only: gridtype, dxval, latstart, latlast, lonstart, &
70 lonlast, dyval, cenlat, cenlon, maptype, truelat1, truelat2, &
84 character(len=31) :: varname
86 character startdate*19,sysdepinfo*80
94 INTEGER idate(8),jdate(8)
100 REAL dummy2 ( im, jm )
101 real,
allocatable:: msft(:,:)
102 INTEGER idummy ( im, jm )
103 REAL,
allocatable :: dum3d ( :, :, : )
105 real,
allocatable:: pvapor(:,:)
106 real,
allocatable:: pvapor_orig(:,:)
107 REAL,
ALLOCATABLE :: thv(:,:,:)
109 integer js,je,jev,iyear,imn,iday,itmp,ioutcount,istatus, &
110 ii,jj,ll,i,j,l,nrdlw,nrdsw,n,igdout,irtn,idyvald, &
111 idxvald,nsrfc , lflip, k, k1
112 real dz,tsph,tmp,qmean,pvapornew,dumcst,tlmh,rho,zsf,zpbltop
113 real t2,th2,x2m,p2m,tsk, fact, temp
116 integer jdn, numr, ic, jc, ierr
117 integer,
external :: iw3jdn
118 real sun_zenith,sun_azimuth, ptop_low, ptop_mid, ptop_high
119 real delta_theta4gust
125 ALLOCATE ( thv(im,jsta_2l:jend_2u,lm) )
126 ALLOCATE ( dum3d( im+1, jm+1, lm+1 ) )
127 WRITE(6,*)
'INITPOST: ENTER INITPOST'
144 do j = jsta_2l, jend_2u
155 do j = jsta_2l, jend_2u
167 call ext_ncd_ioinit(sysdepinfo,status)
168 print*,
'called ioinit', status
169 call ext_ncd_open_for_read( trim(filename), 0, 0,
" ", &
171 print*,
'called open for read', status
172 if ( status /= 0 )
then
173 print*,
'error opening ',filename,
' Status = ', status ; stop
177 print *,
'DateStr before calling ext_ncd_get_next_time=',datestr
179 print *,
'DateStri,Status,DataHandle = ',datestr,status,datahandle
184 IF (jend_2u==jm)
THEN
192 call ext_ncd_get_dom_ti_char(datahandle,
'SIMULATION_START_DATE', &
195 call ext_ncd_get_dom_ti_char(datahandle,
'START_DATE',startdate, &
198 print*,
'startdate= ',startdate
201 read(startdate,15)iyear,imn,iday,ihrst,imin
202 15
format(i4,1x,i2,1x,i2,1x,i2,1x,i2)
203 print*,
'start yr mo day hr min=',iyear,imn,iday,ihrst,imin
204 print*,
'processing yr mo day hr min=' &
205 ,idat(3),idat(1),idat(2),idat(4),idat(5)
221 CALL w3difdat(jdate,idate,0,rinc)
222 ifhr=nint(rinc(2)+rinc(1)*24.)
224 print*,
' in INITPOST ifhr ifmin fileName=',ifhr,ifmin,filename
231 call ext_ncd_get_dom_ti_integer(datahandle,
'MP_PHYSICS' &
232 ,itmp,1,ioutcount,istatus)
234 print*,
'MP_PHYSICS= ',itmp
237 if(imp_physics==5 .or. imp_physics==85 .or. imp_physics==95)
then
238 CALL microinit(imp_physics)
241 call ext_ncd_get_dom_ti_integer(datahandle,
'CU_PHYSICS' &
242 ,itmp,1,ioutcount,istatus)
244 print*,
'CU_PHYSICS= ',icu_physics
247 print*,
'im,jm,lm= ',im,jm,lm
253 call getvariable(filename,datestr,datahandle,varname,dum3d, &
254 im+1,1,jm+1,lm+1,im,js,je,lm)
256 do j = jsta_2l, jend_2u
258 t( i, j, l ) = dum3d( i, j, l ) + 300.
267 call getvariable(filename,datestr,datahandle,varname,dum3d, &
268 im+1,1,jm+1,lm+1,im+1,js,je,lm)
270 do j = jsta_2l, jend_2u
272 u( i, j, l ) = dum3d( i, j, l )
276 do j = jsta_2l, jend_2u
278 uh(i,j,l) = (dum3d(i,j,l)+dum3d(i+1,j,l))*0.5
284 call getvariable(filename,datestr,datahandle,varname,dum3d, &
285 im+1,1,jm+1,lm+1,im, js,jev,lm)
289 v( i, j, l ) = dum3d( i, j, l )
293 do j = jsta_2l, jend_2u
295 vh(i,j,l) = (dum3d(i,j,l)+dum3d(i,j+1,l))*0.5
302 call getvariable(filename,datestr,datahandle,varname,dum3d, &
303 im+1,1,jm+1,lm+1,im, js,je,lm+1)
315 wh(i,j,l) = (dum3d(i,j,l)+dum3d(i,j,l+1))*0.5
319 print*,
'finish reading W'
322 call getvariable(filename,datestr,datahandle,varname,dum3d, &
323 im+1,1,jm+1,lm+1,im,js,je,lm)
325 do j = jsta_2l, jend_2u
330 q( i, j, l ) = dum3d( i, j, l )/(1.0+dum3d( i, j, l ))
334 print*,
'finish reading mixing ratio'
343 call getvariable(filename,datestr,datahandle,varname,dum3d, &
344 im+1,1,jm+1,lm+1,im, js,je,lm)
349 do j = jsta_2l, jend_2u
352 pmid(i,j,l)=dum3d(i,j,l)
353 thv( i, j, l ) = t(i,j,l)*(q(i,j,l)*0.608+1.)
355 t( i, j, l ) = t(i,j,l)*(pmid(i,j,l)*1.e-5)**capa
357 if(abs(t( i, j, l ))>1.0e-3) &
358 omga(i,j,l) = -wh(i,j,l)*pmid(i,j,l)*g/ &
359 (rd*t(i,j,l)*(1.+d608*q(i,j,l)))
373 do j = jsta_2l, jend_2u
375 if((pmid(i,j,ll-1) - pmid(i,j,ll))>=0.)
then
376 write(*,*)
'non-monotonic PMID, i,j,ll ', i,j,ll
377 write(*,*)
'PMID: ll-1,ll,ll+1', pmid(i,j,ll-1) &
378 ,pmid(i,j,ll), pmid(i,j,ll+1)
380 pmid(i,j,ll)=0.5*(pmid(i,j,ll+1)+pmid(i,j,ll-1))
382 write(*,*)
'after adjustment-i,j,ll ', i,j,ll
383 write(*,*)
'PMID: ll-1,ll,ll+1', pmid(i,j,ll-1) &
384 ,pmid(i,j,ll), pmid(i,j,ll+1)
400 do j = jsta_2l, jend_2u
402 if((pmid(i,j,ll-1) - pmid(i,j,ll))>=0.)
then
403 write(*,*)
'non-monotonic PMID, i,j,ll ', i,j,ll
404 write(*,*)
'PMID: ll-2,ll-1,ll', pmid(i,j,ll-2) &
405 ,pmid(i,j,ll-1), pmid(i,j,ll)
407 pmid(i,j,ll)=pmid(i,j,ll-1) + &
408 fact*(pmid(i,j,ll-1)-pmid(i,j,ll-2))
410 write(*,*)
'after adjustment-i,j,ll ', i,j,ll
411 write(*,*)
'PMID: ll-2,ll-1,ll', pmid(i,j,ll-2) &
412 ,pmid(i,j,ll-1), pmid(i,j,ll)
422 pint(i,j,l)=(pmid(i,j,l-1)+pmid(i,j,l))*0.5
423 alpint(i,j,l)=alog(pint(i,j,l))
429 do j = jsta_2l, jend_2u
437 do j = jsta_2l, jend_2u
439 tmax(i,j)=max(tmax(i,j),t(i,j,lflip))
461 if(imp_physics/=5 .and. imp_physics/=0)
then
463 call getvariable(filename,datestr,datahandle,varname,dum3d, &
464 im+1,1,jm+1,lm+1,im, js,je,lm)
466 do j = jsta_2l, jend_2u
469 if(imp_physics==3)
then
470 if(t(i,j,l) >= tfrz)
then
471 qqw( i, j, l ) = dum3d( i, j, l )
473 qqi( i, j, l ) = dum3d( i, j, l )
476 qqw( i, j, l ) = dum3d( i, j, l )
488 if(imp_physics/=1 .and. imp_physics/=3 &
489 .and. imp_physics/=5 .and. imp_physics/=0)
then
491 call getvariable(filename,datestr,datahandle,varname,dum3d, &
492 im+1,1,jm+1,lm+1,im, js,je,lm)
494 do j = jsta_2l, jend_2u
496 qqi( i, j, l ) = dum3d( i, j, l )
505 if(imp_physics/=5 .and. imp_physics/=0)
then
507 call getvariable(filename,datestr,datahandle,varname,dum3d, &
508 im+1,1,jm+1,lm+1,im, js,je,lm)
510 do j = jsta_2l, jend_2u
513 if(imp_physics == 3)
then
514 if(t(i,j,l) >= tfrz)
then
515 qqr( i, j, l ) = dum3d( i, j, l )
517 qqs( i, j, l ) = dum3d( i, j, l )
520 qqr( i, j, l ) = dum3d( i, j, l )
522 dummy(i,j)=dum3d(i,j,l)
531 do j = jsta_2l, jend_2u
538 do j = jsta_2l, jend_2u
540 qrmax(i,j)=max(qrmax(i,j),qqr(i,j,l))
548 if(imp_physics/=1 .and. imp_physics/=3 .and. &
549 imp_physics/=5 .and. imp_physics/=0)
then
551 call getvariable(filename,datestr,datahandle,varname,dum3d, &
552 im+1,1,jm+1,lm+1,im, js,je,lm)
554 do j = jsta_2l, jend_2u
556 qqs( i, j, l ) = dum3d( i, j, l )
557 dummy(i,j)=dum3d(i,j,l)
565 if(imp_physics==2 .or. imp_physics==6 .or. &
566 imp_physics==8 .or. imp_physics==9 .or. imp_physics==28)
then
568 call getvariable(filename,datestr,datahandle,varname,dum3d, &
569 im+1,1,jm+1,lm+1,im, js,je,lm)
571 do j = jsta_2l, jend_2u
573 qqg( i, j, l ) = dum3d( i, j, l )
581 if(imp_physics==8 .or. imp_physics==9 .or.imp_physics==28)
then
583 call getvariable(filename,datestr,datahandle,varname,dum3d, &
584 im+1,1,jm+1,lm+1,im, js,je,lm)
586 do j = jsta_2l, jend_2u
588 qqni( i, j, l ) = dum3d( i, j, l )
589 if(i==im/2.and.j==(jsta+jend)/2)print*,
'sample QQNI= ', &
590 i,j,l,qqni( i, j, l )
595 call getvariable(filename,datestr,datahandle,varname,dum3d, &
596 im+1,1,jm+1,lm+1,im, js,je,lm)
598 do j = jsta_2l, jend_2u
600 qqnr( i, j, l ) = dum3d( i, j, l )
601 if(i==im/2.and.j==(jsta+jend)/2)print*,
'sample QQNR= ', &
602 i,j,l,qqnr( i, j, l )
609 if(imp_physics==28)
then
611 call getvariable(filename,datestr,datahandle,varname,dum3d, &
612 im+1,1,jm+1,lm+1,im, js,je,lm)
614 do j = jsta_2l, jend_2u
616 qqnw( i, j, l ) = dum3d( i, j, l )
617 if(i==im/2.and.j==(jsta+jend)/2)print*,
'sample QQNW= ', &
618 i,j,l,qqnw( i, j, l )
623 call getvariable(filename,datestr,datahandle,varname,dum3d, &
624 im+1,1,jm+1,lm+1,im, js,je,lm)
626 do j = jsta_2l, jend_2u
628 qqnwfa( i, j, l ) = dum3d( i, j, l )
629 if(i==im/2.and.j==(jsta+jend)/2)print*,
'sample QQNWFA= ', &
630 i,j,l,qqnwfa( i, j, l )
635 call getvariable(filename,datestr,datahandle,varname,dum3d, &
636 im+1,1,jm+1,lm+1,im, js,je,lm)
638 do j = jsta_2l, jend_2u
640 qqnifa( i, j, l ) = dum3d( i, j, l )
641 if(i==im/2.and.j==(jsta+jend)/2)print*,
'sample QQNIFA= ', &
642 i,j,l,qqnifa( i, j, l )
661 if(imp_physics/=5)
then
664 do j = jsta_2l, jend_2u
666 IF(qqr(i,j,l)<spval)
THEN
667 cwm(i,j,l)=qqr(i,j,l)
669 IF(qqi(i,j,l)<spval)
THEN
670 cwm(i,j,l)=cwm(i,j,l)+qqi(i,j,l)
672 IF(qqw(i,j,l)<spval)
THEN
673 cwm(i,j,l)=cwm(i,j,l)+qqw(i,j,l)
675 IF(qqs(i,j,l)<spval)
THEN
676 cwm(i,j,l)=cwm(i,j,l)+qqs(i,j,l)
678 IF(qqg(i,j,l)<spval)
THEN
679 cwm(i,j,l)=cwm(i,j,l)+qqg(i,j,l)
687 call getvariable(filename,datestr,datahandle,varname,dum3d, &
688 im+1,1,jm+1,lm+1,im, js,je,lm)
690 do j = jsta_2l, jend_2u
692 cwm( i, j, l ) = dum3d( i, j, l )
698 call getvariable(filename,datestr,datahandle,varname,dum3d, &
699 im+1,1,jm+1,lm+1,im, js,je,lm)
701 do j = jsta_2l, jend_2u
703 f_ice( i, j, l ) = dum3d( i, j, l )
709 call getvariable(filename,datestr,datahandle,varname,dum3d, &
710 im+1,1,jm+1,lm+1,im, js,je,lm)
712 do j = jsta_2l, jend_2u
714 f_rain( i, j, l ) = dum3d( i, j, l )
719 varname=
'F_RIMEF_PHY'
720 call getvariable(filename,datestr,datahandle,varname,dum3d, &
721 im+1,1,jm+1,lm+1,im, js,je,lm)
723 do j = jsta_2l, jend_2u
725 f_rimef( i, j, l ) = dum3d( i, j, l )
733 IF(icu_physics == 3 .or. icu_physics == 5) varname=
'CUTOP'
734 call getvariable(filename,datestr,datahandle,varname,dummy, &
735 im,1,jm,1,im,js,je,1)
736 do j = jsta_2l, jend_2u
738 htop( i, j ) = float(lm)-dummy(i,j)+1.0
742 IF(icu_physics == 3 .or. icu_physics == 5) varname=
'CUBOT'
743 call getvariable(filename,datestr,datahandle,varname,dummy, &
744 im,1,jm,1,im,js,je,1)
745 do j = jsta_2l, jend_2u
747 hbot( i, j ) = float(lm)-dummy(i,j)+1.0
752 call getvariable(filename,datestr,datahandle,varname,dummy, &
753 im,1,jm,1,im,js,je,1)
754 do j = jsta_2l, jend_2u
756 cuppt( i, j ) = dummy( i, j )
761 IF(modelname ==
'RAPR')
THEN
762 call getvariable(filename,datestr,datahandle,
'QKE',dum3d, &
763 im+1,1,jm+1,lm+1,im,js,je,lm)
765 do j = jsta_2l, jend_2u
767 q2( i, j, l ) = dum3d( i, j, l ) / 2.0
772 call getvariable(filename,datestr,datahandle,
'TKE',dum3d, &
773 im+1,1,jm+1,lm+1,im,js,je,lm)
775 do j = jsta_2l, jend_2u
777 q2( i, j, l ) = dum3d( i, j, l )
788 call getvariable(filename,datestr,datahandle,varname,dummy, &
789 im,1,jm,1,im,js,je,1)
791 call getvariable(filename,datestr,datahandle,varname,dummy2, &
792 im,1,jm,1,im,js,je,1)
794 call getvariable(filename,datestr,datahandle,varname,pt, &
799 pint(i,j,lm+1) = dummy(i,j)+dummy2(i,j)+pt
801 alpint(i,j,lm+1)=alog(pint(i,j,lm+1))
802 alpint(i,j,1)=alog(pint(i,j,1))
808 call getvariable(filename,datestr,datahandle,varname,dummy, &
809 im,1,jm,1,im,js,je,1)
810 do j = jsta_2l, jend_2u
812 fis( i, j ) = dummy( i, j ) * g
817 call getvariable(filename,datestr,datahandle,varname,dum3d, &
818 im+1,1,jm+1,lm+1,im,js,je,lm+1)
822 zint(i,j,l)=dum3d(i,j,l)
827 call getvariable(filename,datestr,datahandle,varname,dum3d, &
828 im+1,1,jm+1,lm+1,im,js,je,lm+1)
830 print*,
'finish reading geopotential'
835 zint(i,j,l)=(zint(i,j,l)+dum3d(i,j,l))/g
840 IF(modelname ==
'RAPR')
THEN
843 call getvariable(filename,datestr,datahandle,varname,dummy, &
844 im,1,jm,1,im,js,je,1)
848 if((pint(i,j,lm) - dummy(i,j))>=0.)
then
849 write(*,*)
'non-monotonic PINT, i,j,lm ', i,j,lm
850 write(*,*)
'PINT: lm,lm+1, PMID: lm', pint(i,j,lm),dummy(i,j), pmid(i,j,lm)
851 dummy(i,j)=pmid(i,j,lm)*1.001
852 write(*,*)
'after adjustment-i,j,lm+1 ', i,j,lm+1,dummy(i,j)
854 pint(i,j,lm+1)=dummy(i,j)
855 alpint(i,j,lm+1)=alog(pint(i,j,lm+1))
863 allocate(pvapor(im,jsta_2l:jend_2u))
864 allocate(pvapor_orig(im,jsta_2l:jend_2u))
871 dz=zint(i,j,l)-zint(i,j,l+1)
872 rho=pmid(i,j,l)/(rd*t(i,j,l))
876 qmean=0.5*(q(i,j,l)+q(i,j,l+1))
882 pvapor(i,j)=pvapor(i,j)+g*rho*dz*qmean
889 pvapor_orig(i,j)=pvapor(i,j)
896 call exch(pvapor(1,jsta_2l))
900 pvapornew=ad05*(4.*(pvapor(i-1,j)+pvapor(i+1,j) &
901 +pvapor(i,j-1)+pvapor(i,j+1)) &
902 +pvapor(i-1,j-1)+pvapor(i+1,j-1) &
903 +pvapor(i-1,j+1)+pvapor(i+1,j+1)) &
906 pvapor(i,j)=pvapornew
916 pvapor(i,j)=pvapor_orig(i,j)+(pvapor(i,j+1)-pvapor_orig(i,j+1))
925 pvapor(i,j)=pvapor_orig(i,j)+(pvapor(i,j-1)-pvapor_orig(i,j-1))
932 pvapor(i,j)=pvapor_orig(i,j)+(pvapor(i+1,j)-pvapor_orig(i+1,j))
938 pvapor(i,j)=pvapor_orig(i,j)+(pvapor(i-1,j)-pvapor_orig(i-1,j))
943 pint(i,j,lm+1)=pint(i,j,lm+1)+pvapor(i,j)
946 if((pint(i,j,lm) - pint(i,j,lm+1))>=0. )
then
947 write(*,*)
'non-monotonic PINT, i,j,lm ', i,j,lm
948 write(*,*)
'PINT: lm,lm+1, PMID: lm', pint(i,j,lm), pint(i,j,lm+1), pmid(i,j,lm)
949 pint(i,j,lm+1) = pint(i,j,lm)*1.001
950 write(*,*)
'after adjustment-i,j,lm+1 PINT ', i,j,lm+1, pint(i,j,lm+1)
952 alpint(i,j,lm+1)=alog(pint(i,j,lm+1))
957 deallocate(pvapor_orig)
962 IF(modelname ==
'RAPR')
THEN
966 zint(i,j,lm+1)=fis(i,j)/g
968 if(i==im/2.and.j==(jsta+jend)/2) &
969 print*,
'i,j,L,ZINT from unipost= ',i,j,lm+1,zint(i,j,lm+1) &
970 , alpint(i,j,lm+1),alpint(i,j,lm)
976 dummy2(i,j)=htm(i,j,l)*t(i,j,l)*(q(i,j,l)*d608+1.0)*rd* &
977 (alpint(i,j,l+1)-alpint(i,j,l))+dummy(i,j)
979 dum3d(i,j,l)=zint(i,j,l)-dummy2(i,j)/g
981 zint(i,j,l)=dummy2(i,j)/g
982 if(i==im/2.and.j==(jsta+jend)/2) &
983 print*,
'i,j,L,ZINT from unipost= ',i,j,l,zint(i,j,l)
984 dummy(i,j)=dummy2(i,j)
991 if(i==im/2.and.j==(jsta+jend)/2)
then
992 print*,
'DIFF heights model-unipost= ', &
999 print*,
'finish deriving geopotential in ARW'
1004 IF(modelname ==
'RAPR')
THEN
1009 fact=(alog(pmid(i,j,l))-alpint(i,j,l))/ &
1010 max(1.e-6,(alpint(i,j,l+1)-alpint(i,j,l)))
1011 zmid(i,j,l)=zint(i,j,l)+(zint(i,j,l+1)-zint(i,j,l))*fact
1012 dummy(i,j)=zmid(i,j,l)
1013 if((alpint(i,j,l+1)-alpint(i,j,l)) < 1.e-6) print*, &
1014 'P(K+1) and P(K) are too close, i,j,L,', &
1015 'ALPINT(I,J,L+1),ALPINT(I,J,L),ZMID = ', &
1016 i,j,l,alpint(i,j,l+1),alpint(i,j,l),zmid(i,j,l)
1019 print*,
'max/min ZMID= ',l,maxval(dummy),minval(dummy)
1025 zint(i,j,l+1) =amin1(zint(i,j,l)-2.,zint(i,j,l+1))
1026 zmid(i,j,l)=(zint(i,j,l+1)+zint(i,j,l))*0.5
1028 dummy(i,j)=zmid(i,j,lm)
1031 print*,
'max/min ZMID= ',lm,maxval(zmid(1:im,js:je,lm)), &
1032 minval(zmid(1:im,js:je,lm))
1038 zmid(i,j,l)=(zint(i,j,l+1)+zint(i,j,l))*0.5
1051 if(imp_physics==28)
then
1052 varname=
'AOD3D_SMOKE'
1053 call getvariable(filename,datestr,datahandle,varname,dum3d, &
1054 im+1,1,jm+1,lm+1,im, js,je,lm)
1056 do j = jsta_2l, jend_2u
1058 taod5503d( i, j, l ) = dum3d( i, j, l )
1059 dz = zint( i, j, l ) - zint( i, j, l+1 )
1060 aextc55( i, j, l ) = taod5503d( i, j, l ) / dz
1061 if(i==im/2.and.j==(jsta+jend)/2)print*,
'sample TAOD5503D= ', &
1062 i,j,l,taod5503d( i, j, l )
1063 if(i==im/2.and.j==(jsta+jend)/2)print*,
'sample dz= ', &
1065 if(i==im/2.and.j==(jsta+jend)/2)print*,
'sample AEXTC55= ', &
1066 i,j,l,aextc55( i, j, l )
1074 call getvariable(filename,datestr,datahandle,varname,dum3d, &
1075 im+1,1,jm+1,lm+1,im,js,je,nsoil)
1077 do j = jsta_2l, jend_2u
1083 smc( i, j, l ) = dum3d( i, j, nsoil-l+1)
1089 call getvariable(filename,datestr,datahandle,varname,dum3d, &
1090 im+1,1,jm+1,lm+1,im,js,je,nsoil)
1092 do j = jsta_2l, jend_2u
1094 sh2o( i, j, l ) = dum3d( i, j, nsoil-l+1)
1100 call getvariable(filename,datestr,datahandle,varname,dummy, &
1101 im,1,jm,1,im,js,je,1)
1103 do j = jsta_2l, jend_2u
1105 sice( i, j ) = dummy( i, j )
1110 call getvariable(filename,datestr,datahandle,varname,dum3d, &
1111 im+1,1,jm+1,lm+1,im,js,je,nsoil)
1113 do j = jsta_2l, jend_2u
1116 stc( i, j, l ) = dum3d( i, j, nsoil-l+1)
1122 do j = jsta_2l, jend_2u
1124 cfrach( i, j ) = spval/100.
1125 cfracl( i, j ) = spval/100.
1126 cfracm( i, j ) = spval/100.
1131 do j = jsta_2l, jend_2u
1133 cfr( i, j, l ) = spval
1139 call getvariable(filename,datestr,datahandle,varname,dummy, &
1140 im,1,jm,1,im,js,je,1)
1141 do j = jsta_2l, jend_2u
1143 sr( i, j ) = dummy( i, j )
1148 IF(modelname ==
'RAPR')
THEN
1150 call getvariable(filename,datestr,datahandle,varname,dum3d, &
1151 im+1,1,jm+1,lm+1,im,js,je,lm)
1153 do j = jsta_2l, jend_2u
1155 cfr( i, j, l ) = dum3d( i, j, l )
1161 call getvariable(filename,datestr,datahandle,varname,dum3d, &
1162 im+1,1,jm+1,lm+1,im,js,je,lm)
1164 do j = jsta_2l, jend_2u
1166 cfr( i, j, l ) = dum3d( i, j, l )
1173 call getvariable(filename,datestr,datahandle,varname,dum3d, &
1174 im+1,1,jm+1,lm+1,im,js,je,lm)
1178 do j = jsta_2l, jend_2u
1180 qc_bl( i, j, l ) = dum3d( i, j, l )
1185 call ext_ncd_get_dom_ti_real(datahandle,
'DX',tmp, &
1186 1,ioutcount,istatus)
1188 write(6,*)
'dxval= ', dxval
1190 IF(modelname ==
'NCAR' .OR. modelname ==
'RAPR')
THEN
1191 if(imp_physics/=5 .and. imp_physics/=0)
then
1193 IF(modelname ==
'RAPR')
THEN
1200 do j = jsta_2l, jend_2u
1207 if (pmid(i,j,k) >= ptop_low)
then
1208 cfracl(i,j)=max(cfracl(i,j),cfr(i,j,k))
1209 elseif (pmid(i,j,k) < ptop_low .and. pmid(i,j,k) >= ptop_mid)
then
1210 cfracm(i,j)=max(cfracm(i,j),cfr(i,j,k))
1211 elseif (pmid(i,j,k) < ptop_mid .and. pmid(i,j,k) >= ptop_high)
then
1212 cfrach(i,j)=max(cfrach(i,j),cfr(i,j,k))
1227 call getvariable(filename,datestr,datahandle,varname,dum3d, &
1228 im+1,1,jm+1,lm+1,im,js,je,lm)
1230 do j = jsta_2l, jend_2u
1232 smoke( i, j, l, 1) = dum3d( i, j, l )
1253 call getvariable(filename,datestr,datahandle,varname,dum3d, &
1254 im+1,1,jm+1,lm+1,im,js,je,lm)
1258 do j = jsta_2l, jend_2u
1261 dust( i, j, l, 1) = dum3d( i, j, l )
1267 call getvariable(filename,datestr,datahandle,varname,dum3d, &
1268 im+1,1,jm+1,lm+1,im,js,je,lm)
1272 do j = jsta_2l, jend_2u
1275 dust( i, j, l, 2) = dum3d( i, j, l )
1281 call getvariable(filename,datestr,datahandle,varname,dum3d, &
1282 im+1,1,jm+1,lm+1,im,js,je,lm)
1286 do j = jsta_2l, jend_2u
1289 dust( i, j, l, 3) = dum3d( i, j, l )
1295 call getvariable(filename,datestr,datahandle,varname,dum3d, &
1296 im+1,1,jm+1,lm+1,im,js,je,lm)
1300 do j = jsta_2l, jend_2u
1303 dust( i, j, l, 4) = dum3d( i, j, l )
1309 call getvariable(filename,datestr,datahandle,varname,dum3d, &
1310 im+1,1,jm+1,lm+1,im,js,je,lm)
1314 do j = jsta_2l, jend_2u
1317 dust( i, j, l, 5) = dum3d( i, j, l )
1324 call getvariable(filename,datestr,datahandle,varname,dum3d,&
1325 im+1,1,jm+1,lm+1,im,js,je,lm)
1329 do j = jsta_2l, jend_2u
1331 dust( i, j, l, 6) = dum3d( i, j, l )
1336 call getvariable(filename,datestr,datahandle,varname,dum3d,&
1337 im+1,1,jm+1,lm+1,im,js,je,lm)
1341 do j = jsta_2l, jend_2u
1343 dust( i, j, l, 7) = dum3d( i, j, l )
1349 call getvariable(filename,datestr,datahandle,varname,dum3d,&
1350 im+1,1,jm+1,lm+1,im,js,je,lm)
1354 do j = jsta_2l, jend_2u
1356 dust( i, j, l, 8) = dum3d( i, j, l )
1369 IF(isf_surface_physics==3)
then
1370 call getvariable(filename,datestr,datahandle,
'ZS',sllevel, &
1371 nsoil,1,1,1,nsoil,1,1,1)
1372 print*,
'SLLEVEL= ',(sllevel(n),n=1,nsoil)
1374 call getvariable(filename,datestr,datahandle,
'DZS',sldpth, &
1375 nsoil,1,1,1,nsoil,1,1,1)
1376 print*,
'SLDPTH= ',(sldpth(n),n=1,nsoil)
1383 call getvariable(filename,datestr,datahandle,varname,dummy, &
1384 im,1,jm,1,im,js,je,1)
1385 do j = jsta_2l, jend_2u
1387 wspd10max( i, j ) = dummy( i, j )
1392 varname=
'WSPD10UMAX'
1393 call getvariable(filename,datestr,datahandle,varname,dummy, &
1394 im,1,jm,1,im,js,je,1)
1395 do j = jsta_2l, jend_2u
1397 wspd10umax( i, j ) = dummy( i, j )
1402 varname=
'WSPD10VMAX'
1403 call getvariable(filename,datestr,datahandle,varname,dummy, &
1404 im,1,jm,1,im,js,je,1)
1405 do j = jsta_2l, jend_2u
1407 wspd10vmax( i, j ) = dummy( i, j )
1413 call getvariable(filename,datestr,datahandle,varname,dummy, &
1414 im,1,jm,1,im,js,je,1)
1415 do j = jsta_2l, jend_2u
1417 w_up_max( i, j ) = dummy( i, j )
1424 call getvariable(filename,datestr,datahandle,varname,dummy, &
1425 im,1,jm,1,im,js,je,1)
1426 do j = jsta_2l, jend_2u
1428 w_dn_max( i, j ) = dummy( i, j )
1434 call getvariable(filename,datestr,datahandle,varname,dummy, &
1435 im,1,jm,1,im,js,je,1)
1436 do j = jsta_2l, jend_2u
1438 w_mean( i, j ) = dummy( i, j )
1444 call getvariable(filename,datestr,datahandle,varname,dummy, &
1445 im,1,jm,1,im,js,je,1)
1446 do j = jsta_2l, jend_2u
1448 refd_max( i, j ) = dummy( i, j )
1453 varname=
'REFDM10C_MAX'
1454 call getvariable(filename,datestr,datahandle,varname,dummy, &
1455 im,1,jm,1,im,js,je,1)
1456 do j = jsta_2l, jend_2u
1458 refdm10c_max( i, j ) = dummy( i, j )
1464 varname=
'UP_HELI_MAX'
1465 call getvariable(filename,datestr,datahandle,varname,dummy, &
1466 im,1,jm,1,im,js,je,1)
1467 do j = jsta_2l, jend_2u
1469 up_heli_max( i, j ) = dummy( i, j )
1474 varname=
'UP_HELI_MAX16'
1475 call getvariable(filename,datestr,datahandle,varname,dummy, &
1476 im,1,jm,1,im,js,je,1)
1477 do j = jsta_2l, jend_2u
1479 up_heli_max16( i, j ) = dummy( i, j )
1484 varname=
'UP_HELI_MIN'
1485 call getvariable(filename,datestr,datahandle,varname,dummy, &
1486 im,1,jm,1,im,js,je,1)
1487 do j = jsta_2l, jend_2u
1489 up_heli_min( i, j ) = dummy( i, j )
1494 varname=
'UP_HELI_MIN16'
1495 call getvariable(filename,datestr,datahandle,varname,dummy, &
1496 im,1,jm,1,im,js,je,1)
1497 do j = jsta_2l, jend_2u
1499 up_heli_min16( i, j ) = dummy( i, j )
1504 varname=
'UP_HELI_MAX02'
1505 call getvariable(filename,datestr,datahandle,varname,dummy, &
1506 im,1,jm,1,im,js,je,1)
1507 do j = jsta_2l, jend_2u
1509 up_heli_max02( i, j ) = dummy( i, j )
1514 varname=
'UP_HELI_MIN02'
1515 call getvariable(filename,datestr,datahandle,varname,dummy, &
1516 im,1,jm,1,im,js,je,1)
1517 do j = jsta_2l, jend_2u
1519 up_heli_min02( i, j ) = dummy( i, j )
1524 varname=
'UP_HELI_MAX03'
1525 call getvariable(filename,datestr,datahandle,varname,dummy, &
1526 im,1,jm,1,im,js,je,1)
1527 do j = jsta_2l, jend_2u
1529 up_heli_max03( i, j ) = dummy( i, j )
1534 varname=
'UP_HELI_MIN03'
1535 call getvariable(filename,datestr,datahandle,varname,dummy, &
1536 im,1,jm,1,im,js,je,1)
1537 do j = jsta_2l, jend_2u
1539 up_heli_min03( i, j ) = dummy( i, j )
1544 varname=
'REL_VORT_MAX'
1545 call getvariable(filename,datestr,datahandle,varname,dummy, &
1546 im,1,jm,1,im,js,je,1)
1547 do j = jsta_2l, jend_2u
1549 rel_vort_max( i, j ) = dummy( i, j )
1554 varname=
'REL_VORT_MAX01'
1555 call getvariable(filename,datestr,datahandle,varname,dummy, &
1556 im,1,jm,1,im,js,je,1)
1557 do j = jsta_2l, jend_2u
1559 rel_vort_max01( i, j ) = dummy( i, j )
1565 call getvariable(filename,datestr,datahandle,varname,dummy, &
1566 im,1,jm,1,im,js,je,1)
1567 do j = jsta_2l, jend_2u
1569 grpl_max( i, j ) = dummy( i, j )
1575 varname=
'HAIL_MAXK1'
1576 call getvariable(filename,datestr,datahandle,varname,dummy, &
1577 im,1,jm,1,im,js,je,1)
1578 do j = jsta_2l, jend_2u
1580 hail_maxk1( i, j ) = dummy( i, j )
1585 varname=
'HAIL_MAX2D'
1586 call getvariable(filename,datestr,datahandle,varname,dummy, &
1587 im,1,jm,1,im,js,je,1)
1588 do j = jsta_2l, jend_2u
1590 hail_max2d( i, j ) = dummy( i, j )
1595 varname=
'HAILCAST_DIAM_MAX'
1596 call getvariable(filename,datestr,datahandle,varname,dummy, &
1597 im,1,jm,1,im,js,je,1)
1598 do j = jsta_2l, jend_2u
1600 hail_maxhailcast( i, j ) = dummy( i, j )
1606 call getvariable(filename,datestr,datahandle,varname,dummy, &
1607 im,1,jm,1,im,js,je,1)
1608 do j = jsta_2l, jend_2u
1610 up_heli( i, j ) = dummy( i, j )
1616 call getvariable(filename,datestr,datahandle,varname,dummy, &
1617 im,1,jm,1,im,js,je,1)
1618 do j = jsta_2l, jend_2u
1620 up_heli16( i, j ) = dummy( i, j )
1626 call getvariable(filename,datestr,datahandle,varname,dummy, &
1627 im,1,jm,1,im,js,je,1)
1628 do j = jsta_2l, jend_2u
1630 ltg1_max( i, j ) = dummy( i, j )
1636 call getvariable(filename,datestr,datahandle,varname,dummy, &
1637 im,1,jm,1,im,js,je,1)
1638 do j = jsta_2l, jend_2u
1640 ltg2_max( i, j ) = dummy( i, j )
1646 call getvariable(filename,datestr,datahandle,varname,dummy, &
1647 im,1,jm,1,im,js,je,1)
1648 do j = jsta_2l, jend_2u
1650 ltg3_max( i, j ) = dummy( i, j )
1656 call getvariable(filename,datestr,datahandle,varname,dummy, &
1657 im,1,jm,1,im,js,je,1)
1658 do j = jsta_2l, jend_2u
1660 nci_ltg( i, j ) = dummy( i, j )
1666 call getvariable(filename,datestr,datahandle,varname,dummy, &
1667 im,1,jm,1,im,js,je,1)
1668 do j = jsta_2l, jend_2u
1670 nca_ltg( i, j ) = dummy( i, j )
1676 call getvariable(filename,datestr,datahandle,varname,dummy, &
1677 im,1,jm,1,im,js,je,1)
1678 do j = jsta_2l, jend_2u
1680 nci_wq( i, j ) = dummy( i, j )
1686 call getvariable(filename,datestr,datahandle,varname,dummy, &
1687 im,1,jm,1,im,js,je,1)
1688 do j = jsta_2l, jend_2u
1690 nca_wq( i, j ) = dummy( i, j )
1696 call getvariable(filename,datestr,datahandle,varname,dummy, &
1697 im,1,jm,1,im,js,je,1)
1698 do j = jsta_2l, jend_2u
1700 nci_refd( i, j ) = dummy( i, j )
1706 call getvariable(filename,datestr,datahandle,varname,dummy, &
1707 im,1,jm,1,im,js,je,1)
1708 do j = jsta_2l, jend_2u
1710 nca_refd( i, j ) = dummy( i, j )
1719 call getvariable(filename,datestr,datahandle,varname,dum3d,&
1720 im+1,1,jm+1,lm+1,im,js,je,lm)
1722 do j = jsta_2l, jend_2u
1724 ref_10cm( i, j, l) = dum3d( i, j, l )
1730 varname=
'COMPOSITE_REFL_10CM'
1731 call getvariable(filename,datestr,datahandle,varname,dummy, &
1732 im,1,jm,1,im,js,je,1)
1733 do j = jsta_2l, jend_2u
1735 refc_10cm( i, j ) = dummy( i, j )
1739 varname=
'REFL_10CM_1KM'
1740 call getvariable(filename,datestr,datahandle,varname,dummy, &
1741 im,1,jm,1,im,js,je,1)
1742 do j = jsta_2l, jend_2u
1744 ref1km_10cm( i, j ) = dummy( i, j )
1748 varname=
'REFL_10CM_4KM'
1749 call getvariable(filename,datestr,datahandle,varname,dummy, &
1750 im,1,jm,1,im,js,je,1)
1751 do j = jsta_2l, jend_2u
1753 ref4km_10cm( i, j ) = dummy( i, j )
1760 call getvariable(filename,datestr,datahandle,varname,dummy, &
1761 im,1,jm,1,im,js,je,1)
1762 do j = jsta_2l, jend_2u
1764 IF(submodelname ==
'RTMA' .and. modelname ==
'RAPR')
THEN
1765 u10( i, j ) = uh( i, j, lm )
1767 u10( i, j ) = dummy( i, j )
1772 call getvariable(filename,datestr,datahandle,varname,dummy, &
1773 im,1,jm,1,im,js,je,1)
1774 do j = jsta_2l, jend_2u
1776 IF( submodelname ==
'RTMA' .and. modelname ==
'RAPR')then
1777 v10( i, j ) = vh( i, j, lm )
1779 v10( i, j ) = dummy( i, j )
1787 call getvariable(filename,datestr,datahandle,varname,dummy, &
1788 im,1,jm,1,im,js,je,1)
1789 do j = jsta_2l, jend_2u
1791 u10mean( i, j ) = dummy( i, j )
1797 call getvariable(filename,datestr,datahandle,varname,dummy, &
1798 im,1,jm,1,im,js,je,1)
1799 do j = jsta_2l, jend_2u
1801 v10mean( i, j ) = dummy( i, j )
1806 varname=
'SPDUV10MEAN'
1807 call getvariable(filename,datestr,datahandle,varname,dummy, &
1808 im,1,jm,1,im,js,je,1)
1809 do j = jsta_2l, jend_2u
1811 spduv10mean( i, j ) = dummy( i, j )
1817 do j = jsta_2l, jend_2u
1819 th10( i, j ) = spval
1826 call getvariable(filename,datestr,datahandle,varname,dummy, &
1827 im,1,jm,1,im,js,je,1)
1828 do j = jsta_2l, jend_2u
1830 tshltr( i, j ) = dummy( i, j )
1836 call getvariable(filename,datestr,datahandle,varname,dummy, &
1837 im,1,jm,1,im,js,je,1)
1838 do j = jsta_2l, jend_2u
1840 mrshltr( i, j ) = dummy(i, j )
1841 IF(modelname ==
'RAPR')
THEN
1846 qv2m( i, j ) = dummy( i, j )
1847 qshltr( i, j ) = dummy( i, j )/(1.0+dummy( i, j ))
1848 qvl1( i, j ) = q( i, j, lm )
1852 qv2m( i, j ) = dummy( i, j )
1853 qshltr( i, j ) = dummy( i, j )/(1.0+dummy( i, j ))
1859 IF(modelname ==
'RAPR')
THEN
1865 call getvariable(filename,datestr,datahandle,varname,dummy, &
1866 im,1,jm,1,im,js,je,1)
1867 do j = jsta_2l, jend_2u
1869 smstav( i, j ) = dummy( i, j )
1884 call getvariable(filename,datestr,datahandle,varname,dummy, &
1885 im,1,jm,1,im,js,je,1)
1886 do j = jsta_2l, jend_2u
1888 ssroff( i, j ) = dummy( i, j )
1892 call getvariable(filename,datestr,datahandle,varname,dummy, &
1893 im,1,jm,1,im,js,je,1)
1894 do j = jsta_2l, jend_2u
1896 bgroff( i, j ) = dummy( i, j )
1920 call getvariable(filename,datestr,datahandle,varname,dummy, &
1921 im,1,jm,1,im,js,je,1)
1922 do j = jsta_2l, jend_2u
1924 vegfrc( i, j ) = dummy( i, j )/100.
1927 print*,
'VEGFRC at ',ii,jj,
' = ',vegfrc(ii,jj)
1930 call getvariable(filename,datestr,datahandle,varname,dummy, &
1931 im,1,jm,1,im,js,je,1)
1932 do j = jsta_2l, jend_2u
1934 shdmin( i, j ) = dummy( i, j )/100.
1937 print*,
'SHDMIN at ',ii,jj,
' = ',shdmin(ii,jj)
1940 call getvariable(filename,datestr,datahandle,varname,dummy, &
1941 im,1,jm,1,im,js,je,1)
1942 do j = jsta_2l, jend_2u
1944 shdmax( i, j ) = dummy( i, j )/100.
1947 print*,
'SHDMAX at ',ii,jj,
' = ',shdmax(ii,jj)
1950 call getvariable(filename,datestr,datahandle,varname,dummy, &
1951 im,1,jm,1,im,js,je,1)
1952 do j = jsta_2l, jend_2u
1954 lai( i, j ) = dummy( i, j )
1957 print*,
'LAI at ',ii,jj,
' = ',lai(ii,jj)
1960 call getvariable(filename,datestr,datahandle,varname,dummy, &
1961 im,1,jm,1,im,js,je,1)
1962 do j = jsta_2l, jend_2u
1964 acsnow( i, j ) = dummy( i, j )
1967 print*,
'maxval ACSNOW: ', maxval(acsnow)
1969 call getvariable(filename,datestr,datahandle,varname,dummy, &
1970 im,1,jm,1,im,js,je,1)
1971 do j = jsta_2l, jend_2u
1973 acsnom( i, j ) = dummy( i, j )
1977 call getvariable(filename,datestr,datahandle,varname,dummy, &
1978 im,1,jm,1,im,js,je,1)
1979 do j = jsta_2l, jend_2u
1981 cmc( i, j ) = dummy( i, j )
1985 call getvariable(filename,datestr,datahandle,varname,dummy, &
1986 im,1,jm,1,im,js,je,1)
1987 do j = jsta_2l, jend_2u
1989 sst( i, j ) = dummy( i, j )
1994 call getvariable(filename,datestr,datahandle,varname,dummy, &
1995 im,1,jm,1,im,js,je,1)
1996 do j = jsta_2l, jend_2u
1998 thz0( i, j ) = dummy( i, j )
2040 IF(modelname ==
'RAPR')
THEN
2042 call getvariable(filename,datestr,datahandle,varname,dummy, &
2043 im,1,jm,1,im,js,je,1)
2044 do j = jsta_2l, jend_2u
2046 z0( i, j ) = dummy( i, j )
2051 call getvariable(filename,datestr,datahandle,varname,dummy, &
2052 im,1,jm,1,im,js,je,1)
2053 do j = jsta_2l, jend_2u
2055 z0( i, j ) = dummy( i, j )
2062 call getvariable(filename,datestr,datahandle,varname,dummy, &
2063 im,1,jm,1,im,js,je,1)
2064 do j = jsta_2l, jend_2u
2066 ustar( i, j ) = dummy( i, j )
2097 call getvariable(filename,datestr,datahandle,varname,dummy, &
2098 im,1,jm,1,im,js,je,1)
2099 do j = jsta_2l, jend_2u
2104 radot( i, j ) = dummy(i,j)**4.0/stbol
2105 ths( i, j ) = dummy( i, j ) &
2106 *(p1000/pint(i,j,nint(lmh(i,j))+1))**capa
2112 IF(modelname ==
'RAPR')
THEN
2114 call getvariable(filename,datestr,datahandle,varname,dummy, &
2115 im,1,jm,1,im,js,je,1)
2116 do j = jsta_2l, jend_2u
2118 radot( i, j ) = radot(i, j) * dummy( i, j )
2129 write(6,*)
'getting RAINC'
2131 call getvariable(filename,datestr,datahandle,varname,dummy, &
2132 im,1,jm,1,im,js,je,1)
2133 do j = jsta_2l, jend_2u
2135 cuprec( i, j ) = dummy( i, j ) * 0.001
2139 write(6,*)
'getting RAINNC'
2141 call getvariable(filename,datestr,datahandle,varname,dummy, &
2142 im,1,jm,1,im,js,je,1)
2143 do j = jsta_2l, jend_2u
2145 ancprc( i, j ) = dummy( i, j )* 0.001
2149 write(6,*)
'past getting RAINNC'
2151 do j = jsta_2l, jend_2u
2153 acprec(i,j)=ancprc(i,j)+cuprec(i,j)
2159 write(6,*)
'getting PREC_ACC_C, [mm] '
2161 varname=
'PREC_ACC_C'
2162 call getvariable(filename,datestr,datahandle,varname,dummy, &
2163 im,1,jm,1,im,js,je,1)
2164 do j = jsta_2l, jend_2u
2166 rainc_bucket( i, j ) = dummy( i, j )
2172 write(6,*)
'getting PREC_ACC_C1, [mm] '
2173 varname=
'PREC_ACC_C1'
2174 call getvariable(filename,datestr,datahandle,varname,dummy, &
2175 im,1,jm,1,im,js,je,1)
2176 do j = jsta_2l, jend_2u
2178 rainc_bucket1( i, j ) = dummy( i, j )
2184 write(6,*)
'getting PREC_ACC_NC, [mm]'
2186 varname=
'PREC_ACC_NC'
2187 call getvariable(filename,datestr,datahandle,varname,dummy, &
2188 im,1,jm,1,im,js,je,1)
2189 do j = jsta_2l, jend_2u
2191 rainnc_bucket( i, j ) = dummy( i, j )
2197 write(6,*)
'getting PREC_ACC_NC1, [mm]'
2198 varname=
'PREC_ACC_NC1'
2199 call getvariable(filename,datestr,datahandle,varname,dummy, &
2200 im,1,jm,1,im,js,je,1)
2201 do j = jsta_2l, jend_2u
2203 rainnc_bucket1( i, j ) = dummy( i, j )
2207 do j = jsta_2l, jend_2u
2209 pcp_bucket(i,j)=rainc_bucket(i,j)+rainnc_bucket(i,j)
2210 pcp_bucket1(i,j)=rainc_bucket1(i,j)+rainnc_bucket1(i,j)
2216 call getvariable(filename,datestr,datahandle,varname,dummy, &
2217 im,1,jm,1,im,js,je,1)
2218 do j = jsta_2l, jend_2u
2221 cprate( i, j ) = dummy( i, j )* 0.001
2228 call getvariable(filename,datestr,datahandle,varname,dummy2, &
2229 im,1,jm,1,im,js,je,1)
2230 do j = jsta_2l, jend_2u
2233 prec( i, j ) = (dummy( i, j )+dummy2(i,j))* 0.001
2238 call getvariable(filename,datestr,datahandle,varname,dummy, &
2239 im,1,jm,1,im,js,je,1)
2240 do j = jsta_2l, jend_2u
2243 snownc( i, j ) = dummy( i, j ) * 0.001
2249 write(6,*)
'getting SNOW_ACC_NC, [mm] '
2251 varname=
'SNOW_ACC_NC'
2252 call getvariable(filename,datestr,datahandle,varname,dummy, &
2253 im,1,jm,1,im,js,je,1)
2254 do j = jsta_2l, jend_2u
2256 snow_bucket( i, j ) = dummy( i, j )
2262 write(6,*)
'getting SNOW_ACC_NC1, [mm] '
2263 varname=
'SNOW_ACC_NC1'
2264 call getvariable(filename,datestr,datahandle,varname,dummy, &
2265 im,1,jm,1,im,js,je,1)
2266 do j = jsta_2l, jend_2u
2268 snow_bucket1( i, j ) = dummy( i, j )
2274 write(6,*)
'getting GRAUP_ACC_NC, [mm] '
2275 varname=
'GRAUP_ACC_NC'
2276 call getvariable(filename,datestr,datahandle,varname,dummy, &
2277 im,1,jm,1,im,js,je,1)
2278 do j = jsta_2l, jend_2u
2280 graup_bucket( i, j ) = dummy( i, j )
2286 write(6,*)
'getting GRAUP_ACC_NC1, [mm] '
2287 varname=
'GRAUP_ACC_NC1'
2288 call getvariable(filename,datestr,datahandle,varname,dummy, &
2289 im,1,jm,1,im,js,je,1)
2290 do j = jsta_2l, jend_2u
2292 graup_bucket1( i, j ) = dummy( i, j )
2297 call getvariable(filename,datestr,datahandle,varname,dummy, &
2298 im,1,jm,1,im,js,je,1)
2299 do j = jsta_2l, jend_2u
2301 acgraup( i, j ) = dummy( i, j )
2306 call getvariable(filename,datestr,datahandle,varname,dummy, &
2307 im,1,jm,1,im,js,je,1)
2308 do j = jsta_2l, jend_2u
2310 acfrain( i, j ) = dummy( i, j )
2314 varname=
'GRAUPELNCV'
2315 call getvariable(filename,datestr,datahandle,varname,dummy, &
2316 im,1,jm,1,im,js,je,1)
2317 do j = jsta_2l, jend_2u
2320 graupelnc( i, j ) = dummy( i, j ) * 0.001
2326 call getvariable(filename,datestr,datahandle,varname,dummy, &
2327 im,1,jm,1,im,js,je,1)
2328 do j = jsta_2l, jend_2u
2330 albedo( i, j ) = dummy( i, j )
2348 call getvariable(filename,datestr,datahandle,varname,dummy, &
2349 im,1,jm,1,im,js,je,1)
2350 do j = jsta_2l, jend_2u
2353 rswin( i, j ) = dummy( i, j )
2354 rswout( i, j ) = rswin( i, j ) * albedo( i, j )
2360 call getvariable(filename,datestr,datahandle,varname,dummy, &
2361 im,1,jm,1,im,js,je,1)
2362 do j = jsta_2l, jend_2u
2364 swddni( i, j ) = dummy( i, j )
2370 call getvariable(filename,datestr,datahandle,varname,dummy, &
2371 im,1,jm,1,im,js,je,1)
2372 do j = jsta_2l, jend_2u
2374 swddif( i, j ) = dummy( i, j )
2380 call getvariable(filename,datestr,datahandle,varname,dummy, &
2381 im,1,jm,1,im,js,je,1)
2382 do j = jsta_2l, jend_2u
2384 swdnbc( i, j ) = dummy( i, j )
2390 call getvariable(filename,datestr,datahandle,varname,dummy, &
2391 im,1,jm,1,im,js,je,1)
2392 do j = jsta_2l, jend_2u
2394 swddnic( i, j ) = dummy( i, j )
2400 call getvariable(filename,datestr,datahandle,varname,dummy, &
2401 im,1,jm,1,im,js,je,1)
2402 do j = jsta_2l, jend_2u
2404 swddifc( i, j ) = dummy( i, j )
2410 call getvariable(filename,datestr,datahandle,varname,dummy, &
2411 im,1,jm,1,im,js,je,1)
2412 do j = jsta_2l, jend_2u
2414 swupbc( i, j ) = dummy( i, j )
2420 call getvariable(filename,datestr,datahandle,varname,dummy, &
2421 im,1,jm,1,im,js,je,1)
2422 do j = jsta_2l, jend_2u
2424 swupt( i, j ) = dummy( i, j )
2433 call getvariable(filename,datestr,datahandle,varname,dummy, &
2434 im,1,jm,1,im,js,je,1)
2435 do j = jsta_2l, jend_2u
2437 mean_frp( i, j ) = dummy( i, j )
2443 call getvariable(filename,datestr,datahandle,varname,dummy, &
2444 im,1,jm,1,im,js,je,1)
2445 do j = jsta_2l, jend_2u
2447 taod5502d( i, j ) = dummy( i, j )
2453 call getvariable(filename,datestr,datahandle,varname,dummy, &
2454 im,1,jm,1,im,js,je,1)
2455 do j = jsta_2l, jend_2u
2457 aerasy2d( i, j ) = dummy( i, j )
2463 call getvariable(filename,datestr,datahandle,varname,dummy, &
2464 im,1,jm,1,im,js,je,1)
2465 do j = jsta_2l, jend_2u
2467 aerssa2d( i, j ) = dummy( i, j )
2473 call getvariable(filename,datestr,datahandle,varname,dummy, &
2474 im,1,jm,1,im,js,je,1)
2475 do j = jsta_2l, jend_2u
2477 lwp( i, j ) = dummy( i, j )
2483 call getvariable(filename,datestr,datahandle,varname,dummy, &
2484 im,1,jm,1,im,js,je,1)
2485 do j = jsta_2l, jend_2u
2487 iwp( i, j ) = dummy( i, j )
2493 call getvariable(filename,datestr,datahandle,varname,dummy, &
2494 im,1,jm,1,im,js,je,1)
2495 do j = jsta_2l, jend_2u
2498 swradmean( i, j ) = dummy( i, j )
2501 print*,
'SWRADmean at ',ii,jj,
' = ',swradmean(ii,jj)
2504 varname=
'SWNORMMEAN'
2505 call getvariable(filename,datestr,datahandle,varname,dummy, &
2506 im,1,jm,1,im,js,je,1)
2507 do j = jsta_2l, jend_2u
2510 swnormmean( i, j ) = dummy( i, j )
2513 print*,
'SWNORMmean at ',ii,jj,
' = ',swnormmean(ii,jj)
2517 call getvariable(filename,datestr,datahandle,varname,dummy, &
2518 im,1,jm,1,im,js,je,1)
2519 do j = jsta_2l, jend_2u
2521 rlwin( i, j ) = dummy( i, j )
2525 do j = jsta_2l, jend_2u
2527 tlmh=t(i,j,nint(lmh(i,j)))
2528 sigt4( i, j ) = 5.67e-8*tlmh*tlmh*tlmh*tlmh
2534 call getvariable(filename,datestr,datahandle,varname,dummy, &
2535 im,1,jm,1,im,js,je,1)
2536 do j = jsta_2l, jend_2u
2538 lwdnbc( i, j ) = dummy( i, j )
2544 call getvariable(filename,datestr,datahandle,varname,dummy, &
2545 im,1,jm,1,im,js,je,1)
2546 do j = jsta_2l, jend_2u
2548 lwupbc( i, j ) = dummy( i, j )
2554 call getvariable(filename,datestr,datahandle,varname,dummy, &
2555 im,1,jm,1,im,js,je,1)
2556 do j = jsta_2l, jend_2u
2558 rlwtoa( i, j ) = dummy( i, j )
2564 do j = jsta_2l, jend_2u
2582 call getvariable(filename,datestr,datahandle,varname,dummy, &
2583 im,1,jm,1,im,js,je,1)
2584 do j = jsta_2l, jend_2u
2586 tg( i, j ) = dummy( i, j )
2587 soiltb( i, j ) = dummy( i, j )
2592 call getvariable(filename,datestr,datahandle,varname,dummy, &
2593 im,1,jm,1,im,js,je,1)
2594 do j = jsta_2l, jend_2u
2596 twbs(i,j)= dummy( i, j )
2603 IF(isf_surface_physics/=3)
then
2605 call getvariable(filename,datestr,datahandle,varname,dummy, &
2606 im,1,jm,1,im,js,je,1)
2607 do j = jsta_2l, jend_2u
2609 qwbs(i,j) = dummy( i, j )
2615 call getvariable(filename,datestr,datahandle,varname,dummy, &
2616 im,1,jm,1,im,js,je,1)
2617 do j = jsta_2l, jend_2u
2619 qwbs(i,j) = dummy( i, j ) * lheat
2626 call getvariable(filename,datestr,datahandle,varname,dummy, &
2627 im,1,jm,1,im,js,je,1)
2628 do j = jsta_2l, jend_2u
2630 grnflx(i,j) = dummy( i, j )
2635 do j = jsta_2l, jend_2u
2653 call getvariable(filename,datestr,datahandle,varname,dummy, &
2654 im,1,jm,1,im,js,je,1)
2655 do j = jsta_2l, jend_2u
2657 if( dummy( i, j ) <= 5000.0 .and. dummy( i, j ) >=0.0)
then
2658 sno( i, j ) = dummy( i, j )
2659 elseif( dummy( i, j ) > 5000.0)
then
2660 sno( i, j ) = 5000.0
2661 write(*,*)
'too large SNOW=',i,j,dummy( i, j )
2662 elseif( dummy( i, j ) < 0.0 )
then
2664 write(*,*)
'negative SNOW=',i,j,dummy( i, j )
2667 write(*,*)
'strange SNOW=',i,j,dummy( i, j )
2673 call getvariable(filename,datestr,datahandle,varname,dummy, &
2674 im,1,jm,1,im,js,je,1)
2675 do j = jsta_2l, jend_2u
2677 if( dummy( i, j ) <= 50.0 .and. dummy( i, j ) >=0.0)
then
2678 si( i, j ) = dummy( i, j ) * 1000.
2679 elseif( dummy( i, j ) > 50.0)
then
2680 si( i, j ) = 50.0 * 1000.
2681 write(*,*)
'too large SNOWH=',i,j,dummy( i, j )
2682 elseif( dummy( i, j ) < 0.0 )
then
2684 write(*,*)
'negative SNOWH=',i,j,dummy( i, j )
2687 write(*,*)
'strange SNOWH=',i,j,dummy( i, j )
2694 call getvariable(filename,datestr,datahandle,varname,dummy, &
2695 im,1,jm,1,im,js,je,1)
2696 do j = jsta_2l, jend_2u
2698 pctsno( i, j ) = dummy( i, j )
2704 call getvariable(filename,datestr,datahandle,varname,dummy, &
2705 im,1,jm,1,im,js,je,1)
2706 do j = jsta_2l, jend_2u
2708 snonc( i, j ) = dummy( i, j )
2714 call getvariable(filename,datestr,datahandle,varname,dummy, &
2715 im,1,jm,1,im,js,je,1)
2716 do j = jsta_2l, jend_2u
2718 snfden( i, j ) = max(0.,dummy( i, j ))
2721 print *,
' MIN/MAX SNFDEN ',minval(snfden),maxval(snfden)
2724 varname=
'SNOWFALLAC'
2725 call getvariable(filename,datestr,datahandle,varname,dummy, &
2726 im,1,jm,1,im,js,je,1)
2727 do j = jsta_2l, jend_2u
2729 sndepac( i, j ) = dummy( i, j )
2732 print *,
' MIN/MAX SNDEPAC ',minval(sndepac),maxval(sndepac)
2736 call getvariable(filename,datestr,datahandle,varname,dummy, &
2737 im,1,jm,1,im,js,je,1)
2738 do j = jsta_2l, jend_2u
2740 tsnow( i, j ) = dummy( i, j )
2746 call getivariablen(filename,datestr,datahandle,
'IVGTYP',idummy, &
2747 im,1,jm,1,im,js,je,1)
2749 do j = jsta_2l, jend_2u
2751 ivgtyp( i, j ) = idummy( i, j )
2756 call getivariablen(filename,datestr,datahandle,varname,idummy, &
2757 im,1,jm,1,im,js,je,1)
2758 do j = jsta_2l, jend_2u
2760 isltyp( i, j ) = idummy( i, j )
2763 print*,
'MAX ISLTYP=', maxval(idummy)
2777 call getvariable(filename,datestr,datahandle,varname,dummy, &
2778 im,1,jm,1,im,js,je,1)
2779 do j = jsta_2l, jend_2u
2781 sm( i, j ) = dummy( i, j ) - 1.0
2787 call getvariable(filename,datestr,datahandle,varname,dummy, &
2788 im,1,jm,1,im,js,je,1)
2789 do j = jsta_2l, jend_2u
2791 pblh( i, j ) = dummy( i, j )
2794 IF(modelname ==
'RAPR')
THEN
2796 delta_theta4gust=0.5
2797 do j = jsta_2l, jend_2u
2800 if (thv(i,j,lm-1) < (thv(i,j,lm) + delta_theta4gust))
then
2801 zsf=zint(i,j,nint(lmh(i,j))+1)
2807 if (thv(i,j,lm-k+1)>(thv(i,j,lm) + delta_theta4gust)) &
2813 zpbltop = zmid(i,j,lm-k1+1) + &
2814 ((thv(i,j,lm)+delta_theta4gust)-thv(i,j,lm-k1+1)) &
2815 * (zmid(i,j,lm-k1+2)-zmid(i,j,lm-k1+1)) &
2816 / (thv(i,j,lm-k1+2) - thv(i,j,lm-k1+1))
2817 pblhgust( i, j ) = zpbltop - zsf
2819 pblhgust( i, j ) = 0.
2826 call getvariable(filename,datestr,datahandle,varname,dummy, &
2827 im,1,jm,1,im,js,je,1)
2828 do j = jsta_2l, jend_2u
2830 gdlat( i, j ) = dummy( i, j )
2832 f(i,j) = 1.454441e-4*sin(gdlat(i,j)*dtr)
2837 print*,
'read past GDLAT'
2839 call getvariable(filename,datestr,datahandle,varname,dummy, &
2840 im,1,jm,1,im,js,je,1)
2841 do j = jsta_2l, jend_2u
2843 gdlon( i, j ) = dummy( i, j )
2851 print*,
'read past GDLON'
2853 call collect_loc(gdlat,dummy)
2855 latstart=nint(dummy(1,1)*gdsdegr)
2856 latlast=nint(dummy(im,jm)*gdsdegr)
2862 write(6,*)
'laststart,latlast B calling bcast= ',latstart,latlast
2863 call mpi_bcast(latstart,1,mpi_integer,0,mpi_comm_comp,irtn)
2864 call mpi_bcast(latlast,1,mpi_integer,0,mpi_comm_comp,irtn)
2865 write(6,*)
'laststart,latlast A calling bcast= ',latstart,latlast
2866 call collect_loc(gdlon,dummy)
2868 if(dummy(1,1)<0.0) dummy(1,1)=360.0+dummy(1,1)
2869 if(dummy(im,jm)<0.0) dummy(im,jm)=360.0+dummy(im,jm)
2870 lonstart=nint(dummy(1,1)*gdsdegr)
2871 lonlast=nint(dummy(im,jm)*gdsdegr)
2877 write(6,*)
'lonstart,lonlast B calling bcast=',lonstart,lonlast
2878 call mpi_bcast(lonstart,1,mpi_integer,0,mpi_comm_comp,irtn)
2879 call mpi_bcast(lonlast,1,mpi_integer,0,mpi_comm_comp,irtn)
2880 write(6,*)
'lonstart,lonlast A calling bcast= ',lonstart,lonlast
2886 allocate(msft(im,jsta_2l:jend_2u))
2888 call getvariable(filename,datestr,datahandle,varname,dummy, &
2889 im,1,jm,1,im,js,je,1)
2890 do j = jsta_2l, jend_2u
2892 msft( i, j ) = dummy( i, j )
2898 call getivariablen(filename,datestr,datahandle,varname,nphs, &
2906 IF(modelname /=
'RAPR')
THEN
2907 do j = jsta_2l, jend_2u
2910 czmean( i, j ) = czen( i, j )
2915 jdn=iw3jdn(idat(3),idat(1),idat(2))
2918 call
zensun(jdn,float(idat(4)),gdlat(i,j),gdlon(i,j) &
2919 ,pi,sun_zenith,sun_azimuth)
2922 czmean( i, j ) = czen( i, j )
2925 print*,
'sample RAPR zenith angle=',acos(czen(ii,jj))*rtd
2932 write(6,*)
'filename in INITPOST=', filename,
' is'
2967 call ext_ncd_get_dom_ti_real(datahandle,
'DY',tmp, &
2968 1,ioutcount,istatus)
2970 write(6,*)
'dyval= ', dyval
2971 call ext_ncd_get_dom_ti_real(datahandle,
'CEN_LAT',tmp, &
2972 1,ioutcount,istatus)
2973 cenlat=nint(gdsdegr*tmp)
2974 write(6,*)
'cenlat= ', cenlat
2975 call ext_ncd_get_dom_ti_real(datahandle,
'CEN_LON',tmp, &
2976 1,ioutcount,istatus)
2977 if(tmp < 0) tmp=360.0 + tmp
2978 cenlon=nint(gdsdegr*tmp)
2979 write(6,*)
'cenlon= ', cenlon
2980 call ext_ncd_get_dom_ti_integer(datahandle,
'MAP_PROJ',itmp, &
2981 1,ioutcount,istatus)
2983 write(6,*)
'maptype is ', maptype
2985 call ext_ncd_get_dom_ti_real(datahandle,
'TRUELAT1',tmp, &
2986 1,ioutcount,istatus)
2987 truelat1=nint(gdsdegr*tmp)
2988 write(6,*)
'truelat1= ', truelat1
2990 call ext_ncd_get_dom_ti_real(datahandle,
'TRUELAT2',tmp, &
2991 1,ioutcount,istatus)
2992 truelat2=nint(gdsdegr*tmp)
2993 write(6,*)
'truelat2= ', truelat2
2996 call ext_ncd_get_dom_ti_real(datahandle,
'STAND_LON',tmp, &
2997 1,ioutcount,istatus)
2998 if(tmp < 0) tmp=360.0 + tmp
2999 standlon=nint(gdsdegr*tmp)
3000 write(6,*)
'STANDLON= ', standlon
3003 do j = jsta_2l, jend_2u
3005 dx( i, j ) = dxval/msft(i,j)
3006 dy( i, j ) = dyval/msft(i,j)
3011 print*,
'sample dx,dy,msft=',ii,jj,dx(ii,jj),dy(ii,jj) &
3017 dxval=(dxval * 360.)/(erad*2.*pi)*gdsdegr
3018 dyval=(dyval * 360.)/(erad*2.*pi)*gdsdegr
3020 print*,
'dx and dy for arw rotated latlon= ', &
3025 IF(modelname ==
'RAPR')
THEN
3036 CALL table(ptbl,ttbl,pt, &
3037 rdq,rdth,rdp,rdthe,pl,thl,qs0,sqs,sthe,the0)
3039 CALL tableq(ttblq,rdpq,rdtheq,plq,thl,stheq,the0q)
3044 WRITE(6,*)
' SPL (POSTED PRESSURE LEVELS) BELOW: '
3045 WRITE(6,51) (spl(l),l=1,lsm)
3046 50
FORMAT(14(f4.1,1x))
3047 51
FORMAT(8(f8.1,1x))
3053 call ext_ncd_get_dom_ti_real(datahandle,
'DT',tmp,1,ioutcount,istatus)
3058 call ext_ncd_get_dom_ti_real(datahandle,
'PREC_ACC_DT',tmp,1,ioutcount,istatus)
3059 prec_acc_dt=abs(tmp)
3060 print*,
'PREC_ACC_DT= ',prec_acc_dt
3065 print*,
'PREC_ACC_DT1= ',prec_acc_dt1
3081 tprec=float(nprec)/tsph
3082 IF(nprec==0)tprec=float(ifhr)
3083 print*,
'NPREC,TPREC = ',nprec,tprec
3093 print*,
'TSRFC TRDLW TRDSW= ',tsrfc, trdlw, trdsw
3126 alsl(l) = alog(spl(l))
3129 call ext_ncd_ioclose( datahandle, status )
3133 print*,
'writing out igds'
3137 if(maptype == 1)
THEN
3139 WRITE(6,*)
'igd(1)=',3
3142 WRITE(igdout)latstart
3143 WRITE(igdout)lonstart
3146 WRITE(igdout)standlon
3151 WRITE(igdout)truelat2
3152 WRITE(igdout)truelat1
3154 ELSE IF(maptype == 2)
THEN
3158 WRITE(igdout)latstart
3159 WRITE(igdout)lonstart
3166 WRITE(igdout)truelat2
3167 WRITE(igdout)truelat1
3173 if (truelat1 < 0.)
THEN
3179 CALL msfps(lat,truelat1*0.001,psmapf)
3181 ELSE IF(maptype == 3)
THEN
3185 WRITE(igdout)latstart
3186 WRITE(igdout)lonstart
3188 WRITE(igdout)latlast
3189 WRITE(igdout)lonlast
3190 WRITE(igdout)truelat1
3196 ELSE IF(maptype==6 )
THEN
3200 WRITE(igdout)latstart
3201 WRITE(igdout)lonstart
3208 WRITE(igdout)latlast
3209 WRITE(igdout)lonlast
3216 open(10,file=
'copygb_hwrf.txt',form=
'formatted',status=
'unknown')
3217 idxvald = abs(lonlast-lonstart)/(im-2)
3218 idyvald = abs(latlast-latstart)/(jm-2)
3219 print*,
'dxval,dyval in degree',dxval/107000.,dyval/107000.
3220 print*,
'idxvald,idyvald,LATSTART,LONSTART,LATLAST,LONLAST= ', &
3221 idxvald,idyvald,latstart,lonstart,latlast,lonlast
3222 write(10,1010) im-1,jm-1,latstart,lonstart,latlast,lonlast, &
3225 1010
format(
'255 0 ',2(i4,x),i8,x,i9,x,
'136 ',i8,x,i9,x, &
3236 if (grib==
"grib2" )
then
subroutine zensun(day, time, lat, lon, pi, sun_zenith, sun_azimuth)
This subroutine computes solar position information as a function of geographic coordinates, date and time.