map_regular {cmsafops}R Documentation

Grid interpolation.

Description

The function interpolates the irregular gridded data of infile using grid information of auxfile. The intention of this function is to remap CLAAS level-2 data onto a regular gridded lon / lat grid. By default, a nearest neighbor interpolation provided by get.knnx is used.

Usage

map_regular(
  var,
  infile,
  auxfile,
  outfile,
  dxy = 0.05,
  dxy_factor = 1,
  method = "nearest",
  nc34 = 4,
  overwrite = FALSE,
  verbose = FALSE,
  nc = NULL
)

Arguments

var

Name of NetCDF variable (character).

infile

Filename of input NetCDF file (irregular gridded). This may include the directory (character). The data of infile are interpolated.

auxfile

Filename auxiliary file. This may include the directory (character).

outfile

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

dxy

Grid resolution of the regular output grid in degrees (numeric). Default is 0.05°.

dxy_factor

In case of nearest neighbor all grid points with distance > (dxy * dxy_factor) are set to NA (numeric). Default is 1.

method

Method used for remapping (character). Default and so far the only option is "nearest" for nearest-neighbor interpolation.

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

nc

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

Value

A NetCDF file including the interpolated data of infile on a regular lon / lat grid with a spatial resolution of dxy.

See Also

Other data manipulation functions: acsaf_box_mergetime(), add_grid_info(), box_mergetime(), cmsaf.transform.coordinate.system(), levbox_mergetime(), remap()


[Package cmsafops version 1.4.0 Index]