windkit 0.6.3__tar.gz → 0.8.0__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.
Files changed (161) hide show
  1. {windkit-0.6.3 → windkit-0.8.0}/.conda_env/dev_unix.yml +14 -14
  2. {windkit-0.6.3 → windkit-0.8.0}/.conda_env/dev_win.yml +14 -14
  3. windkit-0.8.0/.conda_env/prod_unix.yml +14 -0
  4. {windkit-0.6.3 → windkit-0.8.0}/.gitignore +3 -2
  5. {windkit-0.6.3 → windkit-0.8.0}/.gitlab/merge_request_templates/default.md +1 -0
  6. windkit-0.8.0/.gitlab/merge_request_templates/release.md +43 -0
  7. {windkit-0.6.3 → windkit-0.8.0}/.gitlab-ci.yml +11 -3
  8. {windkit-0.6.3 → windkit-0.8.0}/.pre-commit-config.yaml +10 -8
  9. {windkit-0.6.3 → windkit-0.8.0}/CHANGELOG.md +170 -0
  10. {windkit-0.6.3 → windkit-0.8.0}/PKG-INFO +20 -3
  11. {windkit-0.6.3 → windkit-0.8.0}/docs/source/conf.py +2 -0
  12. {windkit-0.6.3 → windkit-0.8.0}/docs/source/index.rst +1 -0
  13. {windkit-0.6.3 → windkit-0.8.0}/docs/source/installation.rst +5 -0
  14. {windkit-0.6.3 → windkit-0.8.0}/docs/source/io/io.rst +26 -2
  15. {windkit-0.6.3 → windkit-0.8.0}/docs/source/topographic_data.rst +13 -3
  16. windkit-0.8.0/docs/source/wind_climate_objects.rst +210 -0
  17. windkit-0.8.0/docs/source/wind_turbines.rst +138 -0
  18. windkit-0.8.0/examples/ERA5_Sujawal_2010_2018_80m.nc +0 -0
  19. windkit-0.8.0/examples/long_term_correction.ipynb +547 -0
  20. windkit-0.8.0/pixi.lock +31168 -0
  21. windkit-0.8.0/pixi.toml +63 -0
  22. {windkit-0.6.3 → windkit-0.8.0}/pyproject.toml +0 -1
  23. windkit-0.8.0/recipe/recipe.yaml +54 -0
  24. {windkit-0.6.3 → windkit-0.8.0}/setup.cfg +13 -13
  25. {windkit-0.6.3 → windkit-0.8.0}/windkit/__init__.py +10 -11
  26. windkit-0.6.3/windkit/get_map.py → windkit-0.8.0/windkit/_earth_engine.py +80 -114
  27. windkit-0.8.0/windkit/_gwa_map_api.py +188 -0
  28. windkit-0.8.0/windkit/_planetary_computer.py +464 -0
  29. {windkit-0.6.3 → windkit-0.8.0}/windkit/_rvea_xml.py +0 -1
  30. {windkit-0.6.3 → windkit-0.8.0}/windkit/_validate.py +12 -1
  31. {windkit-0.6.3 → windkit-0.8.0}/windkit/_vectormap_gml.py +3 -3
  32. windkit-0.8.0/windkit/_version.py +16 -0
  33. windkit-0.8.0/windkit/_weibull_nb.py +485 -0
  34. {windkit-0.6.3 → windkit-0.8.0}/windkit/all_vars.json +32 -15
  35. {windkit-0.6.3 → windkit-0.8.0}/windkit/binned_wind_climate.py +275 -226
  36. {windkit-0.6.3 → windkit-0.8.0}/windkit/cfd.py +11 -1
  37. {windkit-0.6.3 → windkit-0.8.0}/windkit/data_structures.py +3 -1
  38. {windkit-0.6.3 → windkit-0.8.0}/windkit/elevation_map.py +1 -0
  39. windkit-0.8.0/windkit/empty.py +761 -0
  40. {windkit-0.6.3 → windkit-0.8.0}/windkit/generalized_wind_climate.py +96 -19
  41. windkit-0.8.0/windkit/geostrophic_wind_climate.py +59 -0
  42. windkit-0.8.0/windkit/get_map.py +277 -0
  43. {windkit-0.6.3 → windkit-0.8.0}/windkit/landcover.py +186 -3
  44. windkit-0.8.0/windkit/landcovertables/ESA_CCI.json +192 -0
  45. windkit-0.8.0/windkit/ltc/__init__.py +7 -0
  46. windkit-0.8.0/windkit/ltc/_validation.py +120 -0
  47. windkit-0.8.0/windkit/ltc/mcp.py +272 -0
  48. windkit-0.8.0/windkit/ltc/regression.py +143 -0
  49. windkit-0.8.0/windkit/ltc/scores.py +164 -0
  50. windkit-0.8.0/windkit/map_conversion/__init__.py +3 -0
  51. windkit-0.8.0/windkit/map_conversion/_polygons_constraints.py +116 -0
  52. {windkit-0.6.3 → windkit-0.8.0}/windkit/map_conversion/helper_functions.py +42 -3
  53. {windkit-0.6.3 → windkit-0.8.0}/windkit/map_conversion/lines2poly.py +44 -29
  54. {windkit-0.6.3 → windkit-0.8.0}/windkit/map_conversion/poly2lines.py +176 -164
  55. {windkit-0.6.3 → windkit-0.8.0}/windkit/metadata.py +14 -9
  56. {windkit-0.6.3 → windkit-0.8.0}/windkit/plot/histogram.py +19 -28
  57. {windkit-0.6.3 → windkit-0.8.0}/windkit/plot/roughness_rose.py +8 -8
  58. {windkit-0.6.3 → windkit-0.8.0}/windkit/plot/wind_rose.py +12 -26
  59. {windkit-0.6.3 → windkit-0.8.0}/windkit/raster_map.py +86 -1
  60. {windkit-0.6.3 → windkit-0.8.0}/windkit/sector.py +29 -1
  61. {windkit-0.6.3 → windkit-0.8.0}/windkit/spatial/__init__.py +24 -5
  62. {windkit-0.6.3 → windkit-0.8.0}/windkit/spatial/_bbox.py +39 -9
  63. {windkit-0.6.3 → windkit-0.8.0}/windkit/spatial/_crs.py +0 -1
  64. windkit-0.8.0/windkit/spatial/_cuboid.py +182 -0
  65. windkit-0.8.0/windkit/spatial/_interpolation.py +732 -0
  66. windkit-0.8.0/windkit/spatial/_metpy_natural_neighbors.py +627 -0
  67. {windkit-0.6.3 → windkit-0.8.0}/windkit/spatial/_raster.py +223 -17
  68. {windkit-0.6.3 → windkit-0.8.0}/windkit/spatial/_struct.py +1 -1
  69. {windkit-0.6.3 → windkit-0.8.0}/windkit/spatial/decorators.py +0 -1
  70. {windkit-0.6.3 → windkit-0.8.0}/windkit/spatial/spatial.py +347 -25
  71. {windkit-0.6.3 → windkit-0.8.0}/windkit/time_series_wind_climate.py +25 -5
  72. {windkit-0.6.3 → windkit-0.8.0}/windkit/vector_map.py +100 -56
  73. windkit-0.8.0/windkit/weibull.py +496 -0
  74. {windkit-0.6.3 → windkit-0.8.0}/windkit/weibull_wind_climate.py +334 -58
  75. windkit-0.8.0/windkit/wind.py +451 -0
  76. windkit-0.8.0/windkit/wind_climate.py +290 -0
  77. windkit-0.8.0/windkit/wind_data.py +82 -0
  78. windkit-0.6.3/windkit/wind_turbine.py → windkit-0.8.0/windkit/wind_turbine_generator.py +87 -12
  79. windkit-0.8.0/windkit/wind_turbines.py +243 -0
  80. {windkit-0.6.3 → windkit-0.8.0}/windkit/workspace.py +3 -2
  81. {windkit-0.6.3 → windkit-0.8.0}/windkit.egg-info/SOURCES.txt +23 -16
  82. windkit-0.6.3/.conda_env/prod_unix.yml +0 -14
  83. windkit-0.6.3/.gitlab/issue_templates/release.md +0 -6
  84. windkit-0.6.3/docs/source/wind_climate_objects.rst +0 -40
  85. windkit-0.6.3/env/Dockerfile.api +0 -16
  86. windkit-0.6.3/env/Dockerfile.ci +0 -25
  87. windkit-0.6.3/env/Dockerfile.miniconda +0 -20
  88. windkit-0.6.3/env/Makefile +0 -6
  89. windkit-0.6.3/env/conda-linux-64.lock +0 -51
  90. windkit-0.6.3/env/conda-osx-64.lock +0 -307
  91. windkit-0.6.3/env/conda-win-64.lock +0 -367
  92. windkit-0.6.3/env/create_locks.py +0 -64
  93. windkit-0.6.3/env/dev_env.yaml +0 -57
  94. windkit-0.6.3/env/pywasp.cfg +0 -11
  95. windkit-0.6.3/env/pywasp_env.yml +0 -38
  96. windkit-0.6.3/env/pywaspio_env.yml +0 -31
  97. windkit-0.6.3/env/windkit.ini +0 -4
  98. windkit-0.6.3/recipe/meta.yaml +0 -43
  99. windkit-0.6.3/windkit/_version.py +0 -4
  100. windkit-0.6.3/windkit/empty.py +0 -525
  101. windkit-0.6.3/windkit/map_conversion/__init__.py +0 -0
  102. windkit-0.6.3/windkit/spatial/_cuboid.py +0 -26
  103. windkit-0.6.3/windkit/spatial/_interpolation.py +0 -158
  104. windkit-0.6.3/windkit/weibull.py +0 -468
  105. windkit-0.6.3/windkit/wind.py +0 -166
  106. windkit-0.6.3/windkit/wind_climate.py +0 -119
  107. {windkit-0.6.3 → windkit-0.8.0}/.pylintrc +0 -0
  108. {windkit-0.6.3 → windkit-0.8.0}/LICENSE +0 -0
  109. {windkit-0.6.3 → windkit-0.8.0}/MANIFEST.in +0 -0
  110. {windkit-0.6.3 → windkit-0.8.0}/README-Internal.md +0 -0
  111. {windkit-0.6.3 → windkit-0.8.0}/README.md +0 -0
  112. {windkit-0.6.3 → windkit-0.8.0}/docs/.dockerignore +0 -0
  113. {windkit-0.6.3 → windkit-0.8.0}/docs/.gitignore +0 -0
  114. {windkit-0.6.3 → windkit-0.8.0}/docs/Dockerfile +0 -0
  115. {windkit-0.6.3 → windkit-0.8.0}/docs/Makefile +0 -0
  116. {windkit-0.6.3 → windkit-0.8.0}/docs/docker-compose.yml +0 -0
  117. {windkit-0.6.3 → windkit-0.8.0}/docs/legacy/dev/dev-git.rst +0 -0
  118. {windkit-0.6.3 → windkit-0.8.0}/docs/legacy/dev/dev-intro.rst +0 -0
  119. {windkit-0.6.3 → windkit-0.8.0}/docs/legacy/dev/dev-pytest.rst +0 -0
  120. {windkit-0.6.3 → windkit-0.8.0}/docs/legacy/dev/dev-sphinx.rst +0 -0
  121. {windkit-0.6.3 → windkit-0.8.0}/docs/nginx.conf +0 -0
  122. {windkit-0.6.3 → windkit-0.8.0}/docs/source/WAsP.bib +0 -0
  123. {windkit-0.6.3 → windkit-0.8.0}/docs/source/_templates/autosummary/class.rst +0 -0
  124. {windkit-0.6.3 → windkit-0.8.0}/docs/source/_templates/autosummary/module.rst +0 -0
  125. {windkit-0.6.3 → windkit-0.8.0}/docs/source/development_roadmap.rst +0 -0
  126. {windkit-0.6.3 → windkit-0.8.0}/docs/source/getting_started.rst +0 -0
  127. {windkit-0.6.3 → windkit-0.8.0}/docs/source/map_conversion.rst +0 -0
  128. {windkit-0.6.3 → windkit-0.8.0}/docs/source/map_conversion_examples_nb.nblink +0 -0
  129. {windkit-0.6.3 → windkit-0.8.0}/docs/source/plotting.rst +0 -0
  130. {windkit-0.6.3 → windkit-0.8.0}/docs/source/plotting_examples.rst +0 -0
  131. {windkit-0.6.3 → windkit-0.8.0}/docs/source/plotting_examples_nb.nblink +0 -0
  132. {windkit-0.6.3 → windkit-0.8.0}/docs/source/plotting_user_guide.rst +0 -0
  133. {windkit-0.6.3 → windkit-0.8.0}/docs/source/release_notes.rst +0 -0
  134. {windkit-0.6.3 → windkit-0.8.0}/docs/source/windkit.rst +0 -0
  135. {windkit-0.6.3 → windkit-0.8.0}/windkit/_errors.py +0 -0
  136. {windkit-0.6.3 → windkit-0.8.0}/windkit/_vectormap_helpers.py +0 -0
  137. {windkit-0.6.3 → windkit-0.8.0}/windkit/config.py +0 -0
  138. {windkit-0.6.3 → windkit-0.8.0}/windkit/geospatial_imports.py +0 -0
  139. {windkit-0.6.3 → windkit-0.8.0}/windkit/landcovertables/CGLS-LC100.json +0 -0
  140. {windkit-0.6.3 → windkit-0.8.0}/windkit/landcovertables/CORINE.json +0 -0
  141. {windkit-0.6.3 → windkit-0.8.0}/windkit/landcovertables/Globcover.json +0 -0
  142. {windkit-0.6.3 → windkit-0.8.0}/windkit/landcovertables/MODIS.json +0 -0
  143. {windkit-0.6.3 → windkit-0.8.0}/windkit/landcovertables/WorldCover.json +0 -0
  144. {windkit-0.6.3 → windkit-0.8.0}/windkit/map_file_header_to_epsg.json +0 -0
  145. {windkit-0.6.3 → windkit-0.8.0}/windkit/plot/__init__.py +0 -0
  146. {windkit-0.6.3 → windkit-0.8.0}/windkit/plot/_colormaps.py +0 -0
  147. {windkit-0.6.3 → windkit-0.8.0}/windkit/plot/_helpers.py +0 -0
  148. {windkit-0.6.3 → windkit-0.8.0}/windkit/plot/color.py +0 -0
  149. {windkit-0.6.3 → windkit-0.8.0}/windkit/plot/landcover_map.py +0 -0
  150. {windkit-0.6.3 → windkit-0.8.0}/windkit/plot/operational_curves.py +0 -0
  151. {windkit-0.6.3 → windkit-0.8.0}/windkit/plot/raster_plot.py +0 -0
  152. {windkit-0.6.3 → windkit-0.8.0}/windkit/plot/vertical_profile.py +0 -0
  153. {windkit-0.6.3 → windkit-0.8.0}/windkit/plot/wind_turbine.py +0 -0
  154. {windkit-0.6.3 → windkit-0.8.0}/windkit/roughness_map.py +0 -0
  155. {windkit-0.6.3 → windkit-0.8.0}/windkit/spatial/README.md +0 -0
  156. {windkit-0.6.3 → windkit-0.8.0}/windkit/spatial/_dimensions.py +0 -0
  157. {windkit-0.6.3 → windkit-0.8.0}/windkit/spatial/_latitude.py +0 -0
  158. {windkit-0.6.3 → windkit-0.8.0}/windkit/spatial/_point.py +0 -0
  159. {windkit-0.6.3 → windkit-0.8.0}/windkit/spatial/_utm.py +0 -0
  160. {windkit-0.6.3 → windkit-0.8.0}/windkit/spatial/_vector.py +0 -0
  161. {windkit-0.6.3 → windkit-0.8.0}/windkit/spatial/_vertical.py +0 -0
