windmapper 2.1.16__tar.gz → 2.2.1__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 (30) hide show
  1. windmapper-2.2.1/.github/workflows/main.yml +163 -0
  2. {windmapper-2.1.16 → windmapper-2.2.1}/.gitignore +4 -1
  3. windmapper-2.2.1/.readthedocs.yml +24 -0
  4. windmapper-2.2.1/CMakeLists.txt +24 -0
  5. windmapper-2.2.1/PKG-INFO +36 -0
  6. windmapper-2.2.1/README.md +18 -0
  7. windmapper-2.2.1/build.rst +72 -0
  8. windmapper-2.2.1/proj.ipynb +49 -0
  9. windmapper-2.2.1/publish.sh +17 -0
  10. windmapper-2.2.1/pyproject.toml +33 -0
  11. windmapper-2.2.1/spack-deploy.yaml +6 -0
  12. windmapper-2.2.1/write_WN_config.py +55 -0
  13. windmapper-2.1.16/CMakeLists.txt +0 -70
  14. windmapper-2.1.16/PKG-INFO +0 -20
  15. windmapper-2.1.16/README.md +0 -17
  16. windmapper-2.1.16/pyproject.toml +0 -4
  17. windmapper-2.1.16/pysrc/windmapper.egg-info/PKG-INFO +0 -20
  18. windmapper-2.1.16/pysrc/windmapper.egg-info/SOURCES.txt +0 -17
  19. windmapper-2.1.16/pysrc/windmapper.egg-info/dependency_links.txt +0 -1
  20. windmapper-2.1.16/pysrc/windmapper.egg-info/requires.txt +0 -9
  21. windmapper-2.1.16/pysrc/windmapper.egg-info/top_level.txt +0 -1
  22. windmapper-2.1.16/setup.cfg +0 -4
  23. windmapper-2.1.16/setup.py +0 -98
  24. {windmapper-2.1.16 → windmapper-2.2.1}/LICENSE +0 -0
  25. {windmapper-2.1.16 → windmapper-2.2.1}/MANIFEST.in +0 -0
  26. {windmapper-2.1.16 → windmapper-2.2.1}/cfg/cli_massSolver.cfg +0 -0
  27. {windmapper-2.1.16 → windmapper-2.2.1}/pysrc/windmapper_utls/MPI_call_WN_1dir.py +0 -0
  28. {windmapper-2.1.16 → windmapper-2.2.1}/pysrc/windmapper_utls/__init__.py +0 -0
  29. {windmapper-2.1.16 → windmapper-2.2.1}/scripts/rio_merge.py +0 -0
  30. {windmapper-2.1.16 → windmapper-2.2.1}/windmapper.py +0 -0
