cmsaf.sub.rel: Subtract the fields of two input NetCDF files (relative)....

View source: R/cmsaf.sub.rel.R

cmsaf.sub.relR Documentation

Subtract the fields of two input NetCDF files (relative). Designed for the CM SAF R Toolbox.

Description

The function subtracts the fields of infile2 from the fields of infile1. Infiles have to have the same spatial and temporal dimension.

Usage

cmsaf.sub.rel(
  var1,
  infile1,
  var2,
  infile2,
  outfile,
  nc34 = 4,
  overwrite = FALSE,
  verbose = FALSE,
  nc1 = NULL,
  nc2 = NULL
)

Arguments

var1

Name of variable in infile1 (character).

infile1

Filename of first input NetCDF file. This may include the directory (character).

var2

Name of variable in infile2 (character).

infile2

Filename of second input NetCDF file. This may include the directory (character).

outfile

Filename of output NetCDF file. This may include the directory (character).

nc34

NetCDF version of output file. If nc34 = 3 the output file will be in NetCDFv3 format (numeric). Default output is NetCDFv4.

overwrite

logical; should existing output file be overwritten?

verbose

logical; if TRUE, progress messages are shown

nc1

Alternatively to infile1 you can specify the input as an object of class ncdf4 (as returned from ncdf4::nc_open).

nc2

Alternatively to infile2 you can specify the input as an object of class ncdf4 (as returned from ncdf4::nc_open).

Value

A NetCDF file including the subtracted fields of infile1 and infile2 is written.


cmsafops documentation built on Sept. 18, 2023, 5:16 p.m.