Re: [netcdf-java] netcdf-java 4.2 on netcdf-4 data

John,

I have been looking at Ying's data this evening, and I'm a bit
confused about the metadata that are reported for the variables.

I had been looking at a different file, one downloaded to disk.
but same source and same problem.

The Variable.toString() and VariableDS.toStringDebug() methods
report for an example variable PS that there are attributes:

   float PS(time=1, lat=721, lon=1152);
     :long_name = "surface_pressure";
     :units = "Pa";
     :fmissing_value = 9.9999999E14f; // float
     :standard_name = "surface_pressure";
     :vmin = 9.9999999E14f; // float
     :vmax = 9.9999999E14f; // float
     :_CoordinateAxisType = "Pressure";

Calling Variable.getAttributes() reports the same list of attributes
and no others.

Since "fmissing_value", "vmin" and "vmax" are not recognized
attributes, I figured they would be ignored and the data would
be plotted. Instead, blank plot.

Then I took look at what ncdump had to say about the same variable
and it reported:

        float PS(time, lat, lon) ;
                PS:long_name = "surface_pressure" ;
                PS:units = "Pa" ;
                PS:_FillValue = 1.e+15f ;
                PS:missing_value = 1.e+15f ;
                PS:fmissing_value = 1.e+15f ;
                PS:scale_factor = 1.f ;
                PS:add_offset = 0.f ;
                PS:standard_name = "surface_pressure" ;
                PS:vmin = 1.e+15f ;
                PS:vmax = 1.e+15f ;
                PS:valid_range = 1.e+15f, 1.e+15f ;

And this left me completely mystified. Where did the other attributes
come from, and how is that NJ seems to be using them without reporting
their existence? Anything you can do to clear the fog would be appreciated.

rbs





On Oct 28, 2010, at 20:14, Ying at NCCS wrote:

> John,
> 
>  Thank you!  This data was produced by NASA GMAO at GSFC.  I will contact
> them to find out the reason to have this range
> 
> valid_range = 9.9999999E14f, 9.9999999E14f; // float   --- which does not
> seem to make sense at all
> 
> it is funny though, Ferret is a lot more liberal (maybe GrADS as well) to
> put up with this.
> 
> 
> On Thu, Oct 28, 2010 at 7:35 PM, John Caron <caron@xxxxxxxxxxxxxxxx> wrote:
> 
>>  On 10/28/2010 4:17 PM, Ying at NCCS wrote:
>> 
>> Hi John,
>> 
>>  I run into this problem using netcdf-java toolsUI to open either local
>> netcdf-4 file or via opendap, here is an example link
>> 
>> 
>> http://esg.nccs.nasa.gov/thredds/catalog/ying/readonly/catalog.html?dataset=ying/readonly/e562p1_fp.inst3_3d_asm_Nv.20100907_00z%2B20100909_1200z.nc4
>> 
>> it just shows all -Infinity on the color-bar.
>> 
>> I was first having trouble to use NASA GISS Panoply (which uses
>> netcdf-java),  then I tried this recent version of netcdf-java 42. ToolsUI
>> (downloaded from UNIDATA)  --- it can read netcdf-4 file (the above link)
>> but it shows same max and min values of each variable.  As a result, it just
>> gives a blank plot.
>> 
>> Then I tried toolsUI-4.2.jar  and it shows the same problem.
>> 
>> 
>> ftp://ftp.unidata.ucar.edu/pub/netcdf-java/v4.2/toolsUI-4.2.jar
>> 
>> 
>> by the way, I can use Ferret (most recent version) to open this netCDF-4
>> file and makes right plots.
>> 
>> 
>> 
>> _______________________________________________
>> netcdf-java mailing listnetcdf-java@xxxxxxxxxxxxxxxx
>> For list information or to unsubscribe, visit: 
>> http://www.unidata.ucar.edu/mailing_lists/
>> 
>> 
>> Hi Ying:
>> 
>> that file has this attribute on the data variables:
>> 
>>     :
>> this is a mistake, it says that there are no valid values. if it can be
>> removed from the file, it will work. can you contact the file author to have
>> it removed?
>> 
>> looking at a random variable:
>> 
>>   float SLP(time=1, lat=721, lon=1152);
>>     :_CoordinateAxes = "time lat lon ";
>>     :long_name = "sea_level_pressure";
>>     :units = "Pa";
>>     :_FillValue = 9.9999999E14f; // float
>>     :missing_value = 9.9999999E14f; // float
>>     :fmissing_value = 9.9999999E14f; // float
>>     :scale_factor = 1.0f; // float
>>     :add_offset = 0.0f; // float
>>     :standard_name = "sea_level_pressure";
>>     :vmin = 9.9999999E14f; // float
>>     :vmax = 9.9999999E14f; // float
>>     :valid_range = 9.9999999E14f, 9.9999999E14f; // float
>> 
>> i would say that it would be better to have:
>> 
>>   float SLP(time=1, lat=721, lon=1152);
>>     :long_name = "sea_level_pressure";
>>     :units = "Pa";
>>     :_FillValue = 9.9999999E14f; // float
>>     :fmissing_value = 9.9999999E14f; // float
>>     :standard_name = "sea_level_pressure";
>>     :vmin = 9.9999999E14f; // float
>>     :vmax = 9.9999999E14f; // float
>> 
>> John
>> 
>> 
>> _______________________________________________
>> 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/

--
Robert B. Schmunk, Robert.B.Schmunk@xxxxxxxx
NASA Goddard Institute for Space Studies, 2880 Broadway, New York, NY 10025




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