[R] Modifying the design matrix X in GAMS to suit data assimilation
Ateljevich, Eli
eli at water.ca.gov
Wed Jul 11 16:56:36 CEST 2012
I have a data assimilation problem that might be amenable to the use of GAMS, but I am not sure how feasible it is to implement. I was told the R mailing list was a great resource.
My observations are spatiotemporal salinity in the San Francisco Bay at a number of instruments over a few days. The thing that I want to fit is the initial condition for a salt transport model at the beginning of this time period. The spline basis functions, parameters and curvature penalties would all be purely spatial, though the cross-validation would be in the space of the data.
The modification I need to make is as follows:
1. evaluate each spatial basis function at every computational point in my mesh (dense, but not part of the GAM)
2. use the bases members as individual initial conditions and integrate the PDE.
3. evaluate the salinity results at the (sparse) time and locations where I have observations.
4. construct a replacement model matrix X that reflects the influence at (x,t) of each spatial basis member. Summing these will works due to the linearity of the PDE.
5. The curvature penalty would remain in the spatial, not the spatio-temporal, space.
My concerns are: whether, say with mgcv, I can halt the process (probably set "fit" to false) and then evaluate at a large number of arbitrary points, then replace the matrix X and continue on. I am also concerned whether this is hopeless in the sense that at the point in the algorithm where I might inject the new X precalculations might have been made using the old matrix X that would be hard to reverse.
Can anyone give me some advice how to do this?
Thanks,
Eli
More information about the R-help
mailing list