@@ -4,22 +4,22 @@ channels:
4
4
  - https://conda.windenergy.dtu.dk/channel/open
5
5
  dependencies:
6
6
  - dtu_config
7
- - geopandas =0.11
7
+ - geopandas >=0.12
8
8
  - lxml =4
9
- - matplotlib =3
10
- - netcdf4 =1.5
11
- - numpy =1.21.2
12
- - packaging =21.0
13
- - pandas =1
14
- - plotly >=5.1.0
15
- - pyproj >=2.2.2
16
- - python >=3.8
17
- - python-kaleido >=0.2.1
9
+ - matplotlib >=3.6
10
+ - netcdf4 >=1.5
11
+ - numpy >=1.24
12
+ - packaging >=22
13
+ - pandas >=2
14
+ - plotly >=5.12
15
+ - pyproj >=3.4
16
+ - python >=3.10
17
+ - python-kaleido >=0.2
18
18
  - rasterio =1
19
- - scipy =1
20
- - shapely =1
21
- - xarray >=2022
22
- - rioxarray >=0.12
19
+ - scipy >=1.9
20
+ - shapely =2
21
+ - xarray >=2023
22
+ - rioxarray >=0.13
23
23
  # Build dependencies all
24
24
  - pip
25
25
  - git
@@ -4,22 +4,22 @@ channels:
4
4
  - https://conda.windenergy.dtu.dk/channel/open
