Metadata-Version: 2.4
Name: l3binbandshift
Version: 1.2.1
Summary: Generates a bandshifted L3 bin Rrs file for the OCR-VC (virtual constellation)
Author-email: Maxwell Beal <maxwell.r.beal@nasa.gov>
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.12
Description-Content-Type: text/markdown
Requires-Dist: numpy>=1.17.1
Requires-Dist: netCDF4>=1.5.2
Requires-Dist: l3bintools>=1.5.1
Requires-Dist: scipy
Requires-Dist: tqdm-loggable>=0.4.1
Requires-Dist: h5py

# L3b Band Shifting Script

## Overview

This script performs **band shifting of Level-3 binned ocean color data**.
It combines an **IOP L3b file** and an **Rrs L3b file**, computes shifted reflectance at target wavelengths, and writes a new L3b NetCDF output.

Currently runs for L3b files from the following satellites:
SeaWiFS, MODIS Aqua, SNPP-VIIRS, VIIRS-NOAA20, VIIRS-NOAA21, Sentinel-3 OLCI A & B

---

## Requirements

### Python packages

* numpy
* netCDF4
* h5py

### External modules

Must be available in your environment:

* `l3bintools`
* `bandshiftL3b_functions.py`
* `bricaud_extended.json` The A and B coefficients file defining the spectral shape of aph, can be replaced (Note: The Bricaud table has been artifically extended to 900nm, wavelengths beyond 700nm should not be trusted)
* `pace_aw.json` absorption of water at each wavelength

---

## Usage

```bash
python bandshiftL3b.py \
  --ifile_iop AQUA_MODIS.20040111.L3b.DAY.IOP.nc  \
  --ifile_oc AQUA_MODIS.20040111.L3b.DAY.RRS.nc  \
  --ofile output_shifted.L3b.nc
```

---

## Arguments

### Required

* `--ifile_iop`  Input IOP L3b file
* `--ifile_oc`  Input Rrs L3b file
* `--ofile`  Output band-shifted file

### Optional

* `--wavelengths`  Target bands (default: 412 443 490 510 555 670 765 865)
* `--sat_to`  Output instrument metadata (default: SeaWiFS)
* `--platform_to`  Output platform metadata (default: OrbView-2)

---

## What It Does

* Matches spatial bins between IOP and Rrs files
* Gets IOPs, applies Melin and Sclep 2015 approach
* Band-shifts reflectance to requested wavelengths (not band shifting shared bands)
* Copies AOT + Angstrom products
* Writes cleaned L3b NetCDF output

---

## Output

A new L3b NetCDF containing:

* Shifted Rrs bands
* Updated metadata

---

