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

[netCDFJava #MOX-967044]: CPC GridDataset grids empty



Greetings!

The issue is that the coordinate system associated with the "prec" variable
is not fully recognized. The dataset almost follows the CF conventions, but
not quite. The big issue here is that the variable L, whose unit is simply
month, is not understood. If its value is combined with the the time variable
S, then you would have months (L) since some reference time (S). However, 
combining those two time coordinates like that is not  part of any convention
that I know of, and isn't supported by netCDF-Java out of the box.

If you'd like to access this data as a GridDatasets, I can think of two options.

The first option would be to rewrite the file and update the variable L to have 
two
dimensions (S, L), and update the values to use a consistent reference date.

That would basically look something like the GFS Ensemble dataset we expose 
through our THREDDS Data Server:

https://thredds.ucar.edu/thredds/catalog/grib/NCEP/GEFS/Global_1p0deg_Ensemble/members/catalog.html?dataset=grib/NCEP/GEFS/Global_1p0deg_Ensemble/members/TwoD

As an example, check out the description of the dataset (sort of like ncdump 
output):

https://thredds.ucar.edu/thredds/dodsC/grib/NCEP/GEFS/Global_1p0deg_Ensemble/members/TwoD.dds

and have a look at "Temperature_isobaric_ens", which has dimensions

[reftime = 123][time = 65][ens = 21][isobaric2 = 10][lat = 181][lon = 360]

The coordinate variable associated with the reftime dimension (analogous 
to your variable S) looks like:

reftime[reftime = 123];

has values like 0, 6, 12, ..., 732
and has a unit of "Hour since 2019-05-28T00:00:00Z"

The coordinate variable associated with the time dimension (analogous
to your L variable) is two dimensional and looks like

time[reftime = 123][time = 65];

has values like:
reftime = 0, {0.0, 6.0, 12.0,...,384.0},
reftime = 1, {6.0, 12.0, 18.0,..., 390.0},
reftime = 2, {12.0, 18.0, 24.0,..., 396.0},
...
reftime = 122, {732.0, 738.0, 744.0,..., 1116.0}

all with the same unit "Hour since 2019-05-28T00:00:00Z"

The second option would be to code up a CoordinateSystemBuilder to
load into netCDF-Java at runtime. The code would essentially look
for the varaibles S and L, and try to combine their information as the
dataset (without modifications) is read. You'd end up doing the same
sort of thing as above, but as the time the dataset is read off of
disk rather than rewriting the file.

Cheers,

Sean

> Hello,
> 
> 
> 
> I have a netcdf file from the CPC. The Netcdf Java API (v.5.0.0 beta 6) 
> correctly identifies as a GridDataset but the list of grids is empty. See 
> image below.
> 
> 
> 
> I've placed a copy of the file here:  Let me know if you'd like to use 
> another file transfer system.
> 

Ticket Details
===================
Ticket ID: MOX-967044
Department: Support netCDF Java
Priority: Normal
Status: Open
===================
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata 
inquiry tracking system and then made publicly available through the web.  If 
you do not want to have your interactions made available in this way, you must 
let us know in each email you send to us.



NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.