1157 SUBROUTINE ai083(MSGA,KPTR,KPDS,KGDS,KRET)
1178 IF (iand(kpds(4),msk80).EQ.0)
GO TO 900
1181 IF (kpds(18).EQ.0)
THEN
1186 iss = is + kptr(3) + igribl
1190 kgds(1) =
mova2i(msga(iss+5))
1192 IF (kgds(1).EQ.0)
THEN
1194 ELSE IF (kgds(1).EQ.1)
THEN
1196 ELSE IF (kgds(1).EQ.2.OR.kgds(1).EQ.5)
THEN
1198 ELSE IF (kgds(1).EQ.3)
THEN
1200 ELSE IF (kgds(1).EQ.4)
THEN
1202 ELSE IF (kgds(1).EQ.50)
THEN
1215 kgds(2) = kgds(2) * 256 +
mova2i(msga(i+iss+6))
1220 kgds(3) = kgds(3) * 256 +
mova2i(msga(i+iss+8))
1225 kgds(4) = kgds(4) * 256 +
mova2i(msga(i+iss+10))
1227 IF (iand(kgds(4),8388608).NE.0)
THEN
1228 kgds(4) = iand(kgds(4),8388607) * (-1)
1233 kgds(5) = kgds(5) * 256 +
mova2i(msga(i+iss+13))
1235 IF (iand(kgds(5),8388608).NE.0)
THEN
1236 kgds(5) = - iand(kgds(5),8388607)
1239 kgds(6) =
mova2i(msga(iss+16))
1243 kgds(7) = kgds(7) * 256 +
mova2i(msga(i+iss+17))
1245 IF (iand(kgds(7),8388608).NE.0)
THEN
1246 kgds(7) = - iand(kgds(7),8388607)
1251 kgds(8) = kgds(8) * 256 +
mova2i(msga(i+iss+20))
1253 IF (iand(kgds(8),8388608).NE.0)
THEN
1254 kgds(8) = - iand(kgds(8),8388607)
1259 kgds(9) = kgds(9) * 256 +
mova2i(msga(i+iss+23))
1268 kgds(10) = kgds(10) * 256 +
mova2i(msga(i+iss+25))
1271 kgds(11) =
mova2i(msga(iss+27))
1281 kgds(2) = kgds(2) * 256 +
mova2i(msga(i+iss+6))
1286 kgds(3) = kgds(3) * 256 +
mova2i(msga(i+iss+8))
1291 kgds(4) = kgds(4) * 256 +
mova2i(msga(i+iss+10))
1293 IF (iand(kgds(4),8388608).NE.0)
THEN
1294 kgds(4) = - iand(kgds(4),8388607)
1299 kgds(5) = kgds(5) * 256 +
mova2i(msga(i+iss+13))
1301 IF (iand(kgds(5),8388608).NE.0)
THEN
1302 kgds(5) = - iand(kgds(5),8388607)
1305 kgds(6) =
mova2i(msga(iss+16))
1309 kgds(7) = kgds(7) * 256 +
mova2i(msga(i+iss+17))
1311 IF (iand(kgds(7),8388608).NE.0)
THEN
1312 kgds(7) = - iand(kgds(7),8388607)
1317 kgds(8) = kgds(8) * 256 +
mova2i(msga(i+iss+20))
1319 IF (iand(kgds(8),8388608).NE.0)
THEN
1320 kgds(8) = - iand(kgds(8),8388607)
1325 kgds(9) = kgds(9) * 256 +
mova2i(msga(i+iss+23))
1327 IF (iand(kgds(9),8388608).NE.0)
THEN
1328 kgds(9) = - iand(kgds(9),8388607)
1331 kgds(10) =
mova2i(msga(iss+26))
1333 kgds(11) =
mova2i(msga(iss+27))
1343 kgds(2) = kgds(2) * 256 +
mova2i(msga(i+iss+6))
1348 kgds(3) = kgds(3) * 256 +
mova2i(msga(i+iss+8))
1353 kgds(4) = kgds(4) * 256 +
mova2i(msga(i+iss+10))
1356 kgds(5) =
mova2i(msga(iss+12))
1358 kgds(6) =
mova2i(msga(iss+13))
1367 kgds(2) = kgds(2) * 256 +
mova2i(msga(i+iss+6))
1372 kgds(3) = kgds(3) * 256 +
mova2i(msga(i+iss+8))
1377 kgds(4) = kgds(4) * 256 +
mova2i(msga(i+iss+10))
1379 IF (iand(kgds(4),8388608).NE.0)
THEN
1380 kgds(4) = - iand(kgds(4),8388607)
1385 kgds(5) = kgds(5) * 256 +
mova2i(msga(i+iss+13))
1387 IF (iand(kgds(5),8388608).NE.0)
THEN
1388 kgds(5) = - iand(kgds(5),8388607)
1391 kgds(6) =
mova2i(msga(iss+16))
1395 kgds(7) = kgds(7) * 256 +
mova2i(msga(i+iss+17))
1397 IF (iand(kgds(7),8388608).NE.0)
THEN
1398 kgds(7) = - iand(kgds(7),8388607)
1403 kgds(8) = kgds(8) * 256 +
mova2i(msga(i+iss+20))
1405 IF (iand(kgds(8),8388608).NE.0)
THEN
1406 kgds(8) = - iand(kgds(8),8388607)
1411 kgds(9) = kgds(9) * 256 +
mova2i(msga(i+iss+23))
1413 IF (iand(kgds(9),8388608).NE.0)
THEN
1414 kgds(9) = - iand(kgds(9),32768)
1419 kgds(10) = kgds(10) * 256 +
mova2i(msga(i+iss+25))
1421 IF (iand(kgds(10),8388608).NE.0)
THEN
1422 kgds(10) = - iand(kgds(10),32768)
1425 kgds(11) =
mova2i(msga(iss+27))
1429 kgds(12)= kgds(12) * 256 +
mova2i(msga(i+iss+28))
1439 kgds(2) = kgds(2) * 256 +
mova2i(msga(i+iss+6))
1444 kgds(3) = kgds(3) * 256 +
mova2i(msga(i+iss+8))
1449 kgds(4) = kgds(4) * 256 +
mova2i(msga(i+iss+10))
1451 IF (iand(kgds(4),8388608).NE.0)
THEN
1452 kgds(4) = - iand(kgds(4),8388607)
1457 kgds(5) = kgds(5) * 256 +
mova2i(msga(i+iss+13))
1459 IF (iand(kgds(5),8388608).NE.0)
THEN
1460 kgds(5) = - iand(kgds(5),8388607)
1467 kgds(7) = kgds(7) * 256 +
mova2i(msga(i+iss+17))
1469 IF (iand(kgds(7),8388608).NE.0)
THEN
1470 kgds(7) = - iand(kgds(7),8388607)
1475 kgds(8) = kgds(8) * 256 +
mova2i(msga(i+iss+20))
1480 kgds(9) = kgds(9) * 256 +
mova2i(msga(i+iss+23))
1483 kgds(10) =
mova2i(msga(iss+26))
1485 kgds(11) =
mova2i(msga(iss+27))
1489 kgds(12)= kgds(12)* 256 +
mova2i(msga(i+iss+28))
1491 IF (iand(kgds(12),8388608).NE.0)
THEN
1492 kgds(12) = - iand(kgds(12),8388607)
1497 kgds(13)= kgds(13)* 256 +
mova2i(msga(i+iss+31))
1499 IF (iand(kgds(13),8388608).NE.0)
THEN
1500 kgds(13) = - iand(kgds(13),8388607)
1614 SUBROUTINE ai084(MSGA,KPTR,KPDS,KGDS,KBMS,KRET)
1631 LOGICAL GRD21( 1369)
1633 LOGICAL GRD23( 1369)
1634 LOGICAL GRD25( 1368)
1635 LOGICAL GRD26( 1368)
1641 LOGICAL GRD61( 4186)
1643 LOGICAL GRD63( 4186)
1645 DATA grd21 /1333*.true.,36*.false./
1646 DATA grd23 /.true.,36*.false.,1332*.true./
1647 DATA grd25 /1297*.true.,71*.false./
1648 DATA grd26 /.true.,71*.false.,1296*.true./
1651 & 7*.false.,22*.true.,14*.false.,22*.true.,
1652 & 14*.false.,22*.true.,14*.false.,22*.true.,7*.false.,
1654 & 6*.false.,24*.true.,12*.false.,24*.true.,
1655 & 12*.false.,24*.true.,12*.false.,24*.true.,6*.false.,
1657 & 5*.false.,26*.true.,10*.false.,26*.true.,
1658 & 10*.false.,26*.true.,10*.false.,26*.true.,5*.false.,
1660 & 4*.false.,28*.true., 8*.false.,28*.true.,
1661 & 8*.false.,28*.true., 8*.false.,28*.true.,4*.false.,
1663 & 3*.false.,30*.true., 6*.false.,30*.true.,
1664 & 6*.false.,30*.true., 6*.false.,30*.true.,3*.false.,
1666 & 2*.false.,32*.true., 4*.false.,32*.true.,
1667 & 4*.false.,32*.true., 4*.false.,32*.true.,2*.false.,
1669 & .false.,34*.true., 2*.false.,34*.true.,
1670 & 2*.false.,34*.true., 2*.false.,34*.true., .false.,
1673 DATA grd61 /4096*.true.,90*.false./
1674 DATA grd63 /.true.,90*.false.,4095*.true./
1675 DATA mask /128,64,32,16,8,4,2,1/
1680 IF (kpds(18).EQ.0)
THEN
1685 iss = is + kptr(3) + kptr(4) + igribl
1694 IF (kpds(3).EQ.255)
THEN
1695 j = kgds(2) * kgds(3)
1701 IF (iand(kpds(4),msk40).EQ.0)
THEN
1705 print *,
' HAVE A BIT MAP'
1708 IF (kgds(1).EQ.50)
THEN
1709 print *,
' W3AI08/AI084 WARNING - BIT MAP MAY NOT BE',
1710 *
' ASSOCIATED WITH SPHERICAL COEFFICIENTS'
1714 iubits =
mova2i(msga(iss+3))
1718 kflag = kflag * 256 +
mova2i(msga(i+iss+4))
1720 print *,
'KFLAG=',kflag
1724 maxbyt = kptr(5) - 6
1725 IF (kflag.EQ.0)
THEN
1728 DO 300 i = 1, maxbyt
1729 kcnt =
mova2i(msga(i+iss+6))
1731 IF (iand(kcnt,mask(k)).NE.0)
THEN
1739 kptr(10) = 8 * (kptr(5) - 6) - iubits
1742 print *,
'KFLAG SAYS USE STD BIT MAP',kflag
1751 IF (kpds(1).EQ.98)
THEN
1752 IF (kpds(3).GE.1.AND.kpds(3).LE.12)
THEN
1755 IF (kptr(6) .GT. 2158) j= 1369
1758 CALL ai087(*900,j,kpds,kgds,kret)
1762 ELSE IF (kpds(3).GE.13.AND.kpds(3).LE.16)
THEN
1765 CALL ai087(*900,j,kpds,kgds,kret)
1774 ELSE IF (kpds(1).EQ.74)
THEN
1775 IF (kpds(3).EQ.21.OR.kpds(3).EQ.22)
THEN
1779 CALL ai087(*900,j,kpds,kgds,kret)
1783 ELSE IF (kpds(3).EQ.23.OR.kpds(3).EQ.24)
THEN
1787 CALL ai087(*900,j,kpds,kgds,kret)
1791 ELSE IF (kpds(3).EQ.25)
THEN
1795 CALL ai087(*900,j,kpds,kgds,kret)
1799 ELSE IF (kpds(3).EQ.26)
THEN
1803 CALL ai087(*900,j,kpds,kgds,kret)
1807 ELSE IF (kpds(3).EQ.61.OR.kpds(3).EQ.62)
THEN
1811 CALL ai087(*900,j,kpds,kgds,kret)
1815 ELSE IF (kpds(3).EQ.63.OR.kpds(3).EQ.64)
THEN
1819 CALL ai087(*900,j,kpds,kgds,kret)
1823 ELSE IF (kpds(3).EQ.70)
THEN
1827 CALL ai087(*900,j,kpds,kgds,kret)
1836 ELSE IF (kpds(1).EQ.58)
THEN
1837 print *,
' NO STANDARD FNOC GRID AT THIS TIME'
1840 ELSE IF (kpds(1).EQ.7)
THEN
1841 IF (kpds(3).EQ.5)
THEN
1845 CALL ai087(*900,j,kpds,kgds,kret)
1849 ELSE IF (kpds(3).EQ.6)
THEN
1853 CALL ai087(*900,j,kpds,kgds,kret)
1857 ELSE IF (kpds(3).EQ.21.OR.kpds(3).EQ.22)
THEN
1861 CALL ai087(*900,j,kpds,kgds,kret)
1865 ELSE IF (kpds(3).EQ.23.OR.kpds(3).EQ.24)
THEN
1869 CALL ai087(*900,j,kpds,kgds,kret)
1873 ELSE IF (kpds(3).EQ.25)
THEN
1877 CALL ai087(*900,j,kpds,kgds,kret)
1881 ELSE IF (kpds(3).EQ.26)
THEN
1885 CALL ai087(*900,j,kpds,kgds,kret)
1889 ELSE IF (kpds(3).EQ.27.OR.kpds(3).EQ.28)
THEN
1893 CALL ai087(*900,j,kpds,kgds,kret)
1897 ELSE IF (kpds(3).EQ.29.OR.kpds(3).EQ.30)
THEN
1901 CALL ai087(*900,j,kpds,kgds,kret)
1905 ELSE IF (kpds(3).EQ.33.OR.kpds(3).EQ.34)
THEN
1909 CALL ai087(*900,j,kpds,kgds,kret)
1913 ELSE IF (kpds(3).EQ.50)
THEN
1917 CALL ai087(*900,j,kpds,kgds,kret)
1921 ELSE IF (kpds(3).EQ.61.OR.kpds(3).EQ.62)
THEN
1925 CALL ai087(*900,j,kpds,kgds,kret)
1929 ELSE IF (kpds(3).EQ.63.OR.kpds(3).EQ.64)
THEN
1933 CALL ai087(*900,j,kpds,kgds,kret)
1937 ELSE IF (kpds(3).EQ.70)
THEN
1941 CALL ai087(*900,j,kpds,kgds,kret)
1945 ELSE IF (kpds(3).EQ.85.OR.kpds(3).EQ.86)
THEN
1949 CALL ai087(*900,j,kpds,kgds,kret)
1953 ELSE IF (kpds(3).EQ.100)
THEN
1957 CALL ai087(*900,j,kpds,kgds,kret)
1961 ELSE IF (kpds(3).EQ.101)
THEN
1965 CALL ai087(*900,j,kpds,kgds,kret)
1969 ELSE IF (kpds(3).EQ.102)
THEN
1973 CALL ai087(*900,j,kpds,kgds,kret)
1977 ELSE IF (kpds(3).EQ.103)
THEN
1981 CALL ai087(*900,j,kpds,kgds,kret)
1985 ELSE IF (kpds(3).GE.201.AND.kpds(3).LE.214)
THEN
1986 IF (kpds(3).EQ.201) j = 4225
1987 IF (kpds(3).EQ.202) j = 2795
1988 IF (kpds(3).EQ.203) j = 1755
1989 IF (kpds(3).EQ.204) j = 5609
1990 IF (kpds(3).EQ.205) j = 1755
1991 IF (kpds(3).EQ.206) j = 2091
1992 IF (kpds(3).EQ.207) j = 1715
1993 IF (kpds(3).EQ.208) j = 625
1994 IF (kpds(3).EQ.209) j = 8181
1995 IF (kpds(3).EQ.210) j = 625
1996 IF (kpds(3).EQ.211) j = 2915
1997 IF (kpds(3).EQ.212) j = 4225
1998 IF (kpds(3).EQ.213) j = 10965
1999 IF (kpds(3).EQ.214) j = 6693
2001 CALL ai087(*900,j,kpds,kgds,kret)
2066 SUBROUTINE ai085(MSGA,KPTR,KPDS,KBMS,DATA,KRET)
2077 INTEGER KSAVE(105000)
2087 equivalence(refnce,kref(1),iref)
2088 equivalence(kk(1),realkk,ikk)
2101 iss = is + kptr(3) + kptr(4) + kptr(5) + 4
2103 kspl =
mova2i(msga(iss+3))
2110 kscale = kscale * 256 +
mova2i(msga(i+iss+4))
2112 IF (iand(kscale,32768).NE.0)
THEN
2113 kscale = - iand(kscale,32767)
2121 kref(i+1) = msga(i+iss+6)
2131 IF (.NOT.ibm370)
THEN
2134 CALL gbyte(iref,isgn,0,1)
2136 CALL gbyte(iref,iexp,1,7)
2138 CALL gbyte(iref,ifr,8,24)
2139 IF (ifr.EQ.0.OR.iexp.EQ.0)
THEN
2142 refnce = float(ifr) * 16.0 ** (iexp-64-6)
2143 IF (isgn.NE.0) refnce = - refnce
2149 kbits =
mova2i(msga(iss+10))
2154 IF (kentry.GT.105000)
THEN
2158 IF (kbits.EQ.0)
THEN
2162 DO 210 i = 1, kentry
2177 lessbt = iand(kspl,msk0f)
2181 nrbyte = kptr(6) - 11
2185 nrbits = nrbyte * 8 - lessbt
2189 kentry = nrbits / kbits
2193 IF (kentry.GT.105000)
THEN
2198 ibms = iand(kpds(4),msk40)
2206 IF (iand(kspl,msk80).EQ.0)
THEN
2237 CALL gbytes(msga(iss+nnn),ksave,koff,kbits,0,kentry)
2243 DO 500 i = 1, kentry
2245 DATA(i) = refnce + float(ksave(ii)) * scale
2258 kk(i+1) = msga(i+iss+11)
2261 IF (.NOT.ibm370)
THEN
2264 CALL gbyte(ikk,isgn,0,1)
2266 CALL gbyte(ikk,iexp,1,7)
2268 CALL gbyte(ikk,ifr,8,24)
2269 IF (ifr.EQ.0.OR.iexp.EQ.0)
THEN
2272 realkk = float(ifr) * 16.0 ** (iexp-64-6)
2273 IF (isgn.NE.0) realkk = - realkk
2291 CALL gbytes(msga(iss+nnn),ksave,koff,kbits,0,kentry)
2294 DO 6000 i = 1, kentry
2295 DATA(i+1) = refnce + float(ksave(i)) * scale
2361 SUBROUTINE ai085a(MSGA,KPTR,KPDS,KBMS,DATA,KRET)
2372 INTEGER KSAVE(105000)
2382 equivalence(refnce,kref(1),iref)
2383 equivalence(kk(1),realkk,ikk)
2398 iss = is + kptr(3) + kptr(4) + kptr(5) + igribl
2400 kspl =
mova2i(msga(iss+3))
2408 kscale = kscale * 256 +
mova2i(msga(i+iss+4))
2410 IF (iand(kscale,32768).NE.0)
THEN
2411 kscale = - iand(kscale,32767)
2417 idec = is + igribl + 26
2420 jscale = jscale * 256 +
mova2i(msga(i+idec))
2423 IF (iand(jscale,32768).NE.0)
THEN
2424 jscale = - iand(jscale,32767)
2426 ascale = 10.0 ** jscale
2432 kref(i+1) = msga(i+iss+6)
2442 IF (.NOT.ibm370)
THEN
2445 CALL gbyte(iref,isgn,0,1)
2447 CALL gbyte(iref,iexp,1,7)
2449 CALL gbyte(iref,ifr,8,24)
2450 IF (ifr.EQ.0.OR.iexp.EQ.0)
THEN
2453 refnce = float(ifr) * 16.0 ** (iexp-64-6)
2454 IF (isgn.NE.0) refnce = - refnce
2460 kbits =
mova2i(msga(iss+10))
2465 IF (kentry.GT.105000)
THEN
2470 IF (kbits.EQ.0)
THEN
2474 DO 210 i = 1, kentry
2489 lessbt = iand(kspl,msk0f)
2493 nrbyte = kptr(6) - 11
2497 nrbits = nrbyte * 8 - lessbt
2501 kentry = nrbits / kbits
2505 IF (kentry.GT.105000)
THEN
2509 ibms = iand(kpds(4),msk40)
2516 IF (iand(kspl,msk80).EQ.0)
THEN
2546 CALL gbytes(msga(iss+nnn),ksave,koff,kbits,0,kentry)
2552 DO 500 i = 1, kentry
2555 DATA(i) = (refnce + float(ksave(ii)) * scale) / ascale
2568 kk(i+1) = msga(i+iss+11)
2571 IF (.NOT.ibm370)
THEN
2574 CALL gbyte(ikk,isgn,0,1)
2576 CALL gbyte(ikk,iexp,1,7)
2578 CALL gbyte(ikk,ifr,8,24)
2579 IF (ifr.EQ.0.OR.iexp.EQ.0)
THEN
2582 realkk = float(ifr) * 16.0 ** (iexp-64-6)
2583 IF (isgn.NE.0) realkk = - realkk
2603 CALL gbytes(msga(iss+nnn),ksave,koff,kbits,0,kentry)
2605 DO 6000 i = 1, kentry
2606 DATA(i+1) = refnce + float(ksave(i)) * scale