wind-python / windpowerlib

The windpowerlib is a library to model the output of wind turbines and farms.
https://oemof.org/
MIT License
332 stars 105 forks source link

logging.info messag should be an error #69

Closed uvchik closed 4 years ago

uvchik commented 5 years ago

In the wind_farm module line 399ff a logging message is shown if the wake_loss model 'wind_farm_efficiency' is chosen but no efficiency is given.

In my opinion an exception should be raised because the efficiency is mandatory to calculate the wake_losses. I think it is error prone to ignore it and to just show a logging info message.

birgits commented 5 years ago

@uvchik I agree. I am not sure though if there is a reason why @SabineHaas implemented it like that. Do you think we can wait until her return or do you necessarily want it in the v0.2.0 release?

uvchik commented 5 years ago

I think it is okay for v0.2.1 if we manage to release the v0.2.0 soon :smirk:

SabineHaas commented 5 years ago

I remember implementing it like this to not break longer simulations. But I agree that it should at least be a warning. I also wouldn't oppose to an error.

uvchik commented 5 years ago

I remember implementing it like this to not break longer simulations.

Following this argumentation we have to remove all errors. I think people should take care on there own e.g. by using try/except in there main script.

But I agree that it should at least be a warning. I also wouldn't oppose to an error.

Does it make sense to use the wind_farm_efficiency method without a valid efficiency?

Do we have to catch the wrong behaviour later on?

SabineHaas commented 5 years ago

oemof dev decision: logging message will be changed into error message. Add info in docstring: if wake_losses_model is 'wind_farm_efficiency' efficiency is needed.

SabineHaas commented 4 years ago

solved with PR #87