crt1d.data._external

Create spectral input data using external packages.

Module Contents

Functions

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

Run PROSPECT-5 from Python package prosail

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

Run SPCTRAL2 using SolarUtils

crt1d.data._external.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._external.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.