5
5
  dependencies:
6
6
  - dtu_config
7
- - geopandas =0.11
7
+ - geopandas >=0.12
8
8
  - lxml =4
9
- - matplotlib =3
10
- - netcdf4 =1.5
11
- - numpy =1.21.2
12
- - packaging =21.0
13
- - pandas =1
14
- - plotly >=5.1.0
15
- - pyproj >=2.2.2
16
- - python >=3.8
17
- - python-kaleido >=0.2.1
9
+ - matplotlib >=3.6
10
+ - netcdf4 >=1.5
11
+ - numpy >=1.24
12
+ - packaging >=22
13
+ - pandas >=2
14
+ - plotly >=5.12
15
+ - pyproj >=3.4
16
+ - python >=3.10
17
+ - python-kaleido >=0.2
18
18
  - rasterio =1
19
- - scipy =1
20
- - shapely =1
21
- - xarray >=2022
22
- - rioxarray >=0.12
19
+ - scipy >=1.9
20
+ - shapely =2
21
+ - xarray >=2023
22
+ - rioxarray >=0.15
23
23
  # Build dependencies all
24
24
  - pip
25
25
  - setuptools
@@ -0,0 +1,14 @@
1
+ name: base
2
+ channels:
3
+ - conda-forge
4
+ - https://conda.windenergy.dtu.dk/channel/open
5
+ dependencies:
6
+ - boa
7
+ - build
8
+ - python >=3.10
9
+ - twine
10
+ - setuptools_scm
11
+ - git
12
+ - zip
13
+ - unzip
14
+ - rsync
@@ -16,8 +16,8 @@ test/htmlcov
16
16
  .eggs/
17
17
  *,cover
18
18
  _version.py
19
-
20
-
19
+ .devcontainer
20
+ .pixi/
21
21
 
22
22
  # macOS files
23
23
  .DS_Store
@@ -38,3 +38,4 @@ test/vector*.*
38
38
  test/dummy*/
39
39
  test/dummy*.*
40
40
  test/data/
41
+ examples/.ipynb_checkpoints/
@@ -1,6 +1,7 @@
1
1
  Closes #xxx,#yyy
2
2
 
3
3
  * [ ] Documentation added
4
+ * [ ] Developer documentation updated
4
5
  * [ ] Changelog updated
5
6
  * [ ] Tests added
6
7
  * [ ] Commits squashed
@@ -0,0 +1,43 @@
1
+ # Release Process
2
+
3
+ # Summary
4
+
5
+ This MR contains the changes for the release [version].
6
+ (add a brief description)
7
+
8
+ ## Checklist
9
+
10
+ Once this checklist is completed, you can merge.
11
+
12
+ - [ ] Update Changelog
13
+ - [ ] Test Build
14
+ - [ ] Merge with master
15
+ - [ ] Add Tag
16
+
17
+
18
+ ### Update Changelog
19
+ Follow all the steps below before checking the mark for Update changelog
20
+
21
+ - The CHANGELOG.md subtitle "Unreleased" needs to be changed to the version being released, including the date
22
+ - The content under "Unreleased" may need to be rewritten to be more friendly
23
+ - Move the changelog content to the documentation website under "Release
24
+ Notes / Changelog". (This is done by the CI platform)
25
+
26
+ Follow all the steps below before checking the mark for Update changelog
27
+
28
+ The CHANGELOG.md subtitle "Unreleased" needs to be changed the version being released
29
+ here, including the date
30
+ Restructure the content under "Unreleased" to be more userfriendly
31
+
32
+ ### Test Build
33
+ Follow all the steps below before checking the mark for Test Build
34
+ - Test must pass
35
+ - -...
36
+
37
+ ### Merge with master
38
+ Follow all the steps below before checking the mark for Merge with master
39
+ - ...
40
+
41
+ ### Add Tag
42
+ Follow all the steps below before checking the mark for Add Tag
43
+ - Add tag to the branch with the command `git tag ...`
@@ -21,6 +21,8 @@ default:
21
21
 
22
22
  # Check that pre-commit has run
23
23
  run_precommit:
24
+ script:
25
+ - pre-commit clean
24
26
  extends: .verify_precommit
25
27
 
26
28
  # Build environments for testing
@@ -74,7 +76,9 @@ test_linux:
74
76
  build_wheel:
75
77
  extends: .build_wheel_template
76
78
  build_conda:
77
- extends: .build_conda_template
79
+ extends: .build_rattler_template
80
+ variables:
81
+ PY_BUILD_CHANNELS: "-c conda-forge -c https://conda.windenergy.dtu.dk/channel/open"
78
82
 
79
83
  # Deploy
80
84
  deploy_pypi:
@@ -93,11 +97,15 @@ deploy_conda_dev:
93
97
  # Docs
94
98
  build_docs:
95
99
  extends: .build_docs
96
- tags: ["doc_deploy"]
97
- deploy_docs_pages:
100
+ tags: ["ramtt_int-cluster", "linux-docker"]
101
+ pages:
98
102
  extends: .deploy_docs_pages
99
103
  needs: ["build_docs"]
100
104
  tags: ["doc_deploy"]
105
+ docs_deploy:
106
+ extends: .deploy_docs_wasp
107
+ needs: ["build_docs"]
108
+ tags: ["doc_deploy"]
101
109
 
102
110
  ### MIGHT BE USED LATER ###
103
111
 
@@ -2,10 +2,11 @@
2
2
  # See https://pre-commit.com/hooks.html for more hooks
3
3
  repos:
4
4
  - repo: https://github.com/pre-commit/pre-commit-hooks
5
- rev: v3.1.0
5
+ rev: v4.5.0
6
6
  hooks:
7
7
  - id: trailing-whitespace
8
8
  - id: end-of-file-fixer
9
+ exclude: "test/data"
9
10
  - id: check-yaml
10
11
  exclude: .gitlab-ci.yml|meta.yaml|.ci-includes/run_pytest.yml|.ci-includes/py_deploy.yml
11
12
  - id: check-merge-conflict
@@ -17,18 +18,19 @@ repos:
17
18
  - id: check-json
18
19
  - id: pretty-format-json
19
20
  args: [--autofix, --no-ensure-ascii]
21
+ exclude: "test/"
20
22
  - repo: https://github.com/pycqa/isort
21
- rev: 5.12.0
23
+ rev: 5.13.2
22
24
  hooks:
23
25
  - id: isort
24
26
  name: isort (python)
25
27
  - repo: https://github.com/psf/black
26
- rev: 22.3.0
28
+ rev: 23.12.1
27
29
  hooks:
28
30
  - id: black
29
31
  exclude: examples
30
- - repo: https://github.com/hadialqattan/pycln
31
- rev: v1.3.1 # Possible releases: https://github.com/hadialqattan/pycln/releases
32
- hooks:
33
- - id: pycln
34
- args: [--config=pyproject.toml]
32
+ #- repo: https://github.com/hadialqattan/pycln
33
+ #rev: v1.3.1 # Possible releases: https://github.com/hadialqattan/pycln/releases
34
+ #hooks:
35
+ #- id: pycln
36
+ #args: [--config=pyproject.toml]
@@ -2,6 +2,175 @@
2
2
 
3
3
  All major changes are listed here.
4
4
 
5
+ ## Unreleased
6
+
7
+ ## 0.8.0 (2024-06-10)
8
+
9
+ ### New features
10
+
11
+ #### Enhanced wind turbines class
12
+
13
+ * 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`.
14
+
15
+
16
+ #### New Long Term Correction module
17
+
18
+ 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
19
+ is compatible with all the `windkit` toolset.
20
+ * There are two methodologies available:
21
+ - class `LinRegMCP` implements a linear regression.
22
+ - class `VarRatMCP` implements a variance ratio linear regression.
23
+ * There is also a `ltc.scores` submodule to calculate scores such as `r2`, `rmse`, `bias` and `wasserstein distance`.
24
+
25
+
26
+ #### Jupyer notebook examples
27
+
28
+ The windkit package includes a folder with examples of use. currently there is one jupyter notebook example to use the long term correction module.
29
+
30
+
31
+ #### New functions to handle wind data
32
+ * New function `windkit.wd_to_sector` can return sectors of fixed width or sectors of equal probability (quantiles=True)
33
+ * New function `resample_wind_and_direction` to resample a time series wind climate `xarray.Dataset` to a different sampling frequency.
34
+ * 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.
35
+
36
+
37
+ #### New function to implement cross prediction
38
+ When implementing a cross prediction methodology, we need to create a combination of pair of spatial points with the different locations to predict.
39
+ 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
40
+ to predict from and where we want to predict to.
41
+
42
+ #### New functions on empty module
43
+ * New function `windkit.empty.empty_raster_map` generates a `xarray.Dataset` raster map instance filled with either `NaN` or meaningful values.
44
+ * New function `windkit.empty.empty_wv_count` returns random meaningful values and it is more suitable for testing
45
+
46
+ #### Improvements to get raster and vector source data
47
+ * `get_vector_map` gets data in vector format from DTU servers (currently only support `CORINE`)
48
+ * `get_raster_map`: added new source dtu, with access to `Viewfinder` and `ESA_CCI`, also allows non-geographic bounding boxes
49
+ * Allow user to put `earth_engine.json` in home directory for authenticating to usage of google earth engine in `get_raster_map`.
50
+
51
+ #### New functionality to handle conversion between geopandas dataframes and xarray datasets
52
+ * New function `gdf_to_ds`, which converts a geopandas dataframe to a xr.Dataset in the best fitting windkit spatial structure.
53
+ * New function `ds_to_gdf`, which converts a xr.Dataset in windkit spatial structure to a geopandas dataframe.
54
+
55
+
56
+ ### Changes
57
+
58
+ * Added `flow_sep_height` argument in the metadata. This variable is used in pywasp to denote the height where flow separation occurs.
59
+ * Added geostrophic wind climate variables `geo_turn` and `geo_wv_freq` to metadata
60
+ * Moved `gwc_interpolate` to pywasp, because it relies on some code from pywasp and is only useful in a pywasp context
61
+ * `get_roughness_map` and `get_raster_map` issues a warning if a landcover table is attempted to be read as roughness.
62
+ * Removed constraint on first `gen_height` to be equal to 10. This is not a requirement for pywasp to work.
63
+ * GML files with an empty description (the default) written by windkit can now be opened in the map editor
64
+ * `bwc_to_tabfile` now creates the parent directory if does not exist, and formats the tab filename based on the dataset coordinates.
65
+ * `windkit.Workspace.read_wwh` allows WAsP workspaces with displacement height maps (i.e. GML files, WAsP >12.7) to be imported.
66
+ * New function `bwc_validate_structure` which checks only if the structure is OK for a `bwc` dataset, without checking for the actual values.
67
+ * `windkit.bwc_to_tabfile` writes a default header "No Header" in the tab file if the dataset does not have the "wasp_header" attribute.
68
+ * 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.
69
+ * The order of stacked point's is now preserved when round-trip via `windkit.spatial.spatial_stack` and `windkit.spatial.spatial_unstack`.
70
+ * Added additional checks for consistency with PyWAsP use when reading in a roughness map with `windkit.read_raster_map`
71
+ * 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.
72
+
73
+ ### Bug fixes
74
+
75
+ * Fixed a bug in `windkit.read_bwc` , where it did not check correctly whether the requested crs matches the dataset crs.
76
+ * `get_raster_map` no longer gives -9999 for areas where no data is available.
77
+ * 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.
78
+ * Fixed a bug in `windkit.bwc_from_timeseries` where it returned a point structure when the input was a stacked_point.
79
+ * Fixed a bug in `LandCoverTable` that did not allow to instantiate an object when colors or labels are not `None`
80
+
81
+ ### Deprecations
82
+
83
+ * `count_to_ws_freq_by_sector` is deprecated in favor of `bwc_from_counts`.
84
+ * `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.
85
+ * `WindTurbines` class is deprecated in favor of `wind_turbines.create_wind_turbines_from_*` functions to create `xr.Dataset` representation of WTGs.
86
+ * `get_map` and `get_ee_map` are deprecated in favour of `get_raster_map`
87
+
88
+
89
+
90
+ ## 0.7.0 (2023-11-13)
91
+
92
+ ### New Features
93
+
94
+ #### Additional interpolation functionality
95
+
96
+ 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.
97
+
98
+ * 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`.
99
+ * 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>`.
100
+
101
+ Additionally a few high level routines were added for interpolation specific fields.
102
+
103
+ * Added `windkit.interpolate_gwc` to interpolate a generalized wind climate dataset.
104
+ * Added `windkit.vinterp_wind_speed` for vertical interpolation of wind speeds
105
+ * Added `windkit.vinterp_wind_direction` for vertical interpolation of wind directions
106
+
107
+ #### Improvements to the map_conversion routines
108
+
109
+ * Added `windkit.map_conversion.find_duplicate_lines` to identify duplicated lines in a GeoDataFrame, even if the line is reversed.
110
+ * `windkit.poly2lines` now correctly sets the CRS to match the input data. Before it was `None`.
111
+ * `windkit.poly2lines` and `windkit.lines2poly` now have an absolute tolerance argument, `atol`, which can be used to identify nearby points, which should be joined.
112
+
113
+ #### Access to data from Microsoft's Planetary Computer platform
114
+
115
+ * Elevation and landcover data obtained using `windkit.get_map` can now use either Microsoft's Planetary Computer platform or Google's Earth Engine.
116
+ * Added `windkit.get_era5` to download ERA5 data from Microsoft's Planetary Computer platform.
117
+
118
+ #### Calculate additional derived quantities from Weibull and Binned Wind climates
119
+
120
+ * 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.
121
+ * Added `windkit.weibull_cdf` and `windkit.weibull_pdf` calculate the cdf and pdf of a weibull distribution.
122
+ * Added `windkit.weibull_freq_gt_mean` to calculate the fraction of probability mass above the mean of a weibull distribution.
123
+ * Added `windkit.bwc_ws_cdf` and `windkit.bwc_freq_gt_mean` are similar functions for binned wind climates.
124
+
125
+ #### Convenience functions to access standard land cover tables for common datasets
126
+ * 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.
127
+
128
+ #### Even more spatial functionality
129
+
130
+ * 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.
131
+ * 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.
132
+ * Added `windkit.spatial.covers` to check if a cuboid dataset covers another spatial dataset (point, stacked_point, or cuboid, or polygon).
133
+
134
+ #### Further improvements to wrg and rsf file handling
135
+
136
+ * `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.
137
+ * `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.
138
+
139
+
140
+ ### Bug fixes
141
+
142
+ * `windkit.LandCoverTable.from_dict_ora`: Sets the correct values of `z0frac` and `dfrac` in the LandCoverTable description.
143
+ * `windkit.BBox.buffer` now works with `shapely 2.0`.
144
+ * 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.
145
+ * `windkit.read_rsffile` no longer returns a unneeded `point` coordinate, when `to_cuboid=False`.
146
+ * `empty.empty_gwc` uses the same random number generator for all data variables, ensuring the same seed gives the same numbers.
147
+
148
+ ### Changes
149
+ * `windkit.generalized_wind_climate.read_gwc` performs validations checks for all formats, not only `netCDF`
150
+ * `windkit.generalized_wind_climate.to_libfile` detects if path is a file or a directory and creates subdirectories if they do not exist.
151
+ * `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.
152
+ * 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.
153
+ * `windkit.read_cfdres`, now always returns a dataset with the coordinates `south_north` and `west_east` sorted from low to high.
154
+ * `windkit.read_vector_map` will raise `RuntimeError` when trying to read a `.map` file with displacement height, which is not supported.
155
+ * `wk.read_rsffile` now allows .rsf files with a single-point to be converted to cuboid.
156
+ * Added `windkit.rotor_equivalent_wind_speed` function for calculating REWS
157
+ * Added `windkit.read_wwc` that creates and validates a weibull wind climate `xarray.Dataset` from a file.
158
+ * 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.
159
+ * `empty.empty_wasp_site_factors` and `empty.empty_met_fields` are filled with random numbers.
160
+ * `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.
161
+ * `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.
162
+ * `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`.
163
+ * Added `windkit.empty.empty_tswc` that generates a time series wind climate `xarray.Dataset` with random but meaningful values.
164
+ * Added `split_combomap` CLI utility, which reads a combo `.map` file and returns two `.gpkg` files, one for elevation and one for landcover.
165
+
166
+
167
+ ### Deprecations
168
+ * `windkit.spatial.interpolate_to_grid` deprecated in favor of `windkit.spatial.interp_structured_like` and `windkit.spatial.interp_unstructured_like`
169
+
170
+ ### Breaking changes
171
+ * `windkit.poly2lines` 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.
172
+ * Removed accessors, which were previously registered for several wind climate data structures. You will need to use the functions instead.
173
+
5
174
  ## 0.6.3 (2023-07-18)
6
175
 
7
176
  ### New Features
@@ -22,6 +191,7 @@ Several new methods were added to the BBox object to make it easier to work with
22
191
  * Added method `BBox.envelope()` to return an enveloped bbox in the current crs
23
192
  * Create a simple plot of your BBox using `BBox.plot()`
24
193
 
194
+
25
195
  #### Formatting improvements when writing .wrg/.rsf files
26
196
 
27
197
  * `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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: windkit
