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

Doc hydro signatures #373

Merged
merged 3 commits into from
Feb 4, 2025
Merged

Doc hydro signatures #373

merged 3 commits into from
Feb 4, 2025

Conversation

ahmad-3100
Copy link
Collaborator

No description provided.

@nghi-truyen nghi-truyen added the documentation Improvements or additions to documentation label Feb 4, 2025
@nghi-truyen nghi-truyen added this to the Release v1.1.0 milestone Feb 4, 2025
This section aims to go into detail on how to compute and vizualize some hydrological signatures
(a list of studied signatures and their formula is given in :ref:`Math / Num Documentation <math_num_documentation.hydrological_signature>`).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
(a list of studied signatures and their formula is given in :ref:`Math / Num Documentation <math_num_documentation.hydrological_signature>`).
For more details see :ref:Math / Num Documentation <math_num_documentation.hydrological_signature>.

This section aims to go into detail on how to compute and vizualize some hydrological signatures
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This section aims to go into detail on how to compute and vizualize some hydrological signatures
This section aims to go into detail on how to compute and vizualize some hydrological signatures.
The signatures provide to describe the properties of discharge and can use to improve the calibration of the hydrological models.

*********************

Now, we need to create a :class:`smash.Model` object.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Now, we need to create a :class:`smash.Model` object.


Now, we need to create a :class:`smash.Model` object.
For this case, we will use the :ref:`user_guide.demo_data.cance` dataset as an example.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
For this case, we will use the :ref:`user_guide.demo_data.cance` dataset as an example.
For this case, we use the :ref:`user_guide.demo_data.cance` dataset.

**********************

To start we need to do a forward_run (or optimization) simulation. Then the sinatures computation is available using the `smash.signatures` function which has three argument (model, domain and event_seg).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The smash.signatures function provide to compute signatures.
By default, the signatures are computed on the observed informations of hydrograph segmentation of flood events of the model, but they could be based on the simulated data, by changing the argument domain of the function. About the default definition of hydrograph segmentation, see :ref:user_guide.classical_uses.hydrograph_segmentation.

The signatures coputation result object contains 2 attributes which are 2 different dictionaries:

- ``cont`` : Continuous signatures computation result,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- ``cont`` : Continuous signatures computation result,
- ``cont`` : Continuous signatures computation result, on all the discharge time series,

- ``cont`` : Continuous signatures computation result,

- ``event``: Flood event signatures computation result.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- ``event``: Flood event signatures computation result.
- ``event``: Flood events signatures computation result.

- ``event``: Flood event signatures computation result.

For example, we can display the simulated continuous and flood event signatures as follow.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
For example, we can display the simulated continuous and flood event signatures as follow.
We can display the simulated continuous and flood events signatures as follow.

sig_sim.event

Now, we visualize, for instance, the simulated and observed flood event runoff coefficients in the boxplots below.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Now, we visualize, for instance, the simulated and observed flood event runoff coefficients in the boxplots below.
Now, we visualize the boxplots of simulated and observed flood event runoff coefficients as below.

@savefig user_guide.classical_uses.hydrological_signatures_boxplot.png
boxplot = df.boxplot(column=["Erc", "Erchf", "Erclf", "Erch2r"], by="domain")

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can u add a qualitative explanation about each signature u show ?

Copy link
Member

@nghi-truyen nghi-truyen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you both, @ahmad-3100 for your work and @asjeb for your comments. I just committed an enhancement/readability improvement for this tutorial. I approve this PR and will merge it into the main branch.

@nghi-truyen nghi-truyen merged commit 554ab08 into main Feb 4, 2025
22 checks passed
@nghi-truyen nghi-truyen deleted the doc_hydro_signatures branch February 4, 2025 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants