ECOv003-L2T-STARS 1.2.0__py3-none-any.whl → 1.4.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/L2T_STARS.py +9 -24
- ECOv003_L2T_STARS/LPDAAC/LPDAACDataPool.py +42 -40
- ECOv003_L2T_STARS/Project.toml +0 -4
- ECOv003_L2T_STARS/VIIRS/VNP09GA.py +5 -4
- ECOv003_L2T_STARS/VNP43NRT/VNP43NRT.py +9 -4
- ECOv003_L2T_STARS/__init__.py +1 -1
- ECOv003_L2T_STARS/cksum.py +66 -0
- ECOv003_L2T_STARS/constants.py +1 -0
- ECOv003_L2T_STARS/exceptions.py +2 -0
- ECOv003_L2T_STARS/generate_STARS_inputs.py +105 -103
- ECOv003_L2T_STARS/generate_downsampled_filename.py +20 -0
- ECOv003_L2T_STARS/{instantiate_STARS_jl.py → instantiate_STARSDataFusion_jl.py} +3 -3
- ECOv003_L2T_STARS/load_prior.py +4 -4
- ECOv003_L2T_STARS/login.py +61 -0
- ECOv003_L2T_STARS/{ECOv003_L2T_STARS.py → main.py} +7 -0
- ECOv003_L2T_STARS/process_ECOSTRESS_data_fusion_distributed_bias.jl +19 -26
- ECOv003_L2T_STARS/process_STARS_product.py +26 -40
- ECOv003_L2T_STARS/process_julia_data_fusion.py +10 -8
- {ecov003_l2t_stars-1.2.0.dist-info → ecov003_l2t_stars-1.4.0.dist-info}/METADATA +1 -2
- {ecov003_l2t_stars-1.2.0.dist-info → ecov003_l2t_stars-1.4.0.dist-info}/RECORD +24 -26
- ecov003_l2t_stars-1.4.0.dist-info/entry_points.txt +3 -0
- ECOv003_L2T_STARS/VIIRS/VIIRS_CMR_LOGIN.py +0 -36
- ECOv003_L2T_STARS/generate_NDVI_coarse_directory.py +0 -21
- ECOv003_L2T_STARS/generate_NDVI_fine_directory.py +0 -14
- ECOv003_L2T_STARS/generate_albedo_coarse_directory.py +0 -18
- ECOv003_L2T_STARS/generate_albedo_fine_directory.py +0 -17
- ECOv003_L2T_STARS/install_STARS_jl.py +0 -43
- ecov003_l2t_stars-1.2.0.dist-info/entry_points.txt +0 -3
- {ecov003_l2t_stars-1.2.0.dist-info → ecov003_l2t_stars-1.4.0.dist-info}/WHEEL +0 -0
- {ecov003_l2t_stars-1.2.0.dist-info → ecov003_l2t_stars-1.4.0.dist-info}/licenses/LICENSE +0 -0
- {ecov003_l2t_stars-1.2.0.dist-info → ecov003_l2t_stars-1.4.0.dist-info}/top_level.txt +0 -0
@@ -17,10 +17,6 @@ from ECOv003_granules import L2TSTARS, NDVI_COLORMAP, ALBEDO_COLORMAP
|
|
17
17
|
from ECOv003_exit_codes import BlankOutput
|
18
18
|
|
19
19
|
from .VIIRS import VIIRSDownloaderNDVI, VIIRSDownloaderAlbedo
|
20
|
-
from .generate_NDVI_coarse_directory import generate_NDVI_coarse_directory
|
21
|
-
from .generate_NDVI_fine_directory import generate_NDVI_fine_directory
|
22
|
-
from .generate_albedo_coarse_directory import generate_albedo_coarse_directory
|
23
|
-
from .generate_albedo_fine_directory import generate_albedo_fine_directory
|
24
20
|
from .generate_model_state_tile_date_directory import generate_model_state_tile_date_directory
|
25
21
|
from .generate_STARS_inputs import generate_STARS_inputs
|
26
22
|
from .generate_filename import generate_filename
|
@@ -43,7 +39,7 @@ def process_STARS_product(
|
|
43
39
|
NDVI_resolution: int,
|
44
40
|
albedo_resolution: int,
|
45
41
|
target_resolution: int,
|
46
|
-
|
42
|
+
downsampled_directory: str,
|
47
43
|
model_directory: str,
|
48
44
|
input_staging_directory: str,
|
49
45
|
L2T_STARS_granule_directory: str,
|
@@ -59,6 +55,7 @@ def process_STARS_product(
|
|
59
55
|
remove_input_staging: bool = True,
|
60
56
|
remove_prior: bool = True,
|
61
57
|
remove_posterior: bool = True,
|
58
|
+
initialize_julia: bool = False,
|
62
59
|
threads: Union[int, str] = "auto",
|
63
60
|
num_workers: int = 4,
|
64
61
|
):
|
@@ -103,6 +100,8 @@ def process_STARS_product(
|
|
103
100
|
Defaults to True.
|
104
101
|
remove_posterior (bool, optional): If True, remove posterior intermediate files after
|
105
102
|
product generation. Defaults to True.
|
103
|
+
initialize_julia (bool, optional): If True, create a julia environment to run STARS in
|
104
|
+
as opposed to the default julia env. Defaults to False.
|
106
105
|
threads (Union[int, str], optional): Number of Julia threads to use, or "auto".
|
107
106
|
Defaults to "auto".
|
108
107
|
num_workers (int, str): Number of Julia workers for distributed processing.
|
@@ -117,27 +116,6 @@ def process_STARS_product(
|
|
117
116
|
|
118
117
|
logger.info(f"Processing the L2T_STARS product at tile {cl.place(tile)} for date {cl.time(date_UTC)}")
|
119
118
|
|
120
|
-
# Define and create input staging directories for coarse and fine NDVI/albedo
|
121
|
-
NDVI_coarse_directory = generate_NDVI_coarse_directory(
|
122
|
-
input_staging_directory=input_staging_directory, tile=tile
|
123
|
-
)
|
124
|
-
logger.info(f"Staging coarse NDVI images: {cl.dir(NDVI_coarse_directory)}")
|
125
|
-
|
126
|
-
NDVI_fine_directory = generate_NDVI_fine_directory(
|
127
|
-
input_staging_directory=input_staging_directory, tile=tile
|
128
|
-
)
|
129
|
-
logger.info(f"Staging fine NDVI images: {cl.dir(NDVI_fine_directory)}")
|
130
|
-
|
131
|
-
albedo_coarse_directory = generate_albedo_coarse_directory(
|
132
|
-
input_staging_directory=input_staging_directory, tile=tile
|
133
|
-
)
|
134
|
-
logger.info(f"Staging coarse albedo images: {cl.dir(albedo_coarse_directory)}")
|
135
|
-
|
136
|
-
albedo_fine_directory = generate_albedo_fine_directory(
|
137
|
-
input_staging_directory=input_staging_directory, tile=tile
|
138
|
-
)
|
139
|
-
logger.info(f"Staging fine albedo images: {cl.dir(albedo_fine_directory)}")
|
140
|
-
|
141
119
|
# Define and create the directory for storing posterior model state files
|
142
120
|
posterior_tile_date_directory = generate_model_state_tile_date_directory(
|
143
121
|
model_directory=model_directory, tile=tile, date_UTC=date_UTC
|
@@ -157,11 +135,7 @@ def process_STARS_product(
|
|
157
135
|
target_resolution=target_resolution,
|
158
136
|
NDVI_coarse_geometry=NDVI_coarse_geometry,
|
159
137
|
albedo_coarse_geometry=albedo_coarse_geometry,
|
160
|
-
|
161
|
-
NDVI_coarse_directory=NDVI_coarse_directory,
|
162
|
-
NDVI_fine_directory=NDVI_fine_directory,
|
163
|
-
albedo_coarse_directory=albedo_coarse_directory,
|
164
|
-
albedo_fine_directory=albedo_fine_directory,
|
138
|
+
downsampled_directory=downsampled_directory,
|
165
139
|
HLS_connection=HLS_connection,
|
166
140
|
NDVI_VIIRS_connection=NDVI_VIIRS_connection,
|
167
141
|
albedo_VIIRS_connection=albedo_VIIRS_connection,
|
@@ -226,8 +200,8 @@ def process_STARS_product(
|
|
226
200
|
VIIRS_end_date=VIIRS_end_date,
|
227
201
|
HLS_start_date=HLS_start_date,
|
228
202
|
HLS_end_date=HLS_end_date,
|
229
|
-
|
230
|
-
|
203
|
+
downsampled_directory=downsampled_directory,
|
204
|
+
product_name="NDVI",
|
231
205
|
posterior_filename=posterior_NDVI_filename,
|
232
206
|
posterior_UQ_filename=posterior_NDVI_UQ_filename,
|
233
207
|
posterior_flag_filename=posterior_NDVI_flag_filename,
|
@@ -237,6 +211,7 @@ def process_STARS_product(
|
|
237
211
|
prior_UQ_filename=prior.prior_NDVI_UQ_filename,
|
238
212
|
prior_bias_filename=prior.prior_NDVI_bias_filename,
|
239
213
|
prior_bias_UQ_filename=prior.prior_NDVI_bias_UQ_filename,
|
214
|
+
initialize_julia=initialize_julia,
|
240
215
|
threads=threads,
|
241
216
|
num_workers=num_workers,
|
242
217
|
)
|
@@ -250,13 +225,14 @@ def process_STARS_product(
|
|
250
225
|
VIIRS_end_date=VIIRS_end_date,
|
251
226
|
HLS_start_date=HLS_start_date,
|
252
227
|
HLS_end_date=HLS_end_date,
|
253
|
-
|
254
|
-
|
228
|
+
downsampled_directory=downsampled_directory,
|
229
|
+
product_name="NDVI",
|
255
230
|
posterior_filename=posterior_NDVI_filename,
|
256
231
|
posterior_UQ_filename=posterior_NDVI_UQ_filename,
|
257
232
|
posterior_flag_filename=posterior_NDVI_flag_filename,
|
258
233
|
posterior_bias_filename=posterior_NDVI_bias_filename,
|
259
234
|
posterior_bias_UQ_filename=posterior_NDVI_bias_UQ_filename,
|
235
|
+
initialize_julia=initialize_julia,
|
260
236
|
threads=threads,
|
261
237
|
num_workers=num_workers,
|
262
238
|
)
|
@@ -264,6 +240,8 @@ def process_STARS_product(
|
|
264
240
|
# Open the resulting NDVI rasters
|
265
241
|
NDVI = Raster.open(posterior_NDVI_filename)
|
266
242
|
NDVI_UQ = Raster.open(posterior_NDVI_UQ_filename)
|
243
|
+
NDVI_bias = Raster.open(posterior_NDVI_bias_filename)
|
244
|
+
NDVI_UQ_bias = Raster.open(posterior_NDVI_bias_UQ_filename)
|
267
245
|
NDVI_flag = Raster.open(posterior_NDVI_flag_filename)
|
268
246
|
|
269
247
|
# --- Process Albedo Data Fusion ---
|
@@ -324,8 +302,8 @@ def process_STARS_product(
|
|
324
302
|
VIIRS_end_date=VIIRS_end_date,
|
325
303
|
HLS_start_date=HLS_start_date,
|
326
304
|
HLS_end_date=HLS_end_date,
|
327
|
-
|
328
|
-
|
305
|
+
downsampled_directory=downsampled_directory,
|
306
|
+
product_name="albedo",
|
329
307
|
posterior_filename=posterior_albedo_filename,
|
330
308
|
posterior_UQ_filename=posterior_albedo_UQ_filename,
|
331
309
|
posterior_flag_filename=posterior_albedo_flag_filename,
|
@@ -335,6 +313,7 @@ def process_STARS_product(
|
|
335
313
|
prior_UQ_filename=prior.prior_albedo_UQ_filename,
|
336
314
|
prior_bias_filename=prior.prior_albedo_bias_filename,
|
337
315
|
prior_bias_UQ_filename=prior.prior_albedo_bias_UQ_filename,
|
316
|
+
initialize_julia=initialize_julia,
|
338
317
|
threads=threads,
|
339
318
|
num_workers=num_workers,
|
340
319
|
)
|
@@ -348,13 +327,14 @@ def process_STARS_product(
|
|
348
327
|
VIIRS_end_date=VIIRS_end_date,
|
349
328
|
HLS_start_date=HLS_start_date,
|
350
329
|
HLS_end_date=HLS_end_date,
|
351
|
-
|
352
|
-
|
330
|
+
downsampled_directory=downsampled_directory,
|
331
|
+
product_name="albedo",
|
353
332
|
posterior_filename=posterior_albedo_filename,
|
354
333
|
posterior_UQ_filename=posterior_albedo_UQ_filename,
|
355
334
|
posterior_flag_filename=posterior_albedo_flag_filename,
|
356
335
|
posterior_bias_filename=posterior_albedo_bias_filename,
|
357
336
|
posterior_bias_UQ_filename=posterior_albedo_bias_UQ_filename,
|
337
|
+
initialize_julia=initialize_julia,
|
358
338
|
threads=threads,
|
359
339
|
num_workers=num_workers,
|
360
340
|
)
|
@@ -362,6 +342,8 @@ def process_STARS_product(
|
|
362
342
|
# Open the resulting albedo rasters
|
363
343
|
albedo = Raster.open(posterior_albedo_filename)
|
364
344
|
albedo_UQ = Raster.open(posterior_albedo_UQ_filename)
|
345
|
+
albedo_bias = Raster.open(posterior_albedo_bias_filename)
|
346
|
+
albedo_UQ_bias = Raster.open(posterior_albedo_bias_UQ_filename)
|
365
347
|
albedo_flag = Raster.open(posterior_albedo_flag_filename)
|
366
348
|
|
367
349
|
# --- Validate Output and Create Final Product ---
|
@@ -391,9 +373,13 @@ def process_STARS_product(
|
|
391
373
|
# Add the generated layers to the granule object
|
392
374
|
granule.add_layer("NDVI", NDVI, cmap=NDVI_COLORMAP)
|
393
375
|
granule.add_layer("NDVI-UQ", NDVI_UQ, cmap="jet")
|
376
|
+
granule.add_layer("NDVI-bias", NDVI_bias, cmap="viridis")
|
377
|
+
granule.add_layer("NDVI-UQ-bias", NDVI_UQ_bias, cmap="viridis")
|
394
378
|
granule.add_layer("NDVI-flag", NDVI_flag, cmap="jet")
|
395
379
|
granule.add_layer("albedo", albedo, cmap=ALBEDO_COLORMAP)
|
396
380
|
granule.add_layer("albedo-UQ", albedo_UQ, cmap="jet")
|
381
|
+
granule.add_layer("albedo-bias", albedo_bias, cmap="viridis")
|
382
|
+
granule.add_layer("albedo-UQ-bias", albedo_UQ_bias, cmap="viridis")
|
397
383
|
granule.add_layer("albedo-flag", albedo_flag, cmap="jet")
|
398
384
|
|
399
385
|
# Update metadata and write to the granule
|
@@ -468,7 +454,7 @@ def process_STARS_product(
|
|
468
454
|
if remove_input_staging:
|
469
455
|
if exists(input_staging_directory):
|
470
456
|
logger.info(f"Removing input staging directory: {cl.dir(input_staging_directory)}")
|
471
|
-
shutil.rmtree(input_staging_directory)
|
457
|
+
shutil.rmtree(input_staging_directory, ignore_errors=True)
|
472
458
|
|
473
459
|
if using_prior and remove_prior:
|
474
460
|
# Remove prior intermediate files only if they exist
|
@@ -4,7 +4,7 @@ from datetime import date
|
|
4
4
|
from os.path import abspath, dirname, join, exists
|
5
5
|
import logging
|
6
6
|
|
7
|
-
from .
|
7
|
+
from .instantiate_STARSDataFusion_jl import instantiate_STARSDataFusion_jl
|
8
8
|
|
9
9
|
logger = logging.getLogger(__name__)
|
10
10
|
|
@@ -16,8 +16,8 @@ def process_julia_data_fusion(
|
|
16
16
|
VIIRS_end_date: date,
|
17
17
|
HLS_start_date: date,
|
18
18
|
HLS_end_date: date,
|
19
|
-
|
20
|
-
|
19
|
+
downsampled_directory: str,
|
20
|
+
product_name: str,
|
21
21
|
posterior_filename: str,
|
22
22
|
posterior_UQ_filename: str,
|
23
23
|
posterior_flag_filename: str,
|
@@ -28,6 +28,7 @@ def process_julia_data_fusion(
|
|
28
28
|
prior_bias_filename: str = None,
|
29
29
|
prior_bias_UQ_filename: str = None,
|
30
30
|
environment_name: str = "@ECOv003-L2T-STARS", # Unused in current Julia command, but kept for consistency
|
31
|
+
initialize_julia: bool = False,
|
31
32
|
threads: Union[int, str] = "auto",
|
32
33
|
num_workers: int = 4):
|
33
34
|
"""
|
@@ -46,8 +47,8 @@ def process_julia_data_fusion(
|
|
46
47
|
VIIRS_end_date (date): End date for VIIRS data processing.
|
47
48
|
HLS_start_date (date): Start date for HLS data processing.
|
48
49
|
HLS_end_date (date): End date for HLS data processing.
|
49
|
-
|
50
|
-
|
50
|
+
downsampled_directory (str): Directory containing coarse and fine downsampled data.
|
51
|
+
product_name (str): Name of the product, e.g. "NDVI" or "albedo"
|
51
52
|
posterior_filename (str): Output path for the fused posterior mean image.
|
52
53
|
posterior_UQ_filename (str): Output path for the fused posterior uncertainty image.
|
53
54
|
posterior_flag_filename (str): Output path for the fused posterior flag image.
|
@@ -71,15 +72,16 @@ def process_julia_data_fusion(
|
|
71
72
|
STARS_source_directory = abspath(dirname(__file__))
|
72
73
|
|
73
74
|
# Instantiate Julia dependencies
|
74
|
-
|
75
|
+
if initialize_julia:
|
76
|
+
instantiate_STARSDataFusion_jl(STARS_source_directory)
|
75
77
|
|
76
78
|
# Base Julia command with required arguments
|
77
79
|
command = (
|
78
80
|
f'export JULIA_NUM_THREADS={threads}; julia --threads {threads} '
|
79
81
|
f'"{julia_script_filename}" {num_workers} "{tile}" "{coarse_cell_size}" '
|
80
82
|
f'"{fine_cell_size}" "{VIIRS_start_date}" "{VIIRS_end_date}" '
|
81
|
-
f'"{HLS_start_date}" "{HLS_end_date}" "{
|
82
|
-
f'"{
|
83
|
+
f'"{HLS_start_date}" "{HLS_end_date}" "{downsampled_directory}" '
|
84
|
+
f'"{product_name}" "{posterior_filename}" "{posterior_UQ_filename}" '
|
83
85
|
f'"{posterior_flag_filename}" "{posterior_bias_filename}" '
|
84
86
|
f'"{posterior_bias_UQ_filename}"'
|
85
87
|
)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: ECOv003-L2T-STARS
|
3
|
-
Version: 1.
|
3
|
+
Version: 1.4.0
|
4
4
|
Summary: ECOSTRESS Collection 3 JPL STARS Data Fusion Product Generating Executable (PGE)
|
5
5
|
Author-email: "Gregory H. Halverson" <gregory.h.halverson@jpl.nasa.gov>
|
6
6
|
Project-URL: Homepage, https://github.com/ECOSTRESS-Collection-3/ECOv003-L2T-STARS
|
@@ -21,7 +21,6 @@ Requires-Dist: matplotlib
|
|
21
21
|
Requires-Dist: modland
|
22
22
|
Requires-Dist: numpy
|
23
23
|
Requires-Dist: pandas
|
24
|
-
Requires-Dist: pycksum
|
25
24
|
Requires-Dist: pytictoc
|
26
25
|
Requires-Dist: rasters
|
27
26
|
Requires-Dist: scikit-image
|
@@ -1,35 +1,34 @@
|
|
1
1
|
ECOv003_L2T_STARS/ECOv003_DL.py,sha256=7ECuYIPMDsgptcAIcC2lgfvn-ljvPJHQ9tNPnMRxkIQ,24590
|
2
2
|
ECOv003_L2T_STARS/ECOv003_DL.xml,sha256=TQxOlTJHnjcRf9RiAGVJe2mIS-ks6WL32Ze33z0_kxA,2032
|
3
|
-
ECOv003_L2T_STARS/ECOv003_L2T_STARS.py,sha256=Jgiwd2TRCMq37FiEA-JECJZQKLBm34oytIWS9PG_x30,5891
|
4
3
|
ECOv003_L2T_STARS/ECOv003_L2T_STARS.xml,sha256=Sg6GJx5PO1TVMIpGCDb4gatcShLRa6yBMwxwHKAWNKw,2084
|
5
4
|
ECOv003_L2T_STARS/L2TSTARSConfig.py,sha256=pH5WAzjfUdlam8Ngi2hxmT8Sect5bi2D6cP9HbpM_Tw,8849
|
6
|
-
ECOv003_L2T_STARS/L2T_STARS.py,sha256=
|
5
|
+
ECOv003_L2T_STARS/L2T_STARS.py,sha256=eVuKTYdjKysmoyfm60CggkWE8Dh05_GuSOauBLZzZV0,24660
|
7
6
|
ECOv003_L2T_STARS/Manifest.toml,sha256=k6dzN8jpePGBIPqTkKFsYDv5ezV3DgO4ChHss_cI524,84043
|
8
|
-
ECOv003_L2T_STARS/Project.toml,sha256=
|
9
|
-
ECOv003_L2T_STARS/__init__.py,sha256=
|
7
|
+
ECOv003_L2T_STARS/Project.toml,sha256=9-grsavASN_a3dNHcG4vc6-iulhK6Gdmmh1VkKRxnGM,471
|
8
|
+
ECOv003_L2T_STARS/__init__.py,sha256=fdYigR4HXHd-NYUCafBD4GTqXUQV5LK337bJVN556fA,91
|
10
9
|
ECOv003_L2T_STARS/calibrate_fine_to_coarse.py,sha256=2YQHo0hO5EuvGt6TOF_1WypiqNDAR5gjvs0cYe9F_vQ,2345
|
11
|
-
ECOv003_L2T_STARS/
|
10
|
+
ECOv003_L2T_STARS/cksum.py,sha256=Cw3FHD39Osrb4c9Dc1jSUB1SZaxIJsWHqsNVeWwYokA,1823
|
11
|
+
ECOv003_L2T_STARS/constants.py,sha256=-kxJuhupaxeDnMziTabwf2exFTtTm_-0Xp_eKAIaf3M,2057
|
12
|
+
ECOv003_L2T_STARS/exceptions.py,sha256=ypahdRaZVMIoQrHUIZXiwzDNeLaCH46rUAfs_8MHKBE,48
|
12
13
|
ECOv003_L2T_STARS/generate_L2T_STARS_runconfig.py,sha256=gyU0-xjkC0bZcK9NeoFwLaXjNJhsSrVD2YnxLVLVLJs,11142
|
13
|
-
ECOv003_L2T_STARS/generate_NDVI_coarse_directory.py,sha256=i1pFHFyMuj2e6aQ2wTgrF2-rAQXWe8LE2mbCRksj3c8,590
|
14
14
|
ECOv003_L2T_STARS/generate_NDVI_coarse_image.py,sha256=9XBBV1FFqjxkEFnr61xr9R2tnHQAlx2XN9KzLN8RApc,1215
|
15
|
-
ECOv003_L2T_STARS/generate_NDVI_fine_directory.py,sha256=rCYfGd_X1fLYsOfl9LtfS3E57FLDa-a_8G46ToQFM2U,531
|
16
15
|
ECOv003_L2T_STARS/generate_NDVI_fine_image.py,sha256=V-v2slDYEYf1scJCvxb3tZ6IvdpJTHuDPg6l_gNaoQI,911
|
17
|
-
ECOv003_L2T_STARS/generate_STARS_inputs.py,sha256=
|
18
|
-
ECOv003_L2T_STARS/generate_albedo_coarse_directory.py,sha256=7DLfI45L8tpXMG4CnZasJi1U7AN3HnA24Rcz8hy3Qy4,563
|
16
|
+
ECOv003_L2T_STARS/generate_STARS_inputs.py,sha256=NxKN822IPTquMeDLNSCaMai6aJUQekol8IEh_yRnFK0,11135
|
19
17
|
ECOv003_L2T_STARS/generate_albedo_coarse_image.py,sha256=nBOKiWVsRnQ2TeOktWVfZbwVy9cOCa2QeP_8H0QDWrA,1162
|
20
|
-
ECOv003_L2T_STARS/generate_albedo_fine_directory.py,sha256=0PaoccD0ktwzoUUMEd3zDWAP4Ed6nfyLRMUGaqHDrCA,554
|
21
18
|
ECOv003_L2T_STARS/generate_albedo_fine_image.py,sha256=mXXprX9jQ5aOXFjBIXFB6j-O4X4j9V_4_BYIUAuLbpQ,923
|
19
|
+
ECOv003_L2T_STARS/generate_downsampled_filename.py,sha256=rAAEYehfME6G6k0KkJgj4H9itmQNh-vVTIXauFiTHtk,675
|
22
20
|
ECOv003_L2T_STARS/generate_filename.py,sha256=XppMoRiKBG1Rf-uWu95UCO1klK6uv5GdK9pvg3gDmnk,1359
|
23
21
|
ECOv003_L2T_STARS/generate_input_staging_directory.py,sha256=TlFKYliu6BbfDGLlwD0nlt0AZzDwKWeEgeTtzmicElY,800
|
24
22
|
ECOv003_L2T_STARS/generate_model_state_tile_date_directory.py,sha256=U9d7vcuA1Udq6tuyRKUIibfoOPsJKV5dp5AWT7qLcfc,939
|
25
23
|
ECOv003_L2T_STARS/generate_output_directory.py,sha256=Dr1zX6ljYzxFgC9XkocYBiF5aMGggHJejtpI9hbLwlM,889
|
26
|
-
ECOv003_L2T_STARS/
|
27
|
-
ECOv003_L2T_STARS/
|
28
|
-
ECOv003_L2T_STARS/
|
24
|
+
ECOv003_L2T_STARS/instantiate_STARSDataFusion_jl.py,sha256=B-N_tlSBY7DQ2gZK6mPtJ8WL8XCXA_edMDEOu2xldcs,1437
|
25
|
+
ECOv003_L2T_STARS/load_prior.py,sha256=e26JqLhcr2V5FW_02qduUbRlEZc6pTf3jIAAT5Sog0s,11125
|
26
|
+
ECOv003_L2T_STARS/login.py,sha256=zInQL33NibC8fNGzLw9qk0MDay71KYk87V-UsV-gkwA,1945
|
27
|
+
ECOv003_L2T_STARS/main.py,sha256=k4a1Kp51i00LuxIY3wrb4Xpwja6y9Cu_gj32AauzsEE,6131
|
29
28
|
ECOv003_L2T_STARS/prior.py,sha256=fLE54pBIOG6sCas1G60nhn8LcHa2AqZ_eSY_J-MB4eM,2867
|
30
|
-
ECOv003_L2T_STARS/process_ECOSTRESS_data_fusion_distributed_bias.jl,sha256=
|
31
|
-
ECOv003_L2T_STARS/process_STARS_product.py,sha256=
|
32
|
-
ECOv003_L2T_STARS/process_julia_data_fusion.py,sha256=
|
29
|
+
ECOv003_L2T_STARS/process_ECOSTRESS_data_fusion_distributed_bias.jl,sha256=OuMd-Y_zNQJStecIPRwz9_5N5Loh8JVmkhBLFu1nlNs,16089
|
30
|
+
ECOv003_L2T_STARS/process_STARS_product.py,sha256=vzve47IN1lcrxmNSVvfHAq1NnKej6QTIrBW9GhlHx1c,21882
|
31
|
+
ECOv003_L2T_STARS/process_julia_data_fusion.py,sha256=lpChy2WJBQAvaJXa3PJFLwItQzlRqj1Z13EBaQLB40s,5341
|
33
32
|
ECOv003_L2T_STARS/retrieve_STARS_sources.py,sha256=s6026PQ5PRQTPFgjrDa4vgbHa8OqUanBqn0Wdoq0DbA,3838
|
34
33
|
ECOv003_L2T_STARS/runconfig.py,sha256=TLaB3w6Y0qEZPqMa-YXuUzKSACrdpKmrozUNLh70aQw,1519
|
35
34
|
ECOv003_L2T_STARS/version.py,sha256=CcCeNt2pNqb8AQ_vHLUbLJciE8hxTMeGmN79vAYObYQ,354
|
@@ -39,18 +38,17 @@ ECOv003_L2T_STARS/BRDF/SZA.py,sha256=_J5ybmrg8ASVglXp4OvSoVutkDVeSxDBygfTe848sww
|
|
39
38
|
ECOv003_L2T_STARS/BRDF/__init__.py,sha256=7HYw9eTuudpkgtpXAjFN1CpPjr6R9JsnW3bLtNBdRSM,20
|
40
39
|
ECOv003_L2T_STARS/BRDF/statistical_radiative_transport.txt,sha256=KHIGS6afnY7m0CzHki4zeuwqttjK38jgZg8-oYDn68o,26999
|
41
40
|
ECOv003_L2T_STARS/BRDF/version.txt,sha256=atlhOkVXmNbZLl9fOQq0uqcFlryGntaxf1zdKyhjXwY,5
|
42
|
-
ECOv003_L2T_STARS/LPDAAC/LPDAACDataPool.py,sha256=
|
41
|
+
ECOv003_L2T_STARS/LPDAAC/LPDAACDataPool.py,sha256=WqIy0wcHhje1Dx8Uq0e8W_BsEJOJIchO4DroaGMsKes,16887
|
43
42
|
ECOv003_L2T_STARS/LPDAAC/__init__.py,sha256=o8qP8kTXyBp9dFKErVOwvcZuUo7BTVU0d5UyIsOKG8g,235
|
44
43
|
ECOv003_L2T_STARS/LPDAAC/version.txt,sha256=2_CXjsK1h6XWGH_cxBzOn_LA647vrboOtR84QKtu60Y,5
|
45
44
|
ECOv003_L2T_STARS/VIIRS/VIIRSDataPool.py,sha256=mht104y3ayLysElKf9IgaqX78I0Q-4NJJmfCxMgxDzs,8781
|
46
45
|
ECOv003_L2T_STARS/VIIRS/VIIRSDownloader.py,sha256=NCf3ZItLIBkZOZugYHuQMurziAsH7LbhLKbg-ZbWC7g,616
|
47
|
-
ECOv003_L2T_STARS/VIIRS/
|
48
|
-
ECOv003_L2T_STARS/VIIRS/VNP09GA.py,sha256=hRJF47KLqCxerwjQQY3wfCbotxW2qAKbe1BxCleyUAo,44162
|
46
|
+
ECOv003_L2T_STARS/VIIRS/VNP09GA.py,sha256=Tfv1sTigEjY6ksEdIWNQH02grr-bRRwW3N7O5IibyVk,44140
|
49
47
|
ECOv003_L2T_STARS/VIIRS/VNP43IA4.py,sha256=3qZbDHoLVhoiSr4hoojMxXXuDSNKkN4B9Dan-WMApNs,9881
|
50
48
|
ECOv003_L2T_STARS/VIIRS/VNP43MA3.py,sha256=T_1mxdg_SII0vXp_D422aAU7fE0-7TY46IZzRJPGJ1Q,11043
|
51
49
|
ECOv003_L2T_STARS/VIIRS/__init__.py,sha256=PVyb97Bg5gVMdcyC7JpErQCjJWSrOFdHJH4rNE__eL8,264
|
52
50
|
ECOv003_L2T_STARS/VIIRS/version.txt,sha256=Ke8b6aOkBgjuceFV64cco0Yw4jvu6a8pRBq6nQ6nbVQ,5
|
53
|
-
ECOv003_L2T_STARS/VNP43NRT/VNP43NRT.py,sha256=
|
51
|
+
ECOv003_L2T_STARS/VNP43NRT/VNP43NRT.py,sha256=qC6Ufvn6lQwTzchLucLgPUZsaLbMqTLPqTpHRYZBZxo,31719
|
54
52
|
ECOv003_L2T_STARS/VNP43NRT/__init__.py,sha256=8LkfUUFW0pyaO-1S134RnimfKYAKP6UfvzO7kPAx9mo,24
|
55
53
|
ECOv003_L2T_STARS/VNP43NRT/process_VNP43NRT.jl,sha256=pNa5Z0RcyXSul2pysPwEWwl1e6XuTX_XURqgJIsVfT8,7139
|
56
54
|
ECOv003_L2T_STARS/VNP43NRT/version.txt,sha256=atlhOkVXmNbZLl9fOQq0uqcFlryGntaxf1zdKyhjXwY,5
|
@@ -65,9 +63,9 @@ ECOv003_L2T_STARS/daterange/__init__.py,sha256=54kYb9tmsm5twxMqjJKeD__5kGkNDz3Pp
|
|
65
63
|
ECOv003_L2T_STARS/daterange/daterange.py,sha256=EHa2Xt9fiJ1gbX7aa_QV_br1rAXjg3pHrLSRasOsOhM,959
|
66
64
|
ECOv003_L2T_STARS/timer/__init__.py,sha256=I_MQKp_aamBLUzZv0psEbRgs6GZLOJd4mmJ7bli0Ikc,21
|
67
65
|
ECOv003_L2T_STARS/timer/timer.py,sha256=tn5e3NQmsh55Jp9Fstjf-8KJW4F8UIJs-d_ZLooFYE8,1610
|
68
|
-
ecov003_l2t_stars-1.
|
69
|
-
ecov003_l2t_stars-1.
|
70
|
-
ecov003_l2t_stars-1.
|
71
|
-
ecov003_l2t_stars-1.
|
72
|
-
ecov003_l2t_stars-1.
|
73
|
-
ecov003_l2t_stars-1.
|
66
|
+
ecov003_l2t_stars-1.4.0.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
67
|
+
ecov003_l2t_stars-1.4.0.dist-info/METADATA,sha256=9KUu-8OLwj-x1vFmYPZ3HkKApkftVJaWYYRDh-vmgp4,13283
|
68
|
+
ecov003_l2t_stars-1.4.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
69
|
+
ecov003_l2t_stars-1.4.0.dist-info/entry_points.txt,sha256=EVVKltKsqXBc94JIu4IjVrMP0DPqaNEdQoAgcZOApQQ,106
|
70
|
+
ecov003_l2t_stars-1.4.0.dist-info/top_level.txt,sha256=lRivA5MjbrabH4sv-LUstMGaLZ865wRQPpz9Kh6-plg,18
|
71
|
+
ecov003_l2t_stars-1.4.0.dist-info/RECORD,,
|
@@ -1,36 +0,0 @@
|
|
1
|
-
import netrc
|
2
|
-
import os
|
3
|
-
|
4
|
-
import earthaccess
|
5
|
-
|
6
|
-
_AUTH = None
|
7
|
-
|
8
|
-
class CMRServerUnreachable(Exception):
|
9
|
-
pass
|
10
|
-
|
11
|
-
def VIIRS_CMR_login() -> earthaccess.Auth:
|
12
|
-
"""
|
13
|
-
Login to Earthdata using netrc credentials if available, falling back to environment variables.
|
14
|
-
"""
|
15
|
-
# Only login to earthaccess once
|
16
|
-
global _AUTH
|
17
|
-
if _AUTH is not None:
|
18
|
-
return _AUTH
|
19
|
-
|
20
|
-
try:
|
21
|
-
# Attempt to use netrc for credentials
|
22
|
-
secrets = netrc.netrc()
|
23
|
-
auth = secrets.authenticators("urs.earthdata.nasa.gov")
|
24
|
-
if auth:
|
25
|
-
_AUTH = earthaccess.login(strategy="netrc") # Use strategy="netrc"
|
26
|
-
return _AUTH
|
27
|
-
|
28
|
-
# Fallback to environment variables if netrc fails
|
29
|
-
if "EARTHDATA_USERNAME" in os.environ and "EARTHDATA_PASSWORD" in os.environ:
|
30
|
-
_AUTH = earthaccess.login(strategy="environment")
|
31
|
-
return _AUTH
|
32
|
-
else:
|
33
|
-
raise CMRServerUnreachable("Missing netrc credentials or environment variables 'EARTHDATA_USERNAME' and 'EARTHDATA_PASSWORD'")
|
34
|
-
|
35
|
-
except Exception as e:
|
36
|
-
raise CMRServerUnreachable(e)
|
@@ -1,21 +0,0 @@
|
|
1
|
-
from .generate_input_staging_directory import generate_input_staging_directory
|
2
|
-
|
3
|
-
def generate_NDVI_coarse_directory(
|
4
|
-
input_staging_directory: str,
|
5
|
-
tile: str) -> str:
|
6
|
-
"""
|
7
|
-
Generates the specific staging directory for coarse NDVI images.
|
8
|
-
|
9
|
-
Args:
|
10
|
-
input_staging_directory (str): The base input staging directory.
|
11
|
-
tile (str): The HLS tile ID.
|
12
|
-
|
13
|
-
Returns:
|
14
|
-
str: The full path to the coarse NDVI staging directory.
|
15
|
-
"""
|
16
|
-
return generate_input_staging_directory(
|
17
|
-
input_staging_directory,
|
18
|
-
tile,
|
19
|
-
"NDVI_coarse"
|
20
|
-
)
|
21
|
-
|
@@ -1,14 +0,0 @@
|
|
1
|
-
from .generate_input_staging_directory import generate_input_staging_directory
|
2
|
-
|
3
|
-
def generate_NDVI_fine_directory(input_staging_directory: str, tile: str) -> str:
|
4
|
-
"""
|
5
|
-
Generates the specific staging directory for fine NDVI images.
|
6
|
-
|
7
|
-
Args:
|
8
|
-
input_staging_directory (str): The base input staging directory.
|
9
|
-
tile (str): The HLS tile ID.
|
10
|
-
|
11
|
-
Returns:
|
12
|
-
str: The full path to the fine NDVI staging directory.
|
13
|
-
"""
|
14
|
-
return generate_input_staging_directory(input_staging_directory, tile, "NDVI_fine")
|
@@ -1,18 +0,0 @@
|
|
1
|
-
|
2
|
-
from .generate_input_staging_directory import generate_input_staging_directory
|
3
|
-
|
4
|
-
|
5
|
-
def generate_albedo_coarse_directory(input_staging_directory: str, tile: str) -> str:
|
6
|
-
"""
|
7
|
-
Generates the specific staging directory for coarse albedo images.
|
8
|
-
|
9
|
-
Args:
|
10
|
-
input_staging_directory (str): The base input staging directory.
|
11
|
-
tile (str): The HLS tile ID.
|
12
|
-
|
13
|
-
Returns:
|
14
|
-
str: The full path to the coarse albedo staging directory.
|
15
|
-
"""
|
16
|
-
return generate_input_staging_directory(
|
17
|
-
input_staging_directory, tile, "albedo_coarse"
|
18
|
-
)
|
@@ -1,17 +0,0 @@
|
|
1
|
-
|
2
|
-
from .generate_input_staging_directory import generate_input_staging_directory
|
3
|
-
|
4
|
-
def generate_albedo_fine_directory(input_staging_directory: str, tile: str) -> str:
|
5
|
-
"""
|
6
|
-
Generates the specific staging directory for fine albedo images.
|
7
|
-
|
8
|
-
Args:
|
9
|
-
input_staging_directory (str): The base input staging directory.
|
10
|
-
tile (str): The HLS tile ID.
|
11
|
-
|
12
|
-
Returns:
|
13
|
-
str: The full path to the fine albedo staging directory.
|
14
|
-
"""
|
15
|
-
return generate_input_staging_directory(
|
16
|
-
input_staging_directory, tile, "albedo_fine"
|
17
|
-
)
|
@@ -1,43 +0,0 @@
|
|
1
|
-
import subprocess
|
2
|
-
import logging
|
3
|
-
|
4
|
-
logger = logging.getLogger(__name__)
|
5
|
-
|
6
|
-
def install_STARS_jl(
|
7
|
-
github_URL: str = "https://github.com/STARS-Data-Fusion/STARS.jl",
|
8
|
-
environment_name: str = "@ECOv003-L2T-STARS") -> subprocess.CompletedProcess:
|
9
|
-
"""
|
10
|
-
Installs the STARS.jl Julia package from GitHub into a specified Julia environment.
|
11
|
-
|
12
|
-
This function executes a Julia command to activate a given environment and
|
13
|
-
then develops (installs in editable mode) the STARS.jl package from its
|
14
|
-
GitHub repository.
|
15
|
-
|
16
|
-
Args:
|
17
|
-
github_URL (str, optional): The URL of the GitHub repository containing STARS.jl.
|
18
|
-
Defaults to "https://github.com/STARS-Data-Fusion/STARS.jl".
|
19
|
-
environment_name (str, optional): The name of the Julia environment to install
|
20
|
-
the package into. Defaults to "@ECOv003-L2T-STARS".
|
21
|
-
|
22
|
-
Returns:
|
23
|
-
subprocess.CompletedProcess: An object containing information about the
|
24
|
-
execution of the Julia command (return code, stdout, stderr).
|
25
|
-
"""
|
26
|
-
# Julia command to activate an environment and then add/develop a package from URL
|
27
|
-
julia_command = [
|
28
|
-
"julia",
|
29
|
-
"-e",
|
30
|
-
f'using Pkg; Pkg.activate("{environment_name}"); Pkg.develop(url="{github_URL}")',
|
31
|
-
]
|
32
|
-
|
33
|
-
# Execute the Julia command as a subprocess
|
34
|
-
result = subprocess.run(julia_command, capture_output=True, text=True, check=False)
|
35
|
-
|
36
|
-
if result.returncode == 0:
|
37
|
-
logger.info(
|
38
|
-
f"STARS.jl installed successfully in environment '{environment_name}'!"
|
39
|
-
)
|
40
|
-
else:
|
41
|
-
logger.error("Error installing STARS.jl:")
|
42
|
-
logger.error(result.stderr)
|
43
|
-
return result
|
File without changes
|
File without changes
|
File without changes
|