Re: data format quesiton

From: Takeshi Enomoto <eno_at_nyahnyahspammersnyahnyah>
Date: Fri, 13 Jan 2006 10:03:01 +0900

Kate,

> [3] To my knowledge, there is no such thing as a "GrADS format". :-)
> (I think) "GrADS format" refers to a combination of a
> (a) binary file
> and a
> (b) descriptor (text) file that describes
> the contents and data ordering on the binary file.
> http://grads.iges.org/grads/gadoc/descriptorfile.html
> http://grads.iges.org/grads/gadoc/aboutgriddeddata.html
>
> Certainly, NCL can read/write the binary files given
> the information on the descriptor files.

NCL only supports ASCII data files and not very good at text processing.
You need to parse the .ctl file with your favourite tool
(sh, awk, perl, python, etc.).
You can invoke scripts from NCL with systemfunc() or
obtain parameter through environment variables
using ncl function getenv().

I used to write necessary information from .ctl by hand.
It was not efficient and even a pain.
So although not perfect, I have written awk scripts to handle
GrADS .ctl file.
My support will be limited but it gives you an idea
how to handle .ctl.

An alternative way to access GrADS files is through GDS,
GrADS Data Server using DODS enabled version of NCL
  (I do not have NCL/DODS).
Yet another way is to call subroutines of EzGet from PCMDI
from NCL (I have not tested).

Although I am pro-netcdf, there are may GrADS files,
it would be beneficial if NCL could read GrADS files
in the same manner as netcdf.

Rather than writing another GrADS parser,
GrADS source code could be used to parse .ctl.

-----
Dr Takeshi Enomoto
eno_at_jamstec.go.jp
Earth Simulator Center, JAMSTEC

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk

Received on Thu Jan 12 2006 - 18:03:01 MST

This archive was generated by hypermail 2.2.0 : Fri Jan 13 2006 - 08:36:05 MST