Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

class urbanwb.measure.Measure(tot_meas_area, runoff_to_stor_layer, intstor_meas_t0, EV_evaporation, num_stor_lvl, infilcap_int_meas, storcap_top_meas, storcap_btm_meas, stor_top_meas_t0, stor_btm_meas_t0, storcap_int_meas, top_meas_area, ET_transpiration, evaporation_factor_meas, IN_infiltration, infilcap_top_meas, btm_meas_area, btm_meas_transpiration, connection_to_gw, limited_by_gwl, k_sat_uz, btm_level_meas, btm_discharge_type, runoffcap_btm_meas, dischlvl_btm_meas, c_btm_meas, surf_runoff_meas_OW, ctrl_runoff_meas_OW, overflow_meas_OW, surf_runoff_meas_UZ, ctrl_runoff_meas_UZ, overflow_meas_UZ, surf_runoff_meas_GW, ctrl_runoff_meas_GW, overflow_meas_GW, surf_runoff_meas_SWDS, ctrl_runoff_meas_SWDS, overflow_meas_SWDS, surf_runoff_meas_MSS, ctrl_runoff_meas_MSS, overflow_meas_MSS, surf_runoff_meas_Out, ctrl_runoff_meas_Out, overflow_meas_Out, greenroof_type_measure, **kwargs)          [source]

Bases: object

Creates an instance of Measure class with given initial states and properties, iterates sol() function to compute states and fluxes of measure at each time step.

 

