Support .t3d and .cmp legacy file formats #731
Labels
domain: io
type: compatibility
Changes needed to be compatible with the computational core
type: feature
Brand new functionality
Is your feature request related to a problem? Please describe.
For the external forcings converter (#621) we need to be able to parse/load legacy file formats with extensions .t3d, .cmp
Describe the solution you'd like
.cmp format
CmpModel
, which contains a list ofCmpRecord
s.CmpRecord
of typeUnion[float, AstronomicPeriod]
, whereAstronomicPeriod
is a subclass ofStrEnum
, with the supported components in the long list in the next item.Addition: here is the list of valid component names (used in column 1), from https://content.oss.deltares.nl/delft3d4/Delft3D-TIDE_User_Manual.pdf#appendix.B :
.t3D legacy file format
.t3D files contain timeseries with multiple data columns to provide boundary values for multiple vertical layers on a boundary.
T3D
, which is a subpart of .bc files (the new preferred format).Header:
LAYER_TYPE
:SIGMA
Z
LAYERS
: list of whitespace-separated floats, the number of layers is determined after parsing and string splitting.LAYERS
line can be a line:VECTORMAX = <n>
with n a positive integer, defining the number of vector components. Default (when absent) value is 1 (scalar timeseries for each later). Sometimes a velocity vector is specified using
VECTORMAX = 2
.This ends the header.
Data/body:
Now the data part of the file starts. Each record consists of two lines:
TIME = [..]
where time format is<float> <time unit> since <reference date time>
<time unit>
is one of: 'seconds', 'minutes', 'hours', 'days'<reference date time>
is of ISO 8601 format:YYYY-MM-DD
,hh:mm:ss
(prefixed by either 'T' or ' '), default '00:00:00'hh:mm
(prefixed by either 'Z' or '+' or '-')The text was updated successfully, but these errors were encountered: