Project

General

Profile

Ruby module for calling CDO

Added by Ralf Mueller almost 13 years ago

This is the first release of cdo.rb, a Ruby module to call CDO.

Installation

cdo.rb is released as a ruby gem, Ruby's own package format. Install cdo.rb with

gem install cdo

Documentation

Please have a look at the automatic documentation from rubygem: http://rubydoc.info/gems/cdo/frames

Examples

CDO's operators are implemented as module methods:

Cdo.info(:in => "input.nc")

Input and output stream arguments are handled special with hash keys :in and :out. Same is true for the other options of CDO like "-f" or "-P":

Cdo.topo(:out => "topography.grb")
Cdo.copy(:in => "topography.grb",:out => "topography.nc4",:options => "-f nc4")

Operator options can be set as standard method arguments:

Cdo.stdatm(0,10,20,50,100,200,500,1000,:out => "standard_atm.nc",:options => "-f nc")

More example can be found in the unit tests: source:trunk/cdo/contrib/ruby/test/test_cdo.rb.


Comments