smooth2d: Smooth the 2D data.table fields.

Description Usage Arguments Value

View source: R/data_process.R

Description

该程序调用fields程序库对二维场进行平滑, 首先将离散点插值到nx,ny的网格点上, 如果输入场是等经纬度网格点, 也可看成离散点, 然后插值到(nx,ny)的格点上.之后 调用image.smooth进行平滑, theta控制平滑度, 值越大越平滑. 返回为data.table 数据, 以便于ggplot绘制图像.

Usage

1
smooth2d(x, y, z, theta = 0.03, nx = 128, ny = 128)

Arguments

x

: 1D vector, longitude.

y

: 1D vector, latitude.

z

: 1D vector,

theta

: the bandwidth or scale parameter, larger for smoother.

nx

: Number of grid point in X coordinate.

ny

: Number of grid points in Y coordinate.

Value

data.table, (x, y, z)


nmcdev/nmcMetIO documentation built on Jan. 30, 2022, 5:09 a.m.