ECOv002-calval-tables 1.6.0__py3-none-any.whl → 1.7.1__py3-none-any.whl
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.
- ECOv002_calval_tables/ECOv002_calval_tables.py +1 -0
- ECOv002_calval_tables/load_tables.py +4 -0
- ECOv002_calval_tables/plot_single_model.py +2 -1
- ECOv002_calval_tables/upscale_to_daylight.py +18 -0
- {ecov002_calval_tables-1.6.0.dist-info → ecov002_calval_tables-1.7.1.dist-info}/METADATA +2 -1
- ecov002_calval_tables-1.7.1.dist-info/RECORD +20 -0
- {ecov002_calval_tables-1.6.0.dist-info → ecov002_calval_tables-1.7.1.dist-info}/top_level.txt +1 -0
- tests/test_import_ECOv002_calval_tables.py +2 -0
- tests/test_import_dependencies.py +17 -0
- tests/test_load_calval_table.py +14 -0
- tests/test_load_metadata_ebc_filt.py +15 -0
- ecov002_calval_tables-1.6.0.dist-info/RECORD +0 -15
- {ecov002_calval_tables-1.6.0.dist-info → ecov002_calval_tables-1.7.1.dist-info}/WHEEL +0 -0
- {ecov002_calval_tables-1.6.0.dist-info → ecov002_calval_tables-1.7.1.dist-info}/licenses/LICENSE +0 -0
|
@@ -6,6 +6,8 @@ import geopandas as gpd
|
|
|
6
6
|
|
|
7
7
|
from shapely.geometry import Point
|
|
8
8
|
|
|
9
|
+
from .upscale_to_daylight import upscale_to_daylight
|
|
10
|
+
|
|
9
11
|
def load_combined_eco_flux_ec_filtered() -> pd.DataFrame:
|
|
10
12
|
"""
|
|
11
13
|
Load the filtered eddy covariance (EC) flux dataset used for ECOSTRESS Collection 2 ET product validation.
|
|
@@ -64,4 +66,6 @@ def load_calval_table() -> gpd.GeoDataFrame:
|
|
|
64
66
|
# Convert merged DataFrame to GeoDataFrame
|
|
65
67
|
gdf = gpd.GeoDataFrame(merged_df, geometry=merged_df["geometry"], crs="EPSG:4326")
|
|
66
68
|
|
|
69
|
+
gdf = upscale_to_daylight(gdf)
|
|
70
|
+
|
|
67
71
|
return gdf
|
|
@@ -109,5 +109,6 @@ def quick_look_plot_single_model(
|
|
|
109
109
|
fig.legend(handles=scatter_handles, loc='lower center', bbox_to_anchor=(0.5, -0.05), ncol=7, title='Vegetation Type',fontsize=10)
|
|
110
110
|
# Adjust layout for better appearance
|
|
111
111
|
fig.tight_layout()
|
|
112
|
-
#
|
|
112
|
+
# Prevent automatic display in Jupyter by closing the figure before returning
|
|
113
|
+
plt.close(fig)
|
|
113
114
|
return fig
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import pandas as pd
|
|
2
|
+
from daylight_evapotranspiration import daylight_ET_from_instantaneous_LE
|
|
3
|
+
|
|
4
|
+
def upscale_to_daylight(df: pd.DataFrame, prefix: str = "insitu_") -> pd.DataFrame:
|
|
5
|
+
daylight_results = daylight_ET_from_instantaneous_LE(
|
|
6
|
+
LE_instantaneous_Wm2=df.LEcorr50,
|
|
7
|
+
Rn_instantaneous_Wm2=df.NETRAD_filt,
|
|
8
|
+
G_instantaneous_Wm2=df.G_filt,
|
|
9
|
+
time_UTC=df.time_UTC,
|
|
10
|
+
geometry=df.geometry
|
|
11
|
+
)
|
|
12
|
+
|
|
13
|
+
daylight_results_prefixed = {f"{prefix}{k}": v for k, v in daylight_results.items()}
|
|
14
|
+
|
|
15
|
+
for key, value in daylight_results_prefixed.items():
|
|
16
|
+
df[key] = value
|
|
17
|
+
|
|
18
|
+
return df
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ECOv002-calval-tables
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.7.1
|
|
4
4
|
Summary: Priestley-Taylor Jet Propulsion Laboratory Soil Moisutre Evapotranspiration Model
|
|
5
5
|
Author-email: Gregory Halverson <gregory.h.halverson@jpl.nasa.gov>, Zoe Pierrat <zoe.a.pierrat@jpl.nasa.gov>
|
|
6
6
|
Project-URL: Homepage, https://github.com/gregory-halverson/ECOv002-calval-tables
|
|
@@ -9,6 +9,7 @@ Classifier: Operating System :: OS Independent
|
|
|
9
9
|
Requires-Python: >=3.10
|
|
10
10
|
Description-Content-Type: text/markdown
|
|
11
11
|
License-File: LICENSE
|
|
12
|
+
Requires-Dist: daylight-evapotranspiration>=v1.3.4
|
|
12
13
|
Requires-Dist: pandas
|
|
13
14
|
Requires-Dist: geopandas
|
|
14
15
|
Requires-Dist: numpy
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
ECOv002_calval_tables/ECOv002_calval_tables.py,sha256=6yW19Mvgg94O9rZVCRRjiefjG-a6rwRSyFt-RqiXcIo,170
|
|
2
|
+
ECOv002_calval_tables/__init__.py,sha256=oO0pVascuJs247UwpXq2o23wQPThM1bWEwUhSYiNzMY,60
|
|
3
|
+
ECOv002_calval_tables/combined_eco_flux_EC_filtered.csv,sha256=uSRv1CBMJKUWBgtMlRHB1359kiUFUL1ez2c4m7C4DxU,745225
|
|
4
|
+
ECOv002_calval_tables/ec_lib.py,sha256=0k7CldHMFrcq77OqsXdreJQNEVUHVMCAHmUWNo-63fA,24676
|
|
5
|
+
ECOv002_calval_tables/error_funcs.py,sha256=WFsoYvZyJVF-ppBn0BV2JJADPZN48OJBG2QZ6Lt3uCk,11275
|
|
6
|
+
ECOv002_calval_tables/load_tables.py,sha256=mm41qAMhq7OUpzVeEnEbb2zX240RVOFr3rUe2qhmHqU,2775
|
|
7
|
+
ECOv002_calval_tables/metadata_ebc_filt.csv,sha256=74AeCH5DG2Zu8ZFBXUZAW95hlsCjK9K3t6BWRRReR3s,13975
|
|
8
|
+
ECOv002_calval_tables/plot_funcs.py,sha256=asu43YEtWhNehBRKx5ujIiqNn6iePbXW6fC_8Tl8yzI,23988
|
|
9
|
+
ECOv002_calval_tables/plot_single_model.py,sha256=NDCGmY5SfjhTzoH9NKa3uSH_QLvqdWdM-J7QMxKFkpo,5890
|
|
10
|
+
ECOv002_calval_tables/upscale_to_daylight.py,sha256=LrnZ0loI0o30bpT4coET7fmWMzHFVpaylZTfrdv4OqE,622
|
|
11
|
+
ECOv002_calval_tables/version.py,sha256=DOnf2BIAf7HAp9SIUIetrDgRoZDL0o7JuKSiC7_ZT_I,87
|
|
12
|
+
ecov002_calval_tables-1.7.1.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
13
|
+
tests/test_import_ECOv002_calval_tables.py,sha256=aGFA47BrECJroPH92aO5lT53TPNSd6TI1A9uNVT8pRY,74
|
|
14
|
+
tests/test_import_dependencies.py,sha256=zrPUyx8ikAIdpKVESnanD57T_ttXGE2lca9VoVCSBnM,339
|
|
15
|
+
tests/test_load_calval_table.py,sha256=1ioR2yzv8EfWEU2fSqNZv0yaJPgIn03IAOtacF1td3M,499
|
|
16
|
+
tests/test_load_metadata_ebc_filt.py,sha256=PrBxmR85Q_TgWHZx2sBrtvrlsoCm9FMkGFwSU1ySIVc,561
|
|
17
|
+
ecov002_calval_tables-1.7.1.dist-info/METADATA,sha256=F72ebTYBgNLbegVh7QGyXL9UIq2IP1CRbgrUhyibyt8,3363
|
|
18
|
+
ecov002_calval_tables-1.7.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
19
|
+
ecov002_calval_tables-1.7.1.dist-info/top_level.txt,sha256=Ps10Nh0VWk-CGqZd2xXwmvGGQ-MEhNaWT0BFGId_M3I,28
|
|
20
|
+
ecov002_calval_tables-1.7.1.dist-info/RECORD,,
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import pytest
|
|
2
|
+
|
|
3
|
+
# List of dependencies
|
|
4
|
+
dependencies = [
|
|
5
|
+
"pandas",
|
|
6
|
+
"geopandas",
|
|
7
|
+
"numpy",
|
|
8
|
+
"sklearn",
|
|
9
|
+
"scipy",
|
|
10
|
+
"matplotlib",
|
|
11
|
+
"shapely"
|
|
12
|
+
]
|
|
13
|
+
|
|
14
|
+
# Generate individual test functions for each dependency
|
|
15
|
+
@pytest.mark.parametrize("dependency", dependencies)
|
|
16
|
+
def test_dependency_import(dependency):
|
|
17
|
+
__import__(dependency)
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import unittest
|
|
2
|
+
import geopandas as gpd
|
|
3
|
+
from ECOv002_calval_tables import load_calval_table
|
|
4
|
+
|
|
5
|
+
class TestLoadCalvalTable(unittest.TestCase):
|
|
6
|
+
def test_returns_geodataframe_with_valid_geometry(self):
|
|
7
|
+
gdf = load_calval_table()
|
|
8
|
+
self.assertIsInstance(gdf, gpd.GeoDataFrame)
|
|
9
|
+
self.assertIn('geometry', gdf.columns)
|
|
10
|
+
self.assertTrue(all(gdf.geometry.geom_type == 'Point'))
|
|
11
|
+
self.assertTrue(gdf.geometry.is_valid.all())
|
|
12
|
+
|
|
13
|
+
if __name__ == "__main__":
|
|
14
|
+
unittest.main()
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import unittest
|
|
2
|
+
import geopandas as gpd
|
|
3
|
+
from ECOv002_calval_tables import load_metadata_ebc_filt
|
|
4
|
+
|
|
5
|
+
class TestLoadMetadataEbcFilt(unittest.TestCase):
|
|
6
|
+
def test_returns_geodataframe_with_valid_geometry(self):
|
|
7
|
+
gdf = load_metadata_ebc_filt()
|
|
8
|
+
self.assertIsInstance(gdf, gpd.GeoDataFrame)
|
|
9
|
+
self.assertIn('geometry', gdf.columns)
|
|
10
|
+
# Check all geometries are valid Points
|
|
11
|
+
self.assertTrue(all(gdf.geometry.geom_type == 'Point'))
|
|
12
|
+
self.assertTrue(gdf.geometry.is_valid.all())
|
|
13
|
+
|
|
14
|
+
if __name__ == "__main__":
|
|
15
|
+
unittest.main()
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
ECOv002_calval_tables/ECOv002_calval_tables.py,sha256=k8y7TEevSX3Y6NhEU1qg_CySd-f_T4omNNJFc7ZxXcY,135
|
|
2
|
-
ECOv002_calval_tables/__init__.py,sha256=oO0pVascuJs247UwpXq2o23wQPThM1bWEwUhSYiNzMY,60
|
|
3
|
-
ECOv002_calval_tables/combined_eco_flux_EC_filtered.csv,sha256=uSRv1CBMJKUWBgtMlRHB1359kiUFUL1ez2c4m7C4DxU,745225
|
|
4
|
-
ECOv002_calval_tables/ec_lib.py,sha256=0k7CldHMFrcq77OqsXdreJQNEVUHVMCAHmUWNo-63fA,24676
|
|
5
|
-
ECOv002_calval_tables/error_funcs.py,sha256=WFsoYvZyJVF-ppBn0BV2JJADPZN48OJBG2QZ6Lt3uCk,11275
|
|
6
|
-
ECOv002_calval_tables/load_tables.py,sha256=m9UEz07yIrM-m2PaYv2g_TnBLN5Wjg7yUuMzs-T25Gk,2685
|
|
7
|
-
ECOv002_calval_tables/metadata_ebc_filt.csv,sha256=74AeCH5DG2Zu8ZFBXUZAW95hlsCjK9K3t6BWRRReR3s,13975
|
|
8
|
-
ECOv002_calval_tables/plot_funcs.py,sha256=asu43YEtWhNehBRKx5ujIiqNn6iePbXW6fC_8Tl8yzI,23988
|
|
9
|
-
ECOv002_calval_tables/plot_single_model.py,sha256=1McpBLyLm8oM-7wA0sDEgEQY_AM_8aisxcDUuKPBrDM,5853
|
|
10
|
-
ECOv002_calval_tables/version.py,sha256=DOnf2BIAf7HAp9SIUIetrDgRoZDL0o7JuKSiC7_ZT_I,87
|
|
11
|
-
ecov002_calval_tables-1.6.0.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
12
|
-
ecov002_calval_tables-1.6.0.dist-info/METADATA,sha256=_bQvh2W1unTzjawE2rtBYJX1Vb252MVH4pa6AxSOWNg,3312
|
|
13
|
-
ecov002_calval_tables-1.6.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
14
|
-
ecov002_calval_tables-1.6.0.dist-info/top_level.txt,sha256=ePbA84g_XQHWQUAQEVo6gmyuW0WLUzPg2IfHyoGqUqg,22
|
|
15
|
-
ecov002_calval_tables-1.6.0.dist-info/RECORD,,
|
|
File without changes
|
{ecov002_calval_tables-1.6.0.dist-info → ecov002_calval_tables-1.7.1.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|