Dear Members,

I have two netcdfs here:
http://dl.dropbox.com/u/4030944/regcm.cumul.hdd.10k.96_05.fixed.latlonvars.ncand
here:
http://dl.dropbox.com/u/4030944/flip.percap.vulcan.10k.dp.build.381.RES.EIAmy.96_05.this.latest.nc.
The former has variable "*hdd" *and the latter "emitpercap" each of
dimensions 507 x 356 x 120 (it is a grid of 356 lats, 507 lon and 120 time
steps). I read them in as bricks using the code snippet

rcmraster <- brick("regcm.cumul.hdd.10k.96_05.fixed.latlonvars.nc", varname
= "hdd")

emitraster <- brick("
flip.percap.vulcan.10k.dp.build.381.RES.EIAmy.96_05.this.latest.nc
",varname="emitpercap")
setMinMax(rcmraster)
setMinMax(emitraster)

These are the details of the two rasters:

> setMinMax(rcmraster)
class       : RasterBrick
filename    : regcm.cumul.hdd.10k.96_05.fixed.latlonvars.nc
nlayers     : 120
nrow        : 356
ncol        : 507
ncell       : 180492
projection  : +proj=longlat +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0
min value   : 1.9e+00 3.5e-02 9.1e-01 5.1e-03 3.9e-03 3.8e-04 1.0e-03
5.3e-05 1.5e-03 9.9e-04 ...
max value   : 2241 2099 1835 1457 1325  900  843  979 1142 1391 ...
xmin        : -137.3312
xmax        : -62.11259
ymin        : 22.12693
ymax        : 57.35954
xres        : 0.1483602
yres        : 0.09896801


> setMinMax(emitraster)
class       : RasterBrick
filename    :
flip.percap.vulcan.10k.dp.build.381.RES.EIAmy.96_05.this.latest.nc
nlayers     : 120
nrow        : 356
ncol        : 507
ncell       : 180492
projection  : +proj=longlat +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0
min value   : 1.1e-08 8.7e-09 7.0e-09 5.3e-09 3.6e-09 2.6e-09 2.0e-09
1.4e-09 2.0e-09 2.6e-09 ...
max value   : 4682 5136 3190 3162 1666 1089 1038  879  944 1113 ...
xmin        : -137.3312
xmax        : -62.11259
ymin        : 22.12693
ymax        : 57.35954
xres        : 0.1483602
yres        : 0.09896801

I encounter two errors; A) when using extent to crop the rasters

lims <- extent(rcmraster,180,185,300,305)
Error in .local(x, ...) : unused argument(s) (180, 185, 300, 305)

I also tried using lat-long values in place of the index to no avail.

and B) using stack

s_crop <- stack(emitraster,rcmraster)
Error in function (classes, fdef, mtable)  :
  unable to find an inherited method for function "trim", for signature
"integer"

You may recall this was discussed at length a few months ago in a fairly
long thread titled "gridded time series analysis". I was trying to repeat
the procedure when I encountered the same errors. Robert had suggested using
*setMinMax* on the bricks to prevent the stack error from occurring but it
did not work this time around. Thanks in advance fore the help and apologies
for the repetition.

Regards,

-- 
advait godbole

	[[alternative HTML version deleted]]

