Skip to content

Environment: offshore chlorophyll-a around Moorea (#23) - #138

Merged
Luen merged 1 commit into
mainfrom
environment-23-chlorophyll
Nov 4, 2026
Merged

Luen merged 1 commit into
mainfrom
environment-23-chlorophyll

Conversation

@Luen

@Luen Luen commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #23.

What. Weekly chlorophyll-a offshore of Mo'orea as a productivity proxy. The source is NOAA S-NPP VIIRS science-quality weekly composites (4 km), from NOAA STAR and CoastWatch ERDDAP. It runs from 2012 to the present on a single sensor, so the whole study period is on one calibration.

The offshore ring. Pixels touching the island read 1–2 mg/m³, against about 0.05 mg/m³ in the open ocean. They are contaminated by land in the pixel, the lagoon floor showing through, and haze. So each week is the median of an offshore ring:

  • ocean pixels within 30 km of Mo'orea's centre (up to 107 pixels)
  • at least 10 km from any land or coastal pixel, Tahiti's included

A land or coastal pixel is one with no value in more than half the weeks. "Never valid" missed most of Mo'orea, because coastal pixels do get a value now and then. Weeks with fewer than 10 cloud-free ring pixels are left blank. The job throws if the ring shrinks below 40 pixels, so an upstream grid change fails the weekly refresh instead of quietly moving the ring.

Changes

  • fetch-external.mjs --only=chlorophyll writes external/chlorophyll-weekly.csv: 671 weeks, 641 with a value. The weekly refresh picks it up automatically.
  • New chlorophyll_weekly table, and sets.chl holds the value for the week containing the set date. IMPORTER_VERSION goes to 9.
  • New "Ocean colour" section on /ocean:
    • the weekly series
    • the seasonal cycle, with the Statistics line from one median per month and year
  • New "Chlorophyll vs catch rate" chart (one dot per season) in "Does the ocean show up in the sharks?". That grid becomes 2 × 2.
  • chl is added to the /drivers variables.
  • Sources are credited on /about and in the footer, as NOAA's licence asks. Data quality and About show the date the chlorophyll data runs to.
  • AGENTS.md has a Chlorophyll-a (Environment: chlorophyll-a / ocean colour around Moorea #23) note.

A result worth a look. Seasons with greener offshore water had lower catch rates.

Check Result
Per season Spearman ρ = −0.92, n = 12
Dropping any one season ρ stays between −0.89 and −0.98
Calendar Chlorophyll doesn't follow when in the year a season's sets were made (ρ = 0.09)
Set by set, nursery and day of the season held fixed negative binomial p < 0.001
Same test, by species blacktips p = 0.005, lemons p = 0.004
El Niño ONI vs chlorophyll ρ = 0.34, not significant

For comparison, SST drops to p = 0.88 in the same model, because SST is the calendar. Season is left out of the set-by-set adjustment, because chlorophyll varies mostly between seasons. The page presents this as a lead to test, not a cause, and adds no finding card. I've asked Jodie on #23 whether it deserves one.

Checks

  • pnpm lint, pnpm check and pnpm test all pass. A new import test checks the ring values stay open-ocean and that sets join to the right week.
  • The real-data import test passes.
  • I checked /ocean and /drivers against the real data in the dev server, with no console errors.

🤖 Generated with Claude Code

Weekly NOAA S-NPP VIIRS science-quality chlorophyll-a (4 km, NOAA STAR and
CoastWatch ERDDAP) as a productivity proxy. Pixels beside the island read
tens of times the open ocean, so each week is the median of an offshore ring:
ocean pixels within 30 km of Moorea's centre and at least 10 km from any land
or coastal pixel (no value in more than half the weeks), Tahiti's included.

- fetch-external.mjs --only=chlorophyll writes external/chlorophyll-weekly.csv
- chlorophyll_weekly table and sets.chl (week holding the set date);
  IMPORTER_VERSION 9
- /ocean: Ocean colour section (weekly series, seasonal cycle) and
  chlorophyll vs catch rate per season, with the set-by-set adjusted test
- chl joins the /drivers variables; sources credited on /about and the footer

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Luen Luen added enhancement New feature or request environment Weather, ocean, tide, climate and astronomy data labels Nov 3, 2026
@Luen
Luen merged commit 1427841 into main Nov 4, 2026
5 checks passed
@Luen
Luen deleted the environment-23-chlorophyll branch November 4, 2026 00:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request environment Weather, ocean, tide, climate and astronomy data

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Environment: chlorophyll-a / ocean colour around Moorea

1 participant