GeoNet / fdsn

FDSN Web Services
MIT License
17 stars 15 forks source link

Data requests to service-nrt return incomplete/truncated data #224

Closed AdrianBenson closed 2 years ago

AdrianBenson commented 2 years ago

Hi

Data requests to https://service-nrt.geonet.org.nz/fdsnws/dataselect/1 return data that do not properly reflect starttime & endtime query parameters. Data payload only includes minseed packets that

The result is a data file that is truncated at either end (ex 1). It is possible to create a valid query that return nothing (ex 2) .

This all suggest an error in the backend filter/query logic somewhere. For a minseed packet spanning t0,t1

The expected behaviour would be to include packets that span the start and end times as per service.geonet.org.nz (ex3)

Example 1 Missing 45 seconds at the start and ~6 minutes at the end.

$> curl -s "https://service-nrt.geonet.org.nz/fdsnws/dataselect/1/query?net=NZ&sta=EYWM&channel=LFX&start=2021-12-05T00:00:00.000&end=2021-12-05T00:20:00.000" -o junk.mseed
$> msi -t junk.mseed 
NZ_EYWM_50_LFX, 015740, D, 512, 397 samples, 1 Hz, 2021,339,00:00:45.071865
NZ_EYWM_50_LFX, 015741, D, 512, 403 samples, 1 Hz, 2021,339,00:07:22.071860
   Source                Start sample             End sample        Hz  Samples
NZ_EYWM_50_LFX    2021,339,00:00:45.071865 2021,339,00:14:04.071860 1   800
Total: 1 trace(s) with 1 segment(s)

Example 2 Startime & endtime fall within a single packet => no data returned

$> curl "https://service-nrt.geonet.org.nz/fdsnws/dataselect/1/query?net=NZ&sta=EYWM&channel=LFX&start=2021-12-05T00:01:00.000&end=2021-12-05T00:05:00.000" -o junk.mseed
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0

Example 3 An equivalent query against service.geonet.org.nz return data as expected

$> curl -s "https://service.geonet.org.nz/fdsnws/dataselect/1/query?net=NZ&sta=EYWM&channel=LFX&start=2021-11-20T00:00:00.000&end=2021-11-20T00:20:00.000" -o junk.mseed
$> msi -T junk.mseed 
   Source                Start sample             End sample        Hz  Samples
NZ_EYWM_50_LFX    2021,323,23:58:20.071839 2021,324,00:23:21.071866 1   1502
junghao commented 2 years ago

Service-nrt.geonet.org.nz's data service is not following the conclusion made before https://github.com/GeoNet/fdsn/issues/140 (though this was station service).

AdrianBenson commented 2 years ago

From the end user perspective this issue has been resolved