Skip to main content

Ocean Reflectance Model (ORM, clever, aren't we?)

About

ORM generates hyperspectral (1nm) or sensor-specific Rrs (or Lwn) spectra using the ocean reflectance model described in:

 P. Jeremy Werdell, Sean W. Bailey, Bryan A. Franz, André Morel, and
 Charles R. McClain, "On-orbit vicarious calibration of ocean color sensors
 using an ocean surface reflectance model" Appl. Opt. 46, 5649-5666 (2007),
 https://doi.org/10.1364/AO.46.005649

License

NASA Opensource Agreement (NOSA) v1.3 (pending)

What's in the box

  • orm - the driver
  • get_brdf - functions to derive the Morel BRDF correction
  • get_f0 - functions to retrieve the extraterrestrial irradiance
  • morel_read - functions to read the various look-up tables

Running the model from the driver script

usage: orm [-h] [--version] [--sensor {modisa,modist,viirsn,viirsj1,seawifs,meris,olcis3a,olcis3b,octs,czcs}] [--output_file OUTPUT_FILE] [--adg [ADG]]
           [--aph [APH]] [--bbp [BBP]] [--bbp_s [BBP_S]] [--solz SOLZ [SOLZ ...]] [--wvl WVL [WVL ...]] [--bandpass BANDPASS] [--lwn] [--disable_iter_limit]
           [--gordon] [--verbose]
           chl [chl ...]

positional arguments:
  chl                   Chlorophyll concentration

optional arguments:
  -h, --help            show this help message and exit
  --version             show program's version number and exit
  --sensor {modisa,modist,viirsn,viirsj1,seawifs,meris,olcis3a,
  olcis3b,octs,czcs}
                        Sensor to mimic
  --output_file OUTPUT_FILE
                        output netCDF LUT filename; default is STDOUT
  --adg [ADG]           Detrital and Gelbstoff absorption coefficient at 443nm
  --aph [APH]           Phytoplankton absorption coefficient at 443nm
  --bbp [BBP]           Particulate backscattering coefficient at 443nm
  --bbp_s [BBP_S]       Particulate backscattering slope
  --solz SOLZ [SOLZ ...]
                        Solar zenith angle. If provided, it should either be a single value or an array matching the size of the input chlorophyll array. The
                        default is 30 degrees
  --wvl WVL [WVL ...]   Wavelength(s) to generate
  --bandpass BANDPASS   Bandpass width of wavelength(s) to generate
  --lwn                 output normalized Lw instead of Rrs
  --disable_iter_limit  allow MM01 iteration to run to convergence
  --gordon, -g          Use the Gordon quadratic formulation with input IOPs
  --verbose, -v

The "key" functions

model.gordon_rrs(adg, aph, bbp, bbp_s, chl, lwn=False, wvl=None, bandpass=11)
    Calculate Rrs given chlorophyll and IOPs.
    Uses the Gordon quadratic formulation.

model.morel_rrs(chl, solz=None, wvl=None, bandpass=11, lwn=False, mm01iter=True, use_fq=False)
    Calculate Rrs given chlorophyll and solar zenith angle.
    Based mostly on Morel and Maritorena 2001
    Rrs = trans * (f / Q) * {bb / (a + bb)}, where (a + bb) ~ mud * Kd

model.rrs_below_to_above(rrs_s, q=3.141529, gordon=False)
    Compute above-water Rrs from sub-surface rrs.
    Uses Lee et al 2002 or Gordon 1988.

utils.convolve_rsr(sensor, spectrum, verbose=False)
    Convolve 1nm resolution Rrs with a spectral response function.

Example: Using the underlying functions in your own script

from orm.model import gordon_rrs, morel_rrs
from orm.utils import convolve_rsr 
adg = 0.0045
aph = 0.0063
bbp = 0.00154
bbp_s = 1.985
chl = 0.0603
# Gordon model
spectrum = gordon_rrs(adg, aph, bbp, bbp_s, chl, lwn=True)
(wvl, lwn) = convolve_rsr('seawifs',spectrum)
# Morel model
spectrum = morel_rrs(chl, solz=40,lwn=True, mm01iter=True)
(wvl, lwn) = convolve_rsr('seawifs',spectrum)

A few extra things, not really needed...

  • kbio-netCDF - a script to generate a netCDF version of the Morel & Maritorena (2001) kbio tables
  • morel_fq_appb-netCDF - a script to generate a netCDF version of the Morel f/Q tables
  • mud_f_fp-netCDF - a script to generate a netCDF version of the Morel f, f-prime and mud tables

Metadata

Release files for obpg-orm 1.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for obpg-orm 1.1.5
File Size Uploaded Provenance Actions
obpg_orm-1.1.5.tar.gz 1.1 MB Without provenance Details for obpg_orm-1.1.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for obpg-orm 1.1.5
File Interpreter ABI Platform Actions
obpg_orm-1.1.5-py3-none-any.whl Python 3 none any Details for obpg_orm-1.1.5-py3-none-any.whl

Total release size: 3.2 MB

Release files / obpg_orm-1.1.5.tar.gz

Download URL obpg_orm-1.1.5.tar.gz
Size 1.1 MB
Tags Source
SHA-256 checksum
How to use checksums
55fb7a2c7ed9c16610371c847f9ef2cb0c2d5d7b387967fc39ddbc99e5fcf9c8
BLAKE2b-256 checksum
How to use checksums
19b1570d402e00d631f976e97ac7863064de25cfeeff8e042a449fabf6fcf7bd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / obpg_orm-1.1.5-py3-none-any.whl

Download URL obpg_orm-1.1.5-py3-none-any.whl
Size 2.1 MB
Tags Python 3
SHA-256 checksum
How to use checksums
10ba378b728c6f95f0e85775b94bfd02888a492d5e74f56cea645dcbb36f041e
BLAKE2b-256 checksum
How to use checksums
1271811bf3da256b684d123448eb4e236d99cd2236144af50f0216a7672f70cb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Security for obpg-orm 1.1.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.1.5 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page