210 SUBROUTINE w3fi85(ISTEP,IUNITB,IUNITD,IBFSIZ,ISECT1,ISECT3,
211 * JIF,JDESC,NEWNR,IDATA,RDATA,ATEXT,KASSOC,
212 * KIF,KDESC,NRDESC,ISEC2D,ISEC2B,
213 * KDATA,KARY,KBUFR,IERRTN)
217 INTEGER IDATA(*),LOWEST,MAXVAL,JSTART
218 INTEGER KARY(*),MISG,LL
219 INTEGER KDESC(3,*),KASSOC(*)
222 INTEGER INDEXB(16383)
227 LOGICAL*1 MSGFLG,DUPFLG
231 INTEGER ISEC2B,ISEC2D(255)
239 INTEGER LDESC(800),KT(800)
241 INTEGER KRFVAL(800),KRFVSW(800),NEWRFV(800)
243 CHARACTER*40 ANAME(800)
244 CHARACTER*25 AUNITS(800)
247 INTEGER KSEQ(300),KNUM(300)
248 INTEGER KLIST(300,10)
252 DATA ccitt /
'CCITT IA5'/
253 DATA ibits / 1, 3, 7, 15,
255 * 511, 1023, 2047, 4095,
256 * 8191, 16383, 32767, 65535,
257 * z
'0001FFFF',z
'0003FFFF',z
'0007FFFF',z
'000FFFFF',
258 * z
'001FFFFF',z
'003FFFFF',z
'007FFFFF',z
'00FFFFFF',
259 * z
'01FFFFFF',z
'03FFFFFF',z
'07FFFFFF',z
'0FFFFFFF',
260 * z
'1FFFFFFF',z
'3FFFFFFF',z
'7FFFFFFF',z
'FFFFFFFF'/
278 CALL fi8505(jif,jdesc,newnr,ierrtn)
279 IF (ierrtn.NE.0)
THEN
287 IF (kary(4).NE.0)
THEN
294 IF (nrdesc.EQ.0)
THEN
296 kdesc(1,i) = jdesc(1,i)
300 ELSE IF (nrdesc.NE.0)
THEN
304 CALL fi8505(kif,kdesc,nrdesc,ierrtn)
305 IF (ierrtn.NE.0)
THEN
313 IF (isect3(8).EQ.0)
THEN
314 CALL fi8512(iunitb,isect3,kdesc,nrdesc,kary,ierrtn,
315 * ldesc,aname,aunits,kscale,krfval,kwidth,krfvsw,
316 * iunitd,kseq,knum,klist,indexb)
317 IF (ierrtn.NE.0)
GO TO 9000
325 CALL fi8508(istep,iunitb,idata,kdesc,nrdesc,atext,ksub,kary,
326 * kdata,ldesc,aname,aunits,kscale,krfval,krfvsw,isect3,
327 * kwidth,kassoc,iunitd,kseq,knum,klist,ierrtn,indexb)
329 ELSE IF (istep.EQ.2)
THEN
331 CALL fi8509(istep,iunitb,rdata,kdesc,nrdesc,atext,ksub,kary,
332 * kdata,ldesc,aname,aunits,kscale,krfval,krfvsw,isect3,
333 * kwidth,kassoc,iunitd,kseq,knum,klist,ierrtn,indexb)
335 ELSE IF (istep.NE.3)
THEN
342 IF (isect3(1).LE.0)
THEN
357 isect3(7) = isect3(1)
358 isect3(6) = isect3(1)
372 CALL sbyte (kbufr,nbufr,kary(3),32)
373 kary(3) = kary(3) + 32
377 kary(3) = kary(3) + 24
379 CALL sbyte (kbufr,2,kary(3),8)
380 kary(3) = kary(3) + 8
388 CALL sbyte (kbufr,kary(21),kary(3),24)
389 kary(3) = kary(3) + 24
391 CALL sbyte (kbufr,0,kary(3),8)
392 kary(3) = kary(3) + 8
394 CALL sbyte (kbufr,isect1(3),kary(3),8)
395 kary(3) = kary(3) + 8
397 CALL sbyte (kbufr,isect1(4),kary(3),8)
398 kary(3) = kary(3) + 8
400 CALL sbyte (kbufr,isect1(5),kary(3),8)
401 kary(3) = kary(3) + 8
404 CALL sbyte (kbufr,isect1(6),kary(3),1)
405 kary(3) = kary(3) + 1
406 CALL sbyte (kbufr,0,kary(3),7)
407 kary(3) = kary(3) + 7
409 CALL sbyte (kbufr,isect1(7),kary(3),8)
410 kary(3) = kary(3) + 8
412 CALL sbyte (kbufr,isect1(8),kary(3),8)
413 kary(3) = kary(3) + 8
415 CALL sbyte (kbufr,isect1(9),kary(3),8)
416 kary(3) = kary(3) + 8
418 CALL sbyte (kbufr,isect1(10),kary(3),8)
419 kary(3) = kary(3) + 8
421 CALL sbyte (kbufr,isect1(11),kary(3),8)
422 kary(3) = kary(3) + 8
424 CALL sbyte (kbufr,isect1(12),kary(3),8)
425 kary(3) = kary(3) + 8
427 CALL sbyte (kbufr,isect1(13),kary(3),8)
428 kary(3) = kary(3) + 8
430 CALL sbyte (kbufr,isect1(14),kary(3),8)
431 kary(3) = kary(3) + 8
433 CALL sbyte (kbufr,isect1(15),kary(3),8)
434 kary(3) = kary(3) + 8
436 CALL sbyte (kbufr,0,kary(3),8)
437 kary(3) = kary(3) + 8
442 IF (isect1(6).NE.0)
THEN
444 kary(22) = 4 + isec2b
445 IF (mod(kary(22),2).NE.0) kary(22) = kary(22) + 1
447 CALL sbyte (kbufr,kary(22),kary(3),24)
448 kary(3) = kary(3) + 24
450 CALL sbyte (kbufr,0,kary(3),8)
451 kary(3) = kary(3) + 8
453 CALL sbytes(kbufr,isec2d,kary(3),8,0,isec2b)
454 kary(3) = kary(3) + (isec2b * 8)
455 IF (mod(isec2b,2).NE.0)
THEN
456 CALL sbyte (kbufr,0,kary(3),8)
457 kary(3) = kary(3) + 8
465 kary(23) = 7 + newnr*2 + 1
467 CALL sbyte (kbufr,kary(23),kary(3),24)
468 kary(3) = kary(3) + 24
470 CALL sbyte (kbufr,0,kary(3),8)
471 kary(3) = kary(3) + 8
473 CALL sbyte (kbufr,isect3(1),kary(3),16)
474 kary(3) = kary(3) + 16
476 CALL sbyte (kbufr,isect3(2),kary(3),1)
477 kary(3) = kary(3) + 1
479 CALL sbyte (kbufr,isect3(3),kary(3),1)
480 kary(3) = kary(3) + 1
481 CALL sbyte (kbufr,0,kary(3),6)
482 kary(3) = kary(3) + 6
488 CALL sbyte (kbufr,jdesc(1,kh),kary(3),16)
489 kary(3) = kary(3) + 16
492 CALL sbyte (kbufr,0,kary(3),8)
493 kary(3) = kary(3) + 8
501 kary(3) = kary(3) + 24
502 CALL sbyte (kbufr,0,kary(3),8)
503 kary(3) = kary(3) + 8
508 kend4 = ibfsiz * 8 - 32
511 IF (isect3(3).EQ.0)
THEN
517 CALL fi8506(istep,isect3,kary,jdesc,newnr,kdesc,nrdesc,
518 * ldesc,aname,aunits,kscale,krfval,kwidth,krfvsw,newrfv,
519 * kseq,knum,klist,ibfsiz,
520 * kdata,kbufr,ierrtn,indexb)
521 IF (ierrtn.NE.0)
THEN
522 IF (ierrtn.EQ.1)
GO TO 5500
535 IF (kary(11).GT.nrdesc)
THEN
543 kfunc = kdesc(1,kary(11)) / 16384
545 kclass = mod(kdesc(1,kary(11)),16384) / 256
546 kseg = mod(kdesc(1,kary(11)),256)
547 kary(2) = kary(11) + kary(18)
556 CALL fi8501(kary,istep,kclass,kseg,idata,rdata,
557 * kdata,ll,kdesc,nrdesc,ierrtn)
559 ELSE IF (kfunc.EQ.2)
THEN
560 CALL fi8502(*4000,kbufr,kclass,kseg,
561 * kdesc,nrdesc,i,istep,
562 * kary,kdata,isect3,krfvsw,newrfv,ldesc,ierrtn,indexb)
563 IF (ierrtn.NE.0)
THEN
567 ELSE IF (kfunc.EQ.3)
THEN
568 CALL fi8503(kary(11),kdesc,nrdesc,
569 * isect3,iunitd,kseq,knum,klist,ierrtn)
570 IF (ierrtn.NE.0)
THEN
577 l = indexb(kdesc(1,kary(11)))
584 IF (aunits(l)(1:9).EQ.ccitt)
THEN
593 kbz = kary(3) + (isect3(1) + 1) * kary(7) + 6
594 IF (kbz.GT.kend4)
THEN
600 CALL sbytes(kbufr,zeros,kary(3),8,0,nbinc)
601 kary(3) = kary(3) + kary(7)
602 CALL sbyte (kbufr,nbinc,kary(3),6)
603 kary(3) = kary(3) + 6
605 nkpass = kary(7) / 32
607 krem = mod(kary(7),32)
609 DO 4080 nss = 1, isect3(1)
611 kary(2) = kary(11) + kary(18)
612 IF (nkpass.GE.1)
THEN
614 DO 4070 npp = 1, nkpass
616 IF (isect3(10).EQ.1)
THEN
617 CALL w3ai38 (kdata(nss,kary(2)),4)
619 CALL sbyte (kbufr,kdata(nss,kary(2)),
621 kary(3) = kary(3) + 32
623 kary(2) = kary(2) + 1
628 IF (isect3(10).EQ.1)
THEN
629 CALL w3ai38 (kdata(nss,kary(2)),4)
631 CALL sbyte (kbufr,kdata(nss,kary(2)),
633 kary(3) = kary(3) + krem
638 kary(18) = kary(18) + nkpass
640 kary(18) = kary(18) + nkpass - 1
645 kary(2) = kary(11) + kary(18)
646 kary(7) = kwidth(l) + kary(26)
651 IF (kary(27).GT.0.AND.kdesc(1,kary(11)).NE.7957)
THEN
653 DO 4130 j = 2, isect3(1)
654 IF (kdata(j,kary(2)).NE.kdata(1,kary(2)))
THEN
662 kbz = kary(3) + kary(7) + 6
663 IF (kbz.GT.kend4)
THEN
668 IF (kdata(1,kary(2)).EQ.misg)
THEN
669 CALL sbyte(kbufr,ibits(kary(7)),
672 CALL sbyte(kbufr,kdata(1,kary(2)),
675 kary(3) = kary(3) + kary(27)
677 CALL sbyte (kbufr,nbinc,kary(3),6)
678 kary(3) = kary(3) + 6
683 DO 4132 j = 1, isect3(7)
684 IF (kdata(j,kary(2)).EQ.misg)
THEN
690 DO 4134 j = 1, isect3(7)
691 IF (kdata(j,kary(2)).LT.ibits(kary(27))
692 * .AND.kdata(j,kary(2)).GE.0.AND.
693 * kdata(j,kary(2)).NE.misg)
THEN
694 lowest = kdata(j,kary(2))
695 maxval = kdata(j,kary(2))
701 DO 4136 j = jstart, isect3(7)
702 IF (kdata(j,kary(2)).NE.misg)
THEN
703 IF (kdata(j,kary(2)).LT.lowest)
THEN
704 lowest = kdata(j,kary(2))
705 ELSE IF(kdata(j,kary(2)).GT.maxval)
THEN
706 maxval = kdata(j,kary(2))
710 mxdiff = maxval - lowest
713 DO 4142 lj = 1, mxbits
715 IF (mxdiff.LT.ibits(lj))
THEN
720 kbz = kary(3) + mxbits + 6 + isect3(1) * nbinc
721 IF (kbz.GT.kend4)
THEN
724 IF (nbinc.GT.mxbits)
THEN
729 CALL sbyte(kbufr,lowest,kary(3),mxbits)
730 kary(3) = kary(3) + mxbits
731 CALL sbyte(kbufr,nbinc,kary(3),6)
732 kary(3) = kary(3) + 6
735 DO 4144 m = 1, isect3(1)
736 IF (kdata(m,kary(2)).EQ.misg)
THEN
739 kt(m) = kdata(m,kary(2)) - lowest
743 DO 4146 m = 1, isect3(1)
744 kt(m) = kdata(m,kary(2)) - lowest
748 CALL sbytes(kbufr,kt,kary(3),nbinc,
750 kary(3) = kary(3) + isect3(1) * nbinc
752 kary(18) = kary(18) + 1
757 kary(2) = kary(11) + kary(18)
758 mxbits = kary(7) + kary(26)
760 DO 4030 j = 2, isect3(7)
761 IF (kdata(j,kary(2)).NE.kdata(1,kary(2)))
THEN
769 kbz = kary(3) + kary(7) + 6
770 IF (kbz.GT.kend4)
THEN
775 IF (kdata(1,kary(2)).EQ.misg)
THEN
776 CALL sbyte(kbufr,ibits(mxbits),
779 CALL sbyte(kbufr,kdata(1,kary(2)),
782 kary(3) = kary(3) + kary(7)
784 CALL sbyte (kbufr,nbinc,kary(3),6)
785 kary(3) = kary(3) + 6
790 DO 4032 j = 1, isect3(7)
791 IF (kdata(j,kary(2)).EQ.misg)
THEN
797 DO 4034 j = 1, isect3(7)
798 IF (kdata(j,kary(2)).NE.misg)
THEN
799 lowest = kdata(j,kary(2))
800 maxval = kdata(j,kary(2))
808 DO 4036 j = 1, isect3(1)
809 IF (kdata(j,kary(2)).NE.misg)
THEN
810 IF (kdata(j,kary(2)).LT.lowest)
THEN
811 lowest = kdata(j,kary(2))
813 ELSE IF (kdata(j,kary(2)).GT.maxval)
THEN
814 maxval = kdata(j,kary(2))
819 mxdiff = maxval - lowest
821 DO 4042 lj = 1, mxbits
823 IF (mxdiff.LT.ibits(lj))
GO TO 4043
824 IF (nbinc.EQ.mxbits)
GO TO 4043
827 kbz = kary(3) + mxbits + 38 + isect3(1) * nbinc
828 IF (kbz.GT.kend4)
THEN
836 IF (krfvsw(l).EQ.0)
THEN
842 CALL sbyte(kbufr,lval,kary(3),mxbits)
843 kary(3) = kary(3) + mxbits
844 IF (nbinc.GT.mxbits)
THEN
848 CALL sbyte(kbufr,nbinc,kary(3),6)
849 kary(3) = kary(3) + 6
852 DO 4044 m = 1, isect3(1)
853 IF (kdata(m,kary(2)).EQ.misg)
THEN
856 kt(m) = kdata(m,kary(2)) - lowest
860 DO 4046 m = 1, isect3(1)
861 kt(m) = kdata(m,kary(2)) - lowest
865 CALL sbytes(kbufr,kt,kary(3),nbinc,
867 kary(3) = kary(3) + isect3(1) * nbinc
873 kary(11) = kary(11) + 1
886 IF (isect3(4).NE.0)
THEN
888 isect3(6) = isect3(6) + isect3(5)
890 isect3(7) = isect3(1) - isect3(5)
891 isect3(1) = isect3(7)
892 print *,
'REDUCED BY ',isect3(5),
' ON THIS PASS'
901 nbufr = mod((kary(3) - kary(5)),16)
904 kary(3) = kary(3) + 16 - nbufr
906 kary(24) = (kary(3) - kary(5)) / 8
907 CALL sbyte (kbufr,kary(24),kary(5),24)
914 CALL sbyte (kbufr,nbufr,kary(3),32)
915 kary(3) = kary(3) + 32
918 CALL sbyte (kbufr,itotal,32,24)
921 8601
FORMAT (1x,22hthis message
CONTAINS ,i10,6h bytes)
924 IF (isect3(4).NE.0.AND.isect3(5).NE.0)
THEN
926 nr = mxrpts - isect3(1)
927 isect3(7) = isect3(7) + 1
929 DO 7000 j = 1, nrdesc
930 kdata(i,j) = kdata(isect3(7),j)
932 isect3(7) = isect3(7) + 1
936 isect3(7) = isect3(1)
1469 SUBROUTINE fi8506(ISTEP,ISECT3,KARY,JDESC,NEWNR,KDESC,NRDESC,
1470 * LDESC,ANAME,AUNITS,KSCALE,KRFVAL,KWIDTH,KRFVSW,NEWRFV,
1471 * KSEQ,KNUM,KLIST,IBFSIZ,
1472 * KDATA,KBUFR,IERRTN,INDEXB)
1476 INTEGER ISTEP,INDEXB(*)
1480 INTEGER NRDESC,NEWNR,KDESC(3,*),JDESC(3,*)
1481 INTEGER KDATA(500,*)
1482 INTEGER KRFVSW(*),KSCALE(*),KRFVAL(*),KWIDTH(*),NEWRFV(*)
1487 INTEGER KSEQ(*),KNUM(*),KLIST(300,*)
1488 CHARACTER*40 ANAME(*)
1489 CHARACTER*25 AUNITS(*)
1495 DATA ibits / 1, 3, 7, 15,
1497 * 511, 1023, 2047, 4095,
1498 * 8191, 16383, 32767, 65535,
1499 * z
'0001FFFF',z
'0003FFFF',z
'0007FFFF',z
'000FFFFF',
1500 * z
'001FFFFF',z
'003FFFFF',z
'007FFFFF',z
'00FFFFFF',
1501 * z
'01FFFFFF',z
'03FFFFFF',z
'07FFFFFF',z
'0FFFFFFF',
1502 * z
'1FFFFFFF',z
'3FFFFFFF',z
'7FFFFFFF',z
'FFFFFFFF'/
1503 DATA ccitt /
'CCITT IA5'/
1506 kend = ibfsiz * 8 - 32
1516 DO 4500 i = 1, isect3(1)
1529 IF (kary(4).NE.0)
THEN
1531 kdesc(1,m) = jdesc(1,m)
1538 IF(kary(11).GT.nrdesc)
GOTO 4305
1550 kfunc = kdesc(1,kary(11)) / 16384
1552 kclass = mod(kdesc(1,kary(11)),16384) / 256
1553 kseg = mod(kdesc(1,kary(11)),256)
1554 IF (kfunc.EQ.1)
THEN
1556 CALL fi8501(kary,istep,kclass,kseg,idata,rdata,
1557 * kdata,i,kdesc,nrdesc,ierrtn)
1558 IF (ierrtn.NE.0)
THEN
1562 ELSE IF (kfunc.EQ.2)
THEN
1564 CALL fi8502(*4200,kbufr,kclass,kseg,
1565 * kdesc,nrdesc,i,istep,
1566 * kary,kdata,isect3,krfvsw,newrfv,ldesc,ierrtn,indexb)
1567 IF (ierrtn.NE.0)
THEN
1570 kary(11) = kary(11) + 1
1572 ELSE IF (kfunc.EQ.3)
THEN
1574 CALL fi8503(kary(11),kdesc,nrdesc,
1575 * isect3,iunitd,kseq,knum,klist,ierrtn)
1576 IF (ierrtn.NE.0)
THEN
1583 lk = indexb(kdesc(1,kary(11)))
1586 print *,
'FI8506 3800',kary(11),kdesc(1,kary(11)),
1587 * nrdesc,lk,ldesc(lk)
1592 IF (aunits(lk).EQ.ccitt)
THEN
1601 IF (jwide.GT.32)
THEN
1602 IF(isect3(10).NE.0)
THEN
1603 CALL w3ai38 (kdata(i,kary(2)),4)
1605 IF ((kary(3)+32).GT.kend)
THEN
1609 CALL sbyte (kbufr,kdata(i,kary(2)),kary(3),32)
1610 kary(3) = kary(3) + 32
1612 kary(18) = kary(18) + 1
1614 kary(2) = kary(2) + 1
1617 ELSE IF (jwide.EQ.32)
THEN
1618 IF(isect3(10).NE.0)
THEN
1619 CALL w3ai38 (kdata(i,kary(2)),4)
1621 IF ((kary(3)+32).GT.kend)
THEN
1625 CALL sbyte (kbufr,kdata(i,kary(2)),kary(3),32)
1626 kary(3) = kary(3) + 32
1627 kary(2) = kary(2) + 1
1629 ELSE IF (jwide.GT.0)
THEN
1630 IF(isect3(10).NE.0)
THEN
1631 CALL w3ai38 (kdata(i,kary(2)),4)
1633 IF ((kary(3)+jwide).GT.kend)
THEN
1637 CALL sbyte (kbufr,kdata(i,kary(2)),kary(3),jwide)
1638 kary(3) = kary(3) + jwide
1639 kary(2) = kary(2) + 1
1643 IF (kary(27).NE.0.AND.kdesc(1,kary(11)).NE.7957)
THEN
1645 IF ((kary(3)+kary(27)).GT.kend)
THEN
1649 CALL sbyte (kbufr,kdata(i,kary(2)),kary(3),
1651 kary(3) = kary(3) + kary(27)
1652 kary(18) = kary(18) + 1
1654 kary(2) = kary(2) + 1
1657 jwide = kwidth(lk) + kary(26)
1658 IF (kdata(i,kary(2)).EQ.misg)
THEN
1660 IF ((kary(3)+jwide).GT.kend)
THEN
1664 CALL sbyte (kbufr,ibits(jwide),kary(3),jwide)
1665 kary(3) = kary(3) + jwide
1666 kary(2) = kary(2) + 1
1667 kary(11) = kary(11) + 1
1672 IF (kdata(i,kary(2)).GT.ibits(jwide))
THEN
1677 IF (krfvsw(lk).EQ.0)
THEN
1683 kdata(i,kary(2)) = kdata(i,kary(2)) - jrv
1685 IF (kdata(i,kary(2)).LT.0)
THEN
1690 IF ((kary(3)+jwide).GT.kend)
THEN
1694 CALL sbyte (kbufr,kdata(i,kary(2)),kary(3),jwide)
1695 kary(2) = kary(2) + 1
1696 kary(3) = kary(3) + jwide
1698 kary(11) = kary(11) + 1
1702 DO 4310 lx = 1, isect3(8)
1749 SUBROUTINE fi8508(ISTEP,IUNITB,IDATA,KDESC,NRDESC,ATEXT,KSUB,KARY,
1750 * KDATA,LDESC,ANAME,AUNITS,KSCALE,KRFVAL,KRFVSW,ISECT3,
1751 * KWIDTH,KASSOC,IUNITD,KSEQ,KNUM,KLIST,IERRTN,INDEXB)
1768 INTEGER IUNITB,IUNITD,KSEQ(*),KNUM(*),KLIST(300,*)
1769 INTEGER KDESC(3,*),NRDESC,KASSOC(*)
1770 INTEGER IDATA(*),ISTEP
1771 INTEGER KDATA(500,*)
1772 INTEGER KARY(*),INDEXB(*)
1781 INTEGER MPTR,ISECT3(*)
1782 CHARACTER*1 ATEXT(*)
1783 CHARACTER*1 AHOLD1(256)
1785 CHARACTER*25 AUNITS(*)
1787 CHARACTER*40 ANAME(*)
1791 equivalence(ahold1,ihold4)
1794 DATA ccitt /
'CCITT IA5 '/
1795 DATA ibits / 1, 3, 7, 15,
1797 * 511, 1023, 2047, 4095,
1798 * 8191, 16383, 32767, 65535,
1799 * z
'0001FFFF',z
'0003FFFF',z
'0007FFFF',z
'000FFFFF',
1800 * z
'001FFFFF',z
'003FFFFF',z
'007FFFFF',z
'00FFFFFF',
1801 * z
'01FFFFFF',z
'03FFFFFF',z
'07FFFFFF',z
'0FFFFFFF',
1802 * z
'1FFFFFFF',z
'3FFFFFFF',z
'7FFFFFFF',z
'FFFFFFFF'/
1805 IF (isect3(8).EQ.0)
THEN
1806 CALL fi8512(iunitb,isect3,kdesc,nrdesc,kary,ierrtn,
1807 * ldesc,aname,aunits,kscale,krfval,kwidth,krfvsw,
1808 * iunitd,kseq,knum,klist,indexb)
1809 IF (ierrtn.NE.0)
THEN
1823 kary(11) = kary(11) + 1
1824 IF (kary(11).GT.nrdesc)
GO TO 1500
1829 kfunc = kdesc(1,kary(11)) / 16384
1830 kl = kdesc(1,kary(11)) - 16384 * kfunc
1834 IF (kfunc.EQ.1)
THEN
1836 CALL fi8501(kary,istep,kclass,kseg,idata,rdata,
1837 * kdata,ksub,kdesc,nrdesc,ierrtn)
1838 IF (ierrtn.NE.0)
THEN
1842 ELSE IF (kfunc.EQ.2)
THEN
1843 IF (kclass.EQ.5)
THEN
1846 kavail = idata(kary(11))
1848 krem = mod(kavail,4)
1850 kwords = kavail / 4 + 1
1858 ELSE IF (kfunc.EQ.3)
THEN
1860 CALL fi8503(kary(11),kdesc,nrdesc,
1861 * isect3,iunitd,kseq,knum,klist,ierrtn)
1862 IF (ierrtn.NE.0)
THEN
1870 k = indexb(kdesc(1,kary(11)))
1872 print *,
'FI8508-NOT FOUND',kary(11),kdesc(1,kary(11)),
1873 * isect3(8),ldesc(k)
1879 IF (aunits(k)(1:9).NE.ccitt(1:9))
THEN
1880 IF (kary(27).NE.0)
THEN
1881 IF (kdesc(1,kary(11)).LT.7937.OR.
1882 * kdesc(1,kary(11)).GT.8191)
THEN
1885 IF (kassoc(kary(11)).EQ.ibits(kary(27)))
THEN
1886 kdata(ksub,kpos) = misg
1888 kdata(ksub,kpos) = kassoc(kary(11))
1893 IF (idata(kary(11)).EQ.99999)
THEN
1895 kdata(ksub,kpos) = misg
1899 kdata(ksub,kpos) = idata(kary(11))
1904 kreq = kwidth(k) / 8
1906 kavail = idata(kary(11))
1908 krem = mod(kavail,4)
1910 kwords = kavail / 4 + 1
1923 DO 400 ij = 1, kwords
1925 CALL gbyte(atext,kdata(ksub,kpos),nptr,32)
1973 SUBROUTINE fi8509(ISTEP,IUNITB,RDATA,KDESC,NRDESC,ATEXT,KSUB,KARY,
1974 * KDATA,LDESC,ANAME,AUNITS,KSCALE,KRFVAL,KRFVSW,ISECT3,
1975 * KWIDTH,KASSOC,IUNITD,KSEQ,KNUM,KLIST,IERRTN,INDEXB)
1994 INTEGER IUNITB,IUNITD,KSEQ(*),KNUM(*),KLIST(300,*)
1995 INTEGER IBITS(32),INDEXB(*)
1996 INTEGER KDESC(3,*),ISTEP
1997 INTEGER KDATA(500,*)
2008 INTEGER MPTR,ISECT3(*)
2010 CHARACTER*1 AHOLD1(256)
2012 CHARACTER*1 ATEXT(*)
2013 CHARACTER*25 AUNITS(*)
2015 CHARACTER*40 ANAME(*)
2019 equivalence(ahold1,ihold4)
2021 DATA ibits/ 1, 3, 7, 15,
2023 * 511, 1023, 2047, 4095,
2024 * 8191, 16383, 32767, 65535,
2025 * z
'0001FFFF',z
'0003FFFF',z
'0007FFFF',z
'000FFFFF',
2026 * z
'001FFFFF',z
'003FFFFF',z
'007FFFFF',z
'00FFFFFF',
2027 * z
'01FFFFFF',z
'03FFFFFF',z
'07FFFFFF',z
'0FFFFFFF',
2028 * z
'1FFFFFFF',z
'3FFFFFFF',z
'7FFFFFFF',z
'FFFFFFFF'/
2030 DATA ccitt /
'CCITT IA5 '/
2034 IF (isect3(8).EQ.0)
THEN
2035 CALL fi8512(iunitb,isect3,kdesc,nrdesc,kary,ierrtn,
2036 * ldesc,aname,aunits,kscale,krfval,kwidth,krfvsw,
2037 * iunitd,kseq,knum,klist,indexb)
2038 IF (ierrtn.NE.0)
THEN
2052 kary(11) = kary(11) + 1
2053 IF (kary(11).GT.nrdesc)
GO TO 1500
2057 kfunc = kdesc(1,kary(11)) / 16384
2058 kl = kdesc(1,kary(11)) - 16384 * kfunc
2062 IF (kfunc.EQ.1)
THEN
2064 CALL fi8501(kary,istep,kclass,kseg,idata,rdata,
2065 * kdata,ksub,kdesc,nrdesc,ierrtn)
2066 IF (ierrtn.NE.0)
THEN
2070 ELSE IF (kfunc.EQ.2)
THEN
2072 IF (kclass.EQ.5)
THEN
2074 kavail = rdata(kary(11))
2076 krem = mod(kavail,4)
2078 kwords = kavail / 4 + 1
2084 ELSE IF (kclass.EQ.2)
THEN
2088 kary(9) = kseg - 128
2092 ELSE IF (kfunc.EQ.3)
THEN
2094 CALL fi8503(kary(11),kdesc,nrdesc,
2095 * isect3,iunitd,kseq,knum,klist,ierrtn)
2096 IF (ierrtn.NE.0)
THEN
2104 k = indexb(kdesc(1,kary(11)))
2112 IF (aunits(k)(1:9).NE.ccitt(1:9))
THEN
2113 IF (kary(27).NE.0)
THEN
2114 IF (kdesc(1,kary(11)).LT.7937.OR.
2115 * kdesc(1,kary(11)).GT.8191)
THEN
2118 IF (kassoc(kary(11)).EQ.ibits(kary(27)))
THEN
2119 kdata(ksub,kpos) = misg
2121 kdata(ksub,kpos) = kassoc(kary(11))
2126 IF (rdata(kary(11)).EQ.99999.)
THEN
2128 kdata(ksub,kpos) = misg
2131 IF (kscale(k).NE.0)
THEN
2133 scale = 10. **(iabs(kscale(k)) + kary(9))
2134 IF (kscale(k).LT.0)
THEN
2135 rdata(kary(11)) = rdata(kary(11)) / scale
2137 rdata(kary(11)) = rdata(kary(11)) * scale
2141 rdata(kary(11)) = rdata(kary(11)) +
2142 * sign(0.5,rdata(kary(11)))
2145 kdata(ksub,kpos) = rdata(kary(11))
2151 kreq = kwidth(k) / 8
2153 kavail = rdata(kary(11))
2155 krem = mod(kavail,4)
2157 kwords = kavail / 4 + 1
2170 DO 400 ij = 1, kwords
2172 CALL gbyte(atext,kdata(ksub,kpos),nptr,32)