calc¶
This module contains a variety of meteorological calculations.
Functions
add_height_to_pressure(pressure, height) |
Calculate the pressure at a certain height above another pressure level. |
add_pressure_to_height(height, pressure) |
Calculate the height at a certain pressure above another height. |
advection(scalar, wind, deltas) |
Calculate the advection of a scalar field by the wind. |
bulk_shear(pressure, u, v[, heights, …]) |
Calculate bulk shear through a layer. |
bunkers_storm_motion(pressure, u, v, heights) |
Calculate the Bunkers right-mover and left-mover storm motions and sfc-6km mean flow. |
cape_cin(pressure, temperature, dewpt, …) |
Calculate CAPE and CIN. |
convergence_vorticity(u, v, dx, dy) |
Calculate the horizontal convergence and vertical vorticity of the horizontal wind. |
coriolis_parameter(latitude) |
Calculate the coriolis parameter at each point. |
density(pressure, temperature, mixing[, …]) |
Calculate density. |
dewpoint(e) |
Calculate the ambient dewpoint given the vapor pressure. |
dewpoint_rh(temperature, rh) |
Calculate the ambient dewpoint given air temperature and relative humidity. |
dry_lapse(pressure, temperature) |
Calculate the temperature at a level assuming only dry processes. |
el(pressure, temperature, dewpt) |
Calculate the equilibrium level. |
equivalent_potential_temperature(pressure, …) |
Calculate equivalent potential temperature. |
find_intersections(x, a, b[, direction]) |
Calculate the best estimate of intersection. |
friction_velocity(u, w[, v, perturbation, axis]) |
Compute the friction velocity from the time series of velocity components. |
frontogenesis(thta, u, v, dx, dy[, dim_order]) |
Calculate the 2D kinematic frontogenesis of a temperature field. |
geostrophic_wind(heights, f, dx, dy) |
Calculate the geostrophic wind given from the heights or geopotential. |
get_layer(pressure, *args, **kwargs) |
Return an atmospheric layer from upper air data with the requested bottom and depth. |
get_layer_heights(heights, depth, *args, …) |
Return an atmospheric layer from upper air data with the requested bottom and depth. |
get_perturbation(ts[, axis]) |
Compute the perturbation from the mean of a time series. |
get_wind_components(speed, wdir) |
Calculate the U, V wind vector components from the speed and direction. |
get_wind_dir(u, v) |
Compute the wind direction from u and v-components. |
get_wind_speed(u, v) |
Compute the wind speed from u and v-components. |
h_convergence(u, v, dx, dy) |
Calculate the horizontal convergence of the horizontal wind. |
heat_index(temperature, rh[, mask_undefined]) |
Calculate the Heat Index from the current temperature and relative humidity. |
height_to_pressure_std(height) |
Convert height data to pressures using the U.S. |
interp(x, xp, *args, **kwargs) |
Interpolates data with any shape over a specified axis. |
interpolate_nans(x, y[, kind]) |
Interpolate NaN values in y. |
isentropic_interpolation(theta_levels, …) |
Interpolate data in isobaric coordinates to isentropic coordinates. |
kinematic_flux(vel, b[, perturbation, axis]) |
Compute the kinematic flux from two time series. |
lcl(pressure, temperature, dewpt[, …]) |
Calculate the lifted condensation level (LCL) using from the starting point. |
lfc(pressure, temperature, dewpt) |
Calculate the level of free convection (LFC). |
log_interp(x, xp, *args, **kwargs) |
Interpolates data with logarithmic x-scale over a specified axis. |
mean_pressure_weighted(pressure, *args, **kwargs) |
Calculate pressure-weighted mean of an arbitrary variable through a layer. |
mixed_layer(p, *args, **kwargs) |
Mix variable(s) over a layer, yielding a mass-weighted average. |
mixed_parcel(p, temperature, dewpt[, …]) |
Calculate the properties of a parcel mixed from a layer. |
mixing_ratio(part_press, tot_press[, …]) |
Calculate the mixing ratio of a gas. |
mixing_ratio_from_specific_humidity(…) |
Calculate the mixing ratio from specific humidity. |
moist_lapse(pressure, temperature) |
Calculate the temperature at a level assuming liquid saturation processes. |
montgomery_streamfunction(height, temperature) |
Compute the Montgomery Streamfunction on isentropic surfaces. |
most_unstable_cape_cin(pressure, …) |
Calculate most unstable CAPE/CIN. |
most_unstable_parcel(pressure, temperature, …) |
Determine the most unstable parcel in a layer. |
nearest_intersection_idx(a, b) |
Determine the index of the point just before two lines with common x values. |
parcel_profile(pressure, temperature, dewpt) |
Calculate the profile a parcel takes through the atmosphere. |
potential_temperature(pressure, temperature) |
Calculate the potential temperature. |
precipitable_water(dewpt, pressure[, …]) |
Calculate precipitable water through the depth of a sounding. |
pressure_to_height_std(pressure) |
Convert pressure data to heights using the U.S. |
psychrometric_vapor_pressure_wet(…[, …]) |
Calculate the vapor pressure with wet bulb and dry bulb temperatures. |
reduce_point_density(points, radius[, priority]) |
Return a mask to reduce the density of points in irregularly-spaced data. |
relative_humidity_from_mixing_ratio(…) |
Calculate the relative humidity from mixing ratio, temperature, and pressure. |
relative_humidity_from_specific_humidity(…) |
Calculate the relative humidity from specific humidity, temperature, and pressure. |
relative_humidity_wet_psychrometric(…) |
Calculate the relative humidity with wet bulb and dry bulb temperatures. |
resample_nn_1d(a, centers) |
Return one-dimensional nearest-neighbor indexes based on user-specified centers. |
saturation_mixing_ratio(tot_press, temperature) |
Calculate the saturation mixing ratio of water vapor. |
saturation_vapor_pressure(temperature) |
Calculate the saturation water vapor (partial) pressure. |
shearing_deformation(u, v, dx, dy) |
Calculate the shearing deformation of the horizontal wind. |
shearing_stretching_deformation(u, v, dx, dy) |
Calculate the horizontal shearing and stretching deformation of the horizontal wind. |
sigma_to_pressure(sigma, psfc, ptop) |
Calculate pressure from sigma values. |
significant_tornado(sbcape, sblcl, …) |
Calculate the significant tornado parameter (fixed layer). |
storm_relative_helicity(u, v, heights, depth) |
Calculate storm relative helicity. |
stretching_deformation(u, v, dx, dy) |
Calculate the stretching deformation of the horizontal wind. |
supercell_composite(mucape, …) |
Calculate the supercell composite parameter. |
surface_based_cape_cin(pressure, …) |
Calculate surface-based CAPE and CIN. |
tke(u, v, w[, perturbation, axis]) |
Compute turbulence kinetic energy. |
total_deformation(u, v, dx, dy) |
Calculate the horizontal total deformation of the horizontal wind. |
v_vorticity(u, v, dx, dy) |
Calculate the vertical vorticity of the horizontal wind. |
vapor_pressure(pressure, mixing) |
Calculate water vapor (partial) pressure. |
virtual_potential_temperature(pressure, …) |
Calculate virtual potential temperature. |
virtual_temperature(temperature, mixing[, …]) |
Calculate virtual temperature. |
windchill(temperature, speed[, …]) |
Calculate the Wind Chill Temperature Index (WCTI). |