# Using PlumeMasks.nc to Extract Daily SPM Values Starting with v0.4.0, each `panache` run writes a single `PlumeMasks.nc` file alongside `Results.csv`. Starting with v0.5.0, this file stores one boolean plume mask per river **and** one zone-wide union mask, for every processed day, as a four-dimensional array with dimensions `(time, river, lat, lon)`. The `river` coordinate holds each zone's river names plus a final `'ALL'` layer equal to the logical OR of all of that zone's rivers on that day — mirroring the per-`(date, river)` rows plus the `river='ALL'` aggregate row in `Results.csv` (see {doc}`vignette_workflow`). This vignette demonstrates how to use `PlumeMasks.nc` together with the original Sextant satellite files to recover the distribution of suspended particulate matter (SPM) concentrations within the detected plume footprint on any given day. The example uses one year of daily Gulf of Lion data (2010) from the Sextant L4 SPM product. --- ## 1. Run panache to produce PlumeMasks.nc Run a standard Gulf of Lion batch for 2010: ```json { "zone": "GULF_OF_LION", "input_path": "/data/SEXTANT/SPM/2010/*.nc", "bathymetry_path": "/data/bathymetry/Bathy_data.pkl", "output_dir": "/data/panache-output/GULF_OF_LION/2010", "coast_shapefile": "/data/boundaries/gadm41_FRA_0.shp", "overwrite": false, "gif": false, "nb_cores": 4, "dynamic_threshold": false, "global_threshold_quantile": 0.95, "variable_name": "analysed_spim" } ``` After the run completes the output directory contains: ``` GULF_OF_LION/2010/ ├── Results.csv ├── PlumeMasks.nc ← new in v0.4.0 ├── manifest.csv └── MAPS/ └── ... ``` --- ## 2. Inspect PlumeMasks.nc ```python import xarray as xr masks = xr.open_dataset("/data/panache-output/GULF_OF_LION/2010/PlumeMasks.nc") print(masks) ``` ``` Dimensions: (time: 365, river: 3, lat: 140, lon: 100) Coordinates: * time (time) datetime64[ns] 2010-01-01 ... 2010-12-31 * river (river)