ioos / pyoos

A Python library for collecting Met/Ocean observations
GNU Lesser General Public License v3.0
34 stars 33 forks source link

When retrieving multiple obs from platform, only one returned #20

Closed DanRamage closed 10 years ago

DanRamage commented 10 years ago

Querying water_temperature and salinity from an ncSOS endpoint, PyOOS only seems to handle one. PyOOS generated query, generated from a .collect() call:

http://129.252.139.124/thredds/sos/carocoops.cap2.buoy.nc?eventTime=2014-01-30T15%3A07%3A03Z%2F2014-01-31T03%3A07%3A03Z&service=SOS&offering=urn%3Aioos%3Astation%3Aorg.secoora%3Acarocoops.cap2.buoy&request=GetObservation&version=1.0.0&responseFormat=text%2Fxml%3Bschema%3D%22om%2F1.0.0%2Fprofiles%2Fioos_sos%2F1.0%22&observedProperty=water_temperature%2Csalinity

The data may be there, but with no documentation on using the library, I am not sure.

DanRamage commented 10 years ago

Test to see if this makes it appear.

daf commented 10 years ago

Yes, I think you are definitely onto some parsing bug. Looking at it now.

ebridger commented 10 years ago

This may be a bug in ncSOS. Here's a GetObs url, using the ioos profile responseFormat, requesting wave_height and wave_period. I must admit, I'm not up on what the ioos profile should return http://goo.gl/XweXf2

http://www.neracoos.org:8180/thredds/sos/UMO/DSG/SOS/B01/Accelerometer/HistoricRealtime/Agg.ncml?version=1.0.0&request=GetObservation&service=SOS&procedure=urn:ioos:station:edu.maine:B01&offering=B01&responseFormat=text%2Fxml%3Bschema%3D%22om%2F1.0.0%2Fprofiles%2Fioos_sos%2F1.0%22&eventTime=2014-01-30T00:00:00Z/2014-01-30T03:00:00Z&observedProperty=significant_wave_height,dominant_wave_period

The <swe2:values> don't really look correct to me. One line for each time, even though the same.

 2014-01-30T00:00:00Z,edu.maine_b01_significant_wave_height,0.9783023
2014-01-30T00:00:00Z,edu.maine_b01_dominant_wave_period,4.0
2014-01-30T00:30:00Z,edu.maine_b01_significant_wave_height,1.0702674
2014-01-30T00:30:00Z,edu.maine_b01_dominant_wave_period,4.0
2014-01-30T00:59:59Z,edu.maine_b01_significant_wave_height,1.0306194
2014-01-30T00:59:59Z,edu.maine_b01_dominant_wave_period,3.2

Using the O&M response format the results look more correct:

2014-01-30T00:00:00Z,0.9783023,4.0
2014-01-30T00:30:00Z,1.0702674,4.0
2014-01-30T00:59:59Z,1.0306194,3.2
daf commented 10 years ago

I'll take a look at ncSOS, but it's definitely a pyoos problem - we were simply clobbering any additional sensor data - last sensor wins. My commit above is naive but works.