Execute WPS icclim processes with PHYTHON
In [1]:
from owslib.wps import WebProcessingService, monitorExecution
wps = WebProcessingService(url="http://localhost:8093/wps", verbose=False, skip_caps=False)
Explore some informations:
In [2]:
wps.identification.title
Out[2]:
In [4]:
for process in wps.processes:
print '%s \t : %s '% (process.identifier, process.abstract)
In [5]:
resource = 'file:///homel/nhempel/data/cache/pywps/pr_EUR-44_MPI-M-MPI-ESM-LR_rcp85_r1i1p1_CLMcom-CCLM4-8-17_v1_day_20210101-20251231.nc'
In [6]:
execute = wps.execute(
identifier="indices_single",
inputs=[
('indices','PRCPTOT'),
('groupings','yr'),
('resource',resource ),
#('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 [ ]: