Input/Output ============ Inputs ------ HydroCNHS has the following three main inputs: (1) Daily climate data including precipitation, temperature, and (optional) potential evapotranspiration (python *dictionary object*), (2) A model configuration file (*.yaml*; settings for the HydroCNHS and ABM models), and (3) ABM modules (*.py*; customized human models). Outputs ------- The outputs of HydroCNHS are stored in a data collector object, an attribute of HydroCNHS (e.g., *model.dc*). The main output is the daily streamflow at routing outlets. However, this data collector object will also contain other user-specified agent outputs as long as users use this data collector object in their ABM modules. See :ref:`Integrate an ABM` and :ref:`Data collector` for more information. Daily climate data ------------------ Temperature (temp; degC) and precipitation (prec; cm) are two required weather inputs for a simulation. Potential evapotranspiration (pet; cm) can be automatically calculated by HydroCNHS using the Hamon method. However, we encourage users to pre-calculate pet and provide it to HydroCNHS as an input to avoid repeated calculation, especially when running calibration. The daily climate inputs are in a python dictionary format, in which the subbasin outlet name is the key, and a daily time series (*list*) is the value, as shown below. .. code-block:: python temp = {'subbasin1': [7.7, 7.0, 6.6, 6.3, .......], 'subbasin2': [8.5, 4.0, 5.3, 6.2, .......]} Model configuration file ------------------------ A model configuration file is a YAML file that contains settings for the entire water system. The main sections in a model configuration file include Path, WaterSystem, LSM, Routing, and ABM. Please see the following description for each setting. Parameter and inputs definitions for rainfall-runoff and routing models are summarized in :numref:`table2` and :numref:`table3`, respectively. HydroCNHS has an embedded model builder. Therefore, users do not need to manually create the model configuration file (see the example in the following section). .. code-block:: yaml Path: WD: Modules: WaterSystem: StartDate: EndDate: DataLength: NumSubbasins: Outlets: NodeGroups: LSM: Routing: ABM: Modules: InstitDMClasses: DMClasses: DamAPI: RiverDivAPI: InsituAPI: ConveyingAPI: Institutions: RainfallRunoff: : Inputs: Pars: : Inputs: Pars: Routing: : : Inputs: Pars: : Inputs: Pars: ABM: : : Attributes: "agent's attributes dict, e.g., {}" Inputs: Priority: Links: DMClass: Pars: .. _table2: .. table:: Hydrological model parameters and suggested bounds. :align: center :width: 100% +----------+------------------------------------------+--------------+-------------------+---------------------+ |Module |Parameter name |Unit |Parameter |Bound | +==========+==========================================+==============+===================+=====================+ |GWLF |Curve number |-- |:math:`CN2` |[25, 100] | | +------------------------------------------+--------------+-------------------+---------------------+ | |Interception coefficient |-- |:math:`IS` |[0, 0.5] | | +------------------------------------------+--------------+-------------------+---------------------+ | |Recession coefficient |-- |:math:`Res` |[10\ :sup:`-3`\, 0.5]| | +------------------------------------------+--------------+-------------------+---------------------+ | |Deep seepage coefficient |-- |:math:`Sep` |[0, 0.5] | | +------------------------------------------+--------------+-------------------+---------------------+ | |Baseflow coefficient |-- |:math:`\alpha` |[0, 1] | | +------------------------------------------+--------------+-------------------+---------------------+ | |Percolation coefficient |-- |:math:`\beta` |[0, 1] | | +------------------------------------------+--------------+-------------------+---------------------+ | |Available/soil water capacity |cm |:math:`U_r` |[1, 15] | | +------------------------------------------+--------------+-------------------+---------------------+ | |Degree-day coefficient for snowmelt |cm/°C |:math:`D_f` |[0, 1] | | +------------------------------------------+--------------+-------------------+---------------------+ | |Land cover coefficient |-- |:math:`K_c` |[0.5, 1.5] | +----------+------------------------------------------+--------------+-------------------+---------------------+ |ABCD |Controls the amount of runoff and recharge|-- |:math:`a` |[0, 1] | | |during unsaturated soil | | | | | +------------------------------------------+--------------+-------------------+---------------------+ | |Control of the saturation level of the |-- |:math:`b` |[0, 400] | | |soils | | | | | +------------------------------------------+--------------+-------------------+---------------------+ | |Ratio of groundwater recharge to runoff |-- |:math:`c` |[0, 1] | | +------------------------------------------+--------------+-------------------+---------------------+ | |Control of groundwater discharge rate |-- |:math:`d` |[0, 1] | | +------------------------------------------+--------------+-------------------+---------------------+ | |Degree-day coefficient for snowmelt |cm/°C |:math:`D_f` |[0, 1] | +----------+------------------------------------------+--------------+-------------------+---------------------+ | | Lohmann|Subbasin unit hydrograph shape parameter |-- |:math:`G_{shape}` |[1, 100] | | | routing+------------------------------------------+--------------+-------------------+---------------------+ | |Subbasin unit hydrograph rate parameter |-- |:math:`G_{scale}` |[10\ :sup:`-2`\, 150]| | +------------------------------------------+--------------+-------------------+---------------------+ | |Wave velocity in the linearized Saint- |m/s |:math:`Velo` |[0.5, 100] | | |Venant equation | | | | | +------------------------------------------+--------------+-------------------+---------------------+ | |Diffusivity in the linearized Saint- |m\ :sup:`2`\/s|:math:`Diff` |[200, 5000] | | |Venant equation | | | | +----------+------------------------------------------+--------------+-------------------+---------------------+ .. _table3: .. table:: Hydrological model inputs and default values. :align: center :width: 100% +----------+---------------------------------------------+--------------+------------------------+---------------------+ |Module |Parameter name |Unit |Parameter |Default | +==========+=============================================+==============+========================+=====================+ |GWLF |Subbasin's drainage area |ha |:math:`Area` |-- | | +---------------------------------------------+--------------+------------------------+---------------------+ | |Latitude |deg |:math:`Latitude` |-- | | +---------------------------------------------+--------------+------------------------+---------------------+ | |Initial shallow saturated soil water content |cm |:math:`S0` |2 | | +---------------------------------------------+--------------+------------------------+---------------------+ | |Initial unsaturated soil water content |cm |:math:`U0` |10 | | +---------------------------------------------+--------------+------------------------+---------------------+ | |Initial snow storage |cm |:math:`SnowS` |5 | +----------+---------------------------------------------+--------------+------------------------+---------------------+ |ABCD |Subbasin's drainage area |-- |:math:`Area` |-- | | +---------------------------------------------+--------------+------------------------+---------------------+ | |Latitude |deg |:math:`Latitude` |-- | | +---------------------------------------------+--------------+------------------------+---------------------+ | |Initial saturated soil water content |cm |:math:`XL` |2 | | +---------------------------------------------+--------------+------------------------+---------------------+ | |Initial snow storage |cm |:math:`SnowS` |5 | +----------+---------------------------------------------+--------------+------------------------+---------------------+ | | Lohmann|Flow length between two outlets |m |:math:`FlowLength` |-- | | | routing+---------------------------------------------+--------------+------------------------+---------------------+ | |An instream control object, e.g., a reservoir|-- |:math:`InstreamControl` |False | +----------+---------------------------------------------+--------------+------------------------+---------------------+ ABM modules ----------- ABM modules are customized python scripts in which human components are designed through programming agent type classes and decision-making classes. HydroCNHS will load those user-specified classes and use them to initialize agents. More details are provided in the :ref:`Integrate an ABM` section.