nansencenter / DAPPER

Data Assimilation with Python: a Package for Experimental Research
https://nansencenter.github.io/DAPPER
MIT License
341 stars 119 forks source link

Modular iEnKS and new time-control #65

Closed yumengch closed 3 years ago

yumengch commented 3 years ago

This pull request is related to issue #25.

Here I "modularise" the iEnKS to a EnKF style.

I also change the time-control as I feel the code (np.arange(-1, KObs+self.Lag+1)) starting from -1 is not straightforward to me.

In relation to this pull request, I just want to mention that, I wrote an iEnKS that is more aligned with the BS13 paper including arbitrary forward in time step S and "real" MDA. I feel the code needs quite some work to integrate into DAPPER master branch.

patnr commented 3 years ago

Looks good! This closes #25

I renamed iEnKS_smoother to iEnKS_update

It is hard to understand all cases of combinations of Lags and DAWs, and make the code work with them. I confess I did not take the time to understand exactly how the replacement of the -1 works, but the PR passes all the tests, which are fairly comprehensive on this point, so I merged it.

It would be great to have the S and "the other" MDA option (needs a better descriptor). If you want you can add your work as a new DA method, which we might later merge with the existing iEnKS. Please make sure the method reproduces the literature result. This is not suited as a pytest case (running long enough for statistical significance takes too long for a test case) but should be included as a comment in an HMM file. See for example

Case1 Case2 Case3