Calculates the Jacobian matrix and Jacobian determinant for 2 or 3 given scalar fields
jacobian(
fld1,
fld2,
fld3 = NULL,
lat = NULL,
d = 3,
system = "p",
rho = NULL,
dx = 0.25,
dy = 0.25,
plev = 5000,
mode = "lonlat"
)
list containing Jacobian matrix and determinant
field 1 with dimensions (lon,lat,p)
field 2 with dimensions (lon,lat,p)
field 3 with dimensions (lon,lat,p)
vector containing latitude
scalar for dimension (use d=2 for 2 input fields and d=3 for 3 inpt fields)
for type of coordinate system (use 'p' for pressure system and 'z' for height system)
field with dimensions (lon,lat,p) for density or a scalar rho (for constant density)
x resolution in the corresponding unit (e.g. 0.25 degree for ERA5 with mode='lonlat'
or e.g. 1000 m in cartesian coordinates with mode='cartesian'
)
y resolution in the corresponding unit (e.g. 0.25 degree for ERA5 with mode='lonlat'
or e.g. 1000 m in cartesian coordinates with mode='cartesian'
)
a scalar containing the p resolution (if equidistant) or a vector containing pressure levels in Pa (for non-equidistant)
the coordinate system, options are lonlat for a longitude-latitude-grid (default), or cartesian for an equidistant cartesian grid