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

[THREDDS #WDE-773911]: Fwd: Accessing NCAR FNL data via THREDDS server



Ashwin,

Unfortunately, this is expected behavior. GRIB files are just collections of 
GRIB messages, which are horizontal, 2D slices of the gridded model fields; the 
order of these messages within a file depends on the order in which they arrive 
from over the network. Also different fields within the GRIB output can be on 
different sets of time coordinates (such as different forecast periods), causes 
the need to have multiple time dimensions within the GRIB dataset. Combined, 
this leads to multiple, arbitrary time coordinate variables. Thus, depending on 
where the first message for a certain field is within the file results in a the 
different numbered time field.

There is a solution, though. Every variable has an attribute called 
"coordinates" that lists the names of all the coordinate variables that pertain 
for a given variable. For instance, if I look at the "Temperature_isobaric" 
variable on the dataset you linked, I see:

    coordinates: reftime time isobaric3 lat lon 

So (today at least), the relevant coordinate information would be contained in 
the "time" variable. So to insulate your code against the changes to this name, 
instead of hard-coding the name of the time variable, you need to pull it out 
of the coordinates attribute.

If you're using Python, there's an example of how we handle that in this 
Jupyter notebook: 
https://github.com/Unidata/notebook-gallery/blob/master/notebooks/500mb_Vorticity_Advection.ipynb

I hope this helps,

Ryan

> http://rda.ucar.edu/thredds/dodsC/aggregations/g/ds084.1/1/TP.html
> 
> On Thu, Oct 6, 2016 at 5:31 PM, ashwinD12 . <address@hidden> wrote:
> 
> > You can see the bug for yourself - today the GFS OPeNDAP page shows time
> > as the coordinate variable of Temperature_Isobaric. Yesterday it was
> > showing  time3. So when you have scripts that use time3 they get broken.
> >



Ticket Details
===================
Ticket ID: WDE-773911
Department: Support THREDDS
Priority: Normal
Status: Closed
===================
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.