nc_intercept: Clip a part from a netCDF file to another netCDF file.

Description Usage Arguments

View source: R/nc4_relevents.R

Description

Clip a part from a netCDF file to another netCDF file by providing dimensions, from an to.

Usage

1
2
nc_intercept(file, out_file, from = NULL, to = NULL, dims = NULL,
  vars = NULL, byval = TRUE, compression = NA)

Arguments

file

A netCDF file to be clip.

out_file

The netCDF file to store the cliped part of the original netCDF file.

from

A vector of the border that where to begin to clip the variables at each dimensions. The length should be as same as dims. If byval is TRUE, or time should be the "date-like" integer in the format of YYYYMMDD, such as that 19600101 means "1960-01-01".

to

A vector of the border that where to stop to clip the variables at each dimensions. The length should be as same as dims, details see from.

vars

Variables to be clip. Default all the variables of the origin nc file.

byval

Determine the from and to are values of the dimensions (e.g. longitude values) or the subscript of the dimensions (e.g. the N th value of the variable). Default TRUE, use the values of the dimensions.

compression

The same agrument of function ncvar_def.

dim

Names of the dimensions to be clip. Default are longitude, latitude and time.


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