272 common/io29aa/jwfile(100),lastf
273 common/io29bb/kndx,kskacf(8),kskupa,ksksfc,ksksat,ksksmi
274 common/io29cc/subset,idat10
275 common/io29dd/hdr(12),rcats(50,150,11),ikat(11),mcat(11),ncat(11)
276 common/io29ee/robs(255,11)
277 common/io29ff/qms(255,9)
278 common/io29gg/sfo(34)
281 common/io29jj/iset,manlin(1001)
282 common/io29kk/kount(499,18)
286 REAL(8) bmiss,getbmiss
339 IF(lunit.LT.1 .OR. lunit.GT.100)
THEN
340 print
'(" ##IW3UNP29 - UNIT NUMBER ",I0," OUT OF RANGE -- ",
341 $ "IER = 999")', lunit
344 IF(lastf.NE.lunit .AND. lastf.GT.0)
THEN
353 IF(jwfile(lunit).EQ.0)
THEN
354 print
'(" ===> IW3UNP29 - WCOSS VERSION: 03-20-2013")'
358 print
'(" BUFRLIB value for missing passed into IW3UNP29 is: ",
362 IF(
i03o29(lunit,obs,ier).EQ.1)
THEN
363 print
'(" IW3UNP29 - OPENED A TRUE OFFICE NOTE 29 FILE IN ",
364 $ "UNIT ",I0)', lunit
368 ELSEIF(
i03o29(lunit,obs,ier).EQ.3)
THEN
370 107
FORMAT(/,
' ##IW3UNP29 - FILE IN UNIT',i3,
' IS EMPTY OR NULL -- ',
374 ELSEIF(
i02o29(lunit,obs,ier).EQ.1)
THEN
375 print
'(" IW3UNP29 - OPENED A BUFR FILE IN UNIT ",I0)', lunit
386 ELSEIF(
i03o29(lunit,obs,ier).EQ.999)
THEN
387 print
'(" IW3UNP29 - OPENED A TRUE OFFICE NOTE 29 FILE IN ",
388 $ "UNIT ",I0)', lunit
390 88
FORMAT(/
' ##IW3UNP29/I03O29 - NEITHER EXPECTED Y2K COMPLIANT ',
391 $
'PSEUDO-ON85 LABEL NOR SECOND CHOICE NON-Y2K COMPLIANT ON85 ',
392 $
'LABEL FOUND IN'/21x,
'FIRST RECORD OF FILE -- IER = 999'/)
396 108
FORMAT(/,
' ##IW3UNP29 - FILE IN UNIT',i3,
' IS NEITHER BUFR NOR ',
397 $
'TRUE OFFICE NOTE 29 -- IER = 999'/)
400 ELSEIF(jwfile(lunit).EQ.1)
THEN
401 IF(
i03o29(lunit,obs,ier).NE.0) jwfile(lunit) = 0
402 IF(ier.GT.0)
CLOSE (lunit)
404 ELSEIF(jwfile(lunit).EQ.2)
THEN
405 IF(
i02o29(lunit,obs,ier).NE.0) jwfile(lunit) = 0
406 IF(ier.GT.0)
CALL closbf(lunit)
407 IF(ier.EQ.2.OR.ier.EQ.3)
THEN
408 IF(kskacf(1).GT.0) print
'(" IW3UNP29 - NO. OF AIRCFT/",
409 $ "AIRCAR REPORTS TOSSED DUE TO ZERO CAT. 6 LVLS = ",I0)',
411 IF(kskacf(2).GT.0) print
'(" IW3UNP29 - NO. OF AIRCFT ",
412 $ "REPORTS TOSSED DUE TO BEING ""LFPW"" AMDAR = ",I0)',
414 IF(kskacf(8).GT.0) print
'(" IW3UNP29 - NO. OF AIRCFT ",
415 $ "REPORTS TOSSED DUE TO BEING ""PHWR"" AIREP = ",I0)',
417 IF(kskacf(3).GT.0) print
'(" IW3UNP29 - NO. OF AIRCFT ",
418 $ "REPORTS TOSSED DUE TO BEING CARSWELL AMDAR = ",I0)',
420 IF(kskacf(4).GT.0) print
'(" IW3UNP29 - NO. OF AIRCFT ",
421 $ "REPORTS TOSSED DUE TO BEING CARSWELL ACARS = ",I0)',
423 IF(kskacf(5).GT.0) print
'(" IW3UNP29 - NO. OF AIRCFT/",
424 $ "AIRCAR REPORTS TOSSED DUE TO HAVING MISSING WIND = ",I0)',
426 IF(kskacf(6).GT.0) print
'(" IW3UNP29 - NO. OF AIRCFT ",
427 $ "REPORTS TOSSED DUE TO BEING AMDAR < 2286 M = ",I0)',
429 IF(kskacf(7).GT.0) print
'(" IW3UNP29 - NO. OF AIRCFT ",
430 $ "REPORTS TOSSED DUE TO BEING AIREP < 100 M = ",I0)',
432 IF(kskacf(1)+kskacf(2)+kskacf(3)+kskacf(4)+kskacf(5)+
433 $ kskacf(6)+kskacf(7)+kskacf(8).GT.0)
434 $ print
'(" IW3UNP29 - TOTAL NO. OF AIRCFT/AIRCAR REPORTS ",
436 $ kskacf(1)+kskacf(2)+kskacf(3)+kskacf(4)+
437 $ kskacf(5)+kskacf(6)+kskacf(7)+kskacf(8)
438 IF(kskupa.GT.0) print
'(" IW3UNP29 - TOTAL NO. OF ADPUPA ",
439 $ "REPORTS TOSSED = ",I0)', kskupa
440 IF(ksksfc.GT.0) print
'(" IW3UNP29 - TOTAL NO. OF ADPSFC/",
441 $ "SFCSHP/SFCBOG REPORTS TOSSED = ",I0)', ksksfc
442 IF(ksksat.GT.0) print
'(" IW3UNP29 - TOTAL NO. OF SATWND ",
443 $ "REPORTS TOSSED = ",I0)', ksksat
444 IF(ksksmi.GT.0) print
'(" IW3UNP29 - TOTAL NO. OF SPSSMI ",
445 $ "REPORTS TOSSED = ",I0)', ksksmi
479 common/io29aa/jwfile(100),lastf
488 IF(lunit.LT.1 .OR. lunit.GT.100)
THEN
489 print
'(" ##IW3UNP29/I01O29 - UNIT NUMBER ",I0," OUT OF RANGE ",
490 $ "-- IER = 999")', lunit
497 IF(jwfile(lunit).EQ.0)
THEN
498 IF(
i03o29(lunit,hdr,ier).EQ.1)
THEN
502 ELSEIF(
i02o29(lunit,hdr,ier).EQ.1)
THEN
511 print
'(" ##IW3UNP29/I01O29 - CAN""T READ FILE HEADER -- ",
520 print
'(" ##IW3UNP29/I01O29 - FILE ALREADY OPEN -- IER = 999")'
548 common/io29cc/subset,idat10
552 CHARACTER*8 subset,cbufr
555 dimension obs(1608),ron85(16),jdate(5),jdump(5)
556 equivalence(ron85(1),on85)
569 CALL status(lunit,lun,il,im)
575 READ(lunit,
END=10,ERR=10,FMT=
'(A8)') cbufr
576 IF(cbufr(1:4).EQ.
'BUFR')
THEN
577 print
'(" IW3UNP29/I02O29 - INPUT FILE ON UNIT ",I0, " IS",
578 $ " UNBLOCKED NCEP BUFR"/)', lunit
579 ELSE IF(cbufr(5:8).EQ.
'BUFR')
THEN
580 print
'(" IW3UNP29/I02O29 - INPUT FILE ON UNIT ",I0, " IS",
581 $ " BLOCKED NCEP BUFR"/)', lunit
587 CALL dumpbf(lunit,jdate,jdump)
589 print
'(" CENTER DATE (JDATE) = ",I4,4I3.2/" DUMP DATE (JDUMP)",
590 $ " (year not used anywhere) = "I4,4I3.2)',jdate,jdump
592 IF(jdate(1).GT.999)
THEN
593 WRITE(cdate,
'(I4.4,3I2.2)') (jdate(i),i=1,4)
594 ELSE IF(jdate(1).GT.0)
THEN
599 print
'(" ##IW3UNP29/I02O29 - 2-DIGIT YEAR IN JDATE(1) ",
600 $ "RETURNED FROM DUMPBF (JDATE IS: ",I4.4,3I2.2,") - USE ",
601 $ "WINDOWING TECHNIQUE TO OBTAIN 4-DIGIT YEAR")', jdate
602 IF(jdate(1).GT.20)
THEN
603 WRITE(cdate,
'("19",4I2.2)') (jdate(i),i=1,4)
605 WRITE(cdate,
'("20",4I2.2)') (jdate(i),i=1,4)
607 print
'(" ##IW3UNP29/I02O29 - CORRECTED JDATE(1) WITH ",
608 $ "4-DIGIT YEAR, JDATE NOW IS: ",I4.4,3I2.2)', jdate
613 CALL openbf(lunit,
'IN',lunit)
617 call readmg(lunit,subset,idat10,iret)
619 WRITE(cdump,
'(2I2.2)') jdump(4),100*jdump(5)/60
620 IF(jdump(1).LT.0) cdump =
'9999'
621 on85=
c01o29(subset)//
' C2'//cdate//cdump//
'WASHINGTONCR '
634 CALL readns(lunit,subset,idat10,iret)
637 IF(
i02o29.EQ.-9999)
GO TO 7822
645 print
'(" ##IW3UNP29/I02O29 - FILE ON UNIT ",I0," IS OPENED FOR ",
646 $ "OUTPUT -- IER = 999")', lunit
698 CHARACTER*1 cbuff(6432),con85l(32)
702 INTEGER ibuff(5),obs(*)
704 equivalence(ibuff,cbuff)
717 if(ioldun.gt.0) rewind ioldun
723 IF(nunit.NE.ioldun)
THEN
729 87
FORMAT(//
' IW3UNP29/I03O29 - PREPARING TO READ ON29 DATA SET IN ',
740 IF(next.NE.0)
GO TO 70
746 READ(nunit,
END=9997,ERR=9998,FMT=
'(A8)') cbufr
747 IF(cbufr(1:4).EQ.
'BUFR' .OR. cbufr(5:8).EQ.
'BUFR')
THEN
760 READ(nunit,err=9998,
END=9997,FMT=
'(6432A1)') cbuff
765 IF(iswt.EQ.1)
CALL aea(cbuff,cbuff,6432)
774 IF(cbuff(25)//cbuff(26)//cbuff(27)//cbuff(28).EQ.
'WASH')
THEN
775 ELSEIF(cbuff(21)//cbuff(22)//cbuff(23)//cbuff(24).EQ.
'WASH')
THEN
784 78
FORMAT(/
' ##IW3UNP29 - NEITHER EXPECTED Y2K COMPLIANT PSEUDO-',
785 $
'ON85 LABEL NOR SECOND CHOICE NON-Y2K COMPLIANT ON85 LABEL ',
786 $
'FOUND IN'/14x,
'FIRST RECORD OF FILE -- TRY EBCDIC TO ASCII ',
788 CALL aea(cbuff,cbuff,6432)
792 IF(cbuff(25)//cbuff(26)//cbuff(27)//cbuff(28).EQ.
'WASH')
THEN
799 obs(1:5) = ibuff(1:5)
801 ELSE IF(cbuff(21)//cbuff(22)//cbuff(23)//cbuff(24).EQ.
'WASH')
808 print
'(" ==> THIS IS A TRUE OFFICE NOTE 29 FILE!! <==")'
810 88
FORMAT(/
' ##IW3UNP29/I03O29 - WARNING: ORIGINAL NON-Y2K ',
811 $
'COMPLIANT ON85 LABEL FOUND IN FIRST RECORD OF FILE INSTEAD OF ',
812 $
'EXPECTED'/30x,
'Y2K COMPLIANT PSEUDO-ON85 LABEL -- THIS ',
813 $
'ROUTINE IS FORCED TO USE "WINDOWING" TECHNIQUE TO CONTRUCT'/30x,
814 $
'A Y2K COMPLIANT PSEUDO-ON85 LABEL TO RETURN TO CALLING PROGRAM'/)
819 cbf910 = cbuff(9)//cbuff(10)
820 READ(cbf910,
'(I2)') iyr2d
821 print
'(" ##IW3UNP29/I03O29 - 2-DIGIT YEAR FOUND IN ON85 ",
822 $ "LBL (",A,") IS: ",I0/19X," USE WINDOWING TECHNIQUE TO ",
823 $ "OBTAIN 4-DIGIT YEAR")', cbuff(1:32),iyr2d
829 print
'(" ##IW3UNP29/I03O29 - 4-DIGIT YEAR OBTAINED VIA ",
830 $ "WINDOWING TECHNIQUE IS: ",I0/)', iyr4d
833 cbuff(9:10) = con85l(7:8)
834 WRITE(cyr4d,
'(I4.4)') iyr4d
836 cbuff(10+i) = cyr4d(i:i)
838 cbuff(15:36) = con85l(11:32)
839 obs(1:5) = ibuff(1:5)
857 IF(cbuff(1)//cbuff(2)//cbuff(3)//cbuff(4).EQ.
'ENDO')
THEN
884 print
'(" ##IW3UNP29/I03O29 - ERROR READING DATA RECORD")'
895 CALL w3fi64(cbuff,obs,next)
939 IF(subset(1:5).EQ.
'NC000')
c01o29 =
'ADPSFC'
940 IF(subset(1:5).EQ.
'NC001')
THEN
941 IF(subset(6:8).NE.
'006')
THEN
947 IF(subset(1:5).EQ.
'NC002')
c01o29 =
'ADPUPA'
948 IF(subset(1:5).EQ.
'NC004')
c01o29 =
'AIRCFT'
949 IF(subset(1:5).EQ.
'NC005')
c01o29 =
'SATWND'
950 IF(subset(1:5).EQ.
'NC012')
c01o29 =
'SPSSMI'
952 IF(subset .EQ.
'NC003101')
c01o29 =
'SATEMP'
953 IF(subset .EQ.
'NC004004')
c01o29 =
'AIRCAR'
954 IF(subset .EQ.
'NC004005')
c01o29 =
'ADPUPA'
956 IF(subset .EQ.
'ADPSFC')
c01o29 =
'ADPSFC'
957 IF(subset .EQ.
'SFCSHP')
c01o29 =
'SFCSHP'
958 IF(subset .EQ.
'SFCBOG')
c01o29 =
'SFCBOG'
959 IF(subset .EQ.
'ADPUPA')
c01o29 =
'ADPUPA'
960 IF(subset .EQ.
'AIRCFT')
c01o29 =
'AIRCFT'
961 IF(subset .EQ.
'SATWND')
c01o29 =
'SATWND'
962 IF(subset .EQ.
'SATEMP')
c01o29 =
'SATEMP'
963 IF(subset .EQ.
'AIRCAR')
c01o29 =
'AIRCAR'
964 IF(subset .EQ.
'SPSSMI')
c01o29 =
'SPSSMI'
966 IF(
c01o29.EQ.
'NONE') print
'(" ##IW3UNP29/C01O29 - UNKNOWN SUBSET",
967 $ " (=",A,") -- CONTINUE~~")', subset
995 IF(adpsub .EQ.
'ADPSFC')
r01o29 = r04o29(lunit,obs)
996 IF(adpsub .EQ.
'SFCSHP')
r01o29 = r04o29(lunit,obs)
997 IF(adpsub .EQ.
'SFCBOG')
r01o29 = r04o29(lunit,obs)
998 IF(adpsub .EQ.
'ADPUPA')
r01o29 = r03o29(lunit,obs)
999 IF(adpsub .EQ.
'AIRCFT')
r01o29 = r05o29(lunit,obs)
1000 IF(adpsub .EQ.
'AIRCAR')
r01o29 = r05o29(lunit,obs)
1001 IF(adpsub .EQ.
'SATWND')
r01o29 = r06o29(lunit,obs)
1002 IF(adpsub .EQ.
'SPSSMI')
r01o29 = r07o29(lunit,obs)
1008 SUBROUTINE s01o29(SID,XOB,YOB,RHR,RCH,RSV,RSV2,ELV,ITP,RTP)
1011 common/io29dd/hdr(12),rcats(50,150,11),ikat(11),mcat(11),ncat(11)
1014 CHARACTER*(*) rsv,rsv2
1015 CHARACTER*8 cob,sid,rct
1016 dimension ihdr(12),rhdr(12),icats(50,150,11)
1018 equivalence(ihdr(1),rhdr(1)),(cob,iob),(icats,rcats)
1030 icats(6,1:149,1) = iob
1031 icats(4,1:149,2) = iob
1032 icats(4,1:149,3) = iob
1033 icats(4,1:149,4) = iob
1034 icats(6,1:149,5) = iob
1035 icats(6,1:149,6) = iob
1036 icats(3,1:149,7) = iob
1037 icats(3,1:149,8) = iob
1043 IF(rch*100.LT.2401.AND.rch*100.GT.-1)
1044 $
WRITE(rct,
'(I4.4)') nint(rch*100.)
1050 IF(yob.LT.bmiss) rhdr( 1) = nint(100.*yob)
1052 IF(yob.GE.bmiss) print
'(" ~~IW3UNP29/S01O29: ID ",A," has a ",
1053 $ "missing LATITUDE - on29 hdr, word 1 is set to ",G0)',
1057 IF(xob.LT.bmiss) rhdr( 2) = nint(100.*mod(720.-xob,360.))
1059 IF(xob.GE.bmiss) print
'(" ~~IW3UNP29/S01O29: ID ",A," has a ",
1060 $ "missing LONGITUDE - on29 hdr, word 2 is set to ",G0)',
1065 IF(rhr.LT.bmiss) rhdr( 4) = nint((100.*rhr)+0.0001)
1067 IF(rhr.GE.bmiss) print
'(" ~~IW3UNP29/S01O29: ID ",A," has a ",
1068 $ "missing OB TIME - on29 hdr, word 4 is set to ",G0)', sid,rhdr(4)
1070 IF(rsv2.EQ.
' ')
THEN
1072 cob(1:4) = rct(3:4)//rsv(1:2)
1075 cob(1:3) = rct(1:2)//rsv(3:3)
1079 cob(1:4) = rsv2(3:4)//rsv(1:2)
1082 cob(1:3) = rsv2(1:2)//rsv(3:3)
1085 rhdr( 7) = nint(elv)
1093 cob(1:4) = sid(5:6)//
' '
1106 SUBROUTINE s02o29(ICAT,N,*)
1109 common/io29dd/hdr(12),rcats(50,150,11),ikat(11),mcat(11),ncat(11)
1110 common/io29ee/pob(255),qob(255),tob(255),zob(255),dob(255),
1111 $ sob(255),vsg(255),clp(255),cla(255),ob8(255),
1113 common/io29ff/pqm(255),qqm(255),tqm(255),zqm(255),wqm(255),
1114 $ qcp(255),qca(255),q81(255),q82(255)
1115 common/io29gg/psl,stp,sdr,ssp,stm,dpd,tmx,tmi,hvz,prw,pw1,ccn,chn,
1116 $ ctl,ctm,cth,hcb,cpt,apt,pc6,snd,p24,dop,pow,how,swd,
1117 $ swp,swh,sst,spg,spd,shc,sas,wes
1118 common/io29hh/psq,spq,swq,stq,ddq
1122 CHARACTER*8 cob,c11,c12
1123 CHARACTER*1 pqm,qqm,tqm,zqm,wqm,qcp,qca,q81,q82,psq,spq,swq,stq,
1125 dimension rcat(50),jcat(50)
1127 equivalence(rcat(1),jcat(1)),(c11,hdr(11)),(c12,hdr(12)),
1149 entry se01o29(icat,n)
1158 IF(icat.EQ.ikat(i))
THEN
1170 print
'(" ##IW3UNP29/S02O29 - ON29 CATEGORY ",I0," OUT OF ",
1171 $ "BOUNDS -- IER = 999")', icat
1179 print
'(" ##IW3UNP29/S02O29 - LEVEL INDEX ",I0," EXCEEDS 255 ",
1180 $ "-- IER = 999")', n
1188 IF(kcat.EQ.1)
RETURN
1189 ncat(kcat) = min(149,ncat(kcat)+1)
1192 $ print
'(" To prepare for sfc. data, write all missings on ",
1193 $ "lvl ",I0," for cat ",I0)', ncat(kcat),kcat
1202 l = i04o29(pob(n)*.1)
1203 IF(l.EQ.999999)
GO TO 9999
1209 print
'(" ##IW3UNP29/S02O29 - BAD MANDATORY LEVEL (P = ",
1210 $ G0,") -- IER = 999")', pob(n)
1213 ncat(kcat) = max(ncat(kcat),l)
1216 $ print
'(" Will write cat. 1 data on lvl ",I0," for cat ",I0,
1217 $ ", - total no. cat. 1 lvls processed so far = ",I0)',
1222 ncat(kcat) = max(ncat(kcat),1)
1225 $ print
'(" Will write cat. ",I0," SURFACE data on lvl ",I0,
1226 $ ", - total no. cat. ",I0," lvls processed so far = ",I0)',
1227 $ kcat,l,kcat,ncat(kcat)
1230 l = min(149,ncat(kcat)+1)
1233 print
'(" ~~IW3UNP29/S02O29: ID ",A," - This cat. ",I0,
1234 $ " level cannot be processed because the limit has already",
1235 $ " been reached")', c11(1:4)//c12(1:2),kcat
1242 $ print
'(" Will write cat. ",I0," NON-SFC data on lvl ",I0,
1243 $ ", - total no. cat. ",I0," lvls processed so far = ",I0)',
1244 $ kcat,l,kcat,ncat(kcat)
1253 rcat(1) = min(nint(zob(n)),nint(rcats(1,l,kcat)))
1254 rcat(2) = min(nint(tob(n)),nint(rcats(2,l,kcat)))
1255 rcat(3) = min(nint(qob(n)),nint(rcats(3,l,kcat)))
1256 rcat(4) = min(nint(dob(n)),nint(rcats(4,l,kcat)))
1257 rcat(5) = min(nint(sob(n)),nint(rcats(5,l,kcat)))
1258 cob(1:4) = zqm(n)//tqm(n)//qqm(n)//wqm(n)
1260 ELSEIF(icat.EQ.2)
THEN
1261 rcat(1) = min(nint(pob(n)),99999)
1262 rcat(2) = min(nint(tob(n)),99999)
1263 rcat(3) = min(nint(qob(n)),99999)
1264 cob(1:3) = pqm(n)//tqm(n)//qqm(n)
1266 ELSEIF(icat.EQ.3)
THEN
1267 rcat(1) = min(nint(pob(n)),99999)
1268 rcat(2) = min(nint(dob(n)),99999)
1269 rcat(3) = min(nint(sob(n)),99999)
1273 IF(nint(vsg(n)).EQ.16) pqm(n) =
'T'
1277 IF(nint(vsg(n)).EQ. 8)
THEN
1279 IF(pob(n).EQ.pwmin) pqm(n) =
'X'
1281 cob(1:2) = pqm(n)//wqm(n)
1283 ELSEIF(icat.EQ.4)
THEN
1284 rcat(1) = min(nint(zob(n)),99999)
1285 rcat(2) = min(nint(dob(n)),99999)
1286 rcat(3) = min(nint(sob(n)),99999)
1287 cob(1:2) = zqm(n)//wqm(n)
1289 ELSEIF(icat.EQ.5)
THEN
1290 rcat(1) = min(nint(pob(n)),99999)
1291 rcat(2) = min(nint(tob(n)),99999)
1292 rcat(3) = min(nint(qob(n)),99999)
1293 rcat(4) = min(nint(dob(n)),99999)
1294 rcat(5) = min(nint(sob(n)),99999)
1295 cob(1:4) = pqm(n)//tqm(n)//qqm(n)//wqm(n)
1297 ELSEIF(icat.EQ.6)
THEN
1298 rcat(1) = min(nint(zob(n)),99999)
1299 rcat(2) = min(nint(tob(n)),99999)
1300 rcat(3) = min(nint(qob(n)),99999)
1301 rcat(4) = min(nint(dob(n)),99999)
1302 rcat(5) = min(nint(sob(n)),99999)
1303 cob(1:4) = zqm(n)//tqm(n)//qqm(n)//wqm(n)
1305 ELSEIF(icat.EQ.7)
THEN
1306 rcat(1) = min(nint(clp(n)),99999)
1307 rcat(2) = min(nint(cla(n)),99999)
1308 cob(1:2) = qcp(n)//qca(n)
1310 ELSEIF(icat.EQ.8)
THEN
1311 rcat(1) = min(nint(ob8(n)),99999)
1312 rcat(2) = min(nint(cf8(n)),99999)
1313 cob(1:2) = q81(n)//q82(n)
1315 ELSEIF(icat.EQ.51)
THEN
1316 rcat( 1) = min(nint(psl),99999)
1317 rcat( 2) = min(nint(stp),99999)
1318 rcat( 3) = min(nint(sdr),99999)
1319 rcat( 4) = min(nint(ssp),99999)
1320 rcat( 5) = min(nint(stm),99999)
1321 rcat( 6) = min(nint(dpd),99999)
1322 rcat( 7) = min(nint(tmx),99999)
1323 rcat( 8) = min(nint(tmi),99999)
1324 cob(1:4) = psq//spq//swq//stq
1329 jcat(11) = min(nint(hvz),99999)
1330 jcat(12) = min(nint(prw),99999)
1331 jcat(13) = min(nint(pw1),99999)
1332 jcat(14) = min(nint(ccn),99999)
1333 jcat(15) = min(nint(chn),99999)
1334 jcat(16) = min(nint(ctl),99999)
1335 jcat(17) = min(nint(hcb),99999)
1336 jcat(18) = min(nint(ctm),99999)
1337 jcat(19) = min(nint(cth),99999)
1338 jcat(20) = min(nint(cpt),99999)
1339 rcat(21) = min(abs(nint(apt)),99999)
1340 IF(cpt.GE.bmiss.AND.apt.LT.0.)
1341 $ rcat(21) = min(abs(nint(apt))+500,99999)
1342 ELSEIF(icat.EQ.52)
THEN
1343 jcat( 1) = min(nint(pc6),99999)
1344 jcat( 2) = min(nint(snd),99999)
1345 jcat( 3) = min(nint(p24),99999)
1346 jcat( 4) = min(nint(dop),99999)
1347 jcat( 5) = min(nint(pow),99999)
1348 jcat( 6) = min(nint(how),99999)
1349 jcat( 7) = min(nint(swd),99999)
1350 jcat( 8) = min(nint(swp),99999)
1351 jcat( 9) = min(nint(swh),99999)
1352 jcat(10) = min(nint(sst),99999)
1353 jcat(11) = min(nint(spg),99999)
1354 jcat(12) = min(nint(spd),99999)
1355 jcat(13) = min(nint(shc),99999)
1356 jcat(14) = min(nint(sas),99999)
1357 jcat(15) = min(nint(wes),99999)
1363 print
'(" ##IW3UNP29/S02O29 - CATEGORY ",I0," NOT SUPPORTED ",
1364 $ "-- IER = 999")', icat
1372 rcats(i,l,kcat) = rcat(i)
1382 SUBROUTINE s03o29(UNP,SUBSET,*,*)
1385 common/io29dd/hdr(12),rcats(50,150,11),ikat(11),mcat(11),ncat(11)
1387 dimension rcat(50),jcat(50),unp(*)
1389 equivalence(rcat(1),jcat(1))
1407 jcat(2*k+11) = ncat(k)
1408 IF(k.NE.7.AND.k.NE.8.AND.k.NE.11)
THEN
1409 nlevto = nlevto + ncat(k)
1410 ELSE IF(k.EQ.8)
THEN
1411 nlevc8 = nlevc8 + ncat(k)
1413 IF(ncat(k).GT.0) jcat(2*k+12) = indx
1414 IF(ncat(k).EQ.0) jcat(2*k+12) = 0
1421 IF(indx.GT.1608)
THEN
1422 print
'(" ##IW3UNP29/S03O29 - UNPKED ON29 RPT CONTAINS ",
1423 $ I0," WORDS, > LIMIT OF 1608 -- IER = 999")', indx
1426 unp(indx) = rcats(i,j,k)
1436 IF(nlevto.EQ.0)
THEN
1437 IF(subset(1:5).NE.
'NC012')
THEN
1440 IF(nlevc8.EQ.0)
RETURN 2
1448 unp(13:42) = rcat(13:42)
1458 common/io29dd/hdr(12),rcats(50,150,11),ikat(11),mcat(11),ncat(11)
1460 character*8 c11,c12,sid
1463 dimension rcat(50,150),iord(150),iwork(65536),scat(50,150),rctl(3)
1465 equivalence(c11,hdr(11)),(c12,hdr(12))
1471 sid = c11(1:4)//c12(1:4)
1478 IF(ncat(k).GT.1)
THEN
1481 scat(i,j) = rcats(i,j+1,k)
1484 CALL orders(2,iwork,scat(1,1),iord,ncat(k)-1,50,8,2)
1487 IF(k.LT.4) jj = iord((ncat(k)-1)-j+1)
1488 IF(k.EQ.4) jj = iord(j)
1490 rcat(i,j) = scat(i,jj)
1493 IF(nint(rcat(1,j)).EQ.nint(rctl(1)))
THEN
1494 IF(nint(rcat(2,j)).EQ.nint(rctl(2)).AND.
1495 $ nint(rcat(3,j)).EQ.nint(rctl(3)))
THEN
1498 print
'(" ~~@@IW3UNP29/S04O29: ID ",A," has a ",
1499 $ "dupl. cat. ",I0," lvl (all data) at ",G0," mb -- lvl will be ",
1500 $ "excluded from processing")', sid,k,rcat(1,j)*.1
1502 print
'(" ~~@@IW3UNP29/S04O29: ID ",A," has a ",
1503 $ "dupl. cat. ",I0," lvl (all data) at ",G0," m -- lvl will be ",
1504 $ "excluded from processing")', sid,k,rcat(1,j)
1511 print
'(" ~~@@#IW3UNP29/S04O29: ID ",A," has a ",
1512 $ "dupl. cat. ",I0," press. lvl (data differ) at ",G0," mb -- lvl",
1513 $ " will NOT be excluded")', sid,k,rcat(1,j)*.1
1515 print
'(" ~~@@#IW3UNP29/S04O29: ID ",A," has a ",
1516 $ "dupl. cat. ",I0," height lvl (data differ) at ",G0," m -- lvl ",
1517 $ "will NOT be excluded")', sid,k,rcat(1,j)
1523 IF(idup.EQ.1) rcat(1,j) = 10e8
1527 IF(rcat(1,j-1).GE.10e8)
GO TO 887
1530 rcats(i,jjj,k) = rcat(i,j-1)
1536 $ print
'(" ~~@@IW3UNP29/S04O29: ID ",A," has had ",I0,
1537 $ " lvls removed due to their being duplicates")',
1542 IF(ncat(k).EQ.1)
THEN
1543 IF(min(rcats(1,1,k),rcats(2,1,k),rcats(3,1,k)).GT.99998.8)
1552 IF(ncat(k).GT.1)
THEN
1553 CALL orders(2,iwork,rcats(2,1,k),iord,ncat(k),50,8,2)
1556 rcat(i,j) = rcats(i,iord(j),k)
1561 rcats(i,j,k) = rcat(i,j)
1578 common/io29ee/obs(255,11)
1579 common/io29ff/qms(255,9)
1580 common/io29gg/sfo(34)
1581 common/io29hh/sfq(5)
1606 common/io29jj/iset,manlin(1001)
1639 IF(ip.GT.10000 .OR. ip.LT.10 .OR. mod(ip,10).NE.0)
THEN
1642 i04o29 = manlin(ip/10)
1656 CHARACTER*8 subset,rpid
1657 LOGICAL l02o29,l03o29
1658 INTEGER kkk(0:99),kkkk(49)
1663 DATA grav/9.8/,cm2k/1.94/,tzro/273.15/
1664 DATA kkk /5*90,16*91,30*92,49*93/
1665 DATA kkkk/94,2*95,6*96,10*97,30*98/
1667 prs1(z) = 1013.25 * (((288.15 - (.0065 * z))/288.15)**5.256)
1668 prs2(z) = 226.3 * exp(1.576106e-4 * (11000. - z))
1669 prs3(pmnd,temp,z,zmnd)
1670 $ = pmnd * (((temp - (.0065 * (z - zmnd)))/temp)**5.256)
1671 es(t) = 6.1078 * exp((17.269 * (t-273.16))/((t-273.16)+237.3))
1672 qfrmtp(t,pppp) = (0.622 * es(t))/(pppp-(0.378 * es(t)))
1673 hgtf(p) = (1.-(p/1013.25)**(1./5.256))*(288.15/.0065)
1681 IF(prs.LT.bmiss) e01o29 = nint(prs*.1)
1682 IF(prs.GE.bmiss) e01o29 = bmiss
1684 entry e37o29(pmnd,temp,hgt,zmnd,tqm)
1686 IF(hgt.GE.bmiss)
THEN
1689 IF(hgt.LE.11000)
THEN
1694 IF(max(pmnd,zmnd).GE.bmiss)
THEN
1698 IF(temp.GE.9999.) temp = bmiss
1699 IF(tqm.GE.bmiss) tqm = 2
1700 IF(temp.GE.bmiss.OR.tqm.GE.4)
CALL w3fa03(p,d1,temp,d2)
1702 tvirt = temp * (1.0 + (0.61 * q))
1703 e37o29 = prs3(pmnd,tvirt,hgt,zmnd)
1708 IF(prs.LT.bmiss) e03o29 = hgtf(prs)
1709 IF(prs.GE.bmiss) e03o29 = bmiss
1711 entry e04o29(wdr,wsp)
1715 entry e05o29(wdr,wsp)
1717 IF(wsp.LT.bmiss)
THEN
1719 e05o29 = e05o29 + 0.0000001
1726 itmp = nint(tmp*100.)
1727 itzro = nint(tzro*100.)
1728 IF(tmp.LT.bmiss) e06o29 = nint((itmp - itzro)*0.1)
1729 IF(tmp.GE.bmiss) e06o29 = bmiss
1731 entry e07o29(dpd,tmp)
1733 IF(dpd.LT.bmiss .AND. tmp.LT.bmiss) e07o29 = (tmp-dpd)*10.
1734 IF(dpd.GE.bmiss .OR. tmp.GE.bmiss) e07o29 = bmiss
1739 IF(hgt.LT.bmiss) e08o29 = (hgt/grav)
1743 IF(hvz.GE.bmiss.OR.hvz.LT.0.)
THEN
1745 ELSE IF(nint(hvz).LT.6000)
THEN
1746 e09o29 = min(int(nint(hvz)/100),50)
1747 ELSE IF(nint(hvz).LT.30000)
THEN
1748 e09o29 = int(nint(hvz)/1000) + 50
1749 ELSE IF(nint(hvz).LE.70000)
THEN
1750 e09o29 = int(nint(hvz)/5000) + 74
1758 IF(prw.LT.bmiss) e10o29 = nint(mod(prw,100.))
1763 IF(paw.LT.bmiss) e11o29 = nint(mod(paw,10.))
1767 IF(nint(ccn).EQ.0)
THEN
1769 ELSE IF(ccn.LT. 15)
THEN
1771 ELSE IF(ccn.LT. 35)
THEN
1773 ELSE IF(ccn.LT. 45)
THEN
1775 ELSE IF(ccn.LT. 55)
THEN
1777 ELSE IF(ccn.LT. 65)
THEN
1779 ELSE IF(ccn.LT. 85)
THEN
1781 ELSE IF(ccn.LT.100)
THEN
1783 ELSE IF(nint(ccn).EQ.100)
THEN
1792 IF(cla.EQ.0) e13o29 = 0
1793 IF(cla.EQ.1) e13o29 = 5
1794 IF(cla.EQ.2) e13o29 = 25
1795 IF(cla.EQ.3) e13o29 = 40
1796 IF(cla.EQ.4) e13o29 = 50
1797 IF(cla.EQ.5) e13o29 = 60
1798 IF(cla.EQ.6) e13o29 = 75
1799 IF(cla.EQ.7) e13o29 = 95
1800 IF(cla.EQ.8) e13o29 = 100
1802 entry e14o29(ccl,ccm)
1805 IF(nint(e14o29).EQ.0) e14o29 = ccm
1806 IF(nint(e14o29).LT.10)
RETURN
1807 IF(nint(e14o29).EQ.10)
THEN
1809 ELSE IF(nint(e14o29).EQ.15)
THEN
1819 entry e18o29(chl,chm,chh,ctl,ctm,cth)
1821 IF(nint(max(ctl,ctm,cth)).EQ.0)
THEN
1826 IF(chh.LT.bmiss) e18o29 = chh
1827 IF(chm.LT.bmiss) e18o29 = chm
1828 IF(chl.LT.bmiss) e18o29 = chl
1829 IF(e18o29.GE.bmiss.OR.e18o29.LT.0)
RETURN
1830 IF(e18o29.LT. 150)
THEN
1832 ELSE IF(e18o29.LT. 350)
THEN
1834 ELSE IF(e18o29.LT. 650)
THEN
1836 ELSE IF(e18o29.LT. 950)
THEN
1838 ELSE IF(e18o29.LT.1950)
THEN
1840 ELSE IF(e18o29.LT.3250)
THEN
1842 ELSE IF(e18o29.LT.4950)
THEN
1844 ELSE IF(e18o29.LT.6750)
THEN
1846 ELSE IF(e18o29.LT.8250)
THEN
1855 IF(nint(cpt).GT.-1.AND.nint(cpt).LT.9) e19o29 = cpt
1862 ELSE IF(prc.LT.bmiss)
THEN
1863 e20o29 = nint(prc*3.937)
1871 ELSE IF(snd.LT.bmiss)
THEN
1872 e21o29 = nint(snd*39.37)
1878 IF(pc6.LT.bmiss) e22o29 = 1
1887 IF(hgt.LT.bmiss) e24o29 = nint(2.*hgt)
1894 ELSE IF(swd.LT.5)
THEN
1896 ELSE IF(swd.LT.bmiss)
THEN
1897 e25o29 = nint((swd+.001)*.1)
1911 IF(nint(shc).GT.-1.AND.nint(shc).LT.9) e30o29 = nint(shc)
1916 IF(nint(sas).GT.-1.AND.nint(sas).LT.10) e31o29 = nint(sas)
1922 entry e33o29(subset,rpid)
1925 IF(subset(1:5).EQ.
'NC000'.AND.l02o29(rpid) ) e33o29 = 511
1926 IF(subset(1:5).EQ.
'NC000'.AND.l03o29(rpid) ) e33o29 = 512
1927 IF(subset.EQ.
'NC001001'.AND.rpid.NE.
'SHIP') e33o29 = 522
1928 IF(subset.EQ.
'NC001001'.AND.rpid.EQ.
'SHIP') e33o29 = 523
1929 IF(subset.EQ.
'NC001002') e33o29 = 562
1930 IF(subset.EQ.
'NC001003') e33o29 = 561
1931 IF(subset.EQ.
'NC001004') e33o29 = 531
1932 IF(subset.EQ.
'NC001006') e33o29 = 551
1933 IF(subset.EQ.
'NC002001')
THEN
1939 IF(l03o29(rpid)) e33o29 = 012
1940 IF(rpid(1:4).EQ.
'CLAS') e33o29 = 013
1942 IF(subset.EQ.
'NC002002')
THEN
1949 IF(subset.EQ.
'NC002003')
THEN
1955 IF(rpid(1:4).EQ.
'SHIP') e33o29 = 023
1957 IF(subset.EQ.
'NC002004')
THEN
1964 IF(subset.EQ.
'NC002005')
THEN
1970 IF(l03o29(rpid)) e33o29 = 012
1973 IF(subset.EQ.
'NC004001') e33o29 = 041
1974 IF(subset.EQ.
'NC004002') e33o29 = 041
1975 IF(subset.EQ.
'NC004003') e33o29 = 041
1976 IF(subset.EQ.
'NC004004') e33o29 = 041
1977 IF(subset.EQ.
'NC004005') e33o29 = 031
1978 IF(subset(1:5).EQ.
'NC005') e33o29 = 063
1980 entry e34o29(hgt,z100)
1991 IF(hgt.GT.z100)
THEN
1992 IF(mod(nint(hgt),10).NE.0) hgt = int(hgt/10.) * 10
1999 IF(mod(nint(hgt/1.016),1500).EQ.0) hgt = nint(hgt - 1.0)
2005 IF(hvz.GE.bmiss.OR.hvz.LT.0.)
THEN
2007 ELSE IF(nint(hvz).LT.1000)
THEN
2008 kk = min(int(nint(hvz)/10),99)
2010 ELSE IF(nint(hvz).LT.50000)
THEN
2011 kk = min(int(nint(hvz)/1000),49)
2023 CHARACTER*8 c02o29,e35o29,e36o29
2024 CHARACTER*1 cprt(0:11),cmr29(0:15)
2041 DATA cmr29 /
'H',
'A',
' ',
'Q',
'C',
'F',
'P',
'F',
2045 .
'F',
'F',
'O',
'B',
'R',
'F',
'P',
'F'/
2047 DATA cprt /
' ',
' ',
' ',
' ',
'A',
'B',
'C',
'D',
'I',
'J',
'K',
'L'/
2053 IF(qmk.GE.0 .AND. qmk.LE.15) e35o29 = cmr29(nint(qmk))
2054 IF(qmk.LT.0 .OR. qmk.GT.15) e35o29 =
' '
2059 IF(nprt.LT.12) e36o29 = cprt(nprt)//
' '
2068 LOGICAL l01o29,l02o29,l03o29
2079 READ(rpid,
'(I5)',err=1) ibks
2085 READ(rpid,
'(I5)',err=2) ibks
2092 FUNCTION r03o29(LUNIT,OBS)
2095 common/io29dd/hdr(12),rcats(50,150,11),ikat(11),mcat(11),ncat(11)
2096 common/io29ee/pob(255),qob(255),tob(255),zob(255),dob(255),
2097 $ sob(255),vsg(255),clp(255),cla(255),ob8(255),
2099 common/io29ff/pqm(255),qqm(255),tqm(255),zqm(255),wqm(255),
2100 $ qcp(255),qca(255),q81(255),q82(255)
2101 common/io29cc/subset,idat10
2102 common/io29bb/kndx,kskacf(8),kskupa,ksksfc,ksksat,ksksmi
2106 CHARACTER*80 hdstr,lvstr,qmstr,rcstr
2107 CHARACTER*8 subset,sid,e35o29,e36o29,rsv,rsv2
2108 CHARACTER*1 pqm,qqm,tqm,zqm,wqm,qcp,qca,q81,q82,pqml
2109 REAL(8) rid_8,hdr_8(12),vsg_8(255)
2110 REAL(8) rct_8(5,255),arr_8(10,255)
2111 REAL(8) rat_8(255),rmore_8(4),rgp10_8(255),rpmsl_8,rpsal_8
2114 dimension obs(*),rct(5,255),arr(10,255)
2115 dimension rat(255),rmore(4),rgp10(255)
2116 dimension p2(255),p8(255),p16(255)
2118 equivalence(rid_8,sid)
2123 DATA hdstr/
'NULL CLON CLAT HOUR MINU SELV '/
2124 DATA lvstr/
'PRLC TMDP TMDB GP07 GP10 WDIR WSPD '/
2125 DATA qmstr/
'QMPR QMAT QMDD QMGP QMWN '/
2126 DATA rcstr/
'RCHR RCMI RCTS '/
2128 DATA ihblcs/25,75,150,250,450,800,1250,1750,2250,2500/
2130 prs1(z) = 1013.25 * (((288.15 - (.0065 * z))/288.15)**5.256)
2131 prs2(z) = 226.3 * exp(1.576106e-4 * (11000. - z))
2140 IF(r03o29.NE.99)
RETURN
2167 CALL ufbint(lunit,vsg_8,1,255,nlev,
'VSIG');vsg=vsg_8
2172 CALL ufbint(lunit,hdr_8,12, 1,iret,hdstr);hdr(2:)=hdr_8(2:)
2173 IF(hdr(5).GE.bmiss) hdr(5) = 0
2174 CALL ufbint(lunit,rid_8,1,1,iret,
'RPID')
2175 IF(iret.NE.1) sid =
'MISSING '
2187 $ print
'(" @@@ START DIAGNOSTIC PRINTOUT FOR ID ",A)', sid
2191 CALL ufbint(lunit,rpmsl_8,1, 1,iret,
'PMSL');rpmsl=rpmsl_8
2192 IF(subset.EQ.
'NC004005')
THEN
2193 CALL ufbint(lunit,rgp10_8,1,255,nlev,
'GP10');rgp10=rgp10_8
2194 CALL ufbint(lunit,rpsal_8,1,1,iret,
'PSAL');rpsal=rpsal_8
2195 IF(nint(vsg(1)).EQ.32.AND.rpmsl.GE.bmiss.AND.
2196 $ max(rgp10(1),rpsal).LT.bmiss)
THEN
2202 ELSE IF(min(vsg(1),rpmsl,rgp10(1)).GE.bmiss.AND.rpsal.LT.
2210 ELSE IF(min(vsg(1),rgp10(1)).GE.bmiss.AND.max(rpmsl,rpsal)
2219 print
'(" ~~IW3UNP29/R03O29: ID ",A," is currently an ",
2220 $ "unknown type of Flight-level RECCO - VSIG =",G0,
2221 $ "; PMSL =",G0,"; GP10 =",G0," -- SKIP IT for now")',
2222 $ sid,vsg(1),rpmsl,rgp10(1)
2233 IF(hdr(4).LT.bmiss) rhr = nint(hdr(4))+nint(hdr(5))/60.
2237 IF(irecco.GT.0)
THEN
2238 rpsal = rpsal + sign(0.0000001,rpsal)
2242 CALL ufbint(lunit,rat_8, 1,255,nlev,
'RATP');rat=rat_8
2243 itp = min(99,nint(rat(1)))
2244 rtp = e33o29(subset,sid)
2245 IF(elv.GE.bmiss)
THEN
2247 print
'(" IW3UNP29/R03O29: ID ",A," has a missing elev, so ",
2248 $ "elevation set to ZERO")', sid
2250 IF((rtp.GT.20.AND.rtp.LT.24).OR.subset.EQ.
'NC002004') elv = 0
2253 IF(l02o29(sid).AND.sid(5:5).EQ.
' ') sid =
'0'//sid
2255 CALL s01o29(sid,xob,yob,rhr,rch,rsv,rsv2,elv,itp,rtp)
2260 CALL ufbint(lunit,arr_8,10,255,nlev,lvstr);arr=arr_8
2264 IF(irecco.EQ.6) jlv = 1
2265 IF(irecco.GT.0.AND.nlev.EQ.1)
THEN
2268 qob(jlv) = e07o29(arr(2,1),arr(3,1))
2269 tob(jlv) = e06o29(arr(3,1))
2272 dob(jlv+1) = e04o29(arr(6,1),arr(7,1))
2273 sob(jlv+1) = e05o29(arr(6,1),arr(7,1))
2274 IF(nint(dob(jlv+1)).EQ.0.AND.nint(sob(jlv+1)).GT.0)
2276 IF(nint(dob(jlv+1)).EQ.360.AND.nint(sob(jlv+1)).EQ.0)
2280 IF(irecco.EQ.23)
THEN
2286 IF(irecco.EQ.6)
GO TO 4523
2289 pob(l) = e01o29(arr(1,l))
2290 IF(nint(arr(1,l)).LE.0)
THEN
2293 print
'(" ~~@@IW3UNP29/R03O29: ID ",A," has a ZERO or ",
2294 $ "negative reported pressure that is reset to missing")',
2298 qob(l) = e07o29(arr(2,l),arr(3,l))
2299 tob(l) = e06o29(arr(3,l))
2300 zob(l) = min(e08o29(arr(4,l)),e08o29(arr(5,l)))
2302 if(iprint.eq.1)
then
2303 if(irecco.gt.0) print
'(" At lvl=",I0,"; orig. ZOB = ",G0)',
2307 IF(irecco.EQ.1)
THEN
2308 IF(mod(nint(zob(l)),10).NE.0) zob(l) = int(zob(l)/10.) * 10
2309 zob(l) = nint(zob(l))
2310 ELSEIF(irecco.EQ.23)
THEN
2313 dob(l) = e04o29(arr(6,l),arr(7,l))
2314 sob(l) = e05o29(arr(6,l),arr(7,l))
2315 IF(nint(dob(l)).EQ.0.AND.nint(sob(l)).GT.0) dob(l) = 360.
2316 IF(nint(dob(l)).EQ.360.AND.nint(sob(l)).EQ.0) dob(l) = 0.
2318 if(iprint.eq.1)
then
2319 print
'(" At lvl=",I0,"; VSG=",G0,"; POB = ",G0,"; QOB = ",G0,
2320 $ "; TOB = ",G0,"; ZOB = ",G0,"; DOB = ",G0,"; final SOB ",
2321 $ "(kts) = ",G0,"; origl SOB (mps) = ",G0)',
2322 $ l,vsg(l),pob(l),qob(l),tob(l),zob(l),dob(l),sob(l),arr(7,l)
2325 IF(irecco.EQ.0.AND.max(pob(l),dob(l),sob(l)).LT.bmiss)
2326 $ pwmin=min(pwmin,pob(l))
2333 CALL ufbint(lunit,arr_8,10,255,nlev,qmstr);arr=arr_8
2335 IF(irecco.GT.0.AND.mlev.EQ.1)
THEN
2337 IF(pob(1).LT.bmiss) pob1 = pob(1) * 0.1
2339 IF(tob(jlv).LT.bmiss) tob1 = (tob(jlv) * 0.1) + 273.15
2343 pob(jlv)=nint(e37o29(pob1,tob1,rps1,zob1,tqm1)) * 10
2344 pob(jlv+1) = pob(jlv)
2346 if(iprint.eq.1)
then
2348 print
'(" At lvl=",I0,"; VSG=",G0,"; POB = ",G0,"; QOB = ",
2349 $ G0,"; TOB = ",G0,"; ZOB = ",G0,"; DOB = ",G0,"; SOB = ",
2350 $ G0)', l,vsg(l),pob(l),qob(l),tob(l),zob(l),dob(l),sob(l)
2356 IF(irecco.GT.0.AND.nlev.EQ.1)
THEN
2359 tqm(jlv) = e35o29(arr(2,1))
2361 qqm(jlv) = e35o29(arr(3,1))
2364 wqm(jlv+1) = e35o29(arr(5,1))
2368 IF(irecco.EQ.6)
GO TO 4524
2371 pqm(l) = e35o29(arr(1,l))
2372 tqm(l) = e35o29(arr(2,l))
2373 qqm(l) = e35o29(arr(3,l))
2374 zqm(l) = e35o29(arr(4,l))
2375 wqm(l) = e35o29(arr(5,l))
2380 IF(irecco.GT.0.AND.nlev.EQ.1) nlev = jlv + 1
2385 CALL s02o29(2,0,*9999)
2386 CALL s02o29(3,0,*9999)
2387 CALL s02o29(4,0,*9999)
2397 IF(nint(vsg(l)).EQ.64)
THEN
2399 if(iprint.eq.1)
then
2400 print
'(" Lvl=",L," is a surface level")'
2402 if(iprint.eq.1.and.pob(l).LT.bmiss.AND.(tob(l).LT.bmiss.OR.irecco
2404 print
'(" --> valid cat. 2 sfc. lvl ")'
2407 IF(pob(l).LT.bmiss.AND.(tob(l).LT.bmiss.OR.irecco.EQ.23))
2410 if(iprint.eq.1.and.pob(l).LT.bmiss.AND.(dob(l).LT.bmiss.OR.irecco
2412 print
'(" --> valid cat. 3 sfc. lvl ")'
2415 IF(pob(l).LT.bmiss.AND.(dob(l).LT.bmiss.OR.irecco.EQ.23))
2417 IF(zob(l).LT.bmiss.AND.dob(l).LT.bmiss)
THEN
2419 if(iprint.eq.1) print
'(" --> valid cat. 4 sfc. lvl ")'
2429 ELSE IF(nint(vsg(l)).EQ.2)
THEN
2434 IF(pob(l).EQ.p8(ii).AND.pob(l).LT.bmiss)
THEN
2436 if(iprint.eq.1)
then
2437 print
'(" ## This cat. 3 level, on lvl ",I0,
2438 $ " will have already been processed as a cat. 3 ",
2439 $ "MAX wind lvl (on lvl ",I0,") - skip this Cat. ",
2443 IF(max(sob(ii),dob(ii)).GE.bmiss)
THEN
2447 if(iprint.eq.1)
then
2448 print
'(" ...... also on lvl ",I0," - transfer",
2449 $ " wind data to dupl. MAX wind lvl because its ",
2450 $ "missing there")', l
2459 ELSE IF(nint(vsg(l)).EQ.8)
THEN
2464 IF(pob(l).EQ.p2(ii).AND.pob(l).LT.bmiss)
THEN
2466 if(iprint.eq.1)
then
2467 print
'(" ## This MAX wind level, on lvl ",I0,
2468 $ " will have already been processed as a cat. 3 ",
2469 $ "lvl (on lvl ",I0,") - skip this MAX wind lvl ",
2470 $ "but set"/6X,"cat. 3 lvl PQM to ""W""")', l,ii
2474 IF(pob(l).EQ.pwmin) pqm(ii) =
'X'
2475 IF(max(sob(ii),dob(ii)).GE.bmiss)
THEN
2479 if(iprint.eq.1)
then
2480 print
'(" ...... also on lvl ",I0," - transfer",
2481 $ " wind data to dupl. cat. 3 lvl because its ",
2482 $ "missing there")', l
2491 IF(indx8-1.GT.0)
THEN
2493 IF(pob(l).EQ.p8(ii).AND.pob(l).LT.bmiss)
THEN
2495 if(iprint.eq.1)
then
2496 print
'(" ## This cat. 3 MAX wind lvl, on lvl ",I0,
2497 $ " will have already been processed as a cat. 3 ",
2498 $ "MAX wind lvl (on lvl ",I0,") - skip this Cat. ",
2499 $ "3 MAX wind lvl")', l,ii
2502 IF(max(sob(ii),dob(ii)).GE.bmiss)
THEN
2506 if(iprint.eq.1)
then
2507 print
'(" ...... also on lvl ",I0," - transfer",
2508 $ " wind data to dupl. MAX wind lvl because its ",
2509 $ "missing there")', l
2518 ELSE IF(nint(vsg(l)).EQ.16)
THEN
2520 p16(indx16) = pob(l)
2529 IF(nint(vsg(l)).EQ.32 .AND. nint(pob(l)).EQ.9250)
THEN
2534 IF(tob(l).LT.bmiss)
CALL s02o29(2,l,*9999)
2535 IF(dob(l).LT.bmiss)
CALL s02o29(3,l,*9999)
2536 IF(ob8(l).LT.bmiss)
CALL s02o29(8,l,*9999)
2546 IF(nint(vsg(l)).EQ.32)
THEN
2547 IF(min(dob(l),zob(l),tob(l)).GE.bmiss)
THEN
2549 if(iprint.eq.1)
then
2550 print
'(" ==> For lvl ",I0,"; VSG=32 & DOB,ZOB,TOB all ",
2551 $ "missing --> this level not processed")', l
2554 ELSE IF(min(zob(l),tob(l)).LT.bmiss)
THEN
2556 if(iprint.eq.1)
then
2557 print
'(" ==> For lvl ",I0,"; VSG=32 & one or both of ",
2558 $ "ZOB,TOB non-missing --> valid cat. 1 lvl")', l
2561 CALL s02o29(1,l,*9999)
2562 IF(nint(pob(l)).EQ.1000.AND.zob(l).LT.bmiss) z100 = zob(l)
2568 IF(nint(vsg(l)).EQ.32)
THEN
2569 IF(dob(l).LT.bmiss.AND.min(zob(l),tob(l)).GE.bmiss)
THEN
2570 ll = i04o29(pob(l)*.1)
2571 IF(ll.EQ.999999)
THEN
2573 print
'(" ~~IW3UNP29/R03O29: ID ",A," has VSG=32 for ",
2574 $ "lvl ",I0," but pressure not mand.!! --> this level ",
2575 $ "not processed")', sid,l
2577 ELSE IF(min(rcats(1,ll,1),rcats(2,ll,1)).LT.99999.)
THEN
2578 IF(rcats(4,ll,1).GE.99998.)
THEN
2580 if(iprint.eq.1)
then
2581 print
'(" ==> For lvl ",I0,"; VSG=32 & ZOB,TOB ",
2582 $ "both missing while DOB non-missing BUT one or ",
2583 $ "both of Z, T non-missing while wind missing ",
2584 $ "in"/7X,"earlier cat. 1 processing of this ",G0,
2585 $ "mb level --> valid cat. 1 lvl")', l,pob(l)*.1
2588 CALL s02o29(1,l,*9999)
2591 if(iprint.eq.1)
then
2592 print
'(" ==> For lvl ",I0,"; VSG=32 & ZOB,TOB ",
2593 $ "both missing while DOB non-missing BUT one or ",
2594 $ "both of Z, T non-missing while wind non-missing",
2595 $ " in"/6X,"earlier cat. 1 processing of this ",G0,
2596 $ "mb level --> valid cat. 3 lvl")', l,pob(l)*.1
2599 CALL s02o29(3,l,*9999)
2603 if(iprint.eq.1)
then
2604 print
'(" ==> For lvl ",I0,"; VSG=32 & ZOB,TOB both ",
2605 $ "missing while DOB non-missing AND both Z, T ",
2606 $ "missing on"/7X,"this ",G0,"mb level in cat. 1 --> ",
2607 $ "valid cat. 3 lvl")', l,pob(l)*.1
2610 CALL s02o29(3,l,*9999)
2614 print
'(" ~~IW3UNP29/R03O29: ID ",A," has VSG=32 for lvl ",
2615 $ I0," & should never come here!! - by default output",
2616 $ " as cat. 1 lvl")', sid,l
2618 CALL s02o29(1,l,*9999)
2625 IF(nint(vsg(l)).EQ. 4)
THEN
2627 if(iprint.eq.1)
then
2628 print
'(" ==> For lvl ",I0,"; VSG= 4 --> valid cat. 2 ",
2632 IF(indx16.GT.0)
THEN
2634 IF(pob(l).EQ.p16(ii).AND.pob(l).LT.bmiss)
THEN
2636 if(iprint.eq.1)
then
2637 print
'(" ## This cat. 2 level, on lvl ",I0," is",
2638 $ " also the tropopause level, as its pressure ",
2639 $ "matches that of trop. lvl no. ",I0," - ",
2640 $ "set this cat. 2"/5X,"lvl PQM to ""T""")', l,ii
2649 CALL s02o29(2,l,*9999)
2651 ELSEIF(nint(vsg(l)).EQ.16)
THEN
2653 if(iprint.eq.1)
then
2654 print
'(" ==> For lvl ",I0,"; VSG=16 --> valid cat. 3/5 ",
2659 IF(min(sob(l),dob(l)).LT.bmiss)
CALL s02o29(3,l,*9999)
2661 CALL s02o29(5,l,*9999)
2663 ELSEIF(nint(vsg(l)).EQ. 1)
THEN
2665 print
'(" ~~IW3UNP29/R03O29: HERE IS A VSG =1, SET TO CAT.6, ",
2666 $ "AT ID ",A,"; SHOULD NEVER HAPPEN!!")', sid
2668 CALL s02o29(6,l,*9999)
2670 ELSEIF(nint(vsg(l)).EQ. 2 .AND. pob(l).LT.bmiss)
THEN
2671 IF(max(sob(l),dob(l)).LT.bmiss)
THEN
2673 if(iprint.eq.1)
then
2674 print.ne.
'(" ==> For lvl ",I0,"; VSG= 2 & POB missing ",
2675 $ "--> valid cat. 3 lvl (expect that ZOB is missing)")', l
2678 CALL s02o29(3,l,*9999)
2681 if(iprint.eq.1)
then
2682 print.ne.
'(" ==> For lvl ",I0,"; VSG= 2 & POB missing ",
2683 $ "--> Cat. 3 level not processed - wind is missing")', l
2688 ELSEIF(nint(vsg(l)).EQ. 2 .AND. zob(l).LT.bmiss)
THEN
2689 IF(max(sob(l),dob(l)).LT.bmiss)
THEN
2694 IF(sid(1:2).EQ.
'70'.OR.sid(1:2).EQ.
'71'.OR.sid(1:2).EQ.
'72'
2695 $ .OR.sid(1:2).EQ.
'74') zob(l) = e34o29(zob(l),z100)
2697 if(iprint.eq.1)
then
2698 print.ne.
'(" ==> For lvl ",I0,"; VSG= 2 & ZOB missing ",
2699 $ "--> valid cat. 4 lvl (POB must always be missing)")', l
2700 if(sid(1:2).eq.
'70'.or.sid(1:2).eq.
'71'.or.sid(1:2).eq.
'72'
2701 $ .or.sid(1:2).eq.
'74') print
'(" .... ZOB at this ",
2702 $ "U.S. site adjusted to ",G0)', zob(l)
2711 CALL s02o29(4,l,*9999)
2714 if(iprint.eq.1)
then
2715 print.ne.
'(" ==> For lvl ",I0,"; VSG= 2 & ZOB missing ",
2716 $ "--> Cat. 4 level not processed - wind is missing")', l
2721 ELSEIF(nint(vsg(l)).EQ. 8 .AND. pob(l).LT.bmiss)
THEN
2723 if(iprint.eq.1)
then
2724 print.ne.
'(" ==> For lvl ",I0,"; VSG= 8 & POB missing ",
2725 $ "--> valid cat. 3 lvl (expect that ZOB is missing)")', l
2728 CALL s02o29(3,l,*9999)
2730 ELSEIF(nint(vsg(l)).EQ. 8 .AND. zob(l).LT.bmiss)
THEN
2731 IF(max(sob(l),dob(l)).LT.bmiss)
THEN
2736 IF(sid(1:2).EQ.
'70'.OR.sid(1:2).EQ.
'71'.OR.sid(1:2).EQ.
'72'
2737 $ .OR.sid(1:2).EQ.
'74') zob(l) = e34o29(zob(l),z100)
2739 if(iprint.eq.1)
then
2740 print.ne.
'(" ==> For lvl ",I0,"; VSG= 8 & ZOB missing ",
2741 $ "--> valid cat. 4 lvl (POB must always be missing)")', l
2742 if(sid(1:2).eq.
'70'.or.sid(1:2).eq.
'71'.or.sid(1:2).eq.
'72'
2743 $ .or.sid(1:2).eq.
'74') print
'(" .... ZOB at this ",
2744 $ "U.S. site adjusted to ",G0)', zob(l)
2753 CALL s02o29(4,l,*9999)
2756 if(iprint.eq.1)
then
2757 print.ne.
'(" ==> For lvl ",I0,"; VSG= 8 & ZOB missing ",
2758 $ "--> Cat. 4 level not processed - wind is missing")', l
2770 IF(nint(vsg(l)).GT.0)
THEN
2771 print 887, l,sid,nint(vsg(l))
2772 887
FORMAT(
' ##IW3UNP29/R03O29 - ~~ON LVL',i4,
' OF ID ',a8,
', A ',
2773 $
'VERTICAL SIGNIFICANCE OF',i3,
' WAS NOT SUPPORTED - LEAVE ',
2774 $
'THIS LEVEL OUT OF THE PROCESSING')
2775 print
'(" ..... at lvl=",I0,"; POB = ",G0,"; QOB = ",G0,
2776 $ "; TOB = ",G0,"; ZOB = ",G0,"; DOB = ",G0,";"/19X,"SOB = ",
2777 $ G0)', pob(l),qob(l),tob(l),zob(l),dob(l),sob(l)
2784 CALL ufbint(lunit,arr_8,10,255,nlev,
'HOCB CLAM QMCA HBLCS')
2787 IF(arr(1,l).LT.bmiss/2.)
THEN
2791 IF(elv+arr(1,l).GE.bmiss/2.)
THEN
2793 ELSE IF(elv+arr(1,l).LE.11000)
THEN
2794 clp(l) = (prs1(elv+arr(1,l))*10.) + 0.001
2796 clp(l) = (prs2(elv+arr(1,l))*10.) + 0.001
2800 IF(nint(arr(4,l)).GE.10)
THEN
2803 IF(elv+ihblcs(nint(arr(4,l))).GE.bmiss/2.)
THEN
2805 ELSE IF(elv+ihblcs(nint(arr(4,l))).LE.11000)
THEN
2806 clp(l) = (prs1(elv+ihblcs(nint(arr(4,l))))*10.) +0.001
2808 clp(l) = (prs2(elv+ihblcs(nint(arr(4,l))))*10.) +0.001
2812 cla(l) = e13o29(arr(2,l))
2814 qca(l) = e35o29(arr(3,l))
2815 IF(clp(l).LT.bmiss .OR. cla(l).LT.bmiss)
CALL s02o29(7,l,*9999)
2829 CALL ufbint(lunit,rct_8, 5,255,nrct,rcstr);rct=rct_8
2850 ob8(l) = nint((nint(rct(1,l))+nint(rct(2,l))/60.) * 100.)
2851 IF(irecco.GT.0.AND.nint(rct(3,l)).EQ.0) rct(3,l) = 9
2852 q81(l) = e36o29(nint(rct(3,l)))
2854 CALL s02o29(8,l,*9999)
2857 CALL ufbint(lunit,rmore_8,4,1,nrmore,
'SIRC TTSS UALNHR UALNMN')
2859 IF(max(rmore(3),rmore(4)).LT.bmiss)
THEN
2861 ob8(1) = nint((rmore(3)+rmore(4)/60.) * 100.)
2864 CALL s02o29(8,1,*9999)
2866 IF(nint(rat(1)).LT.100)
THEN
2869 IF(nint(rmore(1)).LT.9) isir = nint(rmore(1))
2871 IF(nint(rmore(2)).LT.99) itec = nint(rmore(2))
2872 ob8(1) = (isir * 10000) + (nint(rat(1)) * 100) + itec
2875 CALL s02o29(8,1,*9999)
2881 CALL s03o29(obs,subset,*9999,*9998)
2888 print
'(" IW3UNP29/R03O29: RPT with ID= ",A," TOSSED - ZERO ",
2889 $ "CAT.1-6,51,52 LVLS")', sid
2897 FUNCTION r04o29(LUNIT,OBS)
2900 common/io29ee/pob(255),qob(255),tob(255),zob(255),dob(255),
2901 $ sob(255),vsg(255),clp(255),cla(255),ob8(255),
2903 common/io29ff/pqm(255),qqm(255),tqm(255),zqm(255),wqm(255),
2904 $ qcp(255),qca(255),q81(255),q82(255)
2905 common/io29gg/psl,stp,sdr,ssp,stm,dpd,tmx,tmi,hvz,prw,pw1,ccn,chn,
2906 $ ctl,ctm,cth,hcb,cpt,apt,pc6,snd,p24,dop,pow,how,swd,
2907 $ swp,swh,sst,spg,spd,shc,sas,wes
2908 common/io29hh/psq,spq,swq,stq,ddq
2909 common/io29cc/subset,idat10
2910 common/io29bb/kndx,kskacf(8),kskupa,ksksfc,ksksat,ksksmi
2913 CHARACTER*80 hdstr,rcstr
2914 CHARACTER*8 subset,sid,e35o29,rsv,rsv2
2915 CHARACTER*1 pqm,qqm,tqm,zqm,wqm,qcp,qca,q81,q82,psq,spq,swq,stq,
2917 REAL(8) rid_8,ufbint_8,bmiss
2918 REAL(8) hdr_8(20),rct_8(5,255),rrsv_8(3),clds_8(4,255),
2920 INTEGER itiwm(0:15),ihblcs(0:9)
2921 dimension obs(*),hdr(20),rct(5,255),rrsv(3),clds(4,255),jth(0:9),
2922 $ jtl(0:9),ltl(0:9),tmxmnm(4,255)
2923 equivalence(rid_8,sid)
2927 DATA hdstr/
'RPID CLON CLAT HOUR MINU SELV AUTO '/
2928 DATA rcstr/
'RCHR RCMI RCTS '/
2930 DATA jth/0,1,2,3,4,5,6,8,7,9/,jtl/0,1,5,8,7,2,3,4,6,9/
2931 DATA ltl/0,1,5,6,7,2,8,4,3,9/
2932 DATA itiwm/0,3*7,3,3*7,1,3*7,4,3*7/
2933 DATA ihblcs/25,75,150,250,450,800,1250,1750,2250,2500/
2944 IF(r04o29.NE.99)
RETURN
2952 CALL ufbint(lunit,hdr_8,20, 1,iret,hdstr);hdr(2:)=hdr_8(2:)
2953 CALL ufbint(lunit,rct_8, 5,255,nrct,rcstr);rct=rct_8
2954 IF(hdr(5).GE.bmiss) hdr(5) = 0
2955 rctim = nint(rct(1,1))+nint(rct(2,1))/60.
2960 IF(hdr(4).LT.bmiss) rhr = nint(hdr(4))+nint(hdr(5))/60.
2971 IF(subset(1:5).EQ.
'NC000')
THEN
2972 IF(subset(6:8).EQ.
'001'.OR.subset(6:8).EQ.
'009')
THEN
2974 IF(subset(6:8).EQ.
'009') i2 = 1
2975 ELSE IF(subset(6:8).NE.
'002')
THEN
2976 IF(hdr(7).LT.15)
THEN
2977 IF(hdr(7).GT.0.AND.hdr(7).LT.5)
THEN
2979 ELSE IF(hdr(7).EQ.8)
THEN
2987 itp = (10 * i1) + i2
2988 rtp = e33o29(subset,sid)
3001 CALL ufbint(lunit,ufbint_8,1,1,nrsv,
'INPC');rrsv(1)=ufbint_8
3002 CALL ufbint(lunit,ufbint_8,1,1,nrsv,
'TIWM');tiwm=ufbint_8
3003 IF(tiwm.LT.bmiss)
THEN
3005 IF(nint(tiwm).LE.15) rrsv(2) = itiwm(nint(tiwm))
3007 CALL ufbint(lunit,ufbint_8,1,1,nrsv,
'SUWS');rrsv(2)=ufbint_8
3009 CALL ufbint(lunit,ufbint_8,1,1,nrsv,
'ITSO');rrsv(3)=ufbint_8
3012 IF(rrsv(i).LT.bmiss)
WRITE(rsv(i:i),
'(I1)') nint(rrsv(i))
3018 CALL ufbint(lunit,ufbint_8,1,1,iret,
'PMSL');psl=ufbint_8
3019 CALL ufbint(lunit,ufbint_8,1,1,iret,
'PRES');stp=ufbint_8
3020 CALL ufbint(lunit,ufbint_8,1,1,iret,
'WDIR');sdr=ufbint_8
3021 CALL ufbint(lunit,ufbint_8,1,1,iret,
'WSPD');ssp=ufbint_8
3023 CALL ufbint(lunit,ufbint_8,1,1,iret,
'TMDB');stm=ufbint_8
3024 CALL ufbint(lunit,ufbint_8,1,1,iret,
'TMDP');dpd=ufbint_8
3025 IF(subset.NE.
'NC000007')
THEN
3026 CALL ufbint(lunit,ufbint_8,1,1,iret,
'MXTM');tmx=ufbint_8
3027 CALL ufbint(lunit,ufbint_8,1,1,iret,
'MITM');tmi=ufbint_8
3032 CALL ufbint(lunit,ufbint_8,1,1,iret,
'QMPR');qsl=ufbint_8
3033 CALL ufbint(lunit,ufbint_8,1,1,iret,
'QMPR');qsp=ufbint_8
3034 CALL ufbint(lunit,ufbint_8,1,1,iret,
'QMWN');qmw=ufbint_8
3035 CALL ufbint(lunit,ufbint_8,1,1,iret,
'QMAT');qmt=ufbint_8
3036 CALL ufbint(lunit,ufbint_8,1,1,iret,
'QMDD');qmd=ufbint_8
3037 CALL ufbint(lunit,ufbint_8,1,1,iret,
'HOVI');hvz=ufbint_8
3038 CALL ufbint(lunit,ufbint_8,1,1,iret,
'PRWE');prw=ufbint_8
3039 CALL ufbint(lunit,ufbint_8,1,1,iret,
'PSW1');pw1=ufbint_8
3040 CALL ufbint(lunit,ufbint_8,1,1,iret,
'PSW2');pw2=ufbint_8
3041 CALL ufbint(lunit,ufbint_8,1,1,iret,
'TOCC');ccn=ufbint_8
3042 CALL ufbint(lunit,ufbint_8,1,1,iret,
'CHPT');cpt=ufbint_8
3043 CALL ufbint(lunit,ufbint_8,1,1,iret,
'3HPC');apt=ufbint_8
3044 IF(max(apt,cpt).GE.bmiss)
THEN
3046 CALL ufbint(lunit,ufbint_8,1,1,iret,
'24PC');apt24=ufbint_8
3047 IF(apt24.LT.bmiss)
THEN
3057 CALL ufbint(lunit,ufbint_8,1,1,iret,
'TP06');pc6=ufbint_8
3058 CALL ufbint(lunit,ufbint_8,1,1,iret,
'TOSD');snd=ufbint_8
3059 CALL ufbint(lunit,ufbint_8,1,1,iret,
'TP24');p24=ufbint_8
3060 CALL ufbint(lunit,ufbint_8,1,1,iret,
'TOPC');pto=ufbint_8
3061 IF(pto.LT.bmiss)
THEN
3062 IF(pc6.GE.bmiss.AND.nint(dop).EQ. 6) pc6 = pto
3064 IF(pc6.GE.bmiss.AND.nint(dop).EQ. 6)
3065 $ print
'(" ~~IW3UNP29/R04O29: PTO used for PC6 since latter ",
3066 $ "missing & 6-hr DOP")'
3068 IF(p24.GE.bmiss.AND.nint(dop).EQ.24) p24 = pto
3070 IF(p24.GE.bmiss.AND.nint(dop).EQ.24)
3071 $ print
'(" ~~IW3UNP29/R04O29: PTO used for P24 since latter ",
3072 $ "missing & 24-hr DOP")'
3075 CALL ufbint(lunit,ufbint_8,1,1,iret,
'POWW');pow=ufbint_8
3076 CALL ufbint(lunit,ufbint_8,1,1,iret,
'HOWW');how=ufbint_8
3077 IF(subset(1:5).EQ.
'NC001')
THEN
3078 IF(subset(6:8).NE.
'006')
THEN
3079 IF(min(pow,how).GE.bmiss)
THEN
3080 CALL ufbint(lunit,ufbint_8,1,1,iret,
'POWV');pow=ufbint_8
3081 CALL ufbint(lunit,ufbint_8,1,1,iret,
'HOWV');how=ufbint_8
3088 CALL ufbint(lunit,ufbint_8,1,1,iret,
'DOSW');swd=ufbint_8
3089 CALL ufbint(lunit,ufbint_8,1,1,iret,
'POSW');swp=ufbint_8
3090 CALL ufbint(lunit,ufbint_8,1,1,iret,
'HOSW');swh=ufbint_8
3091 CALL ufbint(lunit,ufbint_8,1,1,iret,
'SST1');sst=ufbint_8
3092 IF(sst.GE.bmiss)
THEN
3093 CALL ufbint(lunit,ufbint_8,1,1,iret,
'STMP');sst=ufbint_8
3095 CALL ufbint(lunit,ufbint_8,1,1,iret,
'????');spg=ufbint_8
3096 CALL ufbint(lunit,ufbint_8,1,1,iret,
'????');spd=ufbint_8
3097 CALL ufbint(lunit,ufbint_8,1,1,iret,
'TDMP');shc=ufbint_8
3098 CALL ufbint(lunit,ufbint_8,1,1,iret,
'ASMP');sas=ufbint_8
3099 CALL ufbint(lunit,ufbint_8,1,1,iret,
'????');wes=ufbint_8
3101 IF(min(snd,p24,pow,how,swd,swp,swh,sst,spg,spd,shc,sas,wes)
3102 $ .GE.bmiss.AND.(pc6.EQ.0..OR.pc6.GE.bmiss)) i52flg= 1
3107 CALL ufbint(lunit,clds_8,4,255,ncld,
'VSSO CLAM CLTP HOCB')
3126 IF(clds(4,l).LT.bmiss)
THEN
3136 CALL ufbint(lunit,ufbint_8,1,1,iret,
'HBLCS')
3138 IF(nint(hblcs).LT.10) cht = ihblcs(nint(hblcs))
3140 IF(cht.LT.bmiss) cht = cht * 3.2808
3141 IF(nint(vss).EQ.0)
THEN
3142 IF(nint(ctp).GT.9.AND.nint(ctp).LT.20)
THEN
3143 ith = mod(nint(ctp),10)
3145 cth = max(kth,nint(cth))
3147 ELSE IF(nint(ctp).LT.30)
THEN
3148 itm = mod(nint(ctp),10)
3149 ctm = max(itm,nint(ctm))
3150 IF(itm.EQ.0) cam = 0.
3153 ELSE IF(nint(ctp).LT.40)
THEN
3154 itl = mod(nint(ctp),10)
3156 ctl = max(ktl,nint(ctl))
3157 IF(itl.EQ.0) cam = 0.
3160 ELSE IF(nint(ctp).EQ.59)
THEN
3163 IF(ccm.EQ.0.) ccm = 15.
3165 IF(ccl.EQ.0.) ccl = 15.
3166 ELSE IF(nint(ctp).EQ.60)
THEN
3168 ELSE IF(nint(ctp).EQ.61)
THEN
3170 IF(ccm.EQ.0.) ccm = 15.
3171 ELSE IF(nint(ctp).EQ.62)
THEN
3173 IF(ccl.EQ.0.) ccl = 15.
3178 IF(nint(cth).GT.-1.AND.nint(cth).LT.10)
THEN
3179 cth = jth(nint(cth))
3180 ELSE IF(nint(cth).NE.10)
THEN
3183 IF(nint(ctm).LT.0.OR.nint(ctm).GT.10)
THEN
3187 IF(nint(ctl).GT.-1.AND.nint(ctl).LT.10)
THEN
3188 ctl = ltl(nint(ctl))
3189 ELSE IF(nint(ctl).NE.10)
THEN
3199 sdr = e04o29(sdr,ssp)
3200 ssp = e05o29(sdr,ssp)
3201 IF(nint(sdr).EQ.0) sdr = 360.
3202 IF(sdr.GE.bmiss.AND.nint(ssp).EQ.0) sdr = 360.
3203 dpd = e07o29(dpd,stm)
3216 IF(subset(1:5).EQ.
'NC001'.AND.psq.EQ.
'C') stp = bmiss
3217 IF(psl.GE.bmiss) psq =
' '
3218 IF(stp.GE.bmiss) spq =
' '
3219 IF(max(sdr,ssp).GE.bmiss) swq =
' '
3220 IF(stm.GE.bmiss) stq =
' '
3222 IF(subset(1:5).EQ.
'NC000'.OR.subset.EQ.
'NC001004')
THEN
3230 IF(ddq.NE.
'P'.AND.ddq.NE.
'H'.AND.ddq.NE.
'C')
THEN
3233 IF(ipw2.GT.-1.AND.ipw2.LT.10)
WRITE(ddq,
'(I1)') ipw2
3236 chn = e14o29(ccl,ccm)
3240 hcb = e18o29(chl,chm,chh,ctl,ctm,cth)
3264 CALL s01o29(sid,xob,yob,rhr,rch,rsv,rsv2,elv,itp,rtp)
3265 CALL s02o29(51,1,*9999)
3266 IF(i52flg.EQ.0)
CALL s02o29(52,1,*9999)
3281 CALL ufbint(lunit,ufbint_8,1,1,iret,
'ALSE');als=ufbint_8
3282 IF(als.LT.bmiss)
THEN
3283 ob8(1) = e01o29(als)
3287 CALL s02o29(8,1,*9999)
3289 IF(subset.EQ.
'NC000007')
THEN
3290 CALL ufbint(lunit,tmxmnm_8,4,255,ntxm,
3291 $
'.DTHMXTM MXTM .DTHMITM MITM');tmxmnm=tmxmnm_8
3295 IF(nint(tmxmnm(j,i)).EQ.24)
THEN
3296 IF(tmxmnm(j+1,i).LT.bmiss)
THEN
3297 tmx = e06o29(tmxmnm(j+1,i))
3299 ob8(1) = 1000 + abs(nint(tmx))
3303 cf8(1) = 81 + int(j/2)
3306 CALL s02o29(8,1,*9999)
3308 ELSE IF(nint(tmxmnm(j,i)).EQ.6)
THEN
3309 IF(tmxmnm(j+1,i).LT.bmiss)
THEN
3310 tmx = e06o29(tmxmnm(j+1,i))
3312 ob8(1) = 1000 + abs(nint(tmx))
3316 cf8(1) = 83 + int(j/2)
3319 CALL s02o29(8,1,*9999)
3326 CALL ufbint(lunit,ufbint_8,1,1,iret,
'TP01');pc1=ufbint_8
3327 IF(pc1.LT.10000)
THEN
3328 ob8(1) = e20o29(pc1)
3332 CALL s02o29(8,1,*9999)
3334 CALL ufbint(lunit,ufbint_8,1,1,iret,
'TOSS');dus=ufbint_8
3335 IF(nint(dus).LT.1000)
THEN
3336 ob8(1) = nint(98000. + dus)
3340 CALL s02o29(8,1,*9999)
3342 IF(wspd1.LT.bmiss)
THEN
3343 ob8(1) = nint(wspd1*10.)
3347 CALL s02o29(8,1,*9999)
3350 CALL s03o29(obs,subset,*9999,*9998)
3359 print
'(" IW3UNP29/R04O29: RPT with ID= ",A," TOSSED - ZERO ",
3360 $ "CAT.1-6,51,52 LVLS")', sid
3369 FUNCTION r05o29(LUNIT,OBS)
3372 common/io29ee/pob(255),qob(255),tob(255),zob(255),dob(255),
3373 $ sob(255),vsg(255),clp(255),cla(255),ob8(255),
3375 common/io29ff/pqm(255),qqm(255),tqm(255),zqm(255),wqm(255),
3376 $ qcp(255),qca(255),q81(255),q82(255)
3377 common/io29cc/subset,idat10
3378 common/io29bb/kndx,kskacf(8),kskupa,ksksfc,ksksat,ksksmi
3381 CHARACTER*80 hdstr,lvstr,qmstr,rcstr,crawr
3382 CHARACTER*8 subset,sid,sido,sidmod,e35o29,rsv,rsv2,ccl,craw(1,255)
3383 CHARACTER*1 pqm,qqm,tqm,zqm,wqm,qcp,qca,q81,q82,cturb(0:14)
3384 REAL(8) rid_8,rcl_8,ufbint_8,rns_8,bmiss
3385 REAL(8) hdr_8(20),rct_8(5,255),arr_8(10,255),raw_8(1,255)
3386 dimension obs(*),hdr(20),rct(5,255),arr(10,255),raw(1,255)
3387 equivalence(rid_8,sid),(rcl_8,ccl),(raw_8,craw)
3391 DATA hdstr/
'RPID CLON CLAT HOUR MINU SECO '/
3392 DATA lvstr/
'PRLC TMDP TMDB WDIR WSPD '/
3393 DATA qmstr/
'QMPR QMAT QMDD QMGP QMWN '/
3394 DATA rcstr/
'RCHR RCMI RCTS '/
3396 DATA cturb/
'0',
'1',
'2',
'3',
'0',
'1',
'2',
'3',
'0',
'1',
'2',4*
'3'/
3406 IF(r05o29.NE.99)
RETURN
3414 CALL ufbint(lunit,hdr_8,20, 1,iret,hdstr);hdr(2:)=hdr_8(2:)
3415 IF(iret.EQ.0) sid =
' '
3416 CALL ufbint(lunit,rct_8, 5,255,nrct,rcstr);rct=rct_8
3417 IF(hdr(5).GE.bmiss) hdr(5) = 0
3418 IF(hdr(6).GE.bmiss) hdr(6) = 0
3419 rctim = nint(rct(1,1))+nint(rct(2,1))/60.
3424 IF(hdr(4).LT.bmiss) rhr = nint(hdr(4)) + ((nint(hdr(5)) * 60.) +
3425 $ nint(hdr(6)))/3600.
3431 CALL ufbint(lunit,hdr_8,20,1,iret,
'PSAL FLVL IALT HMSL PRLC')
3434 IF(hdr(5).LT.bmiss) elev = e03o29(hdr(5)*.01)
3435 IF(hdr(4).LT.bmiss) elev = hdr(4)
3443 IF(hdr(2).LT.bmiss) elev = hdr(2) + sign(0.0000001,hdr(2))
3444 IF(hdr(1).LT.bmiss) elev = hdr(1) + sign(0.0000001,hdr(1))
3451 CALL ufbint(lunit,rns_8,1,1,iret,
'ACNS');rns=rns_8
3452 IF(rns.LT.bmiss)
THEN
3453 IF(nint(rns).EQ.0)
THEN
3455 ELSE IF(nint(rns).EQ.1)
THEN
3460 rtp = e33o29(subset,sid)
3462 CALL ufbint(lunit,rcl_8,1,1,iret,
'BORG')
3465 CALL ufbint(lunit,rcl_8,1,1,iret,
'ICLI')
3466 IF(iret.EQ.0) ccl =
' '
3469 IF(ccl(1:4).EQ.
'KAWN')
THEN
3483 IF(subset.EQ.
'NC004003')
THEN
3526 CALL ufbint(lunit,ufbint_8,1,1,iret,
'POAF');pof=ufbint_8
3527 IF(pof.LT.bmiss)
WRITE(rsv(1:1),
'(I1)') nint(pof)
3528 CALL ufbint(lunit,ufbint_8,1,1,iret,
'PCAT');pct=ufbint_8
3529 IF(nint(pct).GT.1) rsv(2:2) =
'0'
3530 IF(ccl(1:4).EQ.
'KAWN') rsv(3:3) =
'C'
3532 ELSE IF(subset.EQ.
'NC004004')
THEN
3538 CALL ufbint(lunit,rid_8,1,1,iret,
'ACRN')
3539 IF(iret.EQ.0) sid =
'ACARS '
3543 ELSE IF(subset.EQ.
'NC004001'.OR.subset.EQ.
'NC004002')
THEN
3552 IF(sid(6:6).EQ.
'Z') sid(6:6) =
'X'
3553 IF(sid.EQ.
'A '.OR.sid.EQ.
' '.OR.sid(1:3).EQ.
'ARP'
3554 $ .OR.sid(1:3).EQ.
'ARS') sid =
'AIRCFT '
3567 if(ccl(1:4).eq.
'PHWR')
then
3573 kskacf(8) = kskacf(8) + 1
3599 call ufbint(lunit,raw_8,1,255,nlev,
'RRSTG');raw=raw_8
3604 crawr(ni:ni+7) = craw(1,mm)
3605 if(ni+8.gt.80)
go to 556
3609 if(crawr(mm:mm+1).eq.
' S')
then
3610 if((crawr(mm+2:mm+2).ge.
'0'.and.crawr(mm+2:mm+2).le.
3611 $
'9').or.crawr(mm+2:mm+2).eq.
'/')
then
3612 if((crawr(mm+3:mm+3).ge.
'0'.and.crawr(mm+3:mm+3)
3613 $ .le.
'9').or.crawr(mm+3:mm+3).eq.
'/')
then
3614 if((crawr(mm+4:mm+4).ge.
'0'.and.
3615 $ crawr(mm+4:mm+4).le.
'9').or.crawr(mm+4:mm+4)
3621 if(crawr(mm+3:mm+3).lt.
'3')
then
3644 kskacf(4) = kskacf(4) + 1
3652 if(mm+5.gt.ni+7)
go to 557
3664 rsv = sid(8:8)//sid(7:7)//
' '
3665 IF(ccl(1:4).EQ.
'KAWN') rsv(3:3) =
'C'
3673 CALL ufbint(lunit,ufbint_8,1,1,iret,
'DGOT');dgt=ufbint_8
3678 CALL ufbint(lunit,arr_8,10,255,nlev,lvstr);arr=arr_8
3708 pob(l) = e01o29(arr(1,l))
3709 qob(l) = e07o29(arr(2,l),arr(3,l))
3710 tob(l) = e06o29(arr(3,l))
3712 dob(l) = e04o29(arr(4,l),arr(5,l))
3713 sob(l) = e05o29(arr(4,l),arr(5,l))
3717 CALL ufbint(lunit,arr_8,10,255,nlev,qmstr);arr=arr_8
3719 IF(subset.EQ.
'NC004004')
THEN
3726 pqm(l) = e35o29(arr(1,l))
3727 tqm(l) = e35o29(arr(2,l))
3728 qqm(l) = e35o29(arr(3,l))
3729 zqm(l) = e35o29(arr(4,l))
3730 wqm(l) = e35o29(arr(5,l))
3736 IF(nlev.EQ.0.OR.arr(5,1).GE.bmiss) wqm(1) =
'A'
3755 IF(arr(5,l).EQ.0.AND.(arr(2,l).LT.10.OR.arr(2,l).GT.15))
THEN
3757 ELSE IF(arr(5,l).EQ.14.OR.arr(2,l).EQ.14)
THEN
3759 ELSE IF(arr(5,l).EQ.13.OR.arr(2,l).EQ.13)
THEN
3765 zqm(l) = e35o29(arr(4,l))
3770 IF(nint(dgt).LT.15) qqm(l) = cturb(nint(dgt))
3783 CALL s01o29(sid,xob,yob,rhr,rch,rsv,rsv2,elv,itp,rtp)
3784 CALL s02o29(6,1,*9999)
3805 IF(subset.EQ.
'NC004004')
THEN
3810 CALL s02o29(8,1,*9999)
3815 CALL s02o29(8,1,*9999)
3816 IF(rhr.LT.bmiss)
THEN
3817 ob8(1) = nint((rhr*1000.)+0.0000001)
3821 CALL s02o29(8,1,*9999)
3823 ELSE IF(subset.EQ.
'NC004003')
THEN
3826 q81(kkk) = sido(2*kkk-1:2*kkk-1)
3827 q82(kkk) = sido(2*kkk:2*kkk)
3828 cf8(kkk) = 916 + kkk
3829 CALL s02o29(8,kkk,*9999)
3837 CALL s02o29(8,2,*9999)
3842 CALL s02o29(8,3,*9999)
3844 IF(wspd1.LT.bmiss)
THEN
3845 ob8(4) = nint(wspd1*10.)
3849 CALL s02o29(8,4,*9999)
3852 CALL s03o29(obs,subset,*9999,*9998)
3861 print
'(" IW3UNP29/R05O29: RPT with ID= ",A," TOSSED - ZERO ",
3862 $ "CAT.1-6,51,52 LVLS")', sid
3864 kskacf(1) = kskacf(1) + 1
3871 FUNCTION r06o29(LUNIT,OBS)
3874 common/io29ee/pob(255),qob(255),tob(255),zob(255),dob(255),
3875 $ sob(255),vsg(255),clp(255),cla(255),ob8(255),
3877 common/io29ff/pqm(255),qqm(255),tqm(255),zqm(255),wqm(255),
3878 $ qcp(255),qca(255),q81(255),q82(255)
3879 common/io29cc/subset,idat10
3880 common/io29bb/kndx,kskacf(8),kskupa,ksksfc,ksksat,ksksmi
3881 common/io29kk/kount(499,18)
3884 CHARACTER*80 hdstr,lvstr,qmstr,rcstr
3885 CHARACTER*8 subset,sid,e35o29,rsv,rsv2
3887 CHARACTER*1 pqm,qqm,tqm,zqm,wqm,qcp,qca,q81,q82,csat(499),
3888 $ cprd(9),cindx7,c7(26),cprod(0:4),cprdf(3)
3890 REAL(8) rid_8,ufbint_8,bmiss
3891 REAL(8) hdr_8(20),rct_8(5,255),arr_8(10,255)
3892 dimension obs(*),hdr(20),rct(5,255),arr(10,255)
3893 equivalence(rid_8,sid)
3897 DATA hdstr/
'RPID CLON CLAT HOUR MINU SAID '/
3898 DATA lvstr/
'PRLC TMDP TMDB WDIR WSPD '/
3899 DATA qmstr/
'QMPR QMAT QMDD QMGP SWQM '/
3900 DATA rcstr/
'RCHR RCMI RCTS '/
3902 DATA csat /
'A',
'B',
'C',
'D',45*
'?',
'Z',
'W',
'X',
'Y',
'Z',
'W',
'X',
3903 $
'Y',
'Z',
'W',90*
'?',
'R',
'O',
'P',
'Q',
'R',
'O',
'P',
'Q',
'R',
'O',
3905 DATA cprod /
'C',
'D',
'?',
'?',
'E'/
3906 DATA cprdf /
'C',
'B',
'V'/
3907 DATA iprdf / 1 , 6 , 4 /
3908 DATA cprd /
'C',
'V',
'I',
'W',
'P',
'T',
'L',
'Z',
'G'/
3909 DATA c7 /
'A',
'B',
'C',
'D',
'E',
'F',
'G',
'H',
'I',
'J',
'K',
'L',
'M',
3910 $
'N',
'O',
'P',
'Q',
'R',
'S',
'T',
'U',
'V',
'W',
'X',
'Y',
'Z'/
3919 IF(r06o29.NE.99)
RETURN
3927 CALL ufbint(lunit,hdr_8,20,1,iret,
'HGHT PRLC');hdr=hdr_8
3929 IF(hdr(2).LT.bmiss) elev = e03o29(hdr(2)*.01)
3930 IF(hdr(1).LT.bmiss) elev = hdr(1)
3935 CALL ufbint(lunit,hdr_8,20, 1,iret,hdstr);hdr(2:)=hdr_8(2:)
3936 CALL ufbint(lunit,rct_8, 5,255,nrct,rcstr);rct=rct_8
3937 IF(hdr(5).GE.bmiss) hdr(5) = 0
3938 rctim = nint(rct(1,1))+nint(rct(2,1))/60.
3943 IF(hdr(4).LT.bmiss) rhr = nint(hdr(4))+nint(hdr(5))/60.
3989 READ(subset(8:8),
'(I1)') inum
3990 IF(sid(1:1).GE.
'A'.AND.sid(1:1).LE.
'D')
THEN
3991 CALL ufbint(lunit,ufbint_8,1,1,iret,
'SWPR');swpr=ufbint_8
3992 IF(nint(swpr).GT.0.AND.nint(swpr).LT.10)
3993 $
WRITE(rsv(3:3),
'(I1)') nint(swpr)
3995 CALL ufbint(lunit,ufbint_8,1,1,iret,
'SWTP');swtp=ufbint_8
3996 IF(swtp.LT.bmiss) itp = nint(swtp)
3997 CALL ufbint(lunit,ufbint_8,1,1,iret,
'SWDL');swdl=ufbint_8
3998 IF(nint(swdl).GT.-1.AND.nint(swdl).LT.10)
3999 $
WRITE(rsv(1:1),
'(I1)') nint(swdl)
4002 IF(nint(hdr(6)).LT.500)
THEN
4003 sid(1:1) = csat(nint(hdr(6)))
4004 sid(2:2) = cprod(nint(hdr(6))/100)
4008 sid(6:6) = cprdf(inum)
4014 IF(nint(hdr(6)).LT.500.AND.itp.LT.19)
THEN
4015 kount(nint(hdr(6)),itp) = min(kount(nint(hdr(6)),itp)+1,35999)
4016 kount3 = mod(kount(nint(hdr(6)),itp),1000)
4017 kount7 = int(kount(nint(hdr(6)),itp)/1000)
4018 WRITE(cindx3,
'(I3.3)') kount3
4019 IF(kount7.LT.10)
THEN
4020 WRITE(cindx7,
'(I1.1)') kount7
4022 cindx7 = c7(kount7-9)
4025 sid = sid(1:2)//cindx3//sid(6:6)//cindx7//
' '
4028 rtp = e33o29(subset,sid)
4033 CALL ufbint(lunit,arr_8,10,255,nlev,lvstr);arr=arr_8
4035 pob(l) = e01o29(arr(1,l))
4040 IF(nint(pob(l)).EQ.0)
THEN
4041 print
'(" ~~IW3UNP29/R06O29: RPT with ID= ",A," TOSSED - ",
4042 $ "PRES. IS ZERO MB")', sid
4048 qob(l) = e07o29(arr(2,l),arr(3,l))
4049 tob(l) = e06o29(arr(3,l))
4051 dob(l) = e04o29(arr(4,l),arr(5,l))
4052 sob(l) = e05o29(arr(4,l),arr(5,l))
4059 CALL ufbint(lunit,arr_8,10,255,nlev,qmstr);arr=arr_8
4060 CALL ufbint(lunit,ufbint_8,1,1,iret,
'RFFL');rffl=ufbint_8
4061 IF(rffl.LT.bmiss.AND.(nint(arr(5,1)).EQ.2.OR.nint(arr(5,1)).GE.
4063 IF(nint(rffl).GT.84)
THEN
4065 ELSE IF(nint(rffl).GT.55)
THEN
4067 ELSE IF(nint(rffl).GT.49)
THEN
4075 wqm(l) = e35o29(arr(5,l))
4077 IF(wqm(l).EQ.
'R'.OR.wqm(l).EQ.
'P'.OR.wqm(l).EQ.
'F')
THEN
4089 pqm(l) = e35o29(arr(1,l))
4090 tqm(l) = e35o29(arr(2,l))
4091 qqm(l) = e35o29(arr(3,l))
4092 zqm(l) = e35o29(arr(4,l))
4102 CALL s01o29(sid,xob,yob,rhr,rch,rsv,rsv2,elv,itp,rtp)
4103 CALL s02o29(6,1,*9999)
4115 IF(pob(1).LT.bmiss)
THEN
4116 ob8(1) = nint(pob(1)*0.1)
4120 CALL s02o29(8,1,*9999)
4122 IF(sid(1:1).GE.
'A'.AND.sid(1:1).LE.
'D')
THEN
4127 CALL s02o29(8,1,*9999)
4129 IF(wspd1.LT.bmiss)
THEN
4130 ob8(2) = nint(wspd1*10.)
4134 CALL s02o29(8,2,*9999)
4137 CALL s03o29(obs,subset,*9999,*9998)
4146 print
'(" IW3UNP29/R06O29: RPT with ID= ",A," TOSSED - ZERO ",
4147 $ "CAT.1-6,51,52 LVLS")', sid
4156 FUNCTION r07o29(LUNIT,OBS)
4159 common/io29ee/pob(255),qob(255),tob(255),zob(255),dob(255),
4160 $ sob(255),vsg(255),clp(255),cla(255),ob8(255),
4162 common/io29ff/pqm(255),qqm(255),tqm(255),zqm(255),wqm(255),
4163 $ qcp(255),qca(255),q81(255),q82(255)
4164 common/io29cc/subset,idat10
4165 common/io29bb/kndx,kskacf(8),kskupa,ksksfc,ksksat,ksksmi
4169 CHARACTER*8 subset,sid,rsv,rsv2
4171 CHARACTER*1 pqm,qqm,tqm,zqm,wqm,qcp,qca,q81,q82,crf
4172 REAL(8) rid_8,ufbint_8,hdr_8(20),tmbr_8(7),addp_8(5),prod_8(2,2)
4174 dimension obs(*),hdr(20),addp(5),prod(2,2),tmbr(7)
4176 equivalence(rid_8,sid)
4180 DATA hdstr/
'RPID CLON CLAT HOUR MINU SECO NMCT SAID '/
4189 IF(r07o29.NE.99)
RETURN
4197 CALL ufbint(lunit,hdr_8,20, 1,iret,hdstr);hdr(2:)=hdr_8(2:)
4198 IF(hdr(5).GE.bmiss) hdr(5) = 0
4199 IF(hdr(6).GE.bmiss) hdr(6) = 0
4204 IF(hdr(4).LT.bmiss) rhr = nint(hdr(4)) + ((nint(hdr(5)) * 60.) +
4205 $ nint(hdr(6)))/3600.
4216 IF(hdr(8).LT.bmiss) isupob = 0
4239 CALL ufbint(lunit,tmbr_8,1,7,nlev,
'TMBR');tmbr=tmbr_8
4241 ob8(nchn) = min(nint(tmbr(nchn)*100.),99999)
4242 cf8(nchn) = 188 + nchn
4244 ELSE IF(rtp.EQ.575)
THEN
4255 CALL ufbint(lunit,addp_8,5,1,iret,
'SFTG ICON ICAG ICED SFTP')
4258 IF(addp(nadd).LT.bmiss)
THEN
4259 ob8(nadd) = nint(addp(nadd))
4260 cf8(nadd) = 209 + nadd
4263 ELSE IF(rtp.EQ.571)
THEN
4273 IF(isupob.EQ.1)
THEN
4274 CALL ufbrep(lunit,prod_8,2,2,iret,
'FOST WSOS');prod=prod_8
4276 IF(prod(1,jj).EQ.4)
THEN
4277 ob8(1) = nint(prod(2,jj)*10.)
4278 ELSE IF(prod(1,jj).EQ.10)
THEN
4279 stdv = nint(prod(2,jj)*100.)
4283 CALL ufbint(lunit,ufbint_8,1,1,iret,
'WSOS');prodn=ufbint_8
4284 ob8(1) = nint(prodn*10.)
4285 CALL ufbint(lunit,ufbint_8,1,1,iret,
'RFLG');rflg=ufbint_8
4286 IF(rflg.LT.bmiss)
THEN
4287 WRITE(crf,
'(I1.1)') nint(rflg)
4291 ELSE IF(rtp.EQ.65)
THEN
4301 IF(isupob.EQ.1)
THEN
4302 CALL ufbrep(lunit,prod_8,2,2,iret,
'FOST PH2O');prod=prod_8
4304 IF(prod(1,jj).EQ.4)
THEN
4305 ob8(1) = nint(prod(2,jj)*10.)
4306 ELSE IF(prod(1,jj).EQ.10)
THEN
4307 stdv = nint(prod(2,jj)*100.)
4311 CALL ufbint(lunit,ufbint_8,1,1,iret,
'PH2O');prodn=ufbint_8
4312 ob8(1) = nint(prodn*10.)
4313 CALL ufbint(lunit,ufbint_8,1,1,iret,
'RFLG');rflg=ufbint_8
4314 IF(rflg.LT.bmiss)
THEN
4315 WRITE(crf,
'(I1)') nint(rflg)
4319 ELSE IF(rtp.EQ.66)
THEN
4327 IF(isupob.EQ.1)
THEN
4328 CALL ufbrep(lunit,prod_8,2,2,iret,
'FOST REQV');prod=prod_8
4330 IF(prod(1,jj).EQ.4)
THEN
4331 ob8(1) = nint(prod(2,jj)*3600.)
4332 ELSE IF(prod(1,jj).EQ.10)
THEN
4333 stdv = nint(prod(2,jj)*36000.)
4337 CALL ufbint(lunit,ufbint_8,1,1,iret,
'REQV');prodn=ufbint_8
4338 ob8(1) = nint(prodn*3600.)
4340 ELSE IF(rtp.EQ.576)
THEN
4348 IF(isupob.EQ.1)
THEN
4349 CALL ufbrep(lunit,prod_8,2,2,iret,
'FOST TMSK');prod=prod_8
4351 IF(prod(1,jj).EQ.4)
THEN
4352 ob8(1) = nint(prod(2,jj))
4353 ELSE IF(prod(1,jj).EQ.10)
THEN
4354 stdv = nint(prod(2,jj)*10.)
4358 CALL ufbint(lunit,ufbint_8,1,1,iret,
'TMSK');prodn=ufbint_8
4359 ob8(1) = nint(prodn)
4361 ELSE IF(rtp.EQ.69)
THEN
4370 IF(isupob.EQ.1)
THEN
4371 CALL ufbrep(lunit,prod_8,2,2,iret,
'FOST CH2O');prod=prod_8
4373 IF(prod(1,jj).EQ.4)
THEN
4374 ob8(1) = nint(prod(2,jj)*100.)
4375 ELSE IF(prod(1,jj).EQ.10)
THEN
4376 stdv = nint(prod(2,jj)*1000.)
4380 CALL ufbint(lunit,ufbint_8,1,1,iret,
'CH2O');prodn=ufbint_8
4381 ob8(1) = nint(prodn*100.)
4383 ELSE IF(rtp.EQ.573)
THEN
4391 IF(isupob.EQ.1)
THEN
4392 CALL ufbrep(lunit,prod_8,2,2,iret,
'FOST SMOI');prod=prod_8
4394 IF(prod(1,jj).EQ.4)
THEN
4395 ob8(1) = nint(prod(2,jj)*1000.)
4396 ELSE IF(prod(1,jj).EQ.10)
THEN
4397 stdv = nint(prod(2,jj)*10000.)
4401 CALL ufbint(lunit,ufbint_8,1,1,iret,
'SMOI');prodn=ufbint_8
4402 ob8(1) = nint(prodn*1000.)
4404 ELSE IF(rtp.EQ.574)
THEN
4412 IF(isupob.EQ.1)
THEN
4413 CALL ufbrep(lunit,prod_8,2,2,iret,
'FOST SNDP');prod=prod_8
4415 IF(prod(1,jj).EQ.4)
THEN
4416 ob8(1) = nint(prod(2,jj)*1000.)
4417 ELSE IF(prod(1,jj).EQ.10)
THEN
4418 stdv = nint(prod(2,jj)*10000.)
4422 CALL ufbint(lunit,ufbint_8,1,1,iret,
'SNDP');prodn=ufbint_8
4423 ob8(1) = nint(prodn*1000.)
4435 IF(stdv.LT.bmiss)
THEN
4436 WRITE(cstdv,
'(I4.4)') nint(stdv)
4440 rsv2(3:4) = cstdv(1:2)
4441 rsv(1:2) = cstdv(3:4)
4443 CALL ufbint(lunit,ufbint_8,1,1,iret,
'ACAV');acav=ufbint_8
4444 IF(acav.LT.bmiss)
THEN
4445 WRITE(cstdv(1:2),
'(I2.2)') nint(acav)
4449 rsv2(1:2) = cstdv(1:2)
4451 CALL s01o29(sid,xob,yob,rhr,rch,rsv,rsv2,elv,itp,rtp)
4454 IF(cf8(ii).LT.bmiss)
CALL s02o29(8,ii,*9999)
4460 CALL s03o29(obs,subset,*9999,*9998)
4467 print
'(" IW3UNP29/R07O29: RPT with ID= ",A," TOSSED - ZERO ",
4468 $ "CAT.1-6,8,51,52 LVLS")', sid
4490 DATA zeroes/
'000000'/
4494 l = index(iden(1:8),
' ')
4505 IF(iden(8:8).EQ.
'Z')
THEN
4516 l =
i05o29(iden(1:1),7,jchar)
4518 IF(l.EQ.0.OR.l.GT.6.OR.n.GT.6)
THEN
4531 id = iden(1:n)//zeroes(n+1:5)//
'Z'
4534 ELSE IF(n.EQ.6)
THEN
4539 IF(iden(6:6).EQ.
'Z')
THEN
4541 ELSE IF(l.GT.3)
THEN
4542 id = iden(1:3)//iden(5:6)//
'Z'
4543 ELSE IF(l.EQ.1)
THEN
4546 id = iden(1:l-1)//iden(l+1:6)//
'Z'
4549 ELSE IF(n.EQ.5)
THEN
4561 id = zeroes(1:5-n)//iden(1:n)//
'Z'
4564 iden(1:6) =
'AMDARZ'
4566 id = iden(1:l-1)// zeroes(1:5-n)//iden(l:n)//
'Z'
4586 CHARACTER*1 string(1),char
4591 IF(string(i).GE.
'0'.AND.string(i).LE.
'9')
THEN
subroutine aea(ia, ie, nc)
Program history log:
function i03o29(nunit, obs, ier)
This function reads a true (see *) on29/124 data set and unpacks one report into the unpacked office ...
function i05o29(string, num, char)
This function finds the location of the next numeric character in a string of characters.
function i01o29(lunit, hdr, ier)
This function read obs files and returns error message.
function iw3unp29(lunit, obs, ier)
This routine has not been tested reading input data from any dump type in ON29/124 format on WCOSS.
function i02o29(lunit, obs, ier)
This function read obs files and returns error message.
character *6 function c01o29(subset)
This function read subset and returns group name.
subroutine s06o29(iden, id)
This subrountine modifies amdar reports so that last character ends with 'Z'.
function r01o29(subset, lunit, obs)
This function read subset and returns corresponding file data.
subroutine orders(in, isort, idata, index, n, m, i1, i2)
Orders is a fast and stable sort routine suitable for efficient, multiple-pass sorting on variable le...
subroutine w3fa03(press, height, temp, theta)
Computes the standard height, temperature, and potential temperature given the pressure in millibars ...
subroutine w3fi64(cocbuf, locrpt, next)
Unpacks an array of upper-air reports that are packed in the format described by NMC office note 29,...