Using FCollections for Region of Interest Extraction
Half orbits intersecting the geographical areas are retrieved using Swot geometries, as in the Search Swot tutorial.
The data is first downloaded using the Altimetry Downloader Aviso tool.
This script uses fcollections to clip each dataset according to a region of interest, then apply an export function. This export function applies the following modifications:
The spatial and temporal location attributes are updated to reflect the region of interest
The file history attributes are updated to trace the clipping modification
If clipping a region results in no valid points remaining, the export is skipped
Tutorial Objectives
Getting half orbits intersecting a list of areas using Swot geometries, retrieved with
fcollections.sadDownload Swot data with cycle/passes numbers, using
altimetry_downloader_avisoClip each dataset according to the regions of interest, and store the results, using
fcollections
Note
Required environment to run this notebook:
xarray+numpygeopandas+shapelymatplotlib+cartopydaskaltimetry_downloader_aviso: see documentation.fcollections: available here.
from copy import copy
import functools
from pathlib import Path
import re
import typing as tp
import dask.distributed
import fcollections.sad
from fcollections.core import Layout, FileNameConvention, FileNameFieldString
from fcollections.implementations import NetcdfFilesDatabaseSwotLRL3
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.patches as patches
import cartopy.crs as ccrs
import xarray as xr
import geopandas as gpd
from shapely import geometry
import logging
logging.basicConfig()
logger = logging.getLogger('crop_script')
logger.setLevel('DEBUG')
Parameters
OUTPUT_FOLDER = Path.home() / "TMP_DATA"
QUERY = {
"version": "3.0",
"subset": "Expert",
"cycle_number" : 40
# Used to generate the samples. Can be removed
}
cycle_number = 40
AREAS = {
# "polynesie": (-155, -28, -134, -7),
"polynesie": (205, -28, 226, -7),
"metropole": (-15, 34, 36, 54),
"nvlle-caledonie": (158, -24, 167, -18),
"outre-mer": (-63, 2, -51, 17)
}
Get Half orbits intersecting the geographical areas
Getting Swot geometries file
fcollections.sad.summary()
┏━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ Type ┃ Available ┃ Keys ┃ Lookup Folders ┃ ┡━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩ │ gshhg │ 0/15 │ GSHHS_c,GSHHS_f,GSHHS_h,GSHHS_i,GSHHS_l,border_c,bo │ /home/atonneau/.config/sad │ │ │ │ rder_f,border_h,border_i,border_l,river_c,river_f,r │ │ │ │ │ iver_h,river_i,river_l │ │ │ karin_footprints │ 2/2 │ calval,science │ /home/atonneau/.config/sad │ └──────────────────┴───────────┴─────────────────────────────────────────────────────┴────────────────────────────┘
aux = fcollections.sad.KarinFootprints()
aux.keys
{'calval', 'science'}
GEOMETRIES_FILE = aux['science']
Getting half orbits intersecting areas
def get_half_orbits_intersect(bbox):
"""Get half orbits that intersect a bounding box.
Parameters
----------
bbox:
the bounding box
Returns
-------
gpd.GeoDataFrame:
A Geopandas dataframe containing intersecting half orbits numbers and geometries
"""
swath_geometries = gpd.read_file(GEOMETRIES_FILE)
bbox_polygon = geometry.box(*bbox)
def _filter_intersect(row, polygon):
half_orbit_polygon = row.geometry
return polygon.intersects(half_orbit_polygon)
select = swath_geometries.apply(_filter_intersect, polygon=bbox_polygon, axis=1)
return swath_geometries[select]
pass_numbers = []
for area_name, area_box in AREAS.items():
swath_geoms = get_half_orbits_intersect(area_box)
passes = list(swath_geoms.pass_number)
print(f"Passes for {area_name}:")
print(len(passes))
pass_numbers = list(set(pass_numbers + passes))
Passes for polynesie:
42
Passes for metropole:
98
Passes for nvlle-caledonie:
19
Passes for outre-mer:
25
pass_numbers = sorted(pass_numbers)
len(pass_numbers)
184
Download data using altimetry_downloader_aviso
import altimetry_downloader_aviso as dl_aviso
dl_aviso.get(
'SWOT_L3_LR_SSH_Expert',
output_dir=OUTPUT_FOLDER,
cycle_number=cycle_number,
pass_number=pass_numbers,
)
['/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_001_20251011T225152_20251011T234318_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_003_20251012T003445_20251012T012612_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_005_20251012T021739_20251012T030905_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_011_20251012T072620_20251012T081747_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_012_20251012T081747_20251012T090913_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_014_20251012T100041_20251012T105207_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_026_20251012T201803_20251012T210929_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_027_20251012T210929_20251012T220056_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_029_20251012T225223_20251012T234349_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_030_20251012T234350_20251013T003516_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_031_20251013T003517_20251013T012643_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_033_20251013T021810_20251013T030937_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_039_20251013T072651_20251013T081818_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_040_20251013T081818_20251013T090945_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_042_20251013T100112_20251013T105238_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_054_20251013T201834_20251013T211000_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_055_20251013T211001_20251013T220127_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_057_20251013T225254_20251013T234421_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_058_20251013T234421_20251014T003547_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_061_20251014T021842_20251014T031008_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_067_20251014T072723_20251014T081850_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_068_20251014T081850_20251014T091016_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_070_20251014T100143_20251014T105309_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_082_20251014T201905_20251014T211032_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_083_20251014T211032_20251014T220158_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_085_20251014T225326_20251014T234452_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_086_20251014T234452_20251015T003619_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_089_20251015T021913_20251015T031039_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_095_20251015T072754_20251015T081921_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_096_20251015T081921_20251015T091047_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_098_20251015T100214_20251015T105341_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_110_20251015T201936_20251015T211103_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_111_20251015T211103_20251015T220230_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_113_20251015T225357_20251015T234523_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_114_20251015T234524_20251016T003650_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_117_20251016T021944_20251016T031111_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_123_20251016T072825_20251016T081952_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_124_20251016T081952_20251016T091118_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_126_20251016T100246_20251016T105412_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_127_20251016T105412_20251016T114539_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_130_20251016T132833_20251016T142000_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_138_20251016T202008_20251016T211134_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_139_20251016T211134_20251016T220301_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_141_20251016T225428_20251016T234554_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_142_20251016T234555_20251017T003721_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_145_20251017T022015_20251017T031141_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_151_20251017T072856_20251017T082023_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_152_20251017T082023_20251017T091149_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_154_20251017T100317_20251017T105443_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_155_20251017T105444_20251017T114610_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_158_20251017T132904_20251017T142031_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_166_20251017T202039_20251017T211205_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_167_20251017T211206_20251017T220332_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_169_20251017T225459_20251017T234625_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_178_20251018T063801_20251018T072927_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_179_20251018T072927_20251018T082054_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_180_20251018T082054_20251018T091221_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_182_20251018T100348_20251018T105514_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_183_20251018T105515_20251018T114641_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_186_20251018T132935_20251018T142102_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_194_20251018T202110_20251018T211236_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_195_20251018T211237_20251018T220403_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_197_20251018T225530_20251018T234656_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_206_20251019T063832_20251019T072958_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_207_20251019T072959_20251019T082125_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_208_20251019T082125_20251019T091252_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_210_20251019T100419_20251019T105545_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_211_20251019T105546_20251019T114712_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_214_20251019T133006_20251019T142133_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_220_20251019T183847_20251019T193014_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_223_20251019T211308_20251019T220434_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_225_20251019T225601_20251019T234728_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_234_20251020T063903_20251020T073029_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_235_20251020T073030_20251020T082157_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_236_20251020T082157_20251020T091323_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_238_20251020T100450_20251020T105616_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_242_20251020T133037_20251020T142204_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_248_20251020T183918_20251020T193045_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_249_20251020T193045_20251020T202212_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_251_20251020T211339_20251020T220505_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_253_20251020T225633_20251020T234759_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_262_20251021T063934_20251021T073100_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_263_20251021T073101_20251021T082228_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_264_20251021T082228_20251021T091354_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_270_20251021T133109_20251021T142235_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_276_20251021T183950_20251021T193116_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_277_20251021T193116_20251021T202243_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_279_20251021T211410_20251021T220536_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_281_20251021T225704_20251021T234830_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_290_20251022T064005_20251022T073132_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_291_20251022T073132_20251022T082259_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_292_20251022T082259_20251022T091425_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_304_20251022T184021_20251022T193147_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_305_20251022T193148_20251022T202314_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_307_20251022T211441_20251022T220607_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_309_20251022T225735_20251022T234901_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_311_20251023T004028_20251023T013155_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_317_20251023T054910_20251023T064036_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_318_20251023T064036_20251023T073203_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_320_20251023T082330_20251023T091456_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_332_20251023T184052_20251023T193218_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_333_20251023T193219_20251023T202346_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_335_20251023T211512_20251023T220639_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_336_20251023T220639_20251023T225805_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_337_20251023T225806_20251023T234932_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_339_20251024T004100_20251024T013226_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_345_20251024T054941_20251024T064107_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_346_20251024T064108_20251024T073234_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_348_20251024T082401_20251024T091527_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_360_20251024T184123_20251024T193249_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_361_20251024T193250_20251024T202417_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_363_20251024T211544_20251024T220710_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_364_20251024T220710_20251024T225837_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_367_20251025T004131_20251025T013257_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_373_20251025T055012_20251025T064138_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_374_20251025T064139_20251025T073305_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_376_20251025T082432_20251025T091558_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_388_20251025T184154_20251025T193320_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_389_20251025T193321_20251025T202448_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_391_20251025T211615_20251025T220741_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_392_20251025T220741_20251025T225908_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_395_20251026T004202_20251026T013328_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_401_20251026T055043_20251026T064209_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_402_20251026T064210_20251026T073336_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_404_20251026T082503_20251026T091630_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_405_20251026T091630_20251026T100756_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_408_20251026T115051_20251026T124217_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_416_20251026T184225_20251026T193351_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_417_20251026T193352_20251026T202519_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_419_20251026T211646_20251026T220812_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_420_20251026T220812_20251026T225939_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_423_20251027T004233_20251027T013359_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_429_20251027T055114_20251027T064240_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_430_20251027T064241_20251027T073407_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_432_20251027T082534_20251027T091700_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_433_20251027T091701_20251027T100827_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_436_20251027T115122_20251027T124248_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_444_20251027T184256_20251027T193422_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_445_20251027T193423_20251027T202550_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_447_20251027T211717_20251027T220843_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_448_20251027T220843_20251027T230010_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_451_20251028T004304_20251028T013430_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_456_20251028T050018_20251028T055144_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_457_20251028T055145_20251028T064311_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_458_20251028T064312_20251028T073438_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_460_20251028T082605_20251028T091731_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_461_20251028T091732_20251028T100858_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_464_20251028T115153_20251028T124319_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_472_20251028T184327_20251028T193453_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_473_20251028T193454_20251028T202621_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_475_20251028T211748_20251028T220914_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_484_20251029T050049_20251029T055215_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_485_20251029T055216_20251029T064342_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_486_20251029T064343_20251029T073509_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_488_20251029T082636_20251029T091802_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_489_20251029T091803_20251029T100929_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_492_20251029T115223_20251029T124350_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_500_20251029T184358_20251029T193524_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_501_20251029T193525_20251029T202652_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_503_20251029T211819_20251029T220945_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_512_20251030T050120_20251030T055246_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_513_20251030T055247_20251030T064413_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_514_20251030T064414_20251030T073540_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_516_20251030T082707_20251030T091833_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_517_20251030T091834_20251030T101000_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_520_20251030T115255_20251030T124421_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_526_20251030T170136_20251030T175302_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_529_20251030T193556_20251030T202723_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_531_20251030T211850_20251030T221016_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_540_20251031T050151_20251031T055317_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_541_20251031T055318_20251031T064444_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_542_20251031T064445_20251031T073611_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_544_20251031T082738_20251031T091904_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_548_20251031T115326_20251031T124452_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_554_20251031T170207_20251031T175333_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_555_20251031T175333_20251031T184500_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_557_20251031T193627_20251031T202754_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_559_20251031T211921_20251031T221047_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_568_20251101T050222_20251101T055348_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_569_20251101T055349_20251101T064515_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_570_20251101T064516_20251101T073642_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_576_20251101T115357_20251101T124523_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_582_20251101T170238_20251101T175404_v3.0.nc',
'/home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_040_583_20251101T175404_20251101T184531_v3.0.nc']
Extraction
cluster = dask.distributed.LocalCluster(processes=False)
client = cluster.get_client()
client
/home/atonneau/.conda/envs/PY311_DEV/lib/python3.11/site-packages/distributed/node.py:187: UserWarning: Port 8787 is already in use.
Perhaps you already have a cluster running?
Hosting the HTTP server on port 36021 instead
warnings.warn(
Client
Client-65e396c6-3319-11f1-91de-4a99e6fcae07
| Connection method: Cluster object | Cluster type: distributed.LocalCluster |
| Dashboard: http://10.40.206.21:36021/status |
Cluster Info
LocalCluster
22613c14
| Dashboard: http://10.40.206.21:36021/status | Workers: 1 |
| Total threads: 96 | Total memory: 629.52 GiB |
| Status: running | Using processes: False |
Scheduler Info
Scheduler
Scheduler-03d0a6e8-eae8-488d-9e86-67673596fe63
| Comm: inproc://10.40.206.21/1364446/1 | Workers: 1 |
| Dashboard: http://10.40.206.21:36021/status | Total threads: 96 |
| Started: Just now | Total memory: 629.52 GiB |
Workers
Worker: 0
| Comm: inproc://10.40.206.21/1364446/4 | Total threads: 96 |
| Dashboard: http://10.40.206.21:33459/status | Memory: 629.52 GiB |
| Nanny: None | |
| Local directory: /tmp/dask-scratch-space/worker-rqqrp75m | |
INFO:crop_script:No valid data in half orbit (40, 110) for area 'polynesie', file will not be produced
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_polynesie_040_039_20251013T072651_20251013T081818_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_polynesie_040_388_20251025T184154_20251025T193320_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_polynesie_040_526_20251030T170136_20251030T175302_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_polynesie_040_207_20251019T072959_20251019T082125_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_polynesie_040_054_20251013T201834_20251013T211000_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_polynesie_040_082_20251014T201905_20251014T211032_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_polynesie_040_220_20251019T183847_20251019T193014_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_polynesie_040_138_20251016T202008_20251016T211134_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_polynesie_040_345_20251024T054941_20251024T064107_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_polynesie_040_276_20251021T183950_20251021T193116_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_polynesie_040_011_20251012T072620_20251012T081747_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_polynesie_040_304_20251022T184021_20251022T193147_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_polynesie_040_457_20251028T055145_20251028T064311_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_polynesie_040_026_20251012T201803_20251012T210929_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_polynesie_040_513_20251030T055247_20251030T064413_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_polynesie_040_095_20251015T072754_20251015T081921_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_polynesie_040_500_20251029T184358_20251029T193524_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_polynesie_040_194_20251018T202110_20251018T211236_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_polynesie_040_123_20251016T072825_20251016T081952_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_polynesie_040_485_20251029T055216_20251029T064342_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_polynesie_040_569_20251101T055349_20251101T064515_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_polynesie_040_429_20251027T055114_20251027T064240_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_polynesie_040_582_20251101T170238_20251101T175404_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_polynesie_040_263_20251021T073101_20251021T082228_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_polynesie_040_444_20251027T184256_20251027T193422_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_polynesie_040_179_20251018T072927_20251018T082054_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_polynesie_040_416_20251026T184225_20251026T193351_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_polynesie_040_166_20251017T202039_20251017T211205_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_polynesie_040_291_20251022T073132_20251022T082259_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_polynesie_040_360_20251024T184123_20251024T193249_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_polynesie_040_332_20251023T184052_20251023T193218_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_polynesie_040_373_20251025T055012_20251025T064138_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_polynesie_040_554_20251031T170207_20251031T175333_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_polynesie_040_541_20251031T055318_20251031T064444_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_polynesie_040_401_20251026T055043_20251026T064209_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_polynesie_040_235_20251020T073030_20251020T082157_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_polynesie_040_317_20251023T054910_20251023T064036_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_polynesie_040_151_20251017T072856_20251017T082023_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_polynesie_040_472_20251028T184327_20251028T193453_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_polynesie_040_067_20251014T072723_20251014T081850_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_polynesie_040_248_20251020T183918_20251020T193045_v3.0.nc
INFO:crop_script:No valid data in half orbit (40, 111) for area 'metropole', file will not be produced
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_484_20251029T050049_20251029T055215_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_236_20251020T082157_20251020T091323_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_501_20251029T193525_20251029T202652_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_376_20251025T082432_20251025T091558_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_152_20251017T082023_20251017T091149_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_029_20251012T225223_20251012T234349_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_096_20251015T081921_20251015T091047_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_488_20251029T082636_20251029T091802_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_238_20251020T100450_20251020T105616_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_318_20251023T064036_20251023T073203_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_475_20251028T211748_20251028T220914_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_281_20251021T225704_20251021T234830_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_348_20251024T082401_20251024T091527_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_361_20251024T193250_20251024T202417_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_012_20251012T081747_20251012T090913_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_234_20251020T063903_20251020T073029_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_307_20251022T211441_20251022T220607_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_290_20251022T064005_20251022T073132_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_320_20251023T082330_20251023T091456_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_195_20251018T211237_20251018T220403_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_460_20251028T082605_20251028T091731_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_516_20251030T082707_20251030T091833_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_279_20251021T211410_20251021T220536_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_277_20251021T193116_20251021T202243_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_264_20251021T082228_20251021T091354_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_225_20251019T225601_20251019T234728_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_141_20251016T225428_20251016T234554_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_068_20251014T081850_20251014T091016_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_083_20251014T211032_20251014T220158_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_447_20251027T211717_20251027T220843_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_305_20251022T193148_20251022T202314_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_458_20251028T064312_20251028T073438_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_419_20251026T211646_20251026T220812_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_040_20251013T081818_20251013T090945_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_391_20251025T211615_20251025T220741_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_374_20251025T064139_20251025T073305_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_014_20251012T100041_20251012T105207_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_167_20251017T211206_20251017T220332_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_531_20251030T211850_20251030T221016_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_404_20251026T082503_20251026T091630_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_557_20251031T193627_20251031T202754_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_249_20251020T193045_20251020T202212_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_335_20251023T211512_20251023T220639_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_154_20251017T100317_20251017T105443_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_445_20251027T193423_20251027T202550_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_208_20251019T082125_20251019T091252_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_430_20251027T064241_20251027T073407_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_085_20251014T225326_20251014T234452_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_544_20251031T082738_20251031T091904_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_251_20251020T211339_20251020T220505_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_182_20251018T100348_20251018T105514_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_389_20251025T193321_20251025T202448_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_363_20251024T211544_20251024T220710_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_180_20251018T082054_20251018T091221_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_309_20251022T225735_20251022T234901_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_346_20251024T064108_20251024T073234_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_210_20251019T100419_20251019T105545_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_262_20251021T063934_20251021T073100_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_432_20251027T082534_20251027T091700_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_113_20251015T225357_20251015T234523_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_292_20251022T082259_20251022T091425_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_486_20251029T064343_20251029T073509_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_027_20251012T210929_20251012T220056_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_529_20251030T193556_20251030T202723_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_055_20251013T211001_20251013T220127_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_197_20251018T225530_20251018T234656_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_057_20251013T225254_20251013T234421_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_402_20251026T064210_20251026T073336_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_206_20251019T063832_20251019T072958_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_456_20251028T050018_20251028T055144_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_540_20251031T050151_20251031T055317_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_031_20251013T003517_20251013T012643_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_223_20251019T211308_20251019T220434_v3.0.nc
INFO:crop_script:No valid data in half orbit (40, 253) for area 'metropole', file will not be produced
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_169_20251017T225459_20251017T234625_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_417_20251026T193352_20251026T202519_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_126_20251016T100246_20251016T105412_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_139_20251016T211134_20251016T220301_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_503_20251029T211819_20251029T220945_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_124_20251016T081952_20251016T091118_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_098_20251015T100214_20251015T105341_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_570_20251101T064516_20251101T073642_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_473_20251028T193454_20251028T202621_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_003_20251012T003445_20251012T012612_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_070_20251014T100143_20251014T105309_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_542_20251031T064445_20251031T073611_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_001_20251011T225152_20251011T234318_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_568_20251101T050222_20251101T055348_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_337_20251023T225806_20251023T234932_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_559_20251031T211921_20251031T221047_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_514_20251030T064414_20251030T073540_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_555_20251031T175333_20251031T184500_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_178_20251018T063801_20251018T072927_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_583_20251101T175404_20251101T184531_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_333_20251023T193219_20251023T202346_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_512_20251030T050120_20251030T055246_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_metropole_040_042_20251013T100112_20251013T105238_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_nvlle-caledonie_040_336_20251023T220639_20251023T225805_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_nvlle-caledonie_040_183_20251018T105515_20251018T114641_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_nvlle-caledonie_040_058_20251013T234421_20251014T003547_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_nvlle-caledonie_040_086_20251014T234452_20251015T003619_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_nvlle-caledonie_040_420_20251026T220812_20251026T225939_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_nvlle-caledonie_040_517_20251030T091834_20251030T101000_v3.0.nc
INFO:crop_script:No valid data in half orbit (40, 114) for area 'nvlle-caledonie', file will not be produced
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_nvlle-caledonie_040_489_20251029T091803_20251029T100929_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_nvlle-caledonie_040_155_20251017T105444_20251017T114610_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_nvlle-caledonie_040_392_20251025T220741_20251025T225908_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_nvlle-caledonie_040_461_20251028T091732_20251028T100858_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_nvlle-caledonie_040_364_20251024T220710_20251024T225837_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_nvlle-caledonie_040_448_20251027T220843_20251027T230010_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_nvlle-caledonie_040_211_20251019T105546_20251019T114712_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_nvlle-caledonie_040_127_20251016T105412_20251016T114539_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_nvlle-caledonie_040_142_20251016T234555_20251017T003721_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_nvlle-caledonie_040_405_20251026T091630_20251026T100756_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_nvlle-caledonie_040_030_20251012T234350_20251013T003516_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_nvlle-caledonie_040_433_20251027T091701_20251027T100827_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_outre-mer_040_451_20251028T004304_20251028T013430_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_outre-mer_040_061_20251014T021842_20251014T031008_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_outre-mer_040_339_20251024T004100_20251024T013226_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_outre-mer_040_242_20251020T133037_20251020T142204_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_outre-mer_040_520_20251030T115255_20251030T124421_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_outre-mer_040_492_20251029T115223_20251029T124350_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_outre-mer_040_408_20251026T115051_20251026T124217_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_outre-mer_040_186_20251018T132935_20251018T142102_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_outre-mer_040_436_20251027T115122_20251027T124248_v3.0.nc
INFO:crop_script:No valid data in half orbit (40, 576) for area 'outre-mer', file will not be produced
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_outre-mer_040_214_20251019T133006_20251019T142133_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_outre-mer_040_548_20251031T115326_20251031T124452_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_outre-mer_040_158_20251017T132904_20251017T142031_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_outre-mer_040_464_20251028T115153_20251028T124319_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_outre-mer_040_145_20251017T022015_20251017T031141_v3.0.nc
INFO:crop_script:No valid data in half orbit (40, 117) for area 'outre-mer', file will not be produced
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_outre-mer_040_033_20251013T021810_20251013T030937_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_outre-mer_040_005_20251012T021739_20251012T030905_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_outre-mer_040_367_20251025T004131_20251025T013257_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_outre-mer_040_270_20251021T133109_20251021T142235_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_outre-mer_040_089_20251015T021913_20251015T031039_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_outre-mer_040_423_20251027T004233_20251027T013359_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_outre-mer_040_311_20251023T004028_20251023T013155_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_outre-mer_040_130_20251016T132833_20251016T142000_v3.0.nc
DEBUG:crop_script:Creating /home/atonneau/TMP_DATA/SWOT_L3_LR_SSH_Expert_outre-mer_040_395_20251026T004202_20251026T013328_v3.0.nc
def dump_to_netcdf(ds: xr.Dataset, record: dict[str, tp.Any], area_name: str) -> tuple[tuple[int, int], str | Path]:
# Need to load the dataset. Errors (No valid ID in netcdf) has been observed
# if to_netcdf() has a graph dask. It might be related to the dask in dask configuration
# which is as a general rule not a good practice. It would be better if the map() method
# would give us an already computed dataset
ds.load()
# Work around another bug, the dataset is not given as properly ordered in fcollections
# Need to reorder it here
ds = ds.sortby('time')
cycle_number, pass_number, filename = record[1], record[2], record[-1]
# If the area has no data, no need to create the file
if np.all(ds.quality_flag >= 102):
logger.info("No valid data in half orbit (%d, %d) for area '%s', file will not be produced",
cycle_number, pass_number, area_name)
return (cycle_number, pass_number), None
# Add the area to the file name
# Official name: SWOT_L3_LR_SSH_Expert_005_012_20231013T020000_20231013T025127_v2.0.1
# Cropped name: SWOT_L3_LR_SSH_Expert_<area>_005_012_20231013T020000_20231013T025127_v2.0.1
basename = Path(filename).name
split = basename.split('_')
split.insert(5, area_name)
new_name = '_'.join(split)
new_file = OUTPUT_FOLDER / new_name
del ds.encoding['source']
# Add a FillValue to longitude and latitude.
# Not necessary because there should be no invalids but useful to avoid warnings
ds.latitude.attrs['_FillValue'] = 1e6
ds.longitude.attrs['_FillValue'] = 1e6
# Update the temporal and geospatial extent with the new area
ds.attrs['geospatial_lat_min'] = ds['latitude'].values.min()
ds.attrs['geospatial_lat_max'] = ds['latitude'].values.max()
ds.attrs['geospatial_lon_min'] = ds['longitude'].values.min()
ds.attrs['geospatial_lon_max'] = ds['longitude'].values.max()
ds.attrs['time_coverage_start'] = str(ds.time.values[0].astype('M8[s]')) + 'Z'
ds.attrs['time_coverage_end'] = str(ds.time.values[-1].astype('M8[s]')) + 'Z'
# Update the history
now = str(np.datetime64('now')) + 'Z'
ds.attrs['date_modified'] = now
ds.attrs['date_issued'] = now
ds.attrs['history'] += f'\n{now}: Cropped to "{area_name}" area'
logger.debug('Creating %s', new_file)
ds.to_netcdf(new_file, mode='w')
ds.close()
return (cycle_number, pass_number), new_file
fc = NetcdfFilesDatabaseSwotLRL3(OUTPUT_FOLDER)
for area_name, area_box in AREAS.items():
logger.info('Extraction for "%s" area', area_name)
bag = fc.map(
functools.partial(dump_to_netcdf, area_name=area_name),
**QUERY,
bbox=area_box)
result = bag.compute()
not_extracted = list(
map(lambda xx: (int(xx[0][0]), int(xx[0][1])),
filter(lambda xx: xx[1] is None,
result)))
if len(not_extracted)>0:
logger.info('%s has no valid data, they have not been extracted', not_extracted)
INFO:crop_script:Extraction for "polynesie" area
INFO:crop_script:[(40, 110)] has no valid data, they have not been extracted
INFO:crop_script:Extraction for "metropole" area
INFO:crop_script:[(40, 111), (40, 253)] has no valid data, they have not been extracted
INFO:crop_script:Extraction for "nvlle-caledonie" area
INFO:crop_script:[(40, 114)] has no valid data, they have not been extracted
INFO:crop_script:Extraction for "outre-mer" area
INFO:crop_script:[(40, 117), (40, 576)] has no valid data, they have not been extracted
Checks
convention = NetcdfFilesDatabaseSwotLRL3.layouts[0].conventions[0]
fields = copy(convention.fields)
fields.append(FileNameFieldString('area'))
convention = FileNameConvention(
regex=re.compile('SWOT_(?P<level>.*)_LR_SSH_(?P<subset>Expert)_(?P<area>.*)_(?P<cycle_number>\\d{3})_(?P<pass_number>\\d{3})_(?P<time>\\d{8}T\\d{6}_\\d{8}T\\d{6})_v(?P<version>.*).nc'),
fields=fields)
layout = Layout([convention])
class NetcdfFilesDatabaseSwotLRL3Area(NetcdfFilesDatabaseSwotLRL3):
layouts = [layout]
fc = NetcdfFilesDatabaseSwotLRL3Area(OUTPUT_FOLDER)
area = 'metropole'
bbox = AREAS[area]
files = fc.list_files(area=area)
# Figure
localbox_cartopy = bbox[0] - 1, bbox[2] + 1, bbox[1] - 1, bbox[3] + 1
fig, ax = plt.subplots(figsize=(8, 8), subplot_kw=dict(projection=ccrs.PlateCarree()))
ax.set_extent(localbox_cartopy)
plot_kwargs = dict(
x="longitude",
y="latitude",
cmap="Spectral_r",
vmin=-0.5,
vmax=0.5,
add_colorbar=False, # Désactive la colorbar automatique
)
for pass_number in files["pass_number"]:
ds = fc.query(area=area, pass_number=pass_number)
# SWOT KaRIn SLA plots
p = ds.ssha_filtered.plot.pcolormesh(ax=ax, **plot_kwargs)
fig.colorbar(p, ax=ax, shrink=0.3, label="SSHA filtered (m)")
ax.set_title(f"SLA KaRIn (filtered) and selection box (in red) in '{area}'")
ax.coastlines()
ax.gridlines(draw_labels=['left', 'bottom'])
# Add the patch to the Axes
rect = patches.Rectangle((bbox[0], bbox[1]), bbox[2] - bbox[0], bbox[3] - bbox[1], linewidth=1.5, edgecolor='r', facecolor='none')
ax.add_patch(rect)
<matplotlib.patches.Rectangle at 0x7ab2b691ba90>