nc_merge_remap: merge and remap a list of ncdf files

Description Usage Arguments Value Examples

View source: R/merge_remap.R

Description

This function allows you to remap a netcdf horizontally and vertically to a specific latlon box

Usage

1
2
3
nc_merge_remap(ff_list, merge = "merge", expr = NULL,
  remap_point = "pre", out_file = NULL, zip_file = FALSE,
  cdo_output = FALSE, overwrite = FALSE, ...)

Arguments

ff_list

This is a character vector of files to merge

merge

This is the merge type. Use "merge" to combine files, "mergetime" to merge based on time.

expr

This is a cdo expression to apply to the merged files.

remap_point

This is the remap_point. Set to "pre" if you want to remap the files before merging, or "post" if you want to remap post-merging. The default is pre as this insures against horizontal grids being slightly different.

out_file

The name of the file output. If this is not stated, a data frame will be the output.

zip_file

Do you want any output file to be zipped to save space. Default is FALSE.

cdo_output

Set to TRUE if you want to see the cdo output

overwrite

Do you want to overwrite out_file if it exists? Defaults to FALSE

...

Arguments to be sent to nc_remap.

Value

data frame or netcdf file.

Examples

1
2
3
4
5
ff1 <- system.file("extdata", "icec.mon.ltm.1981-2010.nc", package = "rcdo")
ff2 <- system.file("extdata", "sst.mon.ltm.1981-2010.nc", package = "rcdo")
ff_list <- c(ff1, ff2)
uk_coords <- expand.grid(Longitude = seq(-20, 10, 1), Latitude = seq(48, 62, 1))
nc_merge_remap(ff_list, coords = uk_coords, cdo_output = TRUE)

r4ecology/rcdo documentation built on July 21, 2019, 9 p.m.