crt1d.data#

Data provided with crt1d: default/sample spectra, as well as functions that use external (not-required) libraries to compute more spectra.

Data are loaded as xarray.Dataset for easy inspection.

Package Contents#

Functions#

leaf_ps5([n, cab, car, cbr, ewt, lma])

Run PROSPECT-5 from Python package prosail

load_default(*[, midpt])

Load default toc irradiance spectra, and leaf & soil optical props,

load_default_ps5()

Load the provided default PROSPECT5 leaf element reflectance/transmittance.

load_default_sp2(*[, midpt])

Load sample SPCTRAL2 top-of-canopy spectra (direct and diffuse).

load_ideal_leaf(*[, midpt])

Load the ideal green leaf properties (at SPCTRAL2 wavelengths).

load_prosail_sample_soil(*[, f_wet])

Sample soil spectra provided in Python PROSAIL.

load_soil_fuentes2007(wl_um)

PAR and NIR values, applied to the wavelengths in wl_um.

solar_sp2(dt, lat, lon, *[, utcoffset, temp, pres, ...])

Run SPCTRAL2 using SolarUtils

crt1d.data.leaf_ps5(n=1.2, cab=30.0, car=10.0, cbr=1.0, ewt=0.015, lma=0.009)#

Run PROSPECT-5 from Python package prosail (source on GitHub) to generate leaf spectra.

Default values are the same as those on the online PROSPECT page.

Parameters:
  • n (float) – Leaf structure parameter (number of effective layers of leaf?; dimensionless). Typical range: [0.8, 3.0].

  • cab (float) – Chlorophyll a+b concentration (μg cm-2). Typical range: [0, 100].

  • car (float) – Carotenoid concentration (μg cm-2). Typical range: [0, 25].

  • cbr (float) – Brown pigment fraction/factor in [0, 1].

  • ewt (float) – Equivalent leaf water thickness (cm). Typical range: [0, 0.05].

  • lma (float) – Leaf dry mass per unit area (g cm-2). Typical range: [0, 0.02].

Returns:

xarray.Dataset – Dataset of the leaf reflectance and transmittance spectra, and PROSPECT input parameters as dimensionless variables.

Notes

Quoted typical ranges are based on the PROSPECT page and Python PROSAIL readme linked above.

crt1d.data.load_default(*, midpt=True)#

Load default toc irradiance spectra, and leaf & soil optical props, used in load_default_case().

The defaults are given by:

crt1d.data.load_default_ps5()#

Load the provided default PROSPECT5 leaf element reflectance/transmittance.

(I believe) these are the default spectra for the online version of PROSPECT.

crt1d.data.load_default_sp2(*, midpt=True)#

Load sample SPCTRAL2 top-of-canopy spectra (direct and diffuse).

This is the default spectrum in the Excel version of SPCTRAL2.

Parameters:

midpt (bool, optional) –

true (default): irradiance calculated at midpts of the original grid

false: irradiance calculated by estimating the edges of the original grid and treating the original grid as centers

Notes

The SPCTRAL2 irradiances are in spectral form: W m-2 μm-1, but we need in-band irradiance for the solvers, since some compute W/m2 absorption.

crt1d.data.load_ideal_leaf(*, midpt=False)#

Load the ideal green leaf properties (at SPCTRAL2 wavelengths).

crt1d.data.load_prosail_sample_soil(*, f_wet=0)#

Sample soil spectra provided in Python PROSAIL.

Parameters:

f_wet (float) – Weighting factor for the wet soil spectrum (0–1)

Notes

https://github.com/jgomezdans/prosail/blob/master/prosail/soil_reflectance.txt

crt1d.data.load_soil_fuentes2007(wl_um)#

PAR and NIR values, applied to the wavelengths in wl_um.

crt1d.data.solar_sp2(dt, lat, lon, *, utcoffset=0, temp=25, pres=1000, ozone=None, tau500=0.2, watvap=1.36, alpha=1.14, assym=0.65, albedo=None)#

Run SPCTRAL2 using SolarUtils (Python package name solar_utils).

The defaults are mostly consistent with solar_utils.spectrl2(), but some of the inputs are in a different style.

Parameters:
  • dt (datetime.datetime) – In UTC, but with timezone not specified. (UTC offset specified separately!)

  • lat (float) – Latitude and longitude of the location (deg.). Longitude in -180–180.

  • lon (float) – Latitude and longitude of the location (deg.). Longitude in -180–180.

  • utcoffset (int) – UTC offset, e.g. -5 for US Eastern Standard Time (EST)

  • temp (float) – Air temperature at the location (deg. C).

  • pres (float) – Amospheric surface pressure at the location (hPa/mb).

  • ozone (float) – Total column ozone (cm). The default is to use SPCTRAL2’s internal parameterization based on location and time of day/year (Heuklon 1978). Passing -1.0 will have the same result.

  • tau500 (float) – Aerosol optical depth (base e) at 500 nm. Typical range: [0.05, 0.55] for clear sky. Should be in [0, 10].

  • watvap (float) – Total column precipitable water vapor (cm). Typical range: [0.3, 6]. Should be in [0, 100].

  • alpha (float) – Power on Angstrom turbidity. If you pass a negative number, you will get 1.14.

  • assym (float) – Aerosol asymmetry factor. In the C code they say this is a typical rural value. Should be in (0, 1). If you pass -1.0, you will get 0.65.

  • albedo (dict) – keys: wavelength (μm), values: albedo at that wavelength; length 6. The default is 0.2 (across the board) for wavelengths [0.3, 0.7, 0.8, 1.3, 2.5, 4.0].

Returns:

xarray.Dataset – Dataset containing the spectra, solar zenith angle, and time/location info.