help

Jon Hubertz hubertz at EARTHLINK.NET
Wed Nov 8 09:09:56 EST 2006


two dimensional aray being replaced by one dimensional ?

----- Original Message -----
From: "Omar Müller" <ovmuller at FICH.UNL.EDU.AR>
To: <GRADSUSR at LIST.CINECA.IT>
Sent: Wednesday, November 08, 2006 8:15 AM
Subject: help


>I prove the next code for create binary data files
>
>
> program crea_dat
>
>        real dum(2,3)
>        parameter (ni=1,nj=1,nk=1,nt=1)
>        OPEN(8,FILE='bin.dat',status='replace',FORM='UNFORMATTED')
>        OPEN(7,FILE='data.dat',STATUS='OLD')
>        do t=1,nt !temp
>          do v=1,nv !var
>            do n=1,nk !level
>                do i=1,2 !long
>                        do j=1,3 !lat
>                                read(7,*,END=150)d
> 150                             dum(i,j)=d
>                        end do
>                end do
>                write(8)dum
>            end do
>          end do
>        end do
>        CLOSE(8)
>        CLOSE(7)
> end
>
> where data.dat is:
> 1
> 2
> 3
> 1
> 2
> 3
>
> but I obtain in GRADS:
> 0 1 1 2 2 3 when I use d command in gxout print.
> Where is the error?
> Plese help me, I'm from Argentina.



More information about the gradsusr mailing list