openair News Some recent updates to openair Contents The openair Project newsletter Issue 11, January 2012

Similar documents
BUP2 5/2 12/4/07 12:49 AM Page 1. Introduction

Scheduling. Scheduling Tasks At Creation Time CHAPTER

ADMS-Roads Extra Air Quality Management System Version 4.1

BUT2 7day 11/4/07 11:07 PM Page 1. Introduction

The openair manual open-source tools for analysing air pollution data

AIMMS Function Reference - Date Time Related Identifiers

DUTCH BENCHMARK The 2017 Edition

CIMA Certificate BA Interactive Timetable

Conditional Formatting

Nimsoft Monitor. reboot Guide. v1.4 series

Ambiflex MF820 OPERATOR S MANUAL

How It All Stacks Up - or - Bar Charts with Plotly. ISC1057 Janet Peterson and John Burkardt Computational Thinking Fall Semester 2016

EC2 Scheduler. AWS Implementation Guide. Lalit Grover. September Last updated: September 2017 (see revisions)

Screen3 View. Contents. Page 1

SUSTAINABLE SAUNDERS AC SHUTDOWN PROJECT

INFORMATION TECHNOLOGY SPREADSHEETS. Part 1

GreenThumb Garden Registration

EuroForth Forth Query Language (FQL) - Implementation and Experience

Webinar Benchmarks Report

HP StorageWorks Command View TL TapeAssure Analysis Template White Paper

SYS 6021 Linear Statistical Models

MONITORING REPORT ON THE WEBSITE OF THE STATISTICAL SERVICE OF CYPRUS DECEMBER The report is issued by the.

A LOCAL ADAPTIVE GRID REFINEMENT FOR GAS RELEASE MODELING. S.V. Zhubrin. April, 2005

Nights & Weekend ROB & PHIL DECEMBER 12, 2008

AP Statistics Assignments Mr. Kearns José Martí MAST 6-12 Academy

RWB29 Programmer. Daily Programming

How Young Children Are Watching TV and DVDs: From the June 2013 Rating Survey on Young Children s TV Viewing

INTRODUCTION TO DESIGN. Scenarios and conceptual design * Interaction objects, properties, relationships * Different views * Access and operations

Pearson Edexcel Award

Private Swimming Lessons

plot those points on a graph. 5.Evaluate the equation y = 225 x 2 at the points x={ 15, 12, 9, 0, 9, 12, 15}. Then

Calendar PPF Production Cycles Non-Production Activities and Events

2014 FALL MAILING SEASON Update for the Mailing Industry. August 18, 2014

Estimating oceanic primary production using. vertical irradiance and chlorophyll profiles. from ocean gliders in the North Atlantic

SUMMER Early Registration Begins On... Summer Hours. Tuition (per child): JUNE 2019

Algorithm For Scheduling Around Weekends And Holidays

Part No. P CallPilot. Programming Record

What if Analysis, Charting, and Working with Large Worksheets. Chapter 3

Using Variables to Write Pattern Rules

TutorTrac for Staff LOGINS: Kiosk Login Setting up the Kiosk for Student Login:

TECHNICAL OPERATION GUIDE

10 Best Practices of Efficiency

Backup and Restore SOP FOR CONGO CLUSTER

Model: EP210. Dual channel programmable controller. Installation Manual

OPERATING MANUAL- MODEL : BS-101

CROWN JEWEL SOFTWARE FOR WINDOWS SOFTWARE REV.

PASCAL. PASCAL, like BASIC, is a computer language. However, PASCAL, unlike BASIC, is a Blocked Structured Language (BASIC is known as unstructured).

How Young Children Are Watching TV and DVDs:

DESC Technical Workgroup Presentation of Models for nd June 2016

Digital Rates 2018/2019 Online, Mobile, Digital. September 2018

Outline for Weather Station

Gaussian Plume Air Dispersion Model - AERMOD. Release Notes. Versions 9.3, 9.4, and 9.5

An analysis of patterns and causes over

