windmapper 2.2.1__tar.gz → 2.2.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.
- {windmapper-2.2.1 → windmapper-2.2.2}/PKG-INFO +1 -1
- {windmapper-2.2.1 → windmapper-2.2.2}/pyproject.toml +2 -1
- windmapper-2.2.2/src/windmapper/__init__.py +2 -0
- windmapper-2.2.1/windmapper.py → windmapper-2.2.2/src/windmapper/windmapper_cli.py +13 -8
- {windmapper-2.2.1/scripts → windmapper-2.2.2/src/windmapper/windmapper_utls}/rio_merge.py +4 -3
- {windmapper-2.2.1 → windmapper-2.2.2}/.github/workflows/main.yml +0 -0
- {windmapper-2.2.1 → windmapper-2.2.2}/.gitignore +0 -0
- {windmapper-2.2.1 → windmapper-2.2.2}/.readthedocs.yml +0 -0
- {windmapper-2.2.1 → windmapper-2.2.2}/CMakeLists.txt +0 -0
- {windmapper-2.2.1 → windmapper-2.2.2}/LICENSE +0 -0
- {windmapper-2.2.1 → windmapper-2.2.2}/MANIFEST.in +0 -0
- {windmapper-2.2.1 → windmapper-2.2.2}/README.md +0 -0
- {windmapper-2.2.1 → windmapper-2.2.2}/build.rst +0 -0
- {windmapper-2.2.1 → windmapper-2.2.2}/cfg/cli_massSolver.cfg +0 -0
- {windmapper-2.2.1 → windmapper-2.2.2}/proj.ipynb +0 -0
- {windmapper-2.2.1 → windmapper-2.2.2}/publish.sh +0 -0
- {windmapper-2.2.1 → windmapper-2.2.2}/spack-deploy.yaml +0 -0
- {windmapper-2.2.1/pysrc → windmapper-2.2.2/src/windmapper}/windmapper_utls/MPI_call_WN_1dir.py +0 -0
- {windmapper-2.2.1/pysrc → windmapper-2.2.2/src/windmapper}/windmapper_utls/__init__.py +0 -0
- {windmapper-2.2.1 → windmapper-2.2.2}/write_WN_config.py +0 -0
|
@@ -4,7 +4,7 @@ build-backend = "scikit_build_core.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "windmapper"
|
|
7
|
-
version = "2.2.
|
|
7
|
+
version = "2.2.2"
|
|
8
8
|
authors = [
|
|
9
9
|
{name="Chris Marsh"}
|
|
10
10
|
]
|
|
@@ -31,3 +31,4 @@ sdist.exclude = ["examples", "docs", "_config.yml", "dist"]
|
|
|
31
31
|
|
|
32
32
|
[project.scripts]
|
|
33
33
|
windmapper = "windmapper:main"
|
|
34
|
+
|
|
@@ -29,7 +29,7 @@ import itertools
|
|
|
29
29
|
from tqdm import tqdm
|
|
30
30
|
import cloudpickle
|
|
31
31
|
from mpi4py import MPI
|
|
32
|
-
import windmapper_utls as wm
|
|
32
|
+
from . import windmapper_utls as wm
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
|
|
@@ -60,17 +60,19 @@ def main():
|
|
|
60
60
|
|
|
61
61
|
# path to Wind Ninja executable
|
|
62
62
|
|
|
63
|
-
# default path assumes
|
|
64
|
-
wn_exe =
|
|
65
|
-
os.path.dirname(
|
|
66
|
-
os.path.abspath(__file__)), 'WindNinja_cli')
|
|
63
|
+
# default path assumes that WN is on $PATH
|
|
64
|
+
wn_exe = shutil.which('WindNinja_cli')
|
|
67
65
|
|
|
68
66
|
if hasattr(X, 'wn_exe'):
|
|
69
67
|
wn_exe = X.wn_exe
|
|
70
68
|
|
|
71
69
|
if not os.path.exists(wn_exe):
|
|
72
|
-
|
|
73
|
-
|
|
70
|
+
if hasattr(X, 'wn_exe'):
|
|
71
|
+
print('ERROR: Path to WindNinja_cli not found. Confirm `wn_exe` config option is correct.')
|
|
72
|
+
print(f'Path = {wn_exe}')
|
|
73
|
+
else:
|
|
74
|
+
print(
|
|
75
|
+
'ERROR: WindNinja_cli not found on $PATH. Ensure it is is or Consider specifying a `wn_exe` config option')
|
|
74
76
|
exit(-1)
|
|
75
77
|
|
|
76
78
|
MPI_exec_str = None
|
|
@@ -606,13 +608,16 @@ write_farsite_atm = false """
|
|
|
606
608
|
# Because the above parallel windmap generation produces small chunks of the domain with partial overlap, they need to merged into a single tif
|
|
607
609
|
# that removes this overlap
|
|
608
610
|
nwind = np.arange(0, 360., delta_wind)
|
|
611
|
+
rio_merge_path = os.path.join(os.path.join(os.path.dirname(wm.__file__),
|
|
612
|
+
'rio_merge.py'))
|
|
613
|
+
|
|
609
614
|
with tqdm(total=len(nwind)) as pbar:
|
|
610
615
|
for wdir in nwind:
|
|
611
616
|
for var in list_tif_2_vrt:
|
|
612
617
|
|
|
613
618
|
name_tif = user_output_dir + name_utm + '_' + str(int(wdir)) + '_' + var
|
|
614
619
|
cmd = "find " + user_output_dir[0:-1] + " -type f -name '*_" + str(int(wdir)) + "_10_" + str(
|
|
615
|
-
res_wind) + "m_" + var + "*.tif' -exec
|
|
620
|
+
res_wind) + "m_" + var + "*.tif' -exec " + sys.executable + " " + rio_merge_path + " " + name_tif + '.tmp.tif' + " {} +"
|
|
616
621
|
subprocess.check_call([cmd], stdout=subprocess.PIPE,
|
|
617
622
|
shell=True)
|
|
618
623
|
|
|
@@ -41,9 +41,7 @@ def copy_mean(merged_data, new_data, merged_mask, new_mask, index, **kwargs):
|
|
|
41
41
|
# dst, src, <...>
|
|
42
42
|
np.copyto(merged_data, m.data, where=mask, casting="unsafe")
|
|
43
43
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
if __name__ == '__main__':
|
|
44
|
+
def main():
|
|
47
45
|
files = []
|
|
48
46
|
|
|
49
47
|
outfile = sys.argv[1]
|
|
@@ -63,3 +61,6 @@ if __name__ == '__main__':
|
|
|
63
61
|
with rio.open(outfile, "w", **out_meta) as dest1:
|
|
64
62
|
dest1.write(dest)
|
|
65
63
|
|
|
64
|
+
if __name__ == '__main__':
|
|
65
|
+
main()
|
|
66
|
+
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{windmapper-2.2.1/pysrc → windmapper-2.2.2/src/windmapper}/windmapper_utls/MPI_call_WN_1dir.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|