Metadata-Version: 2.1
Name: threedi-urban-eia-nl
Version: 0.0.1
Summary: 3Di batch calculations
Author-email: Daan van Ingen <daan.vaningen@nelen-schuurmans.nl>
License: MIT
Project-URL: Repository, https://github.com/nens/threedi-urban-eia-nl
Project-URL: Changelog, https://github.com/nens/threedi-urban-eia-nl/blob/master/CHANGES.rst
Classifier: Framework :: Django
Classifier: Programming Language :: Python
Classifier: License :: OSI Approved :: MIT License
Description-Content-Type: text/x-rst
License-File: LICENSE
Requires-Dist: click
Requires-Dist: netCDF4
Requires-Dist: pandas
Requires-Dist: threedi-api-client >=4.0.0
Requires-Dist: threedigrid >=1.0.16
Requires-Dist: numpy <2
Requires-Dist: SQLAlchemy

threedi-urban-eia-nl
==========================================

Introduction
------------
This tool can be used for reeksberekeningen.

Installation
------------
The easiest way to install the tool is through PyPi.

    $ python3 -m pip install threedi-urban-eia-nl

Usage
-----

To ensure the correct behaviour of this tool please go through the following steps:

#. Make sure your aggregation_settings table in the SQLite contains 3 entries for discharge: `cum`, `cum_negative`, and `cum_positive`. And all have `timestep` set to 3600.

#. Create a folder with all the rain files you want to use in your simulations. These rain files should be in 'min,mm'-format, where min is the timestep in minutes and mm is the amount of rain that falls during the timestep in millimeters. Each timestep is seperated by a newline like in the example below::

    0,5.0
    30,1.5
    60,0.0
#. Create an output folder in which the result files will be stored.
#. Find the "id" of your model in the Threedi Model List: https://api.3di.live/v3/threedimodels/
#. Run ``$ run-rain-series-simulations --help`` to see which arguments you need to specify.
#. Run ``$ process-rain-series-results --help`` to see which arguments you need to specify.

Created Files and Directories
-----------------------------

- aggregation_netcdf, directory containing simulation aggregate result data
- simulations, directory containing simulation log data (use --debug option)
- threedi_urban_eia_nl_statistics.csv, batch calculation result
- crashed_simulations.json, IDs of crashed simulations (optional)
- created_simulations_<date>.json, information about created simulations, serves as input file for process-rain-series-results
- gridadmin.h5, necessary for calculation of batch statistics
- nan_rows.json, information about weirs that contain NaN data in their cumulative discharge (optional)

Example
------------

  $ run-rain-series-simulations <ThreediModel ID> <rain files dir> <results dir> -o <organisation (optional)> -h <host (optional)>

  $ process-rain-series-results <created simulations json file> -h <host (optional)> -d <sets debug flag to True> -s <skips downloading result files>

Example command::

  $ run-rain-series-simulations 12345 rain_files/ results/ daan.vaningen

  $ process-rain-series-results results/created_simulations.json daan.vaningen

