VIIRS Net Primary Productivity
This chapter documents the Cloud Run workflow for generating daily and monthly VIIRS net primary productivity products.
Purpose
The workflow computes daily and monthly satellite-derived primary productivity products from VIIRS ocean color inputs using a containerized Cloud Run Job pattern.
Products are supported for:
- NOAA-20 VIIRS - daily and monthly productivity products
- SNPP VIIRS - daily and monthly productivity products
Repository structure
viirs-netpp/
├── config/
│ ├── config.yml # Runtime settings
│ └── requirements.txt # Python dependencies
├── deploy_job.sh # Build, push, and deploy Cloud Run jobs
├── Dockerfile # Container definition
├── entrypoint.sh # Job mode selector
├── scripts/
│ ├── control_viirs_netpp.py # Daily workflow controller
│ ├── make_viirs_netpp.py # Daily productivity processor
│ ├── control_viirs_netpp_monthly.py # Monthly workflow controller
│ └── make_viirs_netpp_monthly.py # Monthly productivity processor
└── templates/
├── nasa_noaa20_4km.cdl # NOAA-20 daily template
├── nasa_noaa20_4km_month.cdl # NOAA-20 monthly template
├── nasa_snpp_4km.cdl # SNPP daily template
└── nasa_snpp_4km_month.cdl # SNPP monthly template
Cloud Run jobs
The workflow runs as separate Cloud Run jobs, all built from the same container image and dispatched by entrypoint.sh.
| Job mode | Script | Description |
|---|---|---|
daily |
control_viirs_netpp.py |
Daily VIIRS productivity processing |
monthly |
control_viirs_netpp_monthly.py |
Monthly VIIRS productivity composites |
Processing pipeline
Each daily run follows this general sequence:
Cloud Scheduler → Cloud Run Job → Download inputs → Compute productivity → Apply template metadata → Publish to GCS → ERDDAP ingestion
The daily controller handles date selection, sensor configuration, input discovery, and calls the product generation script for each target date.
Monthly composites
Monthly processing is triggered through the monthly job mode.
The monthly workflow gathers the required daily productivity files, builds a monthly composite, applies the appropriate CDL template, and publishes the final NetCDF output for ERDDAP.
Templates and static assets
The workflow uses CDL templates to define the output NetCDF structure and metadata.
| File | Purpose |
|---|---|
nasa_noaa20_4km.cdl |
NOAA-20 daily NetCDF template |
nasa_noaa20_4km_month.cdl |
NOAA-20 monthly NetCDF template |
nasa_snpp_4km.cdl |
SNPP daily NetCDF template |
nasa_snpp_4km_month.cdl |
SNPP monthly NetCDF template |
Codebase
Deployment
Container and job configuration.
Daily scripts
Daily VIIRS productivity orchestration and processing.
- control_viirs_netpp.py - daily workflow controller
- make_viirs_netpp.py - daily productivity processor
Monthly composites
Monthly VIIRS productivity compositing.
- control_viirs_netpp_monthly.py - monthly workflow controller
- make_viirs_netpp_monthly.py - monthly composite builder
Templates and static assets
Reference CDL templates and static NetCDF structure definitions.
- nasa_noaa20_4km.cdl
- nasa_noaa20_4km_month.cdl
- nasa_snpp_4km.cdl
- nasa_snpp_4km_month.cdl