windkit.io.wasp.read_gwc#
- windkit.io.wasp.read_gwc(filepath)[source]#
Read a WAsP .gwc file and return parsed data.
The
RveaGeneralisedMeanWindClimateelement may be the document root or nested anywhere below it. The horizontal position, the height and the description come from the element itself when it carries them, and otherwise from aRveaAnemometerSiteDetailselement anywhere in the file. The position is taken from one source as a pair; an element that gives only a latitude is not completed with the site’s longitude. An empty elementDescriptiondefers to a non-empty site one.- Parameters:
filepath (str or Path) – Path to the
.gwcfile.- Returns:
See
parse_gwc_element().- Return type:
- Raises:
lxml.etree.XMLSyntaxError – If the file is not well-formed XML. Subclasses
SyntaxError.ValueError – If the file holds no
RveaGeneralisedMeanWindClimateelement, or a required element or attribute is missing, as described inparse_gwc_element().