Use CSW to find ROMS data at COMT pycsw


In [12]:
from owslib.csw import CatalogueServiceWeb
from owslib import fes

Find model results at COMT pycsw


In [13]:
endpoint = 'http://comt.sura.org:8000/pycsw'   # NODC/UAF Geoportal: granule level
csw = CatalogueServiceWeb(endpoint,timeout=60)
print csw.version


2.0.2

In [14]:
csw.get_operation_by_name('GetRecords').constraints


Out[14]:
[Constraint: SupportedISOQueryables - ['apiso:DistanceValue', 'apiso:Abstract', 'apiso:RevisionDate', 'apiso:Subject', 'apiso:KeywordType', 'apiso:Title', 'apiso:CRS', 'apiso:PublicationDate', 'apiso:Type', 'apiso:AlternateTitle', 'apiso:BoundingBox', 'apiso:AnyText', 'apiso:ParentIdentifier', 'apiso:Modified', 'apiso:Operation', 'apiso:Format', 'apiso:TempExtent_end', 'apiso:DistanceUOM', 'apiso:OrganisationName', 'apiso:ServiceType', 'apiso:TempExtent_begin', 'apiso:ResourceLanguage', 'apiso:ServiceTypeVersion', 'apiso:OperatesOn', 'apiso:Denominator', 'apiso:HasSecurityConstraints', 'apiso:OperatesOnIdentifier', 'apiso:GeographicDescriptionCode', 'apiso:Language', 'apiso:Identifier', 'apiso:OperatesOnName', 'apiso:TopicCategory', 'apiso:CreationDate', 'apiso:CouplingType'],
 Constraint: AdditionalQueryables - ['apiso:Lineage', 'apiso:Classification', 'apiso:Creator', 'apiso:Relation', 'apiso:OtherConstraints', 'apiso:SpecificationTitle', 'apiso:ResponsiblePartyRole', 'apiso:SpecificationDateType', 'apiso:Degree', 'apiso:Contributor', 'apiso:ConditionApplyingToAccessAndUse', 'apiso:SpecificationDate', 'apiso:AccessConstraints', 'apiso:Publisher'],
 Constraint: SupportedDublinCoreQueryables - ['dc:contributor', 'dc:source', 'dc:language', 'dc:title', 'dc:subject', 'dc:creator', 'dc:type', 'ows:BoundingBox', 'dct:modified', 'dct:abstract', 'dc:relation', 'dc:date', 'dc:identifier', 'dc:publisher', 'dc:format', 'csw:AnyText', 'dc:rights']]

In [15]:
val = 'ROMS'
filter1 = fes.PropertyIsLike(propertyname='apiso:AnyText',literal=('*%s*' % val),
                        escapeChar='\\',wildCard='*',singleChar='?')
filter_list = [ filter1 ]

In [16]:
csw.getrecords2(constraints=filter_list,maxrecords=100,esn='full')
print len(csw.records.keys())
for rec in list(csw.records.keys()):
    print csw.records[rec].title


15
UCSC California Current System, version wc12.0_coamps_hycom_gls_v736_tave24_01 with npzd
Estuarine Hypoxia : VIMS : CBOFS : 2004-2005
Estuarine Hypoxia : VIMS : ChesROMS : 1term constR
Estuarine Hypoxia : VIMS : ChesROMS : 1term ddR
Estuarine Hypoxia : WHOI : ChesROMS-1term : 1991-2005 1termDO
Shelf Hypoxia : DAL : ROMS : 2004-2009 climatology obc with oxygen hnd soc 20layers
Shelf Hypoxia : DAL : ROMS : 2004-2009 climatology obc with oxygen inst rem 20layers
Shelf Hypoxia : DAL : ROMS : 2004-2009 hycom obc with oxygen hnd soc 30layers
Shelf Hypoxia : DAL : ROMS : 2004-2009 hycom obc with oxygen inst rem 30layers
Shelf Hypoxia : DAL : ROMS : 2004-2009 ias obc with oxygen hnd soc 30layers
Shelf Hypoxia : DAL : ROMS : 2004-2009 ias obc with oxygen inst rem 30layers
Shelf Hypoxia : TAMU : ROMS : 2004-2009 hycom obc 24h
Shelf Hypoxia : TAMU : ROMS : 2004-2009 iasnfs obc 24h
Shelf Hypoxia : TAMU : ROMS : 2004-2009 hycom obc 24h
ROMS/TOMS 3.0 - New Floria Shelf Application

In [17]:
choice=np.random.choice(list(csw.records.keys()))
print(csw.records[choice].title)
csw.records[choice].references


