Repository navigation
v0.5.2 — native-grid site building (CMEMS + HYCOM parity)
Changed
build_sitesnow uses the ocean dataset's native grid directly whencmems_verify=True(Option C architectural refactor). Previously_build_partgenerated a uniform GEBCO-derived grid via_make_gridand then post-filtered/snapped to CMEMS cell centres; that snap-and-dedup pattern extended cleanly to CMEMS's symmetric 1/12° grid but broke on HYCOM GLBy0.08's asymmetric ~0.04° lat × 0.08° lon grid (site keys landed off-cell anddata_processingsilently dropped them)._build_partnow dispatches directly tocmems_valid_maskorhycom_valid_maskbased ondata_sourceand seeds the site list from the dataset's own(lon, lat)arrays — no snap step, no cross-grid drift, no duplicates. The uniform_make_gridpath is retained for thecmems_verify=Falsefallback.
Added
- HYCOM support for
cmems_verify=Truevia newotex/data/hycom_mask.py(symmetric counterpart tocmems_mask.py). Uses the HYCOM OPeNDAP endpoint to fetch a single-time, single-depthwater_tempsnapshot and derive the valid-ocean mask. Cached under$OTEX_CACHE_DIR/hycom_mask/. data_sourceandhycom_yearparameters plumbed throughregional.run_regional_analysis→load_sites→build_sitesso a HYCOM run picks the correct mask backend automatically.
Fixed
- HYCOM regression introduced silently in 0.5.1: the CMEMS-specific mask was being applied to HYCOM runs, filtering HYCOM sites against a grid they don't live on. Bahamas HYCOM went from ~2600 valid candidates down to ~11. Fixed as part of the Option C refactor — each dataset is now filtered against its own mask.
Validated
- CMEMS Bahamas E2E:
build_sitesemits 2596 sites, all 2596 land inTime_series_data_*.h5(perfect match). - HYCOM Bahamas alignment:
build_sitesemits 6180 sites (2.4× the previous count thanks to HYCOM's asymmetric native grid), all 6180 provably in the HYCOM valid-cell set by direct emulation ofdownload_data+_extract_year_data(0 mismatches).
See #2 for the full story of the 0.5.0 → 0.5.2 site-alignment bug series.