Create a new notebook that reads the local GOBAI-O2 v2.3 NetCDF file, writes the data into a non-virtual Icechunk repository, and publishes it to Source Cooperative at:
[fish-pace/GOBAI-O2](https://source.coop/fish-pace/gobai-o2)
This must be a standard Icechunk/Zarr write from Xarray. Do not use VirtualiZarr or virtual references.
Reference implementation
Use copenicus-icechunk-sc.ipynb as the reference for:
- loading Source Cooperative credentials;
- configuring the Source Cooperative S3 endpoint;
- creating or opening an Icechunk repository;
- creating a writable session;
- committing the completed store;
- reopening the published repository for validation.
Reuse the current working Source Cooperative configuration and authentification pattern rather than developing a separate authentication approach.
Input data
Open the local NetCDF file with:
import xarray as xr
source_path = "~/shared-public/GOBAI-O2-v2.3.nc"
ds = xr.open_dataset(source_path)
At the beginning of the notebook, inspect and report:
- dataset dimensions and sizes;
- data variables and coordinates;
- data types;
- existing global and variable attributes;
- current encoding and chunking;
- estimated uncompressed size of each data variable.
The primary four-dimensional data variables have dimensions:
time: 252
pres: 58
lat: 145
lon: 360
Chunking
Write variables with dimensions ("time", "pres", "lat", "lon") using:
{
"time": 14,
"pres": 2,
"lat": 73,
"lon": 120,
}
Apply dimension-appropriate subsets of this scheme to variables with fewer dimensions. For example:
chunks_by_dims = {
("time", "pres", "lat", "lon"): (14, 2, 73, 120),
("time", "lat", "lon"): (14, 73, 120),
("pres", "lat", "lon"): (2, 73, 120),
("lat", "lon"): (73, 120),
}
Store small one-dimensional coordinate arrays such as time, pres, lat, and lon as single chunks unless inspection of the source indicates a reason not to.
Build the encoding programmatically from each variable’s actual dimensions. Do not assume every data variable has the same dimensionality.
CF metadata
Inspect the source metadata before making changes. Preserve valid existing metadata and add or correct only what is needed to make the resulting dataset CF-compliant and readily interpretable by Xarray and visualization tools.
At minimum, verify:
- global
Conventions includes the appropriate CF version;
time is encoded as a valid CF time coordinate with a calendar and units;
- latitude has appropriate
standard_name, long_name, units, and axis metadata;
- longitude has appropriate
standard_name, long_name, units, and axis metadata;
- pressure has appropriate
standard_name, long_name, units, positive, and axis metadata;
- dissolved oxygen, temperature, salinity, and uncertainty variables have appropriate
standard_name where a valid CF standard name exists;
- every scientific variable has meaningful
long_name and units;
- fill values and missing-data encoding are preserved correctly;
- coordinate references are explicit where needed;
- global metadata includes the dataset title, summary, source, history, creators, citation, DOI, license, and references.
Do not invent uncertain scientific metadata. Use the source NetCDF attributes and the authoritative dataset documentation below. Where no valid CF standard_name exists, retain a descriptive long_name rather than creating a nonstandard value.
Dataset background:
The published store should clearly identify the input as GOBAI-O2 v2.3 and include the dataset DOI:
Icechunk write
The notebook should:
- Open and inspect the source NetCDF.
- Prepare and document any metadata changes.
- Define encoding and chunks programmatically.
- Configure Source Cooperative storage using the established reference notebook.
- Create the Icechunk repository at
fish-pace/GOBAI-O2.
- Write the complete dataset as materialized Zarr v3 data.
- Commit the write with a descriptive commit message.
- Reopen the committed repository in a read-only session.
- Validate the published dataset.
Avoid loading the full dataset into memory. Keep the source lazy and allow Xarray/Dask to stream chunks during the write.
Create a new notebook that reads the local GOBAI-O2 v2.3 NetCDF file, writes the data into a non-virtual Icechunk repository, and publishes it to Source Cooperative at:
This must be a standard Icechunk/Zarr write from Xarray. Do not use VirtualiZarr or virtual references.
Reference implementation
Use
copenicus-icechunk-sc.ipynbas the reference for:Reuse the current working Source Cooperative configuration and authentification pattern rather than developing a separate authentication approach.
Input data
Open the local NetCDF file with:
At the beginning of the notebook, inspect and report:
The primary four-dimensional data variables have dimensions:
Chunking
Write variables with dimensions
("time", "pres", "lat", "lon")using:{ "time": 14, "pres": 2, "lat": 73, "lon": 120, }Apply dimension-appropriate subsets of this scheme to variables with fewer dimensions. For example:
Store small one-dimensional coordinate arrays such as
time,pres,lat, andlonas single chunks unless inspection of the source indicates a reason not to.Build the encoding programmatically from each variable’s actual dimensions. Do not assume every data variable has the same dimensionality.
CF metadata
Inspect the source metadata before making changes. Preserve valid existing metadata and add or correct only what is needed to make the resulting dataset CF-compliant and readily interpretable by Xarray and visualization tools.
At minimum, verify:
Conventionsincludes the appropriate CF version;timeis encoded as a valid CF time coordinate with a calendar and units;standard_name,long_name,units, and axis metadata;standard_name,long_name,units, and axis metadata;standard_name,long_name,units,positive, and axis metadata;standard_namewhere a valid CF standard name exists;long_nameandunits;Do not invent uncertain scientific metadata. Use the source NetCDF attributes and the authoritative dataset documentation below. Where no valid CF
standard_nameexists, retain a descriptivelong_namerather than creating a nonstandard value.Dataset background:
The published store should clearly identify the input as GOBAI-O2 v2.3 and include the dataset DOI:
Icechunk write
The notebook should:
fish-pace/GOBAI-O2.Avoid loading the full dataset into memory. Keep the source lazy and allow Xarray/Dask to stream chunks during the write.