Changed the way Observations is set-up. Now the initialization of the operator (at the start of assimilation) is done once, and separately from the update of the aggregated projection of observations onto observation space for each assimilation step with a new set of observations. Then also, now difference instance is made more efficient by the fact that projections are taken care of in the initialization (as FunctionSpace is provided at the start) and that one can find the aggregated observation function once for the whole ensemble.
Members now just have the differences by subtracting themselves from this aggregated function.
All convergence examples/demos come back consistent and tests pass (with a few more added).
Benchmark (local machine) runtime profiles for ensemble transform and coupling show speed-up now for difference finding (as it's now linear for the number of observations - not multiplied by the ensemble size like it was before).
Alterations:
Observations
is set-up. Now the initialization of the operator (at the start of assimilation) is done once, and separately from the update of the aggregated projection of observations onto observation space for each assimilation step with a new set of observations. Then also, nowdifference
instance is made more efficient by the fact that projections are taken care of in the initialization (asFunctionSpace
is provided at the start) and that one can find the aggregated observation function once for the whole ensemble.