plans.hydrology.upscaled#
{Short module description (1-3 sentences)} todo docstring
Features#
todo docstring
{feature 1}
{feature 2}
{feature 3}
{etc}
Overview#
todo docstring {Overview description}
Examples#
todo docstring {Examples in rST}
Print a message
# print message
print("Hello world!")
# [Output] >> 'Hello world!'
Classes
|
Rainfall-Runoff-Evaporation model based on Linear Storage and Fill-And-Spill (FAS) mechanism. |
|
Rainfall-Runoff model based on a Linear Storage. |
|
Rainfall-Runoff-Evaporation model based on a Linear Storage. |
|
Linear Storage Model. |
|
This is a global Rainfall-Runoff model. |
- class plans.hydrology.upscaled.LinearStorage(name='MyLinearStorage', alias='LS01')[source]#
Bases:
Model
Linear Storage Model. This is a Toy Model. No inflow, only outflows. Simulates storage decay only.
- __init__(name='MyLinearStorage', alias='LS01')[source]#
Initialize the
DataSet
object.- Parameters:
name (str) – unique object name
alias (str) – unique object alias. If None, it takes the first and last characters from name
- _set_model_params()[source]#
Intenal method for setting up model parameters data
- Returns:
None
- Return type:
None
- setter(dict_setter)[source]#
Set selected attributes based on an incoming dictionary. This is calling the superior method using load_data=False.
- Parameters:
dict_setter (dict) – incoming dictionary with attribute values
- Returns:
None
- Return type:
None
- load_params()[source]#
Load parameter data from parameter file (stored in self.file_params)
Warning
This method overwrites model data.
- Returns:
None
- Return type:
None
- load_data()[source]#
Load simulation data from folder data (stored in self.folder_data). Overwrites superior methods.
Warning
This method overwrites model data.
- Returns:
None
- Return type:
None
- setup()[source]#
Set model simulation.
Warning
This method overwrites model data.
- Returns:
None
- Return type:
None
- solve()[source]#
Solve the model for inputs and initial conditions by numerical methods.
Warning
This method overwrites model data.
- Returns:
None
- Return type:
None
- class plans.hydrology.upscaled.LSRR(name='MyLSRR', alias='LSRR001')[source]#
Bases:
LinearStorage
Rainfall-Runoff model based on a Linear Storage. This is a Toy Model. Inflow rain (P) in a necessary data inputs.
- __init__(name='MyLSRR', alias='LSRR001')[source]#
Initialize the
DataSet
object.- Parameters:
name (str) – unique object name
alias (str) – unique object alias. If None, it takes the first and last characters from name
- _set_model_params()[source]#
Intenal method for setting up model parameters data
- Returns:
None
- Return type:
None
- _set_view_specs()[source]#
Set view specifications. Expected to increment superior methods.
- Returns:
None
- Return type:
None
- setter(dict_setter)[source]#
Set selected attributes based on an incoming dictionary. This is calling the superior method using load_data=False.
- Parameters:
dict_setter (dict) – incoming dictionary with attribute values
- Returns:
None
- Return type:
None
- load_data()[source]#
Load input simulation data. Expected to overwrite superior methods.
Warning
This method overwrites model data.
- Returns:
None
- Return type:
None
- setup()[source]#
Set model simulation data.
Warning
This method overwrites model data.
- Returns:
None
- Return type:
None
- class plans.hydrology.upscaled.LSRRE(name='MyLSRRE', alias='LSRRE001')[source]#
Bases:
LSRR
Rainfall-Runoff-Evaporation model based on a Linear Storage. This is a Toy Model. Inflow rain (P) and outflow potential evaporation (E_pot) are necessary data inputs.
- __init__(name='MyLSRRE', alias='LSRRE001')[source]#
Initialize the
DataSet
object.- Parameters:
name (str) – unique object name
alias (str) – unique object alias. If None, it takes the first and last characters from name
- setup()[source]#
Set model simulation.
Warning
This method overwrites model data.
- Returns:
None
- Return type:
None
- class plans.hydrology.upscaled.LSFAS(name='MyLSFAS', alias='LSFAS001')[source]#
Bases:
LSRRE
Rainfall-Runoff-Evaporation model based on Linear Storage and Fill-And-Spill (FAS) mechanism. Inflow rain (P) and potential evapotranspiration (E_pot) are necessary data inputs.
- __init__(name='MyLSFAS', alias='LSFAS001')[source]#
Initialize the
DataSet
object.- Parameters:
name (str) – unique object name
alias (str) – unique object alias. If None, it takes the first and last characters from name
- _set_model_params()[source]#
Intenal method for setting up model parameters data
- Returns:
None
- Return type:
None
- setup()[source]#
Set model simulation.
Warning
This method overwrites model data.
- Returns:
None
- Return type:
None
- class plans.hydrology.upscaled.UpscaledModel(name='MyGlobal', alias='Glo001')[source]#
Bases:
LSFAS
This is a global Rainfall-Runoff model. Simulates the the catchment as if is a global system. Expected inputs:
clim.csv for Precipitation (P) and Potential Evapotranspiration (E_pot).
path_areas.csv for deriving the geomorphic unit hydrograph.
# todo [major docstring] examples
- __init__(name='MyGlobal', alias='Glo001')[source]#
Initialize the
DataSet
object.- Parameters:
name (str) – unique object name
alias (str) – unique object alias. If None, it takes the first and last characters from name
- _set_model_params()[source]#
Intenal method for setting up model parameters data
- Returns:
None
- Return type:
None
- _set_view_specs()[source]#
Set view specifications. Expected to increment superior methods.
- Returns:
None
- Return type:
None
- setter(dict_setter)[source]#
Set selected attributes based on an incoming dictionary. This is calling the superior method using load_data=False.
- Parameters:
dict_setter (dict) – incoming dictionary with attribute values
- Returns:
None
- Return type:
None
- load_data()[source]#
Load simulation data. Expected to increment superior methods.
- Returns:
None
- Return type:
None
- setup()[source]#
Set model simulation.
Warning
This method overwrites model data.
- Returns:
None
- Return type:
None
- solve()[source]#
Solve the model for inputs and initial conditions by numerical methods.
Warning
This method overwrites model data.
- Returns:
None
- Return type:
None
- export(folder, filename, views=False, mode=None)[source]#
Export object resources. Expected to be called after setup.
- Parameters:
folder (str) – path to folder
filename (str) – file name without extension
- Returns:
None
- Return type:
None
- view(show=True, return_fig=False, mode=None, basin=None)[source]#
Get the basic visualization.
- Parameters:
show (bool) – option for showing instead of saving.
Note
Uses values in the
view_specs()
attribute for plotting.
- static propagate_inflow(inflow, unit_hydrograph)[source]#
Flow routing model based on provided unit hydrograph. Inflow and Unit Hydrograh arrays are expected to be the same size. # todo [feature] improve so it can handle a smaller Unit Hydrograph (using slicing, etc)
- Parameters:
inflow (
numpy.ndarray
) – 1d numpy array of inflowunit_hydrograph (
numpy.ndarray
) – 1d numpy array of Unit Hydrograph (sum=1)
- Returns:
outflow array
- Return type:
numpy.ndarray