3
- Version: 0.6.3
3
+ Version: 0.8.0
4
4
  Summary: WindKit provides core functionalities for working with wind resource data
5
5
  Home-page: https://docs-wasp.ramtt.xyz/windkit
6
6
  Author: DTU Wind Energy
@@ -8,11 +8,28 @@ License: BSD-3-Clause
8
8
  Classifier: Programming Language :: Python :: 3
9
9
  Classifier: License :: OSI Approved :: BSD License
10
10
  Classifier: Operating System :: OS Independent
11
- Requires-Python: >=3.6
11
+ Requires-Python: >=3.10
12
12
  Description-Content-Type: text/markdown
13
+ License-File: LICENSE
14
+ Requires-Dist: dtu_config<0.3.0,>=0.2.0
15
+ Requires-Dist: lxml>=4
16
+ Requires-Dist: netcdf4>=1.5
17
+ Requires-Dist: numpy>=1.23
18
+ Requires-Dist: packaging>=22
19
+ Requires-Dist: pandas>=2
20
+ Requires-Dist: pyproj>=3.4
21
+ Requires-Dist: scipy>=1.9
22
+ Requires-Dist: shapely>=2
23
+ Requires-Dist: xarray>=2023
24
+ Requires-Dist: rioxarray>=0.15
13
25
  Provides-Extra: plots
26
+ Requires-Dist: matplotlib>=3.6; extra == "plots"
27
+ Requires-Dist: plotly>=5.12; extra == "plots"
28
+ Requires-Dist: kaleido>=0.2; extra == "plots"
14
29
  Provides-Extra: geospatial
15
- License-File: LICENSE
30
+ Requires-Dist: geopandas>=0.12; extra == "geospatial"
31
+ Requires-Dist: rasterio>=1; extra == "geospatial"
32
+ Requires-Dist: rtree; extra == "geospatial"
16
33
 
17
34
  # WindKit
18
35
 
@@ -51,6 +51,8 @@ extensions = [
51
51
  "nbsphinx",
52
52
  # to include notebooks outside the docs folder
53
53
  "nbsphinx_link",
54
+ "IPython.sphinxext.ipython_directive",
55
+ "IPython.sphinxext.ipython_console_highlighting",
54
56
  # Process markdown
55
57
  "myst_parser",
56
58
  ]
@@ -35,6 +35,7 @@ Contact
35
35
  windkit
36
36
  wind_climate_objects
37
37
  topographic_data
