We have an ncSOS server with a get observation example that works:
http://geoport-dev.whoi.edu/thredds/sos/usgs/data2/notebook/1211-A1H.cdf?service=SOS&version=1.0.0&request=GetObservation&responseFormat=text%2Fxml%3Bsubtype%3D%22om%2F1.0.0%22&offering=1211-A1H&observedProperty=u_1205&procedure=urn:ioos:station:gov.usgs:1211-A1H
But can we formulate, request and process this same query (and others like it) using OWSlib?
In [1]:
from owslib.sos import SensorObservationService
import pdb
#from owslib.etree import etree
from pyoos.utils.etree import etree
from pyoos.parsers.ioos.one.timeseries import TimeSeries
import pandas as pd
import datetime as dt
In [2]:
url = 'http://sdf.ndbc.noaa.gov/sos/server.php?request=GetCapabilities&service=SOS&version=1.0.0'
ndbc = SensorObservationService(url)
In [3]:
# usgs woods hole
# buoy data (single current meter)
url='http://geoport-dev.whoi.edu/thredds/sos/usgs/data2/notebook/1211-A1H.cdf'
usgs = SensorObservationService(url)
contents = usgs.contents
In [4]:
usgs.contents
Out[4]:
{'1211-A1H': <owslib.swe.observation.sos100.SosObservationOffering at 0x55a8410>,
'network-all': <owslib.swe.observation.sos100.SosObservationOffering at 0x55a8310>}
In [5]:
off = usgs.offerings[1]
off.name
Out[5]:
'urn:ioos:station:gov.usgs:1211-A1H'
In [6]:
off.response_formats
Out[6]:
['text/xml; subtype="om/1.0.0"',
'text/xml;subtype="om/1.0.0/profiles/ioos_sos/1.0"']
In [7]:
off.observed_properties
Out[7]:
['u_1205', 'v_1206', 'CD_310', 'CS_300', 'upr_4001']
In [8]:
# the get observation request below works. How can we recreate this using OWSLib?
# http://geoport-dev.whoi.edu/thredds/sos/usgs/data2/notebook/1211-A1H.cdf?service=SOS&version=1.0.0&request=GetObservation&responseFormat=text%2Fxml%3Bsubtype%3D%22om%2F1.0.0%22&offering=1211-A1H&observedProperty=u_1205&procedure=urn:ioos:station:gov.usgs:1211-A1H
In [9]:
#pdb.set_trace()
swe = usgs.get_observation(offerings=['1211-A1H'],
responseFormat='text/xml;subtype="om/1.0.0/profiles/ioos_sos/1.0"',
observedProperties=['u_1205'],
procedure='urn:ioos:station:gov.usgs:1211-A1H')
In [10]:
print swe
<?xml version="1.0" encoding="UTF-8"?>
<om:ObservationCollection xmlns:om="http://www.opengis.net/om/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:gml="http://www.opengis.net/gml" xmlns:swe2="http://www.opengis.net/swe/2.0" xmlns:swe="http://www.opengis.net/swe/1.0.1" xsi:schemaLocation="http://www.opengis.net/om/1.0 http://schemas.opengis.net/om/1.0.0/observation.xsd">
<gml:metaDataProperty xlink:title="disclaimer">
<gml:GenericMetaData>
<gml:description>Data provided without any guarantee of accuracy. Provider assumes no liability whatsoever. USE AT YOUR OWN RISK.</gml:description>
</gml:GenericMetaData>
</gml:metaDataProperty>
<gml:metaDataProperty xlink:title="ioosTemplateVersion" xlink:href="http://code.google.com/p/ioostech/source/browse/#svn%2Ftrunk%2Ftemplates%2FMilestone1.0">
<gml:version>1.0</gml:version>
</gml:metaDataProperty>
<gml:metaDataProperty xlink:title="softwareVersion" xlink:href="https://github.com/asascience-open/ncSOS/releases">
<gml:version>RC6</gml:version>
</gml:metaDataProperty>
<om:member>
<om:Observation>
<gml:description>No description</gml:description>
<om:samplingTime>
<gml:TimePeriod>
<gml:beginPosition>1976-12-28T21:29:59Z</gml:beginPosition>
<gml:endPosition>1977-01-08T06:29:59Z</gml:endPosition>
</gml:TimePeriod>
</om:samplingTime>
<om:procedure>
<om:Process>
<gml:member xlink:href="urn:ioos:station:gov.usgs:1211-A1H" />
</om:Process>
</om:procedure>
<om:observedProperty>
<swe:CompositePhenomenon dimension="1" gml:id="observedProperties">
<gml:name>Response Observed Properties</gml:name>
<swe:component xlink:href="http://mmisw.org/ont/cf/parameter/eastward_sea_water_velocity" />
</swe:CompositePhenomenon>
</om:observedProperty>
<om:featureOfInterest>
<gml:FeatureCollection>
<gml:metaDataProperty>
<gml:name codeSpace="http://cf-pcmdi.llnl.gov/documents/cf-conventions/1.6/cf-conventions.html#discrete-sampling-geometries">UNKNOWN</gml:name>
</gml:metaDataProperty>
<gml:boundedBy>
<gml:Envelope srsName="http://www.opengis.net/def/crs/EPSG/0/4326">
<gml:lowerCorner>40.9011116027832 -69.17666625976562</gml:lowerCorner>
<gml:upperCorner>40.9011116027832 -69.17666625976562</gml:upperCorner>
</gml:Envelope>
</gml:boundedBy>
<gml:location>
<gml:MultiPoint srsName="http://www.opengis.net/def/crs/EPSG/0/4326">
<gml:pointMembers>
<gml:Point>
<gml:name>urn:ioos:station:gov.usgs:1211-A1H</gml:name>
<gml:pos>40.9011116027832 -69.17666625976562</gml:pos>
</gml:Point>
</gml:pointMembers>
</gml:MultiPoint>
</gml:location>
</gml:FeatureCollection>
</om:featureOfInterest>
<om:result>
<swe2:DataRecord>
<swe2:field name="stations">
<swe2:DataRecord definition="http://mmisw.org/ont/ioos/definition/stations">
<swe2:field name="gov.usgs_1211_a1h">
<swe2:DataRecord id="gov.usgs_1211_a1h" definition="http://mmisw.org/ont/ioos/definition/station">
<swe2:field name="stationID">
<swe2:Text definition="http://mmisw.org/ont/ioos/definition/stationID">
<swe2:value>urn:ioos:station:gov.usgs:1211-A1H</swe2:value>
</swe2:Text>
</swe2:field>
<swe2:field name="platformLocation">
<swe2:Vector definition="http://www.opengis.net/def/property/OGC/0/PlatformLocation" referenceFrame="https://ioostech.googlecode.com/svn/trunk/IoosCRS/IoosBuoyCRS.xml" localFrame="#PlatformFrame">
<swe2:coordinate name="latitude">
<swe2:Quantity definition="http://mmisw.org/ont/cf/parameter/latitude" axisID="Lat">
<swe2:uom code="deg" />
<swe2:value>40.9011116027832</swe2:value>
</swe2:Quantity>
</swe2:coordinate>
<swe2:coordinate name="longitude">
<swe2:Quantity definition="http://mmisw.org/ont/cf/parameter/longitude" axisID="Lon">
<swe2:uom code="deg" />
<swe2:value>-69.17666625976562</swe2:value>
</swe2:Quantity>
</swe2:coordinate>
<swe2:coordinate name="height">
<swe2:Quantity definition="http://mmisw.org/ont/cf/parameter/height" axisID="Z">
<swe2:uom code="m" />
<swe2:value>69.0</swe2:value>
</swe2:Quantity>
</swe2:coordinate>
</swe2:Vector>
</swe2:field>
<swe2:field name="sensors">
<swe2:DataRecord definition="http://mmisw.org/ont/ioos/definition/sensors">
<swe2:field name="gov.usgs_1211_a1h_u_1205">
<swe2:DataReocrd id="gov.usgs_1211_a1h_u_1205" definition="http://mmisw.org/ont/ioos/definition/sensor">
<swe2:field name="sensorID">
<swe2:Text definition="http://mmisw.org/ont/ioos/definition/sensorID">
<swe2:value>urn:ioos:sensor:gov.usgs:1211-A1H:u_1205</swe2:value>
</swe2:Text>
</swe2:field>
<swe2:field name="height">
<swe2:Quantity definintion="http://mmisw.org/ont/cf/parameter/height" referenceFrame="#PlatformFrame">
<swe2:uom code="m" />
<swe2:value>0</swe2:value>
</swe2:Quantity>
</swe2:field>
</swe2:DataReocrd>
</swe2:field>
</swe2:DataRecord>
</swe2:field>
</swe2:DataRecord>
</swe2:field>
</swe2:DataRecord>
</swe2:field>
<swe2:field name="observationData">
<swe2:DataArray definition="http://mmisw.org/ont/ioos/definition/sensorObservationCollection">
<swe2:elementCount>
<swe2:Count>
<swe2:value>250</swe2:value>
</swe2:Count>
</swe2:elementCount>
<swe2:elementType name="observations">
<swe2:DataRecord definition="http://mmisw.org/ont/ioos/definition/sensorObservations">
<swe2:field name="time">
<swe2:Time definition="http://www.opengis.net/def/property/OGC/0/SamplingTime">
<swe2:uom xlink:href="http://www.opengis.net/def/uom/ISO-8601/0/Gregorian" />
</swe2:Time>
<swe2:DataChoice definition="http://mmisw.org/ont/ioos/swe_element_type/sensors">
<swe2:item name="gov.usgs_1211_a1h_u_1205">
<swe2:DataRecord>
<swe2:field name="u_1205">
<swe2:Quantity definition="http://mmisw.org/ont/cf/parameter/eastward_sea_water_velocity">
<swe2:uom code="cm/s" />
</swe2:Quantity>
</swe2:field>
</swe2:DataRecord>
</swe2:item>
<swe2:item name="dummy_item" />
</swe2:DataChoice>
</swe2:field>
</swe2:DataRecord>
</swe2:elementType>
<swe2:encoding>
<swe2:TextEncoding decimalSeperator="." tokenSeparator="," blockSeparator="
" />
</swe2:encoding>
<swe2:values>1976-12-28T21:29:59Z,gov.usgs_1211_a1h_u_1205,-7.53701
1976-12-28T22:29:59Z,gov.usgs_1211_a1h_u_1205,-2.06346
1976-12-28T23:29:59Z,gov.usgs_1211_a1h_u_1205,5.02748
1976-12-29T00:29:59Z,gov.usgs_1211_a1h_u_1205,9.32351
1976-12-29T01:29:59Z,gov.usgs_1211_a1h_u_1205,16.191
1976-12-29T02:29:59Z,gov.usgs_1211_a1h_u_1205,18.452
1976-12-29T03:29:59Z,gov.usgs_1211_a1h_u_1205,19.452
1976-12-29T04:29:59Z,gov.usgs_1211_a1h_u_1205,21.233
1976-12-29T05:29:59Z,gov.usgs_1211_a1h_u_1205,8.01951
1976-12-29T06:29:59Z,gov.usgs_1211_a1h_u_1205,0.41648
1976-12-29T07:29:59Z,gov.usgs_1211_a1h_u_1205,-8.81638
1976-12-29T08:29:59Z,gov.usgs_1211_a1h_u_1205,-17.9287
1976-12-29T09:29:59Z,gov.usgs_1211_a1h_u_1205,-20.3512
1976-12-29T10:29:59Z,gov.usgs_1211_a1h_u_1205,-17.8112
1976-12-29T11:29:59Z,gov.usgs_1211_a1h_u_1205,-11.8939
1976-12-29T12:29:59Z,gov.usgs_1211_a1h_u_1205,-5.42472
1976-12-29T13:29:59Z,gov.usgs_1211_a1h_u_1205,5.48562
1976-12-29T14:29:59Z,gov.usgs_1211_a1h_u_1205,12.7434
1976-12-29T15:29:59Z,gov.usgs_1211_a1h_u_1205,18.8387
1976-12-29T16:29:59Z,gov.usgs_1211_a1h_u_1205,21.7982
1976-12-29T17:29:59Z,gov.usgs_1211_a1h_u_1205,17.6214
1976-12-29T18:29:59Z,gov.usgs_1211_a1h_u_1205,12.2534
1976-12-29T19:29:59Z,gov.usgs_1211_a1h_u_1205,6.98027
1976-12-29T20:29:59Z,gov.usgs_1211_a1h_u_1205,2.10325
1976-12-29T21:29:59Z,gov.usgs_1211_a1h_u_1205,-3.69112
1976-12-29T22:29:59Z,gov.usgs_1211_a1h_u_1205,-1.30559
1976-12-29T23:29:59Z,gov.usgs_1211_a1h_u_1205,0.95416
1976-12-30T00:29:59Z,gov.usgs_1211_a1h_u_1205,7.74421
1976-12-30T01:29:59Z,gov.usgs_1211_a1h_u_1205,14.4868
1976-12-30T02:29:59Z,gov.usgs_1211_a1h_u_1205,20.8482
1976-12-30T03:29:59Z,gov.usgs_1211_a1h_u_1205,28.165
1976-12-30T04:29:59Z,gov.usgs_1211_a1h_u_1205,23.9134
1976-12-30T05:29:59Z,gov.usgs_1211_a1h_u_1205,19.8682
1976-12-30T06:29:59Z,gov.usgs_1211_a1h_u_1205,9.54208
1976-12-30T07:29:59Z,gov.usgs_1211_a1h_u_1205,-1.40473
1976-12-30T08:29:59Z,gov.usgs_1211_a1h_u_1205,-7.42687
1976-12-30T09:29:59Z,gov.usgs_1211_a1h_u_1205,-17.5523
1976-12-30T10:29:59Z,gov.usgs_1211_a1h_u_1205,-17.7453
1976-12-30T11:29:59Z,gov.usgs_1211_a1h_u_1205,-15.7514
1976-12-30T12:29:59Z,gov.usgs_1211_a1h_u_1205,-9.76603
1976-12-30T13:29:59Z,gov.usgs_1211_a1h_u_1205,-0.15171
1976-12-30T14:29:59Z,gov.usgs_1211_a1h_u_1205,11.3176
1976-12-30T15:29:59Z,gov.usgs_1211_a1h_u_1205,17.707
1976-12-30T16:29:59Z,gov.usgs_1211_a1h_u_1205,15.5033
1976-12-30T17:29:59Z,gov.usgs_1211_a1h_u_1205,11.8731
1976-12-30T18:29:59Z,gov.usgs_1211_a1h_u_1205,5.40789
1976-12-30T19:29:59Z,gov.usgs_1211_a1h_u_1205,-6.3024
1976-12-30T20:29:59Z,gov.usgs_1211_a1h_u_1205,-12.0153
1976-12-30T21:29:59Z,gov.usgs_1211_a1h_u_1205,-22.0652
1976-12-30T22:29:59Z,gov.usgs_1211_a1h_u_1205,-31.0779
1976-12-30T23:29:59Z,gov.usgs_1211_a1h_u_1205,-29.6863
1976-12-31T00:29:59Z,gov.usgs_1211_a1h_u_1205,-23.0141
1976-12-31T01:29:59Z,gov.usgs_1211_a1h_u_1205,-16.0883
1976-12-31T02:29:59Z,gov.usgs_1211_a1h_u_1205,-8.828
1976-12-31T03:29:59Z,gov.usgs_1211_a1h_u_1205,-1.50285
1976-12-31T04:29:59Z,gov.usgs_1211_a1h_u_1205,4.96585
1976-12-31T05:29:59Z,gov.usgs_1211_a1h_u_1205,4.10408
1976-12-31T06:29:59Z,gov.usgs_1211_a1h_u_1205,1.90962
1976-12-31T07:29:59Z,gov.usgs_1211_a1h_u_1205,-3.7614
1976-12-31T08:29:59Z,gov.usgs_1211_a1h_u_1205,-9.8001
1976-12-31T09:29:59Z,gov.usgs_1211_a1h_u_1205,-11.9197
1976-12-31T10:29:59Z,gov.usgs_1211_a1h_u_1205,-15.1913
1976-12-31T11:29:59Z,gov.usgs_1211_a1h_u_1205,-12.5002
1976-12-31T12:29:59Z,gov.usgs_1211_a1h_u_1205,-9.1101
1976-12-31T13:29:59Z,gov.usgs_1211_a1h_u_1205,-0.95521
1976-12-31T14:29:59Z,gov.usgs_1211_a1h_u_1205,7.23788
1976-12-31T15:29:59Z,gov.usgs_1211_a1h_u_1205,14.3825
1976-12-31T16:29:59Z,gov.usgs_1211_a1h_u_1205,25.8339
1976-12-31T17:29:59Z,gov.usgs_1211_a1h_u_1205,23.607
1976-12-31T18:29:59Z,gov.usgs_1211_a1h_u_1205,16.8617
1976-12-31T19:29:59Z,gov.usgs_1211_a1h_u_1205,12.5101
1976-12-31T20:29:59Z,gov.usgs_1211_a1h_u_1205,5.52633
1976-12-31T21:29:59Z,gov.usgs_1211_a1h_u_1205,-1.98642
1976-12-31T22:29:59Z,gov.usgs_1211_a1h_u_1205,-5.69633
1976-12-31T23:29:59Z,gov.usgs_1211_a1h_u_1205,-10.9741
1977-01-01T00:29:59Z,gov.usgs_1211_a1h_u_1205,-11.4538
1977-01-01T01:29:59Z,gov.usgs_1211_a1h_u_1205,-7.48172
1977-01-01T02:29:59Z,gov.usgs_1211_a1h_u_1205,0.62946
1977-01-01T03:29:59Z,gov.usgs_1211_a1h_u_1205,7.73175
1977-01-01T04:29:59Z,gov.usgs_1211_a1h_u_1205,10.5753
1977-01-01T05:29:59Z,gov.usgs_1211_a1h_u_1205,16.8914
1977-01-01T06:29:59Z,gov.usgs_1211_a1h_u_1205,13.4744
1977-01-01T07:29:59Z,gov.usgs_1211_a1h_u_1205,8.0848
1977-01-01T08:29:59Z,gov.usgs_1211_a1h_u_1205,-1.22311
1977-01-01T09:29:59Z,gov.usgs_1211_a1h_u_1205,-8.01454
1977-01-01T10:29:59Z,gov.usgs_1211_a1h_u_1205,-15.1973
1977-01-01T11:29:59Z,gov.usgs_1211_a1h_u_1205,-17.8604
1977-01-01T12:29:59Z,gov.usgs_1211_a1h_u_1205,-14.7093
1977-01-01T13:29:59Z,gov.usgs_1211_a1h_u_1205,-8.72308
1977-01-01T14:29:59Z,gov.usgs_1211_a1h_u_1205,1.94973
1977-01-01T15:29:59Z,gov.usgs_1211_a1h_u_1205,11.2549
1977-01-01T16:29:59Z,gov.usgs_1211_a1h_u_1205,23.8078
1977-01-01T17:29:59Z,gov.usgs_1211_a1h_u_1205,28.3448
1977-01-01T18:29:59Z,gov.usgs_1211_a1h_u_1205,36.5674
1977-01-01T19:29:59Z,gov.usgs_1211_a1h_u_1205,26.3748
1977-01-01T20:29:59Z,gov.usgs_1211_a1h_u_1205,19.4431
1977-01-01T21:29:59Z,gov.usgs_1211_a1h_u_1205,8.61415
1977-01-01T22:29:59Z,gov.usgs_1211_a1h_u_1205,0.02933
1977-01-01T23:29:59Z,gov.usgs_1211_a1h_u_1205,-8.4052
1977-01-02T00:29:59Z,gov.usgs_1211_a1h_u_1205,-10.5121
1977-01-02T01:29:59Z,gov.usgs_1211_a1h_u_1205,-8.70438
1977-01-02T02:29:59Z,gov.usgs_1211_a1h_u_1205,-1.63375
1977-01-02T03:29:59Z,gov.usgs_1211_a1h_u_1205,8.92907
1977-01-02T04:29:59Z,gov.usgs_1211_a1h_u_1205,15.0928
1977-01-02T05:29:59Z,gov.usgs_1211_a1h_u_1205,27.5954
1977-01-02T06:29:59Z,gov.usgs_1211_a1h_u_1205,27.7565
1977-01-02T07:29:59Z,gov.usgs_1211_a1h_u_1205,27.6666
1977-01-02T08:29:59Z,gov.usgs_1211_a1h_u_1205,13.8977
1977-01-02T09:29:59Z,gov.usgs_1211_a1h_u_1205,8.90522
1977-01-02T10:29:59Z,gov.usgs_1211_a1h_u_1205,0.56637
1977-01-02T11:29:59Z,gov.usgs_1211_a1h_u_1205,-4.48595
1977-01-02T12:29:59Z,gov.usgs_1211_a1h_u_1205,-6.92918
1977-01-02T13:29:59Z,gov.usgs_1211_a1h_u_1205,-3.90759
1977-01-02T14:29:59Z,gov.usgs_1211_a1h_u_1205,7.00567
1977-01-02T15:29:59Z,gov.usgs_1211_a1h_u_1205,14.0251
1977-01-02T16:29:59Z,gov.usgs_1211_a1h_u_1205,27.127
1977-01-02T17:29:59Z,gov.usgs_1211_a1h_u_1205,39.2253
1977-01-02T18:29:59Z,gov.usgs_1211_a1h_u_1205,36.8614
1977-01-02T19:29:59Z,gov.usgs_1211_a1h_u_1205,39.7797
1977-01-02T20:29:59Z,gov.usgs_1211_a1h_u_1205,25.4651
1977-01-02T21:29:59Z,gov.usgs_1211_a1h_u_1205,15.2809
1977-01-02T22:29:59Z,gov.usgs_1211_a1h_u_1205,1.74863
1977-01-02T23:29:59Z,gov.usgs_1211_a1h_u_1205,-7.24796
1977-01-03T00:29:59Z,gov.usgs_1211_a1h_u_1205,-14.9889
1977-01-03T01:29:59Z,gov.usgs_1211_a1h_u_1205,-18.9807
1977-01-03T02:29:59Z,gov.usgs_1211_a1h_u_1205,-11.6406
1977-01-03T03:29:59Z,gov.usgs_1211_a1h_u_1205,-6.15584
1977-01-03T04:29:59Z,gov.usgs_1211_a1h_u_1205,2.69349
1977-01-03T05:29:59Z,gov.usgs_1211_a1h_u_1205,9.75682
1977-01-03T06:29:59Z,gov.usgs_1211_a1h_u_1205,21.2394
1977-01-03T07:29:59Z,gov.usgs_1211_a1h_u_1205,22.0843
1977-01-03T08:29:59Z,gov.usgs_1211_a1h_u_1205,17.5424
1977-01-03T09:29:59Z,gov.usgs_1211_a1h_u_1205,11.083
1977-01-03T10:29:59Z,gov.usgs_1211_a1h_u_1205,1.54012
1977-01-03T11:29:59Z,gov.usgs_1211_a1h_u_1205,-4.79491
1977-01-03T12:29:59Z,gov.usgs_1211_a1h_u_1205,-9.66902
1977-01-03T13:29:59Z,gov.usgs_1211_a1h_u_1205,-12.6962
1977-01-03T14:29:59Z,gov.usgs_1211_a1h_u_1205,-6.41528
1977-01-03T15:29:59Z,gov.usgs_1211_a1h_u_1205,2.70596
1977-01-03T16:29:59Z,gov.usgs_1211_a1h_u_1205,15.1554
1977-01-03T17:29:59Z,gov.usgs_1211_a1h_u_1205,26.7568
1977-01-03T18:29:59Z,gov.usgs_1211_a1h_u_1205,32.0675
1977-01-03T19:29:59Z,gov.usgs_1211_a1h_u_1205,36.4506
1977-01-03T20:29:59Z,gov.usgs_1211_a1h_u_1205,33.5959
1977-01-03T21:29:59Z,gov.usgs_1211_a1h_u_1205,19.8264
1977-01-03T22:29:59Z,gov.usgs_1211_a1h_u_1205,9.24658
1977-01-03T23:29:59Z,gov.usgs_1211_a1h_u_1205,-4.3503
1977-01-04T00:29:59Z,gov.usgs_1211_a1h_u_1205,-14.7071
1977-01-04T01:29:59Z,gov.usgs_1211_a1h_u_1205,-22.1078
1977-01-04T02:29:59Z,gov.usgs_1211_a1h_u_1205,-20.7298
1977-01-04T03:29:59Z,gov.usgs_1211_a1h_u_1205,-12.3695
1977-01-04T04:29:59Z,gov.usgs_1211_a1h_u_1205,-5.36638
1977-01-04T05:29:59Z,gov.usgs_1211_a1h_u_1205,8.18219
1977-01-04T06:29:59Z,gov.usgs_1211_a1h_u_1205,13.3647
1977-01-04T07:29:59Z,gov.usgs_1211_a1h_u_1205,16.6824
1977-01-04T08:29:59Z,gov.usgs_1211_a1h_u_1205,19.7055
1977-01-04T09:29:59Z,gov.usgs_1211_a1h_u_1205,13.1669
1977-01-04T10:29:59Z,gov.usgs_1211_a1h_u_1205,4.1386
1977-01-04T11:29:59Z,gov.usgs_1211_a1h_u_1205,-7.9975
1977-01-04T12:29:59Z,gov.usgs_1211_a1h_u_1205,-17.9818
1977-01-04T13:29:59Z,gov.usgs_1211_a1h_u_1205,-17.584
1977-01-04T14:29:59Z,gov.usgs_1211_a1h_u_1205,-14.9717
1977-01-04T15:29:59Z,gov.usgs_1211_a1h_u_1205,-6.32282
1977-01-04T16:29:59Z,gov.usgs_1211_a1h_u_1205,4.43806
1977-01-04T17:29:59Z,gov.usgs_1211_a1h_u_1205,18.1875
1977-01-04T18:29:59Z,gov.usgs_1211_a1h_u_1205,25.8468
1977-01-04T19:29:59Z,gov.usgs_1211_a1h_u_1205,32.8366
1977-01-04T20:29:59Z,gov.usgs_1211_a1h_u_1205,38.4124
1977-01-04T21:29:59Z,gov.usgs_1211_a1h_u_1205,30.6307
1977-01-04T22:29:59Z,gov.usgs_1211_a1h_u_1205,19.5335
1977-01-04T23:29:59Z,gov.usgs_1211_a1h_u_1205,0.06299
1977-01-05T00:29:59Z,gov.usgs_1211_a1h_u_1205,-12.113
1977-01-05T01:29:59Z,gov.usgs_1211_a1h_u_1205,-21.6516
1977-01-05T02:29:59Z,gov.usgs_1211_a1h_u_1205,-24.7322
1977-01-05T03:29:59Z,gov.usgs_1211_a1h_u_1205,-18.6421
1977-01-05T04:29:59Z,gov.usgs_1211_a1h_u_1205,-10.19
1977-01-05T05:29:59Z,gov.usgs_1211_a1h_u_1205,2.61406
1977-01-05T06:29:59Z,gov.usgs_1211_a1h_u_1205,15.4169
1977-01-05T07:29:59Z,gov.usgs_1211_a1h_u_1205,19.7381
1977-01-05T08:29:59Z,gov.usgs_1211_a1h_u_1205,27.3922
1977-01-05T09:29:59Z,gov.usgs_1211_a1h_u_1205,22.7738
1977-01-05T10:29:59Z,gov.usgs_1211_a1h_u_1205,13.7461
1977-01-05T11:29:59Z,gov.usgs_1211_a1h_u_1205,-3.04626
1977-01-05T12:29:59Z,gov.usgs_1211_a1h_u_1205,-14.5107
1977-01-05T13:29:59Z,gov.usgs_1211_a1h_u_1205,-24.3245
1977-01-05T14:29:59Z,gov.usgs_1211_a1h_u_1205,-24.1614
1977-01-05T15:29:59Z,gov.usgs_1211_a1h_u_1205,-14.5208
1977-01-05T16:29:59Z,gov.usgs_1211_a1h_u_1205,-4.70796
1977-01-05T17:29:59Z,gov.usgs_1211_a1h_u_1205,10.7838
1977-01-05T18:29:59Z,gov.usgs_1211_a1h_u_1205,25.1949
1977-01-05T19:29:59Z,gov.usgs_1211_a1h_u_1205,30.7208
1977-01-05T20:29:59Z,gov.usgs_1211_a1h_u_1205,44.3278
1977-01-05T21:29:59Z,gov.usgs_1211_a1h_u_1205,42.9791
1977-01-05T22:29:59Z,gov.usgs_1211_a1h_u_1205,21.599
1977-01-05T23:29:59Z,gov.usgs_1211_a1h_u_1205,9.49333
1977-01-06T00:29:59Z,gov.usgs_1211_a1h_u_1205,-9.20014
1977-01-06T01:29:59Z,gov.usgs_1211_a1h_u_1205,-24.0266
1977-01-06T02:29:59Z,gov.usgs_1211_a1h_u_1205,-31.7898
1977-01-06T03:29:59Z,gov.usgs_1211_a1h_u_1205,-31.8755
1977-01-06T04:29:59Z,gov.usgs_1211_a1h_u_1205,-19.9408
1977-01-06T05:29:59Z,gov.usgs_1211_a1h_u_1205,-6.09534
1977-01-06T06:29:59Z,gov.usgs_1211_a1h_u_1205,7.8436
1977-01-06T07:29:59Z,gov.usgs_1211_a1h_u_1205,18.1302
1977-01-06T08:29:59Z,gov.usgs_1211_a1h_u_1205,23.6603
1977-01-06T09:29:59Z,gov.usgs_1211_a1h_u_1205,25.8938
1977-01-06T10:29:59Z,gov.usgs_1211_a1h_u_1205,16.0739
1977-01-06T11:29:59Z,gov.usgs_1211_a1h_u_1205,7.50038
1977-01-06T12:29:59Z,gov.usgs_1211_a1h_u_1205,-12.0792
1977-01-06T13:29:59Z,gov.usgs_1211_a1h_u_1205,-20.0639
1977-01-06T14:29:59Z,gov.usgs_1211_a1h_u_1205,-25.701
1977-01-06T15:29:59Z,gov.usgs_1211_a1h_u_1205,-24.0659
1977-01-06T16:29:59Z,gov.usgs_1211_a1h_u_1205,-9.91479
1977-01-06T17:29:59Z,gov.usgs_1211_a1h_u_1205,5.25365
1977-01-06T18:29:59Z,gov.usgs_1211_a1h_u_1205,21.03
1977-01-06T19:29:59Z,gov.usgs_1211_a1h_u_1205,28.3007
1977-01-06T20:29:59Z,gov.usgs_1211_a1h_u_1205,34.9682
1977-01-06T21:29:59Z,gov.usgs_1211_a1h_u_1205,35.1374
1977-01-06T22:29:59Z,gov.usgs_1211_a1h_u_1205,30.9125
1977-01-06T23:29:59Z,gov.usgs_1211_a1h_u_1205,15.3065
1977-01-07T00:29:59Z,gov.usgs_1211_a1h_u_1205,-3.95539
1977-01-07T01:29:59Z,gov.usgs_1211_a1h_u_1205,-25.2768
1977-01-07T02:29:59Z,gov.usgs_1211_a1h_u_1205,-37.4579
1977-01-07T03:29:59Z,gov.usgs_1211_a1h_u_1205,-44.0116
1977-01-07T04:29:59Z,gov.usgs_1211_a1h_u_1205,-33.7154
1977-01-07T05:29:59Z,gov.usgs_1211_a1h_u_1205,-19.8229
1977-01-07T06:29:59Z,gov.usgs_1211_a1h_u_1205,-7.60804
1977-01-07T07:29:59Z,gov.usgs_1211_a1h_u_1205,7.86771
1977-01-07T08:29:59Z,gov.usgs_1211_a1h_u_1205,12.5256
1977-01-07T09:29:59Z,gov.usgs_1211_a1h_u_1205,15.4916
1977-01-07T10:29:59Z,gov.usgs_1211_a1h_u_1205,9.5071
1977-01-07T11:29:59Z,gov.usgs_1211_a1h_u_1205,4.65763
1977-01-07T12:29:59Z,gov.usgs_1211_a1h_u_1205,-8.41088
1977-01-07T13:29:59Z,gov.usgs_1211_a1h_u_1205,-18.634
1977-01-07T14:29:59Z,gov.usgs_1211_a1h_u_1205,-27.769
1977-01-07T15:29:59Z,gov.usgs_1211_a1h_u_1205,-26.9367
1977-01-07T16:29:59Z,gov.usgs_1211_a1h_u_1205,-20.8829
1977-01-07T17:29:59Z,gov.usgs_1211_a1h_u_1205,-7.15345
1977-01-07T18:29:59Z,gov.usgs_1211_a1h_u_1205,11.4895
1977-01-07T19:29:59Z,gov.usgs_1211_a1h_u_1205,26.6033
1977-01-07T20:29:59Z,gov.usgs_1211_a1h_u_1205,36.7065
1977-01-07T21:29:59Z,gov.usgs_1211_a1h_u_1205,39.9233
1977-01-07T22:29:59Z,gov.usgs_1211_a1h_u_1205,49.2965
1977-01-07T23:29:59Z,gov.usgs_1211_a1h_u_1205,36.6666
1977-01-08T00:29:59Z,gov.usgs_1211_a1h_u_1205,19.2631
1977-01-08T01:29:59Z,gov.usgs_1211_a1h_u_1205,-1.02328
1977-01-08T02:29:59Z,gov.usgs_1211_a1h_u_1205,-18.6735
1977-01-08T03:29:59Z,gov.usgs_1211_a1h_u_1205,-26.5777
1977-01-08T04:29:59Z,gov.usgs_1211_a1h_u_1205,-30.8224
1977-01-08T05:29:59Z,gov.usgs_1211_a1h_u_1205,-4.80533
1977-01-08T06:29:59Z,gov.usgs_1211_a1h_u_1205,32.5437</swe2:values>
</swe2:DataArray>
</swe2:field>
</swe2:DataRecord>
</om:result>
</om:Observation>
</om:member>
</om:ObservationCollection>
In [11]:
data_record = etree.fromstring(swe)
In [12]:
station = TimeSeries(data_record).feature
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-12-12c35193b398> in <module>()
----> 1 station = TimeSeries(data_record).feature
/home/rsignell/python/pyoos/pyoos/parsers/ioos/one/timeseries.py in __init__(self, element)
32 stations = {}
33 sensors = {}
---> 34 for station in stations_field.content.field:
35 s = Station()
36 s.name = station.name
AttributeError: 'NoneType' object has no attribute 'content'
In [ ]:
# usgs woods hole ADCP data
# url='http://geoport-dev.whoi.edu/thredds/sos/usgs/data2/notebook/9111aqd-a.nc'
# adcp = SensorObservationService(url)
In [ ]:
#ts = pd.Series(date_value[:,1],index=date_value[:,0])
In [ ]:
#ts.plot(figsize(12,4))
In [ ]:
''' this doesn't work
# Try adding a time range to the getobs request:
start = '1976-12-302T00:00:00Z'
stop = '1977-01-07T00:00:00Z'
response = usgs.get_observation(offerings=['1211-A1H'],
responseFormat='text/xml;subtype="om/1.0.0"',
observedProperties=['u_1205'],
procedure='urn:ioos:station:gov.usgs:1211-A1H',
eventTime='%s/%s' % (start,stop)
''';
In [ ]:
Content source: rsignell-usgs/ipython-notebooks
Similar notebooks: