Closed BaptisteVandecrux closed 2 months ago
Unit for specific humidity should be kg/kg (according to Fausto et al. 2021) not %
Last, rh_u
and rh_l
as mesaured with regard to water by the instrument should be limited to 0-100.
It is only when converting these values to RH with regard to ice that supersaturation and values above 100 can occur.
In these lines:
https://github.com/GEUS-Glaciology-and-Climate/pypromice/blob/a7997ef0b7f347ed7649cdd37edad1f6f7eade2c/src/pypromice/process/value_clipping.py#L36-L42
there was an attempt to replace values
<lo
bylo
and>hi
byhi
.First of all values outside of this functional range indicate at a sensor malfunction and should be replaced by
NaN
, not by one of the two limit values.Second, because this function is called in
L0toL1
,rh_u_cor
had not been calculated and was full of NaN, then replaced by zeroes in l.36-37 and not switched back to NaN if there are indeadrh_u
values for that period. I don't know if those zeroes have implications later on (sincerh_u_cor
is calculated at a later point) but anyway it was not ideal to have them there, even temporarily.So I'll remove the exception for
rh_u_cor
/rh_l_cor
and have for all variables: https://github.com/GEUS-Glaciology-and-Climate/pypromice/blob/a7997ef0b7f347ed7649cdd37edad1f6f7eade2c/src/pypromice/process/value_clipping.py#L45-L48