smashbox 1.0__tar.gz → 1.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. {smashbox-1.0 → smashbox-1.1}/PKG-INFO +4 -4
  2. smashbox-1.1/mail_pr/303/251sentation_smashbox.txt +17 -0
  3. smashbox-1.1/pyproject.toml +27 -0
  4. {smashbox-1.0 → smashbox-1.1}/smashbox/.spyproject/config/backups/workspace.ini.bak +1 -1
  5. {smashbox-1.0 → smashbox-1.1}/smashbox/.spyproject/config/workspace.ini +1 -1
  6. smashbox-1.1/smashbox/mesh.hdf5 +0 -0
  7. {smashbox-1.0 → smashbox-1.1}/smashbox/model/model.py +11 -5
  8. {smashbox-1.0 → smashbox-1.1}/smashbox/test.py +53 -57
  9. {smashbox-1.0 → smashbox-1.1}/smashbox/tools/tools.py +1 -1
  10. smashbox-1.0/mail_pr/303/251sentation_smashbox.txt +0 -16
  11. smashbox-1.0/pyproject.toml +0 -27
  12. {smashbox-1.0 → smashbox-1.1}/LICENSE +0 -0
  13. {smashbox-1.0 → smashbox-1.1}/README.md +0 -0
  14. {smashbox-1.0 → smashbox-1.1}/smashbox/.spyproject/config/backups/codestyle.ini.bak +0 -0
  15. {smashbox-1.0 → smashbox-1.1}/smashbox/.spyproject/config/backups/encoding.ini.bak +0 -0
  16. {smashbox-1.0 → smashbox-1.1}/smashbox/.spyproject/config/backups/vcs.ini.bak +0 -0
  17. {smashbox-1.0 → smashbox-1.1}/smashbox/.spyproject/config/codestyle.ini +0 -0
  18. {smashbox-1.0 → smashbox-1.1}/smashbox/.spyproject/config/defaults/defaults-codestyle-0.2.0.ini +0 -0
  19. {smashbox-1.0 → smashbox-1.1}/smashbox/.spyproject/config/defaults/defaults-encoding-0.2.0.ini +0 -0
  20. {smashbox-1.0 → smashbox-1.1}/smashbox/.spyproject/config/defaults/defaults-vcs-0.2.0.ini +0 -0
  21. {smashbox-1.0 → smashbox-1.1}/smashbox/.spyproject/config/defaults/defaults-workspace-0.2.0.ini +0 -0
  22. {smashbox-1.0 → smashbox-1.1}/smashbox/.spyproject/config/encoding.ini +0 -0
  23. {smashbox-1.0 → smashbox-1.1}/smashbox/.spyproject/config/vcs.ini +0 -0
  24. {smashbox-1.0 → smashbox-1.1}/smashbox/__init__.py +0 -0
  25. {smashbox-1.0 → smashbox-1.1}/smashbox/asset/flwdir/flowdir_fr_1000m.tif +0 -0
  26. {smashbox-1.0 → smashbox-1.1}/smashbox/asset/outlets/.Rhistory +0 -0
  27. {smashbox-1.0 → smashbox-1.1}/smashbox/asset/outlets/db_bnbv_fr.csv +0 -0
  28. {smashbox-1.0 → smashbox-1.1}/smashbox/asset/outlets/db_bnbv_light.csv +0 -0
  29. {smashbox-1.0 → smashbox-1.1}/smashbox/asset/outlets/db_sites.csv +0 -0
  30. {smashbox-1.0 → smashbox-1.1}/smashbox/asset/outlets/db_stations.csv +0 -0
  31. {smashbox-1.0 → smashbox-1.1}/smashbox/asset/outlets/db_stations_example.csv +0 -0
  32. {smashbox-1.0 → smashbox-1.1}/smashbox/asset/outlets/edit_database.py +0 -0
  33. {smashbox-1.0 → smashbox-1.1}/smashbox/asset/outlets/readme.txt +0 -0
  34. {smashbox-1.0 → smashbox-1.1}/smashbox/asset/params/ci.tif +0 -0
  35. {smashbox-1.0 → smashbox-1.1}/smashbox/asset/params/cp.tif +0 -0
  36. {smashbox-1.0 → smashbox-1.1}/smashbox/asset/params/ct.tif +0 -0
  37. {smashbox-1.0 → smashbox-1.1}/smashbox/asset/params/kexc.tif +0 -0
  38. {smashbox-1.0 → smashbox-1.1}/smashbox/asset/params/kmlt.tif +0 -0
  39. {smashbox-1.0 → smashbox-1.1}/smashbox/asset/params/llr.tif +0 -0
  40. {smashbox-1.0 → smashbox-1.1}/smashbox/asset/setup/setup_rhax_gr4_dt3600.yaml +0 -0
  41. {smashbox-1.0 → smashbox-1.1}/smashbox/asset/setup/setup_rhax_gr4_dt900.yaml +0 -0
  42. {smashbox-1.0 → smashbox-1.1}/smashbox/asset/setup/setup_rhax_gr5_dt3600.yaml +0 -0
  43. {smashbox-1.0 → smashbox-1.1}/smashbox/asset/setup/setup_rhax_gr5_dt900.yaml +0 -0
  44. {smashbox-1.0 → smashbox-1.1}/smashbox/init/README.md +0 -0
  45. {smashbox-1.0 → smashbox-1.1}/smashbox/init/__init__.py +0 -0
  46. {smashbox-1.0 → smashbox-1.1}/smashbox/init/multimodel_statistics.py +0 -0
  47. {smashbox-1.0 → smashbox-1.1}/smashbox/init/param.py +0 -0
  48. {smashbox-1.0 → smashbox-1.1}/smashbox/init/smashbox.py +0 -0
  49. {smashbox-1.0 → smashbox-1.1}/smashbox/model/__init__.py +0 -0
  50. {smashbox-1.0 → smashbox-1.1}/smashbox/model/atmos_data_connector.py +0 -0
  51. {smashbox-1.0 → smashbox-1.1}/smashbox/model/mesh.py +0 -0
  52. {smashbox-1.0 → smashbox-1.1}/smashbox/model/setup.py +0 -0
  53. {smashbox-1.0 → smashbox-1.1}/smashbox/plot/__init__.py +0 -0
  54. {smashbox-1.0 → smashbox-1.1}/smashbox/plot/myplot.py +0 -0
  55. {smashbox-1.0 → smashbox-1.1}/smashbox/plot/plot.py +0 -0
  56. {smashbox-1.0 → smashbox-1.1}/smashbox/read_inputdata/__init__.py +0 -0
  57. {smashbox-1.0 → smashbox-1.1}/smashbox/read_inputdata/read_data.py +0 -0
  58. {smashbox-1.0 → smashbox-1.1}/smashbox/read_inputdata/smashmodel.py +0 -0
  59. {smashbox-1.0 → smashbox-1.1}/smashbox/stats/__init__.py +0 -0
  60. {smashbox-1.0 → smashbox-1.1}/smashbox/stats/mystats.py +0 -0
  61. {smashbox-1.0 → smashbox-1.1}/smashbox/stats/stats.py +0 -0
  62. {smashbox-1.0 → smashbox-1.1}/smashbox/test_average_stats.py +0 -0
  63. {smashbox-1.0 → smashbox-1.1}/smashbox/test_mesh.r +0 -0
  64. {smashbox-1.0 → smashbox-1.1}/smashbox/test_mesh_from_graffas.py +0 -0
  65. {smashbox-1.0 → smashbox-1.1}/smashbox/tools/__init__.py +0 -0
  66. {smashbox-1.0 → smashbox-1.1}/smashbox/tools/geo_toolbox.py +0 -0
  67. {smashbox-1.0 → smashbox-1.1}/smashbox/tutorial_R.r +0 -0
  68. {smashbox-1.0 → smashbox-1.1}/smashbox/tutorial_R_graffas.r +0 -0
  69. {smashbox-1.0 → smashbox-1.1}/smashbox/tutorial_R_graffas_local.r +0 -0
  70. {smashbox-1.0 → smashbox-1.1}/smashbox/tutorial_python.py +0 -0
  71. {smashbox-1.0 → smashbox-1.1}/smashbox/tutorial_readme.py +0 -0
  72. {smashbox-1.0 → smashbox-1.1}/smashbox/tutorial_report.py +0 -0
  73. {smashbox-1.0 → smashbox-1.1}/smashbox/tutorials/Python_tutorial.md +0 -0
  74. {smashbox-1.0 → smashbox-1.1}/smashbox/tutorials/R_Graffas_tutorial.md +0 -0
  75. {smashbox-1.0 → smashbox-1.1}/smashbox/tutorials/R_tutorial.md +0 -0
  76. {smashbox-1.0 → smashbox-1.1}/smashbox/tutorials/__init__.py +0 -0
  77. {smashbox-1.0 → smashbox-1.1}/smashbox/tutorials/generate_doc.md +0 -0
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: smashbox
3
- Version: 1.0
4
- Summary: A python library developed by Hydris-hydrologie (https://www.hydris-hydrologie.fr/) to provide an technical environment for performing hydrological simulation with Smash. This library is preloaded with data (France only), comes with preconfigured setup, own some extra features such as the in-memory atmospheric data connector, has statistical and plot capabilities. Plot and stats functions can be used as a separate module with your own Smash model object.
5
- Project-URL: Homepage, https://codeberg.org/maximejay/easysmash
6
- Project-URL: Issues, https://codeberg.org/maximejay/easysmash/issues
3
+ Version: 1.1
4
+ Summary: A python library developed by Hydris-hydrologie (https://www.hydris-hydrologie.fr/) and INRAE to provide an technical environment for performing hydrological simulation with Smash. This library is preloaded with data (France only), comes with preconfigured setup, own some extra features such as the in-memory atmospheric data connector, has statistical and plot capabilities. Plot and stats functions can be used as a separate module with your own Smash model object.
5
+ Project-URL: Homepage, https://codeberg.org/maximejay/smashbox
6
+ Project-URL: Issues, https://codeberg.org/maximejay/smashbox/issues
7
7
  Author-email: Maxime Jay-Allemand <maxime.jay.allemand@hydris-hydrologie.fr>
8
8
  License-File: LICENSE
9
9
  Keywords: hydro-smash,plot,smash,statistics
@@ -0,0 +1,17 @@
1
+ Bonjour,
2
+
3
+ Je vous présente la librairie Python "SmashBox" (anciennement "EasySmash", présentée à la dernière réunion d'équipe). L'objectif de SmashBox est de fournir un environnement de travail simplifié pour Smash afin de gérer des pré et post traitements (maillage, calculs de statistiques et réalisation de graphique). Smashbox intègre des données prêtes à l’emploi (base de données d'exutoires, direction d'écoulement 1km², paramètres issus de la régionalisation nationale de Julie 2025) et des setup pré-configurés pour fonctionner sur les serveurs Rhax.
4
+ L'idée derrière ce module, est de simplifier certaines opérations courantes réalisées avec Smash (telle que les REX), fournir des interfaces vers d'autres outils de calcul (SCHYPRE-Graffas) et de mutualiser progressivement les outils de post-traitements (graphiques, statistiques, etc...).
5
+
6
+ La librairie s'installe facilement via Pypi (https://pypi.org/project/smashbox/) par la commande :
7
+ pip install smashbox
8
+
9
+ Remarque importante pour les testeurs : Smashbox fonctionne avec la future version de SMASH 1.2 (qui n'est pas encore sortie). En attendant cette version, vous devez donc installer SMASH manuellement dans votre environnement Python en repartant de la branche "main" : https://github.com/DassHydro/smash.git
10
+
11
+ Le code est disponible ici: https://codeberg.org/maximejay/smashbox et la documentation complète en ligne est là: https://maximejay.codeberg.page/smashbox.html
12
+
13
+ Les contributions, rapport de bug, idées, tests en tout genre sont les bienvenus :) Je vous laisse découvrir l'outil via la documentation. Il y a une petite rubrique "tutorial" un peu cachée tout en bas à gauche dans le sommaire qui pourrait vous servir. N'hésitez pas à me contacter si vous souhaitez tester cette librairie et si vous avez des questions !
14
+
15
+ A bientôt
16
+
17
+ Maxime
@@ -0,0 +1,27 @@
1
+ [build-system]
2
+ requires = ["hatchling >= 1.26"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "smashbox"
7
+ version = "1.1"
8
+ authors = [
9
+ { name="Maxime Jay-Allemand", email="maxime.jay.allemand@hydris-hydrologie.fr" },
10
+ ]
11
+ dependencies = [
12
+ "pyhdf5_handler",
13
+ "hydro-smash",
14
+ "matplotlib",
15
+ "mpld3",
16
+ "pdoc",
17
+ "rich",
18
+ "pyhdf5_handler",
19
+ ]
20
+ description = "A python library developed by Hydris-hydrologie (https://www.hydris-hydrologie.fr/) and INRAE to provide an technical environment for performing hydrological simulation with Smash. This library is preloaded with data (France only), comes with preconfigured setup, own some extra features such as the in-memory atmospheric data connector, has statistical and plot capabilities. Plot and stats functions can be used as a separate module with your own Smash model object."
21
+ readme = "README.md"
22
+ license-files = ["LICEN[CS]E*"]
23
+ keywords = ["hydro-smash", "smash", "statistics", "plot"]
24
+
25
+ [project.urls]
26
+ Homepage = "https://codeberg.org/maximejay/smashbox"
27
+ Issues = "https://codeberg.org/maximejay/smashbox/issues"
@@ -4,7 +4,7 @@ save_data_on_exit = True
4
4
  save_history = True
5
5
  save_non_project_files = False
6
6
  project_type = 'empty-project-type'
7
- recent_files = ['tutorial_report.py', 'init/smashbox.py', 'model/model.py', 'stats/mystats.py', 'init/multimodel_statistics.py', 'stats/stats.py', 'init/param.py', 'test.py', 'test_average_stats.py', 'test_mesh.r', 'test_mesh_from_graffas.py', 'init/__init__.py', 'plot/plot.py']
7
+ recent_files = ['tutorial_report.py', 'init/smashbox.py', 'model/model.py', 'stats/mystats.py', 'init/multimodel_statistics.py', 'stats/stats.py', 'init/param.py', 'test.py', 'test_average_stats.py', 'test_mesh.r', 'test_mesh_from_graffas.py', 'init/__init__.py', 'plot/plot.py', 'tutorial_python.py']
8
8
 
9
9
  [main]
10
10
  version = 0.2.0
@@ -4,7 +4,7 @@ save_data_on_exit = True
4
4
  save_history = True
5
5
  save_non_project_files = False
6
6
  project_type = 'empty-project-type'
7
- recent_files = ['tutorial_report.py', 'init/smashbox.py', 'model/model.py', 'stats/mystats.py', 'init/multimodel_statistics.py', 'stats/stats.py', 'init/param.py', 'test.py', 'test_average_stats.py', 'test_mesh.r', 'test_mesh_from_graffas.py', 'init/__init__.py', 'plot/plot.py']
7
+ recent_files = ['tutorial_report.py', 'init/smashbox.py', 'model/model.py', 'stats/mystats.py', 'init/multimodel_statistics.py', 'stats/stats.py', 'init/param.py', 'test.py', 'test_average_stats.py', 'test_mesh.r', 'test_mesh_from_graffas.py', 'init/__init__.py', 'plot/plot.py', 'tutorial_python.py', 'tools/tools.py', 'model/mesh.py']
8
8
 
9
9
  [main]
10
10
  version = 0.2.0
Binary file
@@ -393,7 +393,13 @@ class model:
393
393
  o_setup["read_prcp"] = True
394
394
  o_setup["read_pet"] = True
395
395
 
396
- self.optimize_model = self._model(setup=o_setup, mesh=self.mymesh.mesh)
396
+ # ~ if hasattr(self, "optimize_model") and self.optimize_model is not None:
397
+ # ~ previous_optimized_model_rr_parameters = self.optimize_model.rr_parameters.copy()
398
+
399
+ if not hasattr(self, "optimize_model") or self.optimize_model is None:
400
+ self.optimize_model = self._model(setup=o_setup, mesh=self.mymesh.mesh)
401
+ print(f"</> Getting parameters the default model `mysmashmodel` ...")
402
+ self.optimize_model.rr_parameters = self.mysmashmodel.rr_parameters.copy()
397
403
 
398
404
  default_cost_option = {"end_warmup": o_setup["start_time"], "gauge": "all"}
399
405
  if cost_options is not None:
@@ -662,7 +668,7 @@ class model:
662
668
  def import_parameters(self, model=None):
663
669
  """
664
670
  Import Geotiff parameter in Smash. This function wrap
665
- smash.io.import_parameters(). Path to the parameters is defined in
671
+ smash.io.read_grid_parameters(). Path to the parameters is defined in
666
672
  self._myparam.param.smash_parameters.
667
673
 
668
674
  Parameter
@@ -691,15 +697,15 @@ class model:
691
697
  if model is None:
692
698
  model = self.mysmashmodel
693
699
 
694
- smash.io.import_parameters(
700
+ smash.io.read_grid_parameters(
695
701
  model=model,
696
- path_to_parameters=self._myparam.param.smash_parameters,
702
+ path=self._myparam.param.smash_parameters,
697
703
  )
698
704
 
699
705
  def export_parameters(self, path: os.PathLike = "./output_smash_param"):
700
706
  """
701
707
  Export Geotiff Smash parameter as Geotiff. This function wrap
702
- smash.io.export_parameters().
708
+ smash.io.save_grid_parameters().
703
709
 
704
710
  Parameters
705
711
  ----------
@@ -4,20 +4,20 @@ if __name__ == "__main__":
4
4
 
5
5
  from smashbox import tools
6
6
 
7
- @tools.tools.autocast_args
8
- def test(
9
- a: int | None = None,
10
- b: None | int = None,
11
- c: int | None = 1,
12
- d: int = 2,
13
- e: None = None,
14
- f: None | dict | tuple = None,
15
- g=1,
16
- ):
7
+ # @tools.tools.autocast_args
8
+ # def test(
9
+ # a: int | None = None,
10
+ # b: None | int = None,
11
+ # c: int | None = 1,
12
+ # d: int = 2,
13
+ # e: None = None,
14
+ # f: None | dict | tuple = None,
15
+ # g=1,
16
+ # ):
17
17
 
18
- print(a, b, c, d, e)
18
+ # print(a, b, c, d, e)
19
19
 
20
- test(a=1.0, b=1.0, c=1.0, d=1.0, e=None, f=(2,), g=2)
20
+ # test(a=1.0, b=1.0, c=1.0, d=1.0, e=None, f=(2,), g=2)
21
21
 
22
22
  # Main object creation
23
23
  sb = smashbox.SmashBox()
@@ -29,20 +29,12 @@ if __name__ == "__main__":
29
29
  "outlets_database",
30
30
  "/home/maxime/DEV/smashbox/smashbox/asset/outlets/db_stations_example.csv",
31
31
  )
32
-
33
- sb.myparam.set_param(
34
- "outlets_database_fields",
35
- {"coord_x": "X_L93", "coord_y": "Y_L93", "area": "SURF", "id": "ID_HYDRO"},
36
- ) # change/update/set the value of the parameter 'outlets_database_fields'.
32
+ sb.myparam.set_param("outletsID", ["Y4604020"])
37
33
 
38
34
  sb.myparam.set_param(
39
35
  "smash_parameters", "/home/maxime/DEV/smashbox/smashbox/asset/params"
40
36
  ) # change the value of myparam used byRealCollobrier
41
37
 
42
- # Read/write param
43
- # sb.myparam.write_param("param.yaml") #write smashbox param
44
- sb.myparam.load_param("param.yaml") # load smashbox param
45
-
46
38
  # New model creation
47
39
  sb.newmodel(
48
40
  "RealCollobrier"
@@ -50,58 +42,62 @@ if __name__ == "__main__":
50
42
 
51
43
  # create an second model with different parameters
52
44
  sb.myparam.param.setup_file = "setup_rhax_gr5_dt3600.yaml"
53
- sb.myparam.set_param(
54
- "outlets_database_fields",
55
- {"coord_x": "X", "coord_y": "Y", "area": "area", "id": "Nom"},
56
- ) # change/update/set the value of the parameter 'outlets_database_fields'.
57
- sb.newmodel(
58
- "Lez"
59
- ) # create a new model named RealCollobrier and copy the previous parameters used for mymodel1 (default behaviour, but it can turned off)
60
-
61
- # Remove a model
62
- sb.delmodel("Lez")
63
45
 
64
46
  # Param associated to the model (hidden) has been copied
65
47
  sb.RealCollobrier._myparam.list_param() # Notice that myparam is also stored in each model object. So you can access to the model param inside the model attribute.
66
- sb.RealCollobrier._myparam.param.epsg
67
48
 
68
49
  # Setup utilities
69
50
  sb.RealCollobrier.mysetup.setup # print the setup to the screen
70
- # sb.RealCollobrier.mysetup.write_setup("setup.yaml") #Write the Smash setup
71
- sb.RealCollobrier.mysetup.load_setup("setup.yaml") # Read a custom Smash setup
72
51
  sb.RealCollobrier.mysetup.update_setup(
73
52
  {
74
53
  "hydrological_module": "gr4",
75
- "end_time": "2014-01-01 12:00",
54
+ "end_time": "2014-02-01 12:00",
76
55
  "start_time": "2014-01-01 01:00",
77
56
  "pet_directory": "/home/maxime/DATA/ETP-SFR-FRA-INTERA_L93",
78
57
  "prcp_directory": "/home/maxime/DATA/PLUIE",
79
- "qobs_directory": "/home/maxime/DATA/QOBS",
58
+ "qobs_directory": "/home/maxime/DATA/QOBS_60min",
80
59
  }
81
60
  ) # Change value of the Smash setup
82
61
  sb.RealCollobrier.mysetup.setup # print the setup to the screen
83
62
 
84
- # Mesh utilities (hidden)
85
- sb.RealCollobrier.mymesh.mesh # print the mesh to the screen
86
- sb.RealCollobrier.mymesh.make_mesh(
87
- sb.RealCollobrier._myparam.param
88
- ) # Undirect method to build mesh, depend on myparam (unrecomended)
89
- sb.RealCollobrier.mymesh.mesh
90
- sb.RealCollobrier.mymesh.write_mesh("mesh.hdf5")
91
- sb.RealCollobrier.mymesh.load_mesh("mesh.hdf5")
92
- sb.RealCollobrier.mymesh.mesh # print the mesh to the screen
93
-
94
- # Model utilities
95
- sb.RealCollobrier.make_mesh() # direct method to build the mesh (recommended)
96
- sb.RealCollobrier.build_model() # build the model with smash.Model()
97
- sb.RealCollobrier.load_smashparam() # extract the smash parameter from a parameters set and fill the attribute mysmashparameter
98
- sb.RealCollobrier.write_smashparam(
99
- "smashparam.hdf5"
100
- ) # write the extracted parameter in an hdf5 database
101
- sb.RealCollobrier.write_smashparam_to_geotiff("geotiff_smashparam")
102
- sb.RealCollobrier.make_model(
103
- run=True
104
- ) # direct build, extract param and run (default is True). Use option run=False to only build the model and extract parameter
63
+ sb.RealCollobrier.generate_mesh() # direct method to build the mesh (recommended)
64
+
65
+ sb.RealCollobrier.model()
66
+
67
+ sb.RealCollobrier.mysmashmodel.set_rr_parameters("cp", 500.0)
68
+ sb.RealCollobrier.mysmashmodel.set_rr_parameters("ct", 200.0)
69
+ sb.RealCollobrier.mysmashmodel.set_rr_parameters("llr", 50.0)
70
+ sb.RealCollobrier.mysmashmodel.set_rr_parameters("kexc", 0.0)
71
+
72
+ sb.RealCollobrier.optimize(
73
+ cost_options={"end_warmup": "2014-01-10 01:00", "gauge": "all"},
74
+ mapping="uniform",
75
+ optimizer="sbs",
76
+ optimize_options={
77
+ "bounds": {
78
+ "cp": [1, 1000],
79
+ "ct": [1, 1000],
80
+ "kexc": [-50, 50],
81
+ "llr": [1, 1000],
82
+ },
83
+ "termination_crit": {"maxiter": 10},
84
+ },
85
+ )
86
+
87
+ sb.RealCollobrier.optimize(
88
+ cost_options={"end_warmup": "2014-01-10 01:00", "gauge": "all"},
89
+ mapping="distributed",
90
+ optimizer="lbfgsb",
91
+ optimize_options={
92
+ "bounds": {
93
+ "cp": [1, 1000],
94
+ "ct": [1, 1000],
95
+ "kexc": [-50, 50],
96
+ "llr": [1, 1000],
97
+ },
98
+ "termination_crit": {"maxiter": 10},
99
+ },
100
+ )
105
101
 
106
102
  # Stat utilities
107
103
 
@@ -230,7 +230,7 @@ def check_asset_path(asset_dir: str = "", path: None | os.PathLike = None):
230
230
  if len(matched_file) == 0:
231
231
  raise ValueError(
232
232
  f"'{path}' is not a valid {asset_dir} filename."
233
- "Choice are: {os.listdir(mypath)}"
233
+ f"Choice are: {os.listdir(mypath)}"
234
234
  )
235
235
  else:
236
236
  path = matched_file[0]
@@ -1,16 +0,0 @@
1
- Bonjour,
2
-
3
- Je vous présente la librairie Python "SmashBox" (anciennement "EasySmash", présenté à la dernière réunion d'équipe). L'objectif de SmashBox est de fournir un environnement de travail simplifié pour Smash afin de gérer des pré et post traitements (maillage, calculs de statistique et réalisation de graphique). Smashbox intègre des données prêtes à l’emploi (base de données d'exutoires, direction d'écoulement 1km², paramètres issus de la régio nationale de Julie) et des setup pré-configurés pour fonctionner sur les serveurs Rhax.
4
- L'idée derrière ce module, est de simplifier certaines opérations courantes réalisées avec Smash (telle que les REX), fournir des interface vers d'autres outils de calcul (SCHYPRE-Graffas) et de mutualiser progressivement les outils de post-traitements (graphiques, statistiques, etc...).
5
-
6
- Le code est disponible ici: https://codeberg.org/maximejay/smashbox et la documentation est là: https://maximejay.codeberg.page/smashbox.html
7
-
8
- Les contributions, rapport de bug, idées, tests en tout genre sont les bienvenus :) Je vous laisse découvrir l'outil via la documentation. Il y a une petite rubrique "tutorial" un peu caché tout en bas à gauche dans le sommaire qui pourrait vous servir. N'hésitez pas à me contacter si vous souhaitez tester cette librairie et si vous avez des questions !
9
-
10
- A bientôt
11
-
12
- Maxime
13
-
14
-
15
-
16
-
@@ -1,27 +0,0 @@
1
- [build-system]
2
- requires = ["hatchling >= 1.26"]
3
- build-backend = "hatchling.build"
4
-
5
- [project]
6
- name = "smashbox"
7
- version = "1.0"
8
- authors = [
9
- { name="Maxime Jay-Allemand", email="maxime.jay.allemand@hydris-hydrologie.fr" },
10
- ]
11
- dependencies = [
12
- "pyhdf5_handler",
13
- "hydro-smash",
14
- "matplotlib",
15
- "mpld3",
16
- "pdoc",
17
- "rich",
18
- "pyhdf5_handler",
19
- ]
20
- description = "A python library developed by Hydris-hydrologie (https://www.hydris-hydrologie.fr/) to provide an technical environment for performing hydrological simulation with Smash. This library is preloaded with data (France only), comes with preconfigured setup, own some extra features such as the in-memory atmospheric data connector, has statistical and plot capabilities. Plot and stats functions can be used as a separate module with your own Smash model object."
21
- readme = "README.md"
22
- license-files = ["LICEN[CS]E*"]
23
- keywords = ["hydro-smash", "smash", "statistics", "plot"]
24
-
25
- [project.urls]
26
- Homepage = "https://codeberg.org/maximejay/easysmash"
27
- Issues = "https://codeberg.org/maximejay/easysmash/issues"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes