help

José Antonio Aravéquia araveq at GMAIL.COM
Thu Nov 9 08:58:42 EST 2006


Omar,

The result in GrADS is the same as when I run the program.

See my output is :

$ crea_dat.exe
  1.  1.  2.  2.  3.  3.


$ gradsc -l

Grid Analysis and Display System (GrADS) Version 1.8SL11
Copyright (c) 1988-2001 by Brian Doty
Center for Ocean-Land-Atmosphere Studies
Institute for Global Environment and Society
All Rights Reserved

Config: v1.8SL11 32-bit little-endian readline printim

Issue 'q config' command for more information.

GX Package Initialization: Size = 11 8.5
ga-> open bin.ctl
Scanning description file:  bin.ctl
Data file bin.dat is open as file 1
LON set to 0 2.5
LAT set to -50.2 -45.2
LEV set to 1000 1000
Time values set: 2000:1:1:0 2000:1:1:0
ga-> set gxout print
ga-> d val
Printing Grid -- 6 Values -- Undef = 1e+20
1 1 2 2 3 3
ga->
-----------------------------------------------------------------------------
2006/11/9, Omar Müller <ovmuller at fich.unl.edu.ar>:
>
> Aravequia,
>
> If you run the code and then in Grads:
> open bin.ctl
> set gxout print
> d val
> You can confirm that the output is:
> 0 1 1 2 2 3
>
> Omar.
>
>
>
> On Wednesday 08 November 2006 13:32, José Antonio Aravéquia wrote:
> > Omar,
> >
> > I noted that you didn't define nv parameter in your program.
> >
> > I did a test with the attached ctl and fortran code and it works well.
> >
> > I hope it helps.
> >
> > Aravequia
> >
> > 2006/11/8, Omar Müller <ovmuller at fich.unl.edu.ar>:
> > > The problem is the 0 value, but I can't resolve them, when I have the
> > > data:
> > > 1
> > > 2
> > > 3
> > > 1
> > > 2
> > > 3
> > > I hope 1 1 2 2 3 3 in GRADS
> > > but I obtain with options sequential
> > > 0 1 1 2 2 3 3
> > > and without options sequential
> > > 3.36312e-44 0 1 1 2 2
> > > Omar.
> > >
> > > > Omar,
> > > >
> > > > My best guess is that you forgot to include "options sequential" in
> > > > your descriptor file.  That could account for the leading 0 in your
> > > > output.
> > > >
> > > > If the remaining points are not in the order you expect, remember
> that
> > > > grads loops through longitude first.
> > > >
> > > >     Diane
> > > >
> > > > Omar Müller wrote:
> > > > > 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.
> > > >
> > > > --
> > > > Diane Stokes
> > > > Environmental Modeling Center
> > > > National Weather Service/NOAA
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20061109/0a314391/attachment.html 


More information about the gradsusr mailing list