|
1 | | -# daily-evapotranspiration-upscaling |
| 1 | +# Usage |
2 | 2 |
|
3 | | -`daily-evapotranspiration-upscaling` is a Python package providing utilities for upscaling instantaneous or daily energy balance and meteorological data to daily evapotranspiration (ET) estimates. It is designed for use with raster (spatial) or array-based data, making it suitable for remote sensing, land surface modeling, and geospatial analysis. The package implements methods based on physical principles of the surface energy balance, commonly used in remote sensing algorithms such as SEBAL and related models. It enables upscaling of point-in-time or daily energy flux measurements to daily evapotranspiration, a key variable in hydrology, agriculture, and climate studies. |
| 3 | +This package provides a set of functions for upscaling instantaneous or daily energy balance and meteorological data to daily evapotranspiration (ET) estimates. Below is a summary of each function and its usage: |
4 | 4 |
|
5 | | -Gregory H. Halverson (they/them)<br> |
6 | | - |
7 | | -NASA Jet Propulsion Laboratory 329G |
| 5 | +[](https://github.com/gregory-halverson-jpl/daily-evapotranspiration-upscaling/actions/workflows/ci.yml) |
8 | 6 |
|
9 | | -## Features |
| 7 | +The `daily-evapotranspiration-upscaling` Python package provides utilities for upscaling energy balance and meteorological data to daily ET, supporting raster, numpy array, and scalar inputs. It is designed for remote sensing, land surface modeling, and geospatial analysis. |
10 | 8 |
|
11 | | -- Convert temperature between Celsius and Kelvin |
12 | | -- Calculate latent heat of vaporization as a function of air temperature |
13 | | -- Compute evaporative fraction from energy balance components |
14 | | -- Estimate daily ET from daily or instantaneous latent heat flux (LE) |
15 | | -- Integrate net radiation over daylight hours using solar geometry |
16 | | -- Support for raster, numpy array, and scalar inputs |
17 | | -- Utilities for daylight duration and sunrise calculations |
| 9 | +[Gregory H. Halverson](https://github.com/gregory-halverson-jpl) (they/them)<br> |
| 10 | + |
| 11 | +NASA Jet Propulsion Laboratory 329G |
18 | 12 |
|
19 | 13 | ## Installation |
20 | 14 |
|
21 | | -``` |
| 15 | +This package is available on PyPI as `daily-evapotranspiration-upscaling` (with dashes): |
| 16 | + |
| 17 | +```bash |
22 | 18 | pip install daily-evapotranspiration-upscaling |
23 | 19 | ``` |
24 | 20 |
|
25 | | -## Usage Example |
| 21 | +## Usage |
| 22 | + |
| 23 | +Import this package as `daily_evapotranspiration_upscaling` (with underscores): |
26 | 24 |
|
27 | 25 | ```python |
28 | | -from daily_evapotranspiration_upscaling import daily_ET_from_instantaneous |
29 | | - |
30 | | -# Example inputs (replace with your data) |
31 | | -LE_instantaneous = ... # Latent heat flux (W/m^2) |
32 | | -Rn_instantaneous = ... # Net radiation (W/m^2) |
33 | | -G_instantaneous = ... # Soil heat flux (W/m^2) |
34 | | -DOY = 150 # Day of year |
35 | | -lat = 34.0 # Latitude in degrees |
36 | | -hour_of_day = 13.0 # Local solar time |
37 | | - |
38 | | -ET_daily = daily_ET_from_instantaneous( |
39 | | - LE_instantaneous_Wm2=LE_instantaneous, |
40 | | - Rn_instantaneous_Wm2=Rn_instantaneous, |
41 | | - G_instantaneous_Wm2=G_instantaneous, |
42 | | - DOY=DOY, |
43 | | - lat=lat, |
44 | | - hour_of_day=hour_of_day |
45 | | -) |
46 | | -print(ET_daily) |
| 26 | +import daily_evapotranspiration_upscaling |
47 | 27 | ``` |
48 | 28 |
|
49 | | -## API Reference |
| 29 | +### 1. `celcius_to_kelvin(T_C)` |
| 30 | +- **Description:** Convert Celsius to Kelvin. |
| 31 | +- **Parameters:** `T_C` (float, array, or raster): Temperature in Celsius. |
| 32 | +- **Returns:** Temperature in Kelvin. |
| 33 | + |
| 34 | +### 2. `lambda_Jkg_from_Ta_K(Ta_K)` |
| 35 | +- **Description:** Calculate latent heat of vaporization from air temperature (Kelvin). |
| 36 | +- **Parameters:** `Ta_K` (float, array, or raster): Air temperature in Kelvin. |
| 37 | +- **Returns:** Latent heat of vaporization (J/kg). |
| 38 | + |
| 39 | +### 3. `lambda_Jkg_from_Ta_C(Ta_C)` |
| 40 | +- **Description:** Calculate latent heat of vaporization from air temperature (Celsius). |
| 41 | +- **Parameters:** `Ta_C` (float, array, or raster): Air temperature in Celsius. |
| 42 | +- **Returns:** Latent heat of vaporization (J/kg). |
| 43 | + |
| 44 | +### 4. `calculate_evaporative_fraction(LE, Rn, G)` |
| 45 | +- **Description:** Compute evaporative fraction from latent heat flux, net radiation, and soil heat flux. |
| 46 | +- **Parameters:** |
| 47 | + - `LE` (float, array, or raster): Latent heat flux (W/m²) |
| 48 | + - `Rn` (float, array, or raster): Net radiation (W/m²) |
| 49 | + - `G` (float, array, or raster): Soil heat flux (W/m²) |
| 50 | +- **Returns:** Evaporative fraction (unitless). |
| 51 | + |
| 52 | +### 5. `daily_ET_from_daily_LE(LE_daylight, ...)` |
| 53 | +- **Description:** Estimate daily ET from daily latent heat flux (LE) and supporting parameters. |
| 54 | +- **Parameters:** See function docstring for details. |
| 55 | +- **Returns:** Daily evapotranspiration (mm/day). |
| 56 | + |
| 57 | +### 6. `daily_ET_from_instantaneous(LE_instantaneous, Rn_instantaneous, G_instantaneous, DOY, lat, hour_of_day, ...)` |
| 58 | +- **Description:** Estimate daily ET from instantaneous measurements of latent heat flux, net radiation, and soil heat flux. |
| 59 | +- **Parameters:** |
| 60 | + - `LE_instantaneous` (float, array, or raster): Instantaneous latent heat flux (W/m²) |
| 61 | + - `Rn_instantaneous` (float, array, or raster): Instantaneous net radiation (W/m²) |
| 62 | + - `G_instantaneous` (float, array, or raster): Instantaneous soil heat flux (W/m²) |
| 63 | + - `DOY` (int): Day of year |
| 64 | + - `lat` (float): Latitude in degrees |
| 65 | + - `hour_of_day` (float): Local solar time (hours) |
| 66 | +- **Returns:** Daily evapotranspiration (mm/day). |
| 67 | + |
| 68 | +# References |
50 | 69 |
|
51 | | -- `celcius_to_kelvin(T_C)`: Convert Celsius to Kelvin |
52 | | -- `lambda_Jkg_from_Ta_K(Ta_K)`: Latent heat of vaporization from temperature (K) |
53 | | -- `lambda_Jkg_from_Ta_C(Ta_C)`: Latent heat of vaporization from temperature (C) |
54 | | -- `calculate_evaporative_fraction(LE, Rn, G)`: Compute evaporative fraction |
55 | | -- `daily_ET_from_daily_LE(LE_daylight, ...)`: Daily ET from daily LE |
56 | | -- `daily_ET_from_instantaneous(LE_instantaneous, Rn_instantaneous, G_instantaneous, ...)`: Daily ET from instantaneous measurements |
| 70 | +- Allen, R.G., Pereira, L.S., Raes, D., Smith, M., 1998. Crop evapotranspiration-Guidelines for computing crop water requirements-FAO Irrigation and drainage paper 56. FAO, Rome, 300(9). |
| 71 | +- Bastiaanssen, W.G.M., Menenti, M., Feddes, R.A., Holtslag, A.A.M., 1998. A remote sensing surface energy balance algorithm for land (SEBAL): 1. Formulation. Journal of hydrology, 212, 198-212. |
| 72 | +- Duffie, J. A., & Beckman, W. A. (2013). Solar Engineering of Thermal Processes (4th ed.). Wiley. |
57 | 73 |
|
58 | 74 | ## License |
59 | 75 |
|
|
0 commit comments