In [2]:
"""Python WPS execute"""
from owslib.wps import WebProcessingService, monitorExecution
from os import system
In [3]:
import owslib
owslib.__version__ # version must be >=0.10.3
Out[3]:
In [4]:
# wps = WebProcessingService(url="http://birdhouse-lsce.extra.cea.fr:8093/wps", verbose=False)
wps = WebProcessingService(url="http://localhost:8093/wps", verbose=False)
#wps = WebProcessingService(url="https://birdhouse-lsce.extra.cea.fr:28093/wps", verbose=False,
#verify=False)
In [5]:
print wps.identification.title
In [6]:
for process in wps.processes:
print '%s : \t %s' % (process.identifier, process.abstract)
In [16]:
td_path = 'http://webportals.ipsl.jussieu.fr/thredds/fileServer/EUROCORDEX/extremoscope_FRA_20151009/polygons/TG/yr/rcp45/13/'
file1 = 'TG_rcp45_CNRM-CERFACS-CNRM-CM5_RCA4_1971-2100.nc'
file2 = 'TG_rcp45_CNRM-CM5_CCLM4-8-17_1971-2100.nc'
file3 = 'TG_rcp45_CNRM-CM5_CNRM-ALADIN53_1971-2100.nc'
In [17]:
from os.path import join
execute = wps.execute(
identifier="visualisation", #indices_clipping",
inputs=[
("resource",join(td_path, file1)),
("resource",join(td_path, file2)),
("resource",join(td_path, file3)),
# ("variable" , "TG"),
])
monitorExecution(execute, sleepSecs=5)
print execute.getStatus()
for o in execute.processOutputs:
print o.reference
In [ ]: