Dfs3

Dfs3(self, filename)

Attributes

Name Description
deletevalue File delete value.
dx Step size in x direction.
dy Step size in y direction.
dz Step size in y direction.
end_time File end time.
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.
orientation Orientation (in own CRS).
origin Origin (in own CRS).
start_time File start time.
timestep Time step size in seconds.

Methods

Name Description
append Append a Dataset to an existing dfs3 file.
read Read data from a dfs3 file.

append

Dfs3.append(ds, validate=True)

Append a Dataset to an existing dfs3 file.

Parameters

Name Type Description Default
ds Dataset Dataset to append required
validate bool Validate that the dataset to append has the same geometry and items as the original file True

Notes

The original file is modified.

read

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

Read data from a dfs3 file.

Parameters

Name Type Description Default
items str | int | 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
area tuple[float, float, float, float] | None Read only data within the specified rectangular area (x0, x1, y0, y1) None
keepdims bool When reading a single time step or a single layer only, should the singleton dimension be kept in the returned Dataset? by default: False False
layers str | int | Sequence[int] | None Read only data for specific layers, by default None None
dtype Any Define the dtype of the returned dataset (default = np.float32) np.float32

Returns

Name Type Description
Dataset