[R-sig-Geo] "regridding" netCDF?

Tom Roche Tom_Roche at pobox.com
Thu Jul 5 19:03:13 CEST 2012


I'd appreciate advice regarding tools and methods for transforming
values "contained" in a netCDF spatial grids in one {projection,
resolution} to another, or pointers to other resources to consult.
Apologies if the following is too verbose (I'm hoping this is a common
usecase) or uses the wrong vocabulary (please correct where needed),
but here's what I mean:

I'm a student attempting to work on N2O using a particular atmospheric
model (CMAQ). My group want to take N2O emissions from various sources
in the continental US (CONUS) and then "blow them around" (and do some
chemistry and photolysis) with CMAQ. We have other CMAQ inputs for our
usecase on a 12 km x 12 km Lambert conformal conic (LCC) grid, so we
need to get our N2O emissions on the same grid (i.e., "regrid" them).
However, most of my emissions will be coming from global inventories
(EDGAR, GEIA, GFED) which are gridded lat-lon at differing resolutions
(e.g., 0.1°x0.1°, 1°x1°).

I know how to reproject grid *points* (corners, centers) from lat-lon
to 12-km LCC using R package=M3

http://cran.r-project.org/web/packages/M3/

What I don't understand yet (algorithmically, anyway--mental picture
below) is how to reallocate gridded *values* from any one given
{projection, resolution} tuple to another. E.g.:

EDGAR 4.2 gives the mass emitted from each 0.1°x0.1° lat-lon gridcell
over the globe. At 40° N (a middle latitude of CONUS), 0.1°x0.1° is
approx 11 km N-S x 8.5 km E-W. I need to transform the values from
those gridcells into those for a 12x12 km LCC CMAQ grid (which of
course will deviate slightly from those exact dimensions--we have the
exact grid centers and corners) over CONUS, such that, over the same
area, the sum of the masses in the CMAQ grid matches that of the EDGAR
grid.

In the general case, each transformed/CMAQ gridcell will intersect/
overlap parts of 4 source/EDGAR gridcells, so the emissions captured
within the CMAQ gridcell will be the sum of the 4 products (for each
of the overlappings)

overlap area * 
total emissions from overlapped EDGAR gridcell / 
total area of overlapped EDGAR gridcell

Calculating that for a large grid sounds like work, but also sounds
like work someone has previously needed to do. (This doesn't sound to
me like a unique task--am I missing something?) As a coder, I'm more
than willing to reuse :-) but am wondering where to look.

Your coding recommendations are appreciated, as would be pointers to
helpful resources. Thanks in advance, and feel free to forward,
Tom Roche <Tom_Roche at pobox.com>



More information about the R-sig-Geo mailing list