NetCDF (.nc / .nc4) Scientific Reader
Read NetCDF-3 and NetCDF-4 scientific grids into tidy SQL tables with scientific.netcdf.
Extract variables, CF axes, and fill values from .nc and .nc4 files. Convert _FillValue sentinels to SQL NULLs and publish via SQL, Parquet, and REST.
What NetCDF (.nc / .nc4) Scientific Reader does
NetCDF (.nc / .nc4) Scientific Reader turns climate, ocean, and atmospheric model archives into coordinate-indexed SQL rows using scientific.netcdf. Recipes slice bounded hyperslabs instead of loading full multi-dimensional cubes into memory.
Fill sentinels become SQL NULLs automatically, CF physical units stay attached, and results serve through SQL queries, Parquet or CSV downloads, REST API, and MCP.
Input & output example
Flattens N-dimensional NetCDF variables and CF coordinates into clean SQL rows.
NetCDF-4 file slice
variables: sst(time=12, lat=180, lon=360) sst:units = 'degC' sst:_FillValue = -32767
Coordinate-indexed rows
| time | lat | lon | sst_c |
|---|---|---|---|
| 2026-08-01 | 36.5 | -122.0 | 14.8 |
| 2026-08-01 | 36.5 | -121.5 | NULL |
How it works
- 1
Probe NetCDF variables and axes
Inspect the .nc or .nc4 file for variable names, dimension shapes, coordinate units, and declared _FillValue sentinels.
- 2
Slice arrays with scientific.netcdf
Select variables and set bounded lat, lon, time, or depth ranges to extract only the needed hyperslab.
- 3
Normalize units and publish tidy rows
Attach CF units in DuckDB SQL, run checks, and publish results as Parquet, REST endpoints, or MCP.
Try with an agent
Pre-loads NetCDF in chatIngest NOAA sea-surface temperature NetCDF files
Read weekly NOAA .nc sea-surface temperature files with scientific.netcdf over North Atlantic coordinates, handle _FillValue as NULL, and document Celsius units.
Slice NetCDF-4 soil moisture into monthly regional averages
Extract soil moisture variables from a NetCDF-4 release using scientific.netcdf and aggregate monthly regional means in DuckDB SQL.
Common use cases
- Extracting ocean temperature, salinity, and sea-level grids from .nc files
- Ingesting ERA5 or CMIP climate slices into tidy SQL tables
- Preserving CF coordinates and mapping _FillValue cleanly to NULL
- Serving climate subsets over REST APIs and Parquet downloads
Details
- Category
- Format Readers
- Identifier
- netcdf
- Inputs
- .nc (NetCDF-3/4) · .nc4 · CF-convention grids
- Outputs
- Coordinate-indexed rows · Parquet & SQL tables
- Dataset delivery
- Parquet · CSV · JSON · SQL · REST API · MCP
Frequently asked questions
Are both NetCDF-3 and HDF5-backed NetCDF-4 (.nc4) supported?
Yes. scientific.netcdf reads classic NetCDF-3 and NetCDF-4 files cleanly.
How are NetCDF _FillValue or missing_value numbers treated?
Declared fill sentinels map directly to SQL NULLs so averages, sums, and minimums are never skewed.
Do I have to unpack the whole global grid at once?
No. Configure bounded coordinate slices in reader decode_options to extract only the variables and region you need.