In [1]:
"""Python WPS execute"""
from owslib.wps import WebProcessingService, monitorExecution, printInputOutput
from os import system

In [2]:
wps_url = "http://localhost:8093/wps"
#wps_url = "http://birdhouse-lsce.extra.cea.fr:8093/wps"
wps = WebProcessingService(url=wps_url, verbose=False)

In [3]:
print wps.identification.title


Flyingpigeon

In [5]:
for process in wps.processes:
    print '%s : \t %s' % (process.identifier, process.abstract)


visualisation : 	 Just testing a nice script to visualise some variables
segetalflora : 	 Species biodiversity of segetal flora. Imput files: variable:tas , domain: EUR-11 or EUR-44
indices_single : 	 This process calculates climate indices based on one single variable.
subset_countries : 	 This process returns only the given polygon from input netCDF files.
eobs_to_cordex : 	 downloads EOBS data in adaped CORDEX format
ensembleRobustness : 	 Calculates the robustness as the ratio of noise to signal in an ensemle of timeseries
analogs : 	 Search for days with analog pressure pattern
fetch : 	 This process downloads resources (limited to 50GB) to the local file system and returns a textfile with appropriate pathes

In [4]:
files = []

for i in range(1,16): # 
    #files.append('file:///home/estimr1/EUCLEIA/indices/RX5day/DJF/RX5day_DJF_HadGEM3-A-N216_historical_r1i1p%s_19600101-20131230.nc' % (i))
    files.append('file:///home/estimr1/EUCLEIA/indices/TG/yr/TG_yr_HadGEM3-A-N216_historical_r1i1p%s_19600101-20131230.nc' % (i))

In [8]:
from os.path import join

execute = wps.execute(
    identifier="fetch", #indices_clipping",
    inputs=[
       ("resource",files[0]),
       ("resource",files[1]),
       ("resource",files[2]),
       ("resource",files[3]),
       ("resource",files[4]),
       ("resource",files[5]),
       ("resource",files[6]),
       ("resource",files[7]),
       ("resource",files[8]),
       ("resource",files[9]),
       ("resource",files[10]),
       ("resource",files[11]),
       ("resource",files[12]),
       ("resource",files[13]),
       ("resource",files[14])
           ])

monitorExecution(execute, sleepSecs=5)
print execute.getStatus()


ProcessSucceeded

In [9]:
for o in execute.processOutputs:
    print o.reference


http://localhost:8090/wpsoutputs/flyingpigeon/output-9ef4b00a-d658-11e5-b3e3-477eb041dc03.txt

In [ ]: