-
Notifications
You must be signed in to change notification settings - Fork 179
Bad units on geopotential height #616
Comments
It's "geopotential meter". See the bottom of the first page e.g. http://www.ofcm.gov/fmh3/pdf/12-app-d.pdf Or page 201 of Miller's "Applied Thermodynamics for Meteorologists", https://books.google.com/books?id=mbwsCQAAQBAJ&pg=PA201&lpg=PA201 |
The problem is that a unit of |
Just to make the connection between relevant issues, this has been causing problems in MetPy recently: Unidata/MetPy#907. Would it be worth it resolving it here? |
In this case, the A little background... When the netCDF-Java library reads in GRIB messages, they are translated into to the Common Data Model (CDM) for representation within netCDF-Java. Whatever a GRIB table uses as "unit" is stuffed into the unit attribute of a given variable. Gory detail time (here for anyone who might care) To be specific, for GRIB-2 messages from NCEP (as an example), the code does the following:
For NCEP, the parameter table is actually an HTML page that we scrape and turn into something easily read by the code. From what I can tell and have been able to gather, these tables are hand maintained and completely separate from the numerical model code and post-processing routines used to generate the GRIB messages. If the code updates and starts generating values in a different unit, someone would need to update the associated "table" (in this case, the html page online) so that the rest of the world knows about it. Sometimes the HTML will change for minor typo reasons (something didn't get capitalized to someones liking), or maybe the listed unit will get updated (change 'percent' to % because it looks prettier on the web?). However, as far as the GRIB message sitting in a GRIB file on disk is concerned, none of that matters because all that's encode in the actual file are those octets (unlike, say, netCDF). For sure a message might indicate 0-1-0, and the table says "Specific Humidity, kg kg-1", but you never really know with certainty. Also, not all GRIB tables include helpful information like units - sometimes, that's institutional knowledge, and you're lucky to get a 4 character short name associated with the three octets. TLDR or you just want to keep things PG (no gore): From a generic standpoint, nothing is wrong so far, other than the fact that someone could list Is that useful? Maybe? One option to make the situation a little better is to update the netCDF-Java GRIB code to do the following:
My only reservation with this approach is that we are applying limitations from the CF conventions as to what a unit is, rather than the more generic guidelines provided by the Best Practices outlined in the netCDF Users Guide. That said, we try to follow CF as best we can when generating netCDF files for return by the TDS, or in how we expose datasets through the CDM and various services in the TDS, so it's probably ok to do it again. One downside - some things that have a A second option? Also, not 100% sure, but there is probably something in here that describes how we are overloading the term |
@lesserwhirls Thank you for the in-depth explanation...it makes more sense why things are the way they are now, and also why it doesn't look like there can be an "easy" solution here. Also, thanks for the NIST reference...I think here are the relevant sections:
|
What are your thoughts on the creation of a new |
@lesserwhirls We already have
So, how about |
In general, I like the idea of a new, separate attribute because it allows the But, I also share the concern about breaking compatibility for code that relies on the current contents of Also, |
👍 to While I'm sensitive to the change breaking people, my argument would be:
|
See #1130 |
At least on 0.25 degree GFS (http://thredds.ucar.edu/thredds/dodsC/grib/NCEP/GFS/Global_0p25deg/Best.html) the units on Geopotential_height_surface and Geopotential_height_isobaric are listed as 'gpm'. There are so many questions that this raises, among them:
sigh I don't even...
The text was updated successfully, but these errors were encountered: