nc_changePrimeMeridian: Change the Prime Meridian of a variable in a ncdf file.

View source: R/nctools-extras.R

nc_changePrimeMeridianR Documentation

Change the Prime Meridian of a variable in a ncdf file.

Description

Change the Prime Meridian of a variable in a ncdf file.

Usage

nc_changePrimeMeridian(
  filename,
  output,
  varid = NA,
  MARGIN = 1,
  primeMeridian = "center",
  verbose = FALSE,
  overwrite = FALSE,
  compression = NA,
  mem.limit = 3072,
  ignore.case = FALSE
)

Arguments

filename

The filename of the original ncdf file.

output

The name of the output file.

varid

The name of the variable to extract.

primeMeridian

position of the Prime Meridian. Use "center" for [-180,180] range values and "left" for [0,360] range (Pacific centered).

verbose

If TRUE, run verbosely.

overwrite

overwrite output file if already exists?

compression

If set to an integer between 1 (least compression) and 9 (most compression), this enables compression for the variable as it is written to the file. Turning compression on forces the created file to be in netcdf version 4 format, which will not be compatible with older software that only reads netcdf version 3 files.

mem.limit

Maximum RAM size to be used per iteration. If the total size of the variable exceeds this value, the reshape is done iteratively. By default is 3072MB (3GB).


roliveros-ramos/nctools documentation built on Aug. 13, 2022, midnight