rompy.schism.data.SCHISMData#
- pydantic model rompy.schism.data.SCHISMData[source]#
This class is used to gather all required input forcing for SCHISM
Show JSON schema
{ "title": "SCHISMData", "description": "This class is used to gather all required input forcing for SCHISM", "type": "object", "properties": { "data_type": { "const": "schism", "default": "schism", "description": "Model type discriminator", "title": "Data Type", "type": "string" }, "atmos": { "anyOf": [ { "$ref": "#/$defs/SCHISMDataSflux" }, { "type": "null" } ], "default": null, "description": "atmospheric data" }, "wave": { "anyOf": [ { "$ref": "#/$defs/DataBlob" }, { "$ref": "#/$defs/SCHISMDataWave" }, { "type": "null" } ], "default": null, "description": "wave data", "title": "Wave" }, "boundary_conditions": { "anyOf": [ { "$ref": "#/$defs/SCHISMDataBoundaryConditions" }, { "type": "null" } ], "default": null, "description": "unified boundary conditions (replaces tides and ocean)" } }, "$defs": { "BoundarySetupWithSource": { "additionalProperties": false, "description": "Enhanced boundary setup that includes data sources.\n\nThis class extends BoundarySetup to provide a unified configuration\nfor both boundary conditions and their data sources.", "properties": { "elev_type": { "default": 5, "description": "Elevation boundary type (0-5)", "title": "Elev Type", "type": "integer" }, "vel_type": { "default": 5, "description": "Velocity boundary type (-4, -1, 0-5)", "title": "Vel Type", "type": "integer" }, "temp_type": { "default": 0, "description": "Temperature boundary type (0-4)", "title": "Temp Type", "type": "integer" }, "salt_type": { "default": 0, "description": "Salinity boundary type (0-4)", "title": "Salt Type", "type": "integer" }, "const_elev": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Constant elevation value (for type 2)", "title": "Const Elev" }, "const_flow": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Constant flow value (for type 2)", "title": "Const Flow" }, "const_temp": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Constant temperature value (for type 2)", "title": "Const Temp" }, "const_salt": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "Constant salinity value (for type 2)", "title": "Const Salt" }, "inflow_relax": { "default": 0.5, "description": "Relaxation factor for inflow (0-1)", "title": "Inflow Relax", "type": "number" }, "outflow_relax": { "default": 0.1, "description": "Relaxation factor for outflow (0-1)", "title": "Outflow Relax", "type": "number" }, "temp_nudge": { "default": 1.0, "description": "Temperature nudging factor (0-1)", "title": "Temp Nudge", "type": "number" }, "salt_nudge": { "default": 1.0, "description": "Salinity nudging factor (0-1)", "title": "Salt Nudge", "type": "number" }, "temp_th_path": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Path to temperature time history file (for type 1)", "title": "Temp Th Path" }, "temp_3d_path": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Path to 3D temperature file (for type 4)", "title": "Temp 3D Path" }, "salt_th_path": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Path to salinity time history file (for type 1)", "title": "Salt Th Path" }, "salt_3d_path": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Path to 3D salinity file (for type 4)", "title": "Salt 3D Path" }, "flow_th_path": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Path to flow time history file (for type 1)", "title": "Flow Th Path" }, "elev_st_path": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Path to space-time elevation file (for types 2/4)", "title": "Elev St Path" }, "vel_st_path": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Path to space-time velocity file (for types 2/4)", "title": "Vel St Path" }, "mean_elev": { "anyOf": [ { "items": { "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Mean elevation for Flather boundaries", "title": "Mean Elev" }, "mean_flow": { "anyOf": [ { "items": { "items": { "type": "number" }, "type": "array" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Mean flow for Flather boundaries", "title": "Mean Flow" }, "elev_source": { "anyOf": [ { "$ref": "#/$defs/DataBlob" }, { "$ref": "#/$defs/SCHISMDataBoundary" }, { "type": "null" } ], "default": null, "description": "Data source for elevation boundary condition", "title": "Elev Source" }, "vel_source": { "anyOf": [ { "$ref": "#/$defs/DataBlob" }, { "$ref": "#/$defs/SCHISMDataBoundary" }, { "type": "null" } ], "default": null, "description": "Data source for velocity boundary condition", "title": "Vel Source" }, "temp_source": { "anyOf": [ { "$ref": "#/$defs/DataBlob" }, { "$ref": "#/$defs/SCHISMDataBoundary" }, { "type": "null" } ], "default": null, "description": "Data source for temperature boundary condition", "title": "Temp Source" }, "salt_source": { "anyOf": [ { "$ref": "#/$defs/DataBlob" }, { "$ref": "#/$defs/SCHISMDataBoundary" }, { "type": "null" } ], "default": null, "description": "Data source for salinity boundary condition", "title": "Salt Source" } }, "title": "BoundarySetupWithSource", "type": "object" }, "DataBlob": { "additionalProperties": false, "description": "Data source for model ingestion.\n\nGeneric data source for files that either need to be copied to the model directory\nor linked if `link` is set to True.", "properties": { "model_type": { "default": "data_blob", "description": "Model type discriminator", "enum": [ "data_blob", "data_link" ], "title": "Model Type", "type": "string" }, "id": { "default": "data", "description": "Unique identifier for this data source", "title": "Id", "type": "string" }, "source": { "description": "URI of the data source, either a local file path or a remote uri", "title": "Source" }, "link": { "default": false, "description": "Whether to create a symbolic link instead of copying the file", "title": "Link", "type": "boolean" } }, "required": [ "source" ], "title": "DataBlob", "type": "object" }, "DataBoundary": { "additionalProperties": false, "properties": { "model_type": { "const": "boundary", "default": "data_boundary", "description": "Model type discriminator", "title": "Model Type", "type": "string" }, "id": { "description": "Unique identifier for this data source", "title": "Id", "type": "string" }, "source": { "description": "Source reader, must return an xarray gridded dataset in the open method", "discriminator": { "mapping": { "csv": "#/$defs/SourceTimeseriesCSV", "datamesh": "#/$defs/SourceDatamesh", "file": "#/$defs/SourceFile", "intake": "#/$defs/SourceIntake", "wavespectra": "#/$defs/SourceWavespectra" }, "propertyName": "model_type" }, "oneOf": [ { "$ref": "#/$defs/SourceTimeseriesCSV" }, { "$ref": "#/$defs/SourceDatamesh" }, { "$ref": "#/$defs/SourceFile" }, { "$ref": "#/$defs/SourceIntake" }, { "$ref": "#/$defs/SourceWavespectra" } ], "title": "Source" }, "link": { "default": false, "description": "Whether to create a symbolic link instead of copying the file", "title": "Link", "type": "boolean" }, "filter": { "anyOf": [ { "$ref": "#/$defs/Filter" }, { "type": "null" } ], "description": "Optional filter specification to apply to the dataset" }, "variables": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": [], "description": "Subset of variables to extract from the dataset", "title": "Variables" }, "coords": { "anyOf": [ { "$ref": "#/$defs/DatasetCoords" }, { "type": "null" } ], "default": { "t": "time", "x": "longitude", "y": "latitude", "z": null, "s": null }, "description": "Names of the coordinates in the dataset" }, "crop_data": { "default": true, "description": "Update crop filter from Time object if passed to get method", "title": "Crop Data", "type": "boolean" }, "buffer": { "default": 0.0, "description": "Space to buffer the grid bounding box if `filter_grid` is True", "title": "Buffer", "type": "number" }, "time_buffer": { "default": [ 0, 0 ], "description": "Number of source data timesteps to buffer the time range if `filter_time` is True", "items": { "type": "integer" }, "title": "Time Buffer", "type": "array" }, "spacing": { "anyOf": [ { "type": "number" }, { "const": "parent", "type": "string" }, { "type": "null" } ], "default": null, "description": "Spacing between points along the grid boundary to retrieve data for. If None (default), points are defined from the the actual grid object passed to the `get` method. If 'parent', the resolution of the parent dataset is used to define the spacing.", "title": "Spacing" }, "sel_method": { "default": "sel", "description": "Xarray method to use for selecting boundary points from the dataset", "enum": [ "sel", "interp" ], "title": "Sel Method", "type": "string" }, "sel_method_kwargs": { "additionalProperties": true, "default": {}, "description": "Keyword arguments for sel_method", "title": "Sel Method Kwargs", "type": "object" } }, "required": [ "id", "source" ], "title": "DataBoundary", "type": "object" }, "DataGrid": { "additionalProperties": false, "description": "Data object for gridded source data.\n\nGeneric data object for xarray datasets that with gridded spatial dimensions\n\nNote\n----\nThe fields `filter_grid` and `filter_time` trigger updates to the crop filter from\nthe grid and time range objects passed to the get method. This is useful for data\nsources that are not defined on the same grid as the model grid or the same time\nrange as the model run.", "properties": { "model_type": { "const": "grid", "default": "grid", "description": "Model type discriminator", "title": "Model Type", "type": "string" }, "id": { "default": "data", "description": "Unique identifier for this data source", "title": "Id", "type": "string" }, "source": { "description": "Source reader, must return an xarray gridded dataset in the open method", "discriminator": { "mapping": { "csv": "#/$defs/SourceTimeseriesCSV", "datamesh": "#/$defs/SourceDatamesh", "file": "#/$defs/SourceFile", "intake": "#/$defs/SourceIntake", "wavespectra": "#/$defs/SourceWavespectra" }, "propertyName": "model_type" }, "oneOf": [ { "$ref": "#/$defs/SourceTimeseriesCSV" }, { "$ref": "#/$defs/SourceDatamesh" }, { "$ref": "#/$defs/SourceFile" }, { "$ref": "#/$defs/SourceIntake" }, { "$ref": "#/$defs/SourceWavespectra" } ], "title": "Source" }, "link": { "default": false, "description": "Whether to create a symbolic link instead of copying the file", "title": "Link", "type": "boolean" }, "filter": { "anyOf": [ { "$ref": "#/$defs/Filter" }, { "type": "null" } ], "description": "Optional filter specification to apply to the dataset" }, "variables": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": [], "description": "Subset of variables to extract from the dataset", "title": "Variables" }, "coords": { "anyOf": [ { "$ref": "#/$defs/DatasetCoords" }, { "type": "null" } ], "default": { "t": "time", "x": "longitude", "y": "latitude", "z": null, "s": null }, "description": "Names of the coordinates in the dataset" }, "crop_data": { "default": true, "description": "Update crop filters from Grid and Time objects if passed to get method", "title": "Crop Data", "type": "boolean" }, "buffer": { "default": 0.0, "description": "Space to buffer the grid bounding box if `filter_grid` is True", "title": "Buffer", "type": "number" }, "time_buffer": { "default": [ 0, 0 ], "description": "Number of source data timesteps to buffer the time range if `filter_time` is True", "items": { "type": "integer" }, "title": "Time Buffer", "type": "array" } }, "required": [ "source" ], "title": "DataGrid", "type": "object" }, "DatasetCoords": { "additionalProperties": false, "description": "Coordinates representation.", "properties": { "t": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": "time", "description": "Name of the time coordinate", "title": "T" }, "x": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": "longitude", "description": "Name of the x coordinate", "title": "X" }, "y": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": "latitude", "description": "Name of the y coordinate", "title": "Y" }, "z": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Name of the z coordinate", "title": "Z" }, "s": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Name of the site coordinate", "title": "S" } }, "title": "DatasetCoords", "type": "object" }, "Filter": { "additionalProperties": false, "properties": { "sort": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": {}, "title": "Sort" }, "subset": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": {}, "title": "Subset" }, "crop": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": {}, "title": "Crop" }, "timenorm": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": {}, "title": "Timenorm" }, "rename": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": {}, "title": "Rename" }, "derived": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": {}, "title": "Derived" } }, "title": "Filter", "type": "object" }, "HotstartConfig": { "additionalProperties": false, "description": "Configuration for generating SCHISM hotstart files.\n\nThis class specifies parameters for creating hotstart.nc files from\ntemperature and salinity data sources already configured in boundary conditions.", "properties": { "enabled": { "default": false, "description": "Whether to generate hotstart file", "title": "Enabled", "type": "boolean" }, "temp_var": { "default": "temperature", "description": "Name of temperature variable in source dataset", "title": "Temp Var", "type": "string" }, "salt_var": { "default": "salinity", "description": "Name of salinity variable in source dataset", "title": "Salt Var", "type": "string" }, "time_offset": { "default": 0.0, "description": "Offset to add to source time values (in days)", "title": "Time Offset", "type": "number" }, "time_base": { "default": "2000-01-01T00:00:00", "description": "Base time for source time values", "format": "date-time", "title": "Time Base", "type": "string" }, "output_filename": { "default": "hotstart.nc", "description": "Name of the output hotstart file", "title": "Output Filename", "type": "string" } }, "title": "HotstartConfig", "type": "object" }, "SCHISMDataBoundary": { "additionalProperties": false, "description": "This class is used to extract ocean boundary data from a griddd dataset at all open\nboundary nodes.", "properties": { "model_type": { "const": "boundary", "default": "data_boundary", "description": "Model type discriminator", "title": "Model Type", "type": "string" }, "id": { "choices": [ "elev2D", "uv3D", "TEM_3D", "SAL_3D", "bnd" ], "default": "bnd", "description": "SCHISM th id of the source", "title": "Id", "type": "string" }, "source": { "description": "Source reader, must return an xarray gridded dataset in the open method", "discriminator": { "mapping": { "csv": "#/$defs/SourceTimeseriesCSV", "datamesh": "#/$defs/SourceDatamesh", "file": "#/$defs/SourceFile", "intake": "#/$defs/SourceIntake", "wavespectra": "#/$defs/SourceWavespectra" }, "propertyName": "model_type" }, "oneOf": [ { "$ref": "#/$defs/SourceTimeseriesCSV" }, { "$ref": "#/$defs/SourceDatamesh" }, { "$ref": "#/$defs/SourceFile" }, { "$ref": "#/$defs/SourceIntake" }, { "$ref": "#/$defs/SourceWavespectra" } ], "title": "Source" }, "link": { "default": false, "description": "Whether to create a symbolic link instead of copying the file", "title": "Link", "type": "boolean" }, "filter": { "anyOf": [ { "$ref": "#/$defs/Filter" }, { "type": "null" } ], "description": "Optional filter specification to apply to the dataset" }, "variables": { "description": "variable name in the dataset", "items": { "type": "string" }, "title": "Variables", "type": "array" }, "coords": { "anyOf": [ { "$ref": "#/$defs/DatasetCoords" }, { "type": "null" } ], "default": { "t": "time", "x": "longitude", "y": "latitude", "z": null, "s": null }, "description": "Names of the coordinates in the dataset" }, "crop_data": { "default": true, "description": "Update crop filter from Time object if passed to get method", "title": "Crop Data", "type": "boolean" }, "buffer": { "default": 0.0, "description": "Space to buffer the grid bounding box if `filter_grid` is True", "title": "Buffer", "type": "number" }, "time_buffer": { "default": [ 0, 1 ], "description": "Number of source data timesteps to buffer the time range if `filter_time` is True", "items": { "type": "integer" }, "title": "Time Buffer", "type": "array" }, "spacing": { "anyOf": [ { "type": "number" }, { "const": "parent", "type": "string" }, { "type": "null" } ], "default": null, "description": "Spacing between points along the grid boundary to retrieve data for. If None (default), points are defined from the the actual grid object passed to the `get` method. If 'parent', the resolution of the parent dataset is used to define the spacing.", "title": "Spacing" }, "sel_method": { "default": "interp", "description": "Xarray method to use for selecting boundary points from the dataset", "enum": [ "sel", "interp" ], "title": "Sel Method", "type": "string" }, "sel_method_kwargs": { "additionalProperties": true, "default": {}, "description": "Keyword arguments for sel_method", "title": "Sel Method Kwargs", "type": "object" }, "data_type": { "const": "boundary", "default": "boundary", "description": "Model type discriminator", "title": "Data Type", "type": "string" }, "data_grid_source": { "anyOf": [ { "$ref": "#/$defs/DataGrid" }, { "type": "null" } ], "default": null, "description": "DataGrid source for boundary data" } }, "required": [ "source" ], "title": "SCHISMDataBoundary", "type": "object" }, "SCHISMDataBoundaryConditions": { "additionalProperties": false, "description": "This class configures all boundary conditions for SCHISM including tidal,\nocean, river, and nested model boundaries.\n\nIt provides a unified interface for specifying boundary conditions and their\ndata sources, replacing the separate tides and ocean configurations.", "properties": { "data_type": { "const": "boundary_conditions", "default": "boundary_conditions", "description": "Model type discriminator", "title": "Data Type", "type": "string" }, "tidal_data": { "anyOf": [ { "$ref": "#/$defs/TidalDataset" }, { "type": "null" } ], "default": null, "description": "Tidal forcing dataset" }, "boundaries": { "additionalProperties": { "$ref": "#/$defs/BoundarySetupWithSource" }, "description": "Boundary configuration by boundary index", "title": "Boundaries", "type": "object" }, "setup_type": { "anyOf": [ { "enum": [ "tidal", "hybrid", "river", "nested" ], "type": "string" }, { "type": "null" } ], "default": null, "description": "Predefined boundary setup type", "title": "Setup Type" }, "hotstart_config": { "anyOf": [ { "$ref": "#/$defs/HotstartConfig" }, { "type": "null" } ], "default": null, "description": "Configuration for hotstart file generation" } }, "title": "SCHISMDataBoundaryConditions", "type": "object" }, "SCHISMDataSflux": { "properties": { "data_type": { "const": "sflux", "default": "sflux", "description": "Model type discriminator", "title": "Data Type", "type": "string" }, "air_1": { "anyOf": [ {}, { "type": "null" } ], "default": null, "description": "sflux air source 1", "title": "Air 1" }, "air_2": { "anyOf": [ {}, { "type": "null" } ], "default": null, "description": "sflux air source 2", "title": "Air 2" }, "rad_1": { "anyOf": [ { "$ref": "#/$defs/DataBlob" }, { "$ref": "#/$defs/SfluxRad" }, { "type": "null" } ], "default": null, "description": "sflux rad source 1", "title": "Rad 1" }, "rad_2": { "anyOf": [ { "$ref": "#/$defs/DataBlob" }, { "$ref": "#/$defs/SfluxRad" }, { "type": "null" } ], "default": null, "description": "sflux rad source 2", "title": "Rad 2" }, "prc_1": { "anyOf": [ { "$ref": "#/$defs/DataBlob" }, { "$ref": "#/$defs/SfluxPrc" }, { "type": "null" } ], "default": null, "description": "sflux prc source 1", "title": "Prc 1" }, "prc_2": { "anyOf": [ { "$ref": "#/$defs/DataBlob" }, { "$ref": "#/$defs/SfluxPrc" }, { "type": "null" } ], "default": null, "description": "sflux prc source 2", "title": "Prc 2" } }, "title": "SCHISMDataSflux", "type": "object" }, "SCHISMDataWave": { "additionalProperties": false, "description": "This class is used to write wave spectral boundary data. Spectral data is extracted\nfrom the nearest points along the grid boundary", "properties": { "model_type": { "const": "boundary", "default": "data_boundary", "description": "Model type discriminator", "title": "Model Type", "type": "string" }, "id": { "description": "Unique identifier for this data source", "title": "Id", "type": "string" }, "source": { "description": "Dataset source reader, must return a wavespectra-enabled xarray dataset in the open method", "discriminator": { "mapping": { "csv": "#/$defs/SourceTimeseriesCSV", "datamesh": "#/$defs/SourceDatamesh", "file": "#/$defs/SourceFile", "intake": "#/$defs/SourceIntake", "wavespectra": "#/$defs/SourceWavespectra" }, "propertyName": "model_type" }, "oneOf": [ { "$ref": "#/$defs/SourceTimeseriesCSV" }, { "$ref": "#/$defs/SourceDatamesh" }, { "$ref": "#/$defs/SourceFile" }, { "$ref": "#/$defs/SourceIntake" }, { "$ref": "#/$defs/SourceWavespectra" } ], "title": "Source" }, "link": { "default": false, "description": "Whether to create a symbolic link instead of copying the file", "title": "Link", "type": "boolean" }, "filter": { "anyOf": [ { "$ref": "#/$defs/Filter" }, { "type": "null" } ], "description": "Optional filter specification to apply to the dataset" }, "variables": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": [], "description": "Subset of variables to extract from the dataset", "title": "Variables" }, "coords": { "anyOf": [ { "$ref": "#/$defs/DatasetCoords" }, { "type": "null" } ], "default": { "t": "time", "x": "longitude", "y": "latitude", "z": null, "s": null }, "description": "Names of the coordinates in the dataset" }, "crop_data": { "default": true, "description": "Update crop filter from Time object if passed to get method", "title": "Crop Data", "type": "boolean" }, "buffer": { "default": 2.0, "description": "Space to buffer the grid bounding box if `filter_grid` is True", "title": "Buffer", "type": "number" }, "time_buffer": { "default": [ 0, 1 ], "description": "Number of source data timesteps to buffer the time range if `filter_time` is True", "items": { "type": "integer" }, "title": "Time Buffer", "type": "array" }, "spacing": { "anyOf": [ { "type": "number" }, { "const": "parent", "type": "string" }, { "type": "null" } ], "default": null, "description": "Spacing between points along the grid boundary to retrieve data for. If None (default), points are defined from the the actual grid object passed to the `get` method. If 'parent', the resolution of the parent dataset is used to define the spacing.", "title": "Spacing" }, "sel_method": { "default": "nearest", "description": "Method for selecting boundary points", "enum": [ "idw", "nearest" ], "title": "Sel Method", "type": "string" }, "sel_method_kwargs": { "additionalProperties": true, "default": { "unique": true }, "description": "Keyword arguments for sel_method", "title": "Sel Method Kwargs", "type": "object" }, "grid_type": { "const": "boundary_wave_station", "default": "boundary_wave_station", "description": "Model type discriminator", "title": "Grid Type", "type": "string" }, "data_type": { "const": "wave", "default": "wave", "description": "Model type discriminator", "title": "Data Type", "type": "string" } }, "required": [ "id", "source" ], "title": "SCHISMDataWave", "type": "object" }, "SfluxPrc": { "description": "This is a single variable source for and sflux input", "properties": { "model_type": { "const": "grid", "default": "grid", "description": "Model type discriminator", "title": "Model Type", "type": "string" }, "id": { "default": "sflux_source", "description": "id of the source", "title": "Id", "type": "string" }, "source": { "default": null, "title": "Source" }, "link": { "default": false, "description": "Whether to create a symbolic link instead of copying the file", "title": "Link", "type": "boolean" }, "filter": { "anyOf": [ { "$ref": "#/$defs/Filter" }, { "type": "null" } ], "description": "Optional filter specification to apply to the dataset" }, "variables": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": [], "description": "Subset of variables to extract from the dataset", "title": "Variables" }, "coords": { "anyOf": [ { "$ref": "#/$defs/DatasetCoords" }, { "type": "null" } ], "default": { "t": "time", "x": "longitude", "y": "latitude", "z": null, "s": null }, "description": "Names of the coordinates in the dataset" }, "crop_data": { "default": true, "description": "Update crop filters from Grid and Time objects if passed to get method", "title": "Crop Data", "type": "boolean" }, "buffer": { "default": 0.0, "description": "Space to buffer the grid bounding box if `filter_grid` is True", "title": "Buffer", "type": "number" }, "time_buffer": { "default": [ 0, 1 ], "description": "Number of source data timesteps to buffer the time range if `filter_time` is True", "items": { "type": "integer" }, "title": "Time Buffer", "type": "array" }, "data_type": { "const": "sflux_prc", "default": "sflux_rad", "description": "Model type discriminator", "title": "Data Type", "type": "string" }, "relative_weight": { "default": 1.0, "description": "relative weight of the source file if two files are provided", "title": "Relative Weight", "type": "number" }, "max_window_hours": { "default": 120.0, "description": "maximum number of hours (offset from start time in each file) in each file of set 1", "title": "Max Window Hours", "type": "number" }, "fail_if_missing": { "default": true, "description": "Fail if the source file is missing", "title": "Fail If Missing", "type": "boolean" }, "prate_name": { "default": null, "description": "name of precipitation rate variable in source", "title": "Prate Name", "type": "string" } }, "title": "SfluxPrc", "type": "object" }, "SfluxRad": { "description": "This is a single variable source for and sflux input", "properties": { "model_type": { "const": "grid", "default": "grid", "description": "Model type discriminator", "title": "Model Type", "type": "string" }, "id": { "default": "sflux_source", "description": "id of the source", "title": "Id", "type": "string" }, "source": { "default": null, "title": "Source" }, "link": { "default": false, "description": "Whether to create a symbolic link instead of copying the file", "title": "Link", "type": "boolean" }, "filter": { "anyOf": [ { "$ref": "#/$defs/Filter" }, { "type": "null" } ], "description": "Optional filter specification to apply to the dataset" }, "variables": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": [], "description": "Subset of variables to extract from the dataset", "title": "Variables" }, "coords": { "anyOf": [ { "$ref": "#/$defs/DatasetCoords" }, { "type": "null" } ], "default": { "t": "time", "x": "longitude", "y": "latitude", "z": null, "s": null }, "description": "Names of the coordinates in the dataset" }, "crop_data": { "default": true, "description": "Update crop filters from Grid and Time objects if passed to get method", "title": "Crop Data", "type": "boolean" }, "buffer": { "default": 0.0, "description": "Space to buffer the grid bounding box if `filter_grid` is True", "title": "Buffer", "type": "number" }, "time_buffer": { "default": [ 0, 1 ], "description": "Number of source data timesteps to buffer the time range if `filter_time` is True", "items": { "type": "integer" }, "title": "Time Buffer", "type": "array" }, "data_type": { "const": "sflux_rad", "default": "sflux_rad", "description": "Model type discriminator", "title": "Data Type", "type": "string" }, "relative_weight": { "default": 1.0, "description": "relative weight of the source file if two files are provided", "title": "Relative Weight", "type": "number" }, "max_window_hours": { "default": 120.0, "description": "maximum number of hours (offset from start time in each file) in each file of set 1", "title": "Max Window Hours", "type": "number" }, "fail_if_missing": { "default": true, "description": "Fail if the source file is missing", "title": "Fail If Missing", "type": "boolean" }, "dlwrf_name": { "default": null, "description": "name of downward long wave radiation variable in source", "title": "Dlwrf Name", "type": "string" }, "dswrf_name": { "default": null, "description": "name of downward short wave radiation variable in source", "title": "Dswrf Name", "type": "string" } }, "title": "SfluxRad", "type": "object" }, "SourceDatamesh": { "additionalProperties": false, "description": "Source dataset from Datamesh.\n\nDatamesh documentation: https://docs.oceanum.io/datamesh/index.html", "properties": { "model_type": { "const": "datamesh", "default": "datamesh", "description": "Model type discriminator", "title": "Model Type", "type": "string" }, "datasource": { "description": "The id of the datasource on Datamesh", "title": "Datasource", "type": "string" }, "token": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Datamesh API token, taken from the environment if not provided", "title": "Token" }, "kwargs": { "additionalProperties": true, "default": {}, "description": "Keyword arguments to pass to `oceanum.datamesh.Connector`", "title": "Kwargs", "type": "object" } }, "required": [ "datasource", "token" ], "title": "SourceDatamesh", "type": "object" }, "SourceFile": { "additionalProperties": false, "description": "Source dataset from file to open with xarray.open_dataset.", "properties": { "model_type": { "const": "file", "default": "file", "description": "Model type discriminator", "title": "Model Type", "type": "string" }, "uri": { "anyOf": [ { "type": "string" }, { "format": "path", "type": "string" } ], "description": "Path to the dataset", "title": "Uri" }, "kwargs": { "additionalProperties": true, "default": {}, "description": "Keyword arguments to pass to xarray.open_dataset", "title": "Kwargs", "type": "object" }, "variable": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Variable to select from the dataset", "title": "Variable" } }, "required": [ "uri" ], "title": "SourceFile", "type": "object" }, "SourceIntake": { "additionalProperties": false, "description": "Source dataset from intake catalog.\n\nnote\n----\nThe intake catalog can be prescribed either by the URI of an existing catalog file\nor by a YAML string defining the catalog. The YAML string can be obtained from\ncalling the `yaml()` method on an intake dataset instance.", "properties": { "model_type": { "const": "intake", "default": "intake", "description": "Model type discriminator", "title": "Model Type", "type": "string" }, "dataset_id": { "description": "The id of the dataset to read in the catalog", "title": "Dataset Id", "type": "string" }, "catalog_uri": { "anyOf": [ { "type": "string" }, { "format": "path", "type": "string" }, { "type": "null" } ], "default": null, "description": "The URI of the catalog to read from", "title": "Catalog Uri" }, "catalog_yaml": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The YAML string of the catalog to read from", "title": "Catalog Yaml" }, "kwargs": { "additionalProperties": true, "default": {}, "description": "Keyword arguments to define intake dataset parameters", "title": "Kwargs", "type": "object" } }, "required": [ "dataset_id" ], "title": "SourceIntake", "type": "object" }, "SourceTimeseriesCSV": { "additionalProperties": false, "description": "Timeseries source class from CSV file.\n\nThis class should return a timeseries from a CSV file. The dataset variables are\ndefined from the column headers, therefore the appropriate read_csv kwargs must be\npassed to allow defining the columns. The time index is defined from column name\nidentified by the tcol field.", "properties": { "model_type": { "const": "csv", "default": "csv", "description": "Model type discriminator", "title": "Model Type", "type": "string" }, "filename": { "anyOf": [ { "type": "string" }, { "format": "path", "type": "string" } ], "description": "Path to the csv file", "title": "Filename" }, "tcol": { "default": "time", "description": "Name of the column containing the time data", "title": "Tcol", "type": "string" }, "read_csv_kwargs": { "additionalProperties": true, "default": {}, "description": "Keyword arguments to pass to pandas.read_csv", "title": "Read Csv Kwargs", "type": "object" } }, "required": [ "filename" ], "title": "SourceTimeseriesCSV", "type": "object" }, "SourceWavespectra": { "additionalProperties": false, "description": "Wavespectra dataset from wavespectra reader.", "properties": { "model_type": { "const": "wavespectra", "default": "wavespectra", "description": "Model type discriminator", "title": "Model Type", "type": "string" }, "uri": { "anyOf": [ { "type": "string" }, { "format": "path", "type": "string" } ], "description": "Path to the dataset", "title": "Uri" }, "reader": { "description": "Name of the wavespectra reader to use, e.g., read_swan", "title": "Reader", "type": "string" }, "kwargs": { "additionalProperties": true, "default": {}, "description": "Keyword arguments to pass to the wavespectra reader", "title": "Kwargs", "type": "object" } }, "required": [ "uri", "reader" ], "title": "SourceWavespectra", "type": "object" }, "TidalDataset": { "description": "This class is used to define the tidal dataset to use from an available pyTMD tidal database.\nCustom databases can be configured by providing a database.json file in the tidal database directory.\nsee https://pytmd.readthedocs.io/en/latest/getting_started/Getting-Started.html", "properties": { "tidal_database": { "anyOf": [ { "format": "path", "type": "string" }, { "type": "null" } ], "default": null, "description": "Path to pyTMD tidal database directory. If None, defaults to pyTMD default.", "title": "Tidal Database" }, "tidal_model": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": "FES2014", "description": "Name of the pyTMD tidal model to use (e.g., 'FES2014')", "title": "Tidal Model" }, "mean_dynamic_topography": { "anyOf": [ { "$ref": "#/$defs/DataBoundary" }, { "type": "number" }, { "type": "null" } ], "default": 0.0, "description": "Path or value of mean dynamic topography file. Writes to z0 constituent.", "title": "Mean Dynamic Topography" }, "constituents": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "string" } ], "description": "Tidal constituents to include", "title": "Constituents" }, "tidal_potential": { "default": false, "description": "Apply Earth tidal potential loading to the model. The coefficients used any selected constituents with species 0, 1, 2.", "title": "Tidal Potential", "type": "boolean" }, "cutoff_depth": { "default": 50.0, "description": "Cutoff depth for Earth tidal potential loading to the model", "title": "Cutoff Depth", "type": "number" }, "nodal_corrections": { "default": false, "description": "Apply nodal corrections to tidal constituents", "title": "Nodal Corrections", "type": "boolean" }, "tide_interpolation_method": { "default": "bilinear", "description": "Method for tidal interpolation. see https://pytmd.readthedocs.io/en/latest/api_reference/interpolate.html.", "title": "Tide Interpolation Method", "type": "string" }, "extrapolate_tides": { "default": false, "description": "Extrapolate tidal constituents outside the domain. If False, will raise an error if any constituent is outside the domain.", "title": "Extrapolate Tides", "type": "boolean" }, "extrapolation_distance": { "default": 50.0, "description": "Distance in kilometre to extrapolate tidal constituents outside the tidal model. Only used if extrapolate_tides is True.", "title": "Extrapolation Distance", "type": "number" }, "extra_databases": { "anyOf": [ { "items": { "format": "path", "type": "string" }, "type": "array" }, { "type": "null" } ], "default": [], "description": "Extra tidal databases loaded from database.json if present", "title": "Extra Databases" } }, "title": "TidalDataset", "type": "object" } }, "additionalProperties": false }
- Fields:
- field atmos: SCHISMDataSflux | None = None#
atmospheric data
- field boundary_conditions: SCHISMDataBoundaryConditions | None = None#
unified boundary conditions (replaces tides and ocean)
- field data_type: Literal['schism'] = 'schism'#
Model type discriminator
- field wave: DataBlob | SCHISMDataWave | None = None#
wave data
- get(destdir: str | Path, grid: SCHISMGrid, time: TimeRange) Dict[str, Any] [source]#
Process all SCHISM forcing data and generate necessary input files.
- Parameters:
destdir (str | Path) – Destination directory
grid (SCHISMGrid) – SCHISM grid instance
time (TimeRange) – Time range for the simulation
- Returns:
Paths to generated files for each data component
- Return type:
Dict[str, Any]