Source

CLM_CN_global_to_AQMEII-NA / regrid_global_to_AQMEII.r

Full commit
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
# R code to 2D-regrid CLM-CN global/unprojected netCDF data to AQMEII-NA, an LCC-projected subdomain

# If running manually in R console, remember to run setup actions: `source ./regrid_global_to_AQMEII.sh`

# ----------------------------------------------------------------------
# constants
# ----------------------------------------------------------------------

## data

# kludge for my clumsy namespacing
my.this.fn <- Sys.getenv('CALL_REGRID_FN')
this.fn <- my.this.fn

# all the following env vars must be set and exported in driver script
work.dir <- Sys.getenv('WORK_DIR')
in.pdf.fp <- Sys.getenv('CLM_CN_RAW_PDF_FP')
out.pdf.fp <- Sys.getenv('CLM_CN_REGRID_PDF_FP')
pdf.er <- Sys.getenv('PDF_VIEWER')
sigdigs <- as.numeric(Sys.getenv('OUTPUT_SIGNIFICANT_DIGITS'))

in.fp <- Sys.getenv('CLM_CN_RAW_FP')
raster.rotate <- as.logical( Sys.getenv('ROTATE_INPUT'))
# in.band <- Sys.getenv('CLM_CN_REGRID_BAND')

raw.datavar.name <- Sys.getenv('CLM_CN_RAW_DATAVAR_NAME')
raw.datavar.longname <- Sys.getenv('CLM_CN_RAW_DATAVAR_LONGNAME')
raw.datavar.unit <- Sys.getenv('CLM_CN_RAW_DATAVAR_UNIT')
# raw.datavar.na <- as.numeric(Sys.getenv('CLM_CN_RAW_DATAVAR_NA'))
time.dim.name <- Sys.getenv('CLM_CN_RAW_TIME_VAR_NAME')

template.var.name <- Sys.getenv('TEMPLATE_VAR_NAME')
template.in.fp <- Sys.getenv('TEMPLATE_INPUT_FP')

regrid.datavar.name <- raw.datavar.name
regrid.datavar.longname <- raw.datavar.longname
regrid.datavar.unit <- raw.datavar.unit
# regrid.datavar.na <- raw.datavar.na

out.fp <- Sys.getenv('CLM_CN_REGRID_FP')
x.var.name <- Sys.getenv('CLM_CN_REGRID_X_VAR_NAME')
y.var.name <- Sys.getenv('CLM_CN_REGRID_Y_VAR_NAME')
z.var.name <- Sys.getenv('CLM_CN_REGRID_TIME_VAR_NAME')
z.var.unit <- Sys.getenv('CLM_CN_REGRID_TIME_VAR_UNIT')

stat.script.fp <- './netCDF.stats.to.stdout.r' # Sys.getenv('STAT_SCRIPT_FP')

## plotting

# plot.script.fp <- './plotLayersForTimestep.r' # Sys.getenv('PLOT_SCRIPT_FP')
# pdf.main.title <- 'N2O emissions' # Sys.getenv('CLM_CN_REGRID_PDF_TITLE')
# pdf.sub.title <- regrid.datavar.unit
# pdf.title <- sprintf('%s\n%s', pdf.title, regrid.datavar.unit)

# get a global map
library(maps)
map.world.unproj <- maps::map('world', plot=FALSE)
global.proj4 <- '+proj=longlat +ellps=WGS84'

# get a North American map
library(maptools)
data(wrld_simpl) # from maptools

# # package=M3 map for fields::image.plot
# map.table.fp <- './map.CMAQm.world.dat' # Sys.getenv('MAP_TABLE_FP')
# map.cmaq <- read.table(map.table.fp, sep=",")
# palette.vec <- c(
# # original from KMF, 3 colors added to get deciles in probabilities.vec
#   #              R color
#   #                code
#   "grey",         # 260
#   "purple",       # 547
#   "deepskyblue2", # 123  
#   "green",        # 254
#   "greenyellow",  # 259
#   "yellow",       # 652
#   "orange",       # 498
#   "orangered",    # 503
#   "red",          # 552
#   "red4",         # 556
#   "brown"         #  32
# )
# colors <- colorRampPalette(palette.vec)
# # used for quantiling legend
# probabilities.vec <- seq(0, 1, 1.0/(length(palette.vec) - 1))
# # probabilities.vec
# # [1] 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0

# ----------------------------------------------------------------------
# functions
# ----------------------------------------------------------------------

visualize.layers <- function(
  nc.fp,           # path to netCDF datasource ...
  brick,           # ... for data (a RasterBrick)
  datavar.name,    # name of the netCDF data variable
  layer.dim.name,  # name of the datavar dimension indexing the layers (e.g., 'time')
# TODO: take vector of maps
  map.shp,         # SpatialLines containing map to overlay on data
  pdf.fp,          # path to PDF output
  pdf.height,
  pdf.width
) {

  system(sprintf('ncdump -h %s', nc.fp))
  # Now get stats on data for each actual month in the input: no!
  # until netCDF.stats.to.stdout.by.timestep supports range restriction, just get all timesteps
  netCDF.stats.to.stdout.by.timestep(
    netcdf.fp=nc.fp, data.var.name=datavar.name, time.dim.name=layer.dim.name)
#  # TODO: make these work as if evaluated @ top level
#  brick          # show it
#  summary(brick) # compare to netCDF.stats above

  # start plot driver
  cat(sprintf(
    '%s: plotting %s (may take awhile! TODO: add progress control)\n',
    'visualize.layers', pdf.fp))
  pdf(file=pdf.fp, width=pdf.width, height=pdf.height)

  library(rasterVis)
#  rasterVis::levelplot(brick,
  # since we're inside a function
  plot(rasterVis::levelplot(brick,
  #  layers,
    margin=FALSE,
  #  names.attr=names(global.df),
    layout=c(1,length(names(brick)))
  ) +
    latticeExtra::layer(
# why does this fail if map.shp is local? see 'KLUDGE' in callers :-(
      sp::sp.lines(map.shp, lwd=0.8, col='darkgray')))
# ... and this works?
#      sp::sp.lines(map.world.unproj.shp, lwd=0.8, col='darkgray')))
  dev.off()

} # end visualize.layers <- function

# ----------------------------------------------------------------------
# payload
# ----------------------------------------------------------------------

# ----------------------------------------------------------------------
# setup
# ----------------------------------------------------------------------

# accelerate R graphics over SSH, per Adam Wilson
# http://planetflux.adamwilson.us/2012/03/r-graphics-via-ssh.html
X11.options(type="Xlib")

source(stat.script.fp) # in script, produces errant error=
#> netCDF.stats.to.stdout.r: no arguments supplied, exiting
# source(plot.script.fp)

# coordinate reference system:
# use package=M3 to get CRS from template file
library(M3)
out.proj4 <- M3::get.proj.info.M3(template.in.fp)
# cat(sprintf('out.proj4=%s\n', out.proj4)) # debugging
# out.proj4=+proj=lcc +lat_1=33 +lat_2=45 +lat_0=40 +lon_0=-97 +a=6370000 +b=6370000
out.crs <- sp::CRS(out.proj4)
global.crs <- sp::CRS(global.proj4)

# "create" world map
map.world.unproj.shp <-
  maptools::map2SpatialLines(map.world.unproj, proj4string=global.crs)
# summary(map.world.unproj.shp) # debugging

# "create" unprojected North American map
map.noram.shp.unproj <- wrld_simpl[wrld_simpl$ISO3 %in% c('CAN', 'MEX', 'USA'),]
# > class(map.noram.shp.unproj)
# [1] "SpatialPolygonsDataFrame"
# attr(,"package")
# [1] "sp"
# > slotNames(map.noram.shp.unproj)
# [1] "data"        "polygons"    "plotOrder"   "bbox"        "proj4string"
# > class(map.noram.shp.unproj@data)
# [1] "data.frame"
## > class(map.noram.shp.unproj@polygons)
## [1] "list"
# > head(map.noram.shp.unproj@polygons)
# DON'T DO THIS--it's huge

# ----------------------------------------------------------------------
# (minimally) process input
# ----------------------------------------------------------------------

library(raster)
# in.raster <- raster::raster(in.fp, varname=raw.datavar.name, band=in.band)
in.raster <- raster::brick(in.fp, varname=raw.datavar.name)
# replace the layer names
in.raster.layers.n <- length(names(in.raster))
names(in.raster) <- as.character(c(1:in.raster.layers.n))
# correct zero-based longitudes. TODO: test first!
if (raster.rotate) {
  in.raster <- rotate(
    in.raster,      # )
    overwrite=TRUE) # else levelplot does one layer per page?
}

# # start debugging
# in.raster
# summary(in.raster) # compare to netCDF.stats following
# #   end debugging

