Re: [netcdf-java] scalefactors from grib-files in NetCDF for Java 4.6.3

Robert,

why do you want these scale factors? The purpose of the readers is to apply these scale factors to the data and present the scaled data via the CDM API just as is done for a NetCDF file. No further scaling should be required.

If I needed to get these raw scale factors I would instantiate a new ucar.unidata.io.RandomAccessFile and use it to create a Grib1Record/Grib2Record and get the scale factors from that object. I do not think it is possible to get this information via the CDM API.

Kind regards,
Ben.

On 25/04/16 19:08, Robert Leander wrote:
Sirs, madams,



Not being certain whether or not I sent my question to this list already, I 
humbly apologize if this was the case.

My question concerns the following.



Currently, I am using the netcdf 4.6.3 java library to read data from grib1 and grib2 
files. I was able to open the file, which gives me at a certain point a 
"VariableDS" object. This object 'knows' its data came from a grib1 file. Now I 
am trying to get the decimalScalefactor of the original gribdata through the 
getBinaryDataInfo of the grib1Record class, but for this I need a grib1Record. How can I 
search this record in my dataset or is there another way to get to the decimal- and 
binaryScalefactor ? I have searched the manual and javadocs, but hitherto failed to find 
a solution. If anyone could point me in the right direction, I would greatly appreciate 
that.



Thx for your answer!




Robert Leander

E

robert.leander@xxxxxxxxxxx




[Logo]<http://www.deltares.com/>

  www.deltares.com<http://www.deltares.com/>

Postbus 177
2600 MH Delft

[Deltares Twitter]
<http://www.twitter.com/deltares>

[Deltares LinkedIn]<http://www.linkedin.com/company/217430>

[Deltares Facebook]<https://www.facebook.com/pages/Deltares/154189334634001>



[Think before printing]Please consider the environment before printing this 
email
DISCLAIMER: This message is intended exclusively for the addressee(s) and may 
contain confidential and privileged information. If you are not the intended 
recipient please notify the sender immediately and destroy this message. 
Unauthorized use, disclosure or copying of this message is strictly prohibited. 
The foundation 'Stichting Deltares', which has its seat at Delft, The 
Netherlands, Commercial Registration Number 41146461, is not liable in any way 
whatsoever for consequences and/or damages resulting from the improper, 
incomplete and untimely dispatch, receipt and/or content of this e-mail .



_______________________________________________
netcdf-java mailing list
netcdf-java@xxxxxxxxxxxxxxxx
For list information or to unsubscribe, visit: 
http://www.unidata.ucar.edu/mailing_lists/


--
Ben Caradoc-Davies <ben@xxxxxxxxxxxx>
Director
Transient Software Limited <http://transient.nz/>
New Zealand



  • 2016 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdf-java archives: