Dfs2

Dfs2(self, filename, type='horizontal')

Attributes

Name Description
deletevalue File delete value
dx Step size in x direction
dy Step size in y direction
end_time File end time
geometry Spatial information
is_geo Are coordinates geographical (LONG/LAT)?
items List of items
latitude Origin latitude
longitude Origin longitude
n_items Number of items
n_timesteps Number of time steps
nx Number of values in the x-direction
ny Number of values in the y-direction
orientation Orientation (in own CRS)
origin Origin (in own CRS)
shape Tuple with number of values in the t-, y-, x-direction
start_time File start time
timestep Time step size in seconds
x0 Start point of x values (often 0)
y0 Start point of y values (often 0)

Methods

Name Description
read Read data from a dfs2 file

read

Dfs2.read(items=None, time=None, area=None, keepdims=False, dtype=np.float32)

Read data from a dfs2 file

Parameters

Name Type Description Default
items str | int | collections.abc.Sequence[str | int] | None Read only selected items, by number (0-based), or by name None
time int | str | slice | None Read only selected time steps, by default None (=all) None
keepdims bool When reading a single time step only, should the time-dimension be kept in the returned Dataset? by default: False False
area typing.Tuple[float, float, float, float] | None Read only data inside (horizontal) area given as a bounding box (tuple with left, lower, right, upper) coordinates None
dtype typing.Any Define the dtype of the returned dataset (default = np.float32) np.float32

Returns

Type Description
mikeio.dataset.Dataset