rmf_gradient.rmf_2d_array
calculates the x and y components of the gradient from a 2d scalar field
rmf_gradient.rmf_3d_array
calculates the x, y and z components of the gradient from a 3d scalar field
rmf_gradient.rmf_4d_array
calculates the x, y and z components of the gradient from a 4d scalar field where the 4th dimension is time
rmf_gradient(...) # S3 method for rmf_2d_array rmf_gradient(obj, dis, na_values = NULL, mask = obj * 0 + 1) # S3 method for rmf_3d_array rmf_gradient(obj, dis, na_values = NULL, mask = obj * 0 + 1) # S3 method for rmf_4d_array rmf_gradient(obj, dis, l, ...)
... | additional arguments passed to |
---|---|
obj | 4d array with the scalars |
dis |
|
na_values | optional; sets these values in obj to 0; defaults to NULL |
mask | logical 3d array indicating which cells to include in the gradient calculation; defaults to all cells active |
l | integer index used to subset the 4th dimension of the 4d array |
a list with the x and y components of the gradient field as 2d arrays
a list with the x, y and z components of the gradient field as 3d arrays
a list with the x, y and z components of the gradient field as 3d arrays
The gradient is evaluated in the direction of increasing x & y values. Central differences are used for interior points; single-sided differences for values at the edges of the matrix.
The gradient is evaluated in the direction of increasing x, y & z values. Central differences are used for interior points; single-sided differences for values at the edges of the matrix.
the 4d array is subsetted on the 4th dimension to a 3d array from which the gradient is calculated