f_sta_shp_nc: Zonal raster/brick based on a shapefile

Description Usage Arguments Examples

View source: R/Functions.R

Description

Zonal raster/brick based on a shapefile

Usage

1
2
f_sta_shp_nc(ncfilename, basin, fun = "mean", varname, zonal_field,
  start, scale = "month", df = T, weight = T, plot = T)

Arguments

ncfilename

A filename for a "raster*" type object.

basin

A ploygon object.

fun

function for doing zonal (fun="mean"/"sum")

varname

define the variable name

zonal_field

select the field from shapefile file for naming the result

start

the start year for the time series of the input raster

scale

the time step the the input raster

weight

Whether weight polygon for mean

Examples

1
2
sta_shp<-f_sta_shp_nc(ncfilename="/Dataset/backup/CABLE/ET_ann_82_14.nc",
basin,fun="mean",varname="ET",zonal_field="Station",start=1982,scale="annual")

ln1267/dWaSSI documentation built on Dec. 3, 2019, 4:39 a.m.