Skip to content

Commit

Permalink
Revert "doc: graphe and eqs upgrades"
Browse files Browse the repository at this point in the history
This reverts commit 4e6909f.
  • Loading branch information
inoelloc committed Jun 11, 2024
1 parent 4e6909f commit 550ac5b
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 336 deletions.
273 changes: 0 additions & 273 deletions doc/source/_static/eqs_smash_doc.lyx

This file was deleted.

Binary file removed doc/source/_static/flowchart_forward_gridded.png
Binary file not shown.
Binary file removed doc/source/_static/forward_simple_flowchart.png
Binary file not shown.
Binary file removed doc/source/_static/forward_simple_flowchart.png.png
Binary file not shown.
Binary file removed doc/source/_static/smash_graphes_structures.odp
Binary file not shown.
6 changes: 3 additions & 3 deletions doc/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ smash documentation
`smash` is a computational software framework dedicated to **S**\patially distributed **M**\odelling and
**AS**\similation for **H**\ydrology, enabling to tackle spatially distributed differentiable hydrological
modeling, with learnable parameterization-regionalization. This platform enables to combine vertical and
lateral flow operators, either process-based conceptual or hydrid with neural networks, and perform high
dimensional non linear optimization from multi-source data. It is designed to simulate discharge hydrographs
and hydrological states at any spatial location within a basin and reproduce the hydrological response of
lateral flow operators, either physically based or hydrid with neural networks, and perform high dimensional
non linear optimization from multi-source data. It is designed to simulate discharge hydrographs and
hydrological states at any spatial location within a basin and reproduce the hydrological response of
contrasted catchments, both for operational forecasting of floods and low flows, by taking advantage of
spatially distributed meteorological forcings, physiographic data and hydrometric observations.

Expand Down
57 changes: 18 additions & 39 deletions doc/source/math_num_documentation/forward_inverse_problem.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,43 +4,31 @@
Forward & Inverse Problems
==========================

This section explains:
This section explains :

- The **hydrological modeling problem statement (forward problem)**, that consists in modeling the spatio-temporal evolution of water states-fluxes within a basin/domain given atmospheric forcings and basin physical descriptors.
- The **forward hydrologic problem statement**, consisting in modeling the spatio-temporal evolution of water states-fluxes within a basin given atmospheric forcings and basin physical descriptors.

- The **inverse problem statement**, aiming to use spatio-temporal observations of hydrological state-fluxes to estimate uncertain or unknows model parameters.

- The **parameter estimation problem statement (inverse problem)**, that pertains to estimating uncertain or unknows model parameters from the available spatio-temporal observations of hydrological state-fluxes and from basin physical descriptors.

Forward problem statement
-------------------------
Forward problem
---------------

Let :math:`\Omega\subset\mathbb{R}^{2}` denote a 2D spatial domain, :math:`x\in\Omega` the spatial coordinates, and :math:`t\in\left]0,T\right]` the physical time.
Let :math:`\Omega\subset\mathbb{R}^{2}` denote a 2D spatial domain, :math:`x\in\Omega` the spatial coordinate, and :math:`t\in\left]0,T\right]` the physical time.

Hydrological model definition
*****************************
Hydrological model
******************

The spatially distributed hydrological model is a dynamic operator :math:`\mathcal{M}` projecting fields of atmospheric forcings :math:`\mathcal{\boldsymbol{I}}`,
catchment physical descriptors :math:`\boldsymbol{\mathcal{D}}` onto surface discharge :math:`Q`, model states :math:`\boldsymbol{h}`, and internal fluxes :math:`\boldsymbol{q}` such that:


catchment physiographic descriptors :math:`\boldsymbol{\mathcal{D}}` onto surface discharge :math:`Q`, model states :math:`\boldsymbol{h}`, and internal fluxes :math:`\boldsymbol{q}` such that:

.. math::
:name: math_num_documentation.forward_inverse_problem.forward_problem_M_1
\boxed{
\boldsymbol{U}(x,t)=(Q,\boldsymbol{h},\boldsymbol{q})(x,t)=\mathcal{M}\left(\left[\mathcal{\boldsymbol{I}},\boldsymbol{\mathcal{D}}\right](x,t);\left[\boldsymbol{\theta},\boldsymbol{h}_{0}\right](x)\right)
}
with :math:`\boldsymbol{U}(x,t)` the modeled state-flux variables, :math:`\boldsymbol{\theta}` the parameters and :math:`\boldsymbol{h}_{0}` the initial states.


