Skip to content

Commit

Permalink
Merge branch 'main' into docstring_pedantic
Browse files Browse the repository at this point in the history
  • Loading branch information
ecomodeller authored Oct 22, 2024
2 parents 5fee932 + 125254a commit 276d889
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 32 deletions.
31 changes: 0 additions & 31 deletions docs/user-guide/dfsu.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -36,37 +36,6 @@ In MIKE Zero, node ids, element ids and layer ids are 1-based. In MIKE IO, all

MIKE IO has Flexible Mesh Geometry classes, e.g. [`GeometryFM2D`](`mikeio.spatial.GeometryFM2D`), containing the list of node coordinates and the element table which defines the mesh, as well as a number of derived properties (e.g. element coordinates) and methods making it convenient to work with the mesh.

| Property | Description |
|----------|--------------|
| `n_nodes` | Number of nodes |
| `node_coordinates` | Coordinates (x,y,z) of all nodes |
| `codes` | Codes of all nodes (0:water, 1:land, >=2:open boundary) |
| `boundary_polylines` | Lists of closed polylines defining domain outline |
| `n_elements` | Number of elements |
| `element_coordinates` | Center coordinates of each element |
| `element_table` | Element to node connectivity |
| `max_nodes_per_element` | The maximum number of nodes for an element |
| `is_tri_only` | Does the mesh consist of triangles only? |
| `projection_string` | The projection string |
| `is_geo` | Are coordinates geographical (LONG/LAT)? |
| `is_local_coordinates` | Are coordinates relative (NON-UTM)? |
| `type_name` | Type name, e.g. Dfsu2D|


| Method | Description |
|----------|--------------|
| `contains()` | test if a list of points are contained by mesh |
| `find_index()` | Find index of elements containing points/area|
| `isel()` | Get subset geometry for list of indicies |
| `find_nearest_points()` | Find index of nearest elements (optionally for a list) |
| `plot` | Plot the geometry |
| `get_overset_grid()` | Get a Grid2D covering the domain |
| `to_shapely()` | Export mesh as shapely MultiPolygon |
| `get_element_area()` | Calculate the horizontal area of each element |


These properties and methods are accessible from the geometry, but also from the Mesh/Dfsu object.

If a .dfsu file is *read* with [](`mikeio.read`), the returned Dataset ds will contain a Flexible Mesh Geometry `geometry`. If a .dfsu or a .mesh file is *opened* with [](`mikeio.open`), the returned object will also contain a Flexible Mesh Geometry `geometry`.

```{python}
Expand Down
2 changes: 1 addition & 1 deletion docs/user-guide/eum.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ unit
type(unit)
```

`a [](`mikeio.EUMUnit)` is encoded as integers, which you can utilize in some MIKE applications.
an [`EUMUnit`](`mikeio.EUMUnit`) is encoded as integers, which you can utilize in some MIKE applications.

```{python}
int(unit)
Expand Down

0 comments on commit 276d889

Please sign in to comment.