unifhy-org / unifhy

A Unified Framework for Hydrology
https://unifhy-org.github.io/unifhy
BSD 3-Clause "New" or "Revised" License
11 stars 5 forks source link

Remove spacedomain vertical dimension #69

Closed ThibHlln closed 2 years ago

ThibHlln commented 2 years ago

resolve #28

Currently, depending on the user choise on defining/not defining a vertical dimension in their SpaceDomain, 2D or 3D arrays are sent to the components, which is problematic from a component contributor perspective because they don't know a priori what is the shape of the domain they need to work on, and they may not even want to work with the vertical dimension at all. There needs to be a way for the contributor to specify the space domains they support, and until then, this 2D/3D mismatch needs to be prevented by limiting to 2D domains.

Moreover, inherently horizontal properties of SpaceDomain (i.e. land_sea_mask, flow_direction, and cell_area) are not limited to 2D-only shapes. This also needs to be changed.

This PR includes:

Note, while the user cannot define 3D grids anymore, the functionality to do so, which was perfectly functional, is kept in the source code, only vertical dimension related "entry points" are deactivated (i.e. commented out) to prevent the use of this functionality. This way, once 3D domains are properly supported, this can be brought back easily.