Manipulate the metrics of the boxes surrounding an open sea such that the applied boundary condition is artifically pushed further away, similar to the idea of absorbing boundary conditions. Criteria for success: The analysis with data points in the center should not be different if the open boundary is 1 or 20 length scales away.
Mathematical criteria (need to show it is close to the desired property from above): The background variance field should be as uniform as possible and not increase near the open boundary (as it currently does with the zero normal gradient condition).
First tests reveal that a good way to adapt the metrics $p_m$ near the boundaries is to fix values such that $l p_m \sim 2$ where $l$ is the local length scale. This amount to move the last grid point two length scales away in terms of metrics used in the numerical finite differences.
For example, testing for different values of $\alpha$ to calculate $p_m$= $1 \over \alpha l $ we observe a clear minimum in the variance of $\mathrm{diag} (\mathbf{B})$. If we use this value and look at the analysis with the adapted boundary condition and the analysis in a much larger domain, the differences are indeed very small.
In [1]:
push!(LOAD_PATH,"C:/JMB/DIVAnd.jl/src"); using DIVAnd;cd("C:/JMB/DIVAnd.jl");cd("examples");include("DIVAnd_optimizepmn1Da.jl")
Out[1]:
In practise the exact value for $\alpha$ is depending on the domain size $L$ and grid resolution compared to the length scales $l$.
Optimal $ \alpha $ as a function of $L \over l$ (domain size $L$ over length scale $l$) and resolution $ l p_m$ (length scale $l$ over grid spacing $1/p_m$). The optimal valueof $\alpha$ is used to force the last and first metric to be $p_m$= $1 \over \alpha l $
In [ ]:
In [ ]:
In [ ]:
Within $\mathtt{DIVAndrun}$ so that windowing can be done efficiently? In order to avoid copying a tuple, work at the level where the pmn's are actually used ? Always allow to force use of unmodified metrics.
In [ ]: