ECOv003-L2T-STARS 1.4.0__py3-none-any.whl → 1.5.0__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.
- ECOv003_L2T_STARS/ECOv003_DL.py +5 -5
- ECOv003_L2T_STARS/L2T_STARS.py +30 -28
- ECOv003_L2T_STARS/Manifest.toml +206 -192
- ECOv003_L2T_STARS/VIIRS/VNP09GA.py +1 -1
- ECOv003_L2T_STARS/constants.py +37 -25
- ECOv003_L2T_STARS/generate_L2T_STARS_runconfig.py +5 -5
- ECOv003_L2T_STARS/generate_NDVI_fine_image.py +2 -2
- ECOv003_L2T_STARS/generate_STARS_inputs.py +3 -3
- ECOv003_L2T_STARS/generate_albedo_fine_image.py +2 -2
- ECOv003_L2T_STARS/main.py +14 -14
- ECOv003_L2T_STARS/process_STARS_product.py +6 -5
- ECOv003_L2T_STARS/retrieve_STARS_sources.py +4 -5
- ECOv003_L2T_STARS/version.txt +1 -1
- {ecov003_l2t_stars-1.4.0.dist-info → ecov003_l2t_stars-1.5.0.dist-info}/METADATA +2 -2
- {ecov003_l2t_stars-1.4.0.dist-info → ecov003_l2t_stars-1.5.0.dist-info}/RECORD +19 -19
- {ecov003_l2t_stars-1.4.0.dist-info → ecov003_l2t_stars-1.5.0.dist-info}/WHEEL +0 -0
- {ecov003_l2t_stars-1.4.0.dist-info → ecov003_l2t_stars-1.5.0.dist-info}/entry_points.txt +0 -0
- {ecov003_l2t_stars-1.4.0.dist-info → ecov003_l2t_stars-1.5.0.dist-info}/licenses/LICENSE +0 -0
- {ecov003_l2t_stars-1.4.0.dist-info → ecov003_l2t_stars-1.5.0.dist-info}/top_level.txt +0 -0
ECOv003_L2T_STARS/ECOv003_DL.py
CHANGED
@@ -33,7 +33,7 @@ logger = logging.getLogger(__name__)
|
|
33
33
|
# Define the template for the ECOv003_DL run-config XML
|
34
34
|
ECOv003_DL_TEMPLATE = join(abspath(dirname(__file__)), "ECOv003_DL.xml")
|
35
35
|
# Default build ID
|
36
|
-
|
36
|
+
BUILD = "0700"
|
37
37
|
|
38
38
|
def generate_downloader_runconfig(
|
39
39
|
L2G_LSTE_filename: str,
|
@@ -133,17 +133,17 @@ def generate_downloader_runconfig(
|
|
133
133
|
|
134
134
|
# Determine L2T STARS sources directory
|
135
135
|
if L2T_STARS_sources_directory is None:
|
136
|
-
L2T_STARS_sources_directory = join(working_directory,
|
136
|
+
L2T_STARS_sources_directory = join(working_directory, STARS_SOURCES_DIRECTORY)
|
137
137
|
L2T_STARS_sources_directory = abspath(expanduser(L2T_STARS_sources_directory))
|
138
138
|
|
139
139
|
# Determine L2T STARS indices directory
|
140
140
|
if L2T_STARS_indices_directory is None:
|
141
|
-
L2T_STARS_indices_directory = join(working_directory,
|
141
|
+
L2T_STARS_indices_directory = join(working_directory, STARS_INDICES_DIRECTORY)
|
142
142
|
L2T_STARS_indices_directory = abspath(expanduser(L2T_STARS_indices_directory))
|
143
143
|
|
144
144
|
# Determine L2T STARS model directory
|
145
145
|
if L2T_STARS_model_directory is None:
|
146
|
-
L2T_STARS_model_directory = join(working_directory,
|
146
|
+
L2T_STARS_model_directory = join(working_directory, STARS_MODEL_DIRECTORY)
|
147
147
|
L2T_STARS_model_directory = abspath(expanduser(L2T_STARS_model_directory))
|
148
148
|
|
149
149
|
# Determine executable filename
|
@@ -159,7 +159,7 @@ def generate_downloader_runconfig(
|
|
159
159
|
|
160
160
|
# Set build ID
|
161
161
|
if build is None:
|
162
|
-
build =
|
162
|
+
build = BUILD
|
163
163
|
|
164
164
|
# Set processing node
|
165
165
|
if processing_node is None:
|
ECOv003_L2T_STARS/L2T_STARS.py
CHANGED
@@ -10,10 +10,12 @@ import colored_logging as cl
|
|
10
10
|
import pandas as pd
|
11
11
|
from dateutil import parser
|
12
12
|
|
13
|
+
from sentinel_tiles import sentinel_tiles
|
14
|
+
|
13
15
|
# Custom modules for Harmonized Landsat Sentinel (HLS) and ECOSTRESS data
|
14
16
|
from harmonized_landsat_sentinel import (
|
15
17
|
CMRServerUnreachable,
|
16
|
-
|
18
|
+
HLS2Connection,
|
17
19
|
HLSTileNotAvailable,
|
18
20
|
HLSSentinelMissing,
|
19
21
|
HLSLandsatMissing,
|
@@ -44,20 +46,20 @@ logger = logging.getLogger(__name__)
|
|
44
46
|
def L2T_STARS(
|
45
47
|
runconfig_filename: str,
|
46
48
|
date_UTC: Union[date, str] = None,
|
47
|
-
spinup_days: int =
|
48
|
-
target_resolution: int =
|
49
|
-
NDVI_resolution: int =
|
50
|
-
albedo_resolution: int =
|
51
|
-
use_VNP43NRT: bool =
|
52
|
-
calibrate_fine: bool =
|
53
|
-
sources_only: bool =
|
54
|
-
remove_input_staging: bool =
|
55
|
-
remove_prior: bool =
|
56
|
-
remove_posterior: bool =
|
57
|
-
initialize_julia: bool =
|
58
|
-
threads: Union[int, str] =
|
59
|
-
num_workers: int =
|
60
|
-
overwrite: bool =
|
49
|
+
spinup_days: int = SPINUP_DAYS,
|
50
|
+
target_resolution: int = TARGET_RESOLUTION,
|
51
|
+
NDVI_resolution: int = NDVI_RESOLUTION,
|
52
|
+
albedo_resolution: int = ALBEDO_RESOLUTION,
|
53
|
+
use_VNP43NRT: bool = USE_VNP43NRT,
|
54
|
+
calibrate_fine: bool = CALIBRATE_FINE,
|
55
|
+
sources_only: bool = SOURCES_ONLY,
|
56
|
+
remove_input_staging: bool = REMOVE_INPUT_STAGING,
|
57
|
+
remove_prior: bool = REMOVE_PRIOR,
|
58
|
+
remove_posterior: bool = REMOVE_POSTERIOR,
|
59
|
+
initialize_julia: bool = INITIALIZE_JULIA,
|
60
|
+
threads: Union[int, str] = THREADS,
|
61
|
+
num_workers: int = WORKERS,
|
62
|
+
overwrite: bool = OVERWRITE, # New parameter for overwriting existing files
|
61
63
|
) -> int:
|
62
64
|
"""
|
63
65
|
ECOSTRESS Collection 3 L2T_STARS PGE (Product Generation Executive).
|
@@ -217,27 +219,27 @@ def L2T_STARS(
|
|
217
219
|
prior_date_UTC = prior.prior_date_UTC
|
218
220
|
|
219
221
|
# Define various product and download directories
|
220
|
-
products_directory = join(working_directory,
|
222
|
+
products_directory = join(working_directory, STARS_PRODUCTS_DIRECTORY)
|
221
223
|
logger.info(f"STARS products directory: {cl.dir(products_directory)}")
|
222
|
-
HLS_download_directory = join(sources_directory,
|
224
|
+
HLS_download_directory = join(sources_directory, HLS_DOWNLOAD_DIRECTORY)
|
223
225
|
logger.info(f"HLS download directory: {cl.dir(HLS_download_directory)}")
|
224
|
-
HLS_products_directory = join(sources_directory,
|
226
|
+
HLS_products_directory = join(sources_directory, HLS_PRODUCTS_DIRECTORY)
|
225
227
|
logger.info(f"HLS products directory: {cl.dir(HLS_products_directory)}")
|
226
|
-
VIIRS_download_directory = join(sources_directory,
|
228
|
+
VIIRS_download_directory = join(sources_directory, VIIRS_DOWNLOAD_DIRECTORY)
|
227
229
|
logger.info(f"VIIRS download directory: {cl.dir(VIIRS_download_directory)}")
|
228
|
-
VIIRS_products_directory = join(sources_directory,
|
230
|
+
VIIRS_products_directory = join(sources_directory, VIIRS_PRODUCTS_DIRECTORY)
|
229
231
|
logger.info(f"VIIRS products directory: {cl.dir(VIIRS_products_directory)}")
|
230
|
-
VIIRS_mosaic_directory = join(sources_directory,
|
232
|
+
VIIRS_mosaic_directory = join(sources_directory, VIIRS_MOSAIC_DIRECTORY)
|
231
233
|
logger.info(f"VIIRS mosaic directory: {cl.dir(VIIRS_mosaic_directory)}")
|
232
|
-
GEOS5FP_download_directory = join(sources_directory,
|
234
|
+
GEOS5FP_download_directory = join(sources_directory, GEOS5FP_DOWNLOAD_DIRECTORY)
|
233
235
|
logger.info(f"GEOS-5 FP download directory: {cl.dir(GEOS5FP_download_directory)}")
|
234
|
-
GEOS5FP_products_directory = join(sources_directory,
|
236
|
+
GEOS5FP_products_directory = join(sources_directory, GEOS5FP_PRODUCTS_DIRECTORY)
|
235
237
|
logger.info(f"GEOS-5 FP products directory: {cl.dir(GEOS5FP_products_directory)}")
|
236
|
-
VNP09GA_products_directory = join(sources_directory,
|
238
|
+
VNP09GA_products_directory = join(sources_directory, VNP09GA_PRODUCTS_DIRECTORY)
|
237
239
|
logger.info(f"VNP09GA products directory: {cl.dir(VNP09GA_products_directory)}")
|
238
|
-
VNP43NRT_products_directory = join(sources_directory,
|
240
|
+
VNP43NRT_products_directory = join(sources_directory, VNP43NRT_PRODUCTS_DIRECTORY)
|
239
241
|
logger.info(f"VNP43NRT products directory: {cl.dir(VNP43NRT_products_directory)}")
|
240
|
-
DOWNSAMPLED_products_directory = join(sources_directory,
|
242
|
+
DOWNSAMPLED_products_directory = join(sources_directory, STARS_DOWNSAMPLED_DIRECTORY)
|
241
243
|
logger.info(f"DOWNSAMPLED products directory: {cl.dir(DOWNSAMPLED_products_directory)}")
|
242
244
|
|
243
245
|
# Re-check for existing product (double-check in case another process created it) with overwrite option
|
@@ -255,7 +257,7 @@ def L2T_STARS(
|
|
255
257
|
# Initialize HLS data connection
|
256
258
|
logger.info(f"Connecting to CMR Search server: {CMR_SEARCH_URL}")
|
257
259
|
try:
|
258
|
-
HLS_connection =
|
260
|
+
HLS_connection = HLS2Connection(
|
259
261
|
working_directory=working_directory,
|
260
262
|
download_directory=HLS_download_directory,
|
261
263
|
# products_directory=HLS_products_directory,
|
@@ -268,7 +270,7 @@ def L2T_STARS(
|
|
268
270
|
)
|
269
271
|
|
270
272
|
# Check if the tile is on land (HLS tiles cover land and ocean, STARS is for land)
|
271
|
-
if not
|
273
|
+
if not sentinel_tiles.land(tile=tile):
|
272
274
|
raise LandFilter(f"Sentinel tile {tile} is not on land. Skipping processing.")
|
273
275
|
|
274
276
|
# Initialize VIIRS data connections based on 'use_VNP43NRT' flag
|