cdo.distgrid: R Interface for 'cdo.sellonlatbox' and 'cdo.distgrid'

Description Usage Arguments See Also Examples

Description

R Interface for 'cdo.sellonlatbox' and 'cdo.distgrid'

Usage

1
2
cdo.distgrid(x, y = NULL, ..., outdir = NULL, outfile = NULL,
  dim = c(1, 1), sellonlatbox = TRUE, return.raster = TRUE)

Arguments

x

input netcdf file for 'cdo.sellonlatbox' and the 'cdo.distgrid'

y

extent or Extent* object indicateing the extent to extract or NULL(dafault). It works with sellonlatbox==TRUE.

...

further arguments for cdo.sellonlatbox

outdir, outfile

output directory and/or output file

dim

integer vector reporting the number of rows and columuns of the matrix of tiles into which the cropped map is spit.

sellonlatbox

logical value. if it is TRUE (default) , x is cropped through cdo.sellonlatbox

return.raster

logical value. If is TRUE, outputs are returned as RasterStack-class objects.

See Also

cdo.sellonlatbox

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
## Not run: 

 ncname <- "chirps-v2.0.2005.days_p05.nc"
 url <- "ftp://ftp.chg.ucsb.edu/pub/org/chg/products/CHIRPS-2.0/global_daily/netcdf/p05"
 temp <- tempdir()
 x <- paste(temp,ncname,sep="/")
 download.file(url=paste(url,ncname,sep="/"),destfile=x)




### Africa Extent: extent      : -18.1625, 54.5375, -34.8375, 37.5625  (xmin, xmax, ymin, ymax)
###y <- extent(c(-17.6608, -5.727799, 10.17488, 18.62197)) ## Extent senegal
 y <- extent(c(-18.1625,54.5375,-34.8375,37.5625))

 prec_afr <- cdo.distgrid(x=x,y=y,dim=c(10,10),parallel=TRUE)	



## End(Not run)

ecor/nccdosmart documentation built on May 15, 2019, 10:05 p.m.