Mohid Water Modelling System is organized in a hierarchical modular structure being, at the present time, constituted by over 60 modules which complete around 300000 source code lines. Each module is responsible to manage a certain kind of information handling a specific function or process. The information flux between modules is made in a client/server basis, assuring the information encapsulation in each module. Each module manages his associated memory, which is dynamically allocated.
In order to convert, programmatically, environmental systems into a numerical model, an analysis of processes included in the model and the environmental compartments in which they take place, had to be conducted. Environmental systems are assumed to be divided into three compartments or media: air, water and land. This was the approach followed to reach the actual structure of Mohid leading to six functional groups of modules:
- Global parameters modules – modules which handle global parameters like recognized property lists, time handling and functions, etc (e.g. Module GlobalData, Module Time);
- Independent functions modules – modules that handle specific operations (e.g. Module Functions – various mathematical or scientific functions, Module Triangulation – performs advanced triangulation, Module LUD – equations systems solver);
- Structural modules - modules that handle geometry domain discretization, transformation and referentials, using variables like distances, areas, volumes, compute points, etc. (e.g. Module HorizontalGrid – handles the horizontal discretization, Module HorizontalMap – handles 2D horizontal mapping of grid cells like covered and uncovered cells, Module Map – handles 3D mapping of grid cells, Module Geometry - handles the vertical discretization and volumes);
- Data handling modules – modules that perform I/O operations (e.g. Module EnterData – reads and writes ASCII data files, Module HDF5 – reads and writes matricial data into HDF5 format, Module TimeSerie – reads and writes formatted time series ASCII files);
- Specific functions modules – modules that perform specific operations that can only be used in MOHID (e.g. Module BoxDif - divides 2D and 3D domains into boxes and computes exchanges between boxes, total mass inside a box or process rates within a box, Module Statistics - computes basic statistic operations over space and time, Module Interface - interface between 3D and 0D models, Module WaterQuality – pelagic biochemical module);
- Processes modules - modules that correspond to the different processes taking place in the different environmental compartments (Module Hydrodynamic, Module WaterProperties, Module Turbulence, Module Lagrangian, Module InterfaceSedimentWater, Module InterfaceWaterAir, Module Atmosphere);
All programs included in MOHID Water Modelling System are built on the top of one or more base libraries and the three core executables files can be found at the top of the pyramid:
Smaller utility programs are easily built on the top of the libraries, which are usually designed for pre or post-processing results of the models. This support tools are normally managed by graphical user interfaces which allow management of input data, control of program execution, and output results analysis, along with other pre- and post-processsing operations.
The integration of MOHID’s different tools can be easily achieved since these tools are based on the same framework. This coupling can thus be used to study the water cycle and its associated processes in an integrated approach.