Hi John and Lansing,
thank you for your replies, much appreciated. Indeed when I looked into the
file I saw some jpeg2000 strings and the huge compression ration makes me think
it is somehow a lossy compression (scaled/offset before sending to the
compressor). I tried bzip2 and it does compress pretty well on the uv data, I
get it down to ~540k compared to the original 400k of the grib file, this is
acceptable.
Regards,
Toni
________________________________
From: John Caron <caron@xxxxxxxxxxxxxxxx>
To: netcdf-java@xxxxxxxxxxxxxxxx
Sent: Thursday, February 28, 2013 10:32 PM
Subject: Re: [netcdf-java] uv component data compression
Hi antonio:
Most grib data from ncep is scaled/offset to an integer and then jpeg000
wavelet compressed. CDM can read but not write this format.
Your best bet is to get the floating point out of the CDM, subset just
what you need, and compress it when sending to your client. Standard
would be to decide how many bits of accuracy you need and convert to
integers with that precision, then bzip2 or deflate.
John
On 1/30/2013 12:43 PM, Antonio Bleile wrote:
> Hi,
>
> I am currently trying to read the uv height over ground data of the GFS
> model, e.g. "gfs.t00z.master.grbf00.10m.uv.grib2". The file's size is
> roughly 400k. When I decompress the uv float arrays and save them as
> zipped files I get roughly a file of 1MB (uncompressed 2MB). I suspect
> the compressed grib data is somehow stored as 2 byte float perhaps? As
> I'm very unfamiliar with the netcdf library I'd like to learn more about
> how the data is compressed and decompressed within the grib file. The
> motivation of all this is that I'd like to display the UV data on an
> android device (which has insufficient resources to run netcdf library!)
> so I need to convert the grib compressed data into something more simple
> but yet efficiently compressed! I'd appreciate any pointers to the right
> documentation or any hints on how the uv data is compressed....
>
> Regards,
>
> Antonio
>
>
>
> _______________________________________________
> netcdf-java mailing list
> netcdf-java@xxxxxxxxxxxxxxxx
> For list information or to unsubscribe, visit:
> http://www.unidata.ucar.edu/mailing_lists/
>
_______________________________________________
netcdf-java mailing list
netcdf-java@xxxxxxxxxxxxxxxx
For list information or to unsubscribe, visit:
http://www.unidata.ucar.edu/mailing_lists/