33 implicit real*8(a-h,o-z)
34 character*200 fnamei,fnameo
36 real*4 zrec(100000),nw,ne,sw,se,zmin,zmax
37 integer*2 srec(100000)
38 equivalence(hrec(1),zrec(1),srec(1))
44 1
format(
'Program gsqr - converts grid points ',
45 *
'to their squared values')
48 2
format(
'Enter the input grid file name: ',$)
50 open(lin,file=fnamei,status=
'old',form=
'unformatted')
53 3
format(
'Enter the output grid file name: ',$)
55 open(lout,file=fnameo,status=
'new',form=
'unformatted')
60 read(lin) glamn,glomn,dgla,dglo,nla,nlo,ikind
61 write(lout) glamn,glomn,dgla,dglo,nla,nlo,ikind
67 read(lin)(hrec(i),i=1,nlo)
71 write(lout)(hrec(i),i=1,nlo)
74 elseif(ikind.eq.1)
then 76 read(lin) (zrec(i),i=1,nlo)
80 write(lout)(zrec(i),i=1,nlo)
83 elseif(ikind.eq.-1)
then 85 read(lin) (srec(i),i=1,nlo)
89 write(lout)(srec(i),i=1,nlo)
92 elseif(ikind.eq.2)
then 94 read(lin) (srec(i),i=1,nlo)
98 write(lout)(srec(i),i=1,nlo)
program gsqr
Part of the NADCON5 NADCON5 Core Library , Squares values in a *.b grid.