equinor / flownet

FlowNet - Data-Driven Reservoir Predictions
GNU General Public License v3.0
63 stars 29 forks source link

Negative porosity when using mean and max in the config #210

Closed wouterjdb closed 3 years ago

wouterjdb commented 4 years ago

Setting porosity with a mean and max will lead to realizations with negative porosity and failed runs:

image

image

This is always invalid and should lead to a crash.

olelod commented 3 years ago

Should we move part of what is done in _run_ahm.py into the config parsing, such that this is discovered earlier? Raise an error there if what you define would lead to negative min.

wouterjdb commented 3 years ago

Yes, sounds good. However, another thing is that the code that calculate the distributions is very slow. So still it would take some time to get the error. I guess we can do this faster.

olelod commented 3 years ago

For the uniform distribution it should be pretty straightforward. The loguniform one is a different beast. I guess it has a use case when a parameter has a lower bound you can not theoretically pass (such as 0 porv or poro), but if you define the mean and max, you can end up with e.g. a minimum porosity of 0.15. What we are really saying then is that the lowest possible (and most likely) value of porosity is 0.15. I don't think this is what we really want - we want some other distribution that moves towards lower probability in the prior as we move towards the boundaries (but that is more fundamental than what this issue aims at solving...)

olelod commented 3 years ago

PR #251 adds multiple checks on the input values, which should close this issue.