Unidata / thredds

THREDDS Data Server v4.6
https://www.unidata.ucar.edu/software/tds/v4.6/index.html
265 stars 179 forks source link

Extend grib variable map to create `standard_name` variable attributes #938

Open rsignell-usgs opened 7 years ago

rsignell-usgs commented 7 years ago

It would be great if the grib variable map could also generate standard_name attributes in addition to long_name attributes.

Currently none of the Unidata thredds forecast model data is discovered when searching by standard_name because these attributes don't exist except for coordinate variables.

An example is: http://thredds.ucar.edu/thredds/catalog/grib/NCEP/WW3/Global/catalog.html?dataset=grib/NCEP/WW3/Global/Best

where we have this variable:

Significant_height_of_combined_wind_waves_and_swell_surface
    long_name: Significant height of combined wind waves and swell @ Ground or water surface

and we would like this to become:

Significant_height_of_combined_wind_waves_and_swell_surface
    long_name: Significant height of combined wind waves and swell @ Ground or water surface
    standard_name: sea_surface_wave_significant_height

Trying to create this mapping for all variables would be a huge and likely impossible job, but I'm imagining this mapping could be maintained organicically, with folks making PRs to the mapping as needed to add just the variables they are interested in.

And of course if there was no standard_name in the mapping, it would just be missing, as it is now.

Anything we did would be an improvement since there are no standard_names now!

@lesserwhirls , what say ye?

lesserwhirls commented 7 years ago

I think this would be a good feature to have, for sure. Given the hell that is GRIB, however, I'm not sure at what level it would be best to implement this. Baking in the mapping into the TDS GRIB code could be too restrictive, as with GRIB flexibility is somewhat key (thanks to improper table management, over ridding WMO standard tables, etc.). We allow things somewhat similar to this to be done in the catalog using the <gribConfig> element. Perhaps we could set these standard_names using a config like this:

<gribConfig>
    <variable id="0-1-8" standard_name="temperature" someAttr="someVal" />
</gribConfig>
jthielen commented 6 years ago

Possibly relevant to https://github.com/Unidata/MetPy/issues/886.