Principal Investigator: Nicola Carslaw

Year Awarded: 2018

Institution: University of York

Overview

This project aims to provide the Chemistry of Indoor Environment (CIE) program and the wider indoor air quality community, with an open source model that will allow them to explore indoor air chemistry processes in detail. An existing model that has been developed over the last 15 years, the INdoor Detailed Chemical Model (INDCM), currently runs using proprietary software called Facsimile for Windows (F4W), which is prohibitively expensive for many researchers.

This proposal will therefore widen access to this modelling tool and widen possibilities for future development, by refactoring the model as Python, a freely available language and widely used in science. The new open source model will be freely available and will also be provided with a user-friendly interface, documentation and examples. By making the model open source, there will be endless opportunities to explore the chemical processing underlying indoor air quality, which will be of great benefit to the indoor air community. In addition, such a tool will help to further build a community that will contribute to future model development through bug reports, additional functionality etc.

Given the focused funding efforts happening over the next 8 years or so in the field of indoor air chemistry through the CIE program, it is a good time to produce this new community modeling tool.

Research

The research methodology will comprise of the following tasks:

  • Refactoring the model to Python:

The first stage of the project will involve refactoring the model to Python, which is freely available for all major computing platforms, including High Performance Computing (HPC) systems. An experienced post-doctoral fellow will be carry out this task.

The INDCM currently contains ~30,000 lines of code. These break down into broad sections that deal with: (a) initialisation, (b) gas-phase chemical reactions, (c) deposition to and emissions from surfaces, (d) photolysis reactions, (e) gas to particle conversions, (f) exchange with outdoors and (g) model output. In the new model, although the broad structure will stay the same as adopted currently, these seven sections will form discrete modules, which will permit greater efficiency and also, lower the barriers to contribution by other users. They will also form the basis of the user-interface described in the next section.

  • Creating a user friendly interface:

The second task will be to create a user friendly interface. A user will be able to select variables such as location, time of year, lighting conditions, ventilation rate, type of building etc., through pull down menus, and then explore different scenarios. For instance, we will create a simple data base of cities, where parameters such as location and outdoor concentrations are already available to select. We will also explore the possibility of connecting to sites that provide large databases of air quality concentrations, so that the model will use the most up-to-date measured concentrations (e.g. annual averages) of commonly measured ambient pollutants (such as nitrogen oxides, ozone, particulate matter and some VOCs) for a range of locations of interest.

We will provide some typical emissions data for cleaning, cooking and other activities such as air freshener use, where emission rates are available in the literature. This will allow the user to explore the impact of these activities on indoor air quality for a building of their choice. There will also be the facility for the user to define specific emissions inputs based on their own requirements.

Although a user interface will be preferred by many users, it will be possible for more confident users to access the code directly. We will ensure that it is easy to search the mechanism for a particular reaction (e.g. if a user wishes to test model sensitivity to a change in a particular rate coefficient) or species. There will also be an easy way to add in ‘new’ reactions according to user needs, as well as the provision of a command line interface e.g. to facilitate batch runs.

  • Create user documentation:

Instructions on using the new model will be compiled to produce user documentation, e.g. in the form of a Jupyter notebook. This documentation will be fully integrated with the code so that it is always up-to-date. Users would be able to work through the documentation to help them understand how different components of the model work. There would also be information about how the input data for initialisation etc. had been selected and how the model can be tailored for use for particular applications (e.g. emissions from use of cleaning products indoors). The documentation will contain some example model runs and guidance on the type of analyses that are enabled by the output data. Such examples might include straightforward plotting of concentration data to more detailed reaction rate analyses. Another advantage of using Jupyter notebooks is the additional support available, such as tutorials in how to use Python code for those users unfamiliar with the language.

  • Community Building:

Community building is essential for any open source code to be used and will be carried out from the outset. Other members of the CIE and wider indoor air chemistry communities will be regularly updated of progress (via a blog on the forthcoming IndoorChem website) and also through relevant meetings, such as the annual CIE meetings and Indoor Air conferences) and encouraged to use the model once released. Providing examples of possible applications in the accompanying documentation will help in this respect.

Before the model is released to the wider community for the first time, we will approach relevant scientists to carry out beta testing (members of the MOCCIE consortium and/or their research groups have agreed to help with this task).

