Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mesh model #412

Merged
merged 17 commits into from
Aug 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
run:
shell: bash -l {0}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ['3.9','3.10','3.11']
Expand Down
19 changes: 17 additions & 2 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,13 @@ Components and attributes
:toctree: _generated

MeshModel.mesh
MeshModel.mesh_names
MeshModel.mesh_grids
MeshModel.mesh_datasets
MeshModel.mesh_gdf
MeshModel.crs
MeshModel.region
MeshModel.bounds

General methods
---------------
Expand All @@ -338,6 +343,7 @@ General methods
:toctree: _generated

MeshModel.set_mesh
MeshModel.get_mesh
MeshModel.read_mesh
MeshModel.write_mesh

Expand All @@ -350,10 +356,11 @@ Setup methods

MeshModel.setup_config
MeshModel.setup_region
MeshModel.setup_mesh2d
MeshModel.setup_mesh2d_from_rasterdataset
MeshModel.setup_mesh2d_from_raster_reclass
MeshModel.setup_maps_from_rasterdataset
MeshModel.setup_maps_from_raster_reclass
MeshModel.setup_mesh_from_rasterdataset
MeshModel.setup_mesh_from_raster_reclass


=========
Expand All @@ -371,6 +378,14 @@ Grid
workflows.grid.grid_from_raster_reclass
workflows.grid.grid_from_geodataframe

Mesh
====

.. autosummary::
:toctree: _generated

workflows.mesh.create_mesh2d


Basin mask
==========
Expand Down
1 change: 1 addition & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Added

Changed
-------
- Updated ``MeshModel`` and related methods to support multigrids instead of one single 2D grid. PR #412
- possibility to ``load`` the data in the model read_ functions for netcdf files (default for read_grid in r+ mode). (PR #460)
- Internal model components (e.g. `Models._maps`, `GridModel._grid``) are now initialized with None and should not be accessed directly,
call the corresponding model property (e.g. `Model.maps`, `GridModel.grid`) instead. (PR #473)
Expand Down
5 changes: 3 additions & 2 deletions docs/user_guide/model_overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ While a generalized model class can readily be used, it can also be tailored to

.. NOTE::

As of version 0.6.0, the grid model (distributed grid model), lumped model (semi-distributed and lumped models), mesh model (unstructured grid models) have been implemented. Other model classes such as network models will follow in future versions.
As of version 0.6.0, the grid model (distributed grid model), lumped model (semi-distributed and lumped models), mesh model (unstructured grid(s) models) have been implemented. Other model classes such as network models will follow in future versions.

The table below lists the base model components common to all model classes.
All base model attributes and methods can be found the :ref:`API reference <model_api>`
Expand Down Expand Up @@ -112,9 +112,10 @@ For each generalized model class, the respective computational unit components e
| :py:func:`~LumpedModel.write_response_units`
* - mesh
- :ref:`MeshModel <mesh_model_api>`
- Static mesh (unstructured grid) data
- Static mesh (unstructured grid(s)) data
- | :py:attr:`~MeshModel.mesh`
| :py:func:`~MeshModel.set_mesh`
| :py:func:`~MeshModel.get_mesh`
| :py:func:`~MeshModel.read_mesh`
| :py:func:`~MeshModel.write_mesh`
Expand Down
2 changes: 2 additions & 0 deletions docs/user_guide/model_region.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ Geospatial region

Based on a raster file: ``{'grid': '/path/to/raster_file'}``

Based on a mesh file: ``{'mesh': '/path/to/mesh_file'}``

Hydrographic region
^^^^^^^^^^^^^^^^^^^

Expand Down
Loading
Loading