Smoothing and inter/extrapolating gps coordinates #253
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.
This PR builds on top of #251. It:
toL3
on that L2 file within which the GPS latitude, longitude and altitude are post-processed into smooth, gapg-free seriesThis is done by:
finding breaks in the available GPS coordinates which correspond to station maintenance. The smoothing and interpolation will be done separately for each interval between maintenance so that station relocation is not smoothed.
For each interval, we apply 1) a LOWESS (Locally Weighted Scatterplot Smoothing) to the each coordinate; 2) an internal linear interpolation between the available smoothed coordinates and 3) a linear extrapolation of the result to the next maintenance, to the latest timestamp or backward in time if necessary.
For stations where no GPS data is available, the static value contained as an attribute in the aws-l2 data file is given to each timestamp
The result are six variables:
lat
,lon
,alt
the smoothed and gapless time-dependent coordinates for each stationslat_avg
,lon_avg
,alt_avg
the mean value of the previous three variables that can be given as attribute in thre netcdf files and potentially in theAWS_metadata.csv
file distributed with the dataset.