Daily Math Week 10 ( ) Mon. October 21, 2013 Tues. October 22, 2013 Wed. October 23, 2013 Thurs. October 24, 2013 Fri.

Maintaining the Central Management System Database

AERMOD and CAL3QHCR: Dispersion Models for PM Hot-spot Analyses Southern Transportation & Air Quality Summit 2011 Raleigh, North Carolina

Microsoft Excel 2013 Series and Custom Lists (Level 3)

Total Market Demand Wed Jul 26 Thu Jul 27 Fri Jul 28 Sat Jul 29 Sun Jul 30 Mon Jul 31 Tue Aug 01

2013 Association Marketing Benchmark Report

Artificial Neuron Modelling Based on Wave Shape

Your Local Family Bus Company The Bus Garage, Bromyard, HR7 4NT

Correlation. January 12, 2019

Understanding and Exploring Memory Hierarchies

Year 1 and 2 Mastery of Mathematics

Spreadsheet Software Level 5. Build-up workbook

MDMS TRAINING WEBINAR 6 SEPTEMBER 2017

Planning for Marketing

Pandas IV: Time Series

January and February

SRP SMART ENERGY SAVER STUDY

STA 313: Topics in Statistics

Instruction Manual Digital socket box timer

SOUTH DAKOTA BOARD OF REGENTS PLANNING SESSION AUGUST 8-9, Below is a tentative meeting schedule for the Board meetings in 2013:

REV SCHEDULER (iseries)

RESEARCH REPORT. Cross Screen User Behavior Insights Asia 2H 2015

Angela Ball, Richard Hill and Peter Jenkinson

HN1000/HN2000 Product Manual

SRP DEMAND MANAGEMENT STUDY

OPERATING MANUAL FOR AUTOMATIC SCHOOL BELL Ringing bell in manual mode: When unit is at Home Screen, showing date and time on

Demand Estimation Sub Committee Ad-hoc Work Plan

Examples, examples: Outline

Schedule/BACnet Schedule

NO5W Developing a Crossing File Using the Google Path Method CQ/X Client

2017 Summer Review for Students Entering Pre-Algebra 7 & Pre-Algebra 8

Draft. Copyright Pearson Education. Contents. Introduction. Chapter 1: Hardware 1. Chapter 2: Backing storage and memory 11. Chapter 3: Software 15

SOUTH DAKOTA BOARD OF REGENTS. Board Work ******************************************************************************

Once Written, Twice Applied: The Basics of Array Processing In SAS Elizabeth A. Roth, RAND Corporation, Santa Monica, CA

Introduction to Computers and Programming

Des Moines Area Regional Transit Non Rider Survey

CallPilot Multimedia Messaging

DATA VISUALIZATION Prepare the data for visualization Data presentation architecture (DPA) is a skill-set that seeks to identify, locate, manipulate,

Daily Math Week 8 ( ) Mon. October 7, 2013 Tues. October 8, 2013 Wed. October 9, 2013 Thurs. October 10, 2013 Fri.

BEPI USER MANUAL. As with any programming, examples are invaluable and these can be downloaded from the EMACSYS web site at

Introduction CJ s Cross-Device Tracking Solution Key Strategies Shopping & Device Paths Average Order Value...

TECHNICAL OPERATION GUIDE

On best practice for CFD in the oil and gas sector Technical safety applications

DEVELOPMENT OF A TOOL FOR OFFSHORE WIND RESOURCE ASSESSMENT FOR WIND INDUSTRY

Columnwise Formulations

Smart Series. Wall Heater Operations Manual. Save This Manual

Understanding and Comparing Distributions. Chapter 4

Transcription:

source OPEN News The Project newsletter Issue 11, January 12 Some recent updates to While the project has officially finished as far as NERC funding goes, it continues to be developed and refined. Further funding is being sought to help support its continued development. This issue considers some recent refinements to the timevariation function that provides more robust and consistent estimates of uncertainties and also a new approach for considering differences between two pollutants. The latter change is particularly flexible and should be useful to many users in a wide range of circumstances. A few examples are given in the newsletter. The much-used polarplot function has been made much more flexible by allowing any numeric variable to be plotted in polar coordinates with wind direction. Previously only wind speed could be used, but this was a somewhat artificial restriction. The key issue is whether the other numeric variable provides some sort of source discrimination and examples are given of using ambient temperature. There continue to be many other changes to and these are listed in this newsletter. Finally, the manual continues to be improved, which hopefully will be appreciated by many users. This newsletter was produced using R version 2.14.1 and version.5-16. mailto:david.carslaw@kcl.ac.uk Contents Some recent updates to........ 1 Refinements to timevariation......... 2 More flexibility for polarplot.......... 4 Trends and averages by season......... 6 Other developments.......... 7

Issue 11, January 12 2 Refinements to timevariation Feedback from a wide range of users suggests that the timevariation function is one of the more frequently used functions in. The function itself tries to do something straightforward: show the important temporal variations in air pollutant concentrations by of the day, day of the week and month of the year. The function also estimates the 95% confidence interval in the mean and shows the uncertainties as shaded regions. While the idea of timevariation is simple enough, the usefulness of the function is probably related to its flexibility. For example, it is possible to consider multiple pollutants, to normalise the data and compare one period of time against another. Also, the flexible type option in makes it easy to carry out analysis in a very wide variety of ways. Two significant changes have been made to this function. First, bootstrap resampling methods are now use to estimate the uncertainties in the mean. This change should provide more robust estimates of the uncertainties particularly when there are relatively few measurements. The second major change should prove to be very useful: it is now possible to calculate differences between two time series (and the bootstrap uncertainties of the differences in the mean). The difference calculations are possible when two time series are considered. There should be many situations where considering differences will be useful; here are two, but there are many others: Comparing two periods in time to see how the temporal nature of the concentrations have changed. These calculations will help reveal the factors controlling a change. For example, is most of an increase in the concentration of a species observed only for weekdays, or only certain s of the day? Such information can help identify important factors that cause a change. For model evaluation it is useful to compare measured against modelled temporal variations to see how well a model agrees with measurements. However, what is the nature of the agreement is it good for all s of the day and all seasons, and if not, why not? The difference calculation can be made in two ways. First, two pollutants can be selected from a data set (data frame). Second, a grouping variable that identifies exactly two groups can be used. In both cases the second first pollutant is subtracted from the second. In the first example, the coarse fraction of PM is calculated as the difference between PM and PM 2.5 concentrations. We tell the function to show the differences by choosing difference = TRUE. Note that the function automatically adds the difference as a new variable PM - PM 2.5. timevariation(mydata, pollutant = c("pm", "pm"), difference = TRUE) 5 Monday Tuesday Wednesday 35 Thursday Friday PM 2.5 PM PM PM 2.5 J F M A M J J A S O N D month 35 Saturday Sunday Mon Tue Wed Thu Fri Sat Sun weekday Figure 1: Use of the difference option in timevariation to show the PM coarse fraction. A very powerful and under-used analysis is to compare the temporal components of two different time periods. We use the splitbydate function to divide up the data into dates before January 3 and after January 3. This time the option difference is used to highlight how concentrations have changed over these two periods. Note that splitbydate returns a column split.by by default, which can then be referred to in the timevariation function using the option group. This way of using the function therefore differs from the previous example where two pollutants were explicitly named. However, there are still only two unique values for the variable split.by: before Jan. 3 and after Jan. 3. There is some indication in this plot that data after 3 seem to show more of a double peak in the diurnal plots; particularly in the morning rush. Also, the difference line does more clearly highlight a more substantial change over weekdays and weekends. Given that cars are approximately constant at this site each day, the change may in