Following release of the new model, we would aim to further build the community of users through encouraging them to submit bug reports, make suggestions for improved model functionality and also, to submit additional documentation and tutorials. We would start an online interactive space for the community where users could ask questions about how the model works and/or make suggestions about new additions to the model if they are unable to code themselves. We will also run a blog, initially reporting on model development ahead of its release, but then featuring different aspects of the model (on a monthly/bimonthly basis), so more users are encouraged to start using the model when they understand its applications.

The model is expected to grow organically over time as users request additional functions for the user-interface, or predefined scenarios for testing that might be helpful. In particular, we would hope to see new information added on surface parameterisation based on the CIE grant held by Grassian, on photochemistry based on the CIE grant held by Donaldson, as well as from others in the wider community relating to mechanism development between official MCM updates.

  • Quality assurance, future proofing and maintenance:

A key issue for the new model will be quality assurance. In order to achieve this, the model will be set up with an automatic testing infrastructure that includes a range of unit tests, so specified model simulations in this instance. Each time a change is made to the model code, the unit tests will be run to ensure that the model output is still as expected. The model will be stored on GitHub (https://github.com/) which will enable a hosted continuous integration service such as Travis CI (https://travis-ci.org/) to detect any changes and then automatically run the unit tests. Travis CI will then send an email if the unit tests fail, so allowing debugging to occur. Such automatic testing is necessary if multiple users are to be allowed to contribute to the model code and will ensure that the model continues to work in a reproducible manner. GitHub will also allow a web page to be built that links to the Jupyter documentation ensuring full integration between all of the different components of the model package.

Following the initial release of the model, we will move to an agile, continuous release mechanism, so that updated versions can be released as required. This means that improvements can be implemented as soon as possible and they will all be strictly recorded through the accompanying documentation as described above.

  • Publication and Release:

We will release the new community model at the end of the project in June 2020. The model will be openly and freely available via GitHub. We will ask users to acknowledge the introductory paper (see below) in any future publications that arise from using the model and also seek feedback to guide future improvements and developments.

To accompany the release of the new model, we will submit an open access paper for publication (e.g. in Indoor Air) that introduces the model to the community and serves as a reference point for version v1. We will also aim to highlight the new model at Indoor Air 2020, such as through a Sloan sponsored workshop session where potential users would receive an introduction to how the model works. The abstract we submit to the conference for this session will contain a link to download the model, potentially bringing it to the attention of more than 1000 scientists.

  • Outreach and education activities:

There will be several complementary activities during this proposal to raise the profile of indoor air chemistry. Dr. Nina Notman, a freelance science journalist, will attend two major activities being funded through the CIE program, namely the HOMEChem field campaign in Texas in June 2018 and the Indoor Air 2018 (IA2018) conference in Philadelphia in July, where there are 3 Sloan funded sessions. As well as delivering a key note lecture at IA2018, she will use these opportunities to observe and learn about the field and gather material with the aim to write publications highlighting the CIE program. These are likely to highlight each of three main themes of the CIE program: Environments and Occupants; Sources; Chemical and Physical Transformations.

We are also keen to highlight the role of women in the CIE program, given their high-profile roles in the program (including overall project director and PIs on several of the major grants). Such high profile roles for women in so many aspects of a science program is unusual in chemistry and are an example of what can be achieved when issues of gender equality are properly considered by a funding body throughout the whole application process. The issue of inequality for women in science has been very high profile recently. In recognition, a recent article in The Lancet called for papers for a special issue towards the end of 2018 on how to promote the role of women in science, medicine and global health, and is seeking articles that aim to ‘extend understandings and best practices for science, medicine, and global health’ (Clark et al., 2018).

To complement these activities, a student will be employed on an 8-week internship based in York through July and August 2018. The intern will be supervised by Carslaw, but trained by Notman, who will offer some general guidance on journalistic style writing and help the student conduct some practice/initial interviews with academics and early career researchers within the Environment. Carslaw will then help the intern to select important papers from across all areas of the CIE program to use as a basis to write a number (~4) of 500 word articles. They will also write personal profiles for a number of CIE participants. The blog articles and profiles will be edited by Notman, who will also provide feedback along with Carslaw.

Nic Carslaw is a Reader in Air Pollution in the Environment Department at the University of York.

Nina Notman is a freelance science writer and editor specialising in chemistry. She writes and edits for a range of different chemistry and science education publications.