rompy.swan.interface.BoundaryInterface#

pydantic model rompy.swan.interface.BoundaryInterface[source]#

SWAN forcing boundary interface.

Examples

In [1]: from rompy.swan.interface import BoundaryInterface

Show JSON schema
{
   "title": "BoundaryInterface",
   "description": "SWAN forcing boundary interface.\n\nExamples\n--------\n\n.. ipython:: python\n    :okwarning:\n\n    from rompy.swan.interface import BoundaryInterface",
   "type": "object",
   "properties": {
      "model_type": {
         "default": "boundary_interface",
         "description": "Model type discriminator",
         "enum": [
            "boundary_interface",
            "BOUNDARY_INTERFACE"
         ],
         "title": "Model Type",
         "type": "string"
      },
      "kind": {
         "anyOf": [
            {
               "$ref": "#/$defs/Boundnest1"
            },
            {
               "$ref": "#/$defs/BoundspecSide"
            },
            {
               "$ref": "#/$defs/BoundspecSegmentXY"
            }
         ],
         "default": null,
         "description": "Boundary data object",
         "title": "Kind"
      }
   },
   "$defs": {
      "BIN": {
         "additionalProperties": false,
         "description": "Single frequency bin spectral shape.\n\n.. code-block:: text\n\n    BIN\n\nExamples\n--------\n\n.. ipython:: python\n    :okwarning:\n\n    from rompy.swan.subcomponents.spectrum import BIN\n    shape = BIN()\n    print(shape.render())",
         "properties": {
            "model_type": {
               "default": "bin",
               "description": "Model type discriminator",
               "enum": [
                  "bin",
                  "BIN"
               ],
               "title": "Model Type",
               "type": "string"
            }
         },
         "title": "BIN",
         "type": "object"
      },
      "Boundnest1": {
         "additionalProperties": false,
         "description": "SWAN BOUNDNEST1 NEST data class.",
         "properties": {
            "model_type": {
               "default": "boundnest1",
               "description": "Model type discriminator",
               "enum": [
                  "boundnest1",
                  "BOUNDNEST1"
               ],
               "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": "depth",
                  "s": "site"
               },
               "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,
                  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": "idw",
               "description": "Wavespectra method to use for selecting boundary points from the dataset",
               "enum": [
                  "idw",
                  "nearest"
               ],
               "title": "Sel Method",
               "type": "string"
            },
            "sel_method_kwargs": {
               "additionalProperties": true,
               "default": {},
               "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"
            },
            "rectangle": {
               "default": "closed",
               "description": "Defines whether boundary is defined over an closed or open rectangle",
               "enum": [
                  "closed",
                  "open"
               ],
               "title": "Rectangle",
               "type": "string"
            }
         },
         "required": [
            "id",
            "source"
         ],
         "title": "Boundnest1",
         "type": "object"
      },
      "BoundspecSegmentXY": {
         "additionalProperties": false,
         "description": "SWAN BOUNDSPEC SEGMENT data class.\n\nTODO: Handle side definition on a rotated grid.\nTODO: Should SIDE VARIABE be supported?\nTODO: Support option to choose between mid-point or averaging?\nTODO: Does PAR need to be supported? Guess not as nonstationary isn't supported\nTODO: If SIDES, ensure continuous\n\nNote\n----\nSegments are defined from adjacent point locations so the order in which the points\nare defined is important. When using SIDES, please ensure SIDES are adjacent to\neach other and have correct directions (ccw or clockwise) accordint to the order in\nwhich each side is prescribed.\n\nNote\n----\nThe 'spec1d' file type is not supported yet.",
         "properties": {
            "model_type": {
               "default": "boundspecside",
               "description": "Model type discriminator",
               "enum": [
                  "boundspecside",
                  "BOUNDSPECSIDE"
               ],
               "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": "depth",
                  "s": "site"
               },
               "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,
                  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": "idw",
               "description": "Wavespectra method to use for selecting boundary points from the dataset",
               "enum": [
                  "idw",
                  "nearest"
               ],
               "title": "Sel Method",
               "type": "string"
            },
            "sel_method_kwargs": {
               "additionalProperties": true,
               "default": {},
               "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"
            },
            "shapespec": {
               "$ref": "#/$defs/SHAPESPEC",
               "default": {
                  "model_type": "shapespec",
                  "shape": {
                     "gamma": 3.3,
                     "model_type": "jonswap"
                  },
                  "per_type": "peak",
                  "dspr_type": "degrees"
               },
               "description": "Spectral shape specification"
            },
            "variable": {
               "default": false,
               "description": "Whether the spectra can vary along the side",
               "title": "Variable",
               "type": "boolean"
            },
            "file_type": {
               "default": "tpar",
               "description": "The type of file to write",
               "enum": [
                  "tpar",
                  "spec2d"
               ],
               "title": "File Type",
               "type": "string"
            },
            "location": {
               "description": "The side of the grid to apply the boundary to",
               "discriminator": {
                  "mapping": {
                     "SIDE": "#/$defs/SIDE",
                     "SIDES": "#/$defs/SIDES",
                     "XY": "#/$defs/XY",
                     "side": "#/$defs/SIDE",
                     "sides": "#/$defs/SIDES",
                     "xy": "#/$defs/XY"
                  },
                  "propertyName": "model_type"
               },
               "oneOf": [
                  {
                     "$ref": "#/$defs/SIDE"
                  },
                  {
                     "$ref": "#/$defs/SIDES"
                  },
                  {
                     "$ref": "#/$defs/XY"
                  }
               ],
               "title": "Location"
            }
         },
         "required": [
            "id",
            "source",
            "location"
         ],
         "title": "BoundspecSegmentXY",
         "type": "object"
      },
      "BoundspecSide": {
         "additionalProperties": false,
         "description": "SWAN BOUNDSPEC SIDE data class.\n\nTODO: Handle side definition on a rotated grid.\nTODO: Should SIDE VARIABE be supported?\nTODO: Support option to choose between mid-point or averaging?\nTODO: Does PAR need to be supported? Guess not as nonstationary isn't supported\n\nNote\n----\nThe 'spec1d' file type is not supported yet.",
         "properties": {
            "model_type": {
               "default": "boundspecside",
               "description": "Model type discriminator",
               "enum": [
                  "boundspecside",
                  "BOUNDSPECSIDE"
               ],
               "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": "depth",
                  "s": "site"
               },
               "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,
                  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": "idw",
               "description": "Wavespectra method to use for selecting boundary points from the dataset",
               "enum": [
                  "idw",
                  "nearest"
               ],
               "title": "Sel Method",
               "type": "string"
            },
            "sel_method_kwargs": {
               "additionalProperties": true,
               "default": {},
               "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"
            },
            "shapespec": {
               "$ref": "#/$defs/SHAPESPEC",
               "default": {
                  "model_type": "shapespec",
                  "shape": {
                     "gamma": 3.3,
                     "model_type": "jonswap"
                  },
                  "per_type": "peak",
                  "dspr_type": "degrees"
               },
               "description": "Spectral shape specification"
            },
            "variable": {
               "default": false,
               "description": "Whether the spectra can vary along the side",
               "title": "Variable",
               "type": "boolean"
            },
            "file_type": {
               "default": "tpar",
               "description": "The type of file to write",
               "enum": [
                  "tpar",
                  "spec2d"
               ],
               "title": "File Type",
               "type": "string"
            },
            "location": {
               "$ref": "#/$defs/SIDE",
               "description": "The side of the grid to apply the boundary to"
            }
         },
         "required": [
            "id",
            "source",
            "location"
         ],
         "title": "BoundspecSide",
         "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": "depth",
               "description": "Name of the z coordinate",
               "title": "Z"
            },
            "s": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": "site",
               "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"
      },
      "GAUSS": {
         "additionalProperties": false,
         "description": "Gaussian spectral shape.\n\n.. code-block:: text\n\n    GAUSS [sigfr]\n\nExamples\n--------\n\n.. ipython:: python\n    :okwarning:\n\n    from rompy.swan.subcomponents.spectrum import GAUSS\n    shape = GAUSS(sigfr=0.02)\n    print(shape.render())",
         "properties": {
            "model_type": {
               "default": "gauss",
               "description": "Model type discriminator",
               "enum": [
                  "gauss",
                  "GAUSS"
               ],
               "title": "Model Type",
               "type": "string"
            },
            "sigfr": {
               "description": "Width of the Gaussian frequency spectrum expressed as a standard deviation in Hz.",
               "exclusiveMinimum": 0.0,
               "title": "Sigfr",
               "type": "number"
            }
         },
         "required": [
            "sigfr"
         ],
         "title": "GAUSS",
         "type": "object"
      },
      "JONSWAP": {
         "additionalProperties": false,
         "description": "Jonswap spectral shape.\n\n.. code-block:: text\n\n    JONSWAP [gamma]\n\nExamples\n--------\n\n.. ipython:: python\n    :okwarning:\n\n    from rompy.swan.subcomponents.spectrum import JONSWAP\n    shape = JONSWAP(gamma=3.3)\n    print(shape.render())",
         "properties": {
            "model_type": {
               "default": "jonswap",
               "description": "Model type discriminator",
               "enum": [
                  "jonswap",
                  "JONSWAP"
               ],
               "title": "Model Type",
               "type": "string"
            },
            "gamma": {
               "default": 3.3,
               "description": "Peak enhancement parameter of the JONSWAP spectrum.",
               "exclusiveMinimum": 0.0,
               "title": "Gamma",
               "type": "number"
            }
         },
         "title": "JONSWAP",
         "type": "object"
      },
      "PM": {
         "additionalProperties": false,
         "description": "Pearson-Moskowitz spectral shape.\n\n.. code-block:: text\n\n    PM\n\nExamples\n--------\n\n.. ipython:: python\n    :okwarning:\n\n    from rompy.swan.subcomponents.spectrum import PM\n    shape = PM()\n    print(shape.render())",
         "properties": {
            "model_type": {
               "default": "pm",
               "description": "Model type discriminator",
               "enum": [
                  "pm",
                  "PM"
               ],
               "title": "Model Type",
               "type": "string"
            }
         },
         "title": "PM",
         "type": "object"
      },
      "SHAPESPEC": {
         "additionalProperties": false,
         "description": "Spectral shape specification.\n\n.. code-block:: text\n\n    BOUND SHAPESPEC JONSWAP|PM|GAUSS|BIN|TMA PEAK|MEAN DSPR [POWER|DEGREES]\n\nThis command BOUND SHAPESPEC defines the shape of the spectra (both in frequency\nand direction) at the boundary of the computational grid in case of parametric\nspectral input.\n\nNotes\n-----\nWhile technically a component `BOUND SHAPESPEC`, this is only intended to be used\nas a subcomponent of the `BOUNDSPEC` component.\n\nExamples\n--------\n\n.. ipython:: python\n    :okwarning:\n\n    from rompy.swan.subcomponents.spectrum import SHAPESPEC\n    shapespec = SHAPESPEC()\n    print(shapespec.render())\n    shapespec = SHAPESPEC(\n        shape=dict(model_type=\"tma\", gamma=3.1, d=12),\n        per_type=\"mean\",\n        dspr_type=\"degrees\",\n    )\n    print(shapespec.render())",
         "properties": {
            "model_type": {
               "default": "shapespec",
               "description": "Model type discriminator",
               "enum": [
                  "shapespec",
                  "SHAPESPEC"
               ],
               "title": "Model Type",
               "type": "string"
            },
            "shape": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/JONSWAP"
                  },
                  {
                     "$ref": "#/$defs/PM"
                  },
                  {
                     "$ref": "#/$defs/GAUSS"
                  },
                  {
                     "$ref": "#/$defs/BIN"
                  },
                  {
                     "$ref": "#/$defs/TMA"
                  }
               ],
               "description": "The spectral shape",
               "title": "Shape"
            },
            "per_type": {
               "default": "peak",
               "description": "The type of characteristic wave period",
               "enum": [
                  "peak",
                  "mean"
               ],
               "title": "Per Type",
               "type": "string"
            },
            "dspr_type": {
               "default": "power",
               "description": "The type of directional spreading",
               "enum": [
                  "power",
                  "degrees"
               ],
               "title": "Dspr Type",
               "type": "string"
            }
         },
         "title": "SHAPESPEC",
         "type": "object"
      },
      "SIDE": {
         "additionalProperties": false,
         "description": "Boundary over one side of computational domain.\n\n.. code-block:: text\n\n    SIDE NORTH|NW|WEST|SW|SOUTH|SE|E|NE CCW|CLOCKWISE\n\nThe boundary is one full side of the computational grid (in 1D cases either of the\ntwo ends of the 1D-grid).\n\nNote\n----\nShould not be used in case of CURVILINEAR grids.\n\nExamples\n--------\n\n.. ipython:: python\n    :okwarning:\n\n    from rompy.swan.subcomponents.boundary import SIDE\n    side = SIDE(side=\"west\", direction=\"ccw\")\n    print(side.render())",
         "properties": {
            "model_type": {
               "default": "side",
               "description": "Model type discriminator",
               "enum": [
                  "side",
                  "SIDE"
               ],
               "title": "Model Type",
               "type": "string"
            },
            "side": {
               "description": "The side of the grid to apply the boundary to",
               "enum": [
                  "north",
                  "nw",
                  "west",
                  "sw",
                  "south",
                  "se",
                  "east",
                  "ne"
               ],
               "title": "Side",
               "type": "string"
            },
            "direction": {
               "default": "ccw",
               "description": "The direction to apply the boundary in",
               "enum": [
                  "ccw",
                  "clockwise"
               ],
               "title": "Direction",
               "type": "string"
            }
         },
         "required": [
            "side"
         ],
         "title": "SIDE",
         "type": "object"
      },
      "SIDES": {
         "additionalProperties": false,
         "description": "Boundary over multiple side of computational domain.\n\n.. code-block:: text\n\n    SIDE NORTH|NW|WEST|SW|SOUTH|SE|E|NE CCW|CLOCKWISE\n    SIDE NORTH|NW|WEST|SW|SOUTH|SE|E|NE CCW|CLOCKWISE\n    ...\n\nNote\n----\nShould not be used in case of CURVILINEAR grids.\n\nExamples\n--------\n\n.. ipython:: python\n    :okwarning:\n\n    from rompy.swan.subcomponents.boundary import SIDE, SIDES\n    side1 = SIDE(side=\"west\", direction=\"ccw\")\n    side2 = SIDE(side=\"north\", direction=\"ccw\")\n    sides = SIDES(sides=[side1, side2])\n    print(sides.render())",
         "properties": {
            "model_type": {
               "default": "sides",
               "description": "Model type discriminator",
               "enum": [
                  "sides",
                  "SIDES"
               ],
               "title": "Model Type",
               "type": "string"
            },
            "sides": {
               "description": "The sides of the grid to apply the boundary to",
               "items": {
                  "$ref": "#/$defs/SIDE"
               },
               "title": "Sides",
               "type": "array"
            }
         },
         "required": [
            "sides"
         ],
         "title": "SIDES",
         "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"
            }
         },
         "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"
      },
      "TMA": {
         "additionalProperties": false,
         "description": "TMA spectral shape.\n\n.. code-block:: text\n\n    TMA [gamma] [d]\n\nExamples\n--------\n\n.. ipython:: python\n    :okwarning:\n\n    from rompy.swan.subcomponents.spectrum import TMA\n    shape = TMA(gamma=2.0, d=18)\n    print(shape.render())",
         "properties": {
            "model_type": {
               "default": "tma",
               "description": "Model type discriminator",
               "enum": [
                  "tma",
                  "TMA"
               ],
               "title": "Model Type",
               "type": "string"
            },
            "gamma": {
               "default": 3.3,
               "description": "Peak enhancement parameter of the JONSWAP spectrum.",
               "exclusiveMinimum": 0.0,
               "title": "Gamma",
               "type": "number"
            },
            "d": {
               "description": "The reference depth at the wave maker in meters.",
               "exclusiveMinimum": 0.0,
               "title": "D",
               "type": "number"
            }
         },
         "required": [
            "d"
         ],
         "title": "TMA",
         "type": "object"
      },
      "XY": {
         "additionalProperties": false,
         "description": "Points in problem coordinates.\n\n.. code-block:: text\n\n    < [x] [y] >\n\nNote\n----\nCoordinates should be given in m when Cartesian coordinates are used or degrees\nwhen Spherical coordinates are used (see command `COORD`).\n\nExamples\n--------\n\n.. ipython:: python\n    :okwarning:\n\n    from rompy.swan.subcomponents.base import XY\n    points = XY(\n        x=[172, 172, 172, 172.5, 173],\n        y=[-41, -40.5, -40, -40, -40],\n        fmt=\"0.2f\",\n    )\n    print(points.render())",
         "properties": {
            "model_type": {
               "default": "xy",
               "description": "Model type discriminator",
               "enum": [
                  "xy",
                  "XY"
               ],
               "title": "Model Type",
               "type": "string"
            },
            "x": {
               "description": "Problem x-coordinate values",
               "items": {
                  "type": "number"
               },
               "title": "X",
               "type": "array"
            },
            "y": {
               "description": "Problem y-coordinate values",
               "items": {
                  "type": "number"
               },
               "title": "Y",
               "type": "array"
            },
            "fmt": {
               "default": "0.8f",
               "description": "The format to render floats values",
               "title": "Fmt",
               "type": "string"
            }
         },
         "required": [
            "x",
            "y"
         ],
         "title": "XY",
         "type": "object"
      }
   },
   "additionalProperties": false
}

Fields:
field kind: Boundnest1 | BoundspecSide | BoundspecSegmentXY = None#

Boundary data object

field model_type: Literal['boundary_interface', 'BOUNDARY_INTERFACE'] = 'boundary_interface'#

Model type discriminator

get(staging_dir: Path, grid: SwanGrid, period: TimeRange)[source]#
render(*args, **kwargs)[source]#

Make this class consistent with the components API.