read_ncvar: Read data from nc file by one line code.

Description Usage Arguments Value

View source: R/nc4_relevents.R

Description

Using one line code to get data from netCDF file.

Usage

1
2
read_ncvar(file, var = NULL, from = NULL, to = NULL, lon = NULL,
  lat = NULL, msize = 2048)

Arguments

file

String. File path of the netCDF file.

var

String. Name of the variable to be get data.

from

A vector indicating where to start reading the values at each dimentions. If byval = TRUE, it's regarded as the dimention value; If byval = FALSE, it's regarded as the indexes.

to

A vector indicating the end of the values to be reading at each dimentions. If byval = TRUE, it's regarded as the dimention value; If byval = FALSE, it's regarded as the indexes.

lon

A length 2 vector. Indicating the longitude range of the data to be get.

lat

A length 2 vector. Indicating the latitude range of the data to be get.

msize

Maximum size (MB) of the data to be read. This is provide that too much data read into memory. If < 0 it will regarded as unlimited. Default 2048 MB (2GB).

Value

A list, including the data of the netCDF file and the dimensions values.


Sibada/sibadaR documentation built on Jan. 31, 2020, 6:40 p.m.