jdechalendar / gridemissions

Tools for power sector emissions tracking
MIT License
35 stars 6 forks source link

Choice of RTOL and ATOL #31

Closed maoudia-via closed 1 month ago

maoudia-via commented 1 month ago

https://github.com/jdechalendar/gridemissions/blob/ab43c905705fa8961af399a2a84d3cb85a27b29b/src/gridemissions/load.py#L23

We currently see some discrepancies in the data reported from SEPA and MHEB. The balance check fails for the 2 balancing authorities when verifying TI+D != NG

Increasing RTOL and ATOL to 1e-04 for both seems to fix the issue. I am curious as what is the driver behind the choice of current tolerance values given the scale of Net Generation numbers.

It also notable that we did have to increase the tolerances for the european data support update we are preparing (coming soon ...)

jdechalendar commented 1 month ago

Those numbers were chosen ad-hoc. Probably lowest tolerance that did not fail on the full history I had at the time.

Increasing them like you suggest sounds reasonable to me

maoudia-via commented 1 month ago

Thanks !