Content uploaded by Susanna Grasso
Author content
All content in this area was uploaded by Susanna Grasso on May 08, 2018
Content may be subject to copyright.
GeoPython Conference
Basel - Switzerland, May 7-9, 2018
Using PyWPS for Water Resources
Quantification in Mountain Basins
Susanna Grasso
Polytechnic of Torino
Department of Environment, Land and Infrastructure Engineering
GeoPython Conference 2018
What is a Flow Duration Curve?
This work presents a WPS service, built up using PYWPS and GRASS as backend, for geoprocessing operations to
estimate Flow Duration Curves (FDCs) in ungauged basins in North-West Italy.
A FDC represents the relationship between the magnitude and frequency of daily, weekly, mounthly streamflow for a particular
river basin, proving an estimate of the percentage of time a given streamflow was equaled or exceeded over a historical period.
Estimation of the FDC for a gauged site
80 days
21,86 %
Introduction
GeoPython Conference 2018
What are FDC curves used for?
High flowsFlood flows Intermediate flows Low flows
Hydropower
Ecosystem preservation
Water quality assessment
GeoPython Conference 2018
GeoPython Conference 2018
Estimation of the FDC for a ungauged site
In an ungauged site, the FDC can be represented with an analytical formulation through a regional statistical model. In particular
there are several examples in the literature of regional models for estimating the FDC from relationships based on physical
characteristics of a catchment.
Location of gauging stations used in the analysis
OBSERVED FDC
L-Moments
Ungauged
site
descriptors
Estimated
L-Moments
100+ Basin
descriptors
L-CA
L1 L-CV
Choice of
FDC
analytical
form
Multiple
regression
models
Method adapted from flood freq. analysis
•Laio et al. 2011, J. Hydrology
•Ganora & Laio 2015, WRR
Spatially Smooth Estimation method (SSEM)
GeoPython Conference 2018
Gli L-momenti permettono di
scegliere la distribuzione adatta
a = f(Y,b,c)
b= f(LCA, LCV)
c= f(LCA, LCV)
GeoPython Conference 2018
Logical framework
DELIMITATION
OF THE BASIN
EXTRACTION OF THE
GEOMORPHOLOGICAL
AND CLIMATIC
CHARACTERISTICS
CHOICE OF
DISTRIBUTION
(Burr, Weibull, Pareto)
CALCULATION OF THE
PARAMETERS
APPLICATION OF
REGRESSIONS FOR L-
MOMENTS (Y, LCV,LCA)
ESTIMATION
GeoPython Conference 2018
A first application developed
To WPS services
Insert
geomorphological
and climatic
desciptor
Manual estimation of
parameters distribution
based on L-moments
values
QGis Processing Toolbox
➢Provide access to GIS data and functionality over the internet
➢Allows users to access calculations independently of the underlying software (procedure accesible by
web browser)
➢Data does not need to be housed locally (client side) but are maintained by the hosting entity
➢Server processing times faster than client side scripting
GeoPython Conference 2018
What is WPS?
WPS (Web Processing Service) is one of the OGC specifications to provide access to GIS data
or functionality over the internet in a standardized way.
OGC Standard services:
• WMS - Web Map Service
• WFS - Web Feature Service
• WCS - Web Coverage Service
• WPS - Web Processing Service
GeoPython Conference 2018
CLIENT
Web Server
(Apache)
Database
PostgreSQL
Mapserver
GisClient3
Author
Client
Application Server
Mapping application:
Javascript,
Openlayers, CSS…
SERVER
Browser
Plugin
WPS
QGIS, ArcGIS
WMS
WFS
WCSC
WPS
WPS
Extension PyWPS
GRASS
PyWPS enables integration, publishing and
execution of Python processes via the WPS
standard.
The platform developed
GeoPython Conference 2018
class Process(WPSProcess):
"""Main process class"""
def __init__(self):
"""Process initialization"""
# PROCESS DESCRIPTION
WPSProcess.__init__(self,
identifier = "Renerfor_delimitazione",
title="Renerfor_delimitazione",
version = "0.1",
storeSupported = "true",
statusSupported = "true",
abstract="RENERFOR delimitazione di bacino",
grassLocation = "WGS84-UTM32N_32632")
# PROCESS INPUT/OUTPUT DECLARATION
# Input
self.Inputx = (self.addLiteralInput(identifier="Inputx",
title="Inserire la coordinata est della sezione di chiusura del bacino", type=FloatType)
self.Inputy= (self.addLiteralInput(identifier="Inputy",
title="Inserire la coordinata nord della sezione di chiusura del bacino", type=FloatType)
# Output
self.vectorout = (self.addComplexOutput(identifier="shapefilebacino",
title="shapefilebacino",
formats = [{"mimeType":"text/xml", "encoding":"utf8","schema":"http://schemas.opengis.net/gml/3.2.1/gml.xsd"}],
)
# # EXECUTION METHOD DEFINITION
def execute(self):
#estrazione bacino
grass.run_command('r.water.outlet', drainage='piemonte_drain_r100@PERMANENT', basin='BACINO', easting='%f’
%(self.Inputx.getValue()), northing=‘%f’ %(self.Inputy.getValue()),overwrite=True)
grass.run_command('g.region', zoom='BACINO')
grass.run_command('r.mask',input='BACINO', maskcats='1',quiet=True)
……..
GeoPython Conference 2018
Two WPS procedures are developed:
➢Delimitation of a basin
➢Extraction of basin descriptors and estimation of regional FDC curve:
The WPS services proposed
GeoPython Conference 2018
GRASS
r.water.outlet
Creates watershed basins from
the drainage direction map
DELIMITATION OF A BASIN
GeoPython Conference 2018
DELIMITATION OF A BASIN
GeoPython Conference 2018
DELIMITATION OF A BASIN
GeoPython Conference 2018
ESTIMATION OF REGIONAL FDC CURVE
GRASS
r.univar
r.stats
Python
Estimate regional
L-moments
Calculate
distribution
parameters
Plotting FDC
curve
openpyxl
Matplotlib
GeoPython Conference 2018
ESTIMATION OF REGIONAL FDC CURVE
GeoPython Conference 2018
ESTIMATION OF REGIONAL FDC CURVE
Thank you for
your attention
References
•Gallo, E., Ganora, D., Laio, F., Masoero, A., and Claps, P.: Atlante dei bacini imbriferi piemontesi ISBN:978-88-96046-06-7,
available at: http://www.idrologia.polito.it/web2/open-data/Renerfor/atlante_bacini_piemontesi_LR.pdf (last access:
05/05/2018), 2013 (in Italian).
•Ganora D., Laio F., Masoero A. and Claps P.,Spatially-Smooth regionalization of Flow Duration Curves in non- pristine basins,
IAHS-ICWRS Conference, Bochum, Proceeding IAHS 373, pp.73-80, 2016.
•Ganora, D. and Laio, F.: Hydrological Applications of the Burr Distribution: Practical Method for Parameter Estimation, J. Hydrol.
Eng., 20, 11, doi:10.1061/(ASCE)HE.1943-5584.0001203, 2015.
•Ganora, D., Gallo, E., Laio, F., Masoero, A., and Claps, P.: Analisi idrologiche e valutazioni del potenziale idroelettrico dei bacini
piemontesi ISBN:978-88-96046-07-4, available at: http://www.idrologia.polito.it/web2/open-
data/Renerfor/analisi_idrologiche_LR.pdf (last access: 05/05/2018), 2013 (in Italian).
•Laio, F., Ganora, D., Claps, P., and Galeati, G.: Spatially smooth regional estimation of the flood frequency curve (with
uncertainty), J. Hydrol., 408, 67–77, doi:10.1016/j.jhydrol.2011.07.022, 2011.
•K Nruthya, VV Srinivas, Evaluating Methods to Predict Streamflow at Ungauged Sites using Regional Flow Duration Curves: A
Case Study, Aquatic Procedia 4, 641-648
•RM Vogel, NM Fennessey, Flow-duration curves. I: New interpretation and confidence intervals, Journal of Water Resources
Planning and Management 120 (4), 485-504
Contact:
susanna.grasso@gmail.com