192 SUBROUTINE w3miscan(INDTA,INLSF,INGBI,INGBD,LSAT,LPROD,LBRIT,
193 $ NNALG,GBALG,KDATE,LDATE,IGNRTM,IBUFTN,IBDATE,IER)
195 LOGICAL LPROD,LBRIT,NNALG,GBALG,LSAT(240:249)
200 CHARACTER*20 RHDER,PROD2,BRITE
201 CHARACTER*46 SHDER,PROD1
203 REAL SHDR(9),RHDR(4,64),PROD(13,64),BRIT(2,448),RINC(5),
206 REAL(8) SHDR_8(9),RHDR_8(4,64),PROD_8(13,64),BRIT_8(2,448),
209 INTEGER IBUFTN(1737),KDATA(7),KDATE(5),LDATE(5),LBTER(7),
210 $ kspsat(239:249),kntsat(239:249),iflag(64),kdat(8),ldat(8),
211 $ mdat(8),icdate(5),iddate(5)
213 common/misccc/sstdat(360,180)
214 common/miscee/lflag,licec
218 DATA shder /
'SAID YEAR MNTH DAYS HOUR MINU SECO SCNN ORBN '/
219 DATA rhder /
'CLAT CLON POSN SFTG '/
220 DATA prod1 /
'VILWC REQV WSPD SMOI ICON ICAG ICED TPWT TMSK '/
221 DATA prod2 /
'TOSD RFLG SFTP SST1 '/
222 DATA brite /
'CHNM TMBR '/
223 DATA atxt /
'NN',
'GB'/
224 DATA imsg /99999/,kntscn/0/,knttim/0/,laerr/0/,
225 $ loerr/0/,lbter/7*0/,itimes/0/,nlr/0/,nir/0/,dmax/-99999./,
226 $ dmin/99999./,kspsat/11*0/,kntsat/11*0/,ilflg/0/,bmiss/10.0e10/
236 65
FORMAT(//
' ---> W3MISCAN: Y2K/F90 VERSION 08/04/2011: ',
237 $
'PROCESSING SSM/I DATA FROM BUFR DATA SET READ FROM UNIT ',
240 66
FORMAT(//
' ===> WILL READ FROM BUFR PRODUCTS DATA DUMP ',
241 $
'FILE (EITHER FNOC OR NCEP) AND PROCESS ONE OR MORE SSM/I ',
245 167
FORMAT(//
' ===> WILL READ FROM BUFR BRIGHTNESS ',
246 $
'TEMPERATURE DATA DUMP FILE AND PROCESS BRIGHTNESS ',
249 169
FORMAT(
' ===> IN ADDITION, WILL PERFORM IN-LINE ',
250 $
'CALCULATION OF NEURAL NETWORK 3 WIND SPEED AND TOTAL ',
251 $
'PRECIPITABLE WATER AND PROCESS THESE'/)
253 170
FORMAT(
' ===> IN ADDITION, WILL PERFORM IN-LINE ',
254 $
'CALCULATION OF GOODBERLET WIND SPEED AND PROCESS THESE'/)
256 IF(ignrtm.EQ.1) print 704
257 704
FORMAT(
' W3MISCAN: INPUT ARGUMENT "IGNRTM" IS SET TO 1 -- NO ',
258 $
'TIME CHECKS WILL BE PERFORMED ON SCANS - ALL SCANS READ IN ',
261 print 104, kdate,ldate
262 104
FORMAT(
' W3MISCAN: REQUESTED EARLIEST DATE:',i7,4i5/
263 $
' REQUESTED LATEST DATE:',i7,4i5)
266 kdat(1:3) = kdate(1:3)
267 kdat(5:6) = kdate(4:5)
269 ldat(1:3) = ldate(1:3)
270 ldat(5:6) = ldate(4:5)
275 IF(rinc(3).LT.0)
THEN
278 103
FORMAT(
' ##W3MISCAN: REQUESTED EARLIEST AND LATEST DATES ',
279 $
'ARE BACKWARDS!! - IER = 3'/)
288 CALL w3fi04(iendn,ichtp,lw)
289 print 2213, lw, ichtp, iendn
290 2213
FORMAT(/
' ---> W3MISCAN: CALL TO W3FI04 RETURNS: LW = ',i3,
291 $
', ICHTP = ',i3,
', IENDN = ',i3/)
295 CALL dumpbf(indta,icdate,iddate)
297 print *,
'CENTER DATE (ICDATE) = ',icdate
298 print *,
'DUMP DATE (IDDATE) = ',iddate
304 IF(icdate(1).LE.0)
GO TO 998
309 IF(iddate(1).LE.0)
GO TO 998
310 IF(icdate(1).LT.100)
THEN
319 print *,
'##W3MISCAN - THE FOLLOWING SHOULD NEVER ',
321 print *,
'##W3MISCAN - 2-DIGIT YEAR IN ICDATE(1) RETURNED ',
322 $
'FROM DUMPBF (ICDATE IS: ',icdate,
') - USE WINDOWING ',
323 $
'TECHNIQUE TO OBTAIN 4-DIGIT YEAR'
324 IF(icdate(1).GT.20)
THEN
325 icdate(1) = 1900 + icdate(1)
327 icdate(1) = 2000 + icdate(1)
329 print *,
'##W3MISCAN - CORRECTED ICDATE(1) WITH 4-DIGIT ',
330 $
'YEAR, ICDATE NOW IS: ',icdate
333 IF(iddate(1).LT.100)
THEN
342 print *,
'##W3MISCAN - THE FOLLOWING SHOULD NEVER ',
344 print *,
'##W3MISCAN - 2-DIGIT YEAR IN IDDATE(1) RETURNED ',
345 $
'FROM DUMPBF (IDDATE IS: ',iddate,
') - USE WINDOWING ',
346 $
'TECHNIQUE TO OBTAIN 4-DIGIT YEAR'
347 IF(iddate(1).GT.20)
THEN
348 iddate(1) = 1900 + iddate(1)
350 iddate(1) = 2000 + iddate(1)
352 print *,
'##W3MISCAN - CORRECTED IDDATE(1) WITH 4-DIGIT ',
353 $
'YEAR, IDDATE NOW IS: ',iddate
358 CALL openbf(indta,
'IN',indta)
361 print *,
'OPEN NCEP BUFR SSM/I DUMP FILE'
369 CALL status(indta,lun,idummy1,idummy2)
370 CALL nemtab(lun,
'PH2O',idummy1,cdummy,iret_ph2o)
371 CALL nemtab(lun,
'SNDP',idummy1,cdummy,iret_sndp)
372 CALL nemtab(lun,
'WSOS',idummy1,cdummy,iret_wsos)
373 CALL nemtab(lun,
'CH2O',idummy1,cdummy,iret_ch2o)
375 IF(lbrit.AND.(nnalg.OR.gbalg))
THEN
385 CALL misc06(ingbi,ingbd,kdate,ldate,*993,*994,*995,*996)
387 67
FORMAT(//4x,
'** W3MISCAN: OPEN R. ACCESS NESDIS LAND/SEA ',
388 $
'FILE IN UNIT ',i2/)
389 OPEN(unit=inlsf,err=997,access=
'DIRECT',iostat=ierr,recl=10980)
394 CALL readmg(indta,subset,ibdate,iret)
396 print *,
'READ FIRST BUFR MESSAGE: SUBSET = ',subset,
397 $
'; IBDATE = ',ibdate,
'; IRET = ',iret
399 IF(iret.NE.0)
GO TO 998
410 CALL readsb(indta,iret)
415 CALL readmg(indta,subset,ibdate,iret)
417 print *,
'READ NEXT BUFR MESSAGE: SUBSET = ',subset,
418 $
'; IBDATE = ',ibdate,
'; IRET = ',iret
428 124
FORMAT(/
' W3MISCAN: +++++ ALL VALID SCANS UNPACKED AND ',
429 $
'RETURNED FROM THIS NCEP BUFR SSM/I DUMP FILE'//34x,
430 $
'** W3MISCAN: SUMMARY **'//35x,
'TOTAL NUMBER OF SCANS ',
431 $
'PROCESSED AND RETURNED',11x,i7)
433 IF(kntsat(jj).GT.0)
THEN
434 print 294, jj,kntsat(jj)
435 294
FORMAT(35x,
'......NO. OF SCANS PROCESSED AND ',
436 $
'RETURNED FROM SAT',i4,
':',i7)
440 IF(kspsat(jj).GT.0)
THEN
443 print 224, ii,kspsat(jj)
444 224
FORMAT(35x,
'NO. OF SCANS SKIPPED DUE TO BEING FROM ',
445 $
'NON-REQ SAT',i4,
':',i7)
449 194
FORMAT(35x,
'NUMBER OF SCANS SKIPPED DUE TO BEING OUTSIDE ',
451 print 324, laerr,loerr
453 $/35x,
'NUMBER OF RETRIEVALS WITH LATITUDE OUT OF RANGE: ',i7/
454 $ 35x,
'NUMBER OF RETRIEVALS WITH LONGITUDE OUT OF RANGE: ',i7)
456 IF(nnalg.OR.gbalg) print 780, lbter,nlr,nir
458 $ 35x,
'NUMBER OF RETRIEVALS W/ ERROR IN 19 GHZ V BRIGHT. TEMP:',i7/
459 $ 35x,
'NUMBER OF RETRIEVALS W/ ERROR IN 19 GHZ H BRIGHT. TEMP:',i7/
460 $ 35x,
'NUMBER OF RETRIEVALS W/ ERROR IN 22 GHZ V BRIGHT. TEMP:',i7/
461 $ 35x,
'NUMBER OF RETRIEVALS W/ ERROR IN 37 GHZ V BRIGHT. TEMP:',i7/
462 $ 35x,
'NUMBER OF RETRIEVALS W/ ERROR IN 37 GHZ H BRIGHT. TEMP:',i7/
463 $ 35x,
'NUMBER OF RETRIEVALS W/ ERROR IN 85 GHZ V BRIGHT. TEMP:',i7/
464 $ 35x,
'NUMBER OF RETRIEVALS W/ ERROR IN 85 GHZ H BRIGHT. TEMP:',i7/
465 $ 35x,
'NUMBER OF RETRIEVALS REJECTED DUE TO BEING OVER LAND: ',i7/
466 $ 35x,
'NUMBER OF RETRIEVALS REJECTED DUE TO BEING OVER ICE: ',i7)
467 IF(nnalg) print 781, lflag,licec
469 $ 35x,
'NUMBER OF NN3 RETR. REJECTED DUE TO FAILING RAIN FLAG: ',i7/
470 $ 35x,
'NUMBER OF NN3 RETR. REJECTED DUE TO ICE CONTAMINATION: ',i7)
471 IF(nnalg.OR.gbalg) print 782, dmax,dmin
472 782
FORMAT(/
' ** FOR SEA-SFC TEMP AT ALL RETRIEVAL LOCATIONS: FIELD',
473 $
' MAX =',f8.3,
' DEG K, FIELD MIN =',f8.3,
' DEG K'/)
487 CALL ufbint(indta,shdr_8,09,1,nlev,shder) ; shdr = shdr_8
489 IF(nlev.NE.1)
GO TO 999
496 ibuftn(1:9) = min(imsg,nint(shdr(1:9)))
500 IF(ibuftn(1).LT.240.OR.ibuftn(1).GT.249)
THEN
501 print 523, (ibuftn(ii),ii=1,9)
502 kspsat(239) = kspsat(239) + 1
505 IF(.NOT.lsat(ibuftn(1)))
THEN
507 523
FORMAT(
' ##W3MISCAN: SCAN NOT FROM REQ. SAT. ID -SAT. ID',i4,
508 $
', SCAN TIME:',6i4,
', SCAN',i6,
', ORBIT',i8,
'-GO TO NEXT SCAN')
509 kspsat(ibuftn(1)) = kspsat(ibuftn(1)) + 1
518 mdat(1:3) = ibuftn(2:4)
519 mdat(5:7) = ibuftn(5:7)
524 IF(ksec.GT.0.OR.lsec.LT.0)
THEN
529 123
FORMAT(
' ##W3MISCAN: SCAN NOT IN REQUESTED TIME WINDOW-',
530 $
'SCAN TIME:',6i5,
' SCAN',i6,
', ORBIT',i8,
' - GO TO NEXT SCAN')
536 CALL ufbint(indta,rhdr_8,04,64,nlev,rhder) ; rhdr = rhdr_8
538 IF(nlev.NE.64)
GO TO 999
545 IF(rhdr(2,irt).LT.0.0) rhdr(2,irt) = rhdr(2,irt) + 360.
550 IF(nint(rhdr(1,irt)*100.).GE.-9000.AND.nint(rhdr(1,irt)*100.)
552 ibuftn((27*irt)-17) = nint(rhdr(1,irt)*100.)
560 print 777, irt,ibuftn(8),ibuftn(9),nint(rhdr(1,irt)*100.)
561 777
FORMAT(
' ##W3MISCAN: BAD LAT: RETR.',i3,
', SCAN',i6,
562 $
', ORBIT',i8,
'; INPUT LAT=',i7,
' - ALL DATA IN THIS ',
563 $
'RETRIEVAL SET TO MISSING')
571 IF(nint(rhdr(2,irt)*100.).GE.0.AND.nint(rhdr(2,irt)*100.).LE.
574 $ ibuftn((27*irt)-16) = nint(rhdr(2,irt)*100.)
582 print 778, irt,ibuftn(8),ibuftn(9),nint(rhdr(2,irt)*100.)
583 778
FORMAT(
' ##W3MISCAN: BAD LON: RETR.',i3,
', SCAN',i6,
584 $
', ORBIT',i8,
'; INPUT LON=',i7,
' - ALL DATA IN THIS ',
585 $
'RETRIEVAL SET TO MISSING')
590 IF(iflag(irt).NE.0)
GO TO 110
594 ibuftn((27*irt)-15) = min(imsg,nint(rhdr(3,irt)))
598 ibuftn((27*irt)-14) = min(imsg,nint(rhdr(4,irt)))
609 CALL ufbint(indta,prod_8,13,64,nlev,prod1//prod2)
611 IF(iret_ph2o.GT.0)
THEN
612 CALL ufbint(indta,ufbint_8,1,64,nlev,
'PH2O')
613 prod_8(8,:) = ufbint_8(:)
616 IF(iret_sndp.GT.0)
THEN
617 CALL ufbint(indta,ufbint_8,1,64,nlev,
'SNDP')
618 prod_8(10,:) = ufbint_8(:)
621 IF(iret_wsos.GT.0)
THEN
622 CALL ufbint(indta,ufbint_8,1,64,nlev,
'WSOS')
623 prod_8(3,:) = ufbint_8(:)
626 IF(iret_ch2o.GT.0)
THEN
627 CALL ufbint(indta,ufbint_8,1,64,nlev,
'CH2O')
628 prod_8(1,:) = ufbint_8(:)
630 CALL ufbint(indta,ufbint_8,1,64,nlev,
'METFET')
633 IF(nint(metfet(irt)).NE.12) prod_8(1,irt) = bmiss
640 print 797, ibuftn(8),ibuftn(9)
641 797
FORMAT(
' ##W3MISCAN: PRODUCTS REQ. BUT SCAN',i6,
', ORBIT',
642 $ i8,
' DOES NOT CONTAIN PRODUCT DATA - CONTINUE PROCESSING ',
643 $
'SCAN (B.TEMPS REQ.?)')
645 ELSE IF(nlev.NE.64)
THEN
652 IF(iflag(irt).NE.0)
GO TO 111
656 IF(nint(prod(01,irt)).LT.imsg)
657 $ ibuftn((27*irt)-13) = nint(prod(01,irt)*100.)
662 IF(nint(prod(02,irt)).LT.imsg)
663 $ ibuftn((27*irt)-12) = nint(prod(02,irt)*1000000.)
667 ibuftn((27*irt)-11) = min(imsg,nint(prod(03,irt)*10.))
671 IF(nint(prod(04,irt)).LT.imsg)
672 $ ibuftn((27*irt)-10) = nint(prod(04,irt)*1000.)
676 ibuftn((27*irt)-09) = min(imsg,nint(prod(05,irt)))
680 ibuftn((27*irt)-08) = min(imsg,nint(prod(06,irt)))
684 ibuftn((27*irt)-07) = min(imsg,nint(prod(07,irt)))
689 ibuftn((27*irt)-06) = min(imsg,nint(prod(08,irt)*10.))
691 IF(ibuftn((27*irt)-14).NE.5)
THEN
696 ibuftn((27*irt)-05) = min(imsg,nint(prod(09,irt)*100.))
703 ibuftn((27*irt)-05) = min(imsg,nint(prod(13,irt)*100.))
709 IF(nint(prod(10,irt)).LT.imsg)
710 $ ibuftn((27*irt)-04) = nint(prod(10,irt)*1000.)
714 ibuftn((27*irt)-03) = min(imsg,nint(prod(11,irt)))
718 ibuftn((27*irt)-02) = min(imsg,nint(prod(12,irt)))
734 CALL ufbrep(indta,brit_8,2,448,nlev,brite) ; brit = brit_8
737 print 798, ibuftn(8),ibuftn(9)
738 798
FORMAT(
' ##W3MISCAN: B. TEMPS REQ. BUT SCAN',i6,
', ORBIT',
739 $ i8,
' DOES NOT CONTAIN B. TEMP DATA - DONE PROCESSING THIS',
742 ELSE IF(nlev.NE.448)
THEN
749 IF(iflag(irt).NE.0)
GO TO 112
756 mindx = (irt * 7) - 6
757 DO lch = mindx,mindx+6
758 ichnn = nint(brit(1,lch))
759 IF(ichnn.GT.7)
GO TO 79
760 IF(nint(brit(2,lch)).LT.imsg)
THEN
761 ibuftn((27*irt)-02+ichnn) = nint(brit(2,lch)*100.)
767 IF(nnalg.OR.gbalg)
THEN
777 balon=real(mod(ibuftn((27*irt)-16)+18000,36000)-18000)/100.
778 ialon = mod(36000-ibuftn((27*irt)-16),36000)
779 ix = 361. - real(ialon)/100.
780 jy = 91 - nint(real(ibuftn((27*irt)-17))/100. + 0.50)
781 dmin = min(dmin,sstdat(ix,jy))
782 dmax = max(dmax,sstdat(ix,jy))
783 CALL misc04(inlsf,real(ibuftn((27*irt)-17))/100.,balon,lstag)
794 IF(sstdat(ix,jy).LE.272.96)
THEN
799 kdata = ibuftn((27*irt)-01:(27*irt)+05)
801 IF((it.NE.2.AND.kdata(it).LT.10000).OR.
802 $ (it.EQ.2.AND.kdata(it).LT. 8000))
THEN
803 lbter(it) = lbter(it) + 1
804 print 779,it,ibuftn(8),ibuftn(9),kdata
805 779
FORMAT(
' ##W3MISCAN: BT, CHN',i2,
' BAD: SCAN',i6,
', ORBIT',i8,
806 $
'; BT:',7i6,
'-CANNOT CALC. PRODS VIA ALG.')
813 CALL misc01(nnalg,gbalg,kdata,swnn,tpwnn,swgb,nrfgb)
819 6021
FORMAT(
' W3MISCAN: ',a2,
' SPD',f6.1,
' TPW',f6.1,
' TB19V',f6.1,
820 $
' TB22V',f6.1,
' TB37V',f6.1,
' TB37H',f6.1,
' TD37',f5.1)
824 ibuftn((27*irt)+6) = min(imsg,nint(swnn*10.))
828 ibuftn((27*irt)+7) = min(imsg,nint(tpwnn*10.))
835 602
FORMAT(
' W3MISCAN: ',a2,
' RF, SPD',i2,f6.1,
' TB19V',f6.1,
836 $
' TB22V',f6.1,
' TB37V',f6.1,
' TB37H',f6.1,
' TD37',f5.1)
840 ibuftn((27*irt)+8) = min(imsg,nint(swgb*10.))
844 ibuftn((27*irt)+9) = min(imsg,nrfgb)
854 print 879, ibuftn(8),ibuftn(9),kdata
855 879
FORMAT(
' ##W3MISCAN: ALL B.TMPS MSSNG: SCAN',i6,
', ',
856 $
'ORBIT',i8,
'; BT:',7i6,
'-CANNOT CALC PRODS VIA ALG.')
872 kntsat(ibuftn(1)) = kntsat(ibuftn(1)) + 1
883 2008
FORMAT(/
' ##W3MISCAN: SEA-SURFACE TEMPERATURE NOT FOUND IN GRIB ',
884 $
'INDEX FILE IN UNIT ',i2,
' - IER = 6'/)
897 2009
FORMAT(
' SST GRIB MSG HAS DATE WHICH IS EITHER 7-DAYS',
898 $
' PRIOR TO EARLIEST REQ. DATE'/14x,
'OR 7-DAYS LATER THAN LATEST',
899 $
' REQ. DATE - IER = 7'/)
911 2010
FORMAT(
' BYTE-ADDRESSABLE READ ERROR FOR GRIB FILE ',
912 $
'CONTAINING SEA-SURFACE TEMPERATURE FIELD - IER = 8'/)
923 2011
FORMAT(
' - IER = 9'/)
933 print 2012, ierr,inlsf
934 2012
FORMAT(/
' ##W3MISCAN: ERROR OPENING R. ACCESS LAND/SEA FILE IN ',
935 $
'UNIT ',i2,
' -- IOSTAT =',i5,
' -- NO SCANS PROCESSED - IER = 4'/)
946 14
FORMAT(/
' ##W3MISCAN: SSM-I DATA SET IN UNIT',i3,
' IS EITHER ',
947 $
'EMPTY (NULL), NOT BUFR, OR CONTAINS NO DATA MESSAGES - IER = 2'/)
957 print 217, nlev,ilflg
958 217
FORMAT(/
' ##W3MISCAN: THE NUMBER OF DECODED "LEVELS" (=',i5,
') ',
959 $
'IS NOT WHAT IS EXPECTED (ILFLG=',i1,
') - IER = 5'/)
1243 parameter(in =5, hid =12, out =4)
1244 dimension x(in),y(out),w1(in,hid),w2(hid,out),b1(hid),b2(out),
1245 $ o1(in),x2(hid),o2(hid),x3(out),o3(out),a(out),b(out)
1249 DATA ((w1(i,j),j = 1,hid),i = 1,in)/
1250 $-0.0435901, 0.0614709,-0.0453639,-0.0161106,-0.0271382, 0.0229015,
1251 $-0.0650678, 0.0704302, 0.0383939, 0.0773921, 0.0661954,-0.0643473,
1252 $-0.0108528,-0.0283174,-0.0308437,-0.0199316,-0.0131226, 0.0107767,
1253 $ 0.0234265,-0.0291637, 0.0140943, .00567931,-.00931768,
1254 $-.00860661, 0.0159747,-0.0749903,-0.0503523, 0.0524172, 0.0195771,
1255 $ 0.0302056, 0.0331725, 0.0326714,-0.0291429, 0.0180438, 0.0281923,
1256 $-0.0269554, 0.102836, 0.0591511, 0.134313, -0.0109854,-0.0786303,
1257 $ 0.0117111, 0.0231543,-0.0205603,-0.0382944,-0.0342049,
1258 $ 0.00052407,0.110301, -0.0404777, 0.0428816, 0.0878070, 0.0168326,
1259 $ 0.0196183, 0.0293995, 0.00954805,-.00716287,0.0269475,
1260 $-0.0418217,-0.0165812, 0.0291809/
1264 DATA ((w2(i,j),j = 1,out),i = 1,hid)/
1265 $-0.827004, -0.169961,-0.230296, -0.311201, -0.243296, 0.00454425,
1266 $ 0.950679, 1.09296, 0.0842604, 0.0140775, 1.80508, -0.198263,
1267 $-0.0678487, 0.428192, 0.827626, 0.253772, 0.112026, 0.00563793,
1268 $-1.28161, -0.169509, 0.0019085,-0.137136, -0.334738, 0.224899,
1269 $-0.189678, 0.626459,-0.204658, -0.885417, -0.148720, 0.122903,
1270 $ 0.650024, 0.715758, 0.735026, -0.123308, -0.387411,-0.140137,
1271 $ 0.229058, 0.244314,-1.08613, -0.294565, -0.192568, 0.608760,
1272 $-0.753586, 0.897605, 0.0322991,-0.178470, 0.0807701,
1277 DATA (b1(i), i=1,hid)/
1278 $ -9.92116,-10.3103,-17.2536, -5.26287, 17.7729,-20.4812,
1279 $ -4.80869,-11.5222, 0.592880,-4.89773,-17.3294, -7.74136/
1283 DATA (b2(i), i=1,out)/-0.882873,-0.0120802,-3.19400,1.00314/
1287 DATA (a(i), i=1,out)/18.1286,31.8210,0.198863,37.1250/
1288 DATA (b(i), i=1,out)/13.7100,32.0980,0.198863,-5.82500/
1301 x2(i) = x2(i) + (o1(j) * w1(j,i))
1303 x2(i) = x2(i) + b1(i)
1312 x3(k) = x3(k) + (w2(j,k) * o2(j))
1315 x3(k) = x3(k) + b2(k)
1320 y(k) = (a(k) * o3(k)) + b(k)
1568 SUBROUTINE misc06(INGBI,INGBD,IDAT1,IDAT2,*,*,*,*)
1569 parameter(maxpts=360*180)
1570 LOGICAL*1 LBMS(360,180)
1571 INTEGER KPDS(200),KGDS(200),LPDS(200),LGDS(200),IDAT1(5),
1572 $ idat2(5),jdat1(8),jdat2(8),kdat(8),ldat(8),mdate(8)
1575 CHARACTER*80 FILEB,FILEI
1576 common/misccc/sstdat(360,180)
1581 WRITE(envvar(9:10),fmt=
'(I2)') ingbd
1582 CALL getenv(envvar,fileb)
1584 WRITE(envvar(9:10),fmt=
'(I2)') ingbi
1585 CALL getenv(envvar,filei)
1586 CALL baopenr(ingbd,fileb,iret1)
1588 CALL baopenr(ingbi,filei,iret2)
1601 68
FORMAT(//4x,
'** W3MISCAN/MISC06: READ IN "CURRENT" SEA-SURFACE ',
1602 $
'TEMPERATURE DATA FROM GRIB MESSAGE IN UNIT',i3)
1603 CALL getgb(ingbd,ingbi,maxpts,0,kpds,kgds,kf,k,lpds,lgds,lbms,
1608 WRITE(6,*)
' ERROR READING SST USING GETGB. IRET = ',iret
1609 IF (iret.EQ.96)
RETURN 1
1610 IF (iret.EQ.97)
RETURN 3
1611 IF (iret.EQ.98)
RETURN 3
1612 IF (iret.EQ.99)
RETURN 3
1619 jdat1(1:3) = idat1(1:3)
1620 jdat1(5:6) = idat1(4:5)
1621 jdat2(1:3) = idat2(1:3)
1622 jdat2(5:6) = idat2(4:5)
1624 mdate(1) = ((lpds(21) - 1) * 100) + lpds(8)
1625 mdate(2:3) = lpds(9:10)
1626 mdate(5:6) = lpds(11:12)
1627 CALL w3movdat((/-7.,0.,0.,0.,0./),jdat1,kdat)
1628 CALL w3movdat((/ 7.,0.,0.,0.,0./),jdat2,ldat)
1630 print *,
'** W3MISCAN/MISCO6: SST GRIB FILE MUST HAVE DATE ',
1631 $
'BETWEEN ',(kdat(iii),iii=1,3),(kdat(iii),iii=5,6),
' AND ',
1632 $ (ldat(iii),iii=1,3),(ldat(iii),iii=5,6)
1633 print *,
' RETURNED FROM GRIB FILE IS YEAR ',
1634 $
'OF CENTURY = ',lpds(8),
' AND CENTURY = ',lpds(21)
1635 print *,
' CALULATED 4-DIGIT YEAR IS = ',
1642 IF(kmin.GT.0.OR.lmin.LT.0)
THEN
1648 print 27, (mdate(iii),iii=1,3),(mdate(iii),iii=5,6)
1649 27
FORMAT(/
' ##W3MISCAN/MISC06: SST GRIB MSG HAS DATE:',i5,4i3,
1650 $
' - AS A RESULT......')
1654 print 60, (mdate(iii),iii=1,3),(mdate(iii),iii=5,6)
1655 60
FORMAT(/4x,
'** W3MISCAN/MISC06: SEA-SFC TEMP SUCCESSFULLY READ ',
1656 $
'IN FROM GRIB FILE, DATE IS: ',i5,4i3/)
1659 CALL baclose(ingbi,iret)
1660 CALL baclose(ingbd,iret)