ascii
Jennifer Adams
jma at COLA.IGES.ORG
Thu Feb 3 12:31:39 EST 2005
On Feb 3, 2005, at 12:07 PM, Mike Notaro wrote:
> Thanks Jean Pierre. I wrote a script containing the following
> to read a simple ascii formatted dataset:
>
> ret = read('/tmp/file.dat')
> date = subwrd(ret , 1)
> var1 = subwrd(ret , 2)
> var2 = subwrd(ret , 3)
>
> and when I tried "exec script.gs", I get an error
> that says "Define error: No file open yet. Exec error..."
>
> What am I doing wrong?
Mike,
GrADS can read ascii data into a script and create script variables,
but it doesn't read ascii data as GrADS data variables that you can
display and analyze. You'll have to write a C or Fortran program to
read your ascii data and rewrite it as a gridded binary file that you
can describe with a GrADS descriptor file.
> My other question is if it is possible to read a netcdf file containing
> variable(time), without lat or lon. I get the error regarding the
> absence of a discernable X coordinate.
You'll have to write a descriptor file to read this kind of netcdf
file. There are two types -- a simpler one to use with 'xdfopen'
command, or a complete descriptor with 'dtype netcdf' that is used with
the 'open' command. Take a look at the documentation:
http://grads.iges.org/grads/gadoc/gradcomdxdfopen.html
http://grads.iges.org/grads/gadoc/descriptorfile.html
Jennifer
--
Jennifer Miletta Adams
IGES/COLA
4041 Powder Mill Rd., Suite 302
Calverton, MD 20705
More information about the gradsusr
mailing list