first_derivative_x
- first_derivative_x(fs, mode='fdiff', poles_missing_values=False)
Computes the zonal (from West to East) partial derivative of each field in
fsin */m units.- Parameters
fs (
Fieldset) – input fieldsetmode ({"fdiff", "felem"}, default: "fdiff") – specifies the computation mode (see below)
poles_missing_values (bool, default: False) – puts missing values at the poles when
modeis “felem”.
- Return type
The numerical method to compute the derivative is based on the value of
mode.When
modeis “fdiff”:a second order finite-difference approximation is used
the output fields contain missing values at the poles
only works for regular latitude-longitude grids
When
modeis “felem”:a finite-element technique is used
works with (regular and reduced) latitude-longitude and Gaussian grids
no missing values are allowed in
fs!the computations are performed by using
regrid()with the nabla=”scalar_gradient” option to compute the gradient and taking the zonal component of it
The computations for a field f are based on the following formula:
\[\frac {\partial f}{\partial x} = \frac{1}{R \ cos\phi}\frac{\partial f}{\partial \lambda}\]where:
R is the radius of the Earth
\(\phi\) is the latitude
\(\lambda\) is the longitude.
Note
See also
first_derivative_y(),second_derivative_x(),second_derivative_y()andgradient().