Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

API Overview

API Overview

Each submodule provides Layer 0 pure functions and Layer 1 Operator wrappers. Layer 2 provides the Graph API and inference wrappers.


Surface Inventory

Core Infrastructure

ExportModuleLayerStatus
Operatorgeo_toolz.coreBasev0.1
Sequentialgeo_toolz.coreL1v0.1
Input, Node, Graphgeo_toolz.coreL2v0.1
ModelOpgeo_toolz.inferenceL2v0.2
SklearnModelOpgeo_toolz.inferenceL2v0.2
JaxModelOpgeo_toolz.inferenceL2v0.2

Submodule Inventory

SubmodulePurposeL0 FunctionsL1 OperatorsStatus
validationCoordinate harmonizationvalidate_longitude, validate_latitude, ...ValidateCoords, HarmonizeCoordsv0.1
subsetSpatial/temporal selectionsubset_bbox, subset_time, ...SubsetBBox, SubsetTime, SubsetGeometryv0.1
masksLand/ocean/country maskscreate_land_mask, apply_mask, ...AddOceanMask, AddLandMask, AddCountryMaskv0.1
regridGrid transformationsregrid_linear, regrid_nearest, ...Regridv0.1
detrendClimatology and anomaliescalculate_climatology, remove_climatology, ...CalculateClimatology, RemoveClimatologyv0.1
metrics.pixelPointwise evaluation metricsmse, rmse, nrmse, mae, bias, correlation, r2_scoreMSE, RMSE, NRMSE, MAE, Bias, Correlation, R2Scorev0.1
metrics.spectralPower-spectrum scores and resolved-scalepsd_error, psd_score, resolved_scalePSDScorev0.1
interpolationGap filling, resamplingfillnan_spatial, fillnan_temporal, ...FillNaN, Resamplev0.2
encodersCoordinate encodingscyclical_encode, fourier_features, ...CyclicalEncoder, FourierFeaturesv0.2
discretizeBinning, points-to-gridbin_spatial, points_to_grid, ...Discretize, Coarsenv0.2
spectralPSD, cross-spectrumpsd, isotropic_psd, cross_spectrumPSD, IsotropicPSDv0.2
extremesExtreme value analysisblock_maxima, peaks_over_threshold, ...BlockMaxima, POTv0.2
kinematicsPhysical quantitiesstreamfunction, geostrophic_velocity, ...Streamfunction, GeostrophicVelocity, ...v0.3
crsCRS transformsassign_crs, reproject, ...AssignCRS, Reprojectv0.3
sklearnsklearn interopto_2d, from_2dSklearnOpv0.3
metrics.structuralStructural/geometric skill metricsssim, centroid_displacement, phase_shift_errorSSIM, CentroidDisplacement, PhaseShiftErrorv0.3
metrics.forecastLead-time and forecast-horizon diagnosticsskill_by_lead_time, rmse_by_lead, acc_by_leadSkillByLeadTime, RMSEByLeadv0.3
metrics.probabilisticEnsemble and probabilistic forecast verificationcrps, spread_skill_ratio, rank_histogram, ensemble_coverageCRPS, SpreadSkillRatio, RankHistogramv0.3
metrics.physicalPhysical consistency scoresgeostrophic_balance_error, divergence_error, vorticity_errorGeostrophicBalanceError, DivergenceErrorv0.3
lagrangianParticle and transport diagnosticsadvect_particles, pair_dispersion, residence_time, ftleAdvectParticles, PairDispersion, FTLEv0.4
budgetsControl-volume and conservation diagnosticsbudget_residual, heat_budget_residual, salt_budget_residualBudgetResidual, HeatBudgetResidualv0.4
phenomenaObject/event detection and matchingdetect_marine_heatwaves, detect_eddies, match_objectsDetectMarineHeatwaves, DetectEddies, MatchObjectsv0.4
metrics.objectEvent/object verification scorescontingency_table, pod, far, csi, iouProbabilityOfDetection, FalseAlarmRatio, CriticalSuccessIndex, IntersectionOverUnion, DurationError, IntensityBias, CentroidDistancev0.4

Status key: v0.1 = Foundation | v0.2 = Analysis + Inference | v0.3 = Domain Operators + expanded metrics | v0.4+ = Validation expansion


Notation and Conventions

Type Aliases

AliasMeaningUsed in
Datasetxr.DatasetAll operators
DataArrayxr.DataArrayMetrics, spectral

Operator Contract

Every Operator subclass satisfies:

Import Conventions

# Core
from geo_toolz.core import Sequential, Graph, Input

# Submodule operators (Layer 1)
from geo_toolz.validation import ValidateCoords
from geo_toolz.regrid import Regrid
from geo_toolz.detrend import CalculateClimatology, RemoveClimatology
from geo_toolz.metrics import RMSE, PSDScore

# Expanded validation operators
from geo_toolz.metrics.forecast import RMSEByLead
from geo_toolz.metrics.structural import SSIM
from geo_toolz.lagrangian import AdvectParticles
from geo_toolz.budgets import HeatBudgetResidual
from geo_toolz.phenomena import DetectMarineHeatwaves

# Inference
from geo_toolz.inference import ModelOp, SklearnModelOp, JaxModelOp

# Layer 0 functions (direct access)
from geo_toolz._src.detrend.climatology import calculate_climatology, remove_climatology

Detail Files

FileCovers
Primitives — Layer 0 Pure FunctionsLayer 0 — pure functions by submodule (validation, subset, regrid, detrend, ...)
Components — Layer 1 OperatorsLayer 1 — Operator classes by submodule, Operator base class
Models — Layer 2 Graph APILayer 2 — Graph API (Node, Input, Graph), ModelOp, inference wrappers
Validation API MapValidation API map by scientific question and metric family

For usage patterns, see ../examples/ — organized by layer to match this directory.