Re: A ruby script to parse Grads CTL files

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Tue, 12 Feb 2008 15:19:26 -0700 (MST)

Hi Saji,

Thanks for this contribution! We would like to put this in the NCL
Applications page section, if you are agreeable. We could start a
separate Ruby or GrADS page, or we can add it to an existing file I/O
page.

We encourage other users who have things they'd like to contribute to
let us know (via ncl-talk if possible). We are happy to include them
and give you proper credit, of course.

--Mary

On Mon, 11 Feb 2008, Saji N Hameed wrote:

> 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 Tue Feb 12 2008 - 15:19:26 MST

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