.. figure:: ../_static/forward_simple_flowchart.png
:align: center
:width: 800

Flowchart of the forward modeling problem: input data, forward hydrological model :math:`\mathcal{M}`, simulated quantites.



.. note:: The dimensions of model arrays, by denoting :math:`N=N_{x} \times N_{t}` with :math:`N_{x}` the number of cells in :math:`\Omega` and :math:`N_t` the number of simulation time steps in :math:`\left]0,T\right]`, are as follows:

- Surface discharge :math:`Q(x,t)\in\mathbb{R}^{N}`
Expand All @@ -60,28 +48,21 @@ with :math:`\boldsymbol{U}(x,t)` the modeled state-flux variables, :math:`\bolds
Operators composition
*********************

The forward hydrological model :math:`\mathcal{M}` is obtained by combining at least two operators: the hydrological operator :math:`\mathcal{M}_{rr}` to simulate runoff from atmospheric forcings and use this runoff to feed a routing operator :math:`\mathcal{M}_{hy}` for cell to cell flow routing.

A snow module :math:`\mathcal{M}_{snw}` can also be added.

Neural networks ca also be included into this forward model to predict parameters and/or fluxes corrections from data.

The various model structures proposed in `smash` are differentiable and detailed in :ref:`model strucures section <math_num_documentation.forward_structure>`.
Note that the operator :math:`\mathcal{M}` can be a composite function containing, at least differentiable operators for vertical and lateral transfert processes within each cell :math:`x\in\Omega`, and routing operator from cells to cells following a flow direction map, plus (optionally) deep neural networks enabling learnable process parameterization and learnable conceptual parameters regionalization as described later.


Snow, Production and Routing Operators
======================================

The forward hydrological model is obtained by partial composition (each operator taking various other inputs data and paramters) of the flow operators writes:
The hydrological model writes

.. math::
:name: math_num_documentation.forward_inverse_problem.forward_problem_Mhy_circ_Mrr
\mathcal{M}=\mathcal{M}_{hy}\left(\,.\,,\mathcal{M}_{rr}\left(\,.\,,\mathcal{M}_{snw}\left(.\right)\right)\right)
\mathcal{M}=\mathcal{M}_{hy}\circ\mathcal{M}_{rr}\circ\mathcal{M}_{snw}
with the snow module :math:`\mathcal{M}_{snw}` producing a melt flux :math:`m_{lt}(x,t)` inflowing the production module :math:`\mathcal{M}_{rr}` that produces elemental discharge :math:`q_t(x,t)` inflowing a routing module :math:`\mathcal{M}_{hy}`.
and is composed of the snow module :math:`\mathcal{M}_{snw}` producing a melt flux :math:`m_{lt}(x,t)` inflowing the production module :math:`\mathcal{M}_{rr}` that produces elemental discharge :math:`q_t(x,t)` inflowing a routing module :math:`\mathcal{M}_{hy}`.

Models structures are detailed in :ref:`model strucures section <math_num_documentation.forward_structure>`.

.. _math_num_documentation.forward_inverse_problem.mapping:

Expand All @@ -104,18 +85,16 @@ Consequently, replacing in :ref:`Eq. 1 <math_num_documentation.forward_inverse_p
\boldsymbol{U}(x,t)=(Q,\boldsymbol{h},\boldsymbol{q})(x,t)=\mathcal{M}\left(\left[\mathcal{\boldsymbol{I}},\mathcal{\boldsymbol{D}}\right](x,t);\phi\left(\boldsymbol{\mathcal{D}}(x,t),\boldsymbol{\rho}\right)\right)
Inverse problem statement
-------------------------

**ADD general optim flowchart here**
Inverse problem
---------------

.. _math_num_documentation.forward_inverse_problem.cost_function:

Cost function
*************


Consider the following generic differentiable cost function composed of an observation term :math:`J_{obs}` and a regularization term :math:`J_{reg}` weighted by :math:`\alpha\geq0`:
Consider the following generic cost function composed of an observation term :math:`J_{obs}` and a regularization term :math:`J_{reg}` weighted by :math:`\alpha\geq0`:


.. math::
Expand Down
Loading

0 comments on commit 550ac5b

Please sign in to comment.