readNetCDF: Read in NetCDF data

Description Usage Arguments Details Examples

View source: R/readNetCDF.R

Description

This function reads in NetCDF data and stores it in an object with class 'NetCDF'

Usage

1
readNetCDF(filename, varname = NULL, mask = NULL, mulc = 1)

Arguments

filename

path to input NetCDF file

varname

variable name to read in (one at a time)

mask

vector (logical) with lon-lat indices to be read in

mulc

Multiplicative factor to be multiplied with NetCDF data (see details)

Details

The multiplicative factor can be of length 1 or any subset of the time dimension of the input data so that seasonal data can be converted from units per month to units per season with different multiplicative constants per season.

Units attribute will not get converted if multiplicative constant is different from unity.

Examples

1
2
3
tas <- readNetCDF(system.file("extdata", "annual_CRUTEMv3_1961-90.nc", package="geoutils"), varname="temp")
names(attributes(tas))
dim(tas)

jonasbhend/geoutils documentation built on May 19, 2019, 7:27 p.m.