[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDFDecoders #XQQ-392235]: can't read data from a grib



Hiya,

it seems you modified the Grib1dump program to extract the data, i 
use the Grib1GetData program to extract the data. First you have to 
run the Grib1Indexer to get some parameters. I used the grib file included with 
the message.

% java -Xmx256m ucar/grib/grib1/Grib1Indexer TestGrib.grib1 

index_version = 6.0
grid_edition = 1
location = TestGrib.grib1
length = 132
created = 2008-03-12T19:18:41Z
center = 98
sub_center = 0
table_version = 128
tiles = 1
thin = false
ensemble = false
--------------------------------------------------------------------
0 0 -1 129 130 1 0.0 255 0.0 2008-02-06T12:00:00Z 0 113293842 60 132 
0 false 98 0 128
--------------------------------------------------------------------
GDSkey = 113293842
grid_type = 0
grid_name = Latitude/Longitude Grid
grid_shape_code = 0
grid_shape = spherical
grid_radius_spherical_earth = 6367.47
Nx = 16
La1 = 60.0
Lo1 = 0.0
ResCompFlag = 128
Winds = Relative
La2 = 0.0
Lo2 = 30.0
Dx = 2.0
Dy = 2.0
ScanningMode = 0

Look in the root of distribution for file IndexFormat.txt, it explains the 
index format in detail.

Then i used the Grib1GetData to extract the data:

% java -Xmx256m ucar/grib/grib1/Grib1GetData TestGrib.grib1 60 0 false | m

the 60 0 false parameters come from the index;

getting data size 12 took 8 msec
data[ 0 ]=0.0
data[ 1 ]=1.0
data[ 2 ]=2.0
data[ 3 ]=3.0
data[ 4 ]=4.0
data[ 5 ]=4.0
data[ 6 ]=4.0
data[ 7 ]=4.0
data[ 8 ]=4.0
data[ 9 ]=4.0
data[ 10 ]=4.0
data[ 11 ]=4.0


Robb...

Ticket Details
===================
Ticket ID: XQQ-392235
Department: Support netCDF Decoders
Priority: Normal
Status: Open