calc_enstrophy | R Documentation |
Calculates the enstrophy density (vorticity squared) either in 2d or 3d
calc_enstrophy( u_fld, v_fld, w_fld = NULL, lev_p, lat = NULL, dx = 0.25, dy = 0.25, zvort_only = TRUE, relative = TRUE, zvort_fld = NULL, mode = "lonlat" )
u_fld |
zonal velocity field [m/s] |
v_fld |
meridional velocity field [m/s] |
w_fld |
vertical velocity field [m/s] |
lev_p |
vector containing pressure levels [Pa] |
lat |
vector containing latitude |
dx |
x resolution in the corresponding unit (e.g. 0.25 degree for ERA5 with |
dy |
y resolution in the corresponding unit (e.g. 0.25 degree for ERA5 with |
zvort_only |
logical, TRUE: if only 2d enstrophy (based on z-vorticity) should be calculated, FALSE: for 3d enstrophy (based on 3d vorticity), default: TRUE |
relative |
logical, TRUE: only relative vorticity, FALSE: whole (absolute) vorticity should be used for calculation of enstrophy, default: TRUE |
zvort_fld |
optional zvort field (if e.g., zvort is directly taken from ERA5 and not calculated separately) |
mode |
use 'lonlat' if the data is given on a lon-lat-grid or 'cartesian' if the data is given on an equidistant cartesian grid |
enstrophy density field [1/s^2]
myfile=system.file("extdata", "era5_storm-zeynep.nc", package = "meteoEVT") data = readin_era5(myfile) #3d enstropy ens3d=calc_enstrophy(data$u,data$v,data$w,data$lev,lat=data$lat) #2d enstropy as scalar ens2d=calc_enstrophy(data$u,data$v,lev_p=data$lev,lat=data$lat,zvort_only=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.