Estuarine Hypoxia : VIMS : ChesROMS : 1term constR
Out[17]:
[{'scheme': 'WWW:LINK',
  'url': 'http://comt.sura.org/thredds/dodsC/data/comt_1_archive/estuarine_hypoxia/VIMS_ChesROMS/1term_constR.html'},
 {'scheme': 'WWW:LINK',
  'url': 'http://www.ncdc.noaa.gov/oa/wct/wct-jnlp-beta.php?singlefile=http://comt.sura.org/thredds/dodsC/data/comt_1_archive/estuarine_hypoxia/VIMS_ChesROMS/1term_constR'},
 {'scheme': 'OPeNDAP:OPeNDAP',
  'url': 'http://comt.sura.org/thredds/dodsC/data/comt_1_archive/estuarine_hypoxia/VIMS_ChesROMS/1term_constR'},
 {'scheme': 'OGC:WCS',
  'url': 'http://comt.sura.org/thredds/wcs/data/comt_1_archive/estuarine_hypoxia/VIMS_ChesROMS/1term_constR?service=WCS&version=1.0.0&request=GetCapabilities'},
 {'scheme': 'OGC:WMS',
  'url': 'http://comt.sura.org/thredds/wms/data/comt_1_archive/estuarine_hypoxia/VIMS_ChesROMS/1term_constR?service=WMS&version=1.3.0&request=GetCapabilities'},
 {'scheme': 'UNIDATA:NCSS',
  'url': 'http://comt.sura.org/thredds/ncss/data/comt_1_archive/estuarine_hypoxia/VIMS_ChesROMS/1term_constR/dataset.html'}]

Add bounding box constraint. To specify lon,lat order for bbox (which we want to do so that we can use the same bbox with either geoportal server or pycsw requests), we need to request the bounding box specifying the CRS84 coordinate reference system. The CRS84 option is available in pycsw 1.1.10+. The ability to specify the crs in the bounding box request is available in owslib 0.8.12+. For more info on the bounding box problem and how it was solved, see this pycsw issue, this geoportal server issue, and this owslib issue


In [18]:
bbox = [-87.40, 24.25, -74.70, 36.70]
bbox_filter = fes.BBox(bbox,crs='urn:ogc:def:crs:OGC:1.3:CRS84')
filter_list = [filter1, bbox_filter]
csw.getrecords2(constraints=filter_list, maxrecords=1000)

In [19]:
print len(csw.records.keys())
for rec in list(csw.records.keys()):
    print csw.records[rec].title


