Skip to content

Commit 6960950

Browse files
authored
Merge branch 'main' into keepdims
2 parents bc044d2 + 16c27c4 commit 6960950

File tree

7 files changed

+147
-63
lines changed

7 files changed

+147
-63
lines changed

docs/MIKE-IO-Logo-Pos-RGB.svg

Lines changed: 1 addition & 1 deletion
Loading

docs/_quarto.yml

Lines changed: 38 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,19 @@ website:
2222
left:
2323
- href: index.qmd
2424
text: Home
25+
- href: user-guide/getting-started.qmd
26+
text: "User Guide"
2527
- href: examples/index.qmd
2628
text: Examples
2729
- href: api/index.qmd
2830
text: API Reference
2931

32+
# use hybrid navigation
33+
3034
sidebar:
31-
style: docked
32-
search: true
33-
contents:
34-
- section: "User Guide"
35-
href: user-guide/getting-started.qmd
36-
contents:
35+
- title: "User Guide"
36+
style: docked
37+
contents:
3738
- user-guide/getting-started.qmd
3839
- user-guide/data-structures.md
3940
- user-guide/dataarray.qmd
@@ -46,32 +47,26 @@ website:
4647
- user-guide/eum.qmd
4748
- user-guide/generic.qmd
4849
- user-guide/pfs.qmd
49-
- section: Examples
50-
href: examples/index.qmd
51-
contents:
52-
- section: Dfs0
53-
href: examples/dfs0/index.qmd
54-
contents:
55-
- examples/dfs0/cmems_insitu.qmd
56-
- section: Dfs2
57-
href: examples/dfs2/index.qmd
58-
contents:
59-
- examples/dfs2/bathy.qmd
60-
- examples/dfs2/gfs.qmd
61-
- section: Dfsu
62-
href: examples/dfsu/index.qmd
63-
contents:
64-
- examples/dfsu/spatial_interpolation.qmd
65-
- examples/dfsu/merge_subdomains.qmd
66-
- examples/Time-interpolation.qmd
67-
- examples/Generic.qmd
68-
- text: Design philosophy
69-
href: design.qmd
70-
- text: API Reference
71-
href: api/index.qmd
72-
73-
7450

51+
- title: Examples
52+
contents:
53+
- examples/index.qmd
54+
- examples/dfs0/index.qmd
55+
- examples/dfs2/index.qmd
56+
- examples/dfsu/index.qmd
57+
- examples/Time-interpolation.qmd
58+
- examples/Generic.qmd
59+
- title: "API Reference"
60+
contents:
61+
- api/index.qmd
62+
- api/DataArray.qmd
63+
- api/Dataset.qmd
64+
- api/Dfs0.qmd
65+
- api/Dfs1.qmd
66+
- api/Dfs2.qmd
67+
- api/Dfs3.qmd
68+
- api/Dfsu.qmd
69+
7570

7671
filters:
7772
- interlinks
@@ -113,13 +108,6 @@ quartodoc:
113108
contents:
114109
- DataArray
115110
- Dataset
116-
- dataset._data_plot._DatasetPlotter # TODO alias?
117-
- dataset._data_plot._DataArrayPlotter
118-
- dataset._data_plot._DataArrayPlotterGrid1D
119-
- dataset._data_plot._DataArrayPlotterGrid2D
120-
- dataset._data_plot._DataArrayPlotterFM
121-
- dataset._data_plot._DataArrayPlotterFMVerticalProfile
122-
- dataset._data_plot._DataArrayPlotterFMVerticalColumn
123111
- title: Geometry
124112
desc: ""
125113
contents:
@@ -166,6 +154,17 @@ quartodoc:
166154
contents:
167155
- PfsDocument
168156
- PfsSection
157+
158+
- title: Dataset plotting
159+
desc: "Plotting functions for Dataset and DataArray objects."
160+
contents:
161+
- dataset._DatasetPlotter
162+
- dataset._DataArrayPlotter
163+
- dataset._DataArrayPlotterGrid1D
164+
- dataset._DataArrayPlotterGrid2D
165+
- dataset._DataArrayPlotterFM
166+
- dataset._DataArrayPlotterFMVerticalProfile
167+
- dataset._DataArrayPlotterFMVerticalColumn
169168

170169

171170
format:
@@ -174,4 +173,4 @@ format:
174173
toc: true
175174
ipynb:
176175
theme: cosmo
177-
toc: true
176+
toc: true

docs/index.qmd

Lines changed: 28 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,50 @@
1+
---
2+
toc: false
3+
---
14

25
![](MIKE-IO-Logo-Pos-RGB.svg)
36

