pywasp.wasp.get_air_density

pywasp.wasp.get_air_density(elev, source='ERA5')[source]

Calculate the air density at a given location from reanalysis data

Parameters:
  • elev (Dataset) – xArray dataset with one of the PyWAsP data structures. Must have elevation in a variable called elev or site_elev.

  • source ({'CFSR', 'ERA5'} or Dataset) – Reanalysis dataset from which the required climatological parameters are taken (default: CFSR). Optionally you can add the xr.Dataset that contains the climatological data from another source.

Returns:

output_locs (DataArray) – Air density at all locations of elev

Notes

This routine implements the air density interpolation method introduced in WAsP 12.0 when using the source ‘ERA5’. ERA5 data including information about the temperature lapse rate is included in WAsP GUI since version 12.6. The air density is calculated for each point at the given elevation + height. The ERA5 data with lapse rate had the best performance for predicting air density in [1]

The dataset in source should have the cuboid structure (dim=x,y,z) and have following variables: * temperature at 2 m (t2 in Kelvin) * elevation (ground elevation in meter above mean sea level) * pressure (pressure at the surface in Pascal) * specific humidity (kg / kg moisture per air) * lapse rate (K / m)