Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion deploy/pixi.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
[workspace]
name = "rapida"
channels = ["conda-forge"]
platforms = ["linux-64", "win-64", "osx-arm64"]
platforms = [
"linux-64",
"win-64",
# pyvalhalla only ships a macosx_14_0_arm64 wheel; without raising the macOS floor
# pixi considers it incompatible and falls back to building it from source, which
# fails in CMake (prime_server not found).
{ platform = "osx-arm64", macos = "14.0" },
]

[dependencies]
# Heavy binary geospatial drivers and libraries
Expand Down
8 changes: 5 additions & 3 deletions rapida/ntl/noaa/cmask.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,11 +312,13 @@ def cloud_coverage(hdf_url: str, bbox: list) -> int:
gdal.PushErrorHandler('CPLQuietErrorHandler')

# --- 1. DYNAMIC DRIVER SELECTION ---
is_windows = platform.system() == "Windows"
# GDAL's netCDF driver can only read /vsi paths on Linux (it needs userfaultfd).
# On Windows and macOS we skip it and drive the HDF5 driver directly instead.
use_hdf5_driver = platform.system() != "Linux"

if is_windows:
if use_hdf5_driver:
gdal.SetConfigOption('GDAL_SKIP', 'netCDF')
# On Windows, we force the HDF5 driver and its specific string syntax
# On Windows and MacOS, we force the HDF5 driver and its specific string syntax
base_ds = f'HDF5:"/vsicurl/{hdf_url}"'
mask_str = f'{base_ds}://CloudMaskBinary'
lon_str = f'{base_ds}://Longitude'
Expand Down
Loading