Conversation
Fix issue with >=4 / <=4 comparison by using >3 / <5 since values are integers.
|
The documentation of the VerticalHeightGreaterThanGrid and VerticalHeightLessThanGrid is unclear about the last argument (Nth). The explanation is the same for Nth = 0 or Nth = 1. https://github.com/fmidev/himan/blob/master/doc/plugin-hitool.md If the Nth = 1 means that we try to find level where the parameter is bigger than threshold, and
|
|
Okay, that's an error in the documentation. It was just copypasted I assume. 0 means last level and 1 means first. The problem is that our method only implements > operator but not >= operator. And since the parameter is an index type containing natural numbers we don't catch the 4 since that is >= 4 but not > 4. So in this case we use > 3 to get >= 4. Documentation should be fixed for this. |
|
Okay, now i understand that the functions work like this:
This finds the first height where icing parameter is > 3, limits search between levels [zerodata, pFL300data]
This finds the first height where icing parameter is < 5 , limits search between levels [basedata, pFL300data] But if we want to accept icing parameter 4, 5, 6, 7, 8 and 9 should we change this -> local topdata = hitool:VerticalHeightGreaterThanGrid(IceParam, basedata, pFL300data, thresholddata=3, 0) So it would fine the last height where icing parameter is > 3? |
|
In principle yes. There could be multiple layers of icing and we wanted to catch the top of the layer starting from base. If we have a single icing layer then the two ways should provide the same result. |
Fix issue with >=4 / <=4 comparison by using >3 / <5 since values are integers.
https://jira.fmi.fi/browse/STU-29733