pyVPRM 5.1__tar.gz → 5.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.
- {pyvprm-5.1/pyVPRM.egg-info → pyvprm-5.2}/PKG-INFO +2 -1
- {pyvprm-5.1 → pyvprm-5.2}/README.md +5 -0
- {pyvprm-5.1 → pyvprm-5.2}/pyVPRM/VPRM.py +25 -26
- pyvprm-5.2/pyVPRM/__init__.py +3 -0
- {pyvprm-5.1 → pyvprm-5.2}/pyVPRM/sat_managers/modis.py +20 -0
- {pyvprm-5.1 → pyvprm-5.2}/pyVPRM/sat_managers/viirs.py +14 -13
- pyvprm-5.1/pyVPRM/vprm_models/vprm_base.py → pyvprm-5.2/pyVPRM/vprm_models/vprm_base_model.py +4 -4
- pyvprm-5.1/pyVPRM/vprm_models/vprm_base_no_xeric.py → pyvprm-5.2/pyVPRM/vprm_models/vprm_base_model_no_xeric.py +4 -4
- pyvprm-5.1/pyVPRM/vprm_models/vprm_modified.py → pyvprm-5.2/pyVPRM/vprm_models/vprm_modified_model.py +5 -5
- {pyvprm-5.1 → pyvprm-5.2/pyVPRM.egg-info}/PKG-INFO +2 -1
- {pyvprm-5.1 → pyvprm-5.2}/pyVPRM.egg-info/SOURCES.txt +4 -4
- {pyvprm-5.1 → pyvprm-5.2}/setup.py +2 -1
- pyvprm-5.1/pyVPRM/__init__.py +0 -2
- {pyvprm-5.1 → pyvprm-5.2}/LICENSE +0 -0
- {pyvprm-5.1 → pyvprm-5.2}/MANIFEST.in +0 -0
- {pyvprm-5.1 → pyvprm-5.2}/pyVPRM/lib/__init__.py +0 -0
- {pyvprm-5.1 → pyvprm-5.2}/pyVPRM/lib/downmodis.py +0 -0
- {pyvprm-5.1 → pyvprm-5.2}/pyVPRM/lib/fancy_plot.py +0 -0
- {pyvprm-5.1 → pyvprm-5.2}/pyVPRM/lib/flux_tower_class.py +0 -0
- {pyvprm-5.1 → pyvprm-5.2}/pyVPRM/lib/fluxnet_info/fluxnet_sites.pkl +0 -0
- {pyvprm-5.1 → pyvprm-5.2}/pyVPRM/lib/fluxnet_info/site_infos.txt +0 -0
- {pyvprm-5.1 → pyvprm-5.2}/pyVPRM/lib/functions.py +0 -0
- {pyvprm-5.1 → pyvprm-5.2}/pyVPRM/lib/reproject_fiona.py +0 -0
- {pyvprm-5.1 → pyvprm-5.2}/pyVPRM/meteorologies/__init__.py +0 -0
- {pyvprm-5.1 → pyvprm-5.2}/pyVPRM/meteorologies/era5_class_dkrz.py +0 -0
- {pyvprm-5.1 → pyvprm-5.2}/pyVPRM/meteorologies/era5_class_draft.py +0 -0
- {pyvprm-5.1 → pyvprm-5.2}/pyVPRM/meteorologies/era5_land_destinE.py +0 -0
- {pyvprm-5.1 → pyvprm-5.2}/pyVPRM/meteorologies/era5_monthly_xr.py +0 -0
- {pyvprm-5.1 → pyvprm-5.2}/pyVPRM/meteorologies/met_base_class.py +0 -0
- {pyvprm-5.1 → pyvprm-5.2}/pyVPRM/meteorologies/met_local_measurement.py +0 -0
- {pyvprm-5.1 → pyvprm-5.2}/pyVPRM/sat_managers/__init__.py +0 -0
- {pyvprm-5.1 → pyvprm-5.2}/pyVPRM/sat_managers/base_manager.py +0 -0
- {pyvprm-5.1 → pyvprm-5.2}/pyVPRM/sat_managers/city.py +0 -0
- {pyvprm-5.1 → pyvprm-5.2}/pyVPRM/sat_managers/copernicus.py +0 -0
- {pyvprm-5.1 → pyvprm-5.2}/pyVPRM/sat_managers/esa_world_cover.py +0 -0
- {pyvprm-5.1 → pyvprm-5.2}/pyVPRM/sat_managers/mapbiomas.py +0 -0
- {pyvprm-5.1 → pyvprm-5.2}/pyVPRM/sat_managers/proba_v.py +0 -0
- {pyvprm-5.1 → pyvprm-5.2}/pyVPRM/sat_managers/sentinel2.py +0 -0
- {pyvprm-5.1 → pyvprm-5.2}/pyVPRM/sat_managers/synmap.py +0 -0
- {pyvprm-5.1 → pyvprm-5.2}/pyVPRM/sat_managers/viirs09ga.py +0 -0
- {pyvprm-5.1 → pyvprm-5.2}/pyVPRM/vprm_configs/__init__.py +0 -0
- {pyvprm-5.1 → pyvprm-5.2}/pyVPRM/vprm_configs/copernicus_land_cover.yaml +0 -0
- {pyvprm-5.1 → pyvprm-5.2}/pyVPRM/vprm_configs/esa_world_cover.yaml +0 -0
- {pyvprm-5.1 → pyvprm-5.2}/pyVPRM/vprm_configs/synmap.yaml +0 -0
- {pyvprm-5.1 → pyvprm-5.2}/pyVPRM/vprm_models/__init__.py +0 -0
- {pyvprm-5.1 → pyvprm-5.2}/pyVPRM/vprm_models/model_params/__init__.py +0 -0
- /pyvprm-5.1/pyVPRM/vprm_models/vprm_nn.py → /pyvprm-5.2/pyVPRM/vprm_models/vprm_nn_model.py +0 -0
- {pyvprm-5.1 → pyvprm-5.2}/pyVPRM.egg-info/dependency_links.txt +0 -0
- {pyvprm-5.1 → pyvprm-5.2}/pyVPRM.egg-info/not-zip-safe +0 -0
- {pyvprm-5.1 → pyvprm-5.2}/pyVPRM.egg-info/requires.txt +0 -0
- {pyvprm-5.1 → pyvprm-5.2}/pyVPRM.egg-info/top_level.txt +0 -0
- {pyvprm-5.1 → pyvprm-5.2}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pyVPRM
|
|
3
|
-
Version: 5.
|
|
3
|
+
Version: 5.2
|
|
4
4
|
Summary: Vegetation Photosynthesis and Respiration Model
|
|
5
5
|
Home-page: https://github.com/tglauch/pyVPRM/
|
|
6
6
|
Author: Theo Glauch
|
|
@@ -12,6 +12,7 @@ Classifier: Environment :: Console
|
|
|
12
12
|
Classifier: Intended Audience :: Science/Research
|
|
13
13
|
Classifier: License :: OSI Approved :: MIT License
|
|
14
14
|
Classifier: Topic :: Scientific/Engineering :: Atmospheric Science
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
15
16
|
License-File: LICENSE
|
|
16
17
|
Requires-Dist: numpy
|
|
17
18
|
Requires-Dist: scipy
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
[](https://doi.org/10.5281/zenodo.14216613)
|
|
2
|
+
[](https://pypi.org/project/pyVPRM/)
|
|
3
|
+
[](https://pypi.org/project/pyVPRM/)
|
|
4
|
+
[](https://pypi.org/project/pyVPRM/)
|
|
5
|
+

|
|
6
|
+
|
|
2
7
|
|
|
3
8
|
<figure>
|
|
4
9
|
<img src="https://github.com/tglauch/pyVPRM/assets/29706254/ba2565e6-1434-4a95-8086-936462f8d05d", height=150pt>
|
|
@@ -37,7 +37,7 @@ regridder_options = dict()
|
|
|
37
37
|
regridder_options["conservative"] = "conserve"
|
|
38
38
|
|
|
39
39
|
|
|
40
|
-
class
|
|
40
|
+
class vprm_preprocessor:
|
|
41
41
|
"""
|
|
42
42
|
Main class for the Vegetation Photosynthesis and Respiration Model
|
|
43
43
|
"""
|
|
@@ -71,12 +71,11 @@ class vprm:
|
|
|
71
71
|
self.t2m = None
|
|
72
72
|
|
|
73
73
|
# self.target_shape = None
|
|
74
|
-
|
|
75
|
-
self.sat_img_buffer = dict()
|
|
74
|
+
|
|
76
75
|
self.buffer = dict()
|
|
77
76
|
self.buffer["cur_lat"] = None
|
|
78
77
|
self.buffer["cur_lon"] = None
|
|
79
|
-
self.
|
|
78
|
+
self.empty_xr_lat_lon_grid = None
|
|
80
79
|
|
|
81
80
|
self.land_cover_type = land_cover_map
|
|
82
81
|
# land_cover_type: tmin, topt, tmax
|
|
@@ -511,15 +510,15 @@ class vprm:
|
|
|
511
510
|
if prod > x_time_y:
|
|
512
511
|
biggest = h
|
|
513
512
|
x_time_y = prod
|
|
514
|
-
self.
|
|
515
|
-
keys = list(self.
|
|
516
|
-
self.
|
|
513
|
+
self.prototype_satellite_manager = copy.deepcopy(biggest)
|
|
514
|
+
keys = list(self.prototype_satellite_manager.sat_img.keys())
|
|
515
|
+
self.prototype_satellite_manager.sat_img = self.prototype_satellite_manager.sat_img.drop(keys)
|
|
517
516
|
# for h in self.sat_imgs:
|
|
518
|
-
# h.sat_img = h.sat_img.rio.reproject_match(self.
|
|
517
|
+
# h.sat_img = h.sat_img.rio.reproject_match(self.prototype_satellite_manager.sat_img, nodata=np.nan)
|
|
519
518
|
else:
|
|
520
|
-
self.
|
|
521
|
-
keys = list(self.
|
|
522
|
-
self.
|
|
519
|
+
self.prototype_satellite_manager = copy.deepcopy(self.sat_imgs[0])
|
|
520
|
+
keys = list(self.prototype_satellite_manager.sat_img.keys())
|
|
521
|
+
self.prototype_satellite_manager.sat_img = self.prototype_satellite_manager.sat_img.drop(keys)
|
|
523
522
|
self.sat_imgs = satellite_data_manager(
|
|
524
523
|
sat_img=xr.concat([k.sat_img for k in self.sat_imgs], "time")
|
|
525
524
|
)
|
|
@@ -536,7 +535,7 @@ class vprm:
|
|
|
536
535
|
)
|
|
537
536
|
day_steps = [i.days for i in (self.timestamps - self.timestamp_start)]
|
|
538
537
|
self.sat_imgs.sat_img = self.sat_imgs.sat_img.assign_coords({"time": day_steps})
|
|
539
|
-
self.
|
|
538
|
+
self.prototype_satellite_manager.sat_img = self.prototype_satellite_manager.sat_img.assign_coords(
|
|
540
539
|
{"time": day_steps}
|
|
541
540
|
)
|
|
542
541
|
|
|
@@ -592,7 +591,7 @@ class vprm:
|
|
|
592
591
|
bounds[0], bounds[1], bounds[2], bounds[3]
|
|
593
592
|
)
|
|
594
593
|
keys = list(self.sat_imgs.sat_img.keys())
|
|
595
|
-
self.
|
|
594
|
+
self.prototype_satellite_manager = satellite_data_manager(
|
|
596
595
|
sat_img=self.sat_imgs.sat_img.drop(keys)
|
|
597
596
|
)
|
|
598
597
|
return
|
|
@@ -748,7 +747,7 @@ class vprm:
|
|
|
748
747
|
.to_array()
|
|
749
748
|
.values[0]
|
|
750
749
|
)
|
|
751
|
-
self.land_cover_type = copy.deepcopy(self.
|
|
750
|
+
self.land_cover_type = copy.deepcopy(self.prototype_satellite_manager)
|
|
752
751
|
self.land_cover_type.sat_img = self.land_cover_type.sat_img.assign(
|
|
753
752
|
{var_name: (["y", "x"], t)}
|
|
754
753
|
)
|
|
@@ -780,9 +779,9 @@ class vprm:
|
|
|
780
779
|
Returns:
|
|
781
780
|
None
|
|
782
781
|
"""
|
|
783
|
-
self.max_lswi = copy.deepcopy(self.
|
|
784
|
-
self.min_lswi = copy.deepcopy(self.
|
|
785
|
-
self.min_max_evi = copy.deepcopy(self.
|
|
782
|
+
self.max_lswi = copy.deepcopy(self.prototype_satellite_manager)
|
|
783
|
+
self.min_lswi = copy.deepcopy(self.prototype_satellite_manager)
|
|
784
|
+
self.min_max_evi = copy.deepcopy(self.prototype_satellite_manager)
|
|
786
785
|
shortcut = self.sat_imgs.sat_img
|
|
787
786
|
# if self.flux_tower_instances is None:
|
|
788
787
|
self.min_lswi.sat_img["min_lswi"] = shortcut["lswi"].min(
|
|
@@ -1073,7 +1072,7 @@ class vprm:
|
|
|
1073
1072
|
).values.flatten()
|
|
1074
1073
|
else:
|
|
1075
1074
|
self.buffer[key] = self.sat_imgs.sat_img[key].isel(select_dict)
|
|
1076
|
-
return self.
|
|
1075
|
+
return self.buffer[key]
|
|
1077
1076
|
|
|
1078
1077
|
def get_sat_img_values_for_all_keys(self, lon=None, lat=None, counter_range=None):
|
|
1079
1078
|
"""
|
|
@@ -1125,21 +1124,21 @@ class vprm:
|
|
|
1125
1124
|
self.new = False
|
|
1126
1125
|
return # Still same satellite image
|
|
1127
1126
|
|
|
1128
|
-
def
|
|
1129
|
-
src_x = self.
|
|
1130
|
-
src_y = self.
|
|
1127
|
+
def _set_empty_xr_lat_lon_grid(self):
|
|
1128
|
+
src_x = self.prototype_satellite_manager.sat_img.coords["x"].values
|
|
1129
|
+
src_y = self.prototype_satellite_manager.sat_img.coords["y"].values
|
|
1131
1130
|
X, Y = np.meshgrid(src_x, src_y)
|
|
1132
1131
|
t = Transformer.from_crs(
|
|
1133
|
-
self.
|
|
1132
|
+
self.prototype_satellite_manager.sat_img.rio.crs, "+proj=longlat +datum=WGS84"
|
|
1134
1133
|
)
|
|
1135
1134
|
x_long, y_lat = t.transform(X, Y)
|
|
1136
|
-
self.
|
|
1135
|
+
self.empty_xr_lat_lon_grid = xr.Dataset(
|
|
1137
1136
|
{
|
|
1138
1137
|
"lon": (["y", "x"], x_long, {"units": "degrees_east"}),
|
|
1139
1138
|
"lat": (["y", "x"], y_lat, {"units": "degrees_north"}),
|
|
1140
1139
|
}
|
|
1141
1140
|
)
|
|
1142
|
-
self.
|
|
1141
|
+
self.empty_xr_lat_lon_grid = self.empty_xr_lat_lon_grid.set_coords(["lon", "lat"])
|
|
1143
1142
|
return
|
|
1144
1143
|
|
|
1145
1144
|
def save(self, save_path):
|
|
@@ -1150,7 +1149,7 @@ class vprm:
|
|
|
1150
1149
|
return
|
|
1151
1150
|
|
|
1152
1151
|
def is_disjoint(self, this_sat_img):
|
|
1153
|
-
bounds = self.
|
|
1152
|
+
bounds = self.prototype_satellite_manager.sat_img.rio.transform_bounds(
|
|
1154
1153
|
this_sat_img.sat_img.rio.crs
|
|
1155
1154
|
)
|
|
1156
1155
|
dj = rasterio.coords.disjoint_bounds(bounds, this_sat_img.sat_img.rio.bounds())
|
|
@@ -1163,7 +1162,7 @@ class vprm:
|
|
|
1163
1162
|
[v.sat_imgs for v in vprm_insts], reproject=allow_reproject
|
|
1164
1163
|
)
|
|
1165
1164
|
keys = list(self.sat_imgs.sat_img.keys())
|
|
1166
|
-
self.
|
|
1165
|
+
self.prototype_satellite_manager = satellite_data_manager(
|
|
1167
1166
|
sat_img=self.sat_imgs.sat_img.drop(keys)
|
|
1168
1167
|
)
|
|
1169
1168
|
|
|
@@ -32,6 +32,19 @@ import numpy as np
|
|
|
32
32
|
from pyVPRM.sat_managers.base_manager import earthdata
|
|
33
33
|
from loguru import logger
|
|
34
34
|
|
|
35
|
+
|
|
36
|
+
crs_str = 'PROJCS["unnamed",\
|
|
37
|
+
GEOGCS["Unknown datum based upon the custom spheroid", \
|
|
38
|
+
DATUM["Not specified (based on custom spheroid)", \
|
|
39
|
+
SPHEROID["Custom spheroid",6371007.181,0]], \
|
|
40
|
+
PRIMEM["Greenwich",0],\
|
|
41
|
+
UNIT["degree",0.0174532925199433]],\
|
|
42
|
+
PROJECTION["Sinusoidal"], \
|
|
43
|
+
PARAMETER["longitude_of_center",0], \
|
|
44
|
+
PARAMETER["false_easting",0], \
|
|
45
|
+
PARAMETER["false_northing",0], \
|
|
46
|
+
UNIT["Meter",1]]'
|
|
47
|
+
|
|
35
48
|
class modis(earthdata):
|
|
36
49
|
# Class to download and load MODIS data
|
|
37
50
|
|
|
@@ -60,6 +73,7 @@ class modis(earthdata):
|
|
|
60
73
|
self.product = product
|
|
61
74
|
self.path = "MOLT"
|
|
62
75
|
self.resolution = None
|
|
76
|
+
self.default_crs_str = crs_str
|
|
63
77
|
if self.bands is not None:
|
|
64
78
|
self.bands = [i for i in list(self.sat_img.keys()) if "sur_refl_b" in i]
|
|
65
79
|
|
|
@@ -200,6 +214,12 @@ class modis(earthdata):
|
|
|
200
214
|
self.sat_img = rxr.open_rasterio(
|
|
201
215
|
self.sat_image_path, masked=True, cache=False
|
|
202
216
|
).squeeze()
|
|
217
|
+
if self.sat_img.rio.crs is None:
|
|
218
|
+
self.sat_img = xr.open_dataset(self.sat_image_path)
|
|
219
|
+
self.sat_img = self.sat_img.rio.write_crs(crs_str)
|
|
220
|
+
# Add as an attribute to each data variable
|
|
221
|
+
for var in self.sat_img.data_vars:
|
|
222
|
+
self.sat_img[var].attrs['scale_factor'] = 1.0
|
|
203
223
|
if self.use_keys is None:
|
|
204
224
|
self.use_keys = list(self.sat_img.keys())
|
|
205
225
|
self.sat_img = self.sat_img[self.use_keys]
|
|
@@ -32,6 +32,18 @@ import numpy as np
|
|
|
32
32
|
from pyVPRM.sat_managers.base_manager import earthdata
|
|
33
33
|
from loguru import logger
|
|
34
34
|
|
|
35
|
+
crs_str = 'PROJCS["unnamed",\
|
|
36
|
+
GEOGCS["Unknown datum based upon the custom spheroid", \
|
|
37
|
+
DATUM["Not specified (based on custom spheroid)", \
|
|
38
|
+
SPHEROID["Custom spheroid",6371007.181,0]], \
|
|
39
|
+
PRIMEM["Greenwich",0],\
|
|
40
|
+
UNIT["degree",0.0174532925199433]],\
|
|
41
|
+
PROJECTION["Sinusoidal"], \
|
|
42
|
+
PARAMETER["longitude_of_center",0], \
|
|
43
|
+
PARAMETER["false_easting",0], \
|
|
44
|
+
PARAMETER["false_northing",0], \
|
|
45
|
+
UNIT["Meter",1]]'
|
|
46
|
+
|
|
35
47
|
class VIIRS(earthdata):
|
|
36
48
|
# Class to download and load VIIRS data
|
|
37
49
|
|
|
@@ -41,6 +53,7 @@ class VIIRS(earthdata):
|
|
|
41
53
|
self.load_kwargs = {"variable": self.use_keys}
|
|
42
54
|
self.sat = "VIIRS"
|
|
43
55
|
self.path = "VIIRS"
|
|
56
|
+
self.default_crs_str = crs_str
|
|
44
57
|
self.product = "VNP09H1.001" #'VNP09GA.001' #
|
|
45
58
|
self.pixel_size = 463.31271652777775
|
|
46
59
|
|
|
@@ -79,18 +92,6 @@ class VIIRS(earthdata):
|
|
|
79
92
|
self.sat_img = self.sat_img.squeeze()
|
|
80
93
|
self.keys = self.sat_img.data_vars
|
|
81
94
|
|
|
82
|
-
crs_str = 'PROJCS["unnamed",\
|
|
83
|
-
GEOGCS["Unknown datum based upon the custom spheroid", \
|
|
84
|
-
DATUM["Not specified (based on custom spheroid)", \
|
|
85
|
-
SPHEROID["Custom spheroid",6371007.181,0]], \
|
|
86
|
-
PRIMEM["Greenwich",0],\
|
|
87
|
-
UNIT["degree",0.0174532925199433]],\
|
|
88
|
-
PROJECTION["Sinusoidal"], \
|
|
89
|
-
PARAMETER["longitude_of_center",0], \
|
|
90
|
-
PARAMETER["false_easting",0], \
|
|
91
|
-
PARAMETER["false_northing",0], \
|
|
92
|
-
UNIT["Meter",1]]'
|
|
93
|
-
|
|
94
95
|
rename_dict = dict()
|
|
95
96
|
for i in self.keys:
|
|
96
97
|
rename_dict[i] = i.split("Data_Fields_")[1]
|
|
@@ -195,7 +196,7 @@ class VIIRS(earthdata):
|
|
|
195
196
|
return
|
|
196
197
|
|
|
197
198
|
def mask_water(self, bands=None):
|
|
198
|
-
print(
|
|
199
|
+
print('Water Masking not yet implemented for VIIRS')
|
|
199
200
|
#Not yet implemented
|
|
200
201
|
return
|
|
201
202
|
|
pyvprm-5.1/pyVPRM/vprm_models/vprm_base.py → pyvprm-5.2/pyVPRM/vprm_models/vprm_base_model.py
RENAMED
|
@@ -13,7 +13,7 @@ import itertools
|
|
|
13
13
|
from scipy.optimize import curve_fit
|
|
14
14
|
from loguru import logger
|
|
15
15
|
|
|
16
|
-
class
|
|
16
|
+
class vprm_base_model:
|
|
17
17
|
"""
|
|
18
18
|
Base class for all meteorologies
|
|
19
19
|
"""
|
|
@@ -395,14 +395,14 @@ class vprm_base:
|
|
|
395
395
|
|
|
396
396
|
if len(era_keys) > 0:
|
|
397
397
|
|
|
398
|
-
if self.vprm_pre.
|
|
399
|
-
self.vprm_pre.
|
|
398
|
+
if self.vprm_pre.empty_xr_lat_lon_grid is None:
|
|
399
|
+
self.vprm_pre._set_empty_xr_lat_lon_grid()
|
|
400
400
|
|
|
401
401
|
self.load_weather_data(hour, day, month, year, era_keys=era_keys)
|
|
402
402
|
|
|
403
403
|
if (lat is None) & (lon is None):
|
|
404
404
|
self.era5_inst.regrid(
|
|
405
|
-
dataset=self.vprm_pre.
|
|
405
|
+
dataset=self.vprm_pre.empty_xr_lat_lon_grid,
|
|
406
406
|
weights=regridder_weights,
|
|
407
407
|
n_cpus=self.vprm_pre.n_cpus,
|
|
408
408
|
)
|
|
@@ -13,7 +13,7 @@ import itertools
|
|
|
13
13
|
from scipy.optimize import curve_fit
|
|
14
14
|
from loguru import logger
|
|
15
15
|
|
|
16
|
-
class
|
|
16
|
+
class vprm_base_model_no_xeric:
|
|
17
17
|
"""
|
|
18
18
|
Base class for all meteorologies
|
|
19
19
|
"""
|
|
@@ -347,14 +347,14 @@ class vprm_base_no_xeric:
|
|
|
347
347
|
|
|
348
348
|
if len(era_keys) > 0:
|
|
349
349
|
|
|
350
|
-
if self.vprm_pre.
|
|
351
|
-
self.vprm_pre.
|
|
350
|
+
if self.vprm_pre._empty_xr_lat_lon_grid is None:
|
|
351
|
+
self.vprm_pre._set_empty_xr_lat_lon_grid()
|
|
352
352
|
|
|
353
353
|
self.load_weather_data(hour, day, month, year, era_keys=era_keys)
|
|
354
354
|
|
|
355
355
|
if (lat is None) & (lon is None):
|
|
356
356
|
self.era5_inst.regrid(
|
|
357
|
-
dataset=self.vprm_pre.
|
|
357
|
+
dataset=self.vprm_pre.empty_xr_lat_lon_grid,
|
|
358
358
|
weights=regridder_weights,
|
|
359
359
|
n_cpus=self.vprm_pre.n_cpus,
|
|
360
360
|
)
|
|
@@ -8,13 +8,13 @@ import pygrib
|
|
|
8
8
|
import copy
|
|
9
9
|
import uuid
|
|
10
10
|
import datetime
|
|
11
|
-
from pyVPRM.vprm_models.
|
|
11
|
+
from pyVPRM.vprm_models.vprm_base_model import vprm_base_model
|
|
12
12
|
import pandas as pd
|
|
13
13
|
import itertools
|
|
14
14
|
from scipy.optimize import curve_fit
|
|
15
15
|
from loguru import logger
|
|
16
16
|
|
|
17
|
-
class
|
|
17
|
+
class vprm_modified_model(vprm_base_model):
|
|
18
18
|
"""
|
|
19
19
|
Base class for all meteorologies
|
|
20
20
|
"""
|
|
@@ -212,14 +212,14 @@ class vprm_modified(vprm_base):
|
|
|
212
212
|
|
|
213
213
|
if len(era_keys) > 0:
|
|
214
214
|
|
|
215
|
-
if self.vprm_pre.
|
|
216
|
-
self.vprm_pre.
|
|
215
|
+
if self.vprm_pre._empty_xr_lat_lon_grid is None:
|
|
216
|
+
self.vprm_pre._set_empty_xr_lat_lon_grid()
|
|
217
217
|
|
|
218
218
|
self.load_weather_data(hour, day, month, year, era_keys=era_keys)
|
|
219
219
|
|
|
220
220
|
if (lat is None) & (lon is None):
|
|
221
221
|
self.era5_inst.regrid(
|
|
222
|
-
dataset=self.vprm_pre.
|
|
222
|
+
dataset=self.vprm_pre.empty_xr_lat_lon_grid,
|
|
223
223
|
weights=regridder_weights,
|
|
224
224
|
n_cpus=self.vprm_pre.n_cpus,
|
|
225
225
|
)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pyVPRM
|
|
3
|
-
Version: 5.
|
|
3
|
+
Version: 5.2
|
|
4
4
|
Summary: Vegetation Photosynthesis and Respiration Model
|
|
5
5
|
Home-page: https://github.com/tglauch/pyVPRM/
|
|
6
6
|
Author: Theo Glauch
|
|
@@ -12,6 +12,7 @@ Classifier: Environment :: Console
|
|
|
12
12
|
Classifier: Intended Audience :: Science/Research
|
|
13
13
|
Classifier: License :: OSI Approved :: MIT License
|
|
14
14
|
Classifier: Topic :: Scientific/Engineering :: Atmospheric Science
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
15
16
|
License-File: LICENSE
|
|
16
17
|
Requires-Dist: numpy
|
|
17
18
|
Requires-Dist: scipy
|
|
@@ -42,8 +42,8 @@ pyVPRM/vprm_configs/copernicus_land_cover.yaml
|
|
|
42
42
|
pyVPRM/vprm_configs/esa_world_cover.yaml
|
|
43
43
|
pyVPRM/vprm_configs/synmap.yaml
|
|
44
44
|
pyVPRM/vprm_models/__init__.py
|
|
45
|
-
pyVPRM/vprm_models/
|
|
46
|
-
pyVPRM/vprm_models/
|
|
47
|
-
pyVPRM/vprm_models/
|
|
48
|
-
pyVPRM/vprm_models/
|
|
45
|
+
pyVPRM/vprm_models/vprm_base_model.py
|
|
46
|
+
pyVPRM/vprm_models/vprm_base_model_no_xeric.py
|
|
47
|
+
pyVPRM/vprm_models/vprm_modified_model.py
|
|
48
|
+
pyVPRM/vprm_models/vprm_nn_model.py
|
|
49
49
|
pyVPRM/vprm_models/model_params/__init__.py
|
|
@@ -8,7 +8,7 @@ def readme():
|
|
|
8
8
|
|
|
9
9
|
setup(
|
|
10
10
|
name="pyVPRM",
|
|
11
|
-
version="5.
|
|
11
|
+
version="5.2",
|
|
12
12
|
description="Vegetation Photosynthesis and Respiration Model",
|
|
13
13
|
long_description="A tool to calculate the CO2 exchange flux between atmosphere and terrestrial biosphere using the Vegetation Photosynthesis and Respiration Model",
|
|
14
14
|
classifiers=[
|
|
@@ -17,6 +17,7 @@ setup(
|
|
|
17
17
|
"Intended Audience :: Science/Research",
|
|
18
18
|
"License :: OSI Approved :: MIT License",
|
|
19
19
|
"Topic :: Scientific/Engineering :: Atmospheric Science",
|
|
20
|
+
"Programming Language :: Python :: 3.14"
|
|
20
21
|
],
|
|
21
22
|
keywords="CO2 Biosphere Atmosphere Physics VPRM",
|
|
22
23
|
url="https://github.com/tglauch/pyVPRM/",
|
pyvprm-5.1/pyVPRM/__init__.py
DELETED
|
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
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|