rompy.swan.subcomponents.time.Delt#

pydantic model rompy.swan.subcomponents.time.Delt[source]#

Time interval specification in SWAN.

[delt] SEC|MIN|HR|DAY

Note

The tdelta field can be specified as:

  • existing timedelta object

  • int or float, assumed as seconds

  • ISO 8601 duration string, following formats work:

    • [-][DD ][HH:MM]SS[.ffffff]

    • [±]P[DD]DT[HH]H[MM]M[SS]S (ISO 8601 format for timedelta)

Examples

In [136]: from rompy.swan.subcomponents.time import Delt

In [137]: from datetime import timedelta

In [138]: delt = Delt(delt=timedelta(minutes=30))

In [139]: print(delt.render())
1800.0 SEC

In [140]: delt = Delt(delt="PT1H", dfmt="hr")

In [141]: print(delt.render())
1.0 HR
Fields:
field delt: timedelta [Required]#

Time interval

field dfmt: Literal['sec', 'min', 'hr', 'day'] = 'sec'#

Format to render time interval specification

field model_type: Literal['delt', 'Delt', 'DELT'] = 'tdelt'#

Model type discriminator

cmd() str[source]#

Render subcomponent cmd.

property delt_float#