Fill a DMR from monitoring rows
fill_dmrWhat numbers go on a permit's DMR this period, computed from the plant's own daily results? The numbers a US NPDES permit's Discharge Monitoring Report asks for in one period, computed from the plant's own raw results (daily samples, flows): for each value due on the period's forms (EPA's national limits file) its statistic as EPA defines it (monthly average, daily maximum, weekly average over EPA's Sunday-to-Saturday weeks, geometric mean, loadings in lb/d from concentration x flow x 8.34, percent removal), the rows it was computed from, and EPA's violation rule's verdict against the limit. A value the rows cannot give is refused with its code (fill.no_column, fill.unit, fill.ambiguous, dmr.nd_rule_missing ...): a number the rows do not hold is never supplied. Send rows as JSON (date, parameter, value, unit, point) or table as the file's text (a laboratory's long export, or a sheet of days with one column per parameter); include the previous month's last days when a weekly average is due. A result below detection enters an average by nd_rule (zero, half, dl, dl_lt), else by the state's written rule. netdmr: true adds the NetDMR "Import DMRs" file as text (not yet validated by NetDMR's own import check). The rows reach our server to be computed and are not kept: only how many rows were sent and values filled is counted.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"permit": "<permit>",
"period_end": "<period_end>"
},
"name": "fill_dmr"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rows | No | The plant's results, one a row (send rows or table). | |
| table | No | The plant's file as text (CSV, TSV or semicolons; at most 2000000 characters) or as lines of cells (send rows or table). | |
| netdmr | No | Also return the NetDMR "Import DMRs" file (CSV text) for the values filled. | |
| permit | Yes | The NPDES permit number, e.g. PA0228061. | |
| nd_rule | No | How a result below detection enters an average: as zero, half the limit, the limit (dl), or the limit reported as less-than (dl_lt). Default: the state's written rule, else none (such a statistic is refused). | |
| period_end | Yes | The reporting period: its month (2026-09) or its last day (2026-09-30). |