84
NCOM Region 1 Aggregation/Best Time Series
UCSC California Current System, version wc12.0_coamps_hycom_gls_v736_tave24_01 with npzd
Estuarine Hypoxia : VIMS : CBOFS : 2004-2005
Estuarine Hypoxia : VIMS : ChesROMS : 1term constR
Estuarine Hypoxia : VIMS : ChesROMS : 1term ddR
Estuarine Hypoxia : VIMS : EFDC : 2004_DO
Estuarine Hypoxia : WHOI : ChesROMS-1term : 1991-2005 1termDO
Inundation Tropical : MDL : SLOSH : Hurricane Ike final run egm3
Inundation Tropical : MDL : SLOSH : Hurricane Rita final run egm3
Inundation Tropical : UND : ADCIRC : Hurricane Ike 2D final run with waves
Inundation Tropical : UND : ADCIRC : Hurricane Ike 2D final run without waves
Inundation Tropical : UND : ADCIRC : Hurricane Ike 2D preliminary run 1 spinup
Inundation Tropical : UND : ADCIRC : Hurricane Ike 2D preliminary run 2 spinup without advection implicit 1s
Inundation Tropical : UND : ADCIRC : Hurricane Ike 2D preliminary run 3 spinup with levees
Inundation Tropical : UND : ADCIRC : Hurricane Ike 2D preliminary run 4 spinup with levees and river flow
Inundation Tropical : UND : ADCIRC : Hurricane Ike 2D preliminary run 5 tides only
Inundation Tropical : UND : ADCIRC : Hurricane Ike 3D final run with waves
Inundation Tropical : UND : ADCIRC : Hurricane Ike 3D final run without waves
Inundation Tropical : UND : ADCIRC : Hurricane Ike 3D preliminary run 1 spinup
Inundation Tropical : UND : ADCIRC : Hurricane Ike Timing with waves
Inundation Tropical : UND : ADCIRC : Hurricane Ike Timing without waves
Inundation Tropical : UND : ADCIRC : Hurricane Rita 2D final run with waves
Inundation Tropical : UND : ADCIRC : Hurricane Rita 2D final run without waves
Inundation Tropical : UND : ADCIRC : Hurricane Rita 2D preliminary run 1 spinup
Inundation Tropical : UND : ADCIRC : Hurricane Rita 2D preliminary run 2 spinup without advection implicit 1s
Inundation Tropical : UND : ADCIRC : Hurricane Rita 2D preliminary run 3 tides only
Inundation Tropical : UND : ADCIRC : Hurricane Rita 2D preliminary run 4 with waves without advection implicit 1s
Inundation Tropical : UND : ADCIRC : Hurricane Rita 2D preliminary run 5 without waves and advection implicit 1s
Inundation Tropical : UND : ADCIRC : Hurricane Rita 3D final run with waves
Inundation Tropical : UND : ADCIRC : Hurricane Rita 3D final run without waves
Inundation Tropical : UND : ADCIRC : Hurricane Rita 3D preliminary run 1 spinup
Inundation Tropical : UND : ADCIRC : Tides only 2D final run
Inundation Tropical : UND : ADCIRC : Tides only 2D preliminary run 1 without advection implicit 1s
Inundation Tropical : UND : ADCIRC : Tides only 3D final run
Inundation Tropical : UND : SLOSH : Hurricane Ike final run egm3
Inundation Tropical : UND : SLOSH : Hurricane Ike preliminary run 4 egm3 without tides
Inundation Tropical : UND : SLOSH : Hurricane Ike preliminary run 5 egm3 with SLOSH winds
Inundation Tropical : UND : SLOSH : Hurricane Ike preliminary run 6 egm3 with SLOSH winds without tides
Inundation Tropical : UND : SLOSH : Hurricane Rita final run egm3
Inundation Tropical : UND : SLOSH : Hurricane Rita preliminary run 4 egm3 without tides
Inundation Tropical : UND : SLOSH : Hurricane Rita preliminary run 5 egm3 with SLOSH winds
Inundation Tropical : UND : SLOSH : Hurricane Rita preliminary run 6 egm3 with SLOSH winds without tides
Inundation Tropical : USF : FVCOM : Hurricane Ike 2D final run with waves
Inundation Tropical : USF : FVCOM : Hurricane Ike 2D final run without waves
Inundation Tropical : USF : FVCOM : Hurricane Ike 3D final run with waves
Inundation Tropical : USF : FVCOM : Hurricane Ike 3D final run without waves
Inundation Tropical : USF : FVCOM : Hurricane Rita 2D final run with waves
Inundation Tropical : USF : FVCOM : Hurricane Rita 2D final run without waves
Inundation Tropical : USF : FVCOM : Hurricane Rita 3D final run with waves
Inundation Tropical : USF : FVCOM : Hurricane Rita 3D final run without waves
Inundation Tropical : USF : FVCOM : SWAN Ike final run with 2DSurge
Inundation Tropical : USF : FVCOM : SWAN Ike final run without Surge
Inundation Tropical : USF : FVCOM : SWAN Rita final run with 2DSurge
Inundation Tropical : USF : FVCOM : SWAN Rita final run without Surge
Inundation Tropical : VIMS : SELFE : Hurricane Ike 2D final run wave only
Inundation Tropical : VIMS : SELFE : Hurricane Ike 2D final run with waves
Inundation Tropical : VIMS : SELFE : Hurricane Ike 2D final run without waves
Inundation Tropical : VIMS : SELFE : Hurricane Ike 3D final run with waves
Inundation Tropical : VIMS : SELFE : Hurricane Ike 3D final run without waves
Inundation Tropical : VIMS : SELFE : Hurricane Rita 2D final run waves only
Inundation Tropical : VIMS : SELFE : Hurricane Rita 2D final run with waves
Inundation Tropical : VIMS : SELFE : Hurricane Rita 2D final run without waves
Inundation Tropical : VIMS : SELFE : Hurricane Rita 3D final run with waves
Inundation Tropical : VIMS : SELFE : Hurricane Rita 3D final run without waves
Shelf Hypoxia : DAL : ROMS : 2004-2009 climatology obc with oxygen hnd soc 20layers
Shelf Hypoxia : DAL : ROMS : 2004-2009 climatology obc with oxygen inst rem 20layers
Shelf Hypoxia : DAL : ROMS : 2004-2009 hycom obc with oxygen hnd soc 30layers
Shelf Hypoxia : DAL : ROMS : 2004-2009 hycom obc with oxygen inst rem 30layers
Shelf Hypoxia : DAL : ROMS : 2004-2009 ias obc with oxygen hnd soc 30layers
Shelf Hypoxia : DAL : ROMS : 2004-2009 ias obc with oxygen inst rem 30layers
Shelf Hypoxia : NOAA : NGOM : 2005-2011 NGOM
Shelf Hypoxia : TAMU : ROMS : 2004-2009 hycom obc 24h
Shelf Hypoxia : TAMU : ROMS : 2004-2009 iasnfs obc 24h
Shelf Hypoxia : TAMU : ROMS : 2004-2009 hycom obc 24h
Pr Inundation Tropical : EMC : ADCIRC-WW3 : Dec2013Storm 2D preliminary run 1 waves only
Pr Inundation Tropical : NRL : DELFT3D : Hurricane Ike 2D preliminary run 1 without waves
GOM3 Nesting by yf.sun@umassd.edu
GOM3 Nesting by yf.sun@umassd.edu
GOM3 Wave Nesting
NECOFS GOM3v11 (FVCOM) - Northeast US - Forecast Archive
NECOFS GOM3v12 (FVCOM) - Northeast US - Forecast Archive
NECOFS GOM3v13 (FVCOM) - Northeast US - Forecast Archive
ROMS/TOMS 3.0 - New Floria Shelf Application
USF Wave Forecast Products

In [19]:


In [19]:


In [ ]: