df_dx {meteoEVT}R Documentation

df_dx

Description

Calculates the x derivative using central differences (for lonlat-grid or cartesian grid)

Usage

df_dx(fld, lat = NULL, dx = 0.25, mode = "lonlat")

Arguments

fld

field with dimensions (lon,lat,p)

lat

only for lonlat mode: vector containing latitude

dx

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')

mode

the coordinate system, options are lonlat for a longitude-latitude-grid (default), or cartesian for an equidistant cartesian grid

Value

field containing the partial derivative w.r.t. x

Examples

myfile=system.file("extdata", "era5_storm-zeynep.nc", package = "meteoEVT")
data = readin_era5(myfile)
theta=calc_theta(data$temp,data$lev)
dtheta_dx=df_dx(theta,data$lat)

[Package meteoEVT version 0.1.0 Index]