Open gerritholl opened 5 years ago
This is covered by:
So the implementation does appear to consider this, which means the warning must have been there before.
Actually, it rather seems to happen when the cloud top temperature is higher (warmer) than the centre pixel.
Example of an extreme case:
ipdb> p tcenter, tmargin
(256.846, [249.6363525390625, 253.1262664794922])
This would place the cloud top height at -1335 metre and -689 metre, which is why it gets set to nan:
And then np.nanmean([nan, nan])
gives the RuntimeWarning
.
Now why is the cloud top temperature here so warm?
So, in summary:
RuntimeWarning
in nanmean
In
fogpy.algorithms.LowCloudHeightAlgorithm.procedure
:https://github.com/gerritholl/fogpy/blob/2c9aa9436e4924f55879d52a9de14817d370df5a/fogpy/algorithms.py#L648-L651
When
zcenter==0
and(zneigh==0).all()
, this causeszmargin==[0.0, 0.0, 0.0]
,delta_z==0
, which means thatapply_lapse_rate
returnsnan
. Not sure what to do about it.This causes the
RuntimeWarning: Mean of empty slice
warning referred to in #9.