cgq-qgc / pyhelp Goto Github PK
View Code? Open in Web Editor NEWA Python library for the assessment of spatially distributed groundwater recharge and hydrological components with HELP
License: MIT License
A Python library for the assessment of spatially distributed groundwater recharge and hydrological components with HELP
License: MIT License
This will allow to simplify the installation instruction.
We want to be able to support Python 3.6 and 3.7. This should be very simple to do and will only consist in adding it to the matrix in AppVeyor.
>>> forrtl: error (200): program aborting due to window-CLOSE event
Image PC Routine Line Source
libifcoremd.dll 00007FFCD18A94C4 Unknown Unknown Unknown
KERNELBASE.dll 00007FFD278556FD Unknown Unknown Unknown
KERNEL32.DLL 00007FFD2AA83034 Unknown Unknown Unknown
ntdll.dll 00007FFD2B1A1471 Unknown Unknown Unknown
QObject::~QObject: Timers cannot be stopped from another thread
https://software.intel.com/pt-br/node/738412
https://www.codeproject.com/Questions/767327/forrtl-error-program-aborting-due-to-window-CLOSE
https://stackoverflow.com/questions/42653389/ctrl-c-causes-forrtl-error-200-rather-than-python-keyboardinterrupt-exception
I think that using the m2w64-toolchain directly from Anaconda will make my life easier in the long run if this works instead of installing mingw-w64 separately from:
However, this is not easy. An early attempt failed when trying to do it in PR #25, though everything was working fine locally. So I do not know what is going on.
Resources:
https://www.msys2.org/
ContinuumIO/anaconda-issues#1484
J'ai trouvé une petite erreur dans le script exemple de pyhelp version 0.3.0 (ou moins) pour le calcul des cellules de type "eau de surface".
Lorsque l'on lance les calculs HELP pour un sous-bassin X, il est important de passer la liste des cellules de la grille associées à ce sous-bassin à la fonction pour calculer avec HELP, mais aussi aux cellules pour calculer les cellules eau.
Dans le fichier exemple de pyhelp version 0.3.0 et moins, la liste des cellules n'est pas passée à la fonction helpm.calc_surf_water_cells
, ce qui veut dire que les calculs sont faits pour toutes les cellules eau de la zone d'étude au complet, ce qui va biaisé les débits totaux et de base obtenus pour le sous-bassin, car la proportion de cellules eau sera alors surestimée.
J'ai corrigé le tout dans l'exemple 0.3.1. Je suis vraiment désolé si cela vous cause des soucis.
C'est-à-dire:
With the changes made in PR #12, having the requirement to specified a year_range
value when instantiating HelpManager
is useless and annoying. The year range info should be provided when actually running the simulation, not before.
This needs to be removed.
This Issue is blocked by Issue #33
As mentionned in #22 (comment), arguments of each SUBROUTINE
or FUNCTION
should be explicitly defined. This is to avoid warning or the type vars2fortran: No typespec for argument "nt". Block: leap
when compiling with f2py
.
For example, the SUBROUTINE READIN
does not produce such a warnings.
C ************************* READIN *************************
C
C SUBROUTINE READIN READS ET AND SOIL DESIGN DATA, AND WEATHER HEADERS
C
SUBROUTINE READIN (fpath_precip, fpath_tasavg, fpath_solrad,
1 fpath_evapo, fpath_soil)
CHARACTER(len=260), INTENT(IN) :: fpath_precip
CHARACTER(len=260), INTENT(IN) :: fpath_tasavg
CHARACTER(len=260), INTENT(IN) :: fpath_solrad
CHARACTER(len=260), INTENT(IN) :: fpath_evapo
CHARACTER(len=260), INTENT(IN) :: fpath_soil
So I think this can be safely ignored for the moment.
Currently, PyHelp is limited to using data from specific sources. Even worse, the meteo grid from info-climat is not even available publicly.
We need to change that so data from any source can be used.
Il y a un problème avec les nouvelles données météo pour Mercier (sans doute relié à une histoire de format pour l'affichage des graphes) :
De même, j'ai regardé le fichier de résultats "help_example_yearly.csv" et rien n'a été calculé (à part le runoff) :
Auparavant, j'avais testé le fichier exemple par défaut et il fonctionne bien. Ensuite, j'avais ajouté mon fichier input pour Mercier et le fichier des données de débit et tout fonctionnait. Le problème vient donc des données météo.
Tiens moi au courant, :)
[to be completed later]
Now that we are able to build Wheel and Conda package, it is time to write the documentation on how to use those to install PyHELP.
For some reason, the technical documentation is not generated anymore.
https://pyhelp.readthedocs.io/en/latest/help_manager.html#class-attributes
Bonjour Jean-Sébastien,
Un petit souci est apparu quand j'ai voulu lancer ma première simulation climatique avec les données futures :
Je pense que c'est lors de la vérification des années bissextiles dans le script (managers.py) :
Je préfère t'envoyer une "issue" que de modifier le script moi-même...
Merci pour ton retour,
Bonne journée.
Problème avec les fichiers météo lors de la production du fichier D4.
Est-ce lié au fait que les dates ne sont pas formater comme avec les fichiers historiques ?
Historique : jour/mois/année
Futur : année-mois-jour
J'ai fait un test en ne mettant que l'année 2006 au format futur (année-mois-jour) et la simulation a fonctionné. Donc le problème réside sans doute encore dans les longueurs des années je pense.
Je vais t'envoyer le dossier par courriel avec mes données d'entrée pour la simulation A10 pour que tu puisses faire des tests sur la période 2006-2095.
Merci encore pour ton aide précieuse.
This Epic is to follow the tasks that need to be done in order to complete the documentation for the first official release of PyHelp.
Running one of the following commands results in an error:
plot_area_monthly_avg()
output.plot_area_yearly_avg()
output.plot_area_yearly_series()
Traceback (most recent call last):
File "C:\Users\User\pyhelp\example\help_example.py", line 43, in <module>
output.plot_area_monthly_avg()
File "C:\Users\User\pyhelp\pyhelp\output.py", line 195, in plot_area_monthly_avg
fsize=(9, 6.5), margins=(1.5, 1, 0.25, 0.7))
TypeError: _create_figure() got multiple values for argument 'fsize'
The idea would be to split the current section named Install PyHELP from source
in two and have a section named Install PyHELP from source
and another section named Contribute to PyHELP
.
In the Install PyHELP from source
section we would not talk about git at all. We will also link to an official release of PyHELP to download the source code.
In the Contribute to PyHELP
we will give instruction to run PyHELP from the development version using git. We also need to add instruction to be able to build the documentation. Also, we need to add instruction to install the required dependencies for the tests.
As we plan to support more sources of weather data in the future, this is going to be required to ensure everything remains well structured and easily maintainable.
Bonjour Jean-Sébastien,
En essayant de modifier les axes de mes graphes (via la commande CTRL + G), je me suis rendu compte que je ne pouvais pas le faire. En fait, je ne peux pas modifier le code sur le PC de modélisation de l'INRS (je voulais mettre 1974 à la place de 1980 pour les années - axe des X).
J'ai donc relancé Anaconda et lors de l'update, l'accès vers le dossier semble refusé (pas la permission requise).
Penses-tu que le fait de ne pas pouvoir modifier les attributs des graphes (tailles des polices, longueur des axes... etc) est lié à ce problème d'accès ?
J'ai en fait ouvert Spyder sur mon PC personnel et je peux faire la modification (j'ai pu modifier les années).
Merci pour ta réponse,
Bonne journée.
HELP simulation in progress: 100.0% (0.0 min remaining)
Task completed in 145.64 sec
Post-processing cell 22202 of 22202... done
Saving data to help_example.out...
Traceback (most recent call last):
Input In [54] in <cell line: 1>
output = helpm.calc_help_cells(help_output_hdf5, tfsoil=-3)
File ~\.conda\envs\PyHELP\lib\site-packages\pyhelp\managers.py:316 in calc_help_cells
help_output.save_to_hdf5(path_to_hdf5)
File ~\.conda\envs\PyHELP\lib\site-packages\pyhelp\output.py:102 in save_to_hdf5
group.attrs['index'] = list(self.grid.index)
File h5py\_objects.pyx:54 in h5py._objects.with_phil.wrapper
File h5py\_objects.pyx:55 in h5py._objects.with_phil.wrapper
File ~\.conda\envs\PyHELP\lib\site-packages\h5py\_hl\attrs.py:103 in __setitem__
self.create(name, data=value)
File ~\.conda\envs\PyHELP\lib\site-packages\h5py\_hl\attrs.py:196 in create
attr = h5a.create(self._id, self._e(tempname), htype, space)
File h5py\_objects.pyx:54 in h5py._objects.with_phil.wrapper
File h5py\_objects.pyx:55 in h5py._objects.with_phil.wrapper
File h5py\h5a.pyx:50 in h5py.h5a.create
RuntimeError: Unable to create attribute (object header message is too large)
After PR#96, only pip install will be supported here, so we need to update the documentation accordingly.
Currently, for cells located in surface water bodies, we calculate the water budget on a yearly basis only.
Basically, we take a constant value for the yearly evaporation from a map* and subtract this constant value to the annual precipitation. The results is stored as surface runoff.
There is no reason not to use our input data to actually calculate monthly values for each cell located in surface water bodies, except the lack of time to do it...
J'arrive à lancer la simulation HELP pour certains bassins. Par contre, il y en a pour lesquels j'ai cette erreur lorsque je lance la simulation HELP. Est-ce que c'est un problème qui provient du fichier input?
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "D:\OneDrive\INRS\2021 - PACES Estrie\help_example.py", line 43, in <module>
output_help = helpm.calc_help_cells(
File "D:\Projets\pyhelp\pyhelp\managers.py", line 375, in calc_help_cells
output_data = run_help_allcells(cellparams)
File "D:\Projets\pyhelp\pyhelp\processing.py", line 52, in run_help_allcells
for cell in pool.imap_unordered(run_help_singlecell, cellparams.items()):
File "C:\Python38\lib\multiprocessing\pool.py", line 868, in next
raise value
ValueError: could not convert string to float: '*******'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.