WTR-CONS
Water Discharge Aggregation
1. Identity
Depends on module:
Purpose
Aggregates water discharge (water returned from the organization to the environment or third parties) into canonical totals and structured breakdowns aligned with ESRS E3-style water accounting.
This engine is the discharge counterpart to:
MEID_CALC_WATER_AGGR(withdrawal)- and is a key upstream input to
MEID_CALC_WATER_CONS(derived consumption mode).
Typical usage
- Total water discharge (m³)
- Discharge by destination (surface water, sewer, sea, third party, etc.)
- Discharge by quality category (if reported)
- Input to mass-balance consumption calculation
2. Contract References (ZAR)
2.1 Input Schema
ZAR Address: schema.compute.water.discharge.inputs.v1_0_0
Required conceptual fields:
discharge_items: list of water discharge recordsalignment:BY_YEAR|BY_INDEX(defaultBY_YEAR)
Each discharge_item conceptually includes:
period(typically year)valueunit(e.g.,m3,L,ML)destination: canonical discharge destination identifier- optional:
quality:TREATED|UNTREATED|UNKNOWNsite_idbasin_idgeo_refmeter_id/invoice_idis_estimate(boolean)
Canonical destinations (v1):
surface_watergroundwater(rare but included)seawatermunicipal_sewerthird_partyother
Note: In many orgs, discharge is best represented as “to sewer” vs “to environment”. Destinations support both.
2.2 Options Schema
ZAR Address: schema.compute.water.discharge.options.v1_0_0
Common options:
unit_output: defaultm3destination_normalization:STRICT|LENIENT(defaultSTRICT)unknown_destination_policy:ERROR|DROP|ASSIGN_OTHER(defaultERROR)negative_values_policy:ERROR|ALLOW_WITH_FLAGmissing_policy:ERROR|SKIProunding: optional digitsinclude_quality_breakdown: boolean (default false)
2.3 Output Schema
ZAR Address: schema.compute.water.discharge.output.v1_0_0
Outputs include:
- optional
metadata(unit conversions, unknown destinations, flags, completeness)
3. Accepted Input Shapes
A. Flat discharge item list (preferred)
{
"discharge_items": [
{ "destination": "municipal_sewer", "period": 2025, "value": 90000, "unit": "m3" },
{ "destination": "surface_water", "period": 2025, "value": 18000, "unit": "m3" }
],
"alignment": "BY_YEAR"
}
B. Mixed units
{
"discharge_items": [
{ "destination": "municipal_sewer", "period": 2025, "value": 90000, "unit": "m3" },
{ "destination": "third_party", "period": 2025, "value": 25000000, "unit": "L" }
]
}
C. With quality tagging
{
"discharge_items": [
{ "destination": "municipal_sewer", "quality": "TREATED", "period": 2025, "value": 85000, "unit": "m3" },
{ "destination": "surface_water", "quality": "UNTREATED", "period": 2025, "value": 5000, "unit": "m3" }
],
"include_quality_breakdown": true
}
All supported shapes MUST be normalized internally to:
Map<period, Map<destination, discharge_m3>> (+ optional quality dimension)
4. Destination Normalization Rules (Normative)
4.1. Canonical destination identifiers
Input destinations MUST normalize to canonical keys:
surface_watergroundwaterseawatermunicipal_sewerthird_partyother
If destination_normalization = STRICT:
- unknown destinations MUST error (default)
If LENIENT:
- unknown destinations handled per
unknown_destination_policy
4.2. Unknown destination handling
If a record cannot be mapped:
ERROR: fail the computationDROP: omit record and record in metadataASSIGN_OTHER: map to other and record in metadata
5. Compute Semantics (Normative)
Let be discharge volume to destination at time (after unit normalization).
5.1. Discharge by destination
5.2. Total discharge
Where