pytroll / fogpy

Satellite based fog and low stratus detection and nowcasting
http://fogpy.readthedocs.io/en/latest
GNU General Public License v3.0
20 stars 10 forks source link

lowwatercloud.optimize_cbh messes up fog base height? #28

Open gerritholl opened 5 years ago

gerritholl commented 5 years ago
>>> c = LowWaterCloud(2000., 275., 400., 100., 10e-6)
>>> c.init_cloud_layers(100, 50)
>>> c.get_fog_base_height()
125.0

Which is correct according to https://github.com/gerritholl/fogpy/blob/a66ddd5b625066e287399404a231e0272cfdfa28/fogpy/test/test_lowwatercloud.py#L320-L324

But then:

>>> c.optimize_cbh(c.cbh, method="brute")
1056.0
>>> c.get_fog_base_height()
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/home/gholl/checkouts/fogpy/fogpy/lowwatercloud.py", line 287, in get_fog_base_height
    self.fbh = min(fog_z)  # Get lowest heights with visibility treshold
ValueError: min() arg is an empty sequence
>>> c.optimize_cbh(c.cbh, method="basin")
1056.016515282201
>>> c.get_fog_base_height()
1061.0165152782138

What's going on here?

Related to #20.