BESS-JPL 1.8.0__tar.gz → 1.9.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.

Potentially problematic release.


This version of BESS-JPL might be problematic. Click here for more details.

Files changed (74) hide show
  1. {bess_jpl-1.8.0 → bess_jpl-1.9.0}/.gitignore +1 -0
  2. {bess_jpl-1.8.0 → bess_jpl-1.9.0}/BESS_JPL/BESS_JPL.py +1 -0
  3. bess_jpl-1.9.0/BESS_JPL/version.txt +1 -0
  4. {bess_jpl-1.8.0 → bess_jpl-1.9.0/BESS_JPL.egg-info}/PKG-INFO +1 -1
  5. {bess_jpl-1.8.0 → bess_jpl-1.9.0}/BESS_JPL.egg-info/SOURCES.txt +0 -4
  6. {bess_jpl-1.8.0/BESS_JPL.egg-info → bess_jpl-1.9.0}/PKG-INFO +1 -1
  7. {bess_jpl-1.8.0 → bess_jpl-1.9.0}/pyproject.toml +1 -1
  8. bess_jpl-1.8.0/BESS_JPL/SZA/__init__.py +0 -1
  9. bess_jpl-1.8.0/BESS_JPL/SZA/daylight_hours.py +0 -74
  10. bess_jpl-1.8.0/BESS_JPL/vegetation_conversion/__init__.py +0 -1
  11. bess_jpl-1.8.0/BESS_JPL/vegetation_conversion/vegetation_conversion.py +0 -71
  12. bess_jpl-1.8.0/BESS_JPL/version.txt +0 -1
  13. {bess_jpl-1.8.0 → bess_jpl-1.9.0}/.github/workflows/ci.yml +0 -0
  14. {bess_jpl-1.8.0 → bess_jpl-1.9.0}/.github/workflows/python-publish.yml +0 -0
  15. {bess_jpl-1.8.0 → bess_jpl-1.9.0}/BESS_JPL/C3_photosynthesis.py +0 -0
  16. {bess_jpl-1.8.0 → bess_jpl-1.9.0}/BESS_JPL/C4_fraction.jpeg +0 -0
  17. {bess_jpl-1.8.0 → bess_jpl-1.9.0}/BESS_JPL/C4_fraction.tif +0 -0
  18. {bess_jpl-1.8.0 → bess_jpl-1.9.0}/BESS_JPL/C4_photosynthesis.py +0 -0
  19. {bess_jpl-1.8.0 → bess_jpl-1.9.0}/BESS_JPL/FVC_from_NDVI.py +0 -0
  20. {bess_jpl-1.8.0 → bess_jpl-1.9.0}/BESS_JPL/LAI_from_NDVI.py +0 -0
  21. {bess_jpl-1.8.0 → bess_jpl-1.9.0}/BESS_JPL/NDVI_maximum.jpeg +0 -0
  22. {bess_jpl-1.8.0 → bess_jpl-1.9.0}/BESS_JPL/NDVI_maximum.tif +0 -0
  23. {bess_jpl-1.8.0 → bess_jpl-1.9.0}/BESS_JPL/NDVI_minimum.jpeg +0 -0
  24. {bess_jpl-1.8.0 → bess_jpl-1.9.0}/BESS_JPL/NDVI_minimum.tif +0 -0
  25. {bess_jpl-1.8.0 → bess_jpl-1.9.0}/BESS_JPL/__init__.py +0 -0
  26. {bess_jpl-1.8.0 → bess_jpl-1.9.0}/BESS_JPL/ball_berry_intercept_C3.jpeg +0 -0
  27. {bess_jpl-1.8.0 → bess_jpl-1.9.0}/BESS_JPL/ball_berry_intercept_C3.tif +0 -0
  28. {bess_jpl-1.8.0 → bess_jpl-1.9.0}/BESS_JPL/ball_berry_slope_C3.jpeg +0 -0
  29. {bess_jpl-1.8.0 → bess_jpl-1.9.0}/BESS_JPL/ball_berry_slope_C3.tif +0 -0
  30. {bess_jpl-1.8.0 → bess_jpl-1.9.0}/BESS_JPL/ball_berry_slope_C4.jpeg +0 -0
  31. {bess_jpl-1.8.0 → bess_jpl-1.9.0}/BESS_JPL/ball_berry_slope_C4.tif +0 -0
  32. {bess_jpl-1.8.0 → bess_jpl-1.9.0}/BESS_JPL/calculate_VCmax.py +0 -0
  33. {bess_jpl-1.8.0 → bess_jpl-1.9.0}/BESS_JPL/canopy_energy_balance.py +0 -0
  34. {bess_jpl-1.8.0 → bess_jpl-1.9.0}/BESS_JPL/canopy_longwave_radiation.py +0 -0
  35. {bess_jpl-1.8.0 → bess_jpl-1.9.0}/BESS_JPL/canopy_shortwave_radiation.py +0 -0
  36. {bess_jpl-1.8.0 → bess_jpl-1.9.0}/BESS_JPL/carbon_uptake_efficiency.jpeg +0 -0
  37. {bess_jpl-1.8.0 → bess_jpl-1.9.0}/BESS_JPL/carbon_uptake_efficiency.tif +0 -0
  38. {bess_jpl-1.8.0 → bess_jpl-1.9.0}/BESS_JPL/carbon_water_fluxes.py +0 -0
  39. {bess_jpl-1.8.0 → bess_jpl-1.9.0}/BESS_JPL/constants.py +0 -0
  40. {bess_jpl-1.8.0 → bess_jpl-1.9.0}/BESS_JPL/interpolate_C3_C4.py +0 -0
  41. {bess_jpl-1.8.0 → bess_jpl-1.9.0}/BESS_JPL/kn.jpeg +0 -0
  42. {bess_jpl-1.8.0 → bess_jpl-1.9.0}/BESS_JPL/kn.tif +0 -0
  43. {bess_jpl-1.8.0 → bess_jpl-1.9.0}/BESS_JPL/load_C4_fraction.py +0 -0
  44. {bess_jpl-1.8.0 → bess_jpl-1.9.0}/BESS_JPL/load_NDVI_maximum.py +0 -0
  45. {bess_jpl-1.8.0 → bess_jpl-1.9.0}/BESS_JPL/load_NDVI_minimum.py +0 -0
  46. {bess_jpl-1.8.0 → bess_jpl-1.9.0}/BESS_JPL/load_ball_berry_intercept_C3.py +0 -0
  47. {bess_jpl-1.8.0 → bess_jpl-1.9.0}/BESS_JPL/load_ball_berry_slope_C3.py +0 -0
  48. {bess_jpl-1.8.0 → bess_jpl-1.9.0}/BESS_JPL/load_ball_berry_slope_C4.py +0 -0
  49. {bess_jpl-1.8.0 → bess_jpl-1.9.0}/BESS_JPL/load_carbon_uptake_efficiency.py +0 -0
  50. {bess_jpl-1.8.0 → bess_jpl-1.9.0}/BESS_JPL/load_kn.py +0 -0
  51. {bess_jpl-1.8.0 → bess_jpl-1.9.0}/BESS_JPL/load_peakVCmax_C3.py +0 -0
  52. {bess_jpl-1.8.0 → bess_jpl-1.9.0}/BESS_JPL/load_peakVCmax_C4.py +0 -0
  53. {bess_jpl-1.8.0 → bess_jpl-1.9.0}/BESS_JPL/meteorology.py +0 -0
  54. {bess_jpl-1.8.0 → bess_jpl-1.9.0}/BESS_JPL/peakVCmax_C3.jpeg +0 -0
  55. {bess_jpl-1.8.0 → bess_jpl-1.9.0}/BESS_JPL/peakVCmax_C3.tif +0 -0
  56. {bess_jpl-1.8.0 → bess_jpl-1.9.0}/BESS_JPL/peakVCmax_C4.jpeg +0 -0
  57. {bess_jpl-1.8.0 → bess_jpl-1.9.0}/BESS_JPL/peakVCmax_C4.tif +0 -0
  58. {bess_jpl-1.8.0 → bess_jpl-1.9.0}/BESS_JPL/soil_energy_balance.py +0 -0
  59. {bess_jpl-1.8.0 → bess_jpl-1.9.0}/BESS_JPL.egg-info/dependency_links.txt +0 -0
  60. {bess_jpl-1.8.0 → bess_jpl-1.9.0}/BESS_JPL.egg-info/requires.txt +0 -0
  61. {bess_jpl-1.8.0 → bess_jpl-1.9.0}/BESS_JPL.egg-info/top_level.txt +0 -0
  62. {bess_jpl-1.8.0 → bess_jpl-1.9.0}/C4 Fraction.ipynb +0 -0
  63. {bess_jpl-1.8.0 → bess_jpl-1.9.0}/Dockerfile +0 -0
  64. {bess_jpl-1.8.0 → bess_jpl-1.9.0}/LICENSE +0 -0
  65. {bess_jpl-1.8.0 → bess_jpl-1.9.0}/Li_2023_RSE.pdf +0 -0
  66. {bess_jpl-1.8.0 → bess_jpl-1.9.0}/MANIFEST.in +0 -0
  67. {bess_jpl-1.8.0 → bess_jpl-1.9.0}/Processing BESS with rasters with default parameters.ipynb +0 -0
  68. {bess_jpl-1.8.0 → bess_jpl-1.9.0}/Processing BESS with rasters.ipynb +0 -0
  69. {bess_jpl-1.8.0 → bess_jpl-1.9.0}/README.md +0 -0
  70. {bess_jpl-1.8.0 → bess_jpl-1.9.0}/makefile +0 -0
  71. {bess_jpl-1.8.0 → bess_jpl-1.9.0}/processing_BESS_with_rasters_and_default_parameters.py +0 -0
  72. {bess_jpl-1.8.0 → bess_jpl-1.9.0}/setup.cfg +0 -0
  73. {bess_jpl-1.8.0 → bess_jpl-1.9.0}/tests/test_import_breathing_earth_system_simulator.py +0 -0
  74. {bess_jpl-1.8.0 → bess_jpl-1.9.0}/tests/test_import_dependencies.py +0 -0
@@ -160,3 +160,4 @@ cython_debug/
160
160
  .idea/
161
161
 
162
162
  .DS_Store
163
+ .venv
@@ -514,6 +514,7 @@ def BESS_JPL(
514
514
  "Rn": Rn,
515
515
  "Rn_soil": Rn_soil,
516
516
  "Rn_canopy": Rn_canopy,
517
+ "G": G,
517
518
  "LE": LE,
518
519
  "LE_soil": LE_soil,
519
520
  "LE_canopy": LE_canopy
@@ -0,0 +1 @@
1
+ 1.9.0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: BESS-JPL
3
- Version: 1.8.0
3
+ Version: 1.9.0
4
4
  Summary: Breathing Earth System Simulator (BESS) Gross Primary Production (GPP) and Evapotranspiration (ET) Model Python
5
5
  Author-email: Gregory Halverson <gregory.h.halverson@jpl.nasa.gov>
6
6
  Project-URL: Homepage, https://github.com/JPL-Evapotranspiration-Algorithms/BESS-JPL
@@ -63,9 +63,5 @@ BESS_JPL.egg-info/SOURCES.txt
63
63
  BESS_JPL.egg-info/dependency_links.txt
64
64
  BESS_JPL.egg-info/requires.txt
65
65
  BESS_JPL.egg-info/top_level.txt
66
- BESS_JPL/SZA/__init__.py
67
- BESS_JPL/SZA/daylight_hours.py
68
- BESS_JPL/vegetation_conversion/__init__.py
69
- BESS_JPL/vegetation_conversion/vegetation_conversion.py
70
66
  tests/test_import_breathing_earth_system_simulator.py
71
67
  tests/test_import_dependencies.py
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: BESS-JPL
3
- Version: 1.8.0
3
+ Version: 1.9.0
4
4
  Summary: Breathing Earth System Simulator (BESS) Gross Primary Production (GPP) and Evapotranspiration (ET) Model Python
5
5
  Author-email: Gregory Halverson <gregory.h.halverson@jpl.nasa.gov>
6
6
  Project-URL: Homepage, https://github.com/JPL-Evapotranspiration-Algorithms/BESS-JPL
@@ -3,7 +3,7 @@ requires = ["setuptools>=60", "setuptools-scm>=8.0", "wheel"]
3
3
 
4
4
  [project]
5
5
  name = "BESS-JPL"
6
- version = "1.8.0"
6
+ version = "1.9.0"
7
7
  description = "Breathing Earth System Simulator (BESS) Gross Primary Production (GPP) and Evapotranspiration (ET) Model Python"
8
8
  readme = "README.md"
9
9
  authors = [
@@ -1 +0,0 @@
1
- from .SZA import *
@@ -1,74 +0,0 @@
1
- """
2
- This module calculates sunrise hour and daylight hours.
3
-
4
- Developed by Gregory Halverson in the Jet Propulsion Laboratory Year-Round Internship Program (Columbus Technologies and Services, ANRE Tech.), in coordination with the ECOSTRESS mission and master's thesis studies at California State University, Northridge.
5
- """
6
- import warnings
7
- from numpy import tan, cos, sin, pi, arccos, where, radians, degrees
8
-
9
- __author__ = 'Gregory Halverson'
10
-
11
-
12
- def day_angle_rad_from_doy(doy):
13
- """
14
- This function calculates day angle in radians from day of year between 1 and 365.
15
- """
16
- return (2 * pi * (doy - 1)) / 365
17
-
18
-
19
- def solar_dec_deg_from_day_angle_rad(day_angle_rad):
20
- """
21
- This function calculates solar declination in degrees from day angle in radians.
22
- """
23
- return (0.006918 - 0.399912 * cos(day_angle_rad) + 0.070257 * sin(day_angle_rad) - 0.006758 * cos(
24
- 2 * day_angle_rad) + 0.000907 * sin(2 * day_angle_rad) - 0.002697 * cos(3 * day_angle_rad) + 0.00148 * sin(
25
- 3 * day_angle_rad)) * (180 / pi)
26
-
27
-
28
- def sha_deg_from_doy_lat(doy, latitude):
29
- """
30
- This function calculates sunrise hour angle in degrees from latitude in degrees and day of year between 1 and 365.
31
- """
32
- # calculate day angle in radians
33
- day_angle_rad = day_angle_rad_from_doy(doy)
34
-
35
- # calculate solar declination in degrees
36
- solar_dec_deg = solar_dec_deg_from_day_angle_rad(day_angle_rad)
37
-
38
- # convert latitude to radians
39
- latitude_rad = radians(latitude)
40
-
41
- # convert solar declination to radians
42
- solar_dec_rad = radians(solar_dec_deg)
43
-
44
- # calculate cosine of sunrise angle at latitude and solar declination
45
- # need to keep the cosine for polar correction
46
- sunrise_cos = -tan(latitude_rad) * tan(solar_dec_rad)
47
-
48
- # calculate sunrise angle in radians from cosine
49
- warnings.filterwarnings('ignore')
50
- sunrise_rad = arccos(sunrise_cos)
51
- warnings.resetwarnings()
52
-
53
- # convert to degrees
54
- sunrise_deg = degrees(sunrise_rad)
55
-
56
- # apply polar correction
57
- sunrise_deg = where(sunrise_cos >= 1, 0, sunrise_deg)
58
- sunrise_deg = where(sunrise_cos <= -1, 180, sunrise_deg)
59
-
60
- return sunrise_deg
61
-
62
-
63
- def sunrise_from_sha(sha_deg):
64
- """
65
- This function calculates sunrise hour from sunrise hour angle in degrees.
66
- """
67
- return 12.0 - (sha_deg / 15.0)
68
-
69
-
70
- def daylight_from_sha(sha_deg):
71
- """
72
- This function calculates daylight hours from sunrise hour angle in degrees.
73
- """
74
- return (2.0 / 15.0) * sha_deg
@@ -1 +0,0 @@
1
- from .vegetation_conversion import *
@@ -1,71 +0,0 @@
1
- from typing import Union
2
- import numpy as np
3
- import rasters as rt
4
- from rasters import Raster
5
-
6
- KPAR = 0.5
7
- MIN_FIPAR = 0.0
8
- MAX_FIPAR = 1.0
9
- MIN_LAI = 0.0
10
- MAX_LAI = 10.0
11
-
12
- def FVC_from_NDVI(NDVI: Union[Raster, np.ndarray]) -> Union[Raster, np.ndarray]:
13
- """
14
- Convert Normalized Difference Vegetation Index (NDVI) to Fractional Vegetation Cover (FVC).
15
-
16
- Parameters:
17
- NDVI (Union[Raster, np.ndarray]): Input NDVI data.
18
-
19
- Returns:
20
- Union[Raster, np.ndarray]: Converted FVC data.
21
- """
22
- NDVIv = 0.52 # +- 0.03
23
- NDVIs = 0.04 # +- 0.03
24
- FVC = rt.clip((NDVI - NDVIs) / (NDVIv - NDVIs), 0.0, 1.0)
25
-
26
- return FVC
27
-
28
- def LAI_from_NDVI(
29
- NDVI: Union[Raster, np.ndarray],
30
- min_fIPAR: float = MIN_FIPAR,
31
- max_fIPAR: float = MAX_FIPAR,
32
- min_LAI: float = MIN_LAI,
33
- max_LAI: float = MAX_LAI) -> Union[Raster, np.ndarray]:
34
- """
35
- Convert Normalized Difference Vegetation Index (NDVI) to Leaf Area Index (LAI).
36
-
37
- Parameters:
38
- NDVI (Union[Raster, np.ndarray]): Input NDVI data.
39
-
40
- Returns:
41
- Union[Raster, np.ndarray]: Converted LAI data.
42
- """
43
- fIPAR = rt.clip(NDVI - 0.05, min_fIPAR, max_fIPAR)
44
- fIPAR = np.where(fIPAR == 0, np.nan, fIPAR)
45
- LAI = rt.clip(-np.log(1 - fIPAR) * (1 / KPAR), min_LAI, max_LAI)
46
-
47
- return LAI
48
-
49
- def SAVI_from_NDVI(NDVI: Union[Raster, np.ndarray]) -> Union[Raster, np.ndarray]:
50
- """
51
- Linearly calculates Soil-Adjusted Vegetation Index from ST_K.
52
- :param NDVI: normalized difference vegetation index clipped between 0 and 1
53
- :return: soil-adjusted vegetation index
54
- """
55
- return NDVI * 0.45 + 0.132
56
-
57
- def fAPAR_from_SAVI(SAVI: Union[Raster, np.ndarray]) -> Union[Raster, np.ndarray]:
58
- """
59
- Linearly calculates fraction of absorbed photosynthetically active radiation from soil-adjusted vegetation index.
60
- :param SAVI: soil adjusted vegetation index
61
- :return: fraction of absorbed photosynthetically active radiation
62
- """
63
- return rt.clip(SAVI * 1.3632 + -0.048, 0, 1)
64
-
65
- def fIPAR_from_NDVI(NDVI: Union[Raster, np.ndarray]) -> Union[Raster, np.ndarray]:
66
- """
67
- Calculate fraction of intercepted photosynthetically active radiation from normalized difference vegetation index
68
- :param NDVI: normalized difference vegetation index
69
- :return: fraction of intercepted photosynthetically active radiation
70
- """
71
- return rt.clip(rt.clip(NDVI, 0, 1) - 0.05, 0, 1)
@@ -1 +0,0 @@
1
- 1.8.0
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