|
|
1.1 root 1: subroutine mvefil (unit,time,nx,ny,fmin,fmax,outsid,f)
2: *
3: * mvefil writes the array f(nx,ny) in a format for view2d movies.
4: * input:
5: * unit = integer variable specifying output unit
6: * time = real variable specifying time
7: * nx = integer variable specifying number of x points
8: * ny = integer variable specifying number of y points
9: * fmin = real variable specifying minimum of f(i,j)
10: * fmax = real variable specifying maximum of f(i,j)
11: * If fmin=fmax on input, the range will be set inside.
12: * outsid = real variable specifying points outside region
13: * if f(i,j) <= outsid => point is outside region
14: * f = real array of points to be plotted
15: * f(i,j) i = 1,...,nx j = 1,...,ny
16: * suggested jcl:
17: * DISPOSE,DN=FT30,MF=XH,DC=ST,TEXT='|/b2/c1127/ehg/rks astro/swift file'.
18: *
19: * Each data point is represented in the packed ASCII character format
20: * by a 12 bit integer between 0 and 4095.
21: * f(i,j)=fmin+(fmax-fmin)*icode(i,j)/4095
22: * icode is packed as two 6 bit integers ( / hi / lo / ). Each 6 bits
23: * is represented as an printable ASCII character, 6 bits + ! (033 octal).
24: * A point which lies outside the computation region is flaged with (~~).
25: * written by R. Kent Smith, May 1984
26: * to supply programs written by Andrew Hume and Eric Grosse
27: integer bits,shift,lbuf
28: parameter (bits=64,lbuf=128)
29: parameter (shift=2**(bits-16))
30: integer high,low,zero
31: data high,low,zero,otside/7700b,77b,2r!!,2r~~/
32: integer hi,lo,buf(lbuf)
33: *
34: integer unit,nx,ny
35: real time
36: real fmin,fmax,f(1)
37: *
38: if (unit.le.0) return
39: *
40: nxny=nx*ny
41: if (fmin.ge.fmax) then
42: *
43: fmin=1e500
44: fmax=-fmin
45: do 110 i=1,nxny
46: c=f(i)
47: if(c.gt.outsid) then
48: fmin=amin1(c,fmin)
49: fmax=amax1(c,fmax)
50: end if
51: 110 continue
52: *
53: end if
54: *
55: write (unit,6000) time,nx,ny,fmin,fmax
56: 6000 format(1x,e12.6,2i6,1x,e12.6,1x,e12.6)
57: *
58: if (fmax.gt.fmin) then
59: slope=4095.0/(fmax-fmin)
60: else
61: slope=0.0
62: end if
63: nseg=(nxny-1)/lbuf
64: num=nxny-nseg*lbuf
65: lf=0
66: do 220 iseg=1,nseg+1
67: *
68: do 210 i=1,num
69: *
70: code=slope*(f(lf+i)-fmin)
71: index=int(code+0.5)
72: *
73: lo=low.and.index
74: hi=high.and.index
75: ibuf=4*hi+lo+zero
76: buf(i)=cvmgp(ibuf,otside,index)*shift
77: *
78: 210 continue
79: *
80: write (unit,6100) (buf(i),i=1,num)
81: 6100 format(32a2)
82: *
83: lf=lf+num
84: num=lbuf
85: 220 continue
86: *
87: return
88: end
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.