-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support transformation types LN, SET and MULTIPLY in state updating for EnKF via BB stoch model config #404
Comments
It is a very deliberate choice in OpenDA to not support a SET method. The reason is that for "real" models the full state of an (ensemble) member contains much more stuff than the "filter" state that is updated. |
@nilsvanvelzen: good to know. The LN is the one that is requested by Julius Sumihar, as I understood to prevent values to become negative for instance. In order to be consistent we thought supporting the other options as well. Do you also have an option about this implementation within the axpyOnState method? |
No, LN en multiply on state are not ok (based on the available information I have). It is unclear why you need it, what it means. I only see options to bad things with it. Please elaborate on why you need it |
Oh, sorry I missed part of your reply, I edited my reply but what I added was this: The LN is the one that is requested by Julius Sumihar, as I understood to prevent values to become negative for instance. In order to be consistent we thought supporting the other options as well. But maybe involving Julius in the discussion would be a good idea. |
The original idea on the AXPY is that the model (in that time WAQUA) was able to absorb a change to the model that would lead to a non-physical state (like negative depth). The strength of the AXPY is that the model has is own "correct/allowed" state and the delta. That gives more options to fix things nicely than a "incorrect" state that is externally computed. In the black box model that might be a bit less obvious although some additional support at that level might be useful to allow a model builder to insert same clever state-fixing optional step. |
Hi @nilsvanvelzen, We would like to do a state-parameter estimation with EnKF and are trying to find the best way to do it in OpenDA. A first approach being investigated is to treat parameter just as state variable, i.e. to include its exchangeItem in state vector definition in stochModel.xml. In the analysis step of EnKF, this effectively just adds the parameter with delta_parameter (AXPY). We haven't tested it, but this may lead to incorrect results, like for example negative value for parameter that can only be positive. So, I have been thinking to treat the parameter as parameter-vector defintion (<\parameter>) in stochModel so that we can use the available "transformation" on parameter exchange item in the analysis step. Using transformation="ln", for example, it will make sure that the parameter estimates will stay positive. Do you have any suggestions? Many thanks, |
If you want to add parameters to the state. Do you mean like al Kalman smoother? The idea is not to keep extending the models (in this case the black box model) but combine models into new models. Look if can be used as an inspiration. |
Hi @nilsvanvelzen, thanks for your input. Our approach is to use state-parameter augmentation and estimate them simultaneously using EnKF. So, it's not a smoother. We will have a look at the codes you mentioned. |
In that approach the same solution via an "parent" model should be able to do the trick and it avoids all kinds of obscure/seldom used functionality in the BB model (is already much more complex that I'd rather see) |
Hi @nilsvanvelzen, the smootherModel seems to do what we want, that it allows the model state to contain both state and parameter vectors. The axpy on state is then done correspondingly on state and parameter. However, there is no configuration example available in git that makes use of smootherModel. Do you perhaps have a setup example for smootherModel? Many thanks, |
I have used it for groundwater modelling with MikeShe. It might be here: |
Currently only the axpy (=add) transformation is available for state updating in BB stoch model config for EnKF.
Simplest solution would be to extend vector config with option transformation="LN / SET / MULTIPLY"
In BBStochModelInstance.axpyOnState the option can be read in and instead of calling axpy the method addParameterDeltaToExchangeItem can be called which modifies the exchange item values according to the transformation option.
Only thing that is not so nice is that the method is already called axpyOnState all the way up to the EnKF class where it is called in the updateModelWithGain method.
Nicer would be to either rename this method or add another method which has a name similar to addParameterDelta, but this requires a high level OpenDA interface change.
The text was updated successfully, but these errors were encountered: