Chrapkiewicz, K.; Lipp, A.; Barron, L.; Barnes, R.; Roberts, G.

Python code to identify sources of chemical pollutants in waterways

https://doi.org/10.5285/8ae3c419-611d-4bee-ad41-1c9081e79975
Download/Access
This resource contains python code to carry out source apportionment of chemicals in river water. Convex optimisation is used to efficiently apportion tracer and pollutant sources from point concentration observations. A minimum working example of the python code and the open-source framework used for the analysis is also provided. Chemical data collected in 2019-2020 along the River Wandle (Thames, UK) were used to test the code and example results are also included.

The code assumes conservative mixing and hence is likely to be best suited to assessing chronic sources of pollution (i.e., sources that are temporally invariant, or as near as, during the sampling campaign).
Publication date: 2024-05-01
81 downloads
1,968 views
Download numbers valid from 20 June 2024

Formats

Python, Comma-separated values (CSV), NetCDF, Portable Network Graphics (png), yaml, TIFF

Provenance & quality

The code was developed as part of a six-month project funded via a NERC Exploring the Frontiers grant. K. Chrapkiewicz was the principal code developer with A. Lipp. We made use of existing models developed by co-investigators A. Lipp and R. Barnes. This work built upon the optimisation techniques developed by A. Lipp, G. Roberts and colleagues. The data inverted in this study were generated L Barron and colleagues (Egli et al., 2023).

To run the code please see the readme files that accompany this repository. Briefly, once the code is downloaded and installed a minimum working example can be run using > python examples/mwe.py. Examples of data and their associated formats are included with this repository. The raw chemical data are also included. Examples of outputs in the form of figures (.png format) are also included. With regards to quality assurance, a synthetic data inversion was conducted and an Analysis of Variance and an assessment of the uncertainties were also carried out. Further details are provided in the supporting documentation and cited papers.

Licensing and constraints

This software is available under the terms of the Open Government Licence

Cite this software as:
Chrapkiewicz, K.; Lipp, A.; Barron, L.; Barnes, R.; Roberts, G. (2024). Python code to identify sources of chemical pollutants in waterways. NERC EDS Environmental Information Data Centre. https://doi.org/10.5285/8ae3c419-611d-4bee-ad41-1c9081e79975

Correspondence/contact details

Roberts, G.
Imperial College London
 gareth.roberts@imperial.ac.uk

Authors

Chrapkiewicz, K.
Imperial College London
Lipp, A.
University of Oxford
Barron, L.
Imperial College London
Barnes, R.
Lawrence Berkeley National Laboratory
Roberts, G.
Imperial College London

Other contacts

Publisher
NERC EDS Environmental Information Data Centre
 info@eidc.ac.uk
Rights holder
Imperial College London
 gareth.roberts@imperial.ac.uk

Additional metadata

Topic categories
environment
INSPIRE theme
Environmental Monitoring Facilities
Keywords
chemicals , environmental contaminant , Hydrology , pollutant , Pollution , river , source apportionment , stream , Thames , waterway
Funding
Natural Environment Research Council Award: NE/X010805/1