Strong constraint 4DVar for 1D Burgers equation #1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds a script
forward_burgers.py
for a simple trapezium rule timestepping for reference.Adds two scripts for strong constraint 4DVar for the 1D Burgers eq:
sc4dvar.py
: Strong constraint 4DVar using a standardReducedFunctional
.sc4dvar_aaorf.py
: Strong constraint 4Dvar using the newAllAtOnceReducedFunctional
.Both scripts start from a target initial condition (two superimposed sin waves of different magnitude/frequency/phase) and run the forward model to generate the "ground truth" observations.
A new initial condition is created (different magnitudes/phase for the sin waves plus some noise). This initial condition (the background) is stepped forward, accumulating the functional for the observation error through the timeseries. This run of the forward model is taped. The second script builds the functional by registering the observations with
AllAtOnceReducedFunctional
.The 4DVar system is solved with L-BFGS-B and the optimised initial condition is then stepped forward to collect some errors vs the target solution. The three solutions (target, background, optimised) are written to vtk to compare.
Observations are taken either evenly spaced or randomly in space, but always evenly spaced in time. The functional can include scalar error covariances for the background and observation errors.