29 use vrbls3d,
only: t, q, uh, vh, q2, cwm, f_ice, f_rain, f_rimef, cfr, pint,&
30 pint, alpint, pmid, pmidv, zint, zmid, wh, rlwtt, rswtt,&
31 ttnd, tcucn, train, el_pbl, exch_h, omga, qqni, qqnr, qqw, qqi, &
32 qqr, qqs, qqg, ref_10cm, radius_cloud, radius_ice, radius_snow, &
34 use vrbls2d,
only: f, pd, fis, pblh, mixht, ustar, z0, ths, qs, twbs, qwbs, prec,&
35 acprec, cuprec,ancprc, lspa, sno, snoavg, psfcavg, t10avg, t10m, akhsavg, akmsavg,&
36 refd_max, w_up_max, w_dn_max, up_heli_max, si, cldefi, th10, q10, pshltr,&
37 tshltr, qshltr, maxtshltr, mintshltr, maxrhshltr, minrhshltr, akhs, akms, albase,&
38 albedo, czen, cfracl, cfracm, islope, cmc, grnflx, pctsno, soiltb, vegfrc,&
39 acfrcv, acfrst, ssroff, bgroff, czmean, mxsnal, radot, sigt4, tg, sr, cfrach,&
40 rlwin, rlwtoa, alwin, alwout, alwtoa, rswin, rswinc, rswout, aswin,aswout,&
41 aswtoa, sfcshx, sfclhx, subshx, snopcx, sfcuvx, potevp, ncfrcv, ncfrst, u10h,&
42 u10, v10h, v10, u10max, v10max, smstav, smstot, sfcevp, ivgtyp, acsnow, acsnom,&
43 sst, thz0, qz0, uz0, vz0, htop, isltyp, sfcexc, hbot, htopd, htops, cuppt, cprate,&
44 hbotd, hbots, prate_max, fprate_max
45 use soil,
only: sldpth, sh2o, smc, stc
46 use masks,
only: lmv, lmh, htm, vtm, dx, dy, hbm2, gdlat, gdlon, sm, sice
47 use kinds,
only: i_llong
48 use wrf_io_flags_mod,
only:
49 use params_mod,
only: pi, dtr, g, d608, rd,tfrz
50 use lookup_mod,
only: thl, plq, ptbl, ttbl, rdq, rdth, rdp, rdthe, pl, qs0, sqs, sthe, the0,&
51 ttblq, rdpq, rdtheq, stheq, the0q
52 use ctlblk_mod,
only: me, mpi_comm_comp, global, icnt, idsp, jsta, ihrst, imin, idat, sdat,&
53 ifhr, ifmin, filename, restrt, imp_physics, isf_surface_physics, icu_physics, jend,&
54 dt, spval, gdsdegr, grib, pdtop, pt, tmaxmin, nsoil, lp1, jend_m, nprec, nphs, avrain,&
55 avcnvc, ardlw, ardsw, asrfc, novegtype, spl, lsm, dtq2, tsrfc, trdlw, trdsw, theat, tclod,&
56 tprec, alsl, lm , im, jm, jsta_2l, jend_2u, ivegsrc, pthresh
57 use gridspec_mod,
only: dyval, dxval, cenlat, cenlon, maptype, gridtype, latstart, latlast, latnw,&
58 latse, lonstart, lonlast, lonnw, lonse, latstartv, latlastv, cenlatv, lonstartv,&
60 use nemsio_module,
only: nemsio_gfile, nemsio_getfilehead, nemsio_close, nemsio_getheadvar
61 use upp_math,
only: h2u
66 type(nemsio_gfile),
intent(inout) :: nfile
73 character(len=20) :: VarName
74 character(len=20) :: VcoordName
76 character startdate*19,SysDepInfo*80,cgar*1
77 character startdate2(19)*4
84 logical,
parameter :: debugprint = .false.
86 logical :: convert_rad_to_deg=.false.
90 INTEGER IDATE(8),JDATE(8)
96 REAL ETA1(LM+1), ETA2(LM+1)
100 REAL DUMMY2 ( IM, JM )
101 real,
allocatable :: fi(:,:,:)
103 integer ibuf(im,jsta_2l:jend_2u)
104 real buf(im,jsta_2l:jend_2u)
105 character*8,
allocatable:: recname(:)
106 character*16,
allocatable :: reclevtyp(:)
107 integer,
allocatable:: reclev(:)
108 real,
allocatable:: bufy(:)
109 real,
allocatable:: glat1d(:),glon1d(:)
111 integer ii,jj,js,je,jev,iyear,imn,iday,itmp,ioutcount,istatus, &
112 nsrfc,nrdlw,nrdsw,nheat,nclod, &
113 iunit,nrec,i,j,l, iret,nframe,impf,jmpf,nframed2, &
114 igdout,ll,n,im1,jm1,iim1,item
121 if(me==0)
WRITE(6,*)
'INITPOST: ENTER INITPOST'
130 do j = jsta_2l, jend_2u
140 do j = jsta_2l, jend_2u
151 IF (jend_2u==jm)
THEN
163 allocate(recname(nrec),reclevtyp(nrec),reclev(nrec))
165 call nemsio_getfilehead(nfile,iret=iret &
166 ,idate=idate(1:7),nfhour=nfhour,recname=recname &
167 ,reclevtyp=reclevtyp,reclev=reclev,nframe=nframe)
170 print *,
'printing an inventory of NEMS file'
172 print *,
'recname,reclevtyp,reclev=',trim(recname(i)),
' ', &
173 trim(reclevtyp(i)),reclev(i)
178 deallocate(recname,reclevtyp,reclev)
182 print*,
'nframe,impf,jmpf= ',nframe,impf,jmpf
183 allocate(glat1d(impf*jmpf),glon1d(impf*jmpf) )
184 call nemsio_getfilehead(nfile,dx=glat1d &
185 ,dy=glon1d,iret=iret)
186 if(iret/=0)print*,
'did not find dx dy'
192 item = (j-1)*impf + nframe
194 dummy(i,j) = glat1d(item+i)
195 dummy2(i,j) = glon1d(item+i)
200 deallocate(glat1d,glon1d)
209 print*,
'idate before broadcast = ',(idate(i),i=1,7)
211 call mpi_bcast(idate(1),7,mpi_integer,0,mpi_comm_comp,iret)
212 call mpi_bcast(nfhour,1,mpi_integer,0,mpi_comm_comp,iret)
213 call mpi_bcast(nframe,1,mpi_integer,0,mpi_comm_comp,iret)
247 print*,
'impf,jmpf,nframe for reading fields = ',impf,jmpf,nframe
248 print*,
'idate after broadcast = ',(idate(i),i=1,7)
249 print*,
'nfhour = ',nfhour
251 call mpi_scatterv(dummy(1,1),icnt,idsp,mpi_real &
252 ,dx(1,jsta),icnt(me),mpi_real,0,mpi_comm_comp,iret)
253 call mpi_scatterv(dummy2(1,1),icnt,idsp,mpi_real &
254 ,dy(1,jsta),icnt(me),mpi_real,0,mpi_comm_comp,iret)
270 15
format(i4,1x,i2,1x,i2,1x,i2,1x,i2)
272 print*,
'start yr mo day hr min =',iyear,imn,iday,ihrst,imin
273 print*,
'processing yr mo day hr min=' &
274 ,idat(3),idat(1),idat(2),idat(4),idat(5)
295 CALL w3difdat(jdate,idate,0,rinc)
297 ifhr=nint(rinc(2)+rinc(1)*24.)
300 if (me==0)print*,
' in INITPOST ifhr ifmin fileName=',ifhr,ifmin,trim(filename)
321 IF(tstart > 1.0e-2)
THEN
322 ifhr=ifhr+nint(tstart)
326 call w3movdat(rinc,jdate,idate)
331 print*,
'new forecast hours for restrt run= ',ifhr
332 print*,
'new start yr mo day hr min =',sdat(3),sdat(1) &
347 call nemsio_getheadvar(nfile,trim(varname),imp_physics,iret)
349 print*,varname,
" not found in file- go to 16 character "
351 call nemsio_getheadvar(nfile,trim(varname),imp_physics,iret)
353 print*,varname,
" not found in file-Assigned 1000"
359 call mpi_bcast(imp_physics,1,mpi_integer,0,mpi_comm_comp,iret)
360 if(me==0)print*,
'MP_PHYSICS= ',imp_physics
363 if(imp_physics==5 .or. imp_physics==85 .or. imp_physics==95)
then
364 CALL microinit(imp_physics)
367 varname=
'sf_surface_physi'
369 call nemsio_getheadvar(nfile,trim(varname),isf_surface_physics,iret)
371 print*,varname,
" not found in file-Assigned 2 for NOAH LSM as default"
372 isf_surface_physics=2
375 call mpi_bcast(isf_surface_physics,1,mpi_integer,0,mpi_comm_comp,iret)
376 if(me==0) print*,
'SF_SURFACE_PHYSICS= ',isf_surface_physics
381 call nemsio_getheadvar(nfile,trim(varname),ivegsrc,iret)
383 print*,varname,
" not found in file-Assigned 1 for IGBP as default"
387 call mpi_bcast(ivegsrc,1,mpi_integer,0,mpi_comm_comp,iret)
388 if(me==0) print*,
'IVEGSRC= ',ivegsrc
393 else if(ivegsrc==0)
then
396 if(me==0) print*,
'novegtype= ',novegtype
400 call nemsio_getheadvar(nfile,trim(varname),icu_physics,iret)
402 print*,varname,
" not found in file-Assigned 2 for BMJ as default"
406 call mpi_bcast(icu_physics,1,mpi_integer,0,mpi_comm_comp,iret)
407 if(me==0) print*,
'CU_PHYSICS= ',icu_physics
425 if(debugprint)print*,
'sample ',varname,
' = ',dx(im/2,(jsta+jend)/2)
441 if(debugprint)print*,
'sample ',varname,
' = ',dy(im/2,(jsta+jend)/2)
446 call nemsio_getheadvar(nfile,trim(varname),garb,iret)
448 print*,varname,
" not found in file-Assigned missing values"
454 call mpi_bcast(dt,1,mpi_real,0,mpi_comm_comp,iret)
458 call nemsio_getheadvar(nfile,trim(varname),garb,iret)
460 print*,varname,
" not found in file-Assigned missing values"
466 call mpi_bcast(dyval,1,mpi_real,0,mpi_comm_comp,iret)
471 call nemsio_getheadvar(nfile,trim(varname),garb,iret)
473 print*,varname,
" not found in file-Assigned missing values"
479 call mpi_bcast(dxval,1,mpi_real,0,mpi_comm_comp,iret)
482 if(me==0) print*,
'DX, DY, DT=',dxval,dyval,dt
486 call nemsio_getheadvar(nfile,trim(varname),garb,iret)
488 print*,varname,
" not found in file-Assigned missing values"
491 cenlat=nint(garb*gdsdegr)
494 call mpi_bcast(cenlat,1,mpi_integer,0,mpi_comm_comp,iret)
498 call nemsio_getheadvar(nfile,trim(varname),garb,iret)
500 print*,varname,
" not found in file-Assigned missing values"
503 if(grib==
"grib2")
then
504 cenlon=nint((garb+360.)*gdsdegr)
508 call mpi_bcast(cenlon,1,mpi_integer,0,mpi_comm_comp,iret)
558 if(me==0) print*,
'maptype and gridtype= ',maptype,gridtype
565 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
566 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
567 ,l,impf,jmpf,nframe,gdlat)
572 if(maxval(abs(dummy))<pi)
then
573 if(debugprint)print*,
'convert from radian to degree'
575 convert_rad_to_deg=.true.
581 call mpi_bcast(convert_rad_to_deg,1,mpi_logical,0,mpi_comm_comp,iret)
582 if(convert_rad_to_deg)
call mpi_scatterv(dummy(1,1),icnt,idsp,mpi_real &
583 ,gdlat(1,jsta),icnt(me),mpi_real,0,mpi_comm_comp,iret)
584 if(debugprint)print*,
'sample ',varname,
' = ',gdlat(im/2,(jsta+jend)/2)
585 if(debugprint)print*,
'max min lat=',maxval(gdlat),minval(gdlat),
'im=',im, &
586 'jsta_2l=',jsta_2l,
'jend_2u=',jend_2u
588 if(me==0.and.debugprint)print*,
'after collect lat=',dummy(1,1),dummy(im,jm)
592 latstart=nint(dummy(1,1)*gdsdegr)
593 latlast=nint(dummy(im,jm)*gdsdegr)
594 latnw=nint(dummy(1,jm)*gdsdegr)
595 latse=nint(dummy(im,1)*gdsdegr)
603 print*,
'latstart,latlast B bcast= ',latstart,latlast
605 call mpi_bcast(latstart,1,mpi_integer,0,mpi_comm_comp,iret)
606 call mpi_bcast(latlast,1,mpi_integer,0,mpi_comm_comp,iret)
609 if(debugprint)
write(6,*)
'latstart,latlast,me A calling bcast=',latstart,latlast,me
610 if(me==0) print*,
'dyval, cenlat= ',dyval, cenlat
615 f(i,j) = 1.454441e-4*sin(gdlat(i,j)*dtr)
622 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
623 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
624 ,l,impf,jmpf,nframe,gdlon)
625 if(convert_rad_to_deg)gdlon=gdlon*180./pi
632 if(gdlon(1,jsta)>0. .and. gdlon(2,jsta)<0.)
then
634 gdlon(1,j) = gdlon(1,j)-360.0
638 if(debugprint)print*,
'sample ',varname,
' = ',(gdlon(i,(jsta+jend)/2),i=1,im,8)
639 if(debugprint)print*,
'max min lon=',maxval(gdlon),minval(gdlon)
642 if(grib==
'grib2')
then
643 if(dummy(1,1)<0) dummy(1,1)=dummy(1,1)+360.
644 if(dummy(im,jm)<0) dummy(im,jm)=dummy(im,jm)+360.
646 lonstart=nint(dummy(1,1)*gdsdegr)
647 lonlast=nint(dummy(im,jm)*gdsdegr)
648 lonnw=nint(dummy(1,jm)*gdsdegr)
649 lonse=nint(dummy(im,1)*gdsdegr)
658 call mpi_bcast(lonstart,1,mpi_integer,0,mpi_comm_comp,iret)
659 call mpi_bcast(lonlast,1,mpi_integer,0,mpi_comm_comp,iret)
662 write(6,*)
'lonstart,lonlast A calling bcast=',lonstart,lonlast
663 print*,
'dxval, cenlon= ',dxval, cenlon
665 convert_rad_to_deg=.false.
669 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
670 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
671 ,l,impf,jmpf,nframe,buf)
672 if(debugprint)print*,
'sample ',varname,
' = ',buf(im/2,(jsta+jend)/2)
673 if(debugprint)print*,
'max min vlat=',maxval(buf),minval(buf)
676 if(maxval(abs(dummy))<pi)
then
677 dummy(1,1)=dummy(1,1)*180./pi
678 dummy(im,jm)=dummy(im,jm)*180./pi
679 convert_rad_to_deg=.true.
681 latstartv=nint(dummy(1,1)*gdsdegr)
682 latlastv=nint(dummy(im,jm)*gdsdegr)
686 call mpi_bcast(latstartv,1,mpi_integer,0,mpi_comm_comp,iret)
687 call mpi_bcast(latlastv,1,mpi_integer,0,mpi_comm_comp,iret)
690 if(debugprint)
write(6,*)
'latstartv,cenlatv,latlastv,me A calling bcast=', &
691 latstartv,cenlatv,latlastv,me
696 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
697 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
698 ,l,impf,jmpf,nframe,buf)
699 if(debugprint)print*,
'sample ',varname,
' = ',buf(im/2,(jsta+jend)/2)
700 if(debugprint)print*,
'max min vlon=',maxval(buf),minval(buf)
703 if(convert_rad_to_deg)
then
704 dummy(1,1)=dummy(1,1)*180./pi
705 dummy(im,jm)=dummy(im,jm)*180./pi
707 if(grib==
'grib2')
then
708 if(dummy(1,1)<0) dummy(1,1)=dummy(1,1)+360.
710 lonstartv=nint(dummy(1,1)*gdsdegr)
711 lonlastv=nint(dummy(im,jm)*gdsdegr)
715 call mpi_bcast(lonstartv,1,mpi_integer,0,mpi_comm_comp,iret)
716 call mpi_bcast(lonlastv,1,mpi_integer,0,mpi_comm_comp,iret)
719 write(6,*)
'lonstartv,cenlonv,lonlastv,me A calling bcast=', &
720 lonstartv,cenlonv,lonlastv,me
725 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
726 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
727 ,l,impf,jmpf,nframe,sm)
728 if(debugprint)print*,
'sample ',varname,
' = ',sm(im/2,(jsta+jend)/2)
733 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
734 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
735 ,l,impf,jmpf,nframe,sice)
736 if(debugprint)print*,
'sample ',varname,
' = ',sice(im/2,(jsta+jend)/2)
740 vcoordname=
'hybrid sig lev'
742 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
743 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
744 ,l,impf,jmpf,nframe,pd)
745 if(debugprint)print*,
'sample ',varname,
' = ',pd(im/2,(jsta+jend)/2)
756 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
757 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
758 ,l,impf,jmpf,nframe,fis)
759 if(debugprint)print*,
'sample ',varname,
' = ',fis(im/2,(jsta+jend)/2)
760 where(fis /= spval)fis=fis*g
763 vcoordname=
'mid layer'
767 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
768 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
769 ,l,impf,jmpf,nframe,t(1,jsta_2l,ll))
770 if(debugprint)print*,
'sample l ',varname,
' = ',ll,t(im/2,(jsta+jend)/2,ll)
775 if(t(i,j,ll)<150.)print*,
'abnormal incoming T ',i,j,ll,t(i,j,ll)
782 if(imp_physics==5 .or. imp_physics==85 .or. imp_physics==95 .or. imp_physics==99)
then
784 vcoordname=
'mid layer'
788 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
789 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
790 ,l,impf,jmpf,nframe,q(1,jsta_2l,ll))
791 if(debugprint)print*,
'sample l ',varname,
' = ',ll,q(im/2,(jsta+jend)/2,ll)
797 vcoordname=
'mid layer'
801 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
802 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
803 ,l,impf,jmpf,nframe,uh(1,jsta_2l,ll))
804 if(debugprint)print*,
'sample l ',varname,
' = ',ll,uh(im/2,(jsta+jend)/2,ll)
808 call exch(buf(1,jsta_2l))
809 if(debugprint)print*,
'sample l u = ',ll,buf(im/2,(jsta+jend)/2)
818 if(iim1<1)iim1=iim1+im
819 if (ii > im) ii = ii - im
820 uh(i,j,ll)=(buf(i,j)+buf(im1,j)+buf(ii,j)+buf(iim1,j))/4.0
822 uh(i,j,ll)=(buf(i,j)+buf(im1,j)+buf(im1,jm1)+buf(i,jm1))/4.0
831 vcoordname=
'mid layer'
835 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
836 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
837 ,l,impf,jmpf,nframe,vh(1,jsta_2l,ll))
838 if(debugprint)print*,
'sample l ',varname,
' = ',ll,vh(im/2,(jsta+jend)/2,ll)
842 call exch(buf(1,jsta_2l))
843 if(debugprint)print*,
'sample l v = ',ll,buf(im/2,(jsta+jend)/2)
852 if(iim1<1)iim1=iim1+im
853 if (ii > im) ii = ii - im
854 vh(i,j,ll)=(buf(i,j)+buf(im1,j)+buf(ii,j)+buf(iim1,j))/4.0
856 vh(i,j,ll)=(buf(i,j)+buf(im1,j)+buf(im1,jm1)+buf(i,jm1))/4.0
866 call nemsio_getheadvar(nfile,trim(varname),eta1,iret)
868 print*,varname,
" not found in file-Assigned missing values"
872 call mpi_bcast(eta1,lm+1,mpi_real,0,mpi_comm_comp,iret)
876 call nemsio_getheadvar(nfile,trim(varname),eta2,iret)
878 print*,varname,
" not found in file-Assigned missing values"
882 call mpi_bcast(eta2,lm+1,mpi_real,0,mpi_comm_comp,iret)
884 open(75,file=
'ETAPROFILE.txt',form=
'formatted', &
887 write(75,1020)l, eta1(lm+2-l), eta2(lm+2-l)
889 1020
format(i3,2e17.10)
894 call nemsio_getheadvar(nfile,trim(varname),pdtop,iret)
896 print*,varname,
" not found in file-Assigned missing values"
900 call mpi_bcast(pdtop,1,mpi_real,0,mpi_comm_comp,iret)
904 call nemsio_getheadvar(nfile,trim(varname),pt,iret)
906 print*,varname,
" not found in file-Assigned missing values"
910 call mpi_bcast(pt,1,mpi_real,0,mpi_comm_comp,iret)
911 if(me==0) print*,
'PT, PDTOP= ',pt,pdtop
916 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
917 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
918 ,l,impf,jmpf,nframe,pblh)
919 if(debugprint)print*,
'sample ',varname,
' = ',pblh(im/2,(jsta+jend)/2)
924 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
925 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
926 ,l,impf,jmpf,nframe,mixht)
927 if(debugprint)print*,
'sample ',varname,
' = ',mixht(im/2,(jsta+jend)/2)
932 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
933 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
934 ,l,impf,jmpf,nframe,ustar)
935 if(debugprint)print*,
'sample ',varname,
' = ',ustar(im/2,(jsta+jend)/2)
940 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
941 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
942 ,l,impf,jmpf,nframe,z0)
943 if(debugprint)print*,
'sample ',varname,
' = ',z0(im/2,(jsta+jend)/2)
948 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
949 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
950 ,l,impf,jmpf,nframe,ths)
951 if(debugprint)print*,
'sample ',varname,
' = ',ths(im/2,(jsta+jend)/2)
956 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
957 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
958 ,l,impf,jmpf,nframe,qs)
959 if(debugprint)print*,
'sample ',varname,
' = ',qs(im/2,(jsta+jend)/2)
964 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
965 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
966 ,l,impf,jmpf,nframe,twbs)
967 if(debugprint)print*,
'sample ',varname,
' = ',twbs(im/2,(jsta+jend)/2)
972 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
973 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
974 ,l,impf,jmpf,nframe,qwbs)
975 if(debugprint)print*,
'sample ',varname,
' = ',qwbs(im/2,(jsta+jend)/2)
980 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
981 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
982 ,l,impf,jmpf,nframe,prec)
983 if(debugprint)print*,
'sample ',varname,
' = ',prec(im/2,(jsta+jend)/2)
988 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
989 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
990 ,l,impf,jmpf,nframe,acprec)
991 if(debugprint)print*,
'sample ',varname,
' = ',acprec(im/2,(jsta+jend)/2)
996 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
997 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
998 ,l,impf,jmpf,nframe,cuprec)
999 if(debugprint)print*,
'sample ',varname,
' = ',cuprec(im/2,(jsta+jend)/2)
1004 ancprc(i,j)=acprec(i,j)-cuprec(i,j)
1011 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1012 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1013 ,l,impf,jmpf,nframe,lspa)
1014 if(debugprint)print*,
'sample ',varname,
' = ',lspa(im/2,(jsta+jend)/2)
1019 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1020 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1021 ,l,impf,jmpf,nframe,sno)
1022 if(debugprint)print*,
'sample ',varname,
' = ',sno(im/2,(jsta+jend)/2)
1027 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1028 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1029 ,l,impf,jmpf,nframe,snoavg)
1030 if(debugprint)print*,
'sample ',varname,
' = ',snoavg(im/2,(jsta+jend)/2)
1035 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1036 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1037 ,l,impf,jmpf,nframe,psfcavg)
1038 if(debugprint)print*,
'sample ',varname,
' = ',psfcavg(im/2,(jsta+jend)/2)
1041 vcoordname=
'10 m above gnd'
1043 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1044 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1045 ,l,impf,jmpf,nframe,t10avg)
1046 if(debugprint)print*,
'sample ',varname,
' = ',t10avg(im/2,(jsta+jend)/2)
1049 vcoordname=
'10 m above gnd'
1051 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1052 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1053 ,l,impf,jmpf,nframe,t10m)
1054 if(debugprint)print*,
'sample ',varname,
' = ',t10m(im/2,(jsta+jend)/2)
1059 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1060 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1061 ,l,impf,jmpf,nframe,akhsavg)
1062 if(debugprint)print*,
'sample ',varname,
' = ',akhsavg(im/2,(jsta+jend)/2)
1067 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1068 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1069 ,l,impf,jmpf,nframe,akmsavg)
1070 if(debugprint)print*,
'sample ',varname,
' = ',akmsavg(im/2,(jsta+jend)/2)
1075 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1076 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1077 ,l,impf,jmpf,nframe,refd_max)
1078 if(debugprint)print*,
'sample ',varname,
' = ',refd_max(im/2,(jsta+jend)/2)
1083 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1084 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1085 ,l,impf,jmpf,nframe,w_up_max)
1086 if(debugprint)print*,
'sample ',varname,
' = ',w_up_max(im/2,(jsta+jend)/2)
1091 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1092 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1093 ,l,impf,jmpf,nframe,w_dn_max)
1094 if(debugprint)print*,
'sample ',varname,
' = ',w_dn_max(im/2,(jsta+jend)/2)
1099 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1100 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1101 ,l,impf,jmpf,nframe,up_heli_max)
1102 if(debugprint)print*,
'sample ',varname,
' = ',up_heli_max(im/2,(jsta+jend)/2)
1107 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1108 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1109 ,l,impf,jmpf,nframe,prate_max)
1110 if(debugprint)print*,
'sample ',varname,
' = ',prate_max(im/2,(jsta+jend)/2)
1115 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1116 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1117 ,l,impf,jmpf,nframe,fprate_max)
1118 if(debugprint)print*,
'sample ',varname,
' = ',fprate_max(im/2,(jsta+jend)/2)
1123 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1124 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1125 ,l,impf,jmpf,nframe,si)
1126 if(debugprint)print*,
'sample ',varname,
' = ',si(im/2,(jsta+jend)/2)
1131 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1132 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1133 ,l,impf,jmpf,nframe,cldefi)
1134 if(debugprint)print*,
'sample ',varname,
' = ',cldefi(im/2,(jsta+jend)/2)
1137 vcoordname=
'10 m above gnd'
1139 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1140 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1141 ,l,impf,jmpf,nframe,th10)
1142 if(debugprint)print*,
'sample ',varname,
' = ',th10(im/2,(jsta+jend)/2)
1145 vcoordname=
'10 m above gnd'
1147 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1148 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1149 ,l,impf,jmpf,nframe,q10)
1150 if(debugprint)print*,
'sample ',varname,
' = ',q10(im/2,(jsta+jend)/2)
1155 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1156 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1157 ,l,impf,jmpf,nframe,pshltr)
1158 if(debugprint)print*,
'sample ',varname,
' = ',pshltr(im/2,(jsta+jend)/2), &
1159 'max=',maxval(pshltr(1:im,jsta:jend)),minval(pshltr(1:im,jsta:jend))
1164 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1165 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1166 ,l,impf,jmpf,nframe,tshltr)
1167 if(debugprint)print*,
'sample ',varname,
' = ',tshltr(im/2,(jsta+jend)/2)
1172 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1173 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1174 ,l,impf,jmpf,nframe,qshltr)
1175 if(debugprint)print*,
'sample ',varname,
' = ',qshltr(im/2,(jsta+jend)/2)
1183 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1184 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1185 ,l,impf,jmpf,nframe,maxtshltr)
1186 if(debugprint)print*,
'sample ',varname,
' = ',maxtshltr(im/2,(jsta+jend)/2)
1191 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1192 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1193 ,l,impf,jmpf,nframe,mintshltr)
1194 if(debugprint)print*,
'sample ',varname,
' = ',mintshltr(im/2,(jsta+jend)/2)
1199 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1200 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1201 ,l,impf,jmpf,nframe,maxrhshltr)
1202 if(debugprint)print*,
'sample ',varname,
' = ',maxrhshltr(im/2,(jsta+jend)/2)
1207 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1208 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1209 ,l,impf,jmpf,nframe,minrhshltr)
1210 if(debugprint)print*,
'sample ',varname,
' = ',minrhshltr(im/2,(jsta+jend)/2)
1214 vcoordname=
'mid layer'
1218 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1219 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1220 ,l,impf,jmpf,nframe,q2(1,jsta_2l,ll))
1221 if(debugprint)print*,
'sample l ',varname,
' = ',ll,q2(im/2,(jsta+jend)/2,ll)
1227 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1228 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1229 ,l,impf,jmpf,nframe,akhs)
1230 if(debugprint)print*,
'sample ',varname,
' = ',akhs(im/2,(jsta+jend)/2)
1235 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1236 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1237 ,l,impf,jmpf,nframe,akms)
1238 if(debugprint)print*,
'sample ',varname,
' = ',akms(im/2,(jsta+jend)/2)
1243 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1244 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1245 ,l,impf,jmpf,nframe,albase)
1246 if(debugprint)print*,
'sample ',varname,
' = ',albase(im/2,(jsta+jend)/2)
1251 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1252 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1253 ,l,impf,jmpf,nframe,albedo)
1254 if(debugprint)print*,
'sample ',varname,
' = ',albedo(im/2,(jsta+jend)/2)
1259 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1260 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1261 ,l,impf,jmpf,nframe,czen)
1262 if(debugprint)print*,
'sample ',varname,
' = ',czen(im/2,(jsta+jend)/2)
1267 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1268 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1269 ,l,impf,jmpf,nframe,czmean)
1270 if(debugprint)print*,
'sample ',varname,
' = ',czmean(im/2,(jsta+jend)/2)
1275 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1276 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1277 ,l,impf,jmpf,nframe,mxsnal)
1278 if(debugprint)print*,
'sample ',varname,
' = ',mxsnal(im/2,(jsta+jend)/2)
1283 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1284 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1285 ,l,impf,jmpf,nframe,radot)
1286 if(debugprint)print*,
'sample ',varname,
' = ',radot(im/2,(jsta+jend)/2)
1291 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1292 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1293 ,l,impf,jmpf,nframe,sigt4)
1294 if(debugprint)print*,
'sample ',varname,
' = ',sigt4(im/2,(jsta+jend)/2)
1299 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1300 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1301 ,l,impf,jmpf,nframe,tg)
1302 if(debugprint)print*,
'sample ',varname,
' = ',tg(im/2,(jsta+jend)/2)
1305 if(imp_physics==5 .or. imp_physics==85 .or. imp_physics==95 .or. imp_physics==99)
then
1308 vcoordname=
'mid layer'
1312 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1313 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1314 ,l,impf,jmpf,nframe,cwm(1,jsta_2l,ll))
1315 if(debugprint)print*,
'sample l ',varname,
' = ',ll,cwm(im/2,(jsta+jend)/2,ll)
1319 vcoordname=
'mid layer'
1323 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1324 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1325 ,l,impf,jmpf,nframe,f_ice(1,jsta_2l,ll))
1326 if(debugprint)print*,
'sample l ',varname,
' = ',ll,f_ice(im/2,(jsta+jend)/2,ll)
1327 if(debugprint)print*,
'max min ',varname,
' = ',ll,maxval(f_ice(:,:,ll)),minval(f_ice(:,:,ll))
1331 vcoordname=
'mid layer'
1335 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1336 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1337 ,l,impf,jmpf,nframe,f_rain(1,jsta_2l,ll))
1338 if(debugprint)print*,
'sample l ',varname,
' = ',ll,f_rain(im/2,(jsta+jend)/2,ll)
1339 if(debugprint)print*,
'max min ',varname,
' = ',ll,maxval(f_rain(:,:,ll)),minval(f_rain(:,:,ll))
1342 if(imp_physics /= 99)
then
1344 vcoordname=
'mid layer'
1348 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1349 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1350 ,l,impf,jmpf,nframe,f_rimef(1,jsta_2l,ll))
1351 if(debugprint)print*,
'sample l ',varname,
' = ',ll,f_rimef(im/2,(jsta+jend)/2,ll)
1352 if(debugprint)print*,
'max min ',varname,
' = ',ll,maxval(f_rimef(:,:,ll)),minval(f_rimef(:,:,ll))
1356 if(imp_physics==5)
then
1358 vcoordname=
'mid layer'
1361 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1362 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1363 ,l,impf,jmpf,nframe,ref_10cm(1,jsta_2l,ll))
1364 if(debugprint)print*,
'sample l ',varname,
' = ' &
1365 ,ll,ref_10cm(im/2,(jsta+jend)/2,ll)
1366 if(debugprint)print*,
'max min ',varname,
' = ' &
1367 ,ll,maxval(ref_10cm(:,:,ll)),minval(ref_10cm(:,:,ll))
1372 if(imp_physics==8 .or. imp_physics==9)
then
1374 vcoordname=
'mid layer'
1377 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1378 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1379 ,l,impf,jmpf,nframe,qqni(1,jsta_2l,ll))
1380 if(debugprint)print*,
'sample l ',varname,
' = ' &
1381 ,ll,qqni(im/2,(jsta+jend)/2,ll)
1382 if(debugprint)print*,
'max min ',varname,
' = ' &
1383 ,ll,maxval(qqni(:,:,ll)),minval(qqni(:,:,ll))
1387 vcoordname=
'mid layer'
1390 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1391 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1392 ,l,impf,jmpf,nframe,qqnr(1,jsta_2l,ll))
1393 if(debugprint)print*,
'sample l ',varname,
' = ' &
1394 ,ll,qqnr(im/2,(jsta+jend)/2,ll)
1395 if(debugprint)print*,
'max min ',varname,
' = ' &
1396 ,ll,maxval(qqnr(:,:,ll)),minval(qqnr(:,:,ll))
1402 vcoordname=
'mid layer'
1405 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1406 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1407 ,l,impf,jmpf,nframe,q(1,jsta_2l,ll))
1409 do j=jsta_2l,jend_2u
1411 q(i,j,ll) = max(10e-12,q(i,j,ll))
1412 q(i,j,ll) = q(i,j,ll) / (1.0+q(i,j,ll))
1415 if(debugprint)print*,
'sample l ',varname,
' = ' &
1416 ,ll,q(im/2,(jsta+jend)/2,ll)
1417 if(debugprint)print*,
'max min ',varname,
' = ' &
1418 ,ll,maxval(q(:,:,ll)),minval(q(:,:,ll))
1423 do j=jsta_2l,jend_2u
1435 if(imp_physics/=0)
then
1437 vcoordname=
'mid layer'
1440 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1441 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1442 ,l,impf,jmpf,nframe,qqw(1,jsta_2l,ll))
1443 if(imp_physics==3)
then
1445 do j=jsta_2l,jend_2u
1447 if(t(i,j,ll)<tfrz) qqi(i,j,ll) = qqw(i,j,ll)
1452 do j=jsta_2l,jend_2u
1454 cwm(i,j,ll) = qqw(i,j,ll)
1457 if(debugprint)print*,
'sample l ',varname,
' = ' &
1458 ,ll,qqw(im/2,(jsta+jend)/2,ll)
1459 if(debugprint)print*,
'max min ',varname,
' = ' &
1460 ,ll,maxval(qqw(:,:,ll)),minval(qqw(:,:,ll))
1465 if(imp_physics/=0 .and. imp_physics/=1 .and. imp_physics/=3)
then
1467 vcoordname=
'mid layer'
1470 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1471 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1472 ,l,impf,jmpf,nframe,qqi(1,jsta_2l,ll))
1474 do j=jsta_2l,jend_2u
1476 cwm(i,j,ll) = cwm(i,j,ll) + qqi(i,j,ll)
1479 if(debugprint)print*,
'sample l ',varname,
' = ' &
1480 ,ll,qqi(im/2,(jsta+jend)/2,ll)
1481 if(debugprint)print*,
'max min ',varname,
' = ' &
1482 ,ll,maxval(qqi(:,:,ll)),minval(qqi(:,:,ll))
1486 if(imp_physics/=0)
then
1488 vcoordname=
'mid layer'
1491 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1492 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1493 ,l,impf,jmpf,nframe,qqr(1,jsta_2l,ll))
1494 if(imp_physics==3)
then
1496 do j=jsta_2l,jend_2u
1498 if(t(i,j,ll)<tfrz) qqs(i,j,ll) = qqr(i,j,ll)
1503 do j=jsta_2l,jend_2u
1505 cwm(i,j,ll) = cwm(i,j,ll) + qqr(i,j,ll)
1508 if(debugprint)print*,
'sample l ',varname,
' = ' &
1509 ,ll,qqr(im/2,(jsta+jend)/2,ll)
1510 if(debugprint)print*,
'max min ',varname,
' = ' &
1511 ,ll,maxval(qqr(:,:,ll)),minval(qqr(:,:,ll))
1515 if(imp_physics/=0 .and. imp_physics/=1 .and. imp_physics/=3)
then
1517 vcoordname=
'mid layer'
1520 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1521 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1522 ,l,impf,jmpf,nframe,qqs(1,jsta_2l,ll))
1524 do j=jsta_2l,jend_2u
1526 cwm(i,j,ll) = cwm(i,j,ll) + qqs(i,j,ll)
1529 if(debugprint)print*,
'sample l ',varname,
' = ' &
1530 ,ll,qqs(im/2,(jsta+jend)/2,ll)
1531 if(debugprint)print*,
'max min ',varname,
' = ' &
1532 ,ll,maxval(qqs(:,:,ll)),minval(qqs(:,:,ll))
1536 if(imp_physics==2 .or. imp_physics==6 .or. imp_physics==8)
then
1538 vcoordname=
'mid layer'
1541 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1542 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1543 ,l,impf,jmpf,nframe,qqg(1,jsta_2l,ll))
1545 do j=jsta_2l,jend_2u
1547 cwm(i,j,ll) = cwm(i,j,ll) + qqg(i,j,ll)
1550 if(debugprint)print*,
'sample l ',varname,
' = ' &
1551 ,ll,qqg(im/2,(jsta+jend)/2,ll)
1552 if(debugprint)print*,
'max min ',varname,
' = ' &
1553 ,ll,maxval(qqg(:,:,ll)),minval(qqg(:,:,ll))
1557 if(imp_physics==8)
then
1559 vcoordname=
'mid layer'
1562 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1563 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1564 ,l,impf,jmpf,nframe,ref_10cm(1,jsta_2l,ll))
1565 if(debugprint)print*,
'sample l ',varname,
' = ' &
1566 ,ll,ref_10cm(im/2,(jsta+jend)/2,ll)
1567 if(debugprint)print*,
'max min ',varname,
' = ' &
1568 ,ll,maxval(ref_10cm(:,:,ll)),minval(ref_10cm(:,:,ll))
1572 vcoordname=
'mid layer'
1575 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1576 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1577 ,l,impf,jmpf,nframe,radius_cloud(1,jsta_2l,ll))
1578 if(debugprint)print*,
'sample l ',varname,
' = ' &
1579 ,ll,radius_cloud(im/2,(jsta+jend)/2,ll)
1580 if(debugprint)print*,
'max min ',varname,
' = ' &
1581 ,ll,maxval(radius_cloud(:,:,ll)),minval(radius_cloud(:,:,ll))
1585 vcoordname=
'mid layer'
1588 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1589 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1590 ,l,impf,jmpf,nframe,radius_ice(1,jsta_2l,ll))
1591 if(debugprint)print*,
'sample l ',varname,
' = ' &
1592 ,ll,radius_ice(im/2,(jsta+jend)/2,ll)
1593 if(debugprint)print*,
'max min ',varname,
' = ' &
1594 ,ll,maxval(radius_ice(:,:,ll)),minval(radius_ice(:,:,ll))
1598 vcoordname=
'mid layer'
1601 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1602 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1603 ,l,impf,jmpf,nframe,radius_snow(1,jsta_2l,ll))
1604 if(debugprint)print*,
'sample l ',varname,
' = ' &
1605 ,ll,radius_snow(im/2,(jsta+jend)/2,ll)
1606 if(debugprint)print*,
'max min ',varname,
' = ' &
1607 ,ll,maxval(radius_snow(:,:,ll)),minval(radius_snow(:,:,ll))
1616 vcoordname=
'mid layer'
1620 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1621 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1622 ,l,impf,jmpf,nframe,cfr(1,jsta_2l,ll))
1623 if(debugprint)print*,
'sample l ',varname,
' = ',ll,cfr(im/2,(jsta+jend)/2,ll)
1629 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1630 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1631 ,l,impf,jmpf,nframe,sr)
1632 if(debugprint)print*,
'sample ',varname,
' = ',sr(im/2,(jsta+jend)/2)
1637 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1638 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1639 ,l,impf,jmpf,nframe,cfrach)
1640 if(debugprint)print*,
'sample ',varname,
' = ',cfrach(im/2,(jsta+jend)/2)
1645 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1646 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1647 ,l,impf,jmpf,nframe,cfracl)
1648 if(debugprint)print*,
'sample ',varname,
' = ',cfracl(im/2,(jsta+jend)/2)
1653 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1654 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1655 ,l,impf,jmpf,nframe,cfracm)
1656 if(debugprint)print*,
'sample ',varname,
' = ',cfracm(im/2,(jsta+jend)/2)
1661 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1662 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1663 ,l,impf,jmpf,nframe,islope)
1664 if(debugprint)print*,
'sample ',varname,
' = ',islope(im/2,(jsta+jend)/2)
1673 call nemsio_getheadvar(nfile,trim(varname),sldpth,iret)
1682 call mpi_bcast(sldpth,4,mpi_real,0,mpi_comm_comp,iret)
1683 if(me==0)print*,
'SLDPTH= ',(sldpth(n),n=1,nsoil)
1688 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1689 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1690 ,l,impf,jmpf,nframe,cmc)
1691 if(debugprint)print*,
'sample ',varname,
' = ',cmc(im/2,(jsta+jend)/2)
1696 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1697 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1698 ,l,impf,jmpf,nframe,grnflx)
1699 if(debugprint)print*,
'sample ',varname,
' = ',grnflx(im/2,(jsta+jend)/2)
1704 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1705 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1706 ,l,impf,jmpf,nframe,pctsno)
1707 if(debugprint)print*,
'sample ',varname,
' = ',pctsno(im/2,(jsta+jend)/2)
1712 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1713 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1714 ,l,impf,jmpf,nframe,soiltb)
1715 if(debugprint)print*,
'sample ',varname,
' = ',soiltb(im/2,(jsta+jend)/2)
1719 if(soiltb(i,j)>350.)print*,
'large soiltb='
1727 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1728 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1729 ,l,impf,jmpf,nframe,vegfrc)
1730 if(debugprint)print*,
'sample ',varname,
' = ',vegfrc(im/2,(jsta+jend)/2)
1733 vcoordname=
'soil layer'
1735 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1736 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1737 ,l,impf,jmpf,nframe,sh2o(1,jsta_2l,l))
1738 if(debugprint)print*,
'sample l ',varname,
' = ',l,sh2o(im/2,(jsta+jend)/2,l)
1741 vcoordname=
'soil layer'
1743 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1744 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1745 ,l,impf,jmpf,nframe,sh2o(1,jsta_2l,l))
1746 if(debugprint)print*,
'sample l ',varname,
' = ',l,sh2o(im/2,(jsta+jend)/2,l)
1749 vcoordname=
'soil layer'
1751 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1752 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1753 ,l,impf,jmpf,nframe,sh2o(1,jsta_2l,l))
1754 if(debugprint)print*,
'sample l ',varname,
' = ',l,sh2o(im/2,(jsta+jend)/2,l)
1757 vcoordname=
'soil layer'
1759 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1760 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1761 ,l,impf,jmpf,nframe,sh2o(1,jsta_2l,l))
1762 if(debugprint)print*,
'sample l ',varname,
' = ',l,sh2o(im/2,(jsta+jend)/2,l)
1765 vcoordname=
'soil layer'
1767 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1768 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1769 ,l,impf,jmpf,nframe,smc(1,jsta_2l,l))
1770 if(debugprint)print*,
'sample l ',varname,
' = ',l,smc(im/2,(jsta+jend)/2,l)
1773 vcoordname=
'soil layer'
1775 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1776 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1777 ,l,impf,jmpf,nframe,smc(1,jsta_2l,l))
1778 if(debugprint)print*,
'sample l ',varname,
' = ',l,smc(im/2,(jsta+jend)/2,l)
1781 vcoordname=
'soil layer'
1783 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1784 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1785 ,l,impf,jmpf,nframe,smc(1,jsta_2l,l))
1786 if(debugprint)print*,
'sample l ',varname,
' = ',l,smc(im/2,(jsta+jend)/2,l)
1789 vcoordname=
'soil layer'
1791 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1792 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1793 ,l,impf,jmpf,nframe,smc(1,jsta_2l,l))
1794 if(debugprint)print*,
'sample l ',varname,
' = ',l,smc(im/2,(jsta+jend)/2,l)
1797 vcoordname=
'soil layer'
1799 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1800 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1801 ,l,impf,jmpf,nframe,stc(1,jsta_2l,l))
1802 if(debugprint)print*,
'sample l ',varname,
' = ',l,stc(im/2,(jsta+jend)/2,l)
1805 vcoordname=
'soil layer'
1807 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1808 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1809 ,l,impf,jmpf,nframe,stc(1,jsta_2l,l))
1810 if(debugprint)print*,
'sample l ',varname,
' = ',l,stc(im/2,(jsta+jend)/2,l)
1813 vcoordname=
'soil layer'
1815 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1816 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1817 ,l,impf,jmpf,nframe,stc(1,jsta_2l,l))
1818 if(debugprint)print*,
'sample l ',varname,
' = ',l,stc(im/2,(jsta+jend)/2,l)
1821 vcoordname=
'soil layer'
1823 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1824 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1825 ,l,impf,jmpf,nframe,stc(1,jsta_2l,l))
1826 if(debugprint)print*,
'sample l ',varname,
' = ',l,stc(im/2,(jsta+jend)/2,l)
1833 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1834 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1835 ,l,impf,jmpf,nframe,pint(1,jsta_2l,ll))
1836 if(debugprint)print*,
'sample l ',varname,
' = ',ll,pint(im/2,(jsta+jend)/2,ll)
1840 alpint(i,j,ll)=alog(pint(i,j,ll))
1850 if(pint(i,j,l) /= 0.0)
then
1851 alpint(i,j,l)=alog(pint(i,j,l))
1860 do j = jsta_2l, jend_2u
1862 pmid(i,j,l-1 ) = (pint(i,j,l-1)+ &
1866 if(debugprint)print*,
'sample l, PMID = ',l-1,pmid(im/2,(jsta+jend)/2,l-1)
1869 if(gridtype==
'E')
then
1871 call exch(pmid(1:im,jsta_2l:jend_2u,l))
1873 do i = 1, im-mod(j,2)
1874 IF(j == 1 .AND. i < im)
THEN
1875 pmidv(i,j,l)=0.5*(pmid(i,j,l)+pmid(i+1,j,l))
1876 ELSE IF(j==jm .AND. i<im)
THEN
1877 pmidv(i,j,l)=0.5*(pmid(i,j,l)+pmid(i+1,j,l))
1878 ELSE IF(i == 1 .AND. mod(j,2) == 0)
THEN
1879 pmidv(i,j,l)=0.5*(pmid(i,j-1,l)+pmid(i,j+1,l))
1880 ELSE IF(i == im .AND. mod(j,2) == 0 &
1882 pmidv(i,j,l)=0.5*(pmid(i,j-1,l)+pmid(i,j+1,l))
1883 ELSE IF (mod(j,2) < 1)
THEN
1884 pmidv(i,j,l)=0.25*(pmid(i,j,l)+pmid(i-1,j,l) &
1885 +pmid(i,j+1,l)+pmid(i,j-1,l))
1887 pmidv(i,j,l)=0.25*(pmid(i,j,l)+pmid(i+1,j,l) &
1888 +pmid(i,j+1,l)+pmid(i,j-1,l))
1893 else if(gridtype==
'B')
then
1895 call exch(pmid(1:im,jsta_2l:jend_2u,l))
1898 pmidv(i,j,l)=0.25*(pmid(i,j,l) + pmid(i+1,j,l) &
1899 + pmid(i,j+1,l) + pmid(i+1,j+1,l))
1906 allocate(fi(im,jsta_2l:jend_2u,2))
1909 zint(i,j,lm+1) = fis(i,j)/g
1910 if (debugprint .and. i == im/2 .and. j ==(jsta+jend)/2 )
then
1911 write(6,*)
'G,ZINT: ', g,zint(i,j,lm+1)
1913 fi(i,j,1) = fis(i,j)
1924 fi(i,j,2) = htm(i,j,l)*t(i,j,l)*(q(i,j,l)*d608+1.0)*rd* &
1925 (alpint(i,j,l+1)-alpint(i,j,l))+fi(i,j,1)
1926 zint(i,j,l) = fi(i,j,2)/g
1927 fi(i,j,1) = fi(i,j,2)
1930 if(debugprint)print*,
'L,sample HTM,T,Q,ALPINT(L+1),ALPINT(l)', &
1931 ',ZINT= ',l,htm(ii,jj,l),t(ii,jj,l), &
1932 q(ii,jj,l),alpint(ii,jj,l+1), &
1933 alpint(ii,jj,l),zint(ii,jj,l)
1936 print*,
'finish deriving geopotential in nmm'
1937 write(*,*)
' after ZINT lm=',lm,
' js=',js,
' je=',je,
' im=',im
1938 write(*,*)
' zmid lbounds=',lbound(zmid),
' ubounds=',ubound(zmid)
1939 write(*,*)
' zint lbounds=',lbound(zint),
' ubounds=',ubound(zint)
1940 write(*,*)
' pmid lbounds=',lbound(pmid),
' ubounds=',ubound(pmid)
1941 write(*,*)
' pint lbounds=',lbound(pint),
' ubounds=',ubound(pint)
1956 fact = (log(pmid(i,j,l))-log(pint(i,j,l))) &
1957 / (log(pint(i,j,l+1))-log(pint(i,j,l)))
1958 zmid(i,j,l) = zint(i,j,l) + (zint(i,j,l+1)-zint(i,j,l))*fact
1964 vcoordname=
'mid layer'
1968 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1969 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1970 ,l,impf,jmpf,nframe,wh(1,jsta_2l,ll))
1971 if(debugprint)print*,
'sample l ',varname,
' = ',ll,wh(im/2,(jsta+jend)/2,ll)
1977 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1978 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1979 ,l,impf,jmpf,nframe,acfrcv)
1980 if(debugprint)print*,
'sample ',varname,
' = ',acfrcv(im/2,(jsta+jend)/2)
1985 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1986 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1987 ,l,impf,jmpf,nframe,acfrst)
1988 if(debugprint)print*,
'sample ',varname,
' = ',acfrst(im/2,(jsta+jend)/2)
1994 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
1995 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
1996 ,l,impf,jmpf,nframe,ssroff)
1997 if(debugprint)print*,
'sample ',varname,
' = ',ssroff(im/2,(jsta+jend)/2)
2003 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
2004 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
2005 ,l,impf,jmpf,nframe,bgroff)
2006 if(debugprint)print*,
'sample ',varname,
' = ',bgroff(im/2,(jsta+jend)/2)
2011 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
2012 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
2013 ,l,impf,jmpf,nframe,rlwin)
2014 if(debugprint)print*,
'sample ',varname,
' = ',rlwin(im/2,(jsta+jend)/2)
2019 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
2020 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
2021 ,l,impf,jmpf,nframe,rlwtoa)
2022 if(debugprint)print*,
'sample ',varname,
' = ',rlwtoa(im/2,(jsta+jend)/2)
2027 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
2028 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
2029 ,l,impf,jmpf,nframe,alwin)
2030 if(debugprint)print*,
'sample ',varname,
' = ',alwin(im/2,(jsta+jend)/2)
2035 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
2036 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
2037 ,l,impf,jmpf,nframe,alwout)
2038 if(debugprint)print*,
'sample ',varname,
' = ',alwout(im/2,(jsta+jend)/2)
2043 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
2044 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
2045 ,l,impf,jmpf,nframe,alwtoa)
2046 if(debugprint)print*,
'sample ',varname,
' = ',alwtoa(im/2,(jsta+jend)/2)
2051 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
2052 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
2053 ,l,impf,jmpf,nframe,rswin)
2054 if(debugprint)print*,
'sample ',varname,
' = ',rswin(im/2,(jsta+jend)/2)
2059 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
2060 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
2061 ,l,impf,jmpf,nframe,rswinc)
2062 if(debugprint)print*,
'sample ',varname,
' = ',rswinc(im/2,(jsta+jend)/2)
2067 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
2068 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
2069 ,l,impf,jmpf,nframe,rswout)
2070 if(debugprint)print*,
'sample ',varname,
' = ',rswout(im/2,(jsta+jend)/2)
2075 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
2076 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
2077 ,l,impf,jmpf,nframe,aswin)
2078 if(debugprint)print*,
'sample ',varname,
' = ',aswin(im/2,(jsta+jend)/2)
2083 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
2084 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
2085 ,l,impf,jmpf,nframe,aswout)
2086 if(debugprint)print*,
'sample ',varname,
' = ',aswout(im/2,(jsta+jend)/2)
2091 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
2092 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
2093 ,l,impf,jmpf,nframe,aswtoa)
2094 if(debugprint)print*,
'sample ',varname,
' = ',aswtoa(im/2,(jsta+jend)/2)
2099 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
2100 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
2101 ,l,impf,jmpf,nframe,sfcshx)
2102 if(debugprint)print*,
'sample ',varname,
' = ',sfcshx(im/2,(jsta+jend)/2)
2107 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
2108 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
2109 ,l,impf,jmpf,nframe,sfclhx)
2110 if(debugprint)print*,
'sample ',varname,
' = ',sfclhx(im/2,(jsta+jend)/2)
2115 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
2116 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
2117 ,l,impf,jmpf,nframe,subshx)
2118 if(debugprint)print*,
'sample ',varname,
' = ',subshx(im/2,(jsta+jend)/2)
2123 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
2124 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
2125 ,l,impf,jmpf,nframe,snopcx)
2126 if(debugprint)print*,
'sample ',varname,
' = ',snopcx(im/2,(jsta+jend)/2)
2131 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
2132 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
2133 ,l,impf,jmpf,nframe,sfcuvx)
2134 if(debugprint)print*,
'sample ',varname,
' = ',sfcuvx(im/2,(jsta+jend)/2)
2139 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
2140 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
2141 ,l,impf,jmpf,nframe,potevp)
2142 if(debugprint)print*,
'sample ',varname,
' = ',potevp(im/2,(jsta+jend)/2)
2145 vcoordname=
'mid layer'
2149 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
2150 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
2151 ,l,impf,jmpf,nframe,rlwtt(1,jsta_2l,ll))
2152 if(debugprint)print*,
'sample l ',varname,
' = ',ll,rlwtt(im/2,(jsta+jend)/2,ll)
2156 vcoordname=
'mid layer'
2160 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
2161 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
2162 ,l,impf,jmpf,nframe,rswtt(1,jsta_2l,ll))
2163 if(debugprint)print*,
'sample l ',varname,
' = ',ll,rswtt(im/2,(jsta+jend)/2,ll)
2165 where(rlwtt/=spval .and. rswtt/=spval)ttnd=rswtt+rlwtt
2168 vcoordname=
'mid layer'
2172 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
2173 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
2174 ,l,impf,jmpf,nframe,tcucn(1,jsta_2l,ll))
2175 if(debugprint)print*,
'sample l ',varname,
' = ',ll,tcucn(im/2,(jsta+jend)/2,ll)
2179 vcoordname=
'mid layer'
2183 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
2184 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
2185 ,l,impf,jmpf,nframe,train(1,jsta_2l,ll))
2186 if(debugprint)print*,
'sample l ',varname,
' = ',ll,train(im/2,(jsta+jend)/2,ll)
2192 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
2193 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
2194 ,l,impf,jmpf,nframe,ncfrcv)
2195 if(debugprint)print*,
'sample ',varname,
' = ',ncfrcv(im/2,(jsta+jend)/2)
2200 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
2201 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
2202 ,l,impf,jmpf,nframe,ncfrst)
2203 if(debugprint)print*,
'sample ',varname,
' = ',ncfrst(im/2,(jsta+jend)/2)
2216 call nemsio_getheadvar(nfile,trim(varname),nprec,iret)
2218 print*,varname,
" not found in file-Assigned zero"
2221 call mpi_bcast(nprec,1,mpi_integer,0,mpi_comm_comp,iret)
2222 if(debugprint)print*,
'sample ',varname,
' = ',nprec
2226 call nemsio_getheadvar(nfile,trim(varname),nphs,iret)
2228 print*,varname,
" not found in file-Assigned zero"
2231 call mpi_bcast(nphs,1,mpi_integer,0,mpi_comm_comp,iret)
2232 if(debugprint)print*,
'sample ',varname,
' = ',nphs
2236 call nemsio_getheadvar(nfile,trim(varname),nclod,iret)
2238 print*,varname,
" not found in file-Assigned zero"
2241 call mpi_bcast(nclod,1,mpi_integer,0,mpi_comm_comp,iret)
2242 if(debugprint)print*,
'sample ',varname,
' = ',nclod
2246 call nemsio_getheadvar(nfile,trim(varname),nheat,iret)
2248 print*,varname,
" not found in file-Assigned zero"
2251 call mpi_bcast(nheat,1,mpi_integer,0,mpi_comm_comp,iret)
2252 if(debugprint)print*,
'sample ',varname,
' = ',nheat
2256 call nemsio_getheadvar(nfile,trim(varname),nrdlw,iret)
2258 print*,varname,
" not found in file-Assigned zero"
2261 call mpi_bcast(nrdlw,1,mpi_integer,0,mpi_comm_comp,iret)
2262 if(debugprint)print*,
'sample ',varname,
' = ',nrdlw
2266 call nemsio_getheadvar(nfile,trim(varname),nrdsw,iret)
2268 print*,varname,
" not found in file-Assigned zero"
2271 call mpi_bcast(nrdsw,1,mpi_integer,0,mpi_comm_comp,iret)
2272 if(debugprint)print*,
'sample ',varname,
' = ',nrdsw
2276 call nemsio_getheadvar(nfile,trim(varname),nsrfc,iret)
2278 print*,varname,
" not found in file-Assigned zero"
2281 call mpi_bcast(nsrfc,1,mpi_integer,0,mpi_comm_comp,iret)
2282 if(debugprint)print*,
'sample ',varname,
' = ',nsrfc
2349 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
2350 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
2351 ,l,impf,jmpf,nframe,buf)
2352 avrain=buf(im/2,(jsta+jend)/2)
2353 if(debugprint)print*,
'sample ',varname,
' = ',avrain
2358 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
2359 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
2360 ,l,impf,jmpf,nframe,buf)
2361 avcnvc=buf(im/2,(jsta+jend)/2)
2362 if(debugprint)print*,
'sample ',varname,
' = ',avcnvc
2367 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
2368 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
2369 ,l,impf,jmpf,nframe,buf)
2370 ardlw=buf(im/2,(jsta+jend)/2)
2371 if(debugprint)print*,
'sample ',varname,
' = ',ardlw
2376 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
2377 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
2378 ,l,impf,jmpf,nframe,buf)
2379 ardsw=buf(im/2,(jsta+jend)/2)
2380 if(debugprint)print*,
'sample ',varname,
' = ',ardsw
2385 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
2386 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
2387 ,l,impf,jmpf,nframe,buf)
2388 asrfc=buf(im/2,(jsta+jend)/2)
2389 if(debugprint)print*,
'sample ',varname,
' = ',asrfc
2393 vcoordname=
'10 m above gnd'
2395 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
2396 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
2397 ,l,impf,jmpf,nframe,u10h)
2402 if(debugprint)print*,
'sample ',varname,
' = ',u10(im/2,(jsta+jend)/2)
2405 vcoordname=
'10 m above gnd'
2407 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
2408 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
2409 ,l,impf,jmpf,nframe,v10h)
2411 if(debugprint)print*,
'sample ',varname,
' = ',v10(im/2,(jsta+jend)/2)
2414 vcoordname=
'10 m above gnd'
2416 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
2417 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
2418 ,l,impf,jmpf,nframe,u10max)
2419 if(debugprint)print*,
'sample ',varname,
' = ',u10max(im/2,(jsta+jend)/2)
2422 vcoordname=
'10 m above gnd'
2424 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
2425 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
2426 ,l,impf,jmpf,nframe,v10max)
2427 if(debugprint)print*,
'sample ',varname,
' = ',v10max(im/2,(jsta+jend)/2)
2433 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
2434 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
2435 ,l,impf,jmpf,nframe,smstav)
2436 if(debugprint)print*,
'sample ',varname,
' = ',smstav(im/2,(jsta+jend)/2)
2437 if(debugprint)print*,
'MAX/MIN ',varname,
' = ' &
2438 ,maxval(smstav),minval(smstav)
2443 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
2444 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
2445 ,l,impf,jmpf,nframe,smstot)
2446 if(debugprint)print*,
'sample ',varname,
' = ',smstot(im/2,(jsta+jend)/2)
2452 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
2453 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
2454 ,l,impf,jmpf,nframe,sfcevp)
2463 where(sfcevp /= spval)ivgtyp=nint(sfcevp)
2464 if(debugprint)print*,
'sample ',varname,
' = ',ivgtyp(im/2,(jsta+jend)/2)
2469 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
2470 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
2471 ,l,impf,jmpf,nframe,sfcevp)
2472 where(sfcevp /= spval)isltyp=nint(sfcevp)
2473 if(debugprint)print*,
'sample ',varname,
' = ',isltyp(im/2,(jsta+jend)/2)
2493 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
2494 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
2495 ,l,impf,jmpf,nframe,sfcevp)
2496 if(debugprint)print*,
'sample ',varname,
' = ',sfcevp(im/2,(jsta+jend)/2)
2501 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
2502 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
2503 ,l,impf,jmpf,nframe,sfcexc)
2504 if(debugprint)print*,
'sample ',varname,
' = ',sfcexc(im/2,(jsta+jend)/2)
2505 if(debugprint)print*,
'MAX/MIN ',varname,
' = ' &
2506 ,maxval(sfcexc),minval(sfcexc)
2511 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
2512 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
2513 ,l,impf,jmpf,nframe,acsnow)
2514 if(debugprint)print*,
'sample ',varname,
' = ',acsnow(im/2,(jsta+jend)/2)
2519 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
2520 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
2521 ,l,impf,jmpf,nframe,acsnom)
2522 if(debugprint)print*,
'sample ',varname,
' = ',acsnom(im/2,(jsta+jend)/2)
2527 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
2528 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
2529 ,l,impf,jmpf,nframe,sst)
2530 if(debugprint)print*,
'sample ',varname,
' = ',sst(im/2,(jsta+jend)/2)
2534 vcoordname=
'mid layer'
2538 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
2539 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
2540 ,l,impf,jmpf,nframe,el_pbl(1,jsta_2l,ll))
2541 if(debugprint)print*,
'sample l ',varname,
' = ',ll,el_pbl(im/2,(jsta+jend)/2,ll)
2545 vcoordname=
'mid layer'
2549 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
2550 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
2551 ,l,impf,jmpf,nframe,exch_h(1,jsta_2l,ll))
2552 if(debugprint)print*,
'sample l ',varname,
' = ',ll,exch_h(im/2,(jsta+jend)/2,ll)
2558 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
2559 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
2560 ,l,impf,jmpf,nframe,thz0)
2561 if(debugprint)print*,
'sample ',varname,
' = ',thz0(im/2,(jsta+jend)/2)
2566 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
2567 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
2568 ,l,impf,jmpf,nframe,qz0)
2569 if(debugprint)print*,
'sample ',varname,
' = ',qz0(im/2,(jsta+jend)/2)
2574 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
2575 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
2576 ,l,impf,jmpf,nframe,uz0)
2577 if(debugprint)print*,
'sample ',varname,
' = ',uz0(im/2,(jsta+jend)/2)
2582 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
2583 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
2584 ,l,impf,jmpf,nframe,vz0)
2585 if(debugprint)print*,
'sample ',varname,
' = ',vz0(im/2,(jsta+jend)/2)
2606 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
2607 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
2608 ,l,impf,jmpf,nframe,htop)
2609 where(htop /= spval)htop=float(lm)-htop+1.0
2611 if(debugprint)print*,
'sample ',varname,
' = ',htop(im/2,(jsta+jend)/2)
2617 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
2618 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
2619 ,l,impf,jmpf,nframe,hbot)
2620 where(hbot /= spval)hbot=float(lm)-hbot+1.0
2622 if(debugprint)print*,
'sample ',varname,
' = ',hbot(im/2,(jsta+jend)/2)
2627 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
2628 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
2629 ,l,impf,jmpf,nframe,htopd)
2630 where(htopd /= spval)htopd=float(lm)-htopd+1.0
2632 if(debugprint)print*,
'sample ',varname,
' = ',htopd(im/2,(jsta+jend)/2)
2637 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
2638 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
2639 ,l,impf,jmpf,nframe,hbotd)
2640 where(hbotd /= spval)hbotd=float(lm)-hbotd+1.0
2642 if(debugprint)print*,
'sample ',varname,
' = ',hbotd(im/2,(jsta+jend)/2)
2647 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
2648 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
2649 ,l,impf,jmpf,nframe,htops)
2650 where(htops /= spval)htops=float(lm)-htops+1.0
2652 if(debugprint)print*,
'sample ',varname,
' = ',htops(im/2,(jsta+jend)/2)
2657 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
2658 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
2659 ,l,impf,jmpf,nframe,hbots)
2660 where(hbots /= spval)hbots=float(lm)-hbots+1.0
2662 if(debugprint)print*,
'sample ',varname,
' = ',hbots(im/2,(jsta+jend)/2)
2667 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
2668 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
2669 ,l,impf,jmpf,nframe,cuppt)
2670 if(debugprint)print*,
'sample ',varname,
' = ',cuppt(im/2,(jsta+jend)/2)
2675 call getnemsandscatter(me,nfile,im,jm,jsta,jsta_2l &
2676 ,jend_2u,mpi_comm_comp,icnt,idsp,spval,varname,vcoordname &
2677 ,l,impf,jmpf,nframe,cprate)
2678 if(debugprint)print*,
'sample ',varname,
' = ',cprate(im/2,(jsta+jend)/2)
2686 IF(abs(t(i,j,l))>1.0e-3 .and. (wh(i,j,1) < spval)) &
2687 omga(i,j,l) = -wh(i,j,l)*pmid(i,j,l)*g &
2688 / (rd*t(i,j,l)*(1.+d608*q(i,j,l)))
2696 CALL table(ptbl,ttbl,pt, &
2697 rdq,rdth,rdp,rdthe,pl,thl,qs0,sqs,sthe,the0)
2699 CALL tableq(ttblq,rdpq,rdtheq,plq,thl,stheq,the0q)
2704 WRITE(6,*)
' SPL (POSTED PRESSURE LEVELS) BELOW: '
2705 WRITE(6,51) (spl(l),l=1,lsm)
2706 50
FORMAT(14(f4.1,1x))
2707 51
FORMAT(8(f8.1,1x))
2718 IF (pthresh > 0.)
THEN
2719 pthresh = 0.01*dtq2/3.6e6
2723 tsrfc=float(nsrfc)/tsph
2724 if(me==0)
write(6,*)
'tsfrc ',tsrfc,nsrfc,tsph
2725 IF(nsrfc==0)tsrfc=float(ifhr)
2726 trdlw=float(nrdlw)/tsph
2727 IF(nrdlw==0)trdlw=float(ifhr)
2728 trdsw=float(nrdsw)/tsph
2729 IF(nrdsw==0)trdsw=float(ifhr)
2730 theat=float(nheat)/tsph
2731 IF(nheat==0)theat=float(ifhr)
2732 tclod=float(nclod)/tsph
2733 IF(nclod==0)tclod=float(ifhr)
2734 tprec=float(nprec)/tsph
2735 IF(nprec==0)tprec=float(ifhr)
2737 if(me==0)print*,
'TSRFC TRDLW TRDSW THEAT TCLOD TPREC= ' &
2738 ,tsrfc, trdlw, trdsw, theat, tclod, tprec
2759 alsl(l) = alog(spl(l))
2764 print*,
'writing out igds'
2768 IF(maptype==203)
THEN
2772 WRITE(igdout)latstart
2773 WRITE(igdout)lonstart
2783 WRITE(igdout)latlast
2784 WRITE(igdout)lonlast
2785 ELSE IF(maptype==205)
THEN
2789 WRITE(igdout)latstart
2790 WRITE(igdout)lonstart
2797 WRITE(igdout)latlast
2798 WRITE(igdout)lonlast
2803 open(111,file=
'copygb_gridnav.txt',form=
'formatted' &
2805 IF(maptype==203)
THEN
2806 write(111,1000) 2*im-1,jm,latstart,lonstart,cenlon, &
2807 nint(dxval*107.),nint(dyval*110.),cenlat,cenlat
2808 ELSE IF(maptype==205)
THEN
2809 if(grib==
"grib2")
then
2810 write(111,1000) im,jm,latstart/1000,lonstart/1000,cenlon/1000, &
2811 nint(dxval*107.)/1000,nint(dyval*110.)/1000, &
2812 cenlat/1000,cenlat/1000, &
2813 latlast/1000,lonlast/1000
28161000
format(
'255 3 ',2(i4,x),i6,x,i7,x,
'8 ',i7,x,2(i6,x),
'0 64', &
2820 IF (maptype==205)
THEN
2821 open(112,file=
'latlons_corners.txt',form=
'formatted' &
2823 if(grib==
"grib2")
then
2824 write(112,1001)latstart/1000,(lonstart/1000)-360000, &
2826 lonse/1000,latnw/1000,lonnw/1000,latlast/1000, &
2827 (lonlast/1000)-360000
28291001
format(4(i6,x,i7,x))
2836 call nemsio_close(nfile,iret=status)
2838 if(me==0)
write(*,*)
'end of INIT_NEMS'