47
# MIKE IO: input/output of MIKE files in Python
58
![Python version](https://img.shields.io/pypi/pyversions/mikeio.svg)
69
[![PyPI version](https://badge.fury.io/py/mikeio.svg)](https://badge.fury.io/py/mikeio)
710

8-
Read, write and manipulate dfs0, dfs1, dfs2, dfs3, dfsu and mesh files.
911

10-
See our sister library [MIKE IO 1D](https://github.com/DHI/mikeio1d) for .res1d and .xns11 files.
12+
::: {.grid}
13+
14+
::: {.g-col-6}
15+
## {{< fa clock >}} **Set up in 5 minutes**
16+
17+
Install **MIKE IO** with [`pip`](https://pypi.org/project/mikeio/) and get up
18+
and running in minutes
1119

12-
## Requirements
1320

14-
* Windows or Linux operating system
15-
* Python x64 3.9 - 3.13
16-
* (Windows) [VC++ redistributables](https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads>) (already installed if you have MIKE)
21+
[**Getting started**](user-guide/getting-started.qmd)
1722

18-
## Installation
23+
## {{< fa brands python >}} **It's just Python**
1924

20-
```
21-
$ pip install mikeio
22-
```
25+
Read, write and manipulate dfs0, dfs1, dfs2, dfs3, dfsu and mesh files.
26+
27+
[**API Reference**](api/index.qmd)
2328

24-
::: callout-warning
25-
**Don't use conda to install MIKE IO!**, the version on conda is outdated.
2629
:::
2730

28-
## Getting started
31+
::: {.g-col-6}
32+
33+
## {{< fa solid diagram-project >}} **Associated package**
2934

30-
```{python}
31-
import mikeio
35+
See our sister library **MIKE IO 1D** for .res1d and .xns11 files.
3236

33-
ds = mikeio.read("data/FakeLake.dfsu")
34-
ds.Bathymetry.plot()
35-
```
37+
[**MIKE IO 1D**](https://dhi.github.io/mikeio1d/)
3638

37-
Read more in the [getting started guide](user-guide/getting-started.qmd).
3839

40+
## {{< fa scale-balanced >}} **Open Source**
3941

40-
## Where can I get help?
42+
MIKE IO is licensed under BSD-3-Clause license and available on [GitHub](https://github.com/DHI/mikeio)
43+
44+
[**License**](license.qmd)
45+
46+
:::
47+
48+
:::
4149

42-
* New ideas and feature requests - [GitHub Discussions](https://github.com/DHI/mikeio/discussions)
43-
* Bugs - [GitHub Issues](https://github.com/DHI/mikeio/issues)
4450

docs/license.qmd

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
Copyright (c) 2019, DHI A/S
2+
All rights reserved.
3+
4+
Redistribution and use in source and binary forms, with or without
5+
modification, are permitted provided that the following conditions are met:
6+
7+
* Redistributions of source code must retain the above copyright notice,
8+
this list of conditions and the following disclaimer.
9+
* Redistributions in binary form must reproduce the above copyright
10+
notice, this list of conditions and the following disclaimer in the
11+
documentation and/or other materials provided with the distribution.
12+
* Neither the name of DHI nor the names of its contributors may be used to
13+
endorse or promote products derived from this software without specific
14+
prior written permission.
15+
16+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
17+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19+
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
20+
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21+
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22+
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23+
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24+
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25+
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26+
POSSIBILITY OF SUCH DAMAGE.

docs/user-guide/getting-started.qmd

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# Getting started
22

3+
## Requirements
4+
5+
* Windows or Linux operating system
6+
* Python x64 3.10 - 3.13
7+
* (Windows) [VC++ redistributables](https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads>) (already installed if you have MIKE)
8+
9+
## Installation
10+
11+
```bash
12+
pip install mikeio
13+
```
14+
315
## {{< fa database >}} Dataset
416
The [Dataset](dataset.qmd) is the common MIKE IO data structure for data read from dfs files.
517
The [](`mikeio.read`) method returns a Dataset with a [DataArray](dataarray.qmd) for each item.

mikeio/dataset/__init__.py

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,31 @@
11
from ._dataarray import DataArray
22
from ._dataset import Dataset, from_pandas, from_polars
3+
from ._data_plot import (
4+
_DataArrayPlotter,
5+
_DataArrayPlotterGrid1D,
6+
_DataArrayPlotterGrid2D,
7+
_DataArrayPlotterFM,
8+
_DataArrayPlotterFMVerticalColumn,
9+
_DataArrayPlotterFMVerticalProfile,
10+
_DataArrayPlotterPointSpectrum,
11+
_DataArrayPlotterLineSpectrum,
12+
_DataArrayPlotterAreaSpectrum,
13+
_DatasetPlotter,
14+
)
315

4-
__all__ = ["DataArray", "Dataset", "from_pandas", "from_polars"]
16+
__all__ = [
17+
"DataArray",
18+
"Dataset",
19+
"from_pandas",
20+
"from_polars",
21+
"_DataArrayPlotter",
22+
"_DataArrayPlotterGrid1D",
23+
"_DataArrayPlotterGrid2D",
24+
"_DataArrayPlotterFM",
25+
"_DataArrayPlotterFMVerticalColumn",
26+
"_DataArrayPlotterFMVerticalProfile",
27+
"_DataArrayPlotterPointSpectrum",
28+
"_DataArrayPlotterLineSpectrum",
29+
"_DataArrayPlotterAreaSpectrum",
30+
"_DatasetPlotter",
31+
]

mikeio/dataset/_data_plot.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -927,3 +927,17 @@ def scatter(
927927
@staticmethod
928928
def _label_txt(da: DataArray) -> str:
929929
return f"{da.name} [{da.unit.name}]"
930+
931+
932+
__all__ = [
933+
"_DataArrayPlotter",
934+
"_DataArrayPlotterGrid1D",
935+
"_DataArrayPlotterGrid2D",
936+
"_DataArrayPlotterFM",
937+
"_DataArrayPlotterFMVerticalColumn",
938+
"_DataArrayPlotterFMVerticalProfile",
939+
"_DataArrayPlotterPointSpectrum",
940+
"_DataArrayPlotterLineSpectrum",
941+
"_DataArrayPlotterAreaSpectrum",
942+
"_DatasetPlotter",
943+
]

0 commit comments

Comments
 (0)