Parameters:

  • tot_meas_area (float) – total area of measure [m^2]
  • num_stor_lvl (int) – predefined number of storage layers [1, 2 or 3]
  • runoff_to_stor_layer (int) – predefined selection at which measure layer runoff from other area is stored, inflow runoff can only take place at interception layer (1) or at bottom storage layer (3) [1 or 3]
  • Active processes (#) –
  • EV_evaporation (int) – predefined selection if evaporation from measure interception layer is possible (1) or not (0) [0 or 1]
  • ET_transpiration (int) – predefined selection if evapotranspiration from measure is possible (1) or not (0) [0 or 1]
  • IN_infiltration (int) – predefined selection if infiltration from measure is possible (1) or not (0) [0 or 1]
  • SD_delay (int) – predefined selection if slow drainage from measure is possible (1) or not (0) [0 or 1]
  • FD_pumping (int) – predefined selection if fast drainage from measure is possible (1) or not (0) [0 or 1]
  • RTC_realtime (#) – predefined selection if real- me-control release from measure is possible (1) or not (0) [0 or 1]
  • Interception layer (#) –
  • storcap_int_meas (float) – predefined storage capacity of interception layer of measure [mm]
  • infilcap_int_meas (float) – predefined infiltration capacity of interception layer of measure [mm/d]
  • stor_int_meas_t0 (float) – initial storage in interception layer of measure (at t=0) [mm]
  • Top storage layer (#) –
  • top_meas_area (float) – predefined area of top storage layer of measure [m^2]
  • storcap_top_meas (float) – predefined storage capacity of top storage layer of measure [mm]
  • infilcap_top_meas (float) – predefined infiltration capacity of top storage layer of measure [mm/d]
  • stor_top_meas_t0 (float) – initial storage in top storage layer of measure (at t=0) [mm]
  • Bottom storage layer (#) –
  • btm_meas_area (float) – predefined area of bottom storage layer of measure [m^2]
  • storcap_btm_meas (float) – predefined storage capacity of bottom storage layer of measure [mm]
  • connection_to_gw (int) – predefined percolation (connection) from measure bottom storage layer to groundwater is possible (1) or not (0) [0 or 1]
  • limited_by_gwl (int) – predefined limitation of percolation from measure to groundwater if groundwater level is below measure bottom level, limited (1) or unlimited (0) [0 or 1]
  • btm_level_meas (float) – predefined bottom level of measure [m-SL]
  • btm_meas_transpiration (int) – predefined selection if transpiration from bottom storage layer of measure is possible (1) or not (0) [0 or 1]
  • btm_discharge_type (int) – predefined discharge type from bottom storage layer of measure [0:flux or 1:level]
  • runoffcap_btm_meas (float) – predefined runoff capacity from bottom storage layer of measure [mm/d]
  • dischlvl_btm_meas (float) – predefined discharge level from bottom storage layer of measure [mm]
  • c_btm_meas (float) – predefined hydraulic resistance for level induced discharge from bottom storage layer of measure [d]
  • k_sat_uz (float) – saturation permeability of soil [mm/d]
  • evaporation_factor_meas (float) – predefined evaporation factor of measure [-]
  • stor_btm_meas_t0 (float) – initial storage in bottom storage layer of measure (at t=0) [mm]
  • Runoff from measure flows to (#) –
  • surf_runoff_meas_OW (int) – predefined definition of surface runoff from measure storage 1 (interception level) to Open Water (0 = no, 1 = yes)
  • ctrl_runoff_meas_OW (int) – predefined definition of controlled runoff from measure storage 3 (bottom level) to Open Water (0 = no, 1 = yes)
  • overflow_meas_OW (int) – predefined definition of overflow from measure storage 3 (bottom level) to Open Water (0 = no, 1 = yes)
  • surf_runoff_meas_UZ (int) – predefined definition of surface runoff from measure storage 1 (interception level) to Unsaturated Zone (0 = no, 1 = yes)
  • ctrl_runoff_meas_UZ (int) – predefined definition of controlled runoff from measure to Unsaturated Zone (0 = no, 1 = yes)
  • overflow_meas_UZ (int) – predefined definition of overflow from measure to Unsaturated Zone (0 = no, 1 = yes)
  • surf_runoff_meas_GW (int) – predefined definition of surface runoff from measure to groundwater (0 = no, 1 = yes)
  • ctrl_runoff_meas_GW (int) – predefined definition of controlled runoff from measure to groundwater (0 = no, 1 = yes)
  • overflow_meas_GW (int) – predefined definition of overflow from measure to groundwater (0 = no, 1 = yes)
  • surf_runoff_meas_SWDS (int) – predefined definition of surface runoff from measure to storm water drainage system (0 = no, 1 = yes)
  • ctrl_runoff_meas_SWDS (int) – predefined definition of controlled runoff from measure to storm water drainage system (0 = no, 1 = yes)
  • overflow_meas_SWDS (int) – predefined definition of overflow from measure to storm water drainage system (0 = no, 1 = yes)
  • surf_runoff_meas_MSS (int) – predefined definition of surface runoff from measure to mixed sewer system (0 = no, 1 = yes)
  • ctrl_runoff_meas_MSS (int) – predefined definition of controlled runoff from measure to mixed sewer system (0 = no, 1 = yes)
  • overflow_meas_MSS (int) – predefined definition of overflow from measure to mixed sewer system (0 = no, 1 = yes)
  • surf_runoff_meas_Out (int) – predefined definition of surface runoff from measure to outside water (0 = no, 1 = yes)
  • ctrl_runoff_meas_Out (int) – predefined definition of controlled runoff from measure to outside water (0 = no, 1 = yes)
  • overflow_meas_Out (int) – predefined definition of overflow from measure to outside water (0 = no, 1 = yes)

 

sol(p_atm, e_pot_ow, r_pr_meas, r_cp_meas, r_op_meas, r_up_meas, pr_no_meas_area, cp_no_meas_area, op_no_meas_area, up_no_meas_area, gw_no_meas_area, gwl_prevt, delta_t)          [source]

Calculates states and fluxes in measure during current time step.

 

Parameters:

  • p_atm (float) – rainfall during current time step [mm]
  • e_pot_ow (float) – potential Open Water evaporation during current time step [mm]
  • r_pr_meas (float) – runoff from Paved Roof to measure during current time step [mm]
  • r_cp_meas (float) – runoff from Closed Paved to measure during current time step [mm]
  • r_op_meas (float) – runoff from Open Paved to measure during current time step [mm]
  • r_up_meas (float) – runoff from Unpaved to measure during current time step [mm]
  • pr_no_meas_area (float) – area of Paved Roof without measure [m^2]
  • cp_no_meas_area (float) – area of closed pave without measure [m^2]
  • op_no_meas_area (float) – area of Open Paved without measure [m^2]
  • up_no_meas_area (float) – area of Unpaved without measure [m^2]
  • gw_no_meas_area (float) – area of groundwater without measure [m^2]
  • gwl_prevt (float) – groundwater level at previous time step [m-SL]
  • delta_t (float) – length of time step [d]

 

Returns:                               A dictionary of computed states and fluxes of measure during current time step:

  • prec_meas – Direct rainfall on measure during current time step [mm]
  • sum_r_meas – Total runoff from Paved Roof, Closed Paved, Open Paved, Unpaved to measure during current time step [mm]
  • int_meas – Interception storage on interception layer of measure after rainfall at the beginning of current time step [mm]
  • e_atm_meas – Evaporation form interception layer of measure during current time step [mm]
  • interc_down_meas – Downward flow from interception layer of measure during current time step [mm]
  • surf_runoff_meas – Surface runoff from interception layer of measure during current time step [mm]
  • intstor_meas – Remaining interception storage on interception layer of measure during current time step [mm]
  • ini_stor_top_meas – Storage in top storage layer of measure at the beginning of current time step [mm]
  • t_atm_top_meas – Transpiration from top storage layer of measure during current time step [mm]
  • perc_top_meas – Percolation from top layer of measure at the current time step [mm]
  • fin_stor_top_meas – top layer storage at the end of current time step [mm]
  • ini_stor_btm_meas – bottom layer storage at the beginning of current time step [mm]
  • t_atm_btm_meas – transpiration from bottom layer of measure at the current time step [mm]
  • p_gw_btm_meas – percolation from bottom layer of measure to groundwater during current time step [mm]
  • runoff_btm_meas – runoff from the bottom layer of the measure during current time step [mm]
  • fin_stor_btm_meas – bottom storage at the end of the current time step [mm]
  • overflow_btm_meas – bottom storage overflow during current time step [mm]
  • q_meas_ow – Measure outflow to Open Water during current time step [mm]
  • q_meas_uz – Measure outflow to Unsaturated Zone during current time step [mm]
  • q_meas_gw – Measure outflow to groundwater during current time step [mm]
  • q_meas_swds – Measure outflow to storm water drainage system during current time step [mm]
  • q_meas_mss – Measure outflow to mixed sewer system during current time step [mm]
  • q_meas_out – Measure outflow to outside water during current time step [mm]

Return type:                         (dictionary)

3         FAQ

  1. What are area with measure, area without measure and measure inflow area?
    Image Modified
    Figure   17      Illustration of measure inflow area
  • All individual areal components of the simulation model, PR, OP, etc., mentioned in the documentation, basically are all areas without applied measure. Figure 17  shows an example of applying a measure on OP. If the (green) measure area is 2 m2, and the total OP area is 10 m2, the (blue + grey) area of OP without measure is 10 – 2 = 8 m2.
  • The measure inflow area (green + blue) should always be larger than (or equal to) the measure area (green) and limited by the total paved area (green + blue + grey). The total measure inflow area can be larger than the total OP area in the example, when also part of the PR and / or the CP area runoff is diverted to the measure inflow area in OP.

4         References for parameter estimations

  • Penman, H. L. (1948). Natural evaporation from Open Water, bare soil and grass. Proceedings of the Royal Society of London. Series A. Mathematical and Physical Sciences, 193(1032), 120145. 
  • Monteith, J. L. (1965, July). Evaporation and environment. In Symp. Soc. Exp. Biol (Vol. 19, No. 205-23, p. 4). 
  • Feddes, R.A., Kowalik, P.J., Zaradny, H., (1978). Simulation of filed water use and crop yield. Simulation Monographs. Pudoc, Wageningen, 189pp 
  • DE JONG VAN LIER, Q., et al (2008). Macroscopic root water uptake distribution using a matric flux potential approach. Vadose Zone Journal, 2008, 7.3: 1065-1078. 
  • Allen, R.G., Pereira, L.S., Raes, D., and Smith, M. 1998. Crop evapotranspiration: Guidelines for computing crop water requirements. FAO Irrigation and Drainage Paper No. 56, United Nations, FAO, Rome, Italy. 
  • STOWA, 2009 rapport 11. VERBETERING BEPALING ACTUELE VERDAMPING VOOR HET STRATEGISCH WATERBEHEER. isbn 978.90.5773.428.1 
  • Makkink, G. F. (1957). Testing the Penman formula by means of lysimeters. Journal of the Institution of Water Engineers, 11, 277-288.
  • Susana, Urban pluvial flooding and climate change: London (UK), Rafina (Greece) and Coimbra (Portugal).
  • Benedict, M. A., & McMahon, E. T. (2006). Green infrastructure. Island, Washington, DC. 
  • LID, Low impact development — a design manual for urban areas.

5      Running the model

5.1   Overview

The script model can be run from windows command prompt or with run.bat file. The latter choice is highly recommended.

For the time being, the most commonly used function is savecsv, batch-run-sdf and batch-run-measure

The running_sample folder in the Urbanwb package includes the sample of running the model for both basic model and model with measure.

Two sorts of input are necessary to start the Urbanwb model:

Dynamic input : The forcing — Hourly time series of Precipitation, potential Open Water evaporation and potential reference crop evapotranspiration. The user is responsible for data preprocessing — clean data, fill vacancy, remove unrealistic data and make sure the data is in float type. Make sure the column name is the same because the script uses the column name to index which data is precipitation and evaporation.

Static input : All the static input parameters are stored in the configuration file suffixed with .ini . Currently, two configuration files are indispensable for every function to use — one is neighbourhood configure file, the other is measure configuration file. If no measure is included in the modelling, please specify measure_applied=false in measure configuration file. Though the script will automatically do some checks after reading the configuration file to make it fool proof, for example it will update the measure-related area with zero if no measure is applied even if it is not zero due to the user’s carelessness, it is highly recommended that the user carefully deals with the configuration input. Besides, the user should modify the parameters according to the local context of his area of interest and expected setups. Be aware of not changing the parameter name, otherwise the model goes wrong. The descriptions of the parameters are in the configuration file, documentation and script docstrings for the user’s cross check.

5.2   Input time series and parameters

5.2.1    Time series (Dynamic input)

The forcing of Urbanwb model is the time series of:

  • precipitation (only rainfall considered)
  • potential Open Water evaporation (i.e. Penman evaporation – Penman, 1948)
  • potential reference crop evapotranspiration (i.e. Penman-Monteith evaporation – Montheith, 1965 or Makkink evaporation – Makkink, 1957)

Note:

If Penman evaporation is not directly available, since it is not straightly measured, but (class-A) pan evaporation data are available, Pan evaporation can be multiplied by a factor 0.77 to convert to Penman evaporation (Linacre, 1994). The model assumes potential Open Water evaporation from actual interception evaporation on paved surfaces. Evapotranspiration for the unpaved areas (and reference crop grass) is assumed to be 0.8982 * Penman evaporation (Droogers, 2009).



Often hourly potential Open Water evaporation data are not available, or even daily evaporation time series are not available. Then assumptions and simplifications will be made on evaporation interpolation. For instance, when only monthly potential evaporation data and daily sunrise and sunset data are available, you can transform to hourly data by:

Hourly time series of precipitation (actually only rainfall) [mm] and potential evaporation of Open Water [mm]. (for grass, it is approximately 0.8982 * Penman evaporation – Droogers, 2009) Length should better be most recent 30 years. Atmosphere is the most crucial exchange to the model. 1. Format:

First, divide the monthly values by the number of days of these months. Second, assume zero evaporation during night hours and determine the hourly evaporation by dividing the daily values by the number of daily hours between sunrise and sunset.

All conversion required to retrieve hourly evaporation have to be done before entering these input data in the model.

The length of the time series of rainfall and evaporation is advised to be 30 years or more, preferably ending as recent as possible.

Regarding formats, CSV file format is preferred with corresponding column names. Check the data on vacancies and unrealistic values. Make sure the data is in float type.

5.2.2    Parameters (Static input)

Land use at or above surface level are divided into 5 components, namely Paved Roofs (buildings), Closed Paved (roads, etc.), Open Paved (pavements, parkings, etc.), Unpaved (grass land, etc.) and Open Water (ditches, canals, ponds, etc.). The fractions of the five land use types should sum up to 100%. In addition, the total area [m2] of the study area is required input. Besides, for paved areas (PR, CP, OP), three additional types of fractions have to be defined:

  1. disconnected fraction of three paved areas: “Part disconnected from sewer”: This disconnect fraction represents the percentage of each paved area that is disconnected from the sewer system. For instance if this fraction is 5% for Paved Roofs, it implies that 5% of the Paved Roofs (PR) is disconnected to sewer system. Consequently, 5% of the runoff from the Paved Roofs (PR) will not end in the sewer system but is assumed to flow to the Unpaved area.
  2. part of building above groundwater (GW): “part of buildings above GW”: This fraction means, in terms of Paved Roofs only, how much percentage of Paved Roofs (PR) has its bottom of foundation above the phreatic water table. This fraction in the model defines the total area size of the (shallow) groundwater (GW).
  3. part of Open Water above groundwater (GW): “Part of OW above GW”: This fraction is more or less similar to part of building above groundwater (GW). It affects the calculation of the size of the groundwater area. Say we have 300m2 Open Water. If this fraction is zero, then groundwater area is limited by this 300m2. If this fraction is 100%, then groundwater will also contain this 300m2 as all Open Water is assumed to be above the groundwater table.

To sum up, type 2 and type 3 fractions influence the total area of (shallow) groundwater (GW). This area is important since all the storage and fluxes in the model are calculated in depth [mm], so the conversion from one component to another component is dependent on the area ratio of these two components. Therefore, these two additional fractions (type 2 and type 3) are defined to determine the actual groundwater area in the model.

Runoff from paved surface to sewer systems only occurs when the surface interception storage capacity can no longer handle excessive rainfall. This runoff can flow to either of the two available sewer systems. The division is defined by the fraction (X%) flowing to the “Storm Water Drainage System”, the part of paved area that has a storm water drainage system. The rest of the paved runoff (100% – X%) is automatically defined to flow to the “Mixed Sewer System”, the part of paved area that has a combined sewer system.

Design standard / Design rainfall of sewer system.
In the Netherlands, the sewer overflow on the street is designed to occur once every two years. Hence 2 year is chosen as the design rainfall return period. Its corresponding rainfall intensity (16.8 mm/hour) is determined by rainfall statistics.
Consequently, for SWDS, the predefined hourly discharge capacity from SWDS to OW is determined by subtracting the interception capacity of the paved areas (1.6 mm) and the storage capacity of the SWDS (2 mm) from the T=2year rainfall intensity (16.8 mm), resulting in 13.2 mm/hr. This 13.2 mm/hour is the discharge capacity of SWDS to Open Water above which sewer water will overflow onto the street.
For the MSS the discharge capacity to the waste water treatment plant (WWTP) is calculated in a similar way. In the Netherlands the combined sewer overflow onto the Open Water is designed to occur approx. six times a year (T=1/6year). The corresponding rainfall intensity is 6.7 mm/hour. This will only occur when the discharge capacity of to the WWTP is exceeded. Hence the discharge capacity from MSS to WWTP is 6.7 – 1.6 (paved area interception) = 5.2 mm/hour.
The storage capacity of the MSS in the Netherlands is assumed to be 9 mm, hence MSS overflow onto street will occur above 16.8 – 1.6 – 9 = 6.2 mm/hour.
Please note that these values can (and have to be) adapted by the user dependent on the actual climate and sewer design of the study area.

5.3   Functions

5.3.1    save_to_csv

This function performs single run of the model. It can save all results or selected results in to an output csv file.

# save all results

#    module name     func name     timeseries name neighbourhood measure     outputfile

python -m urbanwb.main_with_measure save_to_csv timeseries.csv config1.ini config2.ini output.csv


# save selected results

#     module name     func name     timeseries name neighbourhood measure     outputfile variable to save     save_all  is False -> save selected

python -m urbanwb.main_with_measure save_to_csv timeseries.csv config1.ini config2.ini output.csv  owl r_pr_swds  theta_uz --save_all=False 

5.3.2    batch_run_sdf

This function performs batch run on different pumping capacity to produce database which can be used to plot Storage-Discharge-Frequency (SDF) Curve

  Running the model — urbanwb 0.1.0 documentation 

# mean daily rainfall as baseline q, batch run [4,5]

#     module name     function     ts.csv     config1.ini     config2.ini     output.csv     random number     baseline q default

python -m urbanwb.main_with_measure batch_run_sdf ep_ts.csv  ep_neighbourhood.ini  ep_measure.ini  ep2_results.csv --q_list=[4,5]


 

# 4 as baseline q, batch run [10,20]

#     module name     function     ts.csv     config1.ini     config2.ini     output.csv     random number     baseline q predefined

python -m urbanwb.main_with_measure batch_run_sdf ep_ts.csv ep_neighbourhood.ini ep_measure.ini ep2_results1.csv --q_list=[10,20] --baseline_q=4


# 3 as baseline q, batch run [min,max,steps] --- [4,8,3]

#     module name     function     ts.csv     config1.ini     config2.ini     output.csv     [min,max,steps]     baseline q:predefined     AP: True to enable  [min,max,steps]. if False, then q_list random numbers

python -m urbanwb.main_with_measure batch_run_sdf ep_ts.csv ep_neighbourhood.ini ep_measure.ini ep2_results2.csv --q_list=[4,8,3] --baseline_q=3 --arithmetic_progression=True

...

Figure   20      The SDF curve for several return periods

5.3.3    batch_run_meas

This function performs batch run on measure. First do batch run with different (pairs of) values, then do baseline run (no measure). In the end, save the runoff time series into a csv file.

It can vary one parameter with a list of values or vary two parameters at the same time.

#     module     function     ts.csv     config1.ini     config2.ini     output.csv     var to change     value to update var     corresp var     value for corresp var     baseline runoff     measure runoff to save 

python -m urbanwb.main_with_measure batch_run_measure ep_ts.csv ep_neighbourhood.ini ep_measure.ini ep3_results.csv --varkey="storcap_btm_meas" --vararrlist1=[1050,1200] --correspvarkey=None -vararrlist2=None --baseline_variable="r_cp_swds" --variable_to_save="q_meas_swds"

python -m urbanwb.main_with_measure batch_run_measure ep_ts.csv ep_neighbourhood.ini ep_measure.ini ep3_results.csv --varkey="storcap_btm_meas" --vararrlist1=[1050,1200] --correspvarkey="runoffcap_btm_meas" --vararrlist2=[30,40] --baseline_variable="r_cp_swds" --variable_to_save="q_meas_swds"

python -m urbanwb.getconstants ep3_results.csv --num_year=30

5.4   References

  • DROOGERS, P. Verbetering bepaling actuele verdamping voor het strategisch waterbeheer. Definitiestudie. STOWA, 2009.
  • PENMAN, Howard Latimer. Natural evaporation from Open Water, bare soil and grass. Proc. R. Soc. Lond. A, 1948, 193.1032: 120-145.
  • MONTEITH, John L., et al. Evaporation and environment. In: Symp. Soc. Exp. Biol. 1965. p. 4.
  • LINACRE, Edward T. Estimating US Class A pan evaporation from few climate data. Water International, 1994, 19.1: 5-14.