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]:
'Flyingpigeon'

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


visualisation 	 : Just testing a nice script to visualise some variables 
sdm 	 : Species distribution model (SDM) 
weatherregimes 	 : Weather Regimes based on pressure patterns (kmean method) 
extractpoints 	 : Extract Timeseries for specified coordinates from grid data 
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. 
indices_percentile 	 : This process calculates climate indices based on one single variable and based on percentils of a referece period. 
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 of the birdhouse compute provider 

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


http://localhost:8090/wpsoutputs/flyingpigeon/output-c934795e-15e6-11e6-ad9e-d578c700e304.tar

In [ ]: