Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Smoothing and inter/extrapolating gps coordinates #253

Closed

Conversation

BaptisteVandecrux
Copy link
Member

@BaptisteVandecrux BaptisteVandecrux commented Jun 4, 2024

This PR builds on top of #251. It:

  • reads merged (raw+tx for v2+v3 stations) aws-l2 data
  • runs toL3 on that L2 file within which the GPS latitude, longitude and altitude are post-processed into smooth, gapg-free series

This 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 stations
  • lat_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 the AWS_metadata.csv file distributed with the dataset.

+ some renaming
+ moving some necessary steps (like directional wind speed calculation to the L1toL2 step
- `calcHumid` renamed to `calcSpHumid` for clarity
- `cleanHeatFlux` and `cleanSpHumid` were just removing NaNs, so it is now done at the end of `calcHeatFlux` and `calcSpHumid`
- `rho_atm`, `nu` were only used in `calcSpHumid` so they are calculated inside the function rather than outside
@BaptisteVandecrux BaptisteVandecrux deleted the smoothing-and-inter-extrapolating-gps-coordinates branch June 27, 2024 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant