AFIM Sea Ice Toolbox: sea_ice_config.json reference
This page documents the global configuration JSON consumed by SeaIceToolbox and its mixin sub-classes:
SeaIceClassificationSeaIceMetricsSeaIcePlotterSeaIceIcebergsSeaIceObservationsSeaIceACCESSSeaIceGridWorkSeaIceRegridder
SeaIceToolbox loads this JSON at construction time and uses it to:
Define filesystem locations (inputs/outputs, logs, grids, observational archives).
Define canonical names for key variables and dimensions (e.g.,
aice,hi,time,nj,ni).Provide standard thresholds and analysis defaults (speed threshold, concentration threshold, persistence window, etc.).
Provide plotting metadata (labels, colormaps, panel defaults, sector extents).
Provide dataset-specific settings (AF2020 bins, NSIDC formats, ORAS/ERA5 access patterns, etc.).
Important: this is the global config. During runtime,
SeaIceToolbox.parse_simulation_metadata()may also write a per-simulation JSON (e.g.,ice_in_AFIM_subset_<sim>.json) derived fromice_diag.d. That per-simulation metadata file is separate fromsea_ice_config.jsonand is not described in full here.
Conventions used in this document
Required means the toolbox will raise a
KeyErroror otherwise fail without the field (based on current code paths).Optional means the toolbox has a fallback default or the field is only needed for certain workflows.
Types are given in Python terms:
str,int,float,bool,list[...],dict[...].
Top-level (non-dictionary) keys
These keys control the default analysis window and common thresholds.
Key |
Type |
Required |
Meaning |
|---|---|---|---|
|
|
Optional |
Default analysis start date ( |
|
|
Optional |
Default analysis end date ( |
|
|
Optional |
A leap year used in certain climatology/time utilities. |
|
|
Optional |
Default hemisphere ( |
|
|
Optional |
Default history cadence ( |
|
|
Optional |
Unit conversion factor (centimetres → metres), used where needed. |
|
|
Optional |
Rolling mean window (days) used in speed-based methods. |
|
|
Optional |
Binary-days window length (days). |
|
|
Optional |
Minimum number of “fast” days within |
|
|
Optional |
Allowed B→T / regrid modes (e.g., |
|
|
Optional |
Default mode(s) used to build speed fields. |
|
|
Optional |
Allowed classification types (e.g., |
|
|
Optional |
Default classification type(s). |
|
|
Optional |
Default “strict” speed threshold (m/s), e.g. |
|
|
Optional |
Default “lenient” speed threshold (m/s). |
|
|
Optional |
Ice concentration threshold for masking (fraction, e.g. |
|
|
Optional |
Scale factor used in fast-ice metrics (project-specific). |
|
|
Optional |
Upper cap for fast-ice thickness diagnostics (m). |
|
|
Optional |
Scale factor used in sea-ice volume/area metrics (project-specific). |
|
|
Optional |
Tag used in metrics directory/file naming. |
Dictionary keys (modules and their config blocks)
1) FI_class_types (classification naming)
Purpose: Maps classification methods to suffixes used in output naming.
Schema:
Required keys: whatever methods you use in code (commonly
binary-days,rolling).Values: short string tags used in constructed names.
Example:
"FI_class_types": {
"binary-days": "bin",
"rolling": "roll"
}
2) D_dict (top-level directory registry)
Purpose: Central location for all major directory roots used throughout AFIM.
Common requirements (practical minimum):
AFIM_out(model output root)logs(log root)tmp(temporary working directory)graph(figure output root)
Schema (recommended):
Key |
Type |
Required |
Meaning |
|---|---|---|---|
|
|
Yes |
Root directory containing simulations ( |
|
|
Usually |
Root directory for input archives (obs, forcing, etc.). |
|
|
Yes |
Directory for toolbox log files. |
|
|
Yes |
Temporary workspace (Dask spill, intermediate files). |
|
|
Yes |
Root directory for saved figures. |
|
|
Optional |
Root for grid files if you keep them external to the repo. |
3) CICE_dict (CICE conventions, dimensions, and required variables)
Purpose: Defines how to interpret CICE grid/history data and how to chunk/select variables.
Fields typically required by core workflows:
Grid files/paths:
P_G(CICE grid NetCDF)Dimension names:
time_dim,x_dim,y_dim,spatial_dims,three_dimsCoordinate names:
lon_coord_name,lat_coord_name, and/ortcoord_names,bcoord_namesVariable name conventions:
SIC_name,SIT_name,SI_vel_names,cice_vars_reqdRegridding weights path:
P_reG_u2t_weights(if using xESMF regridding)Chunking presets:
FI_chunks(if using Zarr + Dask patterns)
Schema:
Key |
Type |
Required |
Meaning |
|---|---|---|---|
|
|
Optional |
Root for CICE input artifacts (optional if paths elsewhere). |
|
|
Yes |
Path to the CICE grid file (contains |
|
|
Optional |
Path to bathymetry/topography file used by some pipelines. |
|
|
Optional |
Path to a landmask/bathymetry mask file (if used directly). |
|
|
Required for xESMF |
Filename for saved xESMF weights (U→T). |
|
|
Optional |
Grid resolution in degrees (metadata/plotting). |
|
|
Optional |
Standard sea-ice concentration variable name (e.g. |
|
|
Optional |
Standard sea-ice thickness variable name (e.g. |
|
|
Optional |
Velocity component names (e.g. |
|
|
Optional |
Cell area variable name on grid (e.g. |
|
|
Yes |
Time dimension name (often |
|
|
Yes |
Horizontal dimension names (often |
|
|
Optional |
Expected full-grid sizes (used in padding/consistency checks). |
|
|
Optional |
Whether the x-dimension is cyclic (global wrap). |
|
|
Yes |
Horizontal dims, e.g. |
|
|
Optional |
Spatiotemporal dims, e.g. |
|
|
Optional |
Default coordinate names in CICE datasets (e.g. |
|
|
Optional |
T-grid lon/lat coordinate names used in some routines. |
|
|
Required for B→T averaging |
B/U-grid lon/lat coordinate names (e.g. |
|
|
Optional |
Coordinates to drop when cleaning datasets for merge/concat. |
|
|
Optional |
Variables to drop when cleaning datasets. |
|
|
Yes |
Minimal variable set required for AFIM workflows (masking/metrics). |
|
|
Optional |
Extra variables to include when |
|
|
Optional |
Recommended Dask chunking for fast-ice/classification products. |
4) GI_dict (grounded iceberg dataset + modified landmask formats)
Purpose: Supports workflows that modify the landmask to represent grounded icebergs (GI), and stores naming conventions for GI products.
Schema:
Key |
Type |
Required |
Meaning |
|---|---|---|---|
|
|
Optional |
Root directory holding grounded iceberg source products. |
|
|
Often |
Directory used to store thinned GI products and KMT masks. |
|
|
Optional |
Filename template for GI thinning products. |
|
|
Optional |
Filename for the “original” KMT file (no GI). |
|
|
Optional |
Filename template for “modified” KMT including GI. |
5) AF_FI_dict (Fraser et al. 2020 fast-ice observational conventions)
Purpose: Configures access and interpretation of the AF2020 fast-ice dataset (binning, variables, file layout).
Common fields:
Key |
Type |
Required |
Meaning |
|---|---|---|---|
|
|
Usually |
Root directory for AF2020 dataset. |
|
|
Usually |
Filename pattern for AF2020 files (often includes year). |
|
|
Usually |
Variable name for fast-ice mask/field in AF2020. |
|
|
Yes |
Start day-of-year values defining AF2020 temporal bins. |
6) NSIDC_dict, Sea_Ice_Obs_dict, AOM2_dict, MOM_dict, ORAS_dict, ERA5_dict
These dictionaries serve as registries for dataset-specific paths, variable mappings, and conventions. Their exact fields are project-specific, but the intent is consistent:
provide directory roots and file naming patterns
define variable names and dimension/coordinate names
define time coverage and dataset identifiers
7) hemispheres_dict, Ant_8sectors, Ant_2sectors, specific_regions
These control spatial slicing and plotting extents/projections, ensuring consistent regional figures across workflows.
8) pygmt_dict, pygmt_FIA_dict, pygmt_FI_panel, plot_var_dict
These control plot styling (labels, legend entries, axis presets, colormaps, and panel defaults).
Practical validation checklist
Before running large workflows, validate that:
Paths exist:
D_dict.AFIM_out,D_dict.logs,D_dict.tmp,D_dict.graphCICE_dict.P_G
Dimension conventions are consistent:
CICE_dict.time_dim,CICE_dict.x_dim,CICE_dict.y_dimCICE_dict.spatial_dimsmatches your datasets (typically("nj","ni"))
Required CICE variables are present:
CICE_dict.cice_vars_reqd
If using xESMF:
CICE_dict.P_reG_u2t_weightspoints to a writable location on first run.