# > in.raster
# class       : RasterBrick 
# dimensions  : 96, 144, 13824, 14  (nrow, ncol, ncell, nlayers)
# resolution  : 2.5, 1.875  (x, y)
# extent      : -180, 180, -90, 90  (xmin, xmax, ymin, ymax)
# coord. ref. : +proj=longlat +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0 
# data source : in memory
# names       :        X1,        X2,        X3,        X4,        X5,        X6,        X7,        X8,        X9,       X10,       X11,       X12,       X13,       X14 
# min values  :         0,         0,         0,         0,         0,         0,         0,         0,         0,         0,         0,         0,         0,         0 
# max values  :  451.1202,  451.1202,  526.0969,  479.2770,  523.1622,  662.8298, 1183.8647, 1011.5519, 1961.3065,  583.5884,  590.4103,  507.7597,  904.2662,  904.2662 
# z-value     : 732892, 732923, 732954, 732983, 733014, 733044, 733075, 733105, 733136, 733167, 733197, 733228, 733258, 733289 

# > summary(in.raster) # zeros reformatted for clarity
#                 [,1]         [,2]         [,3]         [,4]         [,5]
# Min.    0            0            0            0            0           
# 1st Qu. 0            0            0            0            0           
# Median  0            0            0            0            0           
# 3rd Qu. 1.122448e-08 1.122448e-08 3.469217e-09 4.834096e-08 1.429877e-05
# Max.    4.511202e+02 4.511202e+02 5.260969e+02 4.792770e+02 5.231622e+02
# NA's    0            0            0            0            0           
#                 [,6]         [,7]         [,8]         [,9]        [,10]
# Min.    0            0            0            0            0           
# 1st Qu. 0            0            0            0            0           
# Median  0            0            0            0            0           
# 3rd Qu. 1.534622e-04 1.763448e-03 5.498378e-03 5.348118e-03 2.348898e-03
# Max.    6.628298e+02 1.183865e+03 1.011552e+03 1.961307e+03 5.835884e+02
# NA's    0            0            0            0            0           
#                [,11]        [,12]        [,13]        [,14]
# Min.    0            0            0            0           
# 1st Qu. 0            0            0            0           
# Median  0            0            0            0           
# 3rd Qu. 7.738026e-04 3.494962e-07 4.448062e-08 4.448062e-08
# Max.    5.904103e+02 5.077597e+02 9.042662e+02 9.042662e+02
# NA's    0            0            0            0           

# ----------------------------------------------------------------------
# visualize input
# ----------------------------------------------------------------------

# KLUDGE!
map.shp <- map.world.unproj.shp

visualize.layers(
  nc.fp=in.fp,
  brick=in.raster,
  datavar.name=raw.datavar.name,
  layer.dim.name=time.dim.name,
  map.shp=map.world.unproj.shp,
  pdf.fp=in.pdf.fp,
  pdf.height=25,
  pdf.width=5
)

# globe displays normally, dim=lon-lat
# interesting Asian spikes 6-9

# ----------------------------------------------------------------------
# regrid monthly
# ----------------------------------------------------------------------

# use M3 to get extents from template file (thanks CGN!)
extents.info <- M3::get.grid.info.M3(template.in.fp)
extents.xmin <- extents.info$x.orig
extents.xmax <- max(
  M3::get.coord.for.dimension(
    file=template.in.fp, dimension="col", position="upper", units="m")$coords)
extents.ymin <- extents.info$y.orig
extents.ymax <- max(
  M3::get.coord.for.dimension(
    file=template.in.fp, dimension="row", position="upper", units="m")$coords)
grid.res <- c(extents.info$x.cell.width, extents.info$y.cell.width) # units=m

template.extents <-
  raster::extent(extents.xmin, extents.xmax, extents.ymin, extents.ymax)
# template.extents # debugging
# class       : Extent 
# xmin        : -2556000 
# xmax        : 2952000 
# ymin        : -1728000 
# ymax        : 1860000 

template.in.raster <-
#  raster::raster(template.in.fp, varname=template.var.name, band=template.band)
  raster::raster(template.in.fp, varname=template.var.name)
template.raster <- raster::projectExtent(template.in.raster, crs=out.crs)
#> Warning message:
#> In projectExtent(template.in.raster, out.proj4) :
#>   158 projected point(s) not finite
# is that "projected point(s) not finite" warning important? Probably not, per Hijmans

# without this, extents aren't correct!
template.raster@extent <- template.extents
# should resemble the domain specification @
# https://github.com/TomRoche/cornbeltN2O/wiki/AQMEII-North-American-domain#wiki-EPA

# template.raster # debugging
# class       : RasterLayer 
# dimensions  : 299, 459, 137241  (nrow, ncol, ncell)
# resolution  : 12000, 12000  (x, y)
# extent      : -2556000, 2952000, -1728000, 1860000  (xmin, xmax, ymin, ymax)
# coord. ref. : +proj=lcc +lat_1=33 +lat_2=45 +lat_0=40 +lon_0=-97 +a=6370000 +b=6370000 

# at last: do the regridding
out.raster <-
  raster::projectRaster(
    # give a template with extents--fast, but gotta calculate extents
    from=in.raster, to=template.raster, crs=out.crs,
    # give a resolution instead of a template? no, that hangs
#    from=in.raster, res=grid.res, crs=out.proj4,
    method='bilinear', overwrite=TRUE, format='CDF',
    # args from writeRaster
#    NAflag=regrid.datavar.na,
    varname=regrid.datavar.name, 
    varunit=regrid.datavar.unit,
    longname=regrid.datavar.longname,
    xname=x.var.name,
    yname=y.var.name,
    zname=z.var.name,
    zunit=z.var.unit,
    filename=out.fp)

# # start debugging
# out.raster
# system(sprintf('ls -alht %s | head', work.dir))
# system(sprintf('ncdump -h %s', out.fp))
# netCDF.stats.to.stdout.by.timestep(
#   netcdf.fp=out.fp, data.var.name=regrid.datavar.name, time.dim.name='time')
# #   end debugging

# > out.raster
# class       : RasterBrick 
# dimensions  : 299, 459, 137241, 14  (nrow, ncol, ncell, nlayers)
# resolution  : 12000, 12000  (x, y)
# extent      : -2556000, 2952000, -1728000, 1860000  (xmin, xmax, ymin, ymax)
# coord. ref. : +proj=lcc +lat_1=33 +lat_2=45 +lat_0=40 +lon_0=-97 +a=6370000 +b=6370000 
# data source : /home/rtd/code/regridding/CLM_CN_global_to_AQMEII-NA/2008PTONCLMCNN2O_regrid.nc 
# names       : X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X12, X13, X14 
# z-value     : 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 
# varname     : n2oemissions 

# note out.raster@extent in meters, zero-centered

# > system(sprintf('ncdump -h %s', out.fp))
# netcdf \2008PTONCLMCNN2O_regrid {
# dimensions:
#   COL = 459 ;
#   ROW = 299 ;
#   time = UNLIMITED ; // (14 currently)
# variables:
#   double COL(COL) ;
#     COL:units = "meter" ;
#     COL:long_name = "COL" ;
#   double ROW(ROW) ;
#     ROW:units = "meter" ;
#     ROW:long_name = "ROW" ;
#   int time(time) ;
#     time:units = "month (1=2, 2=Jan, ... 13=Dec, 13=14)" ;
#     time:long_name = "time" ;
#   float n2oemissions(time, ROW, COL) ;
#     n2oemissions:units = "mgN/m2/month" ;
#     n2oemissions:_FillValue = -3.4e+38 ;
#     n2oemissions:missing_value = -3.4e+38 ;
#     n2oemissions:long_name = "N2O emissions" ;
#     n2oemissions:projection = "+proj=lcc +lat_1=33 +lat_2=45 +lat_0=40 +lon_0=-97 +a=6370000 +b=6370000" ;
#     n2oemissions:projection_format = "PROJ.4" ;
#     n2oemissions:min = 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0. ;
#     n2oemissions:max = 5.11556934631735, 5.11556934631735, 7.5402387212348, 33.9675487444286, 35.576195359168, 29.08862056211, 149.982927003544, 174.181162633967, 44.017017369279, 53.2281713126664, 25.7052935681188, 14.5454227669125, 15.1988578410051, 15.1988578410051 ;

# ----------------------------------------------------------------------
# visualize output
# ----------------------------------------------------------------------

## project North American map

map.noram.shp.proj <- rgdal::spTransform(map.noram.shp.unproj, CRS=out.crs)
# TODO: gotta have SpatialLines, not SpatialPolygons
# # start debugging
# class(map.noram.shp.proj)
# bbox(map.noram.shp.proj)
# #   end debugging

# > class(map.noram.shp.proj)
# [1] "SpatialPolygonsDataFrame"
# attr(,"package")
# [1] "sp"
# > bbox(map.noram.shp.proj)
#        min     max
# x -6930127 3233667
# y -2879573 5675464

# compare to (above)
# > template.extents
# class       : Extent 
# xmin        : -2556000 
# xmax        : 2952000 
# ymin        : -1728000 
# ymax        : 1860000 

## Get US state boundaries in projection units

