windkit 0.6.3__tar.gz → 1.0.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- windkit-1.0.2/CHANGELOG.md +700 -0
- windkit-0.6.3/README.md → windkit-1.0.2/PKG-INFO +57 -1
- windkit-0.6.3/PKG-INFO → windkit-1.0.2/README.md +9 -17
- {windkit-0.6.3 → windkit-1.0.2}/pyproject.toml +3 -9
- windkit-1.0.2/setup.cfg +65 -0
- windkit-1.0.2/windkit/__init__.py +294 -0
- {windkit-0.6.3 → windkit-1.0.2}/windkit/_errors.py +7 -1
- {windkit-0.6.3 → windkit-1.0.2}/windkit/_rvea_xml.py +0 -1
- windkit-1.0.2/windkit/_version.py +21 -0
- windkit-1.0.2/windkit/_weibull_nb.py +484 -0
- {windkit-0.6.3 → windkit-1.0.2}/windkit/cfd.py +22 -7
- windkit-1.0.2/windkit/config.py +215 -0
- {windkit-0.6.3/windkit → windkit-1.0.2/windkit/data}/all_vars.json +75 -28
- windkit-1.0.2/windkit/data/color_table_roughness.json +92 -0
- windkit-1.0.2/windkit/data/landcover_tables/ESA_CCI.json +192 -0
- windkit-1.0.2/windkit/data/landcover_tables/GWA4_micro.json +156 -0
- windkit-1.0.2/windkit/data/landcover_tables/NEWA_micro_v2.json +1 -0
- windkit-1.0.2/windkit/data/loss_tables/dtu_loss_table.csv +16 -0
- windkit-1.0.2/windkit/data/map_file_header_to_epsg_read.json +937 -0
- windkit-1.0.2/windkit/data/uncertainty_tables/dtu_uncertainty_table.csv +35 -0
- windkit-1.0.2/windkit/import_manager.py +44 -0
- windkit-0.6.3/windkit/get_map.py → windkit-1.0.2/windkit/integrations/_earth_engine.py +78 -121
- windkit-1.0.2/windkit/integrations/_gwa_map_api.py +205 -0
- windkit-1.0.2/windkit/integrations/_planetary_computer.py +458 -0
- windkit-1.0.2/windkit/ltc/__init__.py +13 -0
- windkit-1.0.2/windkit/ltc/_validation.py +118 -0
- windkit-1.0.2/windkit/ltc/mcp.py +274 -0
- windkit-1.0.2/windkit/ltc/regression.py +143 -0
- windkit-1.0.2/windkit/ltc/scores.py +163 -0
- {windkit-0.6.3 → windkit-1.0.2}/windkit/plot/__init__.py +2 -0
- {windkit-0.6.3 → windkit-1.0.2}/windkit/plot/_colormaps.py +20 -2
- {windkit-0.6.3 → windkit-1.0.2}/windkit/plot/_helpers.py +32 -54
- {windkit-0.6.3 → windkit-1.0.2}/windkit/plot/color.py +9 -12
- windkit-1.0.2/windkit/plot/elevation_map.py +55 -0
- {windkit-0.6.3 → windkit-1.0.2}/windkit/plot/histogram.py +48 -46
- windkit-1.0.2/windkit/plot/landcover_map.py +70 -0
- {windkit-0.6.3 → windkit-1.0.2}/windkit/plot/operational_curves.py +13 -22
- {windkit-0.6.3 → windkit-1.0.2}/windkit/plot/raster_plot.py +6 -10
- {windkit-0.6.3 → windkit-1.0.2}/windkit/plot/roughness_rose.py +21 -27
- {windkit-0.6.3 → windkit-1.0.2}/windkit/plot/vertical_profile.py +3 -10
- {windkit-0.6.3 → windkit-1.0.2}/windkit/plot/wind_rose.py +17 -40
- {windkit-0.6.3 → windkit-1.0.2}/windkit/plot/wind_turbine.py +2 -1
- windkit-1.0.2/windkit/spatial/__init__.py +121 -0
- {windkit-0.6.3 → windkit-1.0.2}/windkit/spatial/_bbox.py +46 -19
- {windkit-0.6.3 → windkit-1.0.2}/windkit/spatial/_crs.py +41 -22
- windkit-1.0.2/windkit/spatial/_cuboid.py +182 -0
- windkit-1.0.2/windkit/spatial/_interpolation.py +582 -0
- {windkit-0.6.3 → windkit-1.0.2}/windkit/spatial/_latitude.py +6 -3
- windkit-1.0.2/windkit/spatial/_metpy_natural_neighbors.py +637 -0
- {windkit-0.6.3 → windkit-1.0.2}/windkit/spatial/_point.py +26 -17
- {windkit-0.6.3 → windkit-1.0.2}/windkit/spatial/_raster.py +247 -42
- {windkit-0.6.3 → windkit-1.0.2}/windkit/spatial/_struct.py +15 -7
- {windkit-0.6.3 → windkit-1.0.2}/windkit/spatial/_utm.py +3 -0
- {windkit-0.6.3 → windkit-1.0.2}/windkit/spatial/_vector.py +2 -3
- {windkit-0.6.3 → windkit-1.0.2}/windkit/spatial/_vertical.py +1 -0
- {windkit-0.6.3 → windkit-1.0.2}/windkit/spatial/decorators.py +8 -5
- {windkit-0.6.3 → windkit-1.0.2}/windkit/spatial/spatial.py +665 -97
- windkit-1.0.2/windkit/topography/__init__.py +0 -0
- {windkit-0.6.3/windkit → windkit-1.0.2/windkit/topography}/_vectormap_gml.py +24 -18
- windkit-1.0.2/windkit/topography/_vectormap_helpers.py +554 -0
- windkit-1.0.2/windkit/topography/get_map.py +282 -0
- {windkit-0.6.3/windkit → windkit-1.0.2/windkit/topography}/landcover.py +195 -8
- windkit-1.0.2/windkit/topography/map_conversion/__init__.py +3 -0
- windkit-1.0.2/windkit/topography/map_conversion/_polygons_constraints.py +106 -0
- {windkit-0.6.3/windkit → windkit-1.0.2/windkit/topography}/map_conversion/helper_functions.py +43 -10
- windkit-0.6.3/windkit/map_conversion/lines2poly.py → windkit-1.0.2/windkit/topography/map_conversion/lines_to_poly.py +64 -50
- windkit-0.6.3/windkit/map_conversion/poly2lines.py → windkit-1.0.2/windkit/topography/map_conversion/poly_to_lines.py +193 -176
- windkit-1.0.2/windkit/topography/map_conversions.py +899 -0
- {windkit-0.6.3/windkit → windkit-1.0.2/windkit/topography}/raster_map.py +266 -82
- windkit-1.0.2/windkit/topography/topography.py +481 -0
- windkit-1.0.2/windkit/topography/vector_map.py +848 -0
- windkit-1.0.2/windkit/tutorial_data.py +185 -0
- windkit-1.0.2/windkit/utils.py +34 -0
- windkit-1.0.2/windkit/weibull.py +508 -0
- windkit-1.0.2/windkit/weng_workspace.py +256 -0
- windkit-1.0.2/windkit/wind.py +469 -0
- windkit-1.0.2/windkit/wind_climate/__init__.py +0 -0
- {windkit-0.6.3/windkit → windkit-1.0.2/windkit/wind_climate}/binned_wind_climate.py +497 -387
- {windkit-0.6.3/windkit → windkit-1.0.2/windkit/wind_climate}/generalized_wind_climate.py +467 -85
- windkit-1.0.2/windkit/wind_climate/geostrophic_wind_climate.py +75 -0
- windkit-1.0.2/windkit/wind_climate/predicted_wind_climate.py +97 -0
- {windkit-0.6.3/windkit → windkit-1.0.2/windkit/wind_climate}/time_series_wind_climate.py +203 -42
- {windkit-0.6.3/windkit → windkit-1.0.2/windkit/wind_climate}/weibull_wind_climate.py +534 -156
- windkit-1.0.2/windkit/wind_climate/wind_climate.py +619 -0
- windkit-1.0.2/windkit/wind_data.py +84 -0
- windkit-1.0.2/windkit/wind_farm/__init__.py +0 -0
- windkit-1.0.2/windkit/wind_farm/loss.py +185 -0
- windkit-1.0.2/windkit/wind_farm/uncertainty.py +333 -0
- windkit-0.6.3/windkit/wind_turbine.py → windkit-1.0.2/windkit/wind_farm/wind_turbine_generator.py +46 -185
- windkit-1.0.2/windkit/wind_farm/wind_turbines.py +248 -0
- {windkit-0.6.3 → windkit-1.0.2}/windkit/workspace.py +121 -41
- windkit-1.0.2/windkit/xarray_structures/_validate.py +225 -0
- {windkit-0.6.3/windkit → windkit-1.0.2/windkit/xarray_structures}/data_structures.py +10 -6
- windkit-1.0.2/windkit/xarray_structures/direction.py +52 -0
- windkit-1.0.2/windkit/xarray_structures/empty.py +79 -0
- windkit-1.0.2/windkit/xarray_structures/metadata.py +519 -0
- windkit-1.0.2/windkit/xarray_structures/sector.py +93 -0
- windkit-1.0.2/windkit/xarray_structures/wsbin.py +95 -0
- windkit-1.0.2/windkit.egg-info/SOURCES.txt +107 -0
- windkit-0.6.3/.conda_env/dev_unix.yml +0 -44
- windkit-0.6.3/.conda_env/dev_win.yml +0 -42
- windkit-0.6.3/.conda_env/prod_unix.yml +0 -14
- windkit-0.6.3/.gitignore +0 -40
- windkit-0.6.3/.gitlab/issue_templates/release.md +0 -6
- windkit-0.6.3/.gitlab/merge_request_templates/default.md +0 -26
- windkit-0.6.3/.gitlab-ci.yml +0 -124
- windkit-0.6.3/.pre-commit-config.yaml +0 -34
- windkit-0.6.3/.pylintrc +0 -34
- windkit-0.6.3/CHANGELOG.md +0 -257
- windkit-0.6.3/MANIFEST.in +0 -8
- windkit-0.6.3/README-Internal.md +0 -66
- windkit-0.6.3/docs/.dockerignore +0 -6
- windkit-0.6.3/docs/.gitignore +0 -1
- windkit-0.6.3/docs/Dockerfile +0 -4
- windkit-0.6.3/docs/Makefile +0 -184
- windkit-0.6.3/docs/docker-compose.yml +0 -19
- windkit-0.6.3/docs/legacy/dev/dev-git.rst +0 -35
- windkit-0.6.3/docs/legacy/dev/dev-intro.rst +0 -45
- windkit-0.6.3/docs/legacy/dev/dev-pytest.rst +0 -40
- windkit-0.6.3/docs/legacy/dev/dev-sphinx.rst +0 -28
- windkit-0.6.3/docs/nginx.conf +0 -17
- windkit-0.6.3/docs/source/WAsP.bib +0 -187
- windkit-0.6.3/docs/source/_templates/autosummary/class.rst +0 -33
- windkit-0.6.3/docs/source/_templates/autosummary/module.rst +0 -39
- windkit-0.6.3/docs/source/conf.py +0 -313
- windkit-0.6.3/docs/source/development_roadmap.rst +0 -7
- windkit-0.6.3/docs/source/getting_started.rst +0 -13
- windkit-0.6.3/docs/source/index.rst +0 -58
- windkit-0.6.3/docs/source/installation.rst +0 -84
- windkit-0.6.3/docs/source/io/io.rst +0 -140
- windkit-0.6.3/docs/source/map_conversion.rst +0 -10
- windkit-0.6.3/docs/source/map_conversion_examples_nb.nblink +0 -3
- windkit-0.6.3/docs/source/plotting.rst +0 -14
- windkit-0.6.3/docs/source/plotting_examples.rst +0 -10
- windkit-0.6.3/docs/source/plotting_examples_nb.nblink +0 -3
- windkit-0.6.3/docs/source/plotting_user_guide.rst +0 -129
- windkit-0.6.3/docs/source/release_notes.rst +0 -8
- windkit-0.6.3/docs/source/topographic_data.rst +0 -66
- windkit-0.6.3/docs/source/wind_climate_objects.rst +0 -40
- windkit-0.6.3/docs/source/windkit.rst +0 -57
- windkit-0.6.3/env/Dockerfile.api +0 -16
- windkit-0.6.3/env/Dockerfile.ci +0 -25
- windkit-0.6.3/env/Dockerfile.miniconda +0 -20
- windkit-0.6.3/env/Makefile +0 -6
- windkit-0.6.3/env/conda-linux-64.lock +0 -51
- windkit-0.6.3/env/conda-osx-64.lock +0 -307
- windkit-0.6.3/env/conda-win-64.lock +0 -367
- windkit-0.6.3/env/create_locks.py +0 -64
- windkit-0.6.3/env/dev_env.yaml +0 -57
- windkit-0.6.3/env/pywasp.cfg +0 -11
- windkit-0.6.3/env/pywasp_env.yml +0 -38
- windkit-0.6.3/env/pywaspio_env.yml +0 -31
- windkit-0.6.3/env/windkit.ini +0 -4
- windkit-0.6.3/recipe/meta.yaml +0 -43
- windkit-0.6.3/setup.cfg +0 -49
- windkit-0.6.3/windkit/__init__.py +0 -41
- windkit-0.6.3/windkit/_validate.py +0 -76
- windkit-0.6.3/windkit/_vectormap_helpers.py +0 -184
- windkit-0.6.3/windkit/_version.py +0 -4
- windkit-0.6.3/windkit/config.py +0 -5
- windkit-0.6.3/windkit/elevation_map.py +0 -39
- windkit-0.6.3/windkit/empty.py +0 -525
- windkit-0.6.3/windkit/geospatial_imports.py +0 -52
- windkit-0.6.3/windkit/metadata.py +0 -490
- windkit-0.6.3/windkit/plot/landcover_map.py +0 -74
- windkit-0.6.3/windkit/roughness_map.py +0 -41
- windkit-0.6.3/windkit/sector.py +0 -183
- windkit-0.6.3/windkit/spatial/__init__.py +0 -47
- windkit-0.6.3/windkit/spatial/_cuboid.py +0 -26
- windkit-0.6.3/windkit/spatial/_interpolation.py +0 -158
- windkit-0.6.3/windkit/vector_map.py +0 -611
- windkit-0.6.3/windkit/weibull.py +0 -468
- windkit-0.6.3/windkit/wind.py +0 -166
- windkit-0.6.3/windkit/wind_climate.py +0 -119
- windkit-0.6.3/windkit.egg-info/SOURCES.txt +0 -127
- {windkit-0.6.3 → windkit-1.0.2}/LICENSE +0 -0
- {windkit-0.6.3/windkit/landcovertables → windkit-1.0.2/windkit/data/landcover_tables}/CGLS-LC100.json +0 -0
- {windkit-0.6.3/windkit/landcovertables → windkit-1.0.2/windkit/data/landcover_tables}/CORINE.json +0 -0
- {windkit-0.6.3/windkit/landcovertables → windkit-1.0.2/windkit/data/landcover_tables}/Globcover.json +0 -0
- {windkit-0.6.3/windkit/landcovertables → windkit-1.0.2/windkit/data/landcover_tables}/MODIS.json +0 -0
- {windkit-0.6.3/windkit/landcovertables → windkit-1.0.2/windkit/data/landcover_tables}/WorldCover.json +0 -0
- {windkit-0.6.3/windkit → windkit-1.0.2/windkit/data}/map_file_header_to_epsg.json +0 -0
- {windkit-0.6.3/windkit/map_conversion → windkit-1.0.2/windkit/integrations}/__init__.py +0 -0
- {windkit-0.6.3 → windkit-1.0.2}/windkit/spatial/README.md +0 -0
- {windkit-0.6.3 → windkit-1.0.2}/windkit/spatial/_dimensions.py +0 -0
|
@@ -0,0 +1,700 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All major changes are listed here.
|
|
4
|
+
|
|
5
|
+
## 1.0.2 (2025-07-21)
|
|
6
|
+
|
|
7
|
+
WindKit 1.0.2 is a patch release to ensure consistent config and app data paths on windows. Both the config and app data paths are now set by default to ``C:\\Users\\<user>\\AppData\\Roaming\\DTU Wind Energy\\windkit``.
|
|
8
|
+
|
|
9
|
+
## 1.0.1 (2025-07-15)
|
|
10
|
+
|
|
11
|
+
WindKit 1.0.1 is a patch release that changes the config migration that shipped with 1.0.0. The changed ensures that the legacy `.ini` configuration files are migrated to the new `.toml` format without automatically removing the old file. This ensures that users are not constantly prompted to update their configuration file if they use different versions of WindKit in different environments.
|
|
12
|
+
|
|
13
|
+
## 1.0.0 (2025-06-26)
|
|
14
|
+
|
|
15
|
+
This is a major release that introduces a significantly cleaner and more intuitive API. We have removed many functions from the public namespace, renamed others for consistency, and introduced powerful new features. While this version includes many breaking changes, the result is a more streamlined and user-friendly library. We strongly recommend all users to carefully read these release notes and update their code.
|
|
16
|
+
|
|
17
|
+
### Highlights
|
|
18
|
+
|
|
19
|
+
#### Simplified and Consistent API
|
|
20
|
+
The `windkit` namespace has been significantly cleaned up to make the API more predictable and easier to learn. Many internal or redundant functions have been removed from the public API, and others have been renamed for better clarity and consistency.
|
|
21
|
+
* Functions for reading and writing different objects in windkit are now grouped by type, such as `read_tswc`, `read_bwc`, `read_wwc`, and `read_gwc` for reading wind climate datasets, and `bwc_to_file`, `wwc_to_file`, and `gwc_to_file` for writing them.
|
|
22
|
+
* Functions for creating empty datasets are now prefixed with `create_*` (e.g., `create_bwc` instead of `empty_bwc`).
|
|
23
|
+
* Functions for creating wind climate objects from other data types now follow a `[climate]_from_[source]` pattern (e.g., `bwc_from_tswc` instead of `bwc_from_timeseries`).
|
|
24
|
+
* Validation functions are now consistently named `validate_*` (e.g., `validate_bwc` instead of `bwc_validate`).
|
|
25
|
+
|
|
26
|
+
#### Revamped Map Reading and Writing
|
|
27
|
+
The API for handling spatial maps has been completely overhauled. The generic `read_raster_map`, `read_vector_map`, `raster_map_to_file`, and `vector_map_to_file` functions have been replaced by specific, format-aware functions for each map type:
|
|
28
|
+
* `read_elevation_map` and `elevation_map_to_file`
|
|
29
|
+
* `read_roughness_map` and `roughness_map_to_file`
|
|
30
|
+
* `read_landcover_map` and `landcover_map_to_file`
|
|
31
|
+
|
|
32
|
+
These new functions automatically infer the file format from the suffix (e.g., `.map`, `.tif`, `.gpkg`) and provide a more robust and intuitive interface for working with elevation, roughness, and landcover data.
|
|
33
|
+
|
|
34
|
+
#### Polygon Representation for Landcover and Roughness Maps
|
|
35
|
+
A major improvement is the new default support for polygon-based landcover and roughness maps. The functions `read_landcover_map` and `read_roughness_map` now return `geopandas.GeoDataFrame` objects with polygons when reading vector data, which is a more standard and powerful representation for GIS data. This enables more robust handling and validation of maps. For backward compatibility, you can still work with the legacy line-based format by setting `polygons=False`.
|
|
36
|
+
|
|
37
|
+
#### Unified API for Wind Climate Statistics
|
|
38
|
+
Calculating statistics from wind climate objects is now much simpler. A new set of generic functions can operate on any wind climate type (BWC, WWC, etc.):
|
|
39
|
+
* `wk.mean_wind_speed`
|
|
40
|
+
* `wk.mean_power_density`
|
|
41
|
+
* `wk.ws_cdf` (Cumulative Distribution Function)
|
|
42
|
+
* `wk.ws_freq_gt_mean`
|
|
43
|
+
* `wk.mean_ws_moment`
|
|
44
|
+
|
|
45
|
+
This unified API replaces the climate-specific functions (e.g., `bwc_mean_windspeed`), simplifying your code and making it more versatile.
|
|
46
|
+
|
|
47
|
+
#### New Loss and Uncertainty Modeling
|
|
48
|
+
WindKit now includes tools to support loss and uncertainty analysis, designed to integrate seamlessly with PyWAsP. You can now create, validate, and summarize standardized loss and uncertainty tables using:
|
|
49
|
+
* `get_loss_table`, `total_loss`, `loss_summary`
|
|
50
|
+
* `get_uncertainty_table`, `total_uncertainty`, `uncertainty_summary`
|
|
51
|
+
|
|
52
|
+
This provides a structured framework for AEP calculations.
|
|
53
|
+
|
|
54
|
+
### Breaking Changes and Migration Guide
|
|
55
|
+
Due to the extensive API changes, you will need to update your existing code. Here is a guide to the most common changes:
|
|
56
|
+
|
|
57
|
+
#### General Renaming and Removals
|
|
58
|
+
* **Namespace Cleanup**: Many functions like `bwc_validate_wrapper`, `update_history`, and various `spatial` utilities have been removed from the public `windkit` namespace.
|
|
59
|
+
* **Function Renaming**:
|
|
60
|
+
* `windkit.read_timeseries_from_pandas` is now `windkit.tswc_from_dataframe`.
|
|
61
|
+
* `windkit.bwc_from_timeseries` is now `windkit.bwc_from_tswc`.
|
|
62
|
+
* `windkit.read_timeseries_from_csv` is now `windkit.read_tswc`.
|
|
63
|
+
* All `windkit.empty_*` functions are now `windkit.create_*` (e.g., `empty_bwc` -> `create_bwc`).
|
|
64
|
+
* `lines2poly` is now `lines_to_poly`, and `poly2lines` is now `poly_to_lines`.
|
|
65
|
+
* `add_crs` is now `set_crs`.
|
|
66
|
+
* **Argument Renaming**: Several function arguments have been renamed for consistency. For example, `nsec` is now `n_sectors` and `nwsbins` is now `n_wsbins`. Check the function signatures if you encounter errors.
|
|
67
|
+
* **Removed Classes**: The `windkit.WindTurbines` class has been removed. Use the functions in the `windkit.wind_turbines` module to work with `xarray.Dataset` representations of turbines.
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
#### Wind Climate I/O
|
|
71
|
+
Wind climate reading and writing has been standardized to one reader and one writer for each type:
|
|
72
|
+
* Use `read_tswc` to read time series wind climate datasets.
|
|
73
|
+
* Use `read_bwc` and `bwc_to_file` for Binned Wind Climate datasets.
|
|
74
|
+
* Use `read_wwc` and `wwc_to_file` for Weibull Wind Climate datasets.
|
|
75
|
+
* Use `read_gwc` and `gwc_to_file` for Generalized Wind Climate datasets.
|
|
76
|
+
|
|
77
|
+
#### Configuration File and Environment Variables
|
|
78
|
+
The configuration file format has been switched from INI to TOML. Existing `.ini` configuration files will be migrated automatically.
|
|
79
|
+
|
|
80
|
+
Additionally, user details can now be configured using case-insensitive environment variables, which is ideal for containerized or CI/CD environments:
|
|
81
|
+
* `WINDKIT_NAME`
|
|
82
|
+
* `WINDKIT_EMAIL`
|
|
83
|
+
* `WINDKIT_INSTITUTION`
|
|
84
|
+
|
|
85
|
+
If no configuration is found (either via file or environment variables), you will be prompted for the information upon initialization.
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
### Full list of changes
|
|
90
|
+
|
|
91
|
+
#### Bug Fixes
|
|
92
|
+
* `clip_with_margin` now returns a `ValueError` when the bbox crosses the dateline.
|
|
93
|
+
* Fixed an issue where `read_raster_map` was checking for too high roughness values twice.
|
|
94
|
+
* Duplicate heights passed to `create_dataset` with `struct=stacked_point` are now correctly removed.
|
|
95
|
+
* `gdf_to_ds` now correctly handles unique points to ensure round-tripping with `ds_to_gdf` works as expected.
|
|
96
|
+
* Fixed a bug where `get_vector_map` for CORINE data could fail with a missing column error.
|
|
97
|
+
* `to_stacked_point` now correctly retains the input order of coordinates.
|
|
98
|
+
* `nearest_points` now raises an error on duplicate points to be compatible with newer xarray versions.
|
|
99
|
+
* Fixed a bug in `wk.spatial.add_crs` where custom projection information could be overwritten by a detected EPSG code.
|
|
100
|
+
* Fixed `wk.spatial.interp_unstructured_like` to correctly broadcast single-point sources.
|
|
101
|
+
* Fixed a bug in `nearest_points` when `keep_duplicates=False` and `return_distance=True`.
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
#### API Breaks
|
|
105
|
+
* `windkit.read_timeseries_from_pandas` renamed as `windkit.tswc_from_dataframe`
|
|
106
|
+
* `windkit.bwc_from_timeseries` renamed as `windkit.bwc_from_tswc`
|
|
107
|
+
* `windkit.read_timeseries_from_csv` renamed as `windkit.read_tswc`
|
|
108
|
+
* all `windkit.empty_*` functions renamed to `windkit.create_*`
|
|
109
|
+
* renamed `lines2poly` to `lines_to_poly` and `poly2lines` to `poly_to_lines`
|
|
110
|
+
* removed `wk.lib_string` from public namespace
|
|
111
|
+
* `windkit.spatial.interp_unstructured_like` and `windkit.spatial.interp_structured_like` will not interpolate over 1D variables by default
|
|
112
|
+
* Removed `read_raster_map`,`raster_map_to_file`, and `read_vector_map` and `vector_map_to_file` (made private)
|
|
113
|
+
* Added `read_elevation_map` and `elevation_map_to_file` (works for vector and raster)
|
|
114
|
+
* Added `read_roughness_map` and `roughness_map_to_file` (works for vector and raster)
|
|
115
|
+
* Added `read_landcover_map`, and `landcover_map_to_file` (works for vector and raster)
|
|
116
|
+
* Old .gpkg files with change lines in landcover_map_to_file
|
|
117
|
+
and roughness_map_to_file can be written by using polygons=False
|
|
118
|
+
* File formats for the readers and writers described above are now inferred from the filename's suffix, e.g., `.map` for map files.
|
|
119
|
+
* The functions `read_landcover_map` and `read_roughness_map` by default return polygons instead of changes lines. You can set the argument `polygons=False` to open the file as old fashioned change lines. You can try this if your file is not being opened correctly, but you are responsible for checking it's correctness, because there is less error checking for these types of files.
|
|
120
|
+
* Added `roughness_to_landcover` to convert roughness maps to landcover maps (vector or raster)
|
|
121
|
+
* Added `landcover_to_roughness` to convert landcover maps to roughness maps (vector or raster)
|
|
122
|
+
* Renamed `add_crs` to `set_crs` and and deprecated `add_crs` (which calls `set_crs`)
|
|
123
|
+
* `get_vector_map` now returns landcover data as polygons by default.
|
|
124
|
+
* Removed `wk.bwc_ws_moment` from public namespace, use `wk.mean_ws_moment` instead
|
|
125
|
+
* Removed `wk.bwc_mean_windspeed` from public namespace, use `wk.mean_wind_speed` instead
|
|
126
|
+
* Removed `wk.bwc_mean_windspeed3` from public namespace, use `wk.mean_wind_speed3` instead
|
|
127
|
+
* Removed `wk.bwc_power_density` from public namespace, use `wk.mean_power_density` instead
|
|
128
|
+
* Removed `wk.bwc_ws_cdf` from public namespace, use `wk.ws_cdf` instead
|
|
129
|
+
* Removed `wk.bwc_ws_freq_gt_mean` from public namespace, use `wk.ws_freq_gt_mean` instead
|
|
130
|
+
* Removed `wk.bwc_to_tabfile` from public namespace, use `wk.bwc_to_file` instead
|
|
131
|
+
* Removed `wk.bwc_validate_wrapper` from public namespace
|
|
132
|
+
* Removed `wk.create_time_attributes` from public namespace
|
|
133
|
+
* Removed `wk.count_to_ws_freq_by_sector` from public namespace
|
|
134
|
+
* Removed `wk.read_rsffile` from public namespace use `wk.read_wwc` instead
|
|
135
|
+
* Removed `wk.read_wrgfile` from public namespace, use `wk.read_wwc` instead
|
|
136
|
+
* Removed `wk.read_grdfile` from public namespace, use `wk.read_wwc` instead
|
|
137
|
+
* Removed `wk.read_pwcfile` from public namespace, use `wk.read_wwc` instead
|
|
138
|
+
* Removed `wk.to_rsffile` from public namespace, use `wk.wwc_to_file` instead
|
|
139
|
+
* Removed `wk.to_wrgfile` from public namespace, use `wk.wwc_to_file` instead
|
|
140
|
+
* Removed `wk.wwc_validate_wrapper` from public namespace
|
|
141
|
+
* Removed `wk.wwc_validate_structure`
|
|
142
|
+
* Removed `wk.wwc_validate_structure_wrapper`
|
|
143
|
+
* Removed `wk.wwc_mean_windspeed` from public namespace, use `wk.mean_wind_speed` instead
|
|
144
|
+
* Removed `wk.wwc_power_density` from public namespace, use `wk.mean_power_density` instead
|
|
145
|
+
* Removed `wk.to_libfile` from public namespace, use `wk.gwc_to_file` instead
|
|
146
|
+
* Removed `wk.gwc_validate_wrapper` from public namespace
|
|
147
|
+
* Removed `wk.wtg_validate_wrapper` from public namespace
|
|
148
|
+
* Removed `wk.windturbines_validate_wrapper` from public namespace
|
|
149
|
+
* Modified `wk.read_tswc` to be a generic tswc reader (not just for CSV)
|
|
150
|
+
* Renamed `wk.is_windturbines` to `wk.is_wind_turbines`
|
|
151
|
+
* Renamed `wk.windturbines_validate` to `wk.validate_windturbines`
|
|
152
|
+
* Renamed `wk.wtg_validate` to `wk.validate_wtg`
|
|
153
|
+
* Renamed `wk.gwc_validate` to `wk.validate_gwc`
|
|
154
|
+
* Renamed `wk.wwc_validate` to `validate_wwc`
|
|
155
|
+
* Renamed `wk.bwc_validate` to `wk.validate_bwc`
|
|
156
|
+
* Removed `wk.get_map`
|
|
157
|
+
* Removed `wk.spatial.interpolate_to_grid`
|
|
158
|
+
* Removed `wk.WindTurbines`
|
|
159
|
+
* Removed `wk.Workspace.get_vector_map`
|
|
160
|
+
* Added `wk.Workspace.get_elevation_map`
|
|
161
|
+
* Added `wk.Workspace.get_roughness_map`
|
|
162
|
+
* Removed `wk.bwc_from_counts` (from public namespace)
|
|
163
|
+
* Removed `wk.create_wv_count` (from public namespace)
|
|
164
|
+
* Removed `wk.update_history` (from public namespace)
|
|
165
|
+
* Removed `wk.update_coords_attrs` (from public namespace)
|
|
166
|
+
* Removed `wk.update_var_attrs` (from public namespace)
|
|
167
|
+
* Removed `wk.ALL_VARS_META` (from public namespace)
|
|
168
|
+
* Removed `wk.spatial.spatial_stack` (from public namespace)
|
|
169
|
+
* Removed `wk.spatial.spatial_unstack` (from public namespace)
|
|
170
|
+
* Removed `wk.spatial.stack_then_unstack` (from public namespace)
|
|
171
|
+
* Removed `wk.spatial.get_latitude` (from public namespace)
|
|
172
|
+
* Removed `wk.spatial.is_vertical` (from public namespace)
|
|
173
|
+
* Removed `wk.import_optional_dependency` (from public namespace)
|
|
174
|
+
* Removed `wk.reproject_gwc` (from public namespace)
|
|
175
|
+
* Removed `wk.get_ee_map` (from public namespace)
|
|
176
|
+
* Removed `wk.create_coords`
|
|
177
|
+
* Renamed `wk.create_ws_bin_coords` to `wk.create_wsbin_coords` and changed the arguments to `bins`, `width` and `start`. `bins` is an integer number of bins or a list of bin edges. `width` is the width of the bins, and `start` is the starting point of the first bin. `width` and `start` are only used if `bins` is an integer.
|
|
178
|
+
* Removed `wk.create_ws_bin_coords_from_values`
|
|
179
|
+
* Changed `wk.create_sector_coords` arguments to `bins` and `start`. `bins` is an integer number of bins or a list of bin edges. `start` is the starting point of the first bin. By default, `start` is -360/n_bins/2.
|
|
180
|
+
* Removed `wk.create_sector_coords_from_edges`
|
|
181
|
+
* Removed `wk.create_direction_coords` (from public namespace)
|
|
182
|
+
* `wk.create_vector_map` now has bbox as a first positional argument and argument `dist` is removed
|
|
183
|
+
* Renamed `wk.get_land_cover_table` to `wk.get_landcover_table`
|
|
184
|
+
|
|
185
|
+
#### New features
|
|
186
|
+
* `wk.read_wtg` can read wind turbine generators files in netCDF format.
|
|
187
|
+
* `wk.mean_ws_moment` to calculate the mean of a wind speed moment of any wind climate
|
|
188
|
+
* `wk.ws_cdf` to calculate the cumulative distribution function of a wind speed of any wind climate
|
|
189
|
+
* `wk.ws_freq_gt_mean` to calculate the fraction of probability mass above the mean of a wind speed of any wind climate
|
|
190
|
+
* `wk.mean_wind_speed` to calculate the mean wind speed of any wind climate
|
|
191
|
+
* `wk.mean_wind_speed3` to calculate the mean wind speed cubed of any wind climate
|
|
192
|
+
* `wk.mean_power_density` to calculate the mean power density of any wind climate
|
|
193
|
+
* All of the above calculates the the variable of all wind climates (not all functions are supports all climates yet).
|
|
194
|
+
* Added `read_wwc` to read a weibull wind climate dataset from a file
|
|
195
|
+
* Added `read_mfwwc` to read a multi-filey weibull wind climate dataset
|
|
196
|
+
* Added `wwc_to_file` to write a weibull wind climate dataset to a file
|
|
197
|
+
* Added `read_gwc` to read a generalized wind climate dataset from a file
|
|
198
|
+
* Added `gwc_to_file` to write a generalized wind climate dataset to a file
|
|
199
|
+
* Added `bwc_to_file` to write a binned wind climate dataset to a file
|
|
200
|
+
* New function `add_projected_wrf_coordinates` that is useful to process `WRF` output data to be used with `windkit`.
|
|
201
|
+
* Existing function `windkit.read_wtg` can optionally read the wind turbine manufacturer name from a `.wtg` file if exists.
|
|
202
|
+
* New function `windkit.metadata.update_coords_attrs` to update attributes of a dataset coordinates.
|
|
203
|
+
* New function `create_baro` to create a baro file with dummy values
|
|
204
|
+
* New function `create_stab` to create a stab file with dummy values
|
|
205
|
+
* New function `windkit.snap_to_layer` that transform a vector map with polyons with gaps, open areas and inconsistent vertices into a valid vector map to run `pywasp`.
|
|
206
|
+
* New example notebook tutorial for `windkit.get_era5` to get ERA5 data from Microsoft Planetary Computer
|
|
207
|
+
* `windkit.raster_map_to_file` allows extra arguments that are forwarded to `rasterio.open`. Useful to create e.g. compressed geoTIFF files with the "compress" option.
|
|
208
|
+
* New class `windkit.WengWorkspace` to read WAsP Engineering proyect files in XML format and converting its content to `xarray.Dataset` and `xarray.DataArray` instances such as extreme wind climate datasets, location datasets and raster map data arrays.
|
|
209
|
+
* Enable roughness maps to be written to `.map` files
|
|
210
|
+
* Added kw-argument `return_lctable` to functions reading landcover maps, set to false by default, which means only the landcover map is returned
|
|
211
|
+
* Added kw-argument `convert_to_landcover` to functions reading roughness maps to optionally convert the map to landcover, returning both the map and the table (two outputs)
|
|
212
|
+
* It is now allowed to use `wk.landcover_map_to_file` to write a landcover map to a `.map` file as long as the displacements are all zero.
|
|
213
|
+
* `lines_to_polygons` is a more robust version of `lines_to_poly` and now tries to make the polygons valid if they are not. It is also much faster.
|
|
214
|
+
* `polygons_to_lines` is a more robust version of `poly_to_lines` and is much faster.
|
|
215
|
+
* Added function `windkit.plot.landcover_map`, which can plot a landcover map with some nicer color schemes.
|
|
216
|
+
* Added function `windkit.plot.elevation_map`, which can plot an elevation map with some nicer color schemes.
|
|
217
|
+
* Added function `windkit.add_landcover_table` to add roughness and other information from a wk.LandCoverTable to a geopandas dataframe with only an `id` column
|
|
218
|
+
* in `get_raster_map`, an option to download from GWA4 landcover `GWA4_landcover` and `GWA4_elevation` has been added
|
|
219
|
+
* Added function `windkit.get_tutorial_data` to download tutorial data from the windkit zenodo repository. The data is downloaded to a local cache directory, which is created if it does not exist.
|
|
220
|
+
* Configuration can now be defined using case-insensitive environment variables `windkit_name`, `windkit_email` and `windkit_institution`. If these are not set, and the configuration file is not found, you will be prompted on initialization.
|
|
221
|
+
|
|
222
|
+
#### Added functionality to work with losses
|
|
223
|
+
- Defined the data structure of loss tables: a pandas DataFrame with required columns: "loss_name" and "loss_percentage". It can also have optional columns "loss_category", "loss_upper_bound", "loss_lower_bound", "loss_default", and "description"
|
|
224
|
+
- Added function `get_loss_table` to obtain a loss tables (DataFrame) from known name. Currently, only "dtu_default" exists.
|
|
225
|
+
- Added function `validate_loss_table` to validate a loss table is formatted correctly
|
|
226
|
+
- Added function `total_loss` to calculate the total loss in percentage from a loss table
|
|
227
|
+
- Added function `loss_summary` to print a formatted summary of the loss table
|
|
228
|
+
- Added function `total_loss_factor` to calculate the loss factor (the factor that can be directly multiplied to subtract the loss from an AEP number)
|
|
229
|
+
|
|
230
|
+
#### Added functionality to work with uncertainties
|
|
231
|
+
- Defined the data structure of uncertainty tables: a pandas DataFrame with required columns: "uncertainty_kind", "uncertainty_name" and "uncertainty_percentage". It can also have optional columns "uncertainty_category", "uncertainty_upper_bound", "uncertainty_lower_bound", "uncertainty_default", and "description"
|
|
232
|
+
- Added function `get_uncertainty_table` to obtain an uncertainty table (DataFrame) from known name. Currently, only "dtu_default" exists.
|
|
233
|
+
- Added function `validate_uncertainty_table` to validate an uncertainty table is formatted correctly
|
|
234
|
+
- Added function `total_uncertainty` to calculate the total uncertainty in percentage from an uncertainty table. Following the GUM guideline on adding uncertainties.
|
|
235
|
+
- Added function `uncertainty_summary` to print a formatted summary of the uncertainty table
|
|
236
|
+
- Added function `total_uncertainty_factor` to calculate the uncertainty factor (the factor that can be directly multiplied to add the uncertainty to an AEP estiamtion)
|
|
237
|
+
|
|
238
|
+
#### Bug fixes
|
|
239
|
+
* `clip_with_margin` now returns a `ValueError` when the bbox crosses the dateline
|
|
240
|
+
* `read_raster_map` was checking for too high roughness twice, one is enough
|
|
241
|
+
* If duplicate heights are passed to `create_dataset` with `struct=stacked_point` it will remove the duplicates
|
|
242
|
+
as required in the `stacked_point` structure.
|
|
243
|
+
* in `gdf_to_ds` we must create the target dataset using unique (`west_east`,`south_north`) points for `stacked_point` and unique `west_east` and `south_north` for cuboids to be able to round trip `ds_to_gdf` and `gdf_to_ds`.
|
|
244
|
+
* get_vector_map(bb, "CORINE", source="dtu") could sometimes fail with "Exception: Missing required column: id", this has been fixed
|
|
245
|
+
* read_vector_map also reads .gpkg files where a geometry column is missing on the landcovertable layer
|
|
246
|
+
* to_stacked_point now retains input order of west_east/south_north coordinates
|
|
247
|
+
* Nearest_points will now raise an error if there are duplicate points resulting from the nearest neighbour lookup if the data is in stacked_point or cuboid format. This is required because xarray >2024.02 does not allow duplicates in MultiIndexes anymore. A new keyword argument keep_duplicates controls the behaviour, the default being True, i.e. when possible behaviour is the same as before.
|
|
248
|
+
* In the function `wk.spatial.add_crs` assigning a projection with more detailed info given in a proj4 string or custom CRS was overwritten when an EPSG was found for the projection. This is now fixed and the full custom CRS is added.
|
|
249
|
+
* Fixed `wk.spatial.interp_unstructured_like` to broadcast single-point sources correctly to target.
|
|
250
|
+
* Fix bug in `nearest_points` when `keep_duplicates=False` and `return_distance=True`: it threw an error that the arrays were not the same size.
|
|
251
|
+
|
|
252
|
+
#### Breaking changes
|
|
253
|
+
* `empty_wasp_site_factors` renamed to `empty_wasp_site_effects`
|
|
254
|
+
* in `empty_z0meso` argument `site_factors` was renamed renamed to `site_effects`
|
|
255
|
+
* in `empty_pwc` argument `site_factors` was renamed renamed to `site_effects`
|
|
256
|
+
- Argument `nwsbins`, `nws`, `n_bins` has been renamed to `n_wsbins` or `wsbins` (in case of array-like argument) in the following functions:
|
|
257
|
+
- `bwc_from_tswc`
|
|
258
|
+
- `create_ws_bin_coords`
|
|
259
|
+
- `create_ws_bin_coords_from_values`
|
|
260
|
+
- Argument `nsec`, `nsecs`, `nwd`, `nbins` has been renamed to `n_sectors` in the following functions:
|
|
261
|
+
- `create_sector_coords`
|
|
262
|
+
- `create_direction_coords`
|
|
263
|
+
- `create_sector_coords_from_edges`
|
|
264
|
+
- `wd_to_sector`
|
|
265
|
+
- `bwc_from_tswc`
|
|
266
|
+
- Argument `num_args` has been renamed to `n_args` in the following functions:
|
|
267
|
+
- `ltc_validate`
|
|
268
|
+
- Argument `ws_bin_width`has been renamed to `wsbin_width` in the following functions:
|
|
269
|
+
- `create_ws_bin_coords`
|
|
270
|
+
- `bwc_from_tswc`
|
|
271
|
+
* Metadata variable name `aep_deficit` has been renamed to `potential_aep_deficit`
|
|
272
|
+
|
|
273
|
+
* Functions `read_raster_map` and `raster_map_to_file` were removed in favour of the new functions `read_elevation_raster`, `write_elevation_raster`, `read_landcover_raster`, and `write_landcover_raster`.
|
|
274
|
+
* Functions `read_vector_map` and `vector_map_to_file` were removed in favour of the new functions `read_elevation_vector`, `write_elevation_vector`, `read_landcover_vector`, and `write_landcover_vector`.
|
|
275
|
+
* Changed most instances where "header" is used to "description"
|
|
276
|
+
* `get_vector_map` returns polygons instead of lines.
|
|
277
|
+
* Switched configuration file from ini to toml, old file will be automatically migrated
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
## 0.8.0 (2024-06-10)
|
|
281
|
+
|
|
282
|
+
### New features
|
|
283
|
+
|
|
284
|
+
#### Enhanced wind turbines class
|
|
285
|
+
|
|
286
|
+
* New functions in `windkit.wind_turbines` to create point `xarray.Dataset` representation of WTGs from `pandas.DataFrame`, `geopandas.DataFrame` and raw point arrays. Additionally, the module adds a function `check_wtg_keys` to validate wtg keys and `wind_turbines_to_geodataframe` to convert the dataset back to a `geopandas.GeoDataFrame`.
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
#### New Long Term Correction module
|
|
290
|
+
|
|
291
|
+
The new module `ẁindkit.ltc` contains tools to perform long term correction of wind measurements. It is based on the windkit `xarray` time series wind climate dataset, therefore it
|
|
292
|
+
is compatible with all the `windkit` toolset.
|
|
293
|
+
* There are two methodologies available:
|
|
294
|
+
- class `LinRegMCP` implements a linear regression.
|
|
295
|
+
- class `VarRatMCP` implements a variance ratio linear regression.
|
|
296
|
+
* There is also a `ltc.scores` submodule to calculate scores such as `r2`, `rmse`, `bias` and `wasserstein distance`.
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
#### Jupyer notebook examples
|
|
300
|
+
|
|
301
|
+
The windkit package includes a folder with examples of use. currently there is one jupyter notebook example to use the long term correction module.
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
#### New functions to handle wind data
|
|
305
|
+
* New function `windkit.wd_to_sector` can return sectors of fixed width or sectors of equal probability (quantiles=True)
|
|
306
|
+
* New function `resample_wind_and_direction` to resample a time series wind climate `xarray.Dataset` to a different sampling frequency.
|
|
307
|
+
* New function `windkit.sector.create_sector_coords_from_edges` that returns a data array with sector coordinates for any array of sector edges, not necessarily equidistant.
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
#### New function to implement cross prediction
|
|
311
|
+
When implementing a cross prediction methodology, we need to create a combination of pair of spatial points with the different locations to predict.
|
|
312
|
+
The new function `windkit.get_cross_predictions` allows that, from a `xarray.Dataset` with several points, return two aligned datasets with the points where we want
|
|
313
|
+
to predict from and where we want to predict to.
|
|
314
|
+
|
|
315
|
+
#### New functions on empty module
|
|
316
|
+
* New function `windkit.empty.empty_raster_map` generates a `xarray.Dataset` raster map instance filled with either `NaN` or meaningful values.
|
|
317
|
+
* New function `windkit.empty.empty_wv_count` returns random meaningful values and it is more suitable for testing
|
|
318
|
+
|
|
319
|
+
#### Improvements to get raster and vector source data
|
|
320
|
+
* `get_vector_map` gets data in vector format from DTU servers (currently only support `CORINE`)
|
|
321
|
+
* `get_raster_map`: added new source dtu, with access to `Viewfinder` and `ESA_CCI`, also allows non-geographic bounding boxes
|
|
322
|
+
* Allow user to put `earth_engine.json` in home directory for authenticating to usage of google earth engine in `get_raster_map`.
|
|
323
|
+
|
|
324
|
+
#### New functionality to handle conversion between geopandas dataframes and xarray datasets
|
|
325
|
+
* New function `gdf_to_ds`, which converts a geopandas dataframe to a xr.Dataset in the best fitting windkit spatial structure.
|
|
326
|
+
* New function `ds_to_gdf`, which converts a xr.Dataset in windkit spatial structure to a geopandas dataframe.
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
### Changes
|
|
330
|
+
|
|
331
|
+
* Added `flow_sep_height` argument in the metadata. This variable is used in pywasp to denote the height where flow separation occurs.
|
|
332
|
+
* Added geostrophic wind climate variables `geo_turn` and `geo_wv_freq` to metadata
|
|
333
|
+
* Moved `gwc_interpolate` to pywasp, because it relies on some code from pywasp and is only useful in a pywasp context
|
|
334
|
+
* `get_roughness_map` and `get_raster_map` issues a warning if a landcover table is attempted to be read as roughness.
|
|
335
|
+
* Removed constraint on first `gen_height` to be equal to 10. This is not a requirement for pywasp to work.
|
|
336
|
+
* GML files with an empty description (the default) written by windkit can now be opened in the map editor
|
|
337
|
+
* `bwc_to_tabfile` now creates the parent directory if does not exist, and formats the tab filename based on the dataset coordinates.
|
|
338
|
+
* `windkit.Workspace.read_wwh` allows WAsP workspaces with displacement height maps (i.e. GML files, WAsP >12.7) to be imported.
|
|
339
|
+
* New function `bwc_validate_structure` which checks only if the structure is OK for a `bwc` dataset, without checking for the actual values.
|
|
340
|
+
* `windkit.bwc_to_tabfile` writes a default header "No Header" in the tab file if the dataset does not have the "wasp_header" attribute.
|
|
341
|
+
* Added 'use_bounds' argument to `windkit.spatial.BBox.reproject` to allow the reprojection to respect the concave/convex shape of the bounding box due to reprojection.
|
|
342
|
+
* The order of stacked point's is now preserved when round-trip via `windkit.spatial.spatial_stack` and `windkit.spatial.spatial_unstack`.
|
|
343
|
+
* Added additional checks for consistency with PyWAsP use when reading in a roughness map with `windkit.read_raster_map`
|
|
344
|
+
* Added method `windkit.WindTurbines.to_wtg_dict_and_turbines_ds` to convert the deprecated `WindTurbines` object to a dictionary and a `xarray.Dataset` of turbines.
|
|
345
|
+
|
|
346
|
+
### Bug fixes
|
|
347
|
+
|
|
348
|
+
* Fixed a bug in `windkit.read_bwc` , where it did not check correctly whether the requested crs matches the dataset crs.
|
|
349
|
+
* `get_raster_map` no longer gives -9999 for areas where no data is available.
|
|
350
|
+
* Fixed a bug in `windkit.bwc_to_tabfile`, where it allowed to write datasets with projected coordinates to a tab file, which is not allowed.
|
|
351
|
+
* Fixed a bug in `windkit.bwc_from_timeseries` where it returned a point structure when the input was a stacked_point.
|
|
352
|
+
* Fixed a bug in `LandCoverTable` that did not allow to instantiate an object when colors or labels are not `None`
|
|
353
|
+
|
|
354
|
+
### Deprecations
|
|
355
|
+
|
|
356
|
+
* `count_to_ws_freq_by_sector` is deprecated in favor of `bwc_from_counts`.
|
|
357
|
+
* `binned_wind_climate.bwc_from_weibull` is removed in favor of `weibull_wind_climate.wwc_to_bwc` with simpler API passing in a `xr.Dataset` instead of weibull parameters one by one.
|
|
358
|
+
* `WindTurbines` class is deprecated in favor of `wind_turbines.create_wind_turbines_from_*` functions to create `xr.Dataset` representation of WTGs.
|
|
359
|
+
* `get_map` and `get_ee_map` are deprecated in favour of `get_raster_map`
|
|
360
|
+
|
|
361
|
+
|
|
362
|
+
|
|
363
|
+
## 0.7.0 (2023-11-13)
|
|
364
|
+
|
|
365
|
+
### New Features
|
|
366
|
+
|
|
367
|
+
#### Additional interpolation functionality
|
|
368
|
+
|
|
369
|
+
The interpolation functionality of windkit was expanded with the release, several low-level interpolation routines were added, allowing interpolation to and from all of windkit's spatial data structures.
|
|
370
|
+
|
|
371
|
+
* Added `windkit.spatial.interp_structured_like` for interpolation from a "cuboid" to any spatial structure, using any of the interpolation methods available in `xarray.Dataset.interp`.
|
|
372
|
+
* Added `windkit.spatial.interp_unstructured_like` and `windkit.spatial.interp_unstructured` and for interpolation between any spatial structures, using `nearest`, `linear`, or `cubic` methods. Additionally, the `natural` method can be used peform natural neighbor interpolation for 2D `point` structured target structures, using `metpy's implementation <https://unidata.github.io/MetPy/latest/examples/gridding/Natural_Neighbor_Verification.html>`.
|
|
373
|
+
|
|
374
|
+
Additionally a few high level routines were added for interpolation specific fields.
|
|
375
|
+
|
|
376
|
+
* Added `windkit.interpolate_gwc` to interpolate a generalized wind climate dataset.
|
|
377
|
+
* Added `windkit.vinterp_wind_speed` for vertical interpolation of wind speeds
|
|
378
|
+
* Added `windkit.vinterp_wind_direction` for vertical interpolation of wind directions
|
|
379
|
+
|
|
380
|
+
#### Improvements to the map_conversion routines
|
|
381
|
+
|
|
382
|
+
* Added `windkit.map_conversion.find_duplicate_lines` to identify duplicated lines in a GeoDataFrame, even if the line is reversed.
|
|
383
|
+
* `windkit.poly_to_lines` now correctly sets the CRS to match the input data. Before it was `None`.
|
|
384
|
+
* `windkit.poly_to_lines` and `windkit.lines2poly` now have an absolute tolerance argument, `atol`, which can be used to identify nearby points, which should be joined.
|
|
385
|
+
|
|
386
|
+
#### Access to data from Microsoft's Planetary Computer platform
|
|
387
|
+
|
|
388
|
+
* Elevation and landcover data obtained using `windkit.get_map` can now use either Microsoft's Planetary Computer platform or Google's Earth Engine.
|
|
389
|
+
* Added `windkit.get_era5` to download ERA5 data from Microsoft's Planetary Computer platform.
|
|
390
|
+
|
|
391
|
+
#### Calculate additional derived quantities from Weibull and Binned Wind climates
|
|
392
|
+
|
|
393
|
+
* Added new functions `windkit.fit_weibull_wasp_m1_m3_fgtm`, `windkit.fit_weibull_wasp_m1_m3`, and `windkit.fit_weibull_k_sumlogm` for fitting weibull distributions to wind speed moments.
|
|
394
|
+
* Added `windkit.weibull_cdf` and `windkit.weibull_pdf` calculate the cdf and pdf of a weibull distribution.
|
|
395
|
+
* Added `windkit.weibull_freq_gt_mean` to calculate the fraction of probability mass above the mean of a weibull distribution.
|
|
396
|
+
* Added `windkit.bwc_ws_cdf` and `windkit.bwc_freq_gt_mean` are similar functions for binned wind climates.
|
|
397
|
+
|
|
398
|
+
#### Convenience functions to access standard land cover tables for common datasets
|
|
399
|
+
* Added `windkit.LandCoverTable.get_table` and it's top-level alias `windkit.get_land_cover_table` to get a land cover table for a given land cover dataset. Landcover tables are currently provided for CGLS-LC100, CORINE, GlobCover, MODIS, WorldCover, and ESA_CCI.
|
|
400
|
+
|
|
401
|
+
#### Even more spatial functionality
|
|
402
|
+
|
|
403
|
+
* Added `windkit.spatial.clip_with_margin` to clip a raster-like dataset to the bounds of another dataset plus a margin. This is useful for clipping a dataset before doing other operations with it (e.g. interpolation) to reduce computation time.
|
|
404
|
+
* Added `windkit.spatial.equal_spatial_shape`, to check if two xarray objects have the same struct and spatial shape. This differs from `windkit.spatial.are_spatially_equal`, which requires the values to also be the same.
|
|
405
|
+
* Added `windkit.spatial.covers` to check if a cuboid dataset covers another spatial dataset (point, stacked_point, or cuboid, or polygon).
|
|
406
|
+
|
|
407
|
+
#### Further improvements to wrg and rsf file handling
|
|
408
|
+
|
|
409
|
+
* `windkit.read_wrgfile`, `windkit.read_rsffile` have a new boolean argument `use_production`, where if it is True, the power colum in the file is interpreted as gross AEP, and when False, the power column in the file is interpreted as power density.
|
|
410
|
+
* `windkit.read_wrgfile`, `windkit.read_rsffile` have a new boolean argument `use_production` where if it is True, the `gross_aep` data variable is written to the file, and if False, the `power_density` column is written to the file.
|
|
411
|
+
|
|
412
|
+
|
|
413
|
+
### Bug fixes
|
|
414
|
+
|
|
415
|
+
* `windkit.LandCoverTable.from_dict_ora`: Sets the correct values of `z0frac` and `dfrac` in the LandCoverTable description.
|
|
416
|
+
* `windkit.BBox.buffer` now works with `shapely 2.0`.
|
|
417
|
+
* Changed the default `nodata` value for `windkit.spatial.warp` from `np.nan` to `None`, which results in a value of `-9999` for integer fields, and `np.nan` for float fields. This fixes an issue with integer data, for which `np.nan` is undefined.
|
|
418
|
+
* `windkit.read_rsffile` no longer returns a unneeded `point` coordinate, when `to_cuboid=False`.
|
|
419
|
+
* `empty.empty_gwc` uses the same random number generator for all data variables, ensuring the same seed gives the same numbers.
|
|
420
|
+
|
|
421
|
+
### Changes
|
|
422
|
+
* `windkit.generalized_wind_climate.read_gwc` performs validations checks for all formats, not only `netCDF`
|
|
423
|
+
* `windkit.generalized_wind_climate.to_libfile` detects if path is a file or a directory and creates subdirectories if they do not exist.
|
|
424
|
+
* `windkit.generalized_wind_climate.to_libfile` formats `.lib` filename using the coordinates if no name is given, similar to what is done with multiple files.
|
|
425
|
+
* function `gwc_validate` and decorator`gwc_validate_wrapper` perform extra validations on generalized wind climate datasets. The first generalized height must be 10.0, the first generalized roughness must be 0.0, and both must have at least 2 entries.
|
|
426
|
+
* `windkit.read_cfdres`, now always returns a dataset with the coordinates `south_north` and `west_east` sorted from low to high.
|
|
427
|
+
* `windkit.read_vector_map` will raise `RuntimeError` when trying to read a `.map` file with displacement height, which is not supported.
|
|
428
|
+
* `wk.read_rsffile` now allows .rsf files with a single-point to be converted to cuboid.
|
|
429
|
+
* Added `windkit.rotor_equivalent_wind_speed` function for calculating REWS
|
|
430
|
+
* Added `windkit.read_wwc` that creates and validates a weibull wind climate `xarray.Dataset` from a file.
|
|
431
|
+
* Added `datum_name` argument to `windkit.spatial.BBox.utm_bbox_from_geographic_coordinate` to allow the user to specify the datum name for the UTM projection.
|
|
432
|
+
* `empty.empty_wasp_site_factors` and `empty.empty_met_fields` are filled with random numbers.
|
|
433
|
+
* `empty.empty_pwc` can include any desired combination of met field and site factors. Defaults to `A_combined`, `k_combined`, `power_density` for met fields and `site_elev` for site factors.
|
|
434
|
+
* `empty.empty_gwc` has a new boolean argument `wdfreq_constant`, which allows you to create a generalized wind climate object where `wdfreq` is constant along the `gen_height`. This is used to create datasets that can be written to the `.lib` file format.
|
|
435
|
+
* `empty.empty_gwc` retains the shape of scalar structured datasets, i.e. a single point with no point dimension, only coordinate values. This structure is common when selecting a single location using `.sel` or `.isel`.
|
|
436
|
+
* Added `windkit.empty.empty_tswc` that generates a time series wind climate `xarray.Dataset` with random but meaningful values.
|
|
437
|
+
* Added `split_combomap` CLI utility, which reads a combo `.map` file and returns two `.gpkg` files, one for elevation and one for landcover.
|
|
438
|
+
|
|
439
|
+
|
|
440
|
+
### Deprecations
|
|
441
|
+
* `windkit.spatial.interpolate_to_grid` deprecated in favor of `windkit.spatial.interp_structured_like` and `windkit.spatial.interp_unstructured_like`
|
|
442
|
+
|
|
443
|
+
### Breaking changes
|
|
444
|
+
* `windkit.poly_to_lines` no longer has a `closed_map` argument. Instead, when `background_lc_id` is set, all empty space is filled with the provided id. This allows for maps that are no longer rectangular, e.g. due to reprojection, to be properly converted to line maps.
|
|
445
|
+
* Removed accessors, which were previously registered for several wind climate data structures. You will need to use the functions instead.
|
|
446
|
+
|
|
447
|
+
## 0.6.3 (2023-07-18)
|
|
448
|
+
|
|
449
|
+
### New Features
|
|
450
|
+
|
|
451
|
+
#### Enhanced bounding box object
|
|
452
|
+
|
|
453
|
+
Several new methods were added to the BBox object to make it easier to work with.
|
|
454
|
+
|
|
455
|
+
* Create BBox objects in more ways:
|
|
456
|
+
* `BBox.from_bounds` as alias to `BBox.from_cornerpts` and set default crs to `EPSG:4326`
|
|
457
|
+
* `BBox.from_point_and_buffer` to create a bbox from a x,y-point, a buffer size, and a crs
|
|
458
|
+
* `BBox.utm_bbox_from_geographic_coordinate` to create a bbox from a geographic coordinate (point) and a buffer in meters, projecting to the appropriate UTM coordinates.
|
|
459
|
+
* Simplified reproject to geographic and UTM coordinates
|
|
460
|
+
* Added method `BBox.reproject_to_geographic()` to reproject a bbox to geographic coordinates
|
|
461
|
+
* Added method `BBox.reproject_to_utm()` to reproject a bbox to UTM coordinates
|
|
462
|
+
* Return data in common GIS formats using:
|
|
463
|
+
* Added method `BBox.polygon` property to return a shapely polygon
|
|
464
|
+
* Added method `BBox.envelope()` to return an enveloped bbox in the current crs
|
|
465
|
+
* Create a simple plot of your BBox using `BBox.plot()`
|
|
466
|
+
|
|
467
|
+
|
|
468
|
+
#### Formatting improvements when writing .wrg/.rsf files
|
|
469
|
+
|
|
470
|
+
* `windkit.to_rsffile` and `windkit.to_wrgfile` now attempts to match the WAsP formatting more closely and a new `formatters` argument allows the user to specify the formatting for each column. This allows for more control over the formatting of the output file. Additional formatting checks have also been added to ensure that the formatting is correct.
|
|
471
|
+
|
|
472
|
+
#### Require regulation_type for wtg data structures
|
|
473
|
+
|
|
474
|
+
* The WindTurbineGenerator now requires a regulation_type variable. When reading in a WTG using `windkit.read_wtg`, the default mode is pitch. You can set it to stall or have it autodetected using the new `windkit.wind_turbine.estimate_regulation_type` function.
|
|
475
|
+
* Validation functions have been added to the WTG object type, so you can now ensure that your Dataset has the correct format before using the WTG.
|
|
476
|
+
|
|
477
|
+
#### Allow use of Polygons for defining landcover data
|
|
478
|
+
|
|
479
|
+
* `windkit.read_vector_map` Now can read polygon based landcover vector map files in `gpkg` format, which is commonly used in GIS tools. The function has a new parameter `background_lc_id` that is needed to setup the background for polygon based vector maps.
|
|
480
|
+
|
|
481
|
+
### Changes
|
|
482
|
+
* `windkit.read_vector_map`: For landcover data in `gpkg` format,`id` is now the default name used to identify landcover ID's in the landcover table. For old `gpkg` files where the name `index` is used, `windkit.read_vector_map` will print a `FutureWarning`.
|
|
483
|
+
* Remove dependency on `cf-xarray`, as we have our own metadata vocabulary. This fixes an issue where Pooch was an optional dependency of `cf-xarray`, but required for the functionality used by WindKit.
|
|
484
|
+
|
|
485
|
+
### BugFixes
|
|
486
|
+
|
|
487
|
+
* Prevent exception when running in the python interpreter and calling `windkit.metadata.update_history`. Now a the generic message "Unknown python interpreter command." is added to the object history in this scenario. To get a correct history, it is recommended to use iPython for interactive sessions.
|
|
488
|
+
* Fixed a bug in `BBox.buffer`, which would cause negative buffering to not preserve bbox shape
|
|
489
|
+
|
|
490
|
+
## 0.6.2 (2023-06-20)
|
|
491
|
+
|
|
492
|
+
### New Features
|
|
493
|
+
|
|
494
|
+
#### New file reading functions
|
|
495
|
+
|
|
496
|
+
* `windkit.read_timeseries_from_pandas` and `windkit.read_timeseries_from_csv` build a time-series wind climate `xarray.Dataset` from time-series data in tabular form, either a `pandas` Dataframe or a `csv` file. The functions attempt to auto-detect the wind speed and wind direction columns based on a standard list of names if they are not provided.
|
|
497
|
+
* `windkit.read_cfdres` reads a WAsP CFD `.cfdres` file into an `xarray.Dataset` structure.
|
|
498
|
+
|
|
499
|
+
#### Detection of CRS from WAsP .map files
|
|
500
|
+
|
|
501
|
+
* `windkit.read_vector_map` and by extension `windkit.read_elevation_map` and `windkit.read_roughness_map` now try to detect CRS information from the header of WAsP `.map` files, which can be added using recent versions of the WAsP MapEditor. In case there is a problem (e.g. wrong format) it will raise an error.
|
|
502
|
+
|
|
503
|
+
#### Updates to vertical profile plotting
|
|
504
|
+
|
|
505
|
+
* `windkit.plot.vertical_profile` Function now works for data arrays without their attributes set. If the height coordinate does not have attributes, `Height [m]` will be used for the y-axis. If the data variable to plot does not have attributes, `DataArray.name` will be used for the x-axis.
|
|
506
|
+
* `windkit.plot.vertical_profile` no longer allows plotting of objects with a `time` coordinate. This is due to performance limitations when plotting potentially thousands of points when a time-series object is passed.
|
|
507
|
+
|
|
508
|
+
### Breaking changes
|
|
509
|
+
|
|
510
|
+
* When creating a file using `windkit.to_rsffile` and `windkit.to_wrgfile` or reading a file using `wk.read_rsffile` and `wk.read_wrgfile`, the elevation variable has been renamed from `elevation` to `site_elev`. This now matches the variable name used in PyWAsP.
|
|
511
|
+
* class `windkit.WindTurbines` does not allow wind turbine `xarray.Dataset` with more than one mode.
|
|
512
|
+
|
|
513
|
+
### Changes
|
|
514
|
+
|
|
515
|
+
* `windkit.spatial.nearest_points` will issue a warning instead of a `ValueError` when it is used on datasets with geographical coordinates.
|
|
516
|
+
* `windkit.to_rsffile` and `windkit.to_wrgfile` calculate necessary parameters met_fields, "power_density", "combined_A", "combined_k", and "wspd", from a wwc if they aren't included.
|
|
517
|
+
|
|
518
|
+
### Bug Fixes
|
|
519
|
+
|
|
520
|
+
* Fixed a formatting bug in `wk.to_rsffile` and `wk.to_wrgfile` that resulted in incorrect column widths.
|
|
521
|
+
|
|
522
|
+
## 0.6.1 (2023-03-16)
|
|
523
|
+
|
|
524
|
+
### New Features
|
|
525
|
+
* `windkit.wtg_cp` function returns the power_coefficient for given wind speeds from an wind turbine generator.
|
|
526
|
+
* Added lookup table to convert WAsP Map Editor named projections to EPSG codes. This allows for projection to be autodetected from some GWC files.
|
|
527
|
+
|
|
528
|
+
### Breaking changes
|
|
529
|
+
|
|
530
|
+
* Removed `coords` from `windkit.read_gwc`. Instead you should use the separate `west_east`, `south_north`, and `height` arguments. Also removed `**kwargs`, as there was only a single option `header`, which is now its own argument.
|
|
531
|
+
|
|
532
|
+
### Changes
|
|
533
|
+
|
|
534
|
+
* Updated pyproj dependency to minimum 3.0
|
|
535
|
+
* Added `gen_heights` and `gen_roughnesses` arguments to `windkit.empty.empty_gwc` to allow users to specify these coordinate values.
|
|
536
|
+
* Removed the `mode` argument from `windkit.wtg_power`, `windkit.wtg_ct`, and `windkit.wtg_cp`, as they now work with any number of modes in the WTG. If you wish to use a single mode from a wind turbine object, you should select using the `isel` or `sel` method.
|
|
537
|
+
|
|
538
|
+
### Bug Fixes
|
|
539
|
+
|
|
540
|
+
* Allow projections that don't have an EPSG code to be added using `windkit.spatial.add_crs`.
|
|
541
|
+
* Scalar spatial datasets would fail in `windkit.spatial.count_spatial_points`.
|
|
542
|
+
* Ensured that `wk.Workspace.get_gwc` could parse GWC objects from WAsP 12.7 and 12.8 workspaces.
|
|
543
|
+
* Fixed bug in `windkit.spatial.to_stacked_point`, where the order of the `west_east` and `south_north` coordinates would be flipped from expected. This caused an issue when converting to `point` and then back to `stacked_point`.
|
|
544
|
+
* Prevent creation of NaN values for some curves when using `windkit.read_wtg` to read ``.wtg`` files with different modes and different wind speed tables.
|
|
545
|
+
* Bug fix in `wind_climate._is_bwc` where an exception was not properly caught.
|
|
546
|
+
|
|
547
|
+
## 0.6.0 (2023-01-29)
|
|
548
|
+
|
|
549
|
+
Several new features in this release including support for Wind Turbines, the ability to convert roughness lines to roughness polygons, and the ability to read PWC files. Several important bug fixes also added.
|
|
550
|
+
|
|
551
|
+
### New Features
|
|
552
|
+
|
|
553
|
+
#### Support for wind turbines and AEP data
|
|
554
|
+
|
|
555
|
+
* New metadata attributes for annual energy production and wind farm flow map
|
|
556
|
+
* New class `windkit.WindTurbines` to hold collections of turbine locations and WTGs (power/ct curves and other details).
|
|
557
|
+
* Added metadata for wind turbine generator `xarray.Dataset`.
|
|
558
|
+
* New plotting function `windkit.plot.plot_wind_turbine_locations`.
|
|
559
|
+
|
|
560
|
+
#### Ability to convert roughness lines to polygons and back
|
|
561
|
+
|
|
562
|
+
* New module `windkit.map_conversion` That allows the user to both create polygons from
|
|
563
|
+
lines and convert polygons to lines, based on `geopandas.GeoDataFrame`. It contains
|
|
564
|
+
the following:
|
|
565
|
+
- `LineMap` and `PolyMap` classes: These classes enable conversion and nice plotting
|
|
566
|
+
of their types.
|
|
567
|
+
- `lines2poly` and `poly_to_lines` helper functions that perform the conversion from
|
|
568
|
+
lines to polygons and from polygons to line respectively, using the library
|
|
569
|
+
`geopandas.GeoDataFrame`.
|
|
570
|
+
* New module `windkit.plot.landcover_map` to plot the `geopandas.GeoDataFrame` polygons
|
|
571
|
+
or lines as a map.
|
|
572
|
+
* New module `windkit.plot.color` to provide color functions for maps with a focus on
|
|
573
|
+
roughness coloring.
|
|
574
|
+
* Class`windkit.LandCoverTable` has a new method `add_colors_to_table` to store colors to be used in map plots.
|
|
575
|
+
|
|
576
|
+
#### New spatial functionality
|
|
577
|
+
|
|
578
|
+
* New function `windkit.spatial.interpolate_to_grid` to resample data to a target grid.
|
|
579
|
+
* New function `windkit.spatial._get_latitude` that returns data-array of latitude values in wgs84.
|
|
580
|
+
* New function `windkit.spatial.count_spatial_points` counts how many points are in a windkit dataset or dataarray.
|
|
581
|
+
|
|
582
|
+
#### Enhancements to `windkit.get_map.get_ee_map`
|
|
583
|
+
* Added NASADEM as elevation dataset
|
|
584
|
+
* Added worldcover as landcover dataset
|
|
585
|
+
* Added option to convert to vector in the cloud.
|
|
586
|
+
|
|
587
|
+
#### Ability to read PWC files
|
|
588
|
+
|
|
589
|
+
* `windkit.read_pwcfile` reads WAsP `.pwc` predicted wind climate file in XML format and returns a weibull wind climate `xarray.Dataset`
|
|
590
|
+
|
|
591
|
+
### Breaking changes
|
|
592
|
+
|
|
593
|
+
* Requires `geopandas>=0.11`.
|
|
594
|
+
* Requires `rioxarray` for reading raster GIS files.
|
|
595
|
+
|
|
596
|
+
### Deprecations
|
|
597
|
+
|
|
598
|
+
### Changes
|
|
599
|
+
|
|
600
|
+
* To support `pyproj` 3.4.0, changed from `pyproj.crs.CRS.is_exact_same` to `pyproj.crs.CRS.equals`, and dropped deprecated `skip_equivalent` kwargs.
|
|
601
|
+
* Drop `south_north` and `west_east` coords before reassigning them as required in [future `xarray` version](https://github.com/pydata/xarray/issues/6505).
|
|
602
|
+
* Added height dependent wind direction frequencies to GWC I/O routines
|
|
603
|
+
- For the .lib-file reader frequencies are duplicated across all gen_heights
|
|
604
|
+
- For the .lib-file writer a check is made to ensure all frequencies are these same across heights. If they are not, a gen_height is required to be set by the user.
|
|
605
|
+
|
|
606
|
+
### Improvements
|
|
607
|
+
* Sped up creation of .lib strings for GWC objects. In testing 15 sites, went from 11s to <1.
|
|
608
|
+
* Retain meta data of `wsbin` coordinates now also present after combining `bwc`'s
|
|
609
|
+
|
|
610
|
+
### Bug Fixes
|
|
611
|
+
* `Windkit.wwc_mean_windspeed` and `windkit.wwc_power_density` previously calculated emergent wind case using all-sector A&k values. Now it is correctly calculated using sectorwise, and an error is thrown if both `emergent` and `bysector` kwargs are `True`.
|
|
612
|
+
* Fixed reading `tif` and `grd` files with negative `dx`.
|
|
613
|
+
* Catch exception in `wind_climate._is_bwc`.
|
|
614
|
+
* Prevent modification of input dataset when calling `weibull_wind_climate.weibull_combined`.
|
|
615
|
+
* Return point or stacked-point dataset for when calling `windkit.spatial.create_dataset` with duplicated `west_east` and `south_north` values. Previously a cuboid was returned with duplicated points collapsed.
|
|
616
|
+
* Use fixed column parsing in `read_rsf/read_wrg` rather than space splitting, when reading the number of sectors.
|
|
617
|
+
* Ensure temporary file created when using `windkit/get_map.py` is always removed.
|
|
618
|
+
* Create correct BWC when reading data with with irregular bins (i.e. as exported from windpro).
|
|
619
|
+
|
|
620
|
+
## 0.5.1
|
|
621
|
+
|
|
622
|
+
* Changed name of author's attributes from name/email to author/author_email
|
|
623
|
+
* Fixed bug for 1d nearest point estimation. The KDtree throws an error if we do not expand the 2d point [x,y] to [[x],[y]]
|
|
624
|
+
* Removed unneeded dependencies
|
|
625
|
+
|
|
626
|
+
## 0.5.0
|
|
627
|
+
|
|
628
|
+
### New Features
|
|
629
|
+
* Added functions `read_wrgfile` and `to_wrgfile` to read and write .wrf resource grid files
|
|
630
|
+
* Added functions for simple wind-related calculations:
|
|
631
|
+
- `windkit.wind_speed_and_direction` calculates wind speed and direction from horizontal wind vectors U and V
|
|
632
|
+
- `windkit.wind_vectors` calculates horizontal wind vectors U and V from wind speed and direction
|
|
633
|
+
- `windkit.wind_direction_difference` calculates the smallest (signed) circular difference between wind directions in degrees.
|
|
634
|
+
- `windkit.wind_speed` calculates horizontal wind speed from vectors U and V
|
|
635
|
+
- `windkit.wind_direction` calculates horizontal wind direction from vectors U and V
|
|
636
|
+
- `windkit.wd_to_sector` to calculate the bin-index for wind directions for a given number of bins/sectors
|
|
637
|
+
* Support for new Xarray-based Wind Turbine Generator (WTG) object added
|
|
638
|
+
* New wind climate dataset validator function and decorator.
|
|
639
|
+
- The function receives an `xarray.Dataset` and returns `True` or `False`.
|
|
640
|
+
- The decorator wraps a function that receives a wind climate dataset and raises a `WindClimateValidationError` if the dataset is not valid.
|
|
641
|
+
- It checks dimensions, attributes and data variables.
|
|
642
|
+
- The functions available are:
|
|
643
|
+
- `bwc_validate`,`bwc_validate_wrapper` for binned wind climate dataset, imported from `windkit.binned_wind_climate`
|
|
644
|
+
- `wwc_validate`,`wwc_validate_wrapper` for weibull wind climate dataset, imported from `windkit.weibull_wind_climate`
|
|
645
|
+
- `gwc_validate`,`gwc_validate_wrapper` for generalized wind climate dataset, imported from `windkit.generalized_wind_climate`
|
|
646
|
+
- `ts_validate`,`ts_validate_wrapper` for time series wind climate dataset, imported from `windkit.time_series_wind_climate`
|
|
647
|
+
|
|
648
|
+
* New `WindClimateValidationError`, raised by the newly introduced wind climate dataset validators.
|
|
649
|
+
* New method `BBox.to_geoseries()` that converts Bounding box to `geopandas.Geoseries`
|
|
650
|
+
* New `empty` module that generates `xarray.Dataset` instances filled with either `NaN` or meaningful values.
|
|
651
|
+
- Suitable for testing.
|
|
652
|
+
- Current available functions are:
|
|
653
|
+
- `empty.empty_wasp_site_factors()`: Create empty site-factors dataset
|
|
654
|
+
- `empty.empty_bwc()`: Create empty binned wind climate dataset filled with meaningful random numbers, i.e. they are generated
|
|
655
|
+
with a weibull distribution, the sum of `wdfreq` is 1, etc.
|
|
656
|
+
- `empty.empty_wwc()`: Create empty weibull wind climate dataset filled with meaningful random numbers, e.g.the values from `A`
|
|
657
|
+
are generated from a uniform function between `5` and `10` and the values for `k` from a uniform function between `1.5` and `2.5`.
|
|
658
|
+
- `empty.empty_gwc()`: Create empty generalized wind climate dataset with the data variables are filled with meaningful random
|
|
659
|
+
numbers, e.g. the values from `A` are generated from a uniform function between `5` and `10` and the values for `k` from a uniform function between `1.5` and `2.5`.
|
|
660
|
+
- `empty.empty_met_fields()`: Create empty dataset filed with `met_fields`
|
|
661
|
+
- `empty.empty_z0meso()`: Create empty site_factors with only `z0meso` and `slfmeso`
|
|
662
|
+
- `empty.empty_pwc()`: Create empty predicted wind climate with optional variables
|
|
663
|
+
* New plotting functions in module `windkit.plot`
|
|
664
|
+
- `windkit.plot.vertical_profile()` plots the vertical profile of the dataArray or dataArrays introduced.
|
|
665
|
+
- `windkit.plot.time_series()` creates a time series plot.
|
|
666
|
+
- `windkit.plot.single_curve()` and `windkit.plot.power_ct_curves()` add plots for electrical power output curve, thrust curve, RPM, Ct, Cp or any other curve the user wants to pass through.
|
|
667
|
+
|
|
668
|
+
* New function `windkit.time_series.read_ts_windpro_txt`
|
|
669
|
+
- Reads windpro format txt file into a `xarray.Dataset`
|
|
670
|
+
### Removed
|
|
671
|
+
* Removed `windkit.binned_wind_climate.dir_to_sec` in favor of `windkit.wd_to_sector`
|
|
672
|
+
* Modules `WaspVectorMap` and `WaspRasterMap` were moved to `pywasp` and are no longer available.
|
|
673
|
+
- Removed legacy WTG objet `WindTurbine`
|
|
674
|
+
|
|
675
|
+
### Changes
|
|
676
|
+
|
|
677
|
+
* `windkit/windturbine.py`
|
|
678
|
+
- Added function `read_wtg` to create an `xarray.Dataset` representation of a turbine
|
|
679
|
+
- Added `wtg_power` and `wtg_ct` to return power and ct for given wind speed
|
|
680
|
+
- Added `wtg_to_pywake`, which makes a PyWake wind turbine class from the dataset
|
|
681
|
+
- renamed `vectormap` to `vector_map`
|
|
682
|
+
- renamed `rastermap` to `raster_map`
|
|
683
|
+
- renamed `elevationmap` to `elevation_map`
|
|
684
|
+
- renamed `roughnessmap` to `roughness_map`
|
|
685
|
+
- `windkit.read_elevation_map` and `windkit.read_roughness_map` now reads both raster and vector maps.
|
|
686
|
+
- Changed the default behavior of `windkit.spatial.clip` for rasters/cuboids so small padding is added to the mask, ensuring that raster/cuboid pixels/cells on the edge of the mask are included in the clipping. The previous behavior can be achieved by setting `pad=False`
|
|
687
|
+
- Updated `windkit.spatial.clip` for `point` `xr.dataset` to always include points that are on the edges of the mask (previously only points inside were included)
|
|
688
|
+
- Updated BWC "header" and GWC "desc" to both be named "wasp_header" (only included for objects originating from WAsP files or methods).
|
|
689
|
+
- Updated to always use "crs" as spatial reference argument name
|
|
690
|
+
- Mirrored `spatial.to_raster` as `spatial.to_cuboid`
|
|
691
|
+
|
|
692
|
+
### Improvements
|
|
693
|
+
- Updated `read_rsffile` and `read_wrgfile` to automatically infer the number of sectors in the data.
|
|
694
|
+
- Updated `windkit.spatial.clip` so it uses a faster clipping method (`_clip_to_bbox_raster`) when the masking is provided as a `BBox` object. This speeds up clipping speed significantly.
|
|
695
|
+
- Allowed `ws_bins` to be python `range` in `windkit.binned_wind_climate._freqs_to_dataset()`
|
|
696
|
+
- Functions `windkit.spatial.to_point` and `windkit.spatial.to_raster_point` now also work on scalar datasets.
|
|
697
|
+
- Fix bug in `metadata.update_var_attrs` to store "Object type" as the string "None" to properly write to netCDF
|
|
698
|
+
- Landcover GMLs use custom reader/write to ensure compatibility with WAsP & Map Editor
|
|
699
|
+
- Plotting documentation improved by rendering jupyter notebooks on it using `nbsphinx` extension for `sphinx`
|
|
700
|
+
- Plotting testing with jupyter notebooks
|