Execute WPS icclim processes with PHYTHON
In [38]:
from owslib.wps import WebProcessingService, monitorExecution
wps = WebProcessingService(url="http://localhost:8093/wps", verbose=False, skip_caps=False)
Explore some informations:
In [39]:
wps.identification.title
Out[39]:
In [40]:
for process in wps.processes:
process.identifier, process.title
In [44]:
for process in wps.processes:
print '%s \t : %s '% (process.identifier, process.abstract)
In [48]:
execute = wps.execute(
identifier="indices_single",
inputs=[
('indices','GD4'),
('groupings','yr'),
('resource','file:///homel/nhempel/data/cache/pywps/tas_EUR-44_MPI-M-MPI-ESM-LR_historical_r1i1p1_CLMcom-CCLM4-8-17_v1_day_19860101-19901231.nc'),
('polygons','FRA'),
('polygons','DEU')],
#outputs = [('logout', 'True'),('tarout', 'True') ,('anomaliesout', 'True') ]
)
# check process if completed ...
monitorExecution(execute, sleepSecs=5)
o = execute.processOutputs[0]
print o.reference
In [ ]: