.. _wind_climates: Wind Climates ============= Wind climates are central to resource assessment in PyWAsP. They represent wind speed and direction distributions at locations of interest. .. seealso:: :doc:`windkit:user_guide/wind_climates/index` Overview, statistics, and Weibull fitting. :doc:`windkit:user_guide/wind_climates/tswc` Time Series Wind Climate - schema, I/O, creation. :doc:`windkit:user_guide/wind_climates/bwc` Binned Wind Climate - schema, I/O, creation. :doc:`windkit:user_guide/wind_climates/wwc` Weibull Wind Climate - schema, I/O, creation. :doc:`windkit:user_guide/wind_climates/gwc` Generalized Wind Climate - schema, I/O, creation. PyWAsP builds on WindKit's wind climate support, adding terrain-aware processing through the WAsP flow model. This page covers PyWAsP-specific workflows. .. ipython:: python import pywasp as pw import windkit as wk import xarray as xr Geospatial transforms for wind climates --------------------------------------- :py:mod:`WindKit's spatial module ` makes it easy to work with geospatial data and to perform typical transforms, such as reprojection, spatial clipping, and spatial masking. To illustrate this, let's read a binned wind climate and transform it from lat-long coordinates to UTM 29N coordinates: .. ipython:: python :okwarning: bwc = wk.read_bwc("source/tutorials/data/SerraSantaLuzia.omwc", crs="EPSG:4326") bwc = wk.spatial.reproject(bwc, to_crs="EPSG:32629") print(bwc) .. note:: Note that the ``west_east`` and ``south_north`` coordinate values change after reprojection. To set and get the ``crs`` of an object, use :py:func:`windkit.spatial.set_crs` and :py:func:`windkit.spatial.get_crs`. Using wind climates as site objects in PyWake --------------------------------------------- PyWAsP wind climate objects can be used as site objects for wind farm flow modeling in :doc:`PyWake `. This is done by instantiating an ``XRSite`` using the :py:meth:`py_wake.Site.XRSite.from_pwc` method. .. ipython:: python :okwarning: # First get a Weibull wind climate wwc = wk.weibull_fit(bwc) import py_wake site = py_wake.site.XRSite.from_pwc(wwc) print(site.ds) Spatial inhomogeneity can be taken into account in PyWake by ``speedup`` and ``turning`` variables in the site object. These variables track the relative speed-up and turning of the wind in the spatial domain during the wind farm flow modeling. The :py:meth:`py_wake.Site.XRSite.from_pwc` method can take different ``speedup`` arguments for specifying the way to calculate speed-ups between spatial points. By default, the "park" method is used, which calculates the sector-wise speed-ups relative to the maximum mean wind speed in that sector. Depending on how the speed-up is defined/calculated in the PyWake site object, the post-processing, or aggregation, of wind farm flow results should take this into account.