by T Horinouchi
a GrADS_Gridded object corresponds to a GrADS control file, through which the users can also access its binary data file(s).
Partial support of possible units of the time increment: mn (minutes), hr (hours) and dy (days) are supported, but mo (month) and yr (year) is not.
(Developer's memo): Time is stored as Julian day and is handled with the Date standard library. Thus, it's not difficult to support the unsupported units. However, it would be tricky to support the 365_day_calendar option.
GrADS_Gridded.new(ctlfilename, mode="r")
same as GrADS_Gridded.open
GrADS_Gridded.open(ctlfilename, mode="r")
make a new GrADS_Gridded object.
ARGUMENTS
REMARK
to_ctl
returns the contents of the corresponding control file as a String.
REMARK
get(name, level, time)
reads the binary data and returns as a NArray.
ARGUMENTS
varnames
Returns names of the variable in the GrADS file as an Array in the order placed.
dimensions
Returns info on the four dimensions.
RETURN VALUE
an Array of 4 elements: dimension[0] for x, dimension[1] for y, dimension[2] for z, and dimension[3] for t. Each of them is a Hash like the following:
{:name=>"x", :len=>132, :flag=>"LINEAR", :spec=>"-0.7500 1.5000", :start=>-0.75, :increment=>1.5, :description=>"longitude", :units=>"degrees_east"}
Here, :len, :flag, and :spec are directly from the control file, while others are derived properties for internal use.
WARNING
ctlfilename
path of the control file
title
title=
get/set the title
undef
undef=
get/set the undef value
dset
dset=
get/set the dset string