cwatm_P_minus_Q#

cwatm.cwatm_P_minus_Q(folder, outlet, area, crs=None, id_outlet=None, id_area=None, outlet_crs=None, area_crs=None)[source]#

Compute “P-Q” variables from Precipitation and discharge, for all available files.

Please note that .tss files are handled here with pandas. Therefore, the output format is different (white space separators are replaced with tabulations, headers are removed).

Parameters#

folderpath (str or pathlib.Path)

Folder to be processed.

outletpath (str or pathlib.Path) or geopandas.GeoDataFrame (or GeoSeries)

Vector file or variable containig the point locations where data will be extracted.

areapath (str or pathlib.Path) or gepandas.GeoDataFrame (or GeoSeries)

Vector file or variable containig the polygons delimiting the area drained at the point locations specified in outlet. Will be used to convert precipitation maps [m] into extensive quantities [m3/s].

crsint or str or rasterio.crs.CRS, optional

Coordinate Reference System of CWatM results, if they do not have any included. When passed as an integer, crs refers to the EPSG code. When passed as a string, crs can be OGC WKT string or Proj.4 string.

id_outletstr, optional

Name of the column in outlet containing the gauge names. If None, outlet index is considered.

id_areastr, optional

Name of the column in area containing the gauge names. If None, area index is considered.

Returns#

Creates corresponding P-Q files as vector files (‘.json’), containing timeseries for each gauge present in area and outlet files.