windkit.Workspace.get_mesoclimate#

Workspace.get_mesoclimate(ID=None, crs=None)[source]#

Mesoscale climate WAsP generalised with, at a generalised wind climate.

These are the sector-wise stability and baroclinicity parameters WAsP stored with the generalised wind climate, under the names PyWAsP uses for them, so the result can be passed as the mesoclimate argument of PyWAsP’s generalization and downscaling. WAsP writes them since 12.8; older workspaces hold none. The reference values behind the air density are read with get_air_density_reference().

Parameters:
  • ID (int, optional) – ID of a generalised wind climate. Defaults to None, which reads the only generalised wind climate in the workspace.

  • crs (int, dict, str or pyproj.crs.CRS, optional) – CRS of the position, as in get_gwc(). Defaults to None.

Returns:

mean_temp_scale_land, rms_temp_scale_land, mean_temp_scale_sea, rms_temp_scale_sea, mean_pblh_scale_land and mean_pblh_scale_sea (stability), and mean_dgdz and mean_dgdz_dir (baroclinicity), on (sector, point), at the position of the generalised wind climate.

Return type:

xarray.Dataset

Raises:

ValueError – If the ID does not exist or is not linked to a generalised wind climate, ID is None and the workspace holds no or several of them, the generalised wind climate stores no mesoscale climate, its sectors are not windkit’s, or its position has no CRS, as in get_gwc().

Warns:

UserWarning – If WAsP marked the generalised wind climate as not up to date, or as in get_gwc().