Re: [idvusers] observation file does not open in IDV

Hello Hein,

There are a couple of issues at play here:

1. You need to specify conventions for your NetCDF files (see https://www.unidata.ucar.edu/software/netcdf/docs/BestPractices.html#Conventions). We recommend "CF-1.6". This is the reason that IDV fails to recognize test_small.nc as a point dataset. We have a set of default conventions that were successfully applied to original.nc, but really, explicit conventions should be specified for that one as well.

2. In small_test.nc, you declare "valid_range = -90.0, 90.0" for Lat. However, NetCDF-Java performs range-checking against the *packed* values of Lat (see https://www.unidata.ucar.edu/software/netcdf/docs/BestPractices.html#Packed%20Data%20Values). As a result, all latitudes fall outside of the valid range and NJ considers them missing. This, in turn, causes NJ to report that the dataset contains no observations. The Lon variable is similarly affected.

The easiest way to solve these issues is:
a) Add a ":Conventions = "1.6"" global attribute.
b) Remove the "Lat:valid_range" attribute.
c) Remove the "Lon:valid_range" attribute.

Attached is an NcML document that implements these changes. To use it, open it in a text editor and change the /netcdf/@location attribute to the location of test_small.nc on your computer. Save, and then open the NcML file in IDV as you would any normal NetCDF file.

Cheers,
Christian Ward-Garrison

<?xml version="1.0" encoding="UTF-8"?>
<netcdf xmlns="http://www.unidata.ucar.edu/namespaces/netcdf/ncml-2.2"; 
location="C:/Users/cwardgar/Desktop/test_small.nc">
  <attribute name="Conventions" value="CF-1.6" />
  
  <variable name="Lat">
    <remove type="attribute" name="valid_range"/>
  </variable>
  <variable name="Lon">
    <remove type="attribute" name="valid_range"/>
  </variable>
</netcdf>
  • 2014 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the idvusers archives: