Open painter1 opened 8 years ago
I was half-wrong when I added this issue. There is a provision for units in default_levels.py. But it's hardly ever used. Units should be stated in every variable, not just a handful.
@painter1 this is mainly a straight port from the original AMWG NCL code... It will definitely be all gone when switching to CDP
@zshaheen do not forget about this, most of this code needs to be somehow translated into the paramater files.
@doutriaux1 Okay, I'll make sure to note this.
I discovered today that frontend/options.py sets contour levels drawn from graphics/default_levels.py. They don't have units attached! This is wrong. At the point where this happens, it is impossible to know the units of the data which will be plotted. If the contour levels turn out to be right for the variable plotted, that will only be by luck. We're lucky most of the time, because most of the time our variables are in the data with conventional units, and whoever set the default contours got them in the same conventional units. But sometimes we compute the variables, and then sometimes we're not lucky. Judging by the data it's almost impossible to be lucky every time - in default_levels.py I see numbers which make sense in Kelvin for one temperature, TREFHT; and in Celsius for another temperature, SST.