Closed SallyDa closed 5 years ago
I like the approach, but I have two comments/questions.
konrad.utils.derive_pressure()
?Yes it would be possible to do that, of course. I had a quick look through and I'm not sure where else we would use it, which is why I didn't do it as a general use function originally.
If we do 1., then for sure it would be better to return values for all the levels / half levels. For the lapse rate, we use it to calculate the new temperature profile on full levels, as the surface temperature plus the sum (integral) of the half level lapse rate values multiplied by distance between the full levels. Can you picture that? Then, we don't need the uppermost half level lapse rate value, because there is no full level above that.
Okay, then I will merge as is. If we find that we need a similar function somewhere else, we can always move it then :)
Use the log of the pressure, so that the interpolation is approx linear with height.