33 implicit double precision(a-h,o-z)
37 equivalence(hrec(1),zrec(1))
42 write(6,*)
'program decimate' 45 2
format(
'Enter input file: ',$)
48 open(lin,file=fname,status=
'old',form=
'unformatted')
51 3
format(
'Enter output file: ',$)
53 open(lout,file=fname,status=
'new',form=
'unformatted')
56 4
format(
'Extract every 1 of "n" points in lat: ',$)
61 5
format(
'Extract every 1 of "n" points in lon: ',$)
65 read(lin) glamn,glomn,dgla,dglo,nla,nlo,ikind
71 write(6,*) dgla,
' --> ',dgla2
72 write(6,*) dglo,
' --> ',dglo2
73 write(6,*) nla,
' --> ', nla2
74 write(6,*) nlo,
' --> ', nlo2
76 write(lout) glamn,glomn,dgla2,dglo2,nla2,nlo2,ikind
81 call inouti(lin,lout,nlo,nlo2,nx,hrec)
83 call inoutr(lin,lout,nlo,nlo2,nx,zrec)
87 100
if(ila.lt.nla2)
then 90 10
read(lin) (hrec(j),j=1,nlo)
91 call inouti(lin,lout,nlo,nlo2,nx,hrec)
94 20
read(lin) (zrec(j),j=1,nlo)
95 call inoutr(lin,lout,nlo,nlo2,nx,zrec)
103 subroutine inouti(lin,lout,nlo,nlo2,nx,hrec)
107 implicit double precision(a-h,o-z)
110 read(lin) (hrec(i),i=1,nlo)
111 write(lout) (hrec(nx*i+1),i=0,nlo2-1)
115 subroutine inoutr(lin,lout,nlo,nlo2,nx,zrec)
119 implicit double precision(a-h,o-z)
122 read(lin) (zrec(i),i=1,nlo)
123 write(lout) (zrec(nx*i+1),i=0,nlo2-1)
subroutine inoutr(lin, lout, nlo, nlo2, nx, zrec)
subroutine inouti(lin, lout, nlo, nlo2, nx, hrec)
program decimate
Part of the NADCON5 NADCON5 Core Library , Extract a reduced (1 of n) dataset.