aggregate_ncdf: Aggregate ncdf climate (raster) data for catchment subbasins

Description Usage Arguments Value

View source: R/aggregate_ncdf.R

Description

Aggregate ncdf climate (raster) data for catchment subbasins

Usage

1
2
3
4
5
6
7
8
9
aggregate_ncdf(
  ncdf_file,
  crs_ncdf,
  shape_file,
  shape_index,
  var_name = NULL,
  latlon_name = NULL,
  time_range = NULL
)

Arguments

ncdf_file

Path to the ncdf file

crs_ncdf

Character string providing the reference system of ncdf file

shape_file

Shape file with the basin sub-unit polygons or path to the file as character string

shape_index

Name of the column in the basin shapefile attribute table that provides the indices of the basin subunits

var_name

(optional) character string. Name of the variable array to be extracted from the ncdf file. If NULL the first variable provided in the ncdf file is selected automatically

latlon_name

(optional) character vector of length 2. Names of the longitude and latitude variables in the ncdf file. Must be provided if the variables connot be found automatically

time_label

(optional) vector of length 2. Start and end date of the time range that should be extracted from the ncdf file. Dates can be either provided as unambiguous text strings (e.g. 'yyyy-mm-dd' or in a date format

Value

Returns a tibble that provides the time series of the aggregated variable for the respective basin subunits


chrisschuerz/aRastoCAT documentation built on May 16, 2020, 1:33 a.m.