Issue 11, January 12 3 dicate a change in vehicle emissions from other vehicle types. Given that it is known that primary emissions are known to have increased sharply from the beginning of 3 onwards, this perhaps provides clues as to the principal cause i.e. not heavy goods vehicles where there are far fewer of the at weekends. ## split data into two periods mydata <- splitbydate(mydata, dates = "1/1/3", labels = c("before Jan. 3", "After Jan. 3")) timevariation(mydata, pollutant = "no2", group = "split.by", difference = TRUE) 8 Monday Tuesday Wednesday Thursday Friday Saturday before Jan. 3 After Jan. 3 After Jan. 3 before Jan. 3 5 J F M A M J J A S O N D month 5 Sunday Mon Tue Wed Thu Fri Sat Sun weekday load(" //Data/CMAQozone.RData") head(cmaq.kcl) ## site date o3 ## 1 Aston.Hill 6-1-1 :: NA ## 2 Aston.Hill 6-1-1 1:: 74 ## 3 Aston.Hill 6-1-1 2:: 72 ## 4 Aston.Hill 6-1-1 3:: 72 ## 5 Aston.Hill 6-1-1 4:: 7 ## 6 Aston.Hill 6-1-1 5:: 66 ## rollingo3meas mod rollingo3mod group ## 1 NA 92.8 NA CMAQ.KCL ## 2 NA 92.18 NA CMAQ.KCL ## 3 NA 92.14 NA CMAQ.KCL ## 4 NA 91.72 NA CMAQ.KCL ## 5 NA 91.5 NA CMAQ.KCL ## 6 NA 92.28 NA CMAQ.KCL Second, we will only consider the Harwell site and hence use the subset command to select it. In this example it can be seen that when difference = TRUE a dashed line at y = is shown, which helps to highlight the difference. In this case it can be seen that the model generally over-estimates O 3 concentrations, except late in the day around 6pm and through the summer months. Such differences can help focus on why the model may not be capturing the temporal variations. timevariation(subset(cmaq.kcl, site == "Harwell"), pollutant = c("mod", "o3"), difference = TRUE) Figure 2: Example plot using the timevariation function to plot concentrations at Marylebone Road. In this plot, the concentrations are shown before and after January 3. Monday 8 Tuesday Wednesday Thursday Friday 12 6 18 23 mod O 3 O 3 mod Saturday Sunday In the next example we will have a look at a model evaluation setting. Results of O 3 predictions from the CMAQ model at Harwell will be considered. These results were kindly made available from some CMAQ test modelling by Sean Beevers and Nutthida Kitwiroon. First the data are loaded: J F M A M J J A S O N D month Mon Tue Wed Thu Fri Sat Sun weekday Figure 3: Example plot using the timevariation function to compare observed and modelled O 3 concentrations using the KCL CMAQ model for Harwell.