# see http://stackoverflow.com/questions/14865507/how-to-display-a-projected-map-on-an-rlatticelayerplot
state.map <- maps::map(
  database="state", projection="lambert", par=c(33,45), plot=FALSE)
#                  parameters to lambert: ^^^^^^^^^^^^
#                  see mapproj::mapproject
# note class(state.map) == "map"

# replace its coordinates with the following:
# metadata.coords.IOAPI.list <- M3::get.grid.info.M3(out.fp)
# no, out.fp lacks the IOAPI metadata
metadata.coords.IOAPI.list <- M3::get.grid.info.M3(template.in.fp)
metadata.coords.IOAPI.x.orig <- metadata.coords.IOAPI.list$x.orig
metadata.coords.IOAPI.y.orig <- metadata.coords.IOAPI.list$y.orig
metadata.coords.IOAPI.x.cell.width <- metadata.coords.IOAPI.list$x.cell.width
metadata.coords.IOAPI.y.cell.width <- metadata.coords.IOAPI.list$y.cell.width
state.map.lines <- M3::get.map.lines.M3.proj(
#  file=out.fp, database="state", units="m")
  file=template.in.fp, database="state", units="m")
state.map.lines.coords.IOAPI.x <-
  (state.map.lines$coords[,1] - metadata.coords.IOAPI.x.orig)
# no! here, dimensions are in meters, not cells
#    /metadata.coords.IOAPI.x.cell.width
state.map.lines.coords.IOAPI.y <-
  (state.map.lines$coords[,2] - metadata.coords.IOAPI.y.orig)
#    /metadata.coords.IOAPI.y.cell.width
state.map.lines.coords.IOAPI <- 
  cbind(state.map.lines.coords.IOAPI.x, state.map.lines.coords.IOAPI.y)

# start debugging
# class(state.map.lines.coords.IOAPI)
# summary(state.map.lines.coords.IOAPI)
# #   end debugging

# > class(state.map.lines.coords.IOAPI)
# [1] "matrix"
# > summary(state.map.lines.coords.IOAPI)
#  state.map.lines.coords.IOAPI.x state.map.lines.coords.IOAPI.y
#  Min.   : 283762                Min.   : 160844               
#  1st Qu.:2650244                1st Qu.:1054047               
#  Median :3469204                Median :1701052               
#  Mean   :3245997                Mean   :1643356               
#  3rd Qu.:4300969                3rd Qu.:2252531               
#  Max.   :4878260                Max.   :2993778               
#  NA's   :168                    NA's   :168             

# out.raster@extent in meters, zero-centered:
# extent : -2556000, 2952000, -1728000, 1860000  (xmin, xmax, ymin, ymax)
# derive out.raster@range(x)==5508000, range(y)==3588000
# but map@extent is not zero-based. Sooo ... just add (xmin, ymin) ???

state.map.IOAPI <- state.map # copy
state.map.IOAPI$x <- state.map.lines.coords.IOAPI.x + extents.xmin
state.map.IOAPI$y <- state.map.lines.coords.IOAPI.y + extents.ymin
state.map.IOAPI$range <- c(
  min(state.map.IOAPI$x),
  max(state.map.IOAPI$x),
  min(state.map.IOAPI$y),
  max(state.map.IOAPI$y))
state.map.IOAPI.shp <-
  maptools::map2SpatialLines(state.map.IOAPI, proj4string=out.crs)
# # start debugging
# class(state.map.IOAPI.shp)
# bbox(state.map.IOAPI.shp)
# # summary(do.call("rbind",    # thanks, Felix Andrews!
# #   unlist(coordinates(state.map.IOAPI.shp), recursive=FALSE)))
# #   end debugging

# > class(state.map.IOAPI.shp)
# [1] "SpatialLines"
# attr(,"package")
# [1] "sp"
# > bbox(state.map.IOAPI.shp)
#        min     max
# x -2272238 2322260
# y -1567156 1265778

# compare to (above)
# > template.extents
# class       : Extent 
# xmin        : -2556000 
# xmax        : 2952000 
# ymin        : -1728000 
# ymax        : 1860000 

# KLUDGE!
map.shp <- state.map.IOAPI.shp
#map.shp <- map.noram.shp.proj

visualize.layers(
  nc.fp=out.fp,
  brick=out.raster,
  datavar.name=regrid.datavar.name,
  layer.dim.name=time.dim.name,
#  map.shp=state.map.IOAPI.shp,
  map.shp=map.noram.shp.proj,
  pdf.fp=out.pdf.fp,
  pdf.height=25,
  pdf.width=5
)