Write the station velocity pipeline of a national geodetic survey's GNSS network: secular velocities, realistic uncertainties and discontinuity sizes from daily position series, scored on further stations with known truth.
harbor run -t reactive-labs/gnss-velocitiesharbor download reactive-labs/gnss-velocitiesYou are Ilse Varrow, geodesist in the Reference Frame Section of the Aravelle National Geodetic Survey (ANGS). The section runs ARGNET, the national network of 108 continuously operating GNSS stations, and publishes the ARV velocity model of the national datum from their daily position series. Today is Tuesday 10 November 2026. Anselm Kirr, Head of the Reference Frame Section, wrote to you yesterday:
What I need is one program that takes a station folder exactly as the archive export writes it (the .tsr.gz and the site log) and gives the velocity, its uncertainty and the discontinuities according to SOP-GEO-021 rev C. We will run it over all 108 ARGNET stations, including the decommissioned ones, and then over every new export, so it has to be right for every station the way it actually was. Please send me the results for the 40 together with the program by the end of the month.
In /app/inputs:
request/: Anselm's emailstations/: the working set, 40 station folders from the archive export of 6 November 2026. Each folder <ID>/
holds <ID>.tsr.gz (daily positions in the TSR format) and <ID>.log (the current site log)network/: the ARGNET station listseismology/: the export of the ASN seismological bulletin of 5 November 2026docs/: SOP-GEO-021 rev C, the archive interface document ICD-TSR 2.1 and the technical notes TN-2022-04 and
TN-2024-02mail/: the Analysis Centre mails the section has keptprevious_analyst/: Jorrit Pell's script, his handover notes and his draft table/app/output/analyze.py, run as
python3 /app/output/analyze.py <station_dir> <out.json>
<station_dir> is one station folder in the same format as those in /app/inputs/stations (read-only; its name
is the station ID). The program writes <out.json>, a JSON object with these keys:
| key | meaning |
|---|---|
station |
the four-character station ID |
vel_n_mm_yr, vel_e_mm_yr, vel_u_mm_yr |
secular velocity of the station in ARF2020, north, east and up in the local frame of the header reference position, mm/yr |
sig_vel_n_mm_yr, sig_vel_e_mm_yr, sig_vel_u_mm_yr |
standard uncertainty (one sigma) of each velocity component, mm/yr |
offsets |
list with one object per position discontinuity of the station inside its series, each with date (ISO date, YYYY-MM-DD, of the discontinuity as SOP-GEO-021 defines it) and dn_mm, de_mm, du_mm (size of the discontinuity, north, east, up, mm, position after minus position before); an empty list if there is none |
Further keys are ignored. The program may load files that you put next to it in /app/output (find them
relative to __file__); /app/inputs is not available when it runs. It runs on one CPU core with 3 GB of
memory and no network, with Python 3.12, numpy, scipy and pandas, and must finish each station within 60
seconds (a batch of 40 stations within 20 minutes).
/app/output/results.json: a JSON list with one object per station of /app/inputs/stations (40 objects),
each with the keys above.
The program is run on further station folders from the same archive export: ARGNET stations of all kinds (operational and decommissioned, in and out of the repro3 pilot, with and without earthquakes and equipment changes), whose true secular velocity, true discontinuities and noise process are known. Each station is scored on these quantities. sigma_v is the standard error of the velocity component, and sigma_o that of a discontinuity size, that the station's true noise implies (white plus flicker noise) for the model of SOP-GEO-021:
| quantity | tolerance | weight |
|---|---|---|
| north and east velocity | max(0.20 mm/yr, 3 sigma_v) | 0.22 each |
| up velocity | max(0.50 mm/yr, 3 sigma_v) | 0.06 |
| velocity uncertainties | ratio of the reported to sigma_v within a factor 1.5 | 0.04 north, 0.04 east, 0.02 up |
| discontinuities | date within 3 days of a true discontinuity; sizes within max(1.0 mm, 4.5 sigma_o, 5 % of the true size) north and east, max(3.0 mm, 4.5 sigma_o, 5 % of the true size) up | 0.40 |
A velocity or a size earns full credit within its tolerance and loses credit linearly to zero at three times the
tolerance; an uncertainty earns full credit within the factor 1.5 and none beyond a factor 1.5^3. Each true
discontinuity is matched with at most one reported one; a matched discontinuity scores the mean of its three size
scores, and the discontinuity part is the sum of these scores divided by the larger of the number of true and the
number of reported discontinuities (1 when both are zero). The uncertainty and discontinuity parts are multiplied
by the mean of the north and east velocity scores, and at a station that has true discontinuities the three velocity
scores are multiplied by 0.4 + 0.6 times the discontinuity part. A station for which the program fails, runs out
of time, or writes a velocity that is missing or not a finite number scores zero. The objects of results.json are
scored in the same way against the true values of the 40 stations of the working set. The final score is 0.8 times
the mean over the further stations plus 0.2 times the mean over results.json.