Issue 11, January 12 4 More flexibility for polarplot The polarplot function is another function that is widely used for source identification and characterisation. While it is already flexible e.g. it can: Consider multiple pollutants. Can be used with the flexible type option to show plots be season, year, any other numeric variable... Uncertainties can be considered. Despite the flexibility the function to date only plotted wind speed against wind direction in polar coordinates. The reason why wind speed was used is that it is excellent at discriminating different pollutant sources. Even though considering the wind speed dependence of a source is a simple thing to do; it is very useful. It can for example reveal different source types. Emissions from tall chimney stacks tend to ground during higher wind speed conditions, street canyon recirculation can be revealed in more detail etc. But equally there are potentially many other numeric variables that could be plotted against wind direction in polar coordinates that could also help discriminate different source types. For this reason, polarplot can now consider any numeric variable through the option x. The extent to which this is useful clearly depends on the data available, but in a research setting where numerous species are measured this increased flexibility could be very useful. As an example, we will consider temperature as a variable to use with wind direction. There are many situations where atmospheric temperature could help separate-out different source types. For example, the emission rate of a species itself may depend on temperature. Increased temperatures will mean increased thermal turbulence in the atmosphere, so it is possible high-level sources could be brought down to ground level. To illustrate some different situations where temperature might be useful, we consider three different species: SO 2, ethane and isoprene. The data are stored on a KCL server, but can be loaded directly: load(url("http://www.erg.kcl.ac.uk/downloads/policy_reports/ head(thedata) ## date so2 nox isoprene ## 1-1-1 :: 16 388 1.22 ## 2-1-1 1:: 35 886.85 ## 3-1-1 2:: 32 816 1.75 ## 4-1-1 3:: 24 636 4.36 ## 5-1-1 4:: 19 483 3.8 ## 6-1-1 5:: 11 231 2.12 ## ethane benzene ws wd temp ## 1 13.54 7.74 2.58 7.4 ## 2 11.99 5.66 2.58 19 7.5 ## 3 14.69 11.38 2.58 19 7.9 ## 4.38.75 1.543 2 8.1 ## 5 18.75 19.66 1.29 2 8.2 ## 6 16.38 13.13 2.58 28 8.7 Note the full path is "http://www.erg.kcl.ac. uk/downloads/policy_reports/aqdata/hcdata. RData". First, consider concentrations of SO 2 shown below. This plot shows very clearly that concentrations of SO 2 are highest when the wind is from the east and the temperature is high (greater than degrees C). This is a result of plumes from chimney stacks about km to the east being brought down to ground level due to high thermally-induced mixing i.e. unstable atmospheric conditions. polarplot(thedata, pollutant = "so2", x = "temp", min.bin = 3) W temperature N S E mean Figure 1: Example plot using the polarplot function to consider SO 2 concentrations as a function of wind direction and temperature. 5 SO 2 Indeed, the characteristics of SO 2 can be further explored by considering the data by season and plot

Issue 11, January 12 5 ting the maximum SO 2 concentration not shown, but plotted by: polarplot(thedata, pollu = "so2", x = "temp", min.bin = 3, type = "season", stat = "max") In this case the higher concentrations at high temperatures are still seen in summer, but there is also a peak in winter at low temperatures ( 5 degrees). The peak in winter will be due to another mechanism i.e. high wind speeds and mechanical mixing, which also brings the plume down to ground level. These plots can therefore highlight different mechanisms for dispersion. In the next example we consider ethane. Emissions of ethane are dominated by natural gas leakage. These emissions therefore represent a diffuse emission with no buoyancy and which should respond to general atmospheric mixing. The next plot shows this characteristics very well i.e a bulls-eye pattern. At low temperatures atmospheric mixing is reduced and concentrations increase and viceversa. Indeed, the Figure is an excellent example of the type of pattern one would expect from an area source that is released at ground level and is neutrally buoyant. (Often similar patterns are observed for other pollutants at background sites). polarplot(thedata, pollutant = "ethane", x = "temp", min.bin = 3) In the final example we consider isoprene. Isoprene is a hydrocarbon that is emitted both by road vehicles but also biogenic sources. Emissions of species such as isoprene will become increasingly important in the future due to their role in regional O 3 formation. But what does a polar plot look like? The plot below shows a very different response to increasing temperature compared with either SO 2 or ethane in that concentrations increase as temperature increases. This increase is due to the temperature response of biogenic isoprene sources. It should be remembered that increased temperatures will also result in increased dilution, so it is likely the concentrations would be even higher if the dilution was fixed. The other thing to note from this plot is that no one wind direction dominates and this tells us something about the source or time scales for isoprene destruction. If it was destroyed in the atmosphere very quickly then only local sources would tend to feature in the plot. polarplot(thedata, pollutant = "isoprene", x = "temp", min.bin = 3) W temperature N E mean 3. 2.5 2. 1.5 N mean 1..5 temperature S isoprene W E Figure 3: Example plot using the polarplot function to consider isoprene concentrations as a function of wind direction and temperature. S 5 ethane Figure 2: Example plot using the polarplot function to consider ethane concentrations as a function of wind direction and temperature. These plots together introduce alternative ways of considering the data, but there will be many more possibilities. Indeed, if readers can provide other examples, it would be good to hear from you.

Issue 11, January 12 6 Trends and averages by season Considering trends by season can be very important in air pollution and the atmospheric sciences in general. Recent changes to make it easier to average data by year-season and plot it. The timeaverage function is used as the basis of averaging data in many flexible ways. Recently a new averaging period season has been added to the function to make it easier to calculate means and other statistics by season. The function considers proper seasons e.g. winter is Dec/Jan/Feb in the northern hemisphere and therefore straddles two years. For example, consider the seasonal means of mydata: in NO x at Marylebone Road. What we want are separate panels for each season, but also an averaging time for each season. The plot below also uses a different plotting symbol and size. Now it is easy to see that the trends in the winter months have been greater than other seasons (at least for data between 1998 5). TheilSen(mydata, pollutant = "nox", avg.time = "season", type = "season", pch = 16, cex = 1.5, ylab = "nox (ppb)") seas <- timeaverage(mydata, avg.time = "season") head(seas) spring (MAM) 5.13 [.24,.95] units/year * 1998 1999 1 2 3 4 5 summer (JJA) 6. [.2,.82] units/year + ## date ws wd nox ## 1 1998-1- 11:: 4.695 2.7 223.1 ## 2 1998-4- 23:: 4.6 233.3 163.7 ## 3 1998-7-16 23:: 4.551 245.5 186.2 ## 4 1998--16 11:: 4.189 235.5 2.4 ## 5 1999-1-14 23:: 4.86 234.7 2.8 ## 6 1999-4- 23:: 4.55 234.4 179.7 ## no2 o3 pm so2 co pm ## 1 49.84 3.465 34.31 7.293 2. NaN ## 2 47.6 7.893 31.39 6.792 1.683.99 ## 3 46.83 5.748 31.75 6.519 1.968 19. ## 4 48.36 4.696 32.49 6.954 2.4 22. ## 5 47.52 5.59 29.39 5.929 1.874 19.23 ## 6 45. 8.34 31.67 4.759 1.8 22.57 NO X (ppb) autumn (SON) 7.9 [.37, 23.31] units/year winter (DJF) 12.62 [ 24.9, 2.45] units/year ** The date returned is also the mean of the entire seasonal period. For example, 1998-1- is the mean of the first two months of 1998 (there were no data for 1997) and so on. This addition is probably most useful in trend analysis. Consider for example the seasonal trends 1998 1999 1 2 3 4 5 year Figure 1: Example plot using the TheilSen function to consider NO x concentrations plotted by season, and for seasonal means.

Issue 11, January 12 7 Other developments Below is a summary of the developments to since version.5-11. Update to GoogleMapsPlot. This forces maps to be square until a bug is fixed in the package RgoogleMaps. Tidy up calcfno2 plotting. Improve speed of timeaverage by removing date.pad. Add vector averaging of wind speed to timeaverage. Remove any considerations of time zones in selectbydate. If start and end are supplied, whole days based on Date format are used to select. Now accepts start/end in the form "YYYY-mm-dd" as well as UK format e.g. dd/mm/yyyy. Major update to polarplot allowing variables other than "ws" to be plotted with wind direction. Improve documentation for polarplot/ TaylorDiagram Update citation information to Journal article do not clip polarplot concentrations unless upper is supplied new option intervals for percentilerose add min.bin option to polarannulus add Index of Agreement to modstats new averaging time "season" for timeaverage better treatment of avg.time = "season" and type = "season" in TheilSen and smoothtrend use bootstrap methods to calculate 95% confidence intervals in the mean for timevariation New option difference in timevariation to show difference between two variables with bootstrap 95% CI in the mean Byte-compile package for improved speed Place key on right be default in scatterplot to avoid clash with x or y axis labels. Include all colour schemes defined in the RColorBrewer package, see opencolours Many improvements to the manual. All code associated with plots should appear at the top of each plot. citation information The main citation for the package is now: Carslaw, D.C. and K. Ropkins, (12). an R package for air quality data analysis. Environmental Modelling & Software. Volume 27-28, 52-61. Details of how to cite the manual are given in the manual. Use of colours The package has been updated to allow users to refer directly to those colours in the RColorBrewer package. This is a very useful package for choosing decent colour schemes. Users should refer to the help pages in opencolours for more details, but is summary RColorBrewer schemes can be referred to directly by name. For example, polarplot(mydata, col = "YlOrBr") timevariation(mydata, pollutant = c("no2", "pm", "pm"), col = "Accent")