437 SUBROUTINE w3fi88(IPTR,IDENT,MSGA,ISTACK,MSTACK,KDATA,KNR,INDEX,
438 * LDATA,LSTACK,MAXR,MAXD,IUNITB,IUNITD)
453 INTEGER LSTACK(2,MAXD)
456 INTEGER IPTR(*),KPTRB(16384),KPTRD(16384)
457 INTEGER KDATA(MAXR,MAXD)
458 INTEGER MSTACK(2,MAXD)
463 INTEGER ISTACK(*),IOLD11
481 INTEGER KFXY1(1300),ISCAL1(1300)
482 INTEGER IRFVL1(3,1300),IWIDE1(1300)
483 CHARACTER*40 ANAME1(1300)
484 CHARACTER*24 AUNIT1(1300)
489 INTEGER KFXY2(200),ISCAL2(200),IRFVL2(200),IWIDE2(200)
490 CHARACTER*64 ANAME2(200)
491 CHARACTER*24 AUNIT2(200)
503 INTEGER ITBLD(20,400)
508 INTEGER ITBLD2(20,50)
523 IF (
mova2i(blank).EQ.32)
THEN
538 IF (index.GT.ident(14))
THEN
543 ELSE IF (index.LE.ident(14))
THEN
544 IF (iptr(39).NE.0)
THEN
545 DO 3000 j =1, iptr(13)
549 CALL fi8801(iptr,ident,msga,istack,iwork,kdata,ivals,
550 * mstack,knr,index,maxr,maxd,
551 * kfxy1,aname1,aunit1,iscal1,irfvl1,iwide1,irf1sw,inewvl,
552 * kfxy2,aname2,aunit2,iscal2,irfvl2,iwide2,
553 * kfxy3,aname3,aunit3,iscal3,irfvl3,iwide3,
554 * iunitb,iunitd,itbld,itbld2,kptrb,kptrd)
565 DO 1000 knofst = 0, 999, 8
567 CALL gbyte (msga,ivals,inofst,8)
568 IF (ivals(1).EQ.66)
THEN
571 CALL gbyte (msga,ivals,inofst,24)
572 IF (ivals(1).EQ.5588562)
THEN
579 print *,
'BUFR - START OF BUFR MESSAGE NOT FOUND'
586 CALL gbyte (msga,ident(1),inofst+24,8)
589 IF (ident(1).GE.2)
THEN
591 CALL gbyte (msga,ivals,inofst,24)
593 kender = itotal * 8 - 32 + iptr(19)
594 CALL gbyte (msga,ilast,kender,32)
601 CALL gbyte (msga,ivals,inofst,24)
606 CALL gbyte (msga,ivals,inofst,8)
613 CALL gbyte (msga,ivals,inofst,24)
620 CALL gbyte (msga,ivals,inofst,16)
624 CALL gbyte (msga,ivals,inofst,8)
628 CALL gbyte (msga,ivals,inofst,1)
630 IF (ident(4).GT.0)
THEN
638 CALL gbyte (msga,ivals,inofst,8)
642 CALL gbyte (msga,ivals,inofst,8)
646 IF (iunitb.NE.ioldtb)
THEN
648 IF(ioldtb.NE.-99) print *,
'W3FI88 - NEW TABLE B UNIT NUMBER'
655 IF (iold11.EQ.11)
THEN
659 ELSE IF (iold11.NE.11)
THEN
660 IF (ident(5).EQ.11)
THEN
663 ELSE IF (ident(5).NE.iold11)
THEN
666 ELSE IF (ident(5).EQ.iold11)
THEN
668 IF (ioldsb.NE.ident(6))
THEN
680 IF (ident(1).LT.2)
THEN
681 CALL gbyte (msga,ivals,inofst,16)
686 CALL gbyte (msga,ivals,inofst,8)
690 CALL gbyte (msga,ivals,inofst,8)
696 CALL gbyte (msga,ivals,inofst,8)
700 CALL gbyte (msga,ivals,inofst,8)
705 CALL gbyte (msga,ivals,inofst,8)
709 CALL gbyte (msga,ivals,inofst,8)
713 CALL gbyte (msga,ivals,inofst,8)
718 inofst = iptr(3) + iptr(2) * 8
723 CALL gbyte (msga,iptr(4),inofst,24)
726 kentry = (iptr(4) - 4) / 14
728 IF (ident(2).EQ.7)
THEN
729 DO 2000 i = 1, kentry
730 CALL gbyte (msga,kdspl ,inofst,16)
732 CALL gbyte (msga,lat ,inofst,16)
734 CALL gbyte (msga,lon ,inofst,16)
736 CALL gbyte (msga,kdahr ,inofst,16)
738 CALL gbyte (msga,dirid(1),inofst,32)
740 CALL gbyte (msga,dirid(2),inofst,16)
747 inofst = iptr(5) + iptr(4) * 8
752 CALL gbyte (msga,iptr(6),inofst,24)
758 CALL gbyte (msga,ident(14),inofst,16)
760 IF (ident(14).GT.maxr)
THEN
761 print *,
'THE NUMBER OF SUBSETS EXCEEDS THE MAXIMUM OF',maxr
762 print *,
'PASSED INTO W3FI88; MAXR MUST BE INCREASED IN '
763 print *,
'THE CALLING PROGRAM TO AT LEAST THE VALUE OF'
764 print *,ident(14),
'TO BE ABLE TO PROCESS THIS DATA'
771 CALL gbyte (msga,ivals,inofst,1)
775 CALL gbyte (msga,ivals,inofst,1)
779 nrdesc = (iptr( 6) - 8) / 2
783 CALL gbytes (msga,istack,inofst,16,0,nrdesc)
795 IF (iptr(21).EQ.0)
THEN
796 print *,
'W3FI88- TABLE B NOT YET ENTERED'
797 CALL fi8812(iptr,iunitb,iunitd,istack,nrdesc,kptrb,kptrd,
798 * irf1sw,newref,itbld,itbld2,
799 * kfxy1,aname1,aunit1,iscal1,irfvl1,iwide1,
800 * kfxy2,aname2,aunit2,iscal2,irfvl2,iwide2)
803 IF (iptr(41).NE.0)
THEN
809 IF (iptr(1).NE.0)
RETURN
812 inofst = iptr(7) + iptr(6) * 8
816 CALL gbyte (msga,ivals,inofst,24)
823 inofst = iptr(9) + iptr(8) * 8
824 CALL gbyte (msga,ivals,inofst,32)
826 IF (ivals(1).NE.926365495)
THEN
827 print *,
'BAD SECTION COUNT'
834 CALL fi8801(iptr,ident,msga,istack,iwork,kdata,ivals,
835 * mstack,knr,index,maxr,maxd,
836 * kfxy1,aname1,aunit1,iscal1,irfvl1,iwide1,irf1sw,inewvl,
837 * kfxy2,aname2,aunit2,iscal2,irfvl2,iwide2,
838 * kfxy3,aname3,aunit3,iscal3,irfvl3,iwide3,
839 * iunitb,iunitd,itbld,itbld2,kptrb,kptrd)
842 IF (iptr(1).NE.0)
THEN
846 IF (ident(5).EQ.2)
THEN
847 IF (ident(6).EQ.7)
THEN
861 IF (ident(1).LT.2)
THEN
862 CALL fi8809(ident,mstack,kdata,iptr,maxr,maxd)
864 CALL fi8810(ident,mstack,kdata,iptr,maxr,maxd)
874 IF (iptr(1).NE.0)
THEN
886 IF (iptr(38).EQ.1)
THEN
887 CALL fi8811(iptr,ident,mstack,kdata,knr,
888 * ldata,lstack,maxd,maxr)
895 IF (ident(5).EQ.11)
THEN
899 CALL fi8813 (iptr,maxr,maxd,mstack,kdata,ident,kptrd,kptrb,
900 * itbld,aname1,aunit1,kfxy1,iscal1,irfvl1,iwide1,iunitb)
967 SUBROUTINE fi8801(IPTR,IDENT,MSGA,ISTACK,IWORK,KDATA,IVALS,
968 * MSTACK,KNR,INDEX,MAXR,MAXD,
969 * KFXY1,ANAME1,AUNIT1,ISCAL1,IRFVL1,IWIDE1,IRF1SW,INEWVL,
970 * KFXY2,ANAME2,AUNIT2,ISCAL2,IRFVL2,IWIDE2,
971 * KFXY3,ANAME3,AUNIT3,ISCAL3,IRFVL3,IWIDE3,
972 * IUNITB,IUNITD,ITBLD,ITBLD2,KPTRB,KPTRD)
979 INTEGER KFXY2(*),ISCAL2(*),IRFVL2(*),IWIDE2(*)
980 CHARACTER*64 ANAME2(*)
981 CHARACTER*24 AUNIT2(*)
986 INTEGER KFXY3(200),ISCAL3(200),IRFVL3(200),IWIDE3(200)
987 CHARACTER*64 ANAME3(200)
988 CHARACTER*24 AUNIT3(200)
995 INTEGER KFXY1(*),ISCAL1(*),IRFVL1(3,*),IWIDE1(*)
996 CHARACTER*40 ANAME1(*)
997 CHARACTER*24 AUNIT1(*)
1002 INTEGER ITBLD2(20,*)
1013 INTEGER MSGA(*),KDATA(MAXR,MAXD),IVALS(*)
1018 INTEGER IPTR(*),KPTRB(*),KPTRD(*)
1020 INTEGER ISTACK(*),IWORK(*)
1022 INTEGER MSTACK(2,MAXD)
1030 IF (index.GT.1)
THEN
1049 IF (iptr(10).EQ.0)
THEN
1064 IF (iptr(21).EQ.0)
THEN
1066 CALL fi8812(iptr,iunitb,iunitd,istack,nrdesc,kptrb,kptrd,
1067 * irf1sw,newref,itbld,itbld2,
1068 * kfxy1,aname1,aunit1,iscal1,irfvl1,iwide1,
1069 * kfxy2,aname2,aunit2,iscal2,irfvl2,iwide2)
1076 IF (mm.GT.maxd)
THEN
1080 IF (iptr(11).GT.iptr(12))
THEN
1082 IF (ident(16).NE.0)
THEN
1091 iptr(17) = iptr(17) + 1
1092 IF (iptr(17).GT.ident(14))
THEN
1093 iptr(17) = iptr(17) - 1
1096 DO 300 i = 1, iptr(13)
1097 iwork(i) = istack(i)
1106 IF (iptr(39).GT.0)
THEN
1107 IF (index.GT.0)
THEN
1117 CALL fi8808 (iptr,iwork,lf,lx,ly,jdesc)
1128 IF (iptr(11).GT.15000)
THEN
1134 kprm = iptr(31) + iptr(24)
1135 IF (kprm.GT.maxd)
THEN
1136 IF (kprm.GT.kold)
THEN
1137 print *,
'EXCEEDED ARRAY SIZE',kprm,iptr(31),
1145 iptr(31) = iptr(31) + 1
1146 kprm = iptr(31) + iptr(24)
1147 mstack(1,kprm) = jdesc
1149 kdata(iptr(17),kprm) = 0
1152 CALL fi8805(iptr,ident,msga,iwork,lx,ly,
1153 * kdata,ll,knr,mstack,maxr,maxd)
1155 IF (iptr(1).NE.0)
THEN
1162 ELSE IF (lf.EQ.2)
THEN
1164 iptr(31) = iptr(31) + 1
1165 kprm = iptr(31) + iptr(24)
1166 mstack(1,kprm) = jdesc
1168 kdata(iptr(17),kprm) = 0
1172 CALL fi8806 (iptr,lx,ly,ident,msga,kdata,ivals,mstack,
1173 * iwide1,irfvl1,iscal1,j,ll,kfxy1,iwork,jdesc,maxr,maxd,
1175 IF (iptr(1).NE.0)
THEN
1180 ELSE IF (lf.EQ.3)
THEN
1183 IF (iptr(20).EQ.0)
THEN
1184 CALL fi8820 (itbld,iunitd,iptr,itbld2,kptrd)
1185 IF (iptr(1).GT.0)
THEN
1194 CALL fi8807(iptr,iwork,itbld,itbld2,jdesc,kptrd)
1195 IF (iptr(1).GT.0)
THEN
1203 kprm = iptr(31) + iptr(24)
1204 CALL fi8802(iptr,ident,msga,kdata,kfxy1,ll,mstack,
1205 * aunit1,iwide1,irfvl1,iscal1,jdesc,ivals,j,maxr,maxd,
1209 IF (iptr(1).GT.0)
THEN
1219 IF (jdesc.LE.20.AND.jdesc.GE.10)
THEN
1220 IF (ident(5).NE.11)
THEN
1222 CALL fi8815(iptr,ident,jdesc,kdata,
1223 * kfxy3,maxr,maxd,aname3,aunit3,
1224 * iscal3,irfvl3,iwide3,
1225 * keyset,ibflag,ierr)
1228 IF (iand(ibflag,16).NE.0)
THEN
1229 IF (iand(ibflag,8).NE.0)
THEN
1230 IF (iand(ibflag,4).NE.0)
THEN
1231 IF (iand(ibflag,2).NE.0)
THEN
1232 IF (iand(ibflag,1).NE.0)
THEN
1234 iptr(43) = iptr(43) + ident(14)
1245 IF (ident(16).EQ.0)
THEN
1246 knr(iptr(17)) = iptr(31)
1307 SUBROUTINE fi8802(IPTR,IDENT,MSGA,KDATA,KFXY1,LL,MSTACK,AUNIT1,
1308 * IWIDE1,IRFVL1,ISCAL1,JDESC,IVALS,J,MAXR,MAXD,KPTRB)
1318 INTEGER MSTACK(2,MAXD)
1319 INTEGER KDATA(MAXR,MAXD),IVALS(*)
1326 INTEGER KFXY1(*),ISCAL1(*),IRFVL1(3,*),IWIDE1(*)
1328 CHARACTER*24 AUNIT1(*)
1332 DATA ASKEY /
'CCITT IA5 '/
1340 IF (askey(1:9).EQ.aunit1(j)(1:9))
THEN
1342 iptr(40) = iwide1(j) / 8
1347 IF (ident(16).NE.0)
THEN
1349 CALL fi8803(iptr,ident,msga,kdata,ivals,mstack,
1350 * iwide1,irfvl1,iscal1,j,jdesc,maxr,maxd)
1357 CALL fi8804(iptr,msga,kdata,ivals,mstack,
1358 * iwide1,irfvl1,iscal1,j,ll,jdesc,maxr,maxd)
1412 SUBROUTINE fi8803(IPTR,IDENT,MSGA,KDATA,IVALS,MSTACK,
1413 * IWIDE1,IRFVL1,ISCAL1,J,JDESC,MAXR,MAXD)
1430 INTEGER MSGA(*),JDESC,MSTACK(2,MAXD)
1431 INTEGER IPTR(*),IVALS(*),KDATA(MAXR,MAXD)
1432 INTEGER NRVALS,JWIDE,IDATA
1443 DATA msk /1, 3, 7, 15, 31, 63, 127,
1445 * 255, 511, 1023, 2047, 4095,
1447 * 8191, 16383, 32767, 65535,
1449 * 131071, 262143, 524287,
1451 * 1048575, 2097151, 4194303,
1453 * 8388607, 16777215, 33554431,
1455 * 67108863, 134217727, 268435455,
1457 * 536870911, 1073741823, 2147483647,-1 /
1461 IF (iptr(45).EQ.8)
THEN
1468 IF (iptr(18).EQ.0)
THEN
1475 IF (iptr(29).GT.0.AND.jdesc.NE.7957)
THEN
1478 iptr(31) = iptr(31) + 1
1479 kprm = iptr(31) + iptr(24)
1481 CALL gbyte (msga,lowest,iptr(25),iptr(29))
1482 iptr(25) = iptr(25) + iptr(29)
1484 CALL gbyte (msga,nbinc,iptr(25),6)
1485 iptr(25) = iptr(25) + 6
1487 IF (nbinc.GT.32)
THEN
1492 IF (nbinc.GT.0)
THEN
1493 CALL gbytes (msga,ivals,iptr(25),nbinc,0,iptr(21))
1494 iptr(25) = iptr(25) + nbinc * iptr(21)
1495 DO 50 i = 1, ident(14)
1496 kdata(i,kprm) = ivals(i) + lowest
1497 IF (nbinc.EQ.32)
THEN
1498 IF (kdata(i,kprm).EQ.msk(nbinc))
THEN
1499 kdata(i,kprm) = 999999
1501 ELSE IF (kdata(i,kprm).GE.msk(nbinc))
THEN
1502 kdata(i,kprm) = 999999
1506 DO 51 i = 1, ident(14)
1507 kdata(i,kprm) = lowest
1508 IF (nbinc.EQ.32)
THEN
1509 IF (lowest.EQ.msk(32))
THEN
1510 kdata(i,kprm) = 999999
1512 ELSE IF(lowest.GE.msk(nbinc))
THEN
1513 kdata(i,kprm) = 999999
1520 jwide = iwide1(j) + iptr(26)
1522 IF (jwide.GT.32)
THEN
1525 print *,
'ERR 22 - HAVE EXCEEDED COMBINED BIT WIDTH'
1533 CALL gbyte (msga,lowest,iptr(25),jwide)
1535 iptr(25) = iptr(25) + jwide
1537 CALL gbyte (msga,nbinc,iptr(25),6)
1539 IF (nbinc.GT.32)
THEN
1544 IF (iptr(32).EQ.2.AND.iptr(33).EQ.5)
THEN
1546 IF (nbinc.GT.jwide)
THEN
1555 print *,
'NBINC CALLS FOR LARGER BIT WIDTH THAN TABLE',
1556 *
' B PLUS WIDTH CHANGES'
1559 iptr(25) = iptr(25) + 6
1565 iptr(31) = iptr(31) + 1
1566 kprm = iptr(31) + iptr(24)
1567 IF (nbinc.NE.0)
THEN
1568 CALL gbytes (msga,ivals,iptr(25),nbinc,0,nrvals)
1569 iptr(25) = iptr(25) + nbinc * nrvals
1571 DO 100 i = 1, nrvals
1573 IF (ivals(i).GE.msk(nbinc))
THEN
1574 kdata(i,kprm) = 999999
1576 IF (irfvl1(2,j).EQ.0)
THEN
1581 kdata(i,kprm) = ivals(i) + lowest + jrv
1586 IF (lowest.EQ.msk(jwide))
THEN
1587 DO 105 i = 1, nrvals
1588 kdata(i,kprm) = 999999
1591 IF (irfvl1(2,j).EQ.0)
THEN
1596 icomb = lowest + jrv
1597 DO 106 i = 1, nrvals
1598 kdata(i,kprm) = icomb
1603 mstack(1,kprm) = jdesc
1605 80
FORMAT(2x,10(f10.2,1x))
1609 mstack(2,kprm) = iscal1(j) + iptr(27)
1615 DO 1906 k = 1, iptr(40)
1616 CALL gbyte (msga,klow,iptr(25),8)
1617 iptr(25) = iptr(25) + 8
1618 IF (klow(k).NE.0)
THEN
1620 print *,
'NON-ZERO LOWEST ON TEXT DATA'
1626 CALL gbyte (msga,nbinc,iptr(25),6)
1627 iptr(25) = iptr(25) + 6
1628 IF (nbinc.NE.iptr(40))
THEN
1630 print *,
'NBINC IS NOT THE NUMBER OF CHARACTERS',nbinc
1635 iptr(31) = iptr(31) + 1
1636 kprm = iptr(31) + iptr(24)
1639 DO 1900 n = 1, ident(14)
1642 nbits = iptr(40) * 8
1645 IF (nbits.GT.mwdbit)
THEN
1646 CALL gbyte (msga,idata,iptr(25),mwdbit)
1647 iptr(25) = iptr(25) + mwdbit
1648 nbits = nbits - mwdbit
1649 IF (iptr(37).EQ.0)
THEN
1653 mstack(1,kprm) = jdesc
1655 kdata(n,kprm) = idata
1659 iptr(24) = iptr(24) + 1
1663 ELSE IF (nbits.GT.0)
THEN
1664 CALL gbyte (msga,idata,iptr(25),nbits)
1665 iptr(25) = iptr(25) + nbits
1666 ibuf = (iptr(44) - nbits) / 8
1668 DO 1750 mp = 1, ibuf
1669 idata = idata * 256 + 32
1673 IF (iptr(37).EQ.0)
THEN
1676 mstack(1,kprm) = jdesc
1678 kdata(n,kprm) = idata
1731 SUBROUTINE fi8804(IPTR,MSGA,KDATA,IVALS,MSTACK,
1732 * IWIDE1,IRFVL1,ISCAL1,J,LL,JDESC,MAXR,MAXD)
1748 INTEGER MSGA(*),MAXD,MAXR
1753 INTEGER KDATA(MAXR,MAXD),MSTACK(2,MAXD)
1762 DATA itest /1,3,7,15,31,63,127,255,
1763 * 511,1023,2047,4095,8191,16383,
1764 * 32767, 65535,131071,262143,524287,
1765 * 1048575,2097151,4194303,8388607,
1766 * 16777215,33554431,67108863,134217727,
1767 * 268435455,536870911,1073741823,
1771 IF (iptr(45).NE.4)
THEN
1773 itest(32) = i + i + 1
1779 IF (iptr(18).EQ.0)
THEN
1781 IF ((iptr(26)+iwide1(j)).LT.1)
THEN
1787 jwide = iwide1(j) + iptr(26)
1789 IF (iptr(29).GT.0)
THEN
1790 IF (jdesc.NE.7957.AND.jdesc.NE.7937)
THEN
1791 iptr(31) = iptr(31) + 1
1792 kprm = iptr(31) + iptr(24)
1793 mstack(1,kprm) = 33792 + iptr(29)
1795 CALL gbyte (msga,ivals,iptr(25),iptr(29))
1796 iptr(25) = iptr(25) + iptr(29)
1797 kdata(iptr(17),kprm) = ivals(1)
1802 iptr(31) = iptr(31) + 1
1803 kprm = iptr(31) + iptr(24)
1804 mstack(1,kprm) = jdesc
1808 mstack(2,kprm) = iscal1(j) + iptr(27)
1812 CALL gbyte (msga,ivals,iptr(25),jwide)
1814 iptr(25) = iptr(25) + jwide
1816 IF (irfvl1(2,j).EQ.0)
THEN
1821 IF (jwide.EQ.32)
THEN
1822 IF (ivals(1).EQ.itest(jwide))
THEN
1823 kdata(iptr(17),kprm) = 999999
1825 kdata(iptr(17),kprm) = ivals(1) + jrv
1827 ELSE IF (ivals(1).GE.itest(jwide))
THEN
1828 kdata(iptr(17),kprm) = 999999
1830 kdata(iptr(17),kprm) = ivals(1) + jrv
1842 jwide = iptr(40) * 8
1847 iptr(31) = iptr(31) + 1
1852 IF (nrbits.GT.mwdbit)
THEN
1853 CALL gbyte (msga,idata,iptr(25),mwdbit)
1855 1801
FORMAT (1x,i2,4x,z8,2(4x,i4))
1858 IF (iptr(37).EQ.0)
THEN
1859 CALL w3ai39 (idata,iptr(45))
1861 kprm = iptr(31) + iptr(24)
1862 kdata(iptr(17),kprm) = idata
1863 mstack(1,kprm) = jdesc
1867 iptr(25) = iptr(25) + mwdbit
1868 nrbits = nrbits - mwdbit
1869 iptr(24) = iptr(24) + 1
1871 ELSE IF (nrbits.GT.0)
THEN
1872 CALL gbyte (msga,idata,iptr(25),nrbits)
1873 iptr(25) = iptr(25) + nrbits
1876 IF (iptr(37).EQ.0)
THEN
1877 CALL w3ai39 (idata,iptr(45))
1879 kprm = iptr(31) + iptr(24)
1880 kshft = mwdbit - nrbits
1881 IF (kshft.GT.0)
THEN
1883 DO 1722 lak = 1, ktry
1884 IF (iptr(37).EQ.0)
THEN
1885 idata = idata * 256 + 64
1887 idata = idata * 256 + 32
1893 kdata(iptr(17),kprm) = idata
1895 mstack(1,kprm) = jdesc
1939 SUBROUTINE fi8805(IPTR,IDENT,MSGA,IWORK,LX,LY,
1940 * KDATA,LL,KNR,MSTACK,MAXR,MAXD)
1948 INTEGER KDATA(MAXR,MAXD)
1949 INTEGER LX,MSTACK(2,MAXD)
1971 icurr = iptr(11) - 1
1972 ipick = iptr(11) - 1
1974 IF (nrreps.EQ.0)
THEN
1987 CALL fi8808(iptr,iwork,lf,lx,ly,jdesc)
1991 IF (jdesc.EQ.7937.OR.jdesc.EQ.7947)
THEN
1993 ELSE IF (jdesc.EQ.7938.OR.jdesc.EQ.7948)
THEN
1995 ELSE IF (jdesc.EQ.7936)
THEN
2003 IF (jdesc.EQ.7947.OR.jdesc.EQ.7948)
THEN
2007 iptr(31) = iptr(31) + 1
2008 kprm = iptr(31) + iptr(24)
2009 mstack(1,kprm) = jdesc
2011 CALL gbyte (msga,kvals,iptr(25),jwide)
2012 iptr(25) = iptr(25) + jwide
2013 kdata(iptr(17),kprm) = kvals(1)
2019 IF (ident(16).EQ.0)
THEN
2022 CALL gbyte (msga,kvals,iptr(25),jwide)
2024 iptr(25) = iptr(25) + jwide
2025 iptr(31) = iptr(31) + 1
2026 kprm = iptr(31) + iptr(24)
2027 mstack(1,kprm) = jdesc
2029 kdata(iptr(17),kprm) = kvals(1)
2035 CALL gbytes (msga,kvals,iptr(25),jwide,0,nrvals)
2036 iptr(25) = iptr(25) + jwide * nrvals
2037 iptr(31) = iptr(31) + 1
2038 kprm = iptr(31) + iptr(24)
2039 mstack(1,kprm) = jdesc
2041 kdata(iptr(17),kprm) = kvals(1)
2042 DO 100 i = 1, nrvals
2043 kdata(i,kprm) = kvals(i)
2051 IF (nrreps.EQ.0)
THEN
2053 iptr(11) = ipick + nrset + 2
2058 DO 1000 i = 1, nrset
2059 CALL fi8808(iptr,iwork,lf,lx,ly,jdesc)
2064 lax = iptr(12) - iptr(11) + 1
2067 CALL fi8808(iptr,iwork,lf,lx,ly,jdesc)
2074 DO 4000 i = 1, nrreps
2075 DO 3000 j = 1, nrset
2076 iwork(icurr) = itemp(j)
2085 iwork(icurr) = ktemp(i)
2089 iptr(12) = icurr - 1
2147 SUBROUTINE fi8806 (IPTR,LX,LY,IDENT,MSGA,KDATA,IVALS,MSTACK,
2148 * IWIDE1,IRFVL1,ISCAL1,J,LL,KFXY1,IWORK,JDESC,MAXR,MAXD,KPTRB)
2156 INTEGER KFXY1(*),ISCAL1(*),IRFVL1(3,*),IWIDE1(*)
2160 INTEGER IPTR(*),KDATA(MAXR,MAXD),IVALS(*)
2161 INTEGER IDENT(*),IWORK(*),KPTRB(*)
2162 INTEGER MSGA(*),MSTACK(2,MAXD)
2180 ELSE IF (lx.EQ.2)
THEN
2189 ELSE IF (lx.EQ.3)
THEN
2202 IF (kyyy.GT.0.AND.kyyy.LT.255)
THEN
2206 CALL fi8808 (iptr,iwork,lf,lx,ly,jdesc)
2207 IF (jdesc.EQ.33791)
THEN
2215 print *,
'2 03 YYY - MATCHING DESCRIPTOR NOT FOUND'
2222 CALL gbyte (msga,irfvl1(3,lj),iptr(25),kyyy)
2224 ELSE IF (kyyy.EQ.0)
THEN
2227 DO 400 i = 1, iptr(21)
2233 ELSE IF (lx.EQ.4)
THEN
2240 IF (iwork(iptr(11)).NE.7957)
THEN
2241 print *,
'2 04 YYY NOT FOLLOWED BY 0 31 021'
2246 ELSE IF (lx.EQ.5)
THEN
2252 IF (ident(16).EQ.0)
THEN
2254 CALL fi8804(iptr,msga,kdata,ivals,mstack,
2255 * iwide1,irfvl1,iscal1,j,ll,jdesc,maxr,maxd)
2259 iptr(25) = iptr(25) + iptr(40) * 8
2262 iptr(25) = iptr(25) + 6
2266 iptr(31) = iptr(31) + 1
2267 kprm = iptr(31) + iptr(24)
2269 DO 1900 n = 1, ident(14)
2271 nbits = iptr(40) * 8
2274 IF (nbits.GT.mwdbit)
THEN
2275 CALL gbyte (msga,idata,iptr(25),mwdbit)
2276 iptr(25) = iptr(25) + mwdbit
2277 nbits = nbits - mwdbit
2280 IF (iptr(37).EQ.0)
THEN
2281 CALL w3ai39 (idata,iptr(45))
2283 mstack(1,kprm) = jdesc
2285 kdata(n,kprm) = idata
2293 ELSE IF (nbits.EQ.mwdbit)
THEN
2294 CALL gbyte (msga,idata,iptr(25),mwdbit)
2295 iptr(25) = iptr(25) + mwdbit
2296 nbits = nbits - mwdbit
2299 IF (iptr(37).EQ.0)
THEN
2300 CALL w3ai39 (idata,iptr(45))
2302 mstack(1,kprm) = jdesc
2304 kdata(n,kprm) = idata
2309 ELSE IF (nbits.GT.0)
THEN
2310 CALL gbyte (msga,idata,iptr(25),nbits)
2311 iptr(25) = iptr(25) + nbits
2312 ibuf = (mwdbit - nbits) / 8
2314 DO 1750 mp = 1, ibuf
2315 idata = idata * 256 + 32
2320 IF (iptr(37).EQ.0)
THEN
2321 CALL w3ai39 (idata,iptr(45))
2323 mstack(1,kprm) = jdesc
2325 kdata(n,kprm) = idata
2333 iptr(24) = iptr(24) + iptr(40) / 4 - 1
2334 IF (mod(iptr(40),4).NE.0) iptr(24) = iptr(24) + 1
2338 ELSE IF (lx.EQ.6)
THEN
2344 iptr(31) = iptr(31) + 1
2345 kprm = iptr(31) + iptr(24)
2346 mstack(1,kprm) = 34304 + ly
2371 SUBROUTINE fi8807(IPTR,IWORK,ITBLD,ITBLD2,JDESC,KPTRD)
2377 INTEGER ITBLD2(20,*)
2385 INTEGER IPTR(*),JDESC,KPTRD(*)
2386 INTEGER IWORK(*),IHOLD(15000)
2395 jmid = kptrd(mod(jdesc,16384))
2406 IF (itbld(ki,jmid).NE.0)
THEN
2408 ihold(ik) = itbld(ki,jmid)
2416 IF (kk.GT.iptr(12))
THEN
2422 DO 500 i = kk, iptr(12)
2424 ihold(ik) = iwork(i)
2432 iwork(kk) = ihold(i)
2440 iptr(11) = iptr(11) - 1
2460 INTEGER IPTR(*),IWORK(*),LF,LX,LY,JDESC
2464 JDESC = iwork(iptr(11))
2467 lx = mod((jdesc/256),64)
2472 iptr(11) = iptr(11) + 1
2516 SUBROUTINE fi8809(IDENT,MSTACK,KDATA,IPTR,MAXR,MAXD)
2521 INTEGER IDENT(*),KDATA(MAXR,MAXD)
2522 INTEGER MSTACK(2,MAXD),IPTR(*)
2523 INTEGER KPROFL(1700)
2524 INTEGER KPROF2(1700)
2531 DO 3000 i = 1, ident(14)
2540 IF (mstack(1,mk).EQ.1282)
THEN
2544 ELSE IF (mstack(1,mk).EQ.1538)
THEN
2548 ELSE IF (mstack(1,mk).EQ.1793)
THEN
2557 kprofl(jk) = mstack(1,mk)
2559 kprof2(jk) = mstack(2,mk)
2561 kset2(jk) = kdata(i,mk)
2565 print *,
'LOCATION ERROR PROCESSING PROFILER'
2573 IF (mstack(1,mk).EQ.1025)
THEN
2577 ELSE IF (mstack(1,mk).EQ.1026)
THEN
2581 ELSE IF (mstack(1,mk).EQ.1027)
THEN
2585 ELSE IF (mstack(1,mk).EQ.1028)
THEN
2589 ELSE IF (mstack(1,mk).EQ.1029)
THEN
2593 ELSE IF (mstack(1,mk).EQ.2069)
THEN
2596 ELSE IF (mstack(1,mk).EQ.1049)
THEN
2604 kprofl(jk) = mstack(1,mk)
2606 kprof2(jk) = mstack(2,mk)
2608 kset2(jk) = kdata(i,mk)
2611 IF (isw.NE.127)
THEN
2612 print *,
'TIME ERROR PROCESSING PROFILER',isw
2621 IF (mstack(1,mk).EQ.2818)
THEN
2625 ELSE IF (mstack(1,mk).EQ.2817)
THEN
2629 ELSE IF (mstack(1,mk).EQ.2611)
THEN
2633 ELSE IF (mstack(1,mk).EQ.3073)
THEN
2637 ELSE IF (mstack(1,mk).EQ.3342)
THEN
2641 ELSE IF (mstack(1,mk).EQ.3331)
THEN
2645 ELSE IF (mstack(1,mk).EQ.1982.OR.
2646 * mstack(1,mk).EQ.1983)
THEN
2649 IF (mstack(1,mk).EQ.1983)
THEN
2655 incrht = kdata(i,mk)
2660 lhgt = 500 + ihgt - kdata(i,mk)
2666 ELSE IF (mstack(1,mk).EQ.8128)
THEN
2670 ELSE IF (mstack(1,mk).EQ.8129)
THEN
2678 kprofl(jk) = mstack(1,mk)
2680 kprof2(jk) = mstack(2,mk)
2682 kset2(jk) = kdata(i,mk)
2688 IF (isw.NE.511)
THEN
2689 print *,
'SURFACE ERROR PROCESSING PROFILER',isw
2698 IF (mstack(1,mk).EQ.1982)
THEN
2700 incrht = kdata(i,mk)
2702 IF (lhgt.LT.(9250+ihgt))
THEN
2703 lhgt = ihgt + 500 - incrht
2705 lhgt = ihgt + 9250 - incrht
2710 lhgt = lhgt + incrht
2713 lhgt = lhgt + incrht
2729 IF (mstack(1,mk).EQ.1982)
THEN
2732 ELSE IF (mstack(1,mk).EQ.3008)
THEN
2734 IF (kdata(i,mk).GE.2047)
THEN
2742 ELSE IF (mstack(1,mk).EQ.3009)
THEN
2744 IF (kdata(i,mk).GE.2047)
THEN
2752 IF (iand(isw,1).NE.0)
THEN
2753 IF (vectu.EQ.32767.OR.vectv.EQ.32767)
THEN
2770 CALL w3fc05 (vectu,vectv,dir,spd)
2799 ELSE IF (mstack(1,mk).EQ.3010)
THEN
2803 ELSE IF (mstack(1,mk).EQ.8130)
THEN
2807 ELSE IF(iand(isw,16).EQ.0.AND.mstack(1,mk).EQ.2070)
THEN
2811 ELSE IF(iand(isw,32).EQ.0.AND.mstack(1,mk).EQ.2070)
THEN
2815 ELSE IF (mstack(1,mk).EQ.5568)
THEN
2819 ELSE IF (mstack(1,mk).EQ.3011)
THEN
2823 ELSE IF (mstack(1,mk).EQ.3013)
THEN
2826 ELSE IF ((mstack(1,mk)/16384).NE.0)
THEN
2834 kprofl(jk) = mstack(1,mk)
2836 kprof2(jk) = mstack(2,mk)
2838 kset2(jk) = kdata(i,mk)
2844 IF (isw.NE.511)
THEN
2845 print *,
'LEVEL ERROR PROCESSING PROFILER',isw
2852 kdata(i,ll) = kset2(ll)
2858 mstack(1,ll) = kprofl(ll)
2860 mstack(2,ll) = kprof2(ll)
2910 SUBROUTINE fi8810(IDENT,MSTACK,KDATA,IPTR,MAXR,MAXD)
2913 INTEGER IDENT(*),KDATA(MAXR,MAXD)
2914 INTEGER MSTACK(2,MAXD),IPTR(*)
2915 INTEGER KPROFL(1700)
2916 INTEGER KPROF2(1700)
2921 DO 3000 i = 1, ident(14)
2927 IF (mstack(1,mk).EQ.257)
THEN
2930 ELSE IF (mstack(1,mk).EQ.258)
THEN
2933 ELSE IF (mstack(1,mk).EQ.1282)
THEN
2936 ELSE IF (mstack(1,mk).EQ.1538)
THEN
2939 ELSE IF (mstack(1,mk).EQ.1793)
THEN
2948 kprofl(jk) = mstack(1,mk)
2949 kprof2(jk) = mstack(2,mk)
2950 kset2(jk) = kdata(i,mk)
2956 print *,
'LOCATION ERROR PROCESSING PROFILER'
2963 IF (mstack(1,mk).EQ.1025)
THEN
2966 ELSE IF (mstack(1,mk).EQ.1026)
THEN
2969 ELSE IF (mstack(1,mk).EQ.1027)
THEN
2972 ELSE IF (mstack(1,mk).EQ.1028)
THEN
2975 ELSE IF (mstack(1,mk).EQ.1029)
THEN
2978 ELSE IF (mstack(1,mk).EQ.2069)
THEN
2981 ELSE IF (mstack(1,mk).EQ.1049)
THEN
2989 kprofl(jk) = mstack(1,mk)
2990 kprof2(jk) = mstack(2,mk)
2991 kset2(jk) = kdata(i,mk)
2996 IF (isw.NE.127)
THEN
2997 print *,
'TIME ERROR PROCESSING PROFILER'
3006 IF (mstack(1,mk).EQ.2817)
THEN
3008 ELSE IF (mstack(1,mk).EQ.2818)
THEN
3010 ELSE IF (mstack(1,mk).EQ.2611)
THEN
3012 ELSE IF (mstack(1,mk).EQ.3073)
THEN
3014 ELSE IF (mstack(1,mk).EQ.3342)
THEN
3016 ELSE IF (mstack(1,mk).EQ.3331)
THEN
3018 ELSE IF (mstack(1,mk).EQ.1797)
THEN
3019 incrht = kdata(i,mk)
3025 ELSE IF (mstack(1,mk).EQ.6433)
THEN
3029 kprofl(jk) = mstack(1,mk)
3030 kprof2(jk) = mstack(2,mk)
3031 kset2(jk) = kdata(i,mk)
3035 IF (isw.NE.255)
THEN
3036 print *,
'ERROR PROCESSING PROFILER',isw
3040 IF (mstack(1,mk).NE.1797)
THEN
3041 print *,
'ERROR PROCESSING HEIGHT INCREMENT IN PROFILER'
3046 lhgt = 500 + ihgt - kdata(i,mk)
3049 IF (mstack(1,mk).GE.16384)
THEN
3059 IF (mstack(1,mk).EQ.1797)
THEN
3060 incrht = kdata(i,mk)
3071 lhgt = lhgt + incrht
3088 IF (mstack(1,mk).EQ.1797)
THEN
3090 ELSE IF (mstack(1,mk).EQ.6432)
THEN
3093 ELSE IF (mstack(1,mk).EQ.6434)
THEN
3096 ELSE IF (mstack(1,mk).EQ.2070)
THEN
3105 ELSE IF (mstack(1,mk).EQ.2819)
THEN
3108 IF (kdata(i,mk).GE.2047)
THEN
3115 ELSE IF (mstack(1,mk).EQ.2820)
THEN
3118 IF (kdata(i,mk).GE.2047)
THEN
3123 IF (iand(isw,1).NE.0)
THEN
3124 IF (vectu.EQ.32767.OR.vectv.EQ.32767)
THEN
3136 CALL w3fc05 (vectu,vectv,dir,spd)
3161 ELSE IF (mstack(1,mk).EQ.2866)
THEN
3165 ELSE IF (mstack(1,mk).EQ.5568)
THEN
3168 ELSE IF (mstack(1,mk).EQ.2822)
THEN
3171 ELSE IF (mstack(1,mk).EQ.2867)
THEN
3179 ELSE IF ((mstack(1,mk)/16384).NE.0)
THEN
3186 kprofl(jk) = mstack(1,mk)
3188 kprof2(jk) = mstack(2,mk)
3190 kset2(jk) = kdata(i,mk)
3194 IF (isw.NE.1023)
THEN
3195 print *,
'LEVEL ERROR PROCESSING PROFILER',isw
3203 kdata(i,ll) = kset2(ll)
3208 mstack(1,ll) = kprofl(ll)
3210 mstack(2,ll) = kprof2(ll)
3247 SUBROUTINE fi8811(IPTR,IDENT,MSTACK,KDATA,KNR,
3248 * LDATA,LSTACK,MAXD,MAXR)
3252 INTEGER KDATA(MAXR,MAXD),LDATA(MAXD)
3253 INTEGER MSTACK(2,MAXD),LSTACK(2,MAXD)
3259 DO 1000 i = 1, knr(1)
3261 IF ((mstack(1,i)/16384).NE.1)
THEN
3265 IF (mod(mstack(1,i),256).EQ.0)
THEN
3267 kx = mod((mstack(1,i)/256),64)
3270 IF (mstack(1,i+1).NE.7947.AND.mstack(1,i+1).NE.7948)
THEN
3275 nrreps = kdata(1,i+1)
3278 ktrail = knr(1) - i - 1 - kx
3279 DO 100 l = 1, ktrail
3281 ldata(l) = kdata(1,nx)
3282 lstack(1,l) = mstack(1,nx)
3283 lstack(2,l) = mstack(2,nx)
3287 DO 400 j = 1, nrreps
3291 kdata(1,last) = kdata(1,nx)
3292 mstack(1,last) = mstack(1,nx)
3293 mstack(2,last) = mstack(2,nx)
3299 DO 500 l = 1, ktrail
3301 kdata(1,last) = ldata(l)
3302 mstack(1,last) = lstack(1,l)
3303 mstack(2,last) = lstack(2,l)
3311 SUBROUTINE fi8812(IPTR,IUNITB,IUNITD,ISTACK,NRDESC,KPTRB,KPTRD,
3312 * IRF1SW,NEWREF,ITBLD,ITBLD2,
3313 * KFXY1,ANAME1,AUNIT1,ISCAL1,IRFVL1,IWIDE1,
3314 * KFXY2,ANAME2,AUNIT2,ISCAL2,IRFVL2,IWIDE2)
3382 INTEGER KFXY1(*),ISCAL1(*),IRFVL1(3,*),IWIDE1(*)
3383 CHARACTER*40 ANAME1(*)
3384 CHARACTER*24 AUNIT1(*)
3389 INTEGER KFXY2(*),ISCAL2(*),IRFVL2(*),IWIDE2(*)
3390 CHARACTER*64 ANAME2(*)
3391 CHARACTER*24 AUNIT2(*)
3396 INTEGER ITBLD2(20,*)
3403 INTEGER IPTR(*),ISTACK(*),NRDESC,NWLIST(200)
3404 INTEGER NEWREF(*),KPTRB(*),KPTRD(*)
3405 INTEGER IUNITB,IUNITD,ICOPY(20000),NRCOPY,IELEM,IPOS
3424 IF (iptr(14).NE.0)
THEN
3432 print *,
'FI8812 - READING TABLE B'
3437 READ(unit=iunitb,fmt=20,err=9999,
END=9000)MF,
3439 * (aname1(i)(k:k),k=1,40),
3440 * (aunit1(i)(k:k),k=1,24),
3441 * iscal1(i),irfvl1(1,i),iwide1(i)
3442 20
FORMAT(i1,i2,i3,40a1,24a1,i5,i15,1x,i4)
3443 kfxy1(i) = mf*16384 + mx*256 + my
3453 21
FORMAT(1x,i1,i2,i3,1x,i6,1x,40a1,
3454 * 2x,24a1,2x,i5,2x,i15,1x,i4)
3460 print *,
'FI8812 - ERROR READING TABLE B - RECORD ',i
3467 SUBROUTINE fi8813 (IPTR,MAXR,MAXD,MSTACK,KDATA,IDENT,KPTRD,KPTRB,
3468 * ITBLD,ANAME1,AUNIT1,KFXY1,ISCAL1,IRFVL1,IWIDE1,IUNITB)
3517 INTEGER KFXY1(*),ISCAL1(*),IRFVL1(*),IWIDE1(*)
3518 CHARACTER*40 ANAME1(*)
3519 CHARACTER*24 AUNIT1(*)
3530 INTEGER I1(20),I2(20),I3(20),KPTRB(*)
3531 INTEGER IPTR(*),MAXR,MAXD,MSTACK(2,MAXD)
3532 INTEGER IXA, IXB, IXD, KDATA(MAXR,MAXD)
3533 INTEGER IEXTRA,KPTRD(*)
3534 INTEGER KEYSET,ISCSGN(200),IRFSGN(200)
3535 INTEGER IDENT(*),IHOLD,JHOLD(8),IUNITB
3536 EQUIVALENCE (IHOLD,ASCCHR),(JHOLD,AAAA)
3555 IF (ident(16).EQ.0)
THEN
3586 IF (i.GT.iptr(31))
THEN
3597 IF (mstack(1,klk).EQ.1)
THEN
3600 ELSE IF (mstack(1,klk).EQ.2)
THEN
3602 iextra = iextra + 32 / iptr(45) - 1
3604 ELSE IF (mstack(1,klk).EQ.3)
THEN
3606 iextra = iextra + 32 / iptr(45) - 1
3608 ELSE IF (mstack(1,klk).GE.34048.AND.mstack(1,klk).LE.34303)
THEN
3609 ly = mod(mstack(1,klk),256)
3611 IF (mod(ly,iptr(45)).EQ.0)
THEN
3612 iwds = ly / iptr(45)
3614 iwds = ly / iptr(45) + 1
3616 iextra = iextra + iwds - 1
3618 ELSE IF (mstack(1,klk).LT.10.OR.mstack(1,klk).GT.255)
THEN
3629 IF (i.GT.iptr(31))
THEN
3633 IF (mstack(1,klk).GE.34048.AND.mstack(1,klk).LE.34303)
THEN
3634 ly = mod(mstack(1,klk),256)
3636 IF (mod(ly,4).EQ.0)
THEN
3637 iwds = ly / iptr(45)
3639 iwds = ly / iptr(45) + 1
3641 iextra = iextra + iwds - 1
3644 ELSE IF (mstack(1,klk)/16384.NE.0)
THEN
3645 IF (mod(mstack(1,klk),256).EQ.0)
THEN
3651 IF (mstack(1,klk).GE.10.AND.mstack(1,klk).LE.12)
THEN
3658 IF (mstack(1,klk).EQ.10)
THEN
3659 CALL fi8814 (kdata(iz,klk),1,mf,ierr,iptr)
3661 keyset = ior(keyset,4)
3662 ELSE IF (mstack(1,klk).EQ.11)
THEN
3663 CALL fi8814 (kdata(iz,klk),2,mx,ierr,iptr)
3665 keyset = ior(keyset,2)
3666 ELSE IF (mstack(1,klk).EQ.12)
THEN
3667 CALL fi8814 (kdata(iz,klk),3,my,ierr,iptr)
3669 keyset = ior(keyset,1)
3675 IF (keyset.EQ.7)
THEN
3683 IF (mstack(1,klk).EQ.30)
THEN
3685 itbld(1,ixd) =16384 * mf + 256 * mx + my
3688 ELSE IF (mstack(1,klk).GE.13.AND.mstack(1,klk).LE.20)
THEN
3689 kfxy1(ixb+iz) = 16384 * mf + 256 * mx + my
3691 kptrb(kfxy1(ixb+iz)) = ixb+iz
3708 IF (mstack(1,klk).LT.13.OR.mstack(1,klk).GT.20)
THEN
3709 print *,
'IMPROPER SEQUENCE OF DESCRIPTORS IN LIST'
3711 ELSE IF (mstack(1,klk).EQ.13)
THEN
3717 DO 21 ll = 1, 32, iptr(45)
3718 lll = ll + iptr(45) - 1
3720 ihold = kdata(iz,kqk)
3721 IF (iptr(37).EQ.0)
THEN
3724 aname1(ixb+iz)(ll:lll) = ascchr
3727 iextra = iextra + (32 / iptr(45)) - 1
3728 ibflag = ior(ibflag,64)
3730 ELSE IF (mstack(1,klk).EQ.14)
THEN
3737 DO 22 ll = 33, 64, iptr(45)
3738 lll = ll + iptr(45) - 1
3740 ihold = kdata(iz,kqk)
3741 IF (iptr(37).EQ.0)
THEN
3744 aname1(ixb+iz)(ll:lll) = ascchr
3747 iextra = iextra + (32 / iptr(45)) - 1
3748 ibflag = ior(ibflag,32)
3750 ELSE IF (mstack(1,klk).EQ.15)
THEN
3757 DO 23 ll = 1, 24, iptr(45)
3758 lll = ll + iptr(45) - 1
3760 ihold = kdata(iz,kqk)
3761 IF (iptr(37).EQ.0)
THEN
3764 aunit1(ixb+iz)(ll:lll) = ascchr
3767 iextra = iextra + (24 / iptr(45)) - 1
3768 ibflag = ior(ibflag,16)
3770 ELSE IF (mstack(1,klk).EQ.16)
THEN
3775 ihold = kdata(iz,klk)
3777 IF (index(ascchr,
'-').EQ.0)
THEN
3783 ELSE IF (mstack(1,klk).EQ.17)
THEN
3789 CALL fi8814(kdata(iz,klk),3,iscal1(ixb+iz),ierr,iptr)
3791 print *,
'NON-NUMERIC CHAR - CANNOT CONVERT'
3795 iscal1(ixb+iz) = iscal1(ixb+iz) * iscsgn(iz)
3796 ibflag = ior(ibflag,8)
3798 ELSE IF (mstack(1,klk).EQ.18)
THEN
3805 ihold = kdata(iz,klk)
3806 IF (index(ascchr,
'-').EQ.0)
THEN
3812 ELSE IF (mstack(1,klk).EQ.19)
THEN
3820 DO 26 ll = 1, 12, iptr(45)
3823 jhold(km) = kdata(iz,kqk)
3826 CALL fi8814(aaaa,10,irfvl1(ixb+iz),ierr,iptr)
3828 print *,
'NON-NUMERIC CHARACTER-CANNOT CONVERT'
3832 irfvl1(ixb+iz) = irfvl1(ixb+iz) * irfsgn(iz)
3833 iextra = iextra + 10 / iptr(45)
3837 ibflag = ior(ibflag,4)
3847 CALL fi8814(kdata(iz,klk),3,iwide1(ixb+iz),ierr,iptr)
3849 print *,
'NON-NUMERIC CHAR - CANNOT CONVERT'
3853 IF (iwide1(ixb+iz).LT.1)
THEN
3860 ibflag = ior(ibflag,2)
3868 IF (ibflag.EQ.127)
THEN
3882 IF (i.GT.iptr(31))
THEN
3895 IF (mstack(1,klk).EQ.30)
THEN
3902 DO 351 ll = 1, 6, iptr(45)
3905 jhold(kk) = kdata(1,kqk)
3907 IF (ll.GT.1) iextra = iextra + 1
3912 CALL fi8814(aaaa,6,ihold,ierr,iptr)
3915 print *,
'NON NUMERIC CHARACTER FOUND IN F X Y'
3920 iff = ihold / 100000
3921 ixx = mod((ihold/1300),100)
3922 iyy = mod(ihold,1300)
3924 itbld(iseq+2,ijk) = 16384 * iff + 256 * ixx + iyy
3928 IF (iseq.GT.18)
THEN
3942 iptr(20) = iptr(20) + 1
3966 DO 2000 kb = 1, iptr(21)
3967 jf = kfxy1(kb) / 16384
3968 jx = mod((kfxy1(kb) / 256),64)
3969 jy = mod(kfxy1(kb),256)
3972 WRITE (numnut,5000)jf,jx,jy,aname1(kb)(1:40),
3973 * aunit1(kb)(1:24),iscal1(kb),irfvl1(kb),iwide1(kb)
3974 5000
FORMAT(i1,i2,i3,a40,a24,i5,i15,i5)
3976 2001
FORMAT (1x,i1,1x,i2,1x,i3,2x,a40,3x,a24,2x,i5,2x,i12,
3981 IF (iptr(20).NE.0)
THEN
3993 SUBROUTINE fi8814 (ASCCHR,NPOS,NEWVAL,IERR,IPTR)
4033 INTEGER IERR, IHOLD, IPTR(*)
4036 EQUIVALENCE (IHOLD,AHOLD)
4046 ahold(iptr(45):iptr(45)) = ascchr(i:i)
4047 IF (iptr(37).EQ.1)
THEN
4048 IF (ihold.EQ.32)
THEN
4049 IF (iflag.EQ.0)
GO TO 1000
4051 ELSE IF (ihold.LT.48.OR.ihold.GT.57)
THEN
4057 newval = newval * 10 + ihold - 48
4060 IF (ihold.EQ.64)
THEN
4061 IF (iflag.EQ.0)
GO TO 1000
4063 ELSE IF (ihold.LT.240.OR.ihold.GT.249)
THEN
4069 newval = newval * 10 + ihold - 240
4076 SUBROUTINE fi8815(IPTR,IDENT,JDESC,KDATA,KFXY3,MAXR,MAXD,
4078 * ISCAL3,IRFVL3,IWIDE3,
4079 * KEYSET,IBFLAG,IERR)
4125 CHARACTER*64 ANAME3(*),SPACES
4126 CHARACTER*24 AUNIT3(*)
4128 INTEGER IPTR(*),MAXR,MAXD,JDESC
4129 INTEGER IXA, IXB, IXD, KDATA(MAXR,MAXD)
4132 INTEGER KFXY3(*),IDENT(*)
4133 INTEGER ISCAL3(*),ISCSGN(150)
4134 INTEGER IRFVL3(*),IRFSGN(150)
4153 IF (ident(16).EQ.0)
THEN
4166 aname3(ixb+iy)(1:64) = spaces(1:64)
4167 aunit3(ixb+iy)(1:24) = spaces(1:24)
4187 IF (jdesc.GE.10.AND.jdesc.LE.12)
THEN
4193 IF (jdesc.EQ.10)
THEN
4194 kfxy3(ixb+ly) = kdata(k,1) * 16384 + kfxy3(ixb+ly)
4195 keyset = ior(keyset,4)
4198 ELSE IF (jdesc.EQ.11)
THEN
4199 kfxy3(ixb+ly) = kdata(k,1) * 256 + kfxy3(ixb+ly)
4200 keyset = ior(keyset,2)
4203 ELSE IF (jdesc.EQ.12)
THEN
4204 kfxy3(ixb+ly) = kdata(k,1) + kfxy3(ixb+ly)
4205 keyset = ior(keyset,1)
4209 ELSE IF (jdesc.GE.13.AND.jdesc.LE.20)
THEN
4211 IF (jdesc.EQ.13)
THEN
4215 CALL gbytes (aname3(ixb+iz),kdata(k,iz),0,32,0,8)
4216 ibflag = ior(ibflag,16)
4217 ELSE IF (jdesc.EQ.14)
THEN
4221 CALL gbytes(aname3(ixb+iz)(33:33),kdata(k,iz),0,32,0,8)
4222 ELSE IF (jdesc.EQ.15)
THEN
4226 CALL gbytes (aunit3(ixb+iz)(1:1),kdata(k,iz),0,32,0,6)
4227 ibflag = ior(ibflag,8)
4228 ELSE IF (jdesc.EQ.16)
THEN
4232 IF (kdata(k,1).NE.48)
THEN
4237 ELSE IF (jdesc.EQ.17)
THEN
4241 CALL fi8814(kdata(k,iz),3,iscal3(ixb+iz),ierr,iptr)
4243 print *,
'NON-NUMERIC CHARACTER - CANNOT CONVERT'
4247 ibflag = ior(ibflag,4)
4248 ELSE IF (jdesc.EQ.18)
THEN
4253 IF (kdata(k,1).EQ.48)
THEN
4258 ELSE IF (jdesc.EQ.19)
THEN
4262 CALL fi8814(kdata(k,iz),10,irfvl3(ixb+iz),ierr,iptr)
4264 print *,
'NON-NUMERIC CHARACTER-CANNOT CONVERT'
4268 ibflag = ior(ibflag,2)
4273 CALL fi8814(kdata(k,1),3,iwide3(ixb+1),ierr,iptr)
4275 print *,
'NON-NUMERIC CHARACTER-CANNOT CONVERT'
4279 ibflag = ior(ibflag,1)
4286 SUBROUTINE fi8818(IPTR,
4287 * KFXY1,ANAME1,AUNIT1,ISCAL1,IRFVL1,IWIDE1,
4288 * KFXY2,ANAME2,AUNIT2,ISCAL2,IRFVL2,IWIDE2,
4342 INTEGER KFXY1(*),ISCAL1(*),IRFVL1(3,*),IWIDE1(*)
4343 CHARACTER*40 ANAME1(*)
4344 CHARACTER*24 AUNIT1(*)
4349 INTEGER KFXY2(*),ISCAL2(*),IRFVL2(*),IWIDE2(*)
4350 CHARACTER*64 ANAME2(*)
4351 CHARACTER*24 AUNIT2(*)
4353 INTEGER IPTR(*),KPTRB(*)
4363 IF (kb.GT.iptr(21))
THEN
4366 IF (kab.GT.iptr(41))
THEN
4371 ELSE IF (kb.LE.iptr(21))
THEN
4373 IF (kab.GT.iptr(41))
THEN
4377 IF (kfxy2(kab).EQ.kfxy1(kb))
THEN
4380 ELSE IF (kfxy2(kab).LT.kfxy1(kb))
THEN
4383 ELSE IF (kfxy2(kab).GT.kfxy1(kb))
THEN
4390 iptr(21) = iptr(21) + 1
4391 kptrb(kfxy2(kab)) = iptr(21)
4393 kfxy1(iptr(21)) = kfxy2(kab)
4394 aname1(iptr(21))(1:40) = aname2(kab)(1:40)
4395 aunit1(iptr(21)) = aunit2(kab)
4396 iscal1(iptr(21)) = iscal2(kab)
4397 irfvl1(1,iptr(21)) = irfvl2(kab)
4398 iwide1(iptr(21)) = iwide2(kab)
4404 kfxy1(kb) = kfxy2(kab)
4405 aname1(kb) = aname2(kab)(1:40)
4406 aunit1(kb) = aunit2(kab)
4407 iscal1(kb) = iscal2(kab)
4408 irfvl1(1,kb) = irfvl2(kab)
4409 iwide1(kb) = iwide2(kab)
4423 SUBROUTINE fi8819(IPTR,ITBLD,ITBLD2,KPTRD)
4457 INTEGER ITBLD2(20,*)
4464 INTEGER IPTR(*),KPTRD(*)
4469 DO 1000 I = 1, iptr(42)
4470 iptr(20) = iptr(20) + 1
4472 itbld(j,iptr(20)) = itbld2(j,i)
4473 mptrd = mod(itbld(j,iptr(20)),16384)
4474 kptrd(mptrd) = iptr(20)
4486 SUBROUTINE fi8820 (ITBLD,IUNITD,IPTR,ITBLD2,KPTRD)
4517 INTEGER ITBLD2(20,*)
4525 INTEGER IHOLD(33),IPTR(*),KPTRD(*)
4535 IF (iptr(20).EQ.0)
THEN
4536 DO 1000 mm = 1, 16384
4540 print *,
'FI8820 - READING TABLE D'
4544 READ(iunitd,15,err=9998,
END=9000)(IHOLD(M),M=1,33)
4545 15
FORMAT(11(i1,i2,i3,1x),3x)
4549 iptr(20) = iptr(20) + 1
4553 itbld(kk,i) = ihold(jj)*16384 +
4554 * ihold(jj+1)*256 + ihold(jj+2)
4555 IF (itbld(kk,i).LT.1.OR.itbld(kk,i).GT.65535)
THEN
4563 mptrd = mod(itbld(1,i),16384)
4567 51
FORMAT (7h tabled,16(1x,i5))
4574 CLOSE(unit=iunitd,status=
'KEEP')
subroutine gbyte(ipackd, iunpkd, noff, nbits)
This is the fortran version of gbyte.
subroutine gbytes(ipackd, iunpkd, noff, nbits, iskip, iter)
Program history log:
integer function mova2i(a)
This Function copies a bit string from a Character*1 variable to an integer variable.
subroutine w3ai39(nfld, n)
translate an 'ASCII' field to 'EBCDIC', all alphanumerics, special charcaters, fill scatter,...
subroutine w3fc05(u, v, dir, spd)
Given the true (Earth oriented) wind components compute the wind direction and speed.
subroutine w3fi01(lw)
Determines the number of bytes in a full word for the particular machine (IBM or cray).
subroutine fi8811(iptr, ident, mstack, kdata, knr, ldata, lstack, maxd, maxr)
Expand data/descriptor replication.
subroutine fi8808(iptr, iwork, lf, lx, ly, jdesc)
Program history log:
subroutine fi8804(iptr, msga, kdata, ivals, mstack, iwide1, irfvl1, iscal1, j, ll, jdesc, maxr, maxd)
Process serial data.
subroutine fi8801(iptr, ident, msga, istack, iwork, kdata, ivals, mstack, knr, index, maxr, maxd, kfxy1, aname1, aunit1, iscal1, irfvl1, iwide1, irf1sw, inewvl, kfxy2, aname2, aunit2, iscal2, irfvl2, iwide2, kfxy3, aname3, aunit3, iscal3, irfvl3, iwide3, iunitb, iunitd, itbld, itbld2, kptrb, kptrd)
Data extraction.
subroutine fi8803(iptr, ident, msga, kdata, ivals, mstack, iwide1, irfvl1, iscal1, j, jdesc, maxr, maxd)
Process compressed data.
subroutine w3fi88(iptr, ident, msga, istack, mstack, kdata, knr, index, ldata, lstack, maxr, maxd, iunitb, iunitd)
This set of routines will decode a bufr message and place information extracted from the bufr message...
subroutine fi8805(iptr, ident, msga, iwork, lx, ly, kdata, ll, knr, mstack, maxr, maxd)
Process a replication descriptor.
subroutine fi8807(iptr, iwork, itbld, itbld2, jdesc, kptrd)
Process queue descriptor.
subroutine fi8806(iptr, lx, ly, ident, msga, kdata, ivals, mstack, iwide1, irfvl1, iscal1, j, ll, kfxy1, iwork, jdesc, maxr, maxd, kptrb)
Process operator descriptors.
subroutine fi8809(ident, mstack, kdata, iptr, maxr, maxd)
Reformat profiler w hgt increments.
subroutine fi8810(ident, mstack, kdata, iptr, maxr, maxd)
Reformat profiler edition 2 data.
subroutine fi8802(iptr, ident, msga, kdata, kfxy1, ll, mstack, aunit1, iwide1, irfvl1, iscal1, jdesc, ivals, j, maxr, maxd, kptrb)
Process element descriptor.