rompy.swan.subcomponents.time.NONSTATIONARY#
- pydantic model rompy.swan.subcomponents.time.NONSTATIONARY[source]#
Nonstationary time specification.
NONSTATIONARY [tbeg] [delt] SEC|MIN|HR|DAY [tend]
Note
Default values for the time specification fields are provided for the case where the user wants to set times dynamically after instantiating this subcomponent.
Examples
In [142]: from rompy.swan.subcomponents.time import NONSTATIONARY In [143]: nonstat = NONSTATIONARY( .....: tbeg="2012-01-01T00:00:00", .....: tend="2012-02-01T00:00:00", .....: delt="PT1H", .....: dfmt="hr", .....: ) .....: In [144]: print(nonstat.render()) NONSTATIONARY tbeg=20120101.000000 delt=1.0 HR tend=20120201.000000 In [145]: from datetime import datetime, timedelta In [146]: nonstat = NONSTATIONARY( .....: tbeg=datetime(1990, 1, 1), .....: tend=datetime(1990, 1, 7), .....: delt=timedelta(minutes=30), .....: tfmt=1, .....: dfmt="min", .....: suffix="tbl", .....: ) .....: In [147]: print(nonstat.render()) NONSTATIONARY tbegtbl=19900101.000000 delttbl=30.0 MIN tendtbl=19900107.000000
- Fields:
- field delt: timedelta = datetime.timedelta(seconds=3600)#
Time interval
- field dfmt: Literal['sec', 'min', 'hr', 'day'] = 'sec'#
Format to render time interval specification
- field model_type: Literal['nonstationary', 'NONSTATIONARY'] = 'nonstationary'#
Model type discriminator
- field suffix: str = ''#
Suffix to prepend to argument names when rendering
- field tbeg: datetime = datetime.datetime(1970, 1, 1, 0, 0)#
Start time
- field tend: datetime = datetime.datetime(1970, 1, 2, 0, 0)#
End time
- field tfmt: Literal[1, 2, 3, 4, 5, 6] | str = 1#
Format to render time specification