dfsu.Dfsu2DV
dfsu.Dfsu2DV(self, filename)
Methods
plot_vertical_profile
dfsu.Dfsu2DV.plot_vertical_profile(values, time_step=None, cmin=None, cmax=None, label='', **kwargs)
Plot unstructured vertical profile
Parameters
values |
|
value for each element to plot |
required |
cmin |
|
lower bound of values to be shown on plot, default:None |
None |
cmax |
|
upper bound of values to be shown on plot, default:None |
None |
title |
|
axes title |
required |
label |
|
colorbar label |
'' |
cmap |
|
colormap, default viridis |
required |
figsize |
|
specify size of figure |
required |
ax |
|
Adding to existing axis, instead of creating new fig |
required |
read
dfsu.Dfsu2DV.read(items=None, time=None, elements=None, area=None, x=None, y=None, z=None, layers=None, keepdims=False, dtype=np.float32, error_bad_data=True, fill_bad_data_value=np.nan)
Read data from a dfsu file
Parameters
items |
str | int | typing.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) or as list of coordinates for a polygon, by default None |
None |
x |
float | None |
Read only data for elements containing the (x,y,z) points(s) |
None |
y |
float | None |
Read only data for elements containing the (x,y,z) points(s) |
None |
z |
float | None |
Read only data for elements containing the (x,y,z) points(s) |
None |
layers |
int | mikeio.spatial._FM_geometry_layered.Layer | typing.Sequence[int] | None |
Read only data for specific layers, by default None |
None |
elements |
typing.Collection[int] | None |
Read only selected element ids, by default None |
None |
error_bad_data |
bool |
raise error if data is corrupt, by default True, |
True |
fill_bad_data_value |
float |
fill value for to impute corrupt data, used in conjunction with error_bad_data=False default np.nan |
np.nan |
Returns
mikeio.dataset.Dataset |
A Dataset with data dimensions [t,elements] |