rompy.swan.interface.OutputInterface#

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

Output group component with consistent times.

Show JSON schema
{
   "title": "OutputInterface",
   "description": "Output group component with consistent times.",
   "type": "object",
   "properties": {
      "model_type": {
         "default": "outputinterface",
         "description": "Model type discriminator",
         "enum": [
            "outputinterface",
            "OUTPUTINTERFACE"
         ],
         "title": "Model Type",
         "type": "string"
      },
      "group": {
         "description": "Group component to set times to",
         "title": "Group"
      },
      "period": {
         "$ref": "#/$defs/TimeRange",
         "description": "Time period to write the output over"
      }
   },
   "$defs": {
      "TimeRange": {
         "description": "A time range object\n\nExamples\n--------\n>>> from rompy import TimeRange\n>>> tr = TimeRange(start=\"2020-01-01\", end=\"2020-01-02\")\n>>> tr\nTimeRange(start=datetime.datetime(2020, 1, 1, 0, 0), end=datetime.datetime(2020, 1, 2, 0, 0), duration=None, interval=None, include_end=True)\n>>> tr = TimeRange(start=\"2020-01-01\", duration=\"1d\")\n>>> tr\nTimeRange(start=datetime.datetime(2020, 1, 1, 0, 0), end=datetime.datetime(2020, 1, 2, 0, 0), duration=timedelta(days=1), interval=None, include_end=True)\n>>> tr = TimeRange(start=\"2020-01-01\", duration=\"1d\", interval=\"1h\")\n>>> tr\nTimeRange(start=datetime.datetime(2020, 1, 1, 0, 0), end=None, duration=timedelta(days=1), interval=timedelta(hours=1), include_end=True)",
         "properties": {
            "start": {
               "anyOf": [
                  {
                     "format": "date-time",
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The start date of the time range",
               "examples": [
                  "2020-01-01"
               ],
               "title": "Start"
            },
            "end": {
               "anyOf": [
                  {
                     "format": "date-time",
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The end date of the time range",
               "examples": [
                  "2020-01-02"
               ],
               "title": "End"
            },
            "duration": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "format": "duration",
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "The duration of the time range",
               "examples": [
                  "1d"
               ],
               "title": "Duration"
            },
            "interval": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "format": "duration",
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": "1h",
               "description": "The frequency of the time range",
               "examples": [
                  "1h",
                  "'1h'"
               ],
               "title": "Interval"
            },
            "include_end": {
               "default": true,
               "description": "Determines if the end date should be included in the range",
               "title": "Include End",
               "type": "boolean"
            }
         },
         "title": "TimeRange",
         "type": "object"
      }
   },
   "additionalProperties": false,
   "required": [
      "group",
      "period"
   ]
}

Fields:
Validators:
field model_type: Literal['outputinterface', 'OUTPUTINTERFACE'] = 'outputinterface'#

Model type discriminator

Validated by:
validator time_interface  »  all fields[source]#

Set the time parameter for all WRITE components.