Article open for discussion

I have been working hard on a manuscript dealing with the evaluation of uncertainties in measurements and model estimations and the result is now available online for discussion:

G. Kos, A. Ryzhkov, A. Dastoor, J. Narayan, A. Steffen, P. A. Ariya, and L. Zhang, Evaluation of discrepancy between measured and modeled oxidized mercury species, Atmos. Chem. Phys. Discuss., 12, 17245-17293, 2012.

http://www.atmos-chem-phys-discuss.net/12/17245/2012/acpd-12-17245-2012.html

or

http://dx.doi.org/10.5194/acpd-12-17245-2012

New article published

Carbonaceous species and humic like substances (HULIS) in Arctic snowpack during OASIS field campaign in Barrow

Snowpacks contain many carbonaceous species that can potentially impact on snow albedo and arctic atmospheric chemistry. During the OASIS field campaign, in March and April 2009, Elemental Carbon (EC), Water insoluble Organic Carbon (WinOC) and Dissolved Organic Carbon (DOC) were investigated in various types of snow: precipitating snows, remobilized snows, wind slabs and depth hoars. EC was found to represent less than 5% of the Total Carbon Content (TCC = EC + WinOC + DOC), whereas WinOC was found to represent an unusual 28 to 42% of TCC. Snow type was used to infer physical processes influencing the evolution of different fractions of DOC. DOC is highest in soil influenced indurated depth hoar layers due to specific wind related formation mechanisms in the early season. Apart from this specific snow type, DOC is found to decrease from precipitating snow to remobilized snow to regular depth hoar. This decrease is interpreted as due to cleaving photochemistry and physical equilibration of the most volatile fraction of DOC. Depending on the relative proportions of diamond dust and fresh snow in the deposition of the seasonal snowpack, we estimate that 31 to 76% of DOC deposited to the snowpack is reemitted back to the boundary layer. Under the assumption that this reemission is purely photochemical, we estimate an average flux of VOC out of the snowpack of 20 to 170 µg C  m-2 h-1. Humic like substances (HULIS), short chain diacids and aldehydes are quantified, and showed to represent altogether a modest (<20%) proportion of DOC, and less than 10% of DOC + WinOC. HULIS optical properties are measured and could be consistent with aged biomass burning or a possible marine source.

http://www.agu.org/pubs/crossref/2012/2011JD016612.shtml

Talks at Bishop’s University & Dawson College

Recently, I gave 2 talks on my research activities with some information on statistics and data analysis (at Bishop’s University: 01 Mar 2012 & Dawson College: 07 Mar 2012) for environmental analytical projects. It’s been fun and there was a lot of discussion with students during and after the talk.

Among other things I explained, why chemists typically measure samples 3 times (hint: check the t-table) and what things to consider, before going sampling (representativity, homogeneity and stability). All this, in the (practical) context of snow sampling from surfaces and pits during my field research in Alert, NU and Barrow, AK.

Contributions at IPY 2012 conference in Montreal

I will be co-authoring 2 contributions at the upcoming IPY 2012 conference in Montreal, Canada (22-27 April 2012):

IPY-OASIS 2009: Bio-organic aerosols and compounds at snow-air interface
P. A. Ariya1,2, G. Kos2, R. Mortazavi2, and Visahini Kanthasami1

and

Volatile Organic Compounds in Snow and Frost Flowers from OASIS-Barrow 2009, Alaska
G. Kos2, V. Kanthasami1, N. Adechina1, and P.A. Ariya1,2

1  Department of Chemistry, McGill University, Montreal, PQ, CANADA, H3A 2K6
2  Department of Atmospheric and Oceanic Sciences, McGill
University, Montreal, PQ, CANADA, H3A 2K6

Fixed: Unable to plot a decent x-Axis in a time series plot using zoo

Here is the link to the original problem. Briefly, I was unable to plot a custom x-axis showing abbreviated months in a time series plot of a zoo object.

In the plot.zoo() function set

xaxt = "n"

to suppress plotting of the x-axis

Since I needed abbreviated months to be plotted as the x-axis, I loaded a csv file with the dates of the first of each month as follows and converted it to dates:

“month”
2004-12-01
2005-01-01
2005-02-01

(I included Dec 2004, because otherwise “Jan” would not be plotted)

month < - read.csv("~/R/2005months.csv")
month$month < - as.Date(month$month, "%Y-%m-%d")

After the plot.zoo command I added the following line –

axis(1, month$month, format(month$month, "%b"))

The solution was inspired by a post from Gabor Grothendieck on r-help. The original solution is still the only way to plot abbreviated months for time series plots of monthly averages.

Boxplots without boxes

Let’s say you have several categories with multiple data points each that you would like to plot as individual points. Even if you have only a single point, the R graphics package will plot a line (without a box for lack of data). Overriding the default setting with e.g. pch = 1 does not help.

R’s boxplot function (or the plot function for that matter) – correctly – generates a boxplot for each category. If you would like to see individual points instead of boxes, the following code snippet could help by using the points function:

# Plot the boxplot as usual, but in white colour to make the boxes invisible, but keep the axes.

boxplot(m$var ~ m$cat, xlab = "Category", ylab = "Variable", border = "white")

# Plot the data again into the same plot and customise the point shape, etc to your liking

points(m$var ~ m$cat, pch = 1)

Voila!

More fun with boxplots

Here are a few more plotting options for boxplots:

Let’s start plotting the full set
plot(b$mod, b$x)

Plot labels for a subset in full set plot (label all points x < -1)
text(subset(b$mod, b$x < -1), subset(b$x, b$x < -1), subset(b$site, b$x < -1), cex=0.6, pos=4, col="red")

Plot subset with x > -1
plot(subset(b$mod, b$x > -1), subset(b$x, b$x > -1))

Plot horizontal gridlines
grid(nx = NA, ny = NULL)

Converting vectors to numeric in mixed-type dataframe

Coercing variables of character and numeric type into a single dataframe yields all vectors to be defined as factors

all <- data.frame(cbind(site, year, model, x, y, z))

The following converts selected variables from “factor” back to “numeric”
all$x <- as.numeric(x)
all$y <- as.numeric(y)
all$z <- as.numeric(z)