38
+ wind_turbines
38
39
  plotting
39
40
  map_conversion
40
41
 
@@ -81,4 +81,9 @@ Plotting dependencies (optional):
81
81
  - `plotly <https://plotly.com/python/>`__
82
82
 
83
83
  Optional dependencies:
84
+ - `numba <https://numba.pydata.org/>`__ (Used to speed up some functions)
84
85
  - `earthengine-api <https://developers.google.com/earth-engine/guides/python_install>`__ (Google Earth Engine: provides access to geospatial data from google. Non-commercial uses only.)
86
+ - `planetary-computer <https://pypi.org/project/planetary-computer/>`_ (Microsoft Planetary Computer: provides access to geospatial and atmospheric data from Microsoft. Terms of use apply.)
87
+ - `pystac-client <https://pystac-client.readthedocs.io/en/stable/>`_ (Used to access SpatioTemporal Asset Catalogs (STAC) data on Microsofts Planetary Computer)
88
+ - `fsspec <https://filesystem-spec.readthedocs.io/en/latest/>`_ (Used for accessing ERA5 data from the Planetary Computer)
89
+ - `adlfs <https://pypi.org/project/adlfs/>`_ (Used for accessing ERA5 data from the Planetary Computer)
@@ -14,7 +14,7 @@ The ``windkit`` module contains several modules for reading and writing WAsP spe
14
14
  Wind Climate objects
15
15
  --------------------
16
16
 
17
- WAsP works with a number of different :ref:`wind_climates`, which each have their own API. All wind climates have an xarray.Dataset backend, and the binned wind climate (**bwc**) and generalized wind climate (**gwc**) have `dataset accessors <http://xarray.pydata.org/en/stable/internals.html#extending-xarray>`_ that can be used to provide wind specific calculations.
17
+ WAsP works with a number of different :ref:`wind_climates`, which each have their own API. All wind climates have an ``xarray.Dataset`` backend that can be used to provide wind specific calculations.
18
18
 
19
19
  .. autosummary::
20
20
  :toctree: wc_autogen
@@ -38,6 +38,7 @@ Tools to work with windkit wind climate objects.
38
38
  weibull
39
39
  wind
40
40
  wind_climate
41
+ wind_data
41
42
 
42
43
  .. _topographic_data_api:
43
44
 
@@ -113,6 +114,30 @@ WindKit Plotting allows you to execute a number of different plotting functions
113
114
  plot.color
114
115
  plot.landcover_map
115
116
 
117
+ .. _wind_turbine_api:
118
+
119
+ Windkit's wind turbine API has routines to load both wind turbine generator power curves, and to create layouts of wind farms.
120
+
121
+ .. autosummary::
122
+ :toctree: wind_turbine_autogen
123
+
124
+ wind_turbine_generator
125
+ wind_turbines
126
+
127
+ .. _ltc_api:
128
+
129
+ Long Term Correction
130
+ --------------------
131
+
132
+ Windkit allows to perform long term correction for wind time series using linear regresion or the variance ratio method.
133
+
134
+ .. autosummary::
135
+ :toctree: ltc_autogen
136
+
137
+ ltc.mcp
138
+ ltc.regression
139
+ ltc.scores
140
+
116
141
  .. _other_data_api:
117
142
 
118
143
  Other data
@@ -124,7 +149,6 @@ Additional windkit functions.
124
149
  :toctree: other_autogen
125
150
 
126
151
  empty
127
- wind_turbine
128
152
  workspace
129
153
 
130
154
  .. _metadata_handling_api:
@@ -60,7 +60,17 @@ Topographic Data Download
60
60
  -------------------------
61
61
 
62
62
  WindKit provides an interface to the `Google Earth Engine
63
- <https://earthengine.google.com/>`_, which provides several land cover and elevation datasets for download. These can be accessed run through the :py:mod:`windkit.get_map.get_ee_map` function.
63
+ <https://earthengine.google.com/>`_ and `Microsofts Planetary Computer <https://planetarycomputer.microsoft.com/>`_, through the :py:func:`windkit.get_map` function, which provides several land cover and elevation datasets for download.
64
64
 
65
- .. note:: :py:func:`windkit.get_map.get_ee_map` is not imported by default as it relies on the `earthengine-api
66
- <https://developers.google.com/earth-engine/guides/python_install>`_, which is not a dependency and needs to be installed if you wish to use this functionality. Additionally you will need to sign up for a Google Account, and accept their terms of service for the Google Earth Engine.
65
+ .. note:: To acces the Earth Engine Platform, :py:func:`windkit.get_map` relies on the `earthengine-api
66
+ <https://developers.google.com/earth-engine/guides/python_install>`_, which is an optional dependency and needs to be installed if you wish to use this functionality.
67
+
68
+ Additionally you will need to sign up for a Google Account, and accept their terms of service for the Google Earth Engine.
69
+
70
+ Similarly, to access Microsofts Planetary Computer Platform, you will need to install the optional dependencies `planetary-computer <https://pypi.org/project/planetary-computer/>`_ and `pystac_client <https://pystac-client.readthedocs.io/en/stable/>`_.
71
+
72
+ Please read the terms of service for both platforms before using download and using data from these platforms.
73
+
74
+ `Earth Engine Terms of service <https://earthengine.google.com/terms/>`_
75
+
76
+ `Microsofts Planetary Computer terms of service <https://planetarycomputer.microsoft.com/terms>`_