def str2uint(str)
return nil until str
return str.unpack("H*")[0].hex
end
def str2int(str)
return nil if str.length==0
ary = str.unpack("H*")
top = ary[0]
fact = 1
if top[0,1]>"7"
ary[0][0] = (top[0,1].hex-8).to_s
fact = -1
end
return ary.join("").hex*fact
end
Grib.new(filename, mode="r")make a new Grib object.
ARGUMENTS
Grib.open(filename)open a Grib file.
Grib.create(filename)create a Grib file.
Grib.is_aGrib?(filename)return true when file is a Grib dataset
close
parse
path
var_names
var( name )
def_var( name )
enddef
write
new( vat, name, length )
var
length
name
typecode
get
[indices]
put_att(key,val)
set_att(key,val)
att(key)
att_names
inspect
new( file, name, obj, dims )
file
name
rank
total
set_var
set_miss
dim_names
dim( index )
ndims
def_dim(name,index)
put_att( key, value )
set_att( key, value )
att( key )
att_names
shape
typecode
get( indics )
[ indics ]
inspect
if pds1.time_range!=pds2.time_range
warn("time range is not same: #{pds1.time_range} != #{pds2.time_range}")
return true
end