API reference#

Everything below is importable directly from dartobsgen.

Configuration and driver#

dartobsgen.ObsGenConfig

Configuration for a dartobsgen run.

dartobsgen.generate_obs_sequences

Generate one DART obs_seq file per assimilation cycle.

Data sources#

dartobsgen.DataSource

Abstract base class for dartobsgen data sources.

dartobsgen.CrocLakeSource

Data source backed by a CrocoLake parquet database.

dartobsgen.NNJASource

Data source backed by the NNJA-AI (NOAA/NASA Joint Archive) cloud catalog.

dartobsgen.PerfectModelSource

Data source that generates synthetic observations via DART's perfect_model_obs.

dartobsgen.ObsNetworkEntry

One synthetic observation location and type in the observing network.

dartobsgen.ObsSeqSource

Stub: future data source backed by a bank of existing obs_seq files.

Model states#

dartobsgen.ModelState

A single-timeslice model state ready for perfect_model_obs.

dartobsgen.ModelStateProvider

Supplies one single-timeslice model state per assimilation window.

dartobsgen.MOM6StateProvider

Serve single-timeslice MOM6 states from a run's model output.

dartobsgen.mom6_time_to_datetime

Convert a MOM6 Time value (days since 0001-01-01) to the datetime DART sees.

dartobsgen.state_vars_from_nml

Return the netCDF variable names in model_nml's model_state_variables.

Spatial masking#

dartobsgen.polygon_from_vertices

Build a shapely Polygon from 1D arrays of boundary vertices.

dartobsgen.polygon_from_netcdf_vertices

Load boundary vertices from a NetCDF file and return a shapely Polygon.

dartobsgen.polygon_from_netcdf_mask

Extract the boundary of a 2D 0/1 mask and return a shapely Polygon.

dartobsgen.trim_obs_seq

Trim observations in a DART obs_seq file to those inside a polygon.