powered by
Calculates the x derivative using central differences (for lonlat-grid or cartesian grid)
df_dx(fld, lat = NULL, dx = 0.25, mode = "lonlat")
field containing the partial derivative w.r.t. x
field with dimensions (lon,lat,p)
only for lonlat mode: vector containing latitude
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='lonlat'
mode='cartesian'
the coordinate system, options are lonlat for a longitude-latitude-grid (default), or cartesian for an equidistant cartesian grid
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)
Run the code above in your browser using DataLab