nfdata 0.3.0__tar.gz → 0.3.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.
@@ -1,8 +1,9 @@
1
- Metadata-Version: 2.3
1
+ Metadata-Version: 2.4
2
2
  Name: nfdata
3
- Version: 0.3.0
3
+ Version: 0.3.1
4
4
  Summary: Compile and edit input data for the NanoFASE model
5
5
  License: BSD-3-Clause
6
+ License-File: LICENSE
6
7
  Author: Sam Harrison
7
8
  Author-email: samharrison.xg@gmail.com
8
9
  Requires-Python: >=3.10,<4.0
@@ -12,13 +13,14 @@ Classifier: Programming Language :: Python :: 3.10
12
13
  Classifier: Programming Language :: Python :: 3.11
13
14
  Classifier: Programming Language :: Python :: 3.12
14
15
  Classifier: Programming Language :: Python :: 3.13
16
+ Classifier: Programming Language :: Python :: 3.14
17
+ Classifier: Programming Language :: Python :: 3.15
15
18
  Requires-Dist: Pint (>=0.24.1,<0.25.0)
16
19
  Requires-Dist: f90nml (>=1.4.4,<2.0.0)
17
20
  Requires-Dist: geopandas (>=1.0.0,<2.0.0)
18
21
  Requires-Dist: netcdf4 (>=1.7.1.post1,<2.0.0)
19
22
  Requires-Dist: numpy (>=2.0.0,<3.0.0)
20
23
  Requires-Dist: pandas (>=2.2.2,<3.0.0)
21
- Requires-Dist: pytest (>=8.3.5,<9.0.0)
22
24
  Requires-Dist: rasterio (>=1.3.10,<2.0.0)
23
25
  Requires-Dist: ruamel.yaml (>=0.18.6,<0.19.0)
24
26
  Requires-Dist: shapely (>=2.0.4,<3.0.0)
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "nfdata"
3
- version = "0.3.0"
3
+ version = "0.3.1"
4
4
  description = "Compile and edit input data for the NanoFASE model"
5
5
  authors = ["Sam Harrison <samharrison.xg@gmail.com>"]
6
6
  license = "BSD-3-Clause"
@@ -24,12 +24,12 @@ netcdf4 = "^1.7.1.post1"
24
24
  shapely = "^2.0.4"
25
25
  Pint = "^0.24.1"
26
26
  f90nml = "^1.4.4"
27
- pytest = "^8.3.5"
28
27
  whitebox = "^2.3.6"
29
28
 
30
29
 
31
30
  [tool.poetry.group.dev.dependencies]
32
31
  flake8 = "^7.2.0"
32
+ pytest = "^8.3.5"
33
33
 
34
34
  [build-system]
35
35
  requires = ["poetry-core"]
@@ -229,6 +229,7 @@ class Compiler:
229
229
  self.config['root_dir'])
230
230
  ).resolve()
231
231
  # If we have been asked to condition the DEM, do this first
232
+ temp_dir = None
232
233
  if 'condition_dem' in self.config:
233
234
  dem_path_conditioned, temp_dir = routing.condition_dem(
234
235
  dem_path,
@@ -658,11 +659,11 @@ class Compiler:
658
659
  else:
659
660
  nf_cat_name = nf_cat
660
661
  frac_contr_to_nf_cat = 1
661
-
662
+
662
663
  # Add this CLC cat, multiplied by the fraction of it contributing to
663
664
  # the NF cat, to the list of CLC rasters to be combined into this NF cat
664
665
  nf_cat_arrs[nf_cat_name].append(src_cat_rs * frac_contr_to_nf_cat)
665
-
666
+
666
667
  # Sum all the contributors to each NF cat
667
668
  nf_final_arrs = {name: np.sum(nf_cat_arr, axis=0) for name, nf_cat_arr in nf_cat_arrs.items()}
668
669
 
@@ -673,7 +674,7 @@ class Compiler:
673
674
  for name, old_arr in nf_final_arrs.items():
674
675
  if old_arr.shape == src_arr.shape:
675
676
  # Re-read flowdir as reproject fills new_arr
676
- new_arr = self.flow_dir.copy()
677
+ new_arr = np.empty(self.grid.shape, dtype=src_arr.dtype)
677
678
  # Reproject. Remember we're not converting CRS here, so clc_rs
678
679
  # CRS can be used as src and dst
679
680
  reproject(
@@ -681,7 +682,7 @@ class Compiler:
681
682
  destination=new_arr,
682
683
  src_transform=rs.transform,
683
684
  dst_transform=self.grid.transform,
684
- src_crs=rs.crs,
685
+ src_crs=rs.crs,
685
686
  dst_crs=rs.crs,
686
687
  resampling=Resampling.average
687
688
  )
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