ECOv003-L2T-STARS 1.1.0__tar.gz → 1.2.0__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.
Files changed (93) hide show
  1. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/.github/workflows/ci.yml +1 -1
  2. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/ECOv003_L2T_STARS/ECOv003_DL.py +14 -14
  3. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/ECOv003_L2T_STARS/ECOv003_DL.xml +1 -1
  4. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/ECOv003_L2T_STARS/ECOv003_L2T_STARS.py +8 -1
  5. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/ECOv003_L2T_STARS/ECOv003_L2T_STARS.xml +1 -1
  6. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/ECOv003_L2T_STARS/L2TSTARSConfig.py +17 -15
  7. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/ECOv003_L2T_STARS/L2T_STARS.py +19 -5
  8. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/ECOv003_L2T_STARS/LPDAAC/LPDAACDataPool.py +1 -1
  9. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/ECOv003_L2T_STARS/VIIRS/VNP09GA.py +2 -1
  10. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/ECOv003_L2T_STARS/generate_L2T_STARS_runconfig.py +1 -1
  11. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/ECOv003_L2T_STARS/load_prior.py +4 -2
  12. ecov003_l2t_stars-1.2.0/ECOv003_L2T_STARS/version.txt +1 -0
  13. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/ECOv003_L2T_STARS.egg-info/PKG-INFO +2 -2
  14. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/PKG-INFO +2 -2
  15. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/example_L2T_STARS_with_download.py +2 -10
  16. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/makefile +2 -10
  17. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/pyproject.toml +2 -2
  18. ecov003_l2t_stars-1.1.0/ECOv003_L2T_STARS/version.txt +0 -1
  19. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/.github/workflows/python-publish.yml +0 -0
  20. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/.gitignore +0 -0
  21. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/Dockerfile +0 -0
  22. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/ECOSTRESS Granule Download Bias.ipynb +0 -0
  23. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/ECOSTRESS Granule Download.ipynb +0 -0
  24. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/ECOv003_L2T_STARS/BRDF/BRDF.py +0 -0
  25. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/ECOv003_L2T_STARS/BRDF/SZA.py +0 -0
  26. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/ECOv003_L2T_STARS/BRDF/__init__.py +0 -0
  27. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/ECOv003_L2T_STARS/BRDF/statistical_radiative_transport.txt +0 -0
  28. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/ECOv003_L2T_STARS/BRDF/version.txt +0 -0
  29. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/ECOv003_L2T_STARS/LPDAAC/__init__.py +0 -0
  30. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/ECOv003_L2T_STARS/LPDAAC/version.txt +0 -0
  31. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/ECOv003_L2T_STARS/Manifest.toml +0 -0
  32. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/ECOv003_L2T_STARS/Project.toml +0 -0
  33. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/ECOv003_L2T_STARS/VIIRS/VIIRSDataPool.py +0 -0
  34. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/ECOv003_L2T_STARS/VIIRS/VIIRSDownloader.py +0 -0
  35. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/ECOv003_L2T_STARS/VIIRS/VIIRS_CMR_LOGIN.py +0 -0
  36. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/ECOv003_L2T_STARS/VIIRS/VNP43IA4.py +0 -0
  37. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/ECOv003_L2T_STARS/VIIRS/VNP43MA3.py +0 -0
  38. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/ECOv003_L2T_STARS/VIIRS/__init__.py +0 -0
  39. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/ECOv003_L2T_STARS/VIIRS/version.txt +0 -0
  40. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/ECOv003_L2T_STARS/VNP43NRT/VNP43NRT.py +0 -0
  41. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/ECOv003_L2T_STARS/VNP43NRT/__init__.py +0 -0
  42. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/ECOv003_L2T_STARS/VNP43NRT/process_VNP43NRT.jl +0 -0
  43. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/ECOv003_L2T_STARS/VNP43NRT/version.txt +0 -0
  44. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/ECOv003_L2T_STARS/VNP43NRT_jl/Manifest.toml +0 -0
  45. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/ECOv003_L2T_STARS/VNP43NRT_jl/Project.toml +0 -0
  46. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/ECOv003_L2T_STARS/VNP43NRT_jl/__init__.py +0 -0
  47. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/ECOv003_L2T_STARS/VNP43NRT_jl/instantiate.jl +0 -0
  48. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/ECOv003_L2T_STARS/VNP43NRT_jl/instantiate.py +0 -0
  49. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/ECOv003_L2T_STARS/VNP43NRT_jl/src/VNP43NRT.jl +0 -0
  50. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/ECOv003_L2T_STARS/VNP43NRT_jl/src/__init__.py +0 -0
  51. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/ECOv003_L2T_STARS/__init__.py +0 -0
  52. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/ECOv003_L2T_STARS/calibrate_fine_to_coarse.py +0 -0
  53. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/ECOv003_L2T_STARS/constants.py +0 -0
  54. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/ECOv003_L2T_STARS/daterange/__init__.py +0 -0
  55. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/ECOv003_L2T_STARS/daterange/daterange.py +0 -0
  56. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/ECOv003_L2T_STARS/generate_NDVI_coarse_directory.py +0 -0
  57. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/ECOv003_L2T_STARS/generate_NDVI_coarse_image.py +0 -0
  58. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/ECOv003_L2T_STARS/generate_NDVI_fine_directory.py +0 -0
  59. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/ECOv003_L2T_STARS/generate_NDVI_fine_image.py +0 -0
  60. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/ECOv003_L2T_STARS/generate_STARS_inputs.py +0 -0
  61. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/ECOv003_L2T_STARS/generate_albedo_coarse_directory.py +0 -0
  62. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/ECOv003_L2T_STARS/generate_albedo_coarse_image.py +0 -0
  63. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/ECOv003_L2T_STARS/generate_albedo_fine_directory.py +0 -0
  64. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/ECOv003_L2T_STARS/generate_albedo_fine_image.py +0 -0
  65. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/ECOv003_L2T_STARS/generate_filename.py +0 -0
  66. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/ECOv003_L2T_STARS/generate_input_staging_directory.py +0 -0
  67. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/ECOv003_L2T_STARS/generate_model_state_tile_date_directory.py +0 -0
  68. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/ECOv003_L2T_STARS/generate_output_directory.py +0 -0
  69. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/ECOv003_L2T_STARS/install_STARS_jl.py +0 -0
  70. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/ECOv003_L2T_STARS/instantiate_STARS_jl.py +0 -0
  71. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/ECOv003_L2T_STARS/prior.py +0 -0
  72. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/ECOv003_L2T_STARS/process_ECOSTRESS_data_fusion_distributed_bias.jl +0 -0
  73. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/ECOv003_L2T_STARS/process_STARS_product.py +0 -0
  74. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/ECOv003_L2T_STARS/process_julia_data_fusion.py +0 -0
  75. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/ECOv003_L2T_STARS/retrieve_STARS_sources.py +0 -0
  76. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/ECOv003_L2T_STARS/runconfig.py +0 -0
  77. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/ECOv003_L2T_STARS/timer/__init__.py +0 -0
  78. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/ECOv003_L2T_STARS/timer/timer.py +0 -0
  79. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/ECOv003_L2T_STARS/version.py +0 -0
  80. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/ECOv003_L2T_STARS.egg-info/SOURCES.txt +0 -0
  81. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/ECOv003_L2T_STARS.egg-info/dependency_links.txt +0 -0
  82. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/ECOv003_L2T_STARS.egg-info/entry_points.txt +0 -0
  83. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/ECOv003_L2T_STARS.egg-info/requires.txt +0 -0
  84. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/ECOv003_L2T_STARS.egg-info/top_level.txt +0 -0
  85. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/LICENSE +0 -0
  86. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/README.md +0 -0
  87. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/STARS_memory_profile.jpeg +0 -0
  88. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/demo.py +0 -0
  89. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/mprofile_20241202193217.dat +0 -0
  90. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/mprofile_20241203112611.dat +0 -0
  91. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/setup.cfg +0 -0
  92. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/tests/test_import_ECOv003_L3T_L4T_JET.py +0 -0
  93. {ecov003_l2t_stars-1.1.0 → ecov003_l2t_stars-1.2.0}/tests/test_import_dependencies.py +0 -0
@@ -13,7 +13,7 @@ jobs:
13
13
  runs-on: ubuntu-latest
14
14
  strategy:
15
15
  matrix:
16
- python-version: ["3.10"]
16
+ python-version: ["3.10", "3.11"]
17
17
 
18
18
  steps:
19
19
  - name: Checkout repository
@@ -265,33 +265,33 @@ class ECOv003DLConfig(ECOSTRESSRunConfig):
265
265
  runconfig = read_runconfig(filename)
266
266
 
267
267
  # Validate and extract working directory
268
- if "StaticAuxiliaryFileGroup" not in runconfig:
269
- raise MissingRunConfigValue(f"missing StaticAuxiliaryFileGroup in ECOv003_DL run-config: {filename}")
270
- if "ECOv003_DL_WORKING" not in runconfig["StaticAuxiliaryFileGroup"]:
268
+ if "StaticAncillaryFileGroup" not in runconfig:
269
+ raise MissingRunConfigValue(f"missing StaticAncillaryFileGroup in ECOv003_DL run-config: {filename}")
270
+ if "ECOv003_DL_WORKING" not in runconfig["StaticAncillaryFileGroup"]:
271
271
  raise MissingRunConfigValue(
272
- f"missing StaticAuxiliaryFileGroup/ECOv003_DL_WORKING in ECOv003_DL run-config: {filename}")
273
- working_directory = abspath(runconfig["StaticAuxiliaryFileGroup"]["ECOv003_DL_WORKING"])
272
+ f"missing StaticAncillaryFileGroup/ECOv003_DL_WORKING in ECOv003_DL run-config: {filename}")
273
+ working_directory = abspath(runconfig["StaticAncillaryFileGroup"]["ECOv003_DL_WORKING"])
274
274
  logger.info(f"working directory: {cl.dir(working_directory)}")
275
275
 
276
276
  # Validate and extract L2T STARS sources directory
277
- if "L2T_STARS_SOURCES" not in runconfig["StaticAuxiliaryFileGroup"]:
277
+ if "L2T_STARS_SOURCES" not in runconfig["StaticAncillaryFileGroup"]:
278
278
  raise MissingRunConfigValue(
279
- f"missing StaticAuxiliaryFileGroup/L2T_STARS_SOURCES in ECOv003_DL run-config: {filename}")
280
- L2T_STARS_sources_directory = abspath(runconfig["StaticAuxiliaryFileGroup"]["L2T_STARS_SOURCES"])
279
+ f"missing StaticAncillaryFileGroup/L2T_STARS_SOURCES in ECOv003_DL run-config: {filename}")
280
+ L2T_STARS_sources_directory = abspath(runconfig["StaticAncillaryFileGroup"]["L2T_STARS_SOURCES"])
281
281
  logger.info(f"L2T STARS sources directory: {cl.dir(L2T_STARS_sources_directory)}")
282
282
 
283
283
  # Validate and extract L2T STARS indices directory
284
- if "L2T_STARS_INDICES" not in runconfig["StaticAuxiliaryFileGroup"]:
284
+ if "L2T_STARS_INDICES" not in runconfig["StaticAncillaryFileGroup"]:
285
285
  raise MissingRunConfigValue(
286
- f"missing StaticAuxiliaryFileGroup/L2T_STARS_INDICES in ECOv003_DL run-config: {filename}")
287
- L2T_STARS_indices_directory = abspath(runconfig["StaticAuxiliaryFileGroup"]["L2T_STARS_INDICES"])
286
+ f"missing StaticAncillaryFileGroup/L2T_STARS_INDICES in ECOv003_DL run-config: {filename}")
287
+ L2T_STARS_indices_directory = abspath(runconfig["StaticAncillaryFileGroup"]["L2T_STARS_INDICES"])
288
288
  logger.info(f"L2T STARS indices directory: {cl.dir(L2T_STARS_indices_directory)}")
289
289
 
290
290
  # Validate and extract L2T STARS model directory
291
- if "L2T_STARS_MODEL" not in runconfig["StaticAuxiliaryFileGroup"]:
291
+ if "L2T_STARS_MODEL" not in runconfig["StaticAncillaryFileGroup"]:
292
292
  raise MissingRunConfigValue(
293
- f"missing StaticAuxiliaryFileGroup/L2T_STARS_MODEL in ECOv003_DL run-config: {filename}")
294
- L2T_STARS_model_directory = abspath(runconfig["StaticAuxiliaryFileGroup"]["L2T_STARS_MODEL"])
293
+ f"missing StaticAncillaryFileGroup/L2T_STARS_MODEL in ECOv003_DL run-config: {filename}")
294
+ L2T_STARS_model_directory = abspath(runconfig["StaticAncillaryFileGroup"]["L2T_STARS_MODEL"])
295
295
  logger.info(f"L2T STARS model directory: {cl.dir(L2T_STARS_model_directory)}")
296
296
 
297
297
  # Validate ProductPathGroup
@@ -28,7 +28,7 @@
28
28
  <element>L2T_LSTE_filename1</element>
29
29
  </vector>
30
30
  </group>
31
- <group name="StaticAuxiliaryFileGroup">
31
+ <group name="StaticAncillaryFileGroup">
32
32
  <scalar name="ECOv003_DL_WORKING">working_directory</scalar>
33
33
  <scalar name="L2T_STARS_SOURCES">L2T_STARS_sources_directory</scalar>
34
34
  <scalar name="L2T_STARS_INDICES">L2T_STARS_indices_directory</scalar>
@@ -26,6 +26,7 @@ def main():
26
26
  " python {sys.argv[0]} --runconfig /path/to/RunConfig.xml\n"
27
27
  " python {sys.argv[0]} --runconfig /path/to/RunConfig.xml --date 2023-01-15\n"
28
28
  " python {sys.argv[0]} --runconfig /path/to/RunConfig.xml --sources-only\n"
29
+ " python {sys.argv[0]} --runconfig /path/to/RunConfig.xml --overwrite\n" # Added example usage
29
30
  )
30
31
 
31
32
  # Positional argument for the runconfig file
@@ -128,6 +129,11 @@ def main():
128
129
  help=f"Number of Julia workers for distributed processing. Defaults to 4.",
129
130
  metavar="COUNT"
130
131
  )
132
+ parser.add_argument(
133
+ "--overwrite", # New argument for overwrite option
134
+ action="store_true",
135
+ help="Reproduce the output files even if they already exist.",
136
+ )
131
137
  parser.add_argument(
132
138
  "--version",
133
139
  action="version",
@@ -153,10 +159,11 @@ def main():
153
159
  remove_posterior=args.remove_posterior,
154
160
  threads=args.threads,
155
161
  num_workers=args.num_workers,
162
+ overwrite=args.overwrite, # Pass the new overwrite argument
156
163
  )
157
164
 
158
165
  sys.exit(exit_code)
159
166
 
160
167
 
161
168
  if __name__ == "__main__":
162
- main()
169
+ main()
@@ -22,7 +22,7 @@
22
22
  <scalar name="L2T_LSTE">L2T_LSTE_filename</scalar>
23
23
  <scalar name="L2T_STARS_PRIOR">prior_L2T_STARS_filename</scalar>
24
24
  </group>
25
- <group name="StaticAuxiliaryFileGroup">
25
+ <group name="StaticAncillaryFileGroup">
26
26
  <scalar name="L2T_STARS_MODEL">model_directory</scalar>
27
27
  <scalar name="L2T_STARS_INDICES">indices_directory</scalar>
28
28
  <scalar name="L2T_STARS_SOURCES">sources_directory</scalar>
@@ -37,48 +37,50 @@ class L2TSTARSConfig(ECOSTRESSRunConfig):
37
37
  # Read the run-config XML into a dictionary
38
38
  runconfig = self.read_runconfig(filename)
39
39
 
40
+ # reverting to StaticAncillaryFileGroup for now instead of StaticAuxiliaryFileGroup
41
+
40
42
  try:
41
- # Validate and extract working directory from StaticAuxiliaryFileGroup
42
- if "StaticAuxiliaryFileGroup" not in runconfig:
43
+ # Validate and extract working directory from StaticAncillaryFileGroup
44
+ if "StaticAncillaryFileGroup" not in runconfig:
43
45
  raise MissingRunConfigValue(
44
- f"Missing StaticAuxiliaryFileGroup in L2T_STARS run-config: {filename}"
46
+ f"Missing StaticAncillaryFileGroup in L2T_STARS run-config: {filename}"
45
47
  )
46
- if "L2T_STARS_WORKING" not in runconfig["StaticAuxiliaryFileGroup"]:
48
+ if "L2T_STARS_WORKING" not in runconfig["StaticAncillaryFileGroup"]:
47
49
  raise MissingRunConfigValue(
48
- f"Missing StaticAuxiliaryFileGroup/L2T_STARS_WORKING in L2T_STARS run-config: {filename}"
50
+ f"Missing StaticAncillaryFileGroup/L2T_STARS_WORKING in L2T_STARS run-config: {filename}"
49
51
  )
50
52
  self.working_directory = abspath(
51
- runconfig["StaticAuxiliaryFileGroup"]["L2T_STARS_WORKING"]
53
+ runconfig["StaticAncillaryFileGroup"]["L2T_STARS_WORKING"]
52
54
  )
53
55
  logger.info(f"Working directory: {cl.dir(self.working_directory)}")
54
56
 
55
57
  # Validate and extract sources directory
56
- if "L2T_STARS_SOURCES" not in runconfig["StaticAuxiliaryFileGroup"]:
58
+ if "L2T_STARS_SOURCES" not in runconfig["StaticAncillaryFileGroup"]:
57
59
  raise MissingRunConfigValue(
58
- f"Missing StaticAuxiliaryFileGroup/L2T_STARS_SOURCES in L2T_STARS run-config: {filename}"
60
+ f"Missing StaticAncillaryFileGroup/L2T_STARS_SOURCES in L2T_STARS run-config: {filename}"
59
61
  )
60
62
  self.sources_directory = abspath(
61
- runconfig["StaticAuxiliaryFileGroup"]["L2T_STARS_SOURCES"]
63
+ runconfig["StaticAncillaryFileGroup"]["L2T_STARS_SOURCES"]
62
64
  )
63
65
  logger.info(f"Sources directory: {cl.dir(self.sources_directory)}")
64
66
 
65
67
  # Validate and extract indices directory
66
- if "L2T_STARS_INDICES" not in runconfig["StaticAuxiliaryFileGroup"]:
68
+ if "L2T_STARS_INDICES" not in runconfig["StaticAncillaryFileGroup"]:
67
69
  raise MissingRunConfigValue(
68
- f"Missing StaticAuxiliaryFileGroup/L2T_STARS_INDICES in L2T_STARS run-config: {filename}"
70
+ f"Missing StaticAncillaryFileGroup/L2T_STARS_INDICES in L2T_STARS run-config: {filename}"
69
71
  )
70
72
  self.indices_directory = abspath(
71
- runconfig["StaticAuxiliaryFileGroup"]["L2T_STARS_INDICES"]
73
+ runconfig["StaticAncillaryFileGroup"]["L2T_STARS_INDICES"]
72
74
  )
73
75
  logger.info(f"Indices directory: {cl.dir(self.indices_directory)}")
74
76
 
75
77
  # Validate and extract model directory
76
- if "L2T_STARS_MODEL" not in runconfig["StaticAuxiliaryFileGroup"]:
78
+ if "L2T_STARS_MODEL" not in runconfig["StaticAncillaryFileGroup"]:
77
79
  raise MissingRunConfigValue(
78
- f"Missing StaticAuxiliaryFileGroup/L2T_STARS_MODEL in L2T_STARS run-config: {filename}"
80
+ f"Missing StaticAncillaryFileGroup/L2T_STARS_MODEL in L2T_STARS run-config: {filename}"
79
81
  )
80
82
  self.model_directory = abspath(
81
- runconfig["StaticAuxiliaryFileGroup"]["L2T_STARS_MODEL"]
83
+ runconfig["StaticAncillaryFileGroup"]["L2T_STARS_MODEL"]
82
84
  )
83
85
  logger.info(f"Model directory: {cl.dir(self.model_directory)}")
84
86
 
@@ -60,6 +60,7 @@ def L2T_STARS(
60
60
  remove_posterior: bool = True,
61
61
  threads: Union[int, str] = "auto",
62
62
  num_workers: int = 4,
63
+ overwrite: bool = False, # New parameter for overwriting existing files
63
64
  ) -> int:
64
65
  """
65
66
  ECOSTRESS Collection 3 L2T_STARS PGE (Product Generation Executive).
@@ -98,6 +99,8 @@ def L2T_STARS(
98
99
  Defaults to "auto".
99
100
  num_workers (int, optional): Number of Julia workers for distributed processing.
100
101
  Defaults to 4.
102
+ overwrite (bool, optional): If True, existing output files will be overwritten.
103
+ Defaults to False.
101
104
 
102
105
  Returns:
103
106
  int: An exit code indicating the success or failure of the PGE execution.
@@ -127,11 +130,17 @@ def L2T_STARS(
127
130
  L2T_STARS_browse_filename = runconfig.L2T_STARS_browse_filename
128
131
  logger.info(f"Browse filename: " + cl.file(L2T_STARS_browse_filename))
129
132
 
130
- # Check if the final product already exists to avoid reprocessing
131
- if exists(L2T_STARS_zip_filename) and exists(L2T_STARS_browse_filename):
133
+ # Check if the final product already exists and 'overwrite' is not enabled
134
+ if not overwrite and exists(L2T_STARS_zip_filename) and exists(L2T_STARS_browse_filename):
132
135
  logger.info(f"Found existing L2T STARS file: {L2T_STARS_zip_filename}")
133
136
  logger.info(f"Found existing L2T STARS preview: {L2T_STARS_browse_filename}")
137
+ logger.info("Overwrite option is not enabled, skipping reprocessing.")
134
138
  return SUCCESS_EXIT_CODE
139
+ elif overwrite and exists(L2T_STARS_zip_filename) and exists(L2T_STARS_browse_filename):
140
+ logger.info(f"Found existing L2T STARS file: {L2T_STARS_zip_filename}")
141
+ logger.info(f"Found existing L2T STARS preview: {L2T_STARS_browse_filename}")
142
+ logger.info("Overwrite option is enabled, proceeding with reprocessing.")
143
+
135
144
 
136
145
  logger.info(f"Working directory: {cl.dir(working_directory)}")
137
146
  logger.info(f"Log file: {cl.file(log_filename)}")
@@ -232,12 +241,17 @@ def L2T_STARS(
232
241
  VNP43NRT_products_directory = join(sources_directory, DEFAULT_VNP43NRT_PRODUCTS_DIRECTORY)
233
242
  logger.info(f"VNP43NRT products directory: {cl.dir(VNP43NRT_products_directory)}")
234
243
 
235
- # Re-check for existing product (double-check in case another process created it)
236
- if exists(L2T_STARS_zip_filename):
244
+ # Re-check for existing product (double-check in case another process created it) with overwrite option
245
+ if not overwrite and exists(L2T_STARS_zip_filename):
237
246
  logger.info(
238
- f"Found L2T STARS product zip: {cl.file(L2T_STARS_zip_filename)}"
247
+ f"Found L2T STARS product zip: {cl.file(L2T_STARS_zip_filename)}. Overwrite is False, returning."
239
248
  )
240
249
  return exit_code
250
+ elif overwrite and exists(L2T_STARS_zip_filename):
251
+ logger.info(
252
+ f"Found L2T STARS product zip: {cl.file(L2T_STARS_zip_filename)}. Overwrite is True, proceeding."
253
+ )
254
+
241
255
 
242
256
  # Initialize HLS data connection
243
257
  logger.info(f"Connecting to CMR Search server: {CMR_SEARCH_URL}")
@@ -54,7 +54,7 @@ class LPDAACServerUnreachable(ConnectionError):
54
54
  class LPDAACDataPool:
55
55
  logger = logging.getLogger(__name__)
56
56
  DEFAULT_CHUNK_SIZE = 2 ** 20
57
- DATE_REGEX = re.compile('^(19|20)\d\d[- /.](0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01])$')
57
+ DATE_REGEX = re.compile(r'^(19|20)\d\d[- /.](0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01])$')
58
58
  DEFAULT_REMOTE = DEFAULT_REMOTE
59
59
 
60
60
  def __init__(self, username: str = None, password: str = None, remote: str = None, offline_ok: bool = False):
@@ -1019,7 +1019,8 @@ def latest_datetime(date_in: Union[date, str]) -> datetime:
1019
1019
  return parser.parse(f"{date_string}T23:59:59Z")
1020
1020
 
1021
1021
 
1022
- VIIRS_FILENAME_REGEX = re.compile("^VNP09GA\.[^.]+\.([^.]+)\.002\.\d+\.h5$")
1022
+ VIIRS_FILENAME_REGEX = re.compile(r"^VNP09GA\.[^.]+\.([^.]+)\.002\.\d+\.h5$")
1023
+
1023
1024
  def modland_tile_from_filename(filename: str) -> str:
1024
1025
  match = VIIRS_FILENAME_REGEX.match(filename)
1025
1026
  if match is None:
@@ -246,4 +246,4 @@ def generate_L2T_STARS_runconfig(
246
246
  f"Finished generating L2T_STARS run-config for orbit {cl.val(orbit)} scene {cl.val(scene)} ({timer.tocvalue():.2f} seconds)"
247
247
  )
248
248
 
249
- return
249
+ return runconfig_filename
@@ -1,6 +1,8 @@
1
1
  from os.path import exists
2
2
  import logging
3
3
 
4
+ import colored_logging as cl
5
+
4
6
  from ECOv003_granules import L2TSTARS
5
7
 
6
8
  from .prior import Prior
@@ -235,12 +237,12 @@ def load_prior(
235
237
  L2T_STARS_prior_filename=L2T_STARS_prior_filename,
236
238
  prior_NDVI_filename=prior_NDVI_filename,
237
239
  prior_NDVI_UQ_filename=prior_NDVI_UQ_filename,
238
- prior_NDVI_flag_filename=prior_NDVI_flag_filename,
240
+ # prior_NDVI_flag_filename=prior_NDVI_flag_filename,
239
241
  prior_NDVI_bias_filename=prior_NDVI_bias_filename,
240
242
  prior_NDVI_bias_UQ_filename=prior_NDVI_bias_UQ_filename,
241
243
  prior_albedo_filename=prior_albedo_filename,
242
244
  prior_albedo_UQ_filename=prior_albedo_UQ_filename,
243
- prior_albedo_flag_filename=prior_albedo_flag_filename,
245
+ # prior_albedo_flag_filename=prior_albedo_flag_filename,
244
246
  prior_albedo_bias_filename=prior_albedo_bias_filename,
245
247
  prior_albedo_bias_UQ_filename=prior_albedo_bias_UQ_filename,
246
248
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
- Name: ECOv003_L2T_STARS
3
- Version: 1.1.0
2
+ Name: ECOv003-L2T-STARS
3
+ Version: 1.2.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
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
- Name: ECOv003_L2T_STARS
3
- Version: 1.1.0
2
+ Name: ECOv003-L2T-STARS
3
+ Version: 1.2.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
@@ -20,9 +20,6 @@ L2T_LSTE_granule = download_ECOSTRESS_granule(
20
20
  parent_directory=working_directory
21
21
  )
22
22
 
23
- # Preview surface temperature
24
- print("Surface temperature preview:", L2T_LSTE_granule.ST_C)
25
-
26
23
  # Retrieve L2T STARS granule from CMR API as prior
27
24
  L2T_STARS_granule = download_ECOSTRESS_granule(
28
25
  product="L2T_STARS",
@@ -31,9 +28,6 @@ L2T_STARS_granule = download_ECOSTRESS_granule(
31
28
  parent_directory=working_directory
32
29
  )
33
30
 
34
- # Preview albedo
35
- print("Albedo preview:", L2T_STARS_granule.albedo)
36
-
37
31
  # Generate XML run-config file for L2T STARS PGE run
38
32
  runconfig_filename = generate_L2T_STARS_runconfig(
39
33
  L2T_LSTE_filename=L2T_LSTE_granule.product_filename,
@@ -43,9 +37,6 @@ runconfig_filename = generate_L2T_STARS_runconfig(
43
37
 
44
38
  print("Runconfig generated:", runconfig_filename)
45
39
 
46
- with open(runconfig_filename, "r") as f:
47
- print(f.read())
48
-
49
40
  # Run L2T STARS PGE
50
41
  exit_code = L2T_STARS(
51
42
  runconfig_filename=runconfig_filename,
@@ -54,7 +45,8 @@ exit_code = L2T_STARS(
54
45
  num_workers=8,
55
46
  remove_input_staging=False,
56
47
  remove_prior=False,
57
- remove_posterior=False
48
+ remove_posterior=False,
49
+ overwrite=True
58
50
  )
59
51
 
60
52
  print("L2T STARS PGE exit code:", exit_code)
@@ -39,21 +39,13 @@ reinstall:
39
39
  make install
40
40
 
41
41
  environment:
42
- mamba create -y -n $(ENVIRONMENT_NAME) -c conda-forge python=3.10
42
+ mamba create -y -n $(ENVIRONMENT_NAME) -c conda-forge python=3.11
43
43
 
44
44
  remove-environment:
45
45
  mamba env remove -y -n $(ENVIRONMENT_NAME)
46
46
 
47
47
  install-julia:
48
- julia -e 'using Pkg; Pkg.add("Glob")'
49
- julia -e 'using Pkg; Pkg.add("DimensionalData")'
50
- julia -e 'using Pkg; Pkg.add("HTTP")'
51
- julia -e 'using Pkg; Pkg.add("JSON")'
52
- julia -e 'using Pkg; Pkg.add("ArchGDAL")'
53
- julia -e 'using Pkg; Pkg.add("Rasters")'
54
- # julia -e 'using Pkg; Pkg.add(Pkg.PackageSpec(name="Rasters", version="0.5.3"))'
55
- julia -e 'using Pkg; Pkg.add("STARSDataFusion")'
56
- julia -e 'using Pkg; Pkg.develop(path="ECOv003_L2T_STARS/VNP43NRT_jl")'
48
+ julia -e 'using Pkg; Pkg.add.(["Glob", "DimensionalData", "HTTP", "JSON", "ArchGDAL", "Rasters", "STARSDataFusion"]); Pkg.develop(path="ECOv003_L2T_STARS/VNP43NRT_jl")'
57
49
 
58
50
  colima-start:
59
51
  colima start -m 16 -a x86_64 -d 100
@@ -3,8 +3,8 @@ requires = ["setuptools>=60", "setuptools-scm>=8.0", "wheel"]
3
3
  build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
- name = "ECOv003_L2T_STARS"
7
- version = "1.1.0"
6
+ name = "ECOv003-L2T-STARS"
7
+ version = "1.2.0"
8
8
  description = "ECOSTRESS Collection 3 JPL STARS Data Fusion Product Generating Executable (PGE)"
9
9
  readme = "README.md"
10
10
  authors = [
@@ -1 +0,0 @@
1
- 1.1.0