37 implicit real*8(a-h,o-z)
38 character*200 fnamei,fnameo
40 real*4 zrec(100000),nw,ne,sw,se,zmin,zmax
41 integer*2 srec(100000)
42 equivalence(hrec(1),zrec(1),srec(1))
47 write(6,*)
'Program gabs - converts a grid to ABS values' 50 2
format(
'Enter the input grid file name: ',$)
52 open(lin,file=fnamei,status=
'old',form=
'unformatted')
55 3
format(
'Enter the output grid file name: ',$)
57 open(lout,file=fnameo,status=
'new',form=
'unformatted')
62 read(lin) glamn,glomn,dgla,dglo,nla,nlo,ikind
63 write(lout) glamn,glomn,dgla,dglo,nla,nlo,ikind
69 read(lin)(hrec(i),i=1,nlo)
71 hrec(i) = int(abs(hrec(i)))
73 write(lout)(hrec(i),i=1,nlo)
76 elseif(ikind.eq.1)
then 78 read(lin) (zrec(i),i=1,nlo)
80 zrec(i) = abs(zrec(i))
82 write(lout)(zrec(i),i=1,nlo)
85 elseif(ikind.eq.-1)
then 87 read(lin) (srec(i),i=1,nlo)
89 srec(i) = int(abs(srec(i)))
91 write(lout)(srec(i),i=1,nlo)
94 elseif(ikind.eq.2)
then 96 read(lin) (srec(i),i=1,nlo)
98 srec(i) = int(abs(srec(i)))
100 write(lout)(srec(i),i=1,nlo)
program gabs
Part of the NADCON5 NADCON5 Core Library , Convert values in a *.b grid to absolute value...