Submodules

hydrobricks.plotting module

hydrobricks.plotting.plot_hydro_units_values(results, index, units, units_labels)[source]
hydrobricks.plotting.plot_precip_per_unit(units_precip, hydro_units)[source]

hydrobricks.utils module

class hydrobricks.utils.Timer(text=None)[source]

Bases: object

Timer to time code execution. Based on: https://pypi.org/project/codetiming/

start()[source]

Start a new timer.

stop(show_time=True)[source]

Stop the timer, and report the elapsed time.

hydrobricks.utils.area_in_m2(area, unit)[source]
hydrobricks.utils.date_as_mjd(date)[source]
hydrobricks.utils.days_to_hours_mins(days)[source]

Transform a number of days to hours and minutes

hydrobricks.utils.dump_config_file(content, directory, name, file_type='yaml')[source]
hydrobricks.utils.jd_to_date(jd)[source]

Transform julian date numbers to year, month and day (array-based). From https://gist.github.com/jiffyclub/1294443

hydrobricks.utils.mjd_to_datetime(mjd)[source]

Transform modified julian dates to datetime instances (array-based).

hydrobricks.utils.validate_kwargs(kwargs, allowed_kwargs)[source]

Checks the keyword arguments against a set of allowed keys.