Cdo.rb - Use Ruby to access the power of CDO

This package contains the module Cdo, which implements a ruby style access to the Climate Data operators CDO. CDO is a command line tool for processing gridded data. Its main focus if climate data, but it can by used for other purposes to. It accepts input formats GRIB1, GRIB2, NetCDF and several Fortran binary formats.

Installation

Gem Installation

Download and installCdo with the following:

gem install cdo

Requirements

Cdo.rb requires a working CDO binary, but has not special requirement to Ruby

Usage

Run operators

  • File information

    Cdo.infov(:in => ifile)
    Cdo.showlevels(:in => ifile)
    
  • Operators with regular output files

    Cdo.timmin(:in => ifile,:out => ofile)
    
  • Operators with options

    Cdo.remap([gridfile,weightfile],:in => ifile, :out => ofile)
    
  • Set global CDO options

    Cdo.copy(:in => ifile, :out => ofile,:options => "-f nc4")
    

More examples can be found in test/cdo-examples.rb.

Tempfile helpers

Cdo.rb includes a simple tempfile wrapperm, which make live easier, when write your own scripts with Cdo.rb,m

Support, Issues, Bugs, …

Please use the forum or ticket system of CDOs official web page: code.zmaw.de/projects/cdo

License

Cdo.rb makes use of the GPLv2D License, see COPYING


Other stuff

Author

Ralf Mueller <[email protected]>

Requires

CDO version 1.5.x

License

Copyright 2011 by Ralf Mueller Released under GPLv2 license. See the COPYING file included in the distribution.