@@ -0,0 +1,163 @@
1
+ # This is a basic workflow to help you get started with Actions
2
+
3
+ name: CI
4
+
5
+ # Controls when the action will run.
6
+ on:
7
+ # Triggers the workflow on push or pull request events but only for the stable/proj7 branch
8
+ push:
9
+ pull_request:
10
+ schedule:
11
+ - cron: '0 0 * * 0' # run every week
12
+
13
+ # Allows you to run this workflow manually from the Actions tab
14
+ workflow_dispatch:
15
+
16
+ env:
17
+ MAKEFLAGS: "-j2"
18
+ CONAN_BASE_PROFILE: "chm_no_mpi"
19
+
20
+ # A workflow run is made up of one or more jobs that can run sequentially or in parallel
21
+ jobs:
22
+
23
+
24
+ # This workflow contains a single job called "build"
25
+ build:
26
+ # The type of runner that the job will run on
27
+ runs-on: ${{ matrix.cfg.os }}
28
+
29
+ # Conda needs a login shell so set this as the default
30
+ # however it will cause non-conda macos python runs to fail as the wrong
31
+ # python is picked up, see this bug report
32
+ # https://github.com/actions/setup-python/issues/132
33
+ # The work around is to put the following before any shell runs
34
+ # export PATH="$pythonLocation:$PATH"
35
+ # however this won't fix pip so all pip invocations need to be
36
+ # pytho -m pip
37
+ defaults:
38
+ run:
39
+ shell: bash -l {0}
40
+
41
+ strategy:
42
+ fail-fast: false
43
+ matrix:
44
+ python-version: [ 3.8 ]
45
+ test-conda: [ "sys-python" ] #"conda-python",
46
+
47
+
48
+ cfg:
49
+ - {os: "ubuntu-20.04", compiler: "gcc", version: 9}
50
+ - {os: "ubuntu-22.04", compiler: "gcc", version: 11}
51
+ - {os: "macos-13", compiler: "apple-clang", version: "14.0"}
52
+
53
+
54
+ # Steps represent a sequence of tasks that will be executed as part of the job
55
+ steps:
56
+
57
+ # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
58
+ - uses: actions/checkout@v2
59
+
60
+ - uses: FranzDiebold/github-env-vars-action@v2
61
+
62
+ - name: Setup Python ${{ matrix.python-version }}
63
+ if: ${{ matrix.test-conda == 'sys-python' }}
64
+ uses: actions/setup-python@v2
65
+ with:
66
+ python-version: ${{ matrix.python-version }}
67
+
68
+ - name: Setup Conda ${{ matrix.python-version }}
69
+ uses: conda-incubator/setup-miniconda@v2
70
+ if: ${{ matrix.test-conda == 'conda-python' }}
71
+ with:
72
+ activate-environment: mesher-env
73
+ python-version: ${{ matrix.python-version }}
74
+
75
+ - name: Install dependencies
76
+ run: |
77
+ export PATH="$pythonLocation:$PATH"
78
+ python -m pip install twine
79
+ python -m pip install scikit-build>=0.10.0
80
+ python -m pip install ninja
81
+ python -m pip install wheel
82
+ python -m pip install build
83
+
84
+ - name: Install linux dependencies
85
+ if: startsWith( matrix.cfg.os, 'ubuntu' )
86
+ env:
87
+ UBUNTU_VER: ${{ matrix.cfg.os }}
88
+ run: |
89
+ export PATH="$pythonLocation:$PATH"
90
+ sudo apt-get update
91
+ sudo apt-get install libgdal-dev
92
+ sudo apt-get install gdal-bin
93
+ sudo apt-get install libboost-all-dev
94
+ sudo apt-get install python3-gdal
95
+
96
+
97
+ - name: Install macos dependencies
98
+ if: startsWith( matrix.cfg.os, 'macos' )
99
+ run: |
100
+ export PATH="$pythonLocation:$PATH"
101
+ brew install gdal
102
+ brew install boost
103
+ brew install open-mpi
104
+
105
+ - name: env linux
106
+ if: startsWith( matrix.cfg.os, 'ubuntu' )
107
+ uses: allenevans/set-env@v2.0.0
108
+ with:
109
+ CONAN_GCC_VERSIONS: ${{ matrix.cfg.version }}
110
+ CC: gcc-${{ matrix.cfg.version }}
111
+ CXX: g++-${{ matrix.cfg.version }}
112
+ FC: gfortran-${{ matrix.cfg.version }}
113
+ GFORTRAN_NAME: gfortran-${{ matrix.cfg.version }}
114
+
115
+ - name: env macos
116
+ if: startsWith( matrix.cfg.os, 'macos' )
117
+ uses: allenevans/set-env@v2.0.0
118
+ with:
119
+ CONAN_APPLE_CLANG_VERSIONS: ${{ matrix.cfg.version }}
120
+ FC: gfortran-11
121
+ GFORTRAN_NAME: gfortran-11 # set the name to use for gfortran as we need to use gfotran-<version>
122
+
123
+ - name: Set envar
124
+ uses: allenevans/set-env@v2.0.0
125
+ with:
126
+ TEST_CONDA: ${{ matrix.test-conda }}
127
+
128
+ - name: Deploy
129
+ run: |
130
+ export PATH="$pythonLocation:$PATH"
131
+ if [ "$TEST_CONDA" = "sys-python" ]; then
132
+
133
+ if [ "$RUNNER_OS" = "macOS" ]; then
134
+ python -m build
135
+ else
136
+ python -m build --sdist #no binary wheels on linux at the moment as we link against non PEP0513 .so
137
+ #https://www.python.org/dev/peps/pep-0513/
138
+ fi
139
+
140
+ if [[ $CI_REF_NAME == "stable/"* ]]; then
141
+ twine upload --skip-existing dist/*
142
+ else
143
+ echo "Branch $CI_REF_NAME is not stable/*"
144
+ fi
145
+ fi
146
+ env:
147
+ TWINE_PASSWORD: ${{secrets.TWINE_PASSWORD}}
148
+ TWINE_USERNAME: ${{secrets.TWINE_USERNAME}}
149
+
150
+ - name: Install and test
151
+ run: |
152
+ if [[ $CI_REF_NAME == "stable/"* ]]; then
153
+ export PATH="$pythonLocation:$PATH"
154
+ python -m pip install windmapper --no-cache
155
+
156
+ if [ "$RUNNER_OS" = "macOS" ]; then
157
+ python -m pip install --no-cache-dir --force-reinstall gdal[numpy]
158
+ fi
159
+
160
+ cd examples/existing_DEM
161
+ windmapper.py param_existing_DEM.py
162
+ fi
163
+
@@ -11,4 +11,7 @@ build/
11
11
  MANIFEST
12
12
  dist/
13
13
  *.egg-info
14
- _skbuild/
14
+ _skbuild/
15
+ /spack-deploy/*
16
+ /dist/*
17
+ /implimentation/*
@@ -0,0 +1,24 @@
1
+ # .readthedocs.yml
2
+ # Read the Docs configuration file
3
+ # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
4
+
5
+ # Required
6
+ version: 2
7
+
8
+ build:
9
+ os: ubuntu-22.04
10
+ tools:
11
+ python: "3.12"
12
+
13
+ # Build documentation in the docs/ directory with Sphinx
14
+ sphinx:
15
+ configuration: docs/conf.py
16
+
17
+ # Optionally build your docs in additional formats such as PDF
18
+ formats:
19
+ - htmlzip
20
+
21
+ # Optionally set the version of Python and requirements required to build your docs
22
+ python:
23
+ install:
24
+ - requirements: docs/requirements.txt
@@ -0,0 +1,24 @@
1
+ cmake_minimum_required(VERSION 3.16)
2
+ project(windmapper)
3
+
4
+ if( "$ENV{BUILD_WINDNINJA}")
5
+ file(
6
+ DOWNLOAD
7
+ https://github.com/cpm-cmake/CPM.cmake/releases/download/v0.38.3/CPM.cmake
8
+ ${CMAKE_CURRENT_BINARY_DIR}/cmake/CPM.cmake
9
+ EXPECTED_HASH SHA256=cc155ce02e7945e7b8967ddfaff0b050e958a723ef7aad3766d368940cb15494
10
+ )
11
+ include(${CMAKE_CURRENT_BINARY_DIR}/cmake/CPM.cmake)
12
+
13
+ CPMAddPackage(
14
+ NAME WindNinja
15
+ GITHUB_REPOSITORY firelab/windninja
16
+ GIT_TAG 3.11.2
17
+ OPTIONS
18
+ "NINJA_QTGUI FALSE"
19
+ "NINJAFOAM FALSE"
20
+ "OPENMP_SUPPORT FALSE"
21
+ "CMAKE_CXX_STANDARD 11"
22
+ )
23
+
24
+ endif()
@@ -0,0 +1,36 @@
1
+ Metadata-Version: 2.1
2
+ Name: windmapper
3
+ Version: 2.2.1
4
+ Summary: Windfield library generation
5
+ Author: Chris Marsh
6
+ Project-URL: Homepage, https://github.com/Chrismarsh/Windmapper
7
+ Requires-Python: >=3.7
8
+ Requires-Dist: numpy
9
+ Requires-Dist: scipy
10
+ Requires-Dist: elevation
11
+ Requires-Dist: pyproj
12
+ Requires-Dist: tqdm
13
+ Requires-Dist: rasterio
14
+ Requires-Dist: cloudpickle
15
+ Requires-Dist: gdal[numpy]
16
+ Requires-Dist: mpi4py
17
+ Description-Content-Type: text/markdown
18
+
19
+ # Windmapper
20
+
21
+ Windmapper is a python tool and a set of algorithms for producing and using pre-computed libraries of wind field used for wind downscaling.
22
+
23
+ ![](docs/images/WM-main.png)
24
+
25
+ # Installation
26
+
27
+ The default ``pip install windmapper`` will build windmapper without Windninja. However Windninja is required to run.
28
+
29
+ To build Windninja, ensure gdal, boost, and mpi system libraries are installed and then
30
+
31
+ ``BUILD_WINDNINJA=1 pip install windmapper``
32
+
33
+ Spack can also be used to install windmapper -- please see documentation below.
34
+
35
+ # Documentation
36
+ Documentation and full instructions on use can be found [here](https://windmapper.readthedocs.io)
@@ -0,0 +1,18 @@
1
+ # Windmapper
2
+
3
+ Windmapper is a python tool and a set of algorithms for producing and using pre-computed libraries of wind field used for wind downscaling.
4
+
5
+ ![](docs/images/WM-main.png)
6
+
7
+ # Installation
8
+
9
+ The default ``pip install windmapper`` will build windmapper without Windninja. However Windninja is required to run.
10
+
11
+ To build Windninja, ensure gdal, boost, and mpi system libraries are installed and then
12
+
13
+ ``BUILD_WINDNINJA=1 pip install windmapper``
14
+
15
+ Spack can also be used to install windmapper -- please see documentation below.
16
+
17
+ # Documentation
18
+ Documentation and full instructions on use can be found [here](https://windmapper.readthedocs.io)
@@ -0,0 +1,72 @@
1
+ wind_mapper
2
+ ===========
3
+
4
+ Wind_mapper is a tool used to produce pre-computed libraries of wind
5
+ field used for wind downscaling. Wind_mapper uses the
6
+ `WindNinja <https://github.com/firelab/windninja>`__ wind diagnostic
7
+ model. It has been primarily developped for wind downscaling for the
8
+ Canadian Hydrological Model `CHM <https://github.com/Chrismarsh/CHM>`__.
9
+
10
+ Installation
11
+ ============
12
+
13
+ Base
14
+ ----
15
+
16
+ WindMapper requires a python environment with the following packages
17
+ installed:
18
+
19
+ - gdal
20
+ - pyproj
21
+ - numpy
22
+ - scipy
23
+
24
+ It’s recommended these are installed in a virtual environment.
25
+
26
+ MacOS
27
+ -----
28
+
29
+ On macos, the gdal binaries should be installed from homebrew
30
+
31
+ ::
32
+
33
+ brew install gdal
34
+
35
+ and then the corresponding gdal-python package installed at the
36
+ corresponding version. For example:
37
+
38
+ ::
39
+
40
+ pip install gdal==2.4.2
41
+
42
+ WindNinja
43
+ ---------
44
+
45
+ WindMapper depends upon WindNinja. This can be compiled from source, or
46
+ can be installed via conan.
47
+
48
+ .. _macos-1:
49
+
50
+ MacOs
51
+ ~~~~~
52
+
53
+ Currently the MacOS OpenMP build of WindNinja does not work
54
+ https://github.com/firelab/windninja/issues/355
55
+
56
+ Use
57
+ ===
58
+
59
+ Ensure the paths ``fic_config_WN`` and ``wn_exe`` are correctly set in
60
+ the configuration file.
61
+
62
+ WindMapper may be run in two modes:
63
+
64
+ 1) download a SRTM tile that corresponds to a lat/long bounding box
65
+ defined by the user or;
66
+ 2) use a user-supplied DEM
67
+
68
+ The example given in ``examples/download_DEM`` can be run as
69
+
70
+ ::
71
+
72
+ python wind_mapper_generic.py examples/download_DEM/param_download_DEM.py
@@ -0,0 +1,49 @@
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "code",
5
+ "execution_count": 1,
6
+ "metadata": {
7
+ "collapsed": true,
8
+ "pycharm": {
9
+ "name": "#%%\n"
10
+ }
11
+ },
12
+ "outputs": [
13
+ {
14
+ "name": "stdout",
15
+ "output_type": "stream",
16
+ "text": [
17
+ "Warning: ecCodes 2.22.0 or higher is recommended. You are running version 2.20.0\n"
18
+ ]
19
+ }
20
+ ],
21
+ "source": [
22
+ "import xarray as xr\n",
23
+ "import numpy as np\n",
24
+ "import rasterio as rio"
25
+ ]
26
+ }
27
+ ],
28
+ "metadata": {
29
+ "kernelspec": {
30
+ "name": "snowcast",
31
+ "language": "python",
32
+ "display_name": "snowcast"
33
+ },
34
+ "language_info": {
35
+ "codemirror_mode": {
36
+ "name": "ipython",
37
+ "version": 2
38
+ },
39
+ "file_extension": ".py",
40
+ "mimetype": "text/x-python",
41
+ "name": "python",
42
+ "nbconvert_exporter": "python",
43
+ "pygments_lexer": "ipython2",
44
+ "version": "2.7.6"
45
+ }
46
+ },
47
+ "nbformat": 4,
48
+ "nbformat_minor": 0
49
+ }
@@ -0,0 +1,17 @@
1
+ set -e
2
+ . ~/Documents/science/code/spack/share/spack/setup-env.sh
3
+ #setup build env
4
+ spack env create -d spack-deploy spack-deploy.yaml
5
+ spack env activate spack-deploy
6
+ spack install
7
+
8
+
9
+ #build current version
10
+ python -m build --sdist
11
+ rm -f dist/*.whl # we don't want to upload these
12
+ twine upload dist/* --skip-existing
13
+
14
+ #clean up
15
+ spack env deactivate
16
+ rm -rf spack-deploy
17
+ rm -rf dist
@@ -0,0 +1,33 @@
1
+ [build-system]
2
+ requires = ["scikit-build-core"]
3
+ build-backend = "scikit_build_core.build"
4
+
5
+ [project]
6
+ name = "windmapper"
7
+ version = "2.2.1"
8
+ authors = [
9
+ {name="Chris Marsh"}
10
+ ]
11
+ description ="""Windfield library generation"""
12
+ readme = "README.md"
13
+ requires-python = ">=3.7"
14
+ dependencies = [
15
+ 'numpy',
16
+ 'scipy',
17
+ 'elevation',
18
+ 'pyproj',
19
+ 'tqdm',
20
+ 'rasterio',
21
+ 'cloudpickle',
22
+ 'gdal[numpy]',
23
+ 'mpi4py',
24
+ ]
25
+
26
+ [project.urls]
27
+ Homepage = "https://github.com/Chrismarsh/Windmapper"
28
+
29
+ [tool.scikit-build]
30
+ sdist.exclude = ["examples", "docs", "_config.yml", "dist"]
31
+
32
+ [project.scripts]
33
+ windmapper = "windmapper:main"
@@ -0,0 +1,6 @@
1
+ spack:
2
+ specs:
3
+ - py-pip
4
+ - py-build
5
+ - py-twine
6
+ view: ./venv-mesher-deploy
@@ -0,0 +1,55 @@
1
+ #!/usr/bin/env python
2
+ import numpy as np
3
+ import os
4
+
5
+ # Write a text file containing information on the WN maps used as input to mesher
6
+
7
+ # Directory where are stored to WN maps
8
+ dir_wind = '/home/vvionnet/data3/Run_WindNinja/WN_Lajoie/param_lajoie'
9
+
10
+ # Direcrtory where are stored mesher command
11
+ dir_mesh = '/home/vvionnet/snow_models/mesher/lajoie_srtm'
12
+
13
+ # Name of the wind maps:
14
+ name_run_WN = 'ref-DEM-utm'
15
+
16
+ # Number of wind maps to be used
17
+ ncat = 12
18
+
19
+ ############################
20
+ #No change after these lines
21
+ ############################
22
+
23
+ # Angle between each wind maps
24
+ delta_wind = 360/ncat
25
+
26
+ list_wind = np.arange(0,360,delta_wind)
27
+
28
+ # List of variables to be inclused in mesher
29
+ list_var = ['U','V','spd_up']
30
+
31
+ dic_suffix = {'U':'_U','V':'_V','spd_up':''}
32
+
33
+ # File containing results
34
+ fic_res = dir_mesh+"/config_WN.txt"
35
+
36
+ if(os.path.isfile(fic_res)):
37
+ os.remove(fic_res)
38
+
39
+ file1 = open(fic_res,"w")
40
+
41
+ for ii,ww in enumerate(list_wind):
42
+
43
+ if(ii==0):
44
+ ii=ncat
45
+
46
+ for var in list_var:
47
+ ll = "'Ninja"+str(ii)+dic_suffix[var]+"' : {'file':'"+dir_wind+"/"+name_run_WN+"_"+str(int(ww))+"_"+var+".vrt','method':'mean'}, \n"
48
+ file1.write(ll)
49
+
50
+ file1.write("\n")
51
+
52
+
53
+
54
+
55
+
@@ -1,70 +0,0 @@
1
- cmake_minimum_required(VERSION 3.16)
2
- project(windmapper)
3
- find_package(PythonExtensions REQUIRED)
4
- file(
5
- DOWNLOAD
6
- https://github.com/cpm-cmake/CPM.cmake/releases/download/v0.38.3/CPM.cmake
7
- ${CMAKE_CURRENT_BINARY_DIR}/cmake/CPM.cmake
8
- EXPECTED_HASH SHA256=cc155ce02e7945e7b8967ddfaff0b050e958a723ef7aad3766d368940cb15494
9
- )
10
- include(${CMAKE_CURRENT_BINARY_DIR}/cmake/CPM.cmake)
11
-
12
- if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
13
- set(CONAN_LIB_STD "libstdc++11")
14
- message(STATUS "Detected gnu compiler, setting compiler.libcxx=${CONAN_LIB_STD}")
15
- elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang")
16
- set(CONAN_LIB_STD "libc++")
17
- message(STATUS "Detected clang compiler, setting compiler.libcxx=${CONAN_LIB_STD}")
18
- endif ()
19
-
20
-
21
-
22
- CPMAddPackage(
23
- NAME WindNinja
24
- GITHUB_REPOSITORY Chrismarsh/windninja
25
- GIT_TAG 3.9.5
26
- OPTIONS
27
- "NINJA_QTGUI FALSE"
28
- "NINJAFOAM FALSE"
29
- "OPENMP_SUPPORT FALSE"
30
- "CMAKE_CXX_STANDARD 11"
31
- )
32
-
33
- # MACRO(SUBDIRLIST result curdir)
34
- # FILE(GLOB children RELATIVE ${curdir} ${curdir}/*)
35
- # SET(dirlist "")
36
- # FOREACH(child ${children})
37
- # IF(IS_DIRECTORY ${curdir}/${child})
38
- # LIST(APPEND dirlist ${child})
39
- # ENDIF()
40
- # ENDFOREACH()
41
- # SET(${result} ${dirlist})
42
- # ENDMACRO()
43
-
44
- # message(STATUS ${CMAKE_INSTALL_PREFIX})
45
- # SUBDIRLIST(SUBDIRS ${CMAKE_INSTALL_PREFIX})
46
- # FOREACH(subdir ${SUBDIRS})
47
- # message(STATUS "hi -- ${subdir}")
48
- # ENDFOREACH()
49
-
50
- # message(STATUS ${PYTHON_PREFIX})
51
- # SUBDIRLIST(SUBDIRS ${PYTHON_PREFIX})
52
-
53
-
54
- # file(COPY ${WindNinja_BINARY_DIR}/lib/ DESTINATION ${PYTHON_PREFIX}/bin/lib/)
55
- # file(COPY ${CMAKE_INSTALL_PREFIX}/share/ DESTINATION ${PYTHON_PREFIX}/bin/share/)
56
- # file(COPY ${CMAKE_INSTALL_PREFIX}/bin/WindNinja_cli DESTINATION ${PYTHON_PREFIX}/bin/bin/)
57
-
58
-
59
- # This approach won't work for installing outside of cmake install root
60
-
61
-
62
- # DESTINATION ${PYTHON_PREFIX}/bin/lib/
63
-
64
- # install( DIRECTORY ${CMAKE_INSTALL_PREFIX}/share/
65
- # DESTINATION ${PYTHON_PREFIX}/bin/share/
66
- # )
67
- # install( PROGRAMS ${CMAKE_INSTALL_PREFIX}/bin/WindNinja_cli
68
- # DESTINATION ${PYTHON_PREFIX}/bin/bin/
69
- # )
70
- #
@@ -1,20 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: windmapper
3
- Version: 2.1.16
4
- Summary: Windfield library generation
5
- Home-page: https://github.com/Chrismarsh/Windmapper
6
- Author: Chris Marsh
7
- Author-email: chris.marsh@usask.ca
8
- Requires-Python: >=3.6
9
- License-File: LICENSE
10
- Requires-Dist: numpy
11
- Requires-Dist: scipy
12
- Requires-Dist: elevation
13
- Requires-Dist: pyproj
14
- Requires-Dist: tqdm
15
- Requires-Dist: rasterio
16
- Requires-Dist: mpi4py
17
- Requires-Dist: cloudpickle
18
- Requires-Dist: pygdal==3.4.1.*
19
-
20
- Generates windfields
@@ -1,17 +0,0 @@
1
- # Windmapper
2
-
3
- Windmapper is a python tool and a set of algorithms for producing and using pre-computed libraries of wind field used for wind downscaling.
4
-
5
- ![](docs/images/WM-main.png)
6
-
7
- # Installation
8
- Ensure gdal system libraries are installed and then
9
-
10
- ``pip install windmapper``
11
-
12
- Requires WindNinja to be installed.
13
- To automatically build WindNinja use:
14
- ``BUILD_WINDNINJA=TRUE pip install windmapper``
15
-
16
- # Documentation
17
- Documentation and full instructions on use can be found [here](https://windmapper.readthedocs.io/en/latest/)
@@ -1,4 +0,0 @@
1
- [build-system]
2
- requires = ["setuptools", "build", "wheel", "scikit-build>=0.11.1","ninja", "packaging"]
3
- #conan has an older distro req than scikit-build, so specify conan first to get the correct version
4
- # scikit version required for this https://github.com/scikit-build/scikit-build/issues/488
@@ -1,20 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: windmapper
3
- Version: 2.1.16
4
- Summary: Windfield library generation
5
- Home-page: https://github.com/Chrismarsh/Windmapper
6
- Author: Chris Marsh
7
- Author-email: chris.marsh@usask.ca
8
- Requires-Python: >=3.6
9
- License-File: LICENSE
10
- Requires-Dist: numpy
11
- Requires-Dist: scipy
12
- Requires-Dist: elevation
13
- Requires-Dist: pyproj
14
- Requires-Dist: tqdm
15
- Requires-Dist: rasterio
16
- Requires-Dist: mpi4py
17
- Requires-Dist: cloudpickle
18
- Requires-Dist: pygdal==3.4.1.*
19
-
20
- Generates windfields
@@ -1,17 +0,0 @@
1
- .gitignore
2
- CMakeLists.txt
3
- LICENSE
4
- MANIFEST.in
5
- README.md
6
- pyproject.toml
7
- setup.py
8
- windmapper.py
9
- cfg/cli_massSolver.cfg
10
- pysrc/windmapper.egg-info/PKG-INFO
11
- pysrc/windmapper.egg-info/SOURCES.txt
12
- pysrc/windmapper.egg-info/dependency_links.txt
13
- pysrc/windmapper.egg-info/requires.txt
14
- pysrc/windmapper.egg-info/top_level.txt
15
- pysrc/windmapper_utls/MPI_call_WN_1dir.py
16
- pysrc/windmapper_utls/__init__.py
17
- scripts/rio_merge.py
@@ -1,9 +0,0 @@
1
- numpy
2
- scipy
3
- elevation
4
- pyproj
5
- tqdm
6
- rasterio
7
- mpi4py
8
- cloudpickle
9
- pygdal==3.4.1.*
@@ -1 +0,0 @@
1
- windmapper_utls
@@ -1,4 +0,0 @@
1
- [egg_info]
2
- tag_build =
3
- tag_date = 0
4
-
@@ -1,98 +0,0 @@
1
- import os
2
- import subprocess
3
- from setuptools import find_packages
4
- import packaging.version
5
-
6
- # replace disutils as it is deprecated
7
- #https://github.com/drgarcia1986/simple-settings/pull/281/commits/41a0584d693a17400a1922821533260750be40fa
8
- _MAP = {
9
- 'y': True,
10
- 'yes': True,
11
- 't': True,
12
- 'true': True,
13
- 'on': True,
14
- '1': True,
15
- 'n': False,
16
- 'no': False,
17
- 'f': False,
18
- 'false': False,
19
- 'off': False,
20
- '0': False
21
- }
22
-
23
-
24
- def strtobool(value):
25
- try:
26
- return _MAP[str(value).lower()]
27
- except KeyError:
28
- raise ValueError('"{}" is not a valid bool value'.format(value))
29
-
30
-
31
- build_wn = True
32
- try:
33
- build_wn = strtobool(os.environ['BUILD_WINDNINJA'])
34
- except:
35
- build_wn = True
36
-
37
- print(f'Build WindNinja? {build_wn}')
38
-
39
-
40
- def gdal_dependency():
41
- try:
42
- version = subprocess.run(["gdal-config", "--version"], stdout=subprocess.PIPE).stdout.decode()
43
- version = version.replace('\n', '')
44
-
45
- gdal_depends = ''
46
- if packaging.version.parse(version) >= packaging.version.parse("3.5.0"):
47
- # >= 3.5 required for this type of gdal python binding install
48
- gdal_depends = f'GDAL[numpy]=={version}.*'
49
- else:
50
- gdal_depends = f'pygdal=={version}.*'
51
-
52
- return gdal_depends
53
- except FileNotFoundError as e:
54
- raise(""" ERROR: Could not find the system install of GDAL.
55
- Please install it via your package manage of choice.
56
- """)
57
-
58
-
59
- setup_requires = []
60
-
61
- if build_wn:
62
- from skbuild import setup
63
- from skbuild.exceptions import SKBuildError
64
- from skbuild.cmaker import get_cmake_version
65
-
66
- try:
67
- # Add CMake as a build requirement if cmake is not installed or is too low a version
68
- # https://scikit-build.readthedocs.io/en/latest/usage.html#adding-cmake-as-building-requirement-only-if-not-installed-or-too-low-a-version
69
- if packaging.version.parse(get_cmake_version()) < packaging.version.parse("3.16"):
70
- setup_requires.append('cmake')
71
- except SKBuildError:
72
- setup_requires.append('cmake')
73
-
74
- else:
75
- from setuptools import setup
76
-
77
- args = {'name': 'windmapper',
78
- 'version': '2.1.16',
79
- 'description': 'Windfield library generation',
80
- 'long_description': "Generates windfields",
81
- 'author': 'Chris Marsh',
82
- 'author_email': 'chris.marsh@usask.ca',
83
- 'url': "https://github.com/Chrismarsh/Windmapper",
84
- 'include_package_data': True,
85
- 'packages': find_packages(where="pysrc"),
86
- 'package_dir': {
87
- '': 'pysrc',
88
- },
89
- 'scripts': ["windmapper.py", 'scripts/rio_merge.py', "cfg/cli_massSolver.cfg"],
90
- 'install_requires': ['numpy', 'scipy', 'elevation', 'pyproj', 'tqdm', 'rasterio', 'mpi4py', 'cloudpickle',
91
- gdal_dependency()],
92
- 'setup_requires': setup_requires,
93
- 'python_requires': '>=3.6'}
94
-
95
- if build_wn:
96
- args['cmake_args'] = ['-DCMAKE_BUILD_TYPE=Release']
97
-
98
- setup(**args)
File without changes
File without changes
File without changes