A ruby script to parse Grads CTL files

From: Saji N Hameed <saji_at_nyahnyahspammersnyahnyah>
Date: Mon, 11 Feb 2008 23:04:21 +0900

Dear NCL-ers,

Here is a ruby script that is "supposed to" parse a GrADs ctl file and
generate NCL code to read in the data and create a COARDS
compliant netcdf data object.

This is a preview version and some essential features may
not be implemented: for example currently there is only
support for linear grids (I will add support for gaussian
grids over the weekend or better if somebody chipped in
and added those code, that will be nice too). Meanwhile
I would appreciate feedback and reports on possible bugs/errors.

To use:
 -1. Hopefully you have ruby installed in your system

  0. untar the attached tar file ctl2ncl.tar, in somewhere like
      $HOME/bin

  1. point the $PATH variable to this location
     for example, PATH=$PATH:$HOME/bin ; export PATH
                        OR
                  set path=($HOME/bin $path)

  2. after sourcing your .cshrc or .bashrc,
                 run ctl2ncl.rb and follow the instructions

  3. the help screen is shown below:
Usage: ctl2ncl.rb [options]
A grads ctl parser and NCL script generator based on ruby
Specific options:
    -i, --infile=CTLFILE the grads ctl file
    -o, --outfile=NCLFILE the NCL script file
    -v, --vars *NUM The variables
        --plot add code to display figures

Common options:
        --help Show this message
        --version Show version

cheers,

saji
...

* David F Porter <PorterDF_at_Colorado.EDU> [2008-01-23 15:53:23 -0700]:

> Sorry if this has been covered, by I've exhausted the search function with
> no real results.
>
> I am looking to read in some large 4-Byte Float big-endian binary data onto
> my little-endian machine. The problem I am having is that each file
> corresponds to ONE time period, but each variable in the file has different
> dimensions, some 2D and some 3D. Because of the varying sizes, I feel that
> I cannot simply use the "record number". Also, I only want some of the
> variables (to save space after loading 300 of these files).
>
> I'm not sure if it matters at this point, but the variables are on a
> gaussian grid.
>
> Dave
>

-- 
Saji N. Hameed
APEC Climate Center          				+82 51 668 7470
National Pension Corporation Busan Building 12F         
Yeonsan 2-dong, Yeonje-gu, BUSAN 611705			saji_at_apcc21.net
KOREA


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

Received on Mon Feb 11 2008 - 07:04:21 MST

This archive was generated by hypermail 2.2.0 : Fri Feb 15 2008 - 17:17:57 MST