103 implicit real*8(a-h,o-z)
108 parameter(max=280000)
113 parameter(maxppcell=5000)
116 character*80 cards(max)
117 real*8 xlat(max),xlon(max),z0(max),zm(max)
124 integer*4 ilapcell(max),ilopcell(max)
125 integer*4 poscode(max)
133 integer*4 whichcell(max)
138 integer*4 ppcell(max)
140 character*10 olddtm,newdtm,region
141 character*200 suffix1,suffix2
142 character*200 suffix2t04,suffix2t09,suffix2d3
145 character*200 gfnvmaddlat,gfnvmaddlon,gfnvmaddeht
146 character*200 gfnvsaddlat,gfnvsaddlon
147 character*200 gfnvsaddhor,gfnvmaddhor
149 character*200 gfnvmrddlat,gfnvmrddlon,gfnvmrddeht
150 character*200 gfnvsrddlat,gfnvsrddlon
151 character*200 gfnvsrddhor,gfnvmrddhor
153 character*200 gfnsmrddlat,gfnsmrddlon,gfnsmrddeht
154 character*200 gfnssrddlat,gfnssrddlon
156 character*200 gfncvrddlat,gfncvrddlon,gfncvrddeht
158 character*200 rfnvmrddlat,rfnvmrddlon,rfnvmrddeht
159 character*200 rfnvsrddlat,rfnvsrddlon
161 character*200 zfnvmrddlat,zfnvmrddlon,zfnvmrddeht
162 character*200 zfnvsrddlat,zfnvsrddlon
164 character*200 bfnvmrddlat,bfnvmrddlon,bfnvmrddeht
165 character*200 bfnvsrddlat,bfnvsrddlon
168 logical*1 nothinlat,nothinlon,nothineht
171 character*200 sadbfnvmtcdlat1000,sadbfnvmtcdlon1000
172 character*200 sadbfnvmtcdeht1000
173 character*200 sadbfnvstcdlat1000,sadbfnvstcdlon1000
175 character*200 bfnvsetelat,bfnvsetelon
176 character*200 bfnvmetelat,bfnvmetelon
177 character*200 bfnvmeteeht
179 character*200 rfnvsetelat,rfnvsetelon
180 character*200 rfnvmetelat,rfnvmetelon
181 character*200 rfnvmeteeht
185 character*200 fused,gfndv,gfnsu
187 character*200 gmtfile
198 real*8 lorvopc,lorvog0,lorvogm
199 real*8 lorvoghorddm,lorvoghordds
211 1001
format(
'BEGIN program myrms.f')
217 pi = 2.d0*dasin(1.d0)
220 s2m = (1/3600.d0)*d2r*re
229 read(5,
'(a)')agridsec
234 read(agridsec,*)igridsec
235 suffix1=trim(olddtm)//
'.'//trim(newdtm)//
'.'//trim(region)
236 suffix2=trim(suffix1)//
'.'//trim(agridsec)
237 suffix2t04=trim(suffix2)//
'.04' 238 suffix2t09=trim(suffix2)//
'.09' 239 suffix2d3=trim(suffix2)//
'.d3' 244 gmtfile =
'gmtbat05.'//trim(suffix2)
245 open(99,file=gmtfile,status=
'new',form=
'formatted')
246 write(6,1011)trim(gmtfile)
247 1011
format(6x,
'myrms.f: Creating GMT batch file ',a)
248 write(99,1030)trim(gmtfile)
249 1030
format(
'echo BEGIN batch file ',a)
256 sfn =
'dvstats.'//trim(suffix2)
257 open(2,file=sfn,status=
'old',form=
'formatted')
258 write(6,1003)trim(sfn)
259 1003
format(6x,
'myrms.f: Opening exisiting stats file ',a)
266 if(nlat.eq.0)nothinlat=.true.
267 if(nlon.eq.0)nothinlon=.true.
268 if(neht.eq.0)nothineht=.true.
276 if(.not.nothinlat)
then 277 gfnvsaddlat =
'vsaddlat.'//trim(suffix2)
278 open(21,file=gfnvsaddlat,status=
'old',form=
'formatted')
279 write(6,1010)trim(gfnvsaddlat)
281 gfnvmaddlat =
'vmaddlat.'//trim(suffix2)
282 open(26,file=gfnvmaddlat,status=
'old',form=
'formatted')
283 write(6,1010)trim(gfnvmaddlat)
286 if(.not.nothinlon)
then 287 gfnvsaddlon =
'vsaddlon.'//trim(suffix2)
288 open(22,file=gfnvsaddlon,status=
'old',form=
'formatted')
289 write(6,1010)trim(gfnvsaddlon)
291 gfnvmaddlon =
'vmaddlon.'//trim(suffix2)
292 open(27,file=gfnvmaddlon,status=
'old',form=
'formatted')
293 write(6,1010)trim(gfnvmaddlon)
296 if(.not.nothineht)
then 297 gfnvmaddeht =
'vmaddeht.'//trim(suffix2)
298 open(23,file=gfnvmaddeht,status=
'old',form=
'formatted')
299 write(6,1010)trim(gfnvmaddeht)
302 if(.not.nothinlat .and. .not.nothinlon)
then 303 gfnvsaddhor =
'vsaddhor.'//trim(suffix2)
304 open(24,file=gfnvsaddhor,status=
'old',form=
'formatted')
305 write(6,1010)trim(gfnvsaddhor)
307 gfnvmaddhor =
'vmaddhor.'//trim(suffix2)
308 open(25,file=gfnvmaddhor,status=
'old',form=
'formatted')
309 write(6,1010)trim(gfnvmaddhor)
312 1010
format(6x,
'myrms.f: ',
313 *
'Opening existing raw differential vector file ',a)
319 if(.not.nothinlat)
then 320 gfnvsrddlat =
'vsrddlat.'//trim(suffix2)
321 open(41,file=gfnvsrddlat,status=
'new',form=
'formatted')
322 write(6,1012)trim(gfnvsrddlat)
324 gfnvmrddlat =
'vmrddlat.'//trim(suffix2)
325 open(46,file=gfnvmrddlat,status=
'new',form=
'formatted')
326 write(6,1012)trim(gfnvmrddlat)
329 if(.not.nothinlon)
then 330 gfnvsrddlon =
'vsrddlon.'//trim(suffix2)
331 open(42,file=gfnvsrddlon,status=
'new',form=
'formatted')
332 write(6,1012)trim(gfnvsrddlon)
334 gfnvmrddlon =
'vmrddlon.'//trim(suffix2)
335 open(47,file=gfnvmrddlon,status=
'new',form=
'formatted')
336 write(6,1012)trim(gfnvmrddlon)
339 if(.not.nothineht)
then 340 gfnvmrddeht =
'vmrddeht.'//trim(suffix2)
341 open(43,file=gfnvmrddeht,status=
'new',form=
'formatted')
342 write(6,1012)trim(gfnvmrddeht)
345 if(.not.nothinlat .and. .not.nothinlon)
then 346 gfnvsrddhor =
'vsrddhor.'//trim(suffix2)
347 open(44,file=gfnvsrddhor,status=
'new',form=
'formatted')
348 write(6,1010)trim(gfnvsrddhor)
350 gfnvmrddhor =
'vmrddhor.'//trim(suffix2)
351 open(45,file=gfnvmrddhor,status=
'new',form=
'formatted')
352 write(6,1010)trim(gfnvmrddhor)
355 1012
format(6x,
'myrms.f: ',
356 *
'Opening output RMS differential vector file ',a)
362 if(.not.nothinlat)
then 363 gfncvrddlat =
'cvrddlat.'//trim(suffix2)
364 open(51,file=gfncvrddlat,status=
'new',form=
'formatted')
365 write(6,1013)trim(gfncvrddlat)
368 if(.not.nothinlon)
then 369 gfncvrddlon =
'cvrddlon.'//trim(suffix2)
370 open(52,file=gfncvrddlon,status=
'new',form=
'formatted')
371 write(6,1013)trim(gfncvrddlon)
374 if(.not.nothineht)
then 375 gfncvrddeht =
'cvrddeht.'//trim(suffix2)
376 open(53,file=gfncvrddeht,status=
'new',form=
'formatted')
377 write(6,1013)trim(gfncvrddeht)
380 1013
format(6x,
'myrms.f: ',
381 *
'Opening output RMS differential coverage file ',a)
388 if(.not.nothinlat)
then 389 gfnssrddlat =
'ssrddlat.'//trim(suffix2)
390 open(71,file=gfnssrddlat,status=
'new',form=
'formatted')
391 write(6,1014)trim(gfnssrddlat)
393 gfnsmrddlat =
'smrddlat.'//trim(suffix2)
394 open(76,file=gfnsmrddlat,status=
'new',form=
'formatted')
395 write(6,1014)trim(gfnsmrddlat)
398 if(.not.nothinlon)
then 399 gfnssrddlon =
'ssrddlon.'//trim(suffix2)
400 open(72,file=gfnssrddlon,status=
'new',form=
'formatted')
401 write(6,1014)trim(gfnssrddlon)
403 gfnsmrddlon =
'smrddlon.'//trim(suffix2)
404 open(77,file=gfnsmrddlon,status=
'new',form=
'formatted')
405 write(6,1014)trim(gfnsmrddlon)
408 if(.not.nothineht)
then 409 gfnsmrddeht =
'smrddeht.'//trim(suffix2)
410 open(73,file=gfnsmrddeht,status=
'new',form=
'formatted')
411 write(6,1014)trim(gfnsmrddeht)
414 1014
format(6x,
'myrms.f: ',
415 *
'Opening output RMS differential vector ',
416 *
'file (for surface):',a)
425 write(6,1004)trim(region),glamn,glamx,glomn,glomx
426 1004
format(6x,
'myrms.f: Region= ',a,/,
427 * 6x,
'myrms.f: North = ',f12.6,/,
428 * 6x,
'myrms.f: South = ',f12.6,/,
429 * 6x,
'myrms.f: West = ',f12.6,/,
430 * 6x,
'myrms.f: East = ',f12.6)
437 dgla = dble(igridsec)/3600.d0
438 dglo = dble(igridsec)/3600.d0
440 nla=idnint((glamx-glamn)/dgla)+1
441 nlo=idnint((glomx-glomn)/dglo)+1
443 write(6,3001)glamn,glamx,glomn,glomx,dgla,dglo,nla,nlo
444 3001
format(6x,
'myrms.f Cell Structure:',/,
445 *8x,
'North = ',f16.10,/,
446 *8x,
'South = ',f16.10,/,
447 *8x,
'West = ',f16.10,/,
448 *8x,
'East = ',f16.10,/,
449 *8x,
'DLat = ',f16.10,/,
450 *8x,
'DLon = ',f16.10,/,
451 *8x,
'NLat = ',i16 ,/,
487 write(6,2002)trim(gfnvsrddlat)
488 write(6,2002)trim(gfnvmrddlat)
491 write(6,2002)trim(gfnvsrddlon)
492 write(6,2002)trim(gfnvmrddlon)
495 write(6,2002)trim(gfnvmrddeht)
498 if(iloop.eq.1 .and. nothinlat)
goto 2001
499 if(iloop.eq.2 .and. nothinlon)
goto 2001
500 if(iloop.eq.3 .and. nothineht)
goto 2001
504 if(iloop.eq.1 .or. iloop.eq.3)az=0.d0
505 if(iloop.eq.2 )az=90.d0
507 2002
format(6x,
'myrms.f : RMS computing on file :',a)
512 101
format(f16.10,1x,f15.10,1x, 6x,1x, 12x,1x,f9.5,1x, 9x,1x,a6)
514 1101
format(f16.10,1x,f15.10,1x, 6x,1x, 12x,1x, 9x,1x,f9.3,1x,a6)
518 2003
format(6x,
'myrms.f : Point outside boundaries: ',
519 * f16.10,1x,f15.10,1x,f9.5,1x,a6)
540 100
read(lin,
'(a)',end=777)card
541 if(iloop.le.2)
read(card, 101)glo,gla,z,pid
542 if(iloop.eq.3)
read(card,1101)glo,gla,z,pid
553 elseif(iloop.eq.2)
then 554 coslat = dcos(gla*d2r)
555 zm(ikt) = z * s2m * coslat
559 rms0 = rms0 + z0(ikt)**2
560 rmsm = rmsm + zm(ikt)**2
564 if(gla.lt.glamn.or.gla.gt.glamx .or.
565 * glo.lt.glomn.or.glo.gt.glomx)
then 566 write(6,2003)gla,glo,z,pid
575 ila=idnint((gla-glamn)/dgla)+1
576 ilo=idnint((glo-glomn)/dglo)+1
586 if(ipos.eq.poscode(j))
then 587 ppcell(j) = ppcell(j) + 1
597 poscode(ncells) = ipos
598 ilapcell(ncells) = ila
599 ilopcell(ncells) = ilo
601 whichcell(ikt) = ncells
616 rms0 = dsqrt(rms0/nkt)
617 rmsm = dsqrt(rmsm/nkt)
619 if(iloop.eq.1)nrmslat = nkt
620 if(iloop.eq.2)nrmslon = nkt
621 if(iloop.eq.3)nrmseht = nkt
630 lorvog0 =
onzd2(multiplierlorvog*rms0)
631 g02pc = lorvopc / lorvog0
636 lorvogm =
onzd2(multiplierlorvog*rmsm)
637 gm2pc = lorvopc / lorvogm
650 write(6,2004) nkt,npid,igridsec,ncells
652 *6x,
'myrms.f: Done with file ',/,
653 *6x,
'myrms.f: Points in File : ',i10,/,
654 *6x,
'myrms.f: Points within Grid Bounds : ',i10,/,
655 *6x,
'myrms.f: Cell Size (Arcseconds) : ',i10,/,
656 *6x,
'myrms.f: Number of Cells with Data : ',i10)
658 2005
format(6x,
'myrms.f: Begin RMS computations')
662 2020
format(6x,
'myrms.f : Sorting data...')
663 call indexxi(nkt,max,whichcell,indx)
674 2010
format(i8,1x,a80,1x,4(i10))
692 write(6,2021)trim(gfnvsrddlat),trim(gfnssrddlat)
693 write(6,2021)trim(gfnvmrddlat),trim(gfnsmrddlat)
696 write(6,2021)trim(gfnvsrddlon),trim(gfnssrddlon)
697 write(6,2021)trim(gfnvmrddlon),trim(gfnsmrddlon)
700 write(6,2021)trim(gfnvmrddeht),trim(gfnsmrddeht)
703 2021
format(6x,
'myrms.f : ',
704 *
'Populating RMS diff vec file: ',a,/,
706 *
'Populating RMS diff vec surface-ready file: ',a)
712 do 401 icell=1,ncells
714 inumhi = inumlo + ppcell(icell) - 1
722 call getrms(z0,max,inumlo,inumhi,indx,
723 * maxppcell,xlat,xlon,alat,alon,rval0)
736 elseif(iloop.eq.2)
then 737 coslat = dcos(alat*d2r)
738 rvalm = rval0 * s2m * coslat
742 vc0 = dabs(rval0 * g02pc)
743 vcm = dabs(rvalm * gm2pc)
746 write(ifileout1 ,2101)alon,alat,az,vc0,rval0,rvalm
748 *
write(ifileout1+5,2101)alon,alat,az,vcm,rval0,rvalm
749 2101
format(f16.10,1x,f15.10,1x,f6.2,1x,
750 * f12.2,1x,f9.5,1x,f9.3)
753 write(ifileout3,2103)alon,alat,1.0
754 2103
format(f16.10,1x,f15.10,1x,f6.2)
757 write(ifileout2 ,2102)alon,alat,rval0
759 *
write(ifileout2+5,2102)alon,alat,rvalm
760 2102
format(f16.10,1x,f15.10,1x,f10.5)
777 baseddhors = sqrt(basedd(1)**2+basedd(2)**2)
778 baseddhorm = sqrt(basedd(4)**2+basedd(5)**2)
783 lorvoghorddm =
onzd2(multiplierlorvog*baseddhorm)
784 gm2pchordd = lorvopc / lorvoghorddm
789 lorvoghordds =
onzd2(multiplierlorvog*baseddhors)
790 gs2pchordd = lorvopc / lorvoghordds
794 *(6x,
'myrms.f: Populating RMS dd horizontal vector files')
805 2503
read(iflats,2101,end=2502)xlo1,xla1,az1,vc1,xs1,xm1
806 read(iflons,2101)xlo2,xla2,az2,vc2,xs2,xm2
807 if(xlo1.ne.xlo2)stop 10501
808 if(xla1.ne.xla2)stop 10502
811 azhor = datan2(xm2,xm1)/d2r
812 if(azhor.lt.0)azhor = azhor + 360.d0
813 xshor = dsqrt(xs1**2 + xs2**2)
814 xmhor = dsqrt(xm1**2 + xm2**2)
815 vchors = xshor * gs2pchordd
816 vchorm = xmhor * gm2pchordd
817 write(ifhors,2101)xlo1,xla1,azhor,vchors,xshor,xmhor
818 write(ifhorm,2101)xlo1,xla1,azhor,vchorm,xshor,xmhor
839 cmidlat=dcos(((glamn+glamx)/2.d0)*d2r)
840 rfnvsrddlat =
'vsrddlat.'//trim(suffix2t09)//
'.grd' 841 rfnvsrddlon =
'vsrddlon.'//trim(suffix2t09)//
'.grd' 842 rfnvmrddeht =
'vmrddeht.'//trim(suffix2t09)//
'.grd' 843 rfnvmrddlat =
'vmrddlat.'//trim(suffix2t09)//
'.grd' 844 rfnvmrddlon =
'vmrddlon.'//trim(suffix2t09)//
'.grd' 846 zfnvsrddlat =
'vsrddlat.'//trim(suffix2t09)//
'.xyz' 847 zfnvsrddlon =
'vsrddlon.'//trim(suffix2t09)//
'.xyz' 848 zfnvmrddeht =
'vmrddeht.'//trim(suffix2t09)//
'.xyz' 849 zfnvmrddlat =
'vmrddlat.'//trim(suffix2t09)//
'.xyz' 850 zfnvmrddlon =
'vmrddlon.'//trim(suffix2t09)//
'.xyz' 852 bfnvsrddlat =
'vsrddlat.'//trim(suffix2t09)//
'.b' 853 bfnvsrddlon =
'vsrddlon.'//trim(suffix2t09)//
'.b' 854 bfnvmrddeht =
'vmrddeht.'//trim(suffix2t09)//
'.b' 855 bfnvmrddlat =
'vmrddlat.'//trim(suffix2t09)//
'.b' 856 bfnvmrddlon =
'vmrddlon.'//trim(suffix2t09)//
'.b' 860 xgridmin = dble(igridsec)/60.d0
867 write(99,501)trim(gfnssrddlat),glomn,glomx,glamn,glamx,
868 * xgridmin,trim(rfnvsrddlat),cmidlat
869 write(99,501)trim(gfnsmrddlat),glomn,glomx,glamn,glamx,
870 * xgridmin,trim(rfnvmrddlat),cmidlat
875 write(99,501)trim(gfnssrddlon),glomn,glomx,glamn,glamx,
876 * xgridmin,trim(rfnvsrddlon),cmidlat
877 write(99,501)trim(gfnsmrddlon),glomn,glomx,glamn,glamx,
878 * xgridmin,trim(rfnvmrddlon),cmidlat
883 *
write(99,501)trim(gfnsmrddeht),glomn,glomx,glamn,glamx,
884 *xgridmin,trim(rfnvmrddeht),cmidlat
888 write(99,502)trim(rfnvsrddlat),trim(zfnvsrddlat)
889 write(99,502)trim(rfnvmrddlat),trim(zfnvmrddlat)
893 write(99,502)trim(rfnvsrddlon),trim(zfnvsrddlon)
894 write(99,502)trim(rfnvmrddlon),trim(zfnvmrddlon)
897 *
write(99,502)trim(rfnvmrddeht),trim(zfnvmrddeht)
901 write(99,503)trim(zfnvsrddlat),trim(bfnvsrddlat)
902 write(99,503)trim(zfnvmrddlat),trim(bfnvmrddlat)
905 write(99,503)trim(zfnvsrddlon),trim(bfnvsrddlon)
906 write(99,503)trim(zfnvmrddlon),trim(bfnvmrddlon)
909 *
write(99,503)trim(zfnvmrddeht),trim(bfnvmrddeht)
913 *
'surface ',a,
' -R',f9.5,
'/',f9.5,
'/',sp,f9.5,
'/',f9.5,s,
914 *
' -I',f0.2,
'm -G',a,
' -T0.9 -A',s,f6.4,
' -C0.01 -V -Lld')
923 *
'grd2xyz ',a,
' -bo3f > ',a)
957 sadbfnvmtcdlat1000 =
'vmtcdlat.'//trim(suffix2d3)//
'.b' 958 sadbfnvstcdlat1000 =
'vstcdlat.'//trim(suffix2d3)//
'.b' 959 sadbfnvmtcdlon1000 =
'vmtcdlon.'//trim(suffix2d3)//
'.b' 960 sadbfnvstcdlon1000 =
'vstcdlon.'//trim(suffix2d3)//
'.b' 961 sadbfnvmtcdeht1000 =
'vmtcdeht.'//trim(suffix2d3)//
'.b' 964 bfnvsetelat =
'vsetelat.'//trim(suffix2)//
'.b' 965 bfnvsetelon =
'vsetelon.'//trim(suffix2)//
'.b' 966 bfnvmetelat =
'vmetelat.'//trim(suffix2)//
'.b' 967 bfnvmetelon =
'vmetelon.'//trim(suffix2)//
'.b' 968 bfnvmeteeht =
'vmeteeht.'//trim(suffix2)//
'.b' 971 rfnvsetelat =
'vsetelat.'//trim(suffix2)//
'.grd' 972 rfnvsetelon =
'vsetelon.'//trim(suffix2)//
'.grd' 973 rfnvmetelat =
'vmetelat.'//trim(suffix2)//
'.grd' 974 rfnvmetelon =
'vmetelon.'//trim(suffix2)//
'.grd' 975 rfnvmeteeht =
'vmeteeht.'//trim(suffix2)//
'.grd' 983 write(99,801)trim(sadbfnvmtcdlat1000),
984 * trim(sadbfnvmtcdlat1000),
985 * trim(sadbfnvmtcdlat1000)
987 write(99,802)trim(bfnvmrddlat),trim(bfnvmrddlat),
992 write(99,804)trim(bfnvmetelat),trim(bfnvmetelat),
1000 write(99,801)trim(sadbfnvstcdlat1000),
1001 * trim(sadbfnvstcdlat1000),
1002 * trim(sadbfnvstcdlat1000)
1004 write(99,802)trim(bfnvsrddlat),trim(bfnvsrddlat),
1009 write(99,804)trim(bfnvsetelat),trim(bfnvsetelat),
1020 write(99,801)trim(sadbfnvmtcdlon1000),
1021 * trim(sadbfnvmtcdlon1000),
1022 * trim(sadbfnvmtcdlon1000)
1024 write(99,802)trim(bfnvmrddlon),trim(bfnvmrddlon),
1029 write(99,804)trim(bfnvmetelon),trim(bfnvmetelon),
1037 write(99,801)trim(sadbfnvstcdlon1000),
1038 * trim(sadbfnvstcdlon1000),
1039 * trim(sadbfnvstcdlon1000)
1041 write(99,802)trim(bfnvsrddlon),trim(bfnvsrddlon),
1046 write(99,804)trim(bfnvsetelon),trim(bfnvsetelon),
1057 write(99,801)trim(sadbfnvmtcdeht1000),
1058 * trim(sadbfnvmtcdeht1000),
1059 * trim(sadbfnvmtcdeht1000)
1061 write(99,802)trim(bfnvmrddeht),trim(bfnvmrddeht),
1066 write(99,804)trim(bfnvmeteeht),trim(bfnvmeteeht),
1074 *
'# ------------------------------',/,
1075 *
'# Squaring the Method Noise Grid: ',a,
' = dummy1',/,
1076 *
'# ------------------------------',/,
1077 *
'echo Squaring the Method Noise Grid: ',a,
' = dummy1',/,
1079 *a,/,
'dummy1',/,
'!')
1082 *
'# ------------------------------',/,
1083 *
'# Squaring the Data Noise Grid: ',a,
' = dummy2',/,
1084 *
'# ------------------------------',/,
1085 *
'echo Squaring the Data Noise Grid: ',a,
' = dummy2',/,
1087 *a,/,
'dummy2',/,
'!')
1089 *
'# ------------------------------',/,
1090 *
'# Adding dummy1 and dummy2 = dummy3',/,
1091 *
'# ------------------------------',/,
1092 *
'echo Adding dummy1 and dummy2 = dummy3',/,
1094 *
'dummy1',/,
'dummy2',/,
'dummy3',/,
'!')
1096 *
'# ------------------------------',/,
1097 *
'# SquareRoot dummy3 to get Trans. Error Grid: ',a,/,
1098 *
'# ------------------------------',/,
1099 *
'echo SquareRoot dummy3 to get Trans. Error Grid: ',a,/,
1101 *
'dummy3',/,a,/,
'!')
1103 *
'# ------------------------------',/,
1104 *
'# Removing dummy1, dummy2, dummy3',/,
1105 *
'# ------------------------------',/,
1106 *
'echo Removing dummy1, dummy2, dummy3',/,
1123 if(trim(olddtm).eq.
'nad83_harn' .and.
1124 * trim(newdtm).eq.
'nad83_fbn' .and.
1125 * trim(region).eq.
'conus' )
then 1130 write(99,602)trim(bfnvmetelat),
1131 * trim(bfnvmetelat)//
'.premask',
1132 * trim(bfnvmetelat)//
'.premask',
1133 * trim(bfnvmetelat),
1134 * igridsec/30,igridsec/30
1136 write(99,602)trim(bfnvsetelat),
1137 * trim(bfnvsetelat)//
'.premask',
1138 * trim(bfnvsetelat)//
'.premask',
1139 * trim(bfnvsetelat),
1140 * igridsec/30,igridsec/30
1144 write(99,602)trim(bfnvmetelon),
1145 * trim(bfnvmetelon)//
'.premask',
1146 * trim(bfnvmetelon)//
'.premask',
1147 * trim(bfnvmetelon),
1148 * igridsec/30,igridsec/30
1150 write(99,602)trim(bfnvsetelon),
1151 * trim(bfnvsetelon)//
'.premask',
1152 * trim(bfnvsetelon)//
'.premask',
1153 * trim(bfnvsetelon),
1154 * igridsec/30,igridsec/30
1158 write(99,602)trim(bfnvmeteeht),
1159 * trim(bfnvmeteeht)//
'.premask',
1160 * trim(bfnvmeteeht)//
'.premask',
1161 * trim(bfnvmeteeht),
1162 * igridsec/30,igridsec/30
1168 601
format(
'echo Applying MASK for HARN FBN CONUS ete grids')
1179 *
'Masks/mask.harnfbn.30.b',/,
1188 *
'rm -f dummy1.b',/,
1197 write(99,507)trim(bfnvmetelat)
1198 * ,glomn,glomx,glamn,glamx,xgridmin,trim(rfnvmetelat)
1199 write(99,507)trim(bfnvsetelat)
1200 * ,glomn,glomx,glamn,glamx,xgridmin,trim(rfnvsetelat)
1204 write(99,507)trim(bfnvmetelon)
1205 * ,glomn,glomx,glamn,glamx,xgridmin,trim(rfnvmetelon)
1206 write(99,507)trim(bfnvsetelon)
1207 * ,glomn,glomx,glamn,glamx,xgridmin,trim(rfnvsetelon)
1211 write(99,507)trim(bfnvmeteeht)
1212 * ,glomn,glomx,glamn,glamx,xgridmin,trim(rfnvmeteeht)
1216 *
'b2xyz << !',/,a,/,
'!',/,
1217 *
'xyz2grd temp.xyz -R',f9.5,
'/',f9.5,
'/',sp,f9.5,
'/',f9.5,s,
1218 *
' -I',f0.2,
'm -bi3f -G',a,/,
1235 write(99,1031)trim(gmtfile)
1236 1031
format(
'echo END batch file ',a)
1240 9999
format(
'END program myrms.f')
1244 2006
format(
'Cell ',i8,
' Poscode: ',i12)
1245 2007
format(6x,
'Pt : ',i5)
1250 subroutine getrms(zs,max,inumlo,inumhi,indx,
1251 *maxppcell,xlat,xlon,alat,alon,rval)
1257 real*8 xlat(max),xlon(max),zs(max)
1258 integer*4 indx(max),indx2(maxppcell)
1259 integer*4 inumlo,inumhi
1261 real*8 alat,alon,rval
1264 1
format(
'Inside getrms',/,
1265 *
'inumlo,inumhi = ',i8,1x,i8)
1289 nval = inumhi-inumlo+1
1291 do 4 i=inumlo,inumhi
1293 rval = rval + zs(indx(i))**2
1294 alat = alat + xlat(indx(i))
1295 alon = alon + xlon(indx(i))
1297 rval = dsqrt(rval/nval)
1304 include
'Subs/getgridbounds.f' 1305 include
'Subs/indexxi.for' 1306 include
'Subs/onzd2.f' subroutine indexxi(n, nd, arr, indx)
Subroutine to perform ?? indexing on integer data.
real *8 function onzd2(x)
Function to round a digit to one significant figure (one non zero digit), double precision.
subroutine getrms(zs, max, inumlo, inumhi, indx, maxppcell, xlat, xlon, alat, alon, rval)
subroutine getgridbounds(region, xn, xs, xw, xe)
Subroutine to collect up the GRID boundaries for use in creating NADCON 5.
program myrms
Part of the NADCON5 build process, generates gmtbat05