CDRForcing#
- class roms_tools.CDRForcing(*, grid: Grid | None = None, start_time: datetime, end_time: datetime, model_reference_date: datetime = datetime.datetime(2000, 1, 1, 0, 0), releases: ReleaseCollector)#
Represents Carbon Dioxide Removal (CDR) forcing.
- Parameters:
grid (Grid, optional) – Object representing the grid.
start_time (datetime) – Start time of the ROMS model simulation.
end_time (datetime) – End time of the ROMS model simulation.
model_reference_date (datetime, optional) – Reference date for converting absolute times to model-relative time. Defaults to Jan 1, 2000.
releases (list of Release) – A list of one or more CDR release objects.
Methods
Compute integrated tracer quantities for all releases and return a DataFrame.
CDRForcing.from_yaml(filepath)Create an instance of the CDRForcing class from a YAML file.
CDRForcing.model_post_init(context, /)This function is meant to behave like a BaseModel method to initialize private attributes.
CDRForcing.plot_distribution(release_name[, ...])Plot the release location from a top and side view.
CDRForcing.plot_locations([release_names])Plot centers of release locations in top-down view.
CDRForcing.plot_tracer_concentration(tracer_name)Plot the concentration of a given tracer for each specified release within the given time range.
CDRForcing.plot_tracer_flux(tracer_name[, ...])Plot the flux of a given tracer for each specified release within the given time range.
CDRForcing.plot_volume_flux([start, end, ...])Plot the volume flux for each specified release within the given time range.
CDRForcing.save(filepath[, format])Save the volume source with tracers to a NetCDF file.
CDRForcing.to_yaml(filepath)Export the parameters of the class to a YAML file, including the version of roms-tools.
Attributes
CDRForcing.dsThe xarray dataset containing release metadata and forcing variables.
CDRForcing.release_typeType of the release.
CDRForcing.gridObject representing the grid.
CDRForcing.start_timeStart time of the ROMS model simulation.
CDRForcing.end_timeEnd time of the ROMS model simulation.
CDRForcing.model_reference_dateThe reference date for the ROMS simulation.
CDRForcing.releasesA list of one or more CDR release objects.