smashbox 1.0__py2.py3-none-any.whl

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 (73) hide show
  1. smashbox/.spyproject/config/backups/codestyle.ini.bak +8 -0
  2. smashbox/.spyproject/config/backups/encoding.ini.bak +6 -0
  3. smashbox/.spyproject/config/backups/vcs.ini.bak +7 -0
  4. smashbox/.spyproject/config/backups/workspace.ini.bak +12 -0
  5. smashbox/.spyproject/config/codestyle.ini +8 -0
  6. smashbox/.spyproject/config/defaults/defaults-codestyle-0.2.0.ini +5 -0
  7. smashbox/.spyproject/config/defaults/defaults-encoding-0.2.0.ini +3 -0
  8. smashbox/.spyproject/config/defaults/defaults-vcs-0.2.0.ini +4 -0
  9. smashbox/.spyproject/config/defaults/defaults-workspace-0.2.0.ini +6 -0
  10. smashbox/.spyproject/config/encoding.ini +6 -0
  11. smashbox/.spyproject/config/vcs.ini +7 -0
  12. smashbox/.spyproject/config/workspace.ini +12 -0
  13. smashbox/__init__.py +8 -0
  14. smashbox/asset/flwdir/flowdir_fr_1000m.tif +0 -0
  15. smashbox/asset/outlets/.Rhistory +0 -0
  16. smashbox/asset/outlets/db_bnbv_fr.csv +142704 -0
  17. smashbox/asset/outlets/db_bnbv_light.csv +42084 -0
  18. smashbox/asset/outlets/db_sites.csv +8700 -0
  19. smashbox/asset/outlets/db_stations.csv +2916 -0
  20. smashbox/asset/outlets/db_stations_example.csv +19 -0
  21. smashbox/asset/outlets/edit_database.py +185 -0
  22. smashbox/asset/outlets/readme.txt +5 -0
  23. smashbox/asset/params/ci.tif +0 -0
  24. smashbox/asset/params/cp.tif +0 -0
  25. smashbox/asset/params/ct.tif +0 -0
  26. smashbox/asset/params/kexc.tif +0 -0
  27. smashbox/asset/params/kmlt.tif +0 -0
  28. smashbox/asset/params/llr.tif +0 -0
  29. smashbox/asset/setup/setup_rhax_gr4_dt3600.yaml +15 -0
  30. smashbox/asset/setup/setup_rhax_gr4_dt900.yaml +15 -0
  31. smashbox/asset/setup/setup_rhax_gr5_dt3600.yaml +15 -0
  32. smashbox/asset/setup/setup_rhax_gr5_dt900.yaml +15 -0
  33. smashbox/init/README.md +3 -0
  34. smashbox/init/__init__.py +3 -0
  35. smashbox/init/multimodel_statistics.py +405 -0
  36. smashbox/init/param.py +799 -0
  37. smashbox/init/smashbox.py +186 -0
  38. smashbox/model/__init__.py +1 -0
  39. smashbox/model/atmos_data_connector.py +518 -0
  40. smashbox/model/mesh.py +185 -0
  41. smashbox/model/model.py +829 -0
  42. smashbox/model/setup.py +109 -0
  43. smashbox/plot/__init__.py +1 -0
  44. smashbox/plot/myplot.py +1133 -0
  45. smashbox/plot/plot.py +1662 -0
  46. smashbox/read_inputdata/__init__.py +1 -0
  47. smashbox/read_inputdata/read_data.py +1229 -0
  48. smashbox/read_inputdata/smashmodel.py +395 -0
  49. smashbox/stats/__init__.py +1 -0
  50. smashbox/stats/mystats.py +1632 -0
  51. smashbox/stats/stats.py +2022 -0
  52. smashbox/test.py +532 -0
  53. smashbox/test_average_stats.py +122 -0
  54. smashbox/test_mesh.r +8 -0
  55. smashbox/test_mesh_from_graffas.py +69 -0
  56. smashbox/tools/__init__.py +1 -0
  57. smashbox/tools/geo_toolbox.py +1028 -0
  58. smashbox/tools/tools.py +461 -0
  59. smashbox/tutorial_R.r +182 -0
  60. smashbox/tutorial_R_graffas.r +88 -0
  61. smashbox/tutorial_R_graffas_local.r +33 -0
  62. smashbox/tutorial_python.py +102 -0
  63. smashbox/tutorial_readme.py +261 -0
  64. smashbox/tutorial_report.py +58 -0
  65. smashbox/tutorials/Python_tutorial.md +124 -0
  66. smashbox/tutorials/R_Graffas_tutorial.md +153 -0
  67. smashbox/tutorials/R_tutorial.md +121 -0
  68. smashbox/tutorials/__init__.py +6 -0
  69. smashbox/tutorials/generate_doc.md +7 -0
  70. smashbox-1.0.dist-info/METADATA +998 -0
  71. smashbox-1.0.dist-info/RECORD +73 -0
  72. smashbox-1.0.dist-info/WHEEL +5 -0
  73. smashbox-1.0.dist-info/licenses/LICENSE +100 -0
@@ -0,0 +1,19 @@
1
+ CODE_BNBV,CODE_HYDRO,CODE_SITE,ID_BNBV,X_L93,Y_L93,SURF
2
+ ME528,Y4122020,Y4122020,MedEst_528,874112.5,6269112.5,691.6
3
+ ME617,Y6204020,ME617,MedEst_617,1013712.5,6358262.5,167.7
4
+ ME635,Y6224020,Y6224020,MedEst_635,1027612.5,6344962.5,449.8
5
+ ME638,Y6224010,Y6224010,MedEst_638,1028612.5,6340262.5,480.5
6
+ ME655,Y6234020,Y6234020,MedEst_655,1034262.5,6324262.5,704.9
7
+ ME656,Y6234010,ME656,MedEst_656,1034862.5,6324012.5,705.7
8
+ ME672,Y4624010,Y4624010,MedEst_672,956312.5,6232662.5,534.3
9
+ ME684,Y4515420,Y4515420,MedEst_684,930812.5,6229162.5,89.1
10
+ ME696,Y5424010,Y5424010,MedEst_696,987062.5,6246112.5,66.1
11
+ ME700,Y5444010,Y5444010,MedEst_700,988512.5,6245962.5,195.3
12
+ ME710,Y4414015,Y4414015,MedEst_710,918862.5,6257212.5,55.5
13
+ ME722,Y4414020,ME722,MedEst_722,911412.5,6253912.5,164.6
14
+ ME723,Y4414030,Y4414030,MedEst_723,911262.5,6253662.5,164.7
15
+ ME741,Y4002010,Y4002010,MedEst_741,920712.5,6269162.5,49.8
16
+ ME756,Y4105210,ME756,MedEst_756,908062.5,6275862.5,28.6
17
+ ME785,Y4604020,Y4604020,MedEst_785,947062.5,6237362.5,186.9
18
+ ME835,Y5106610,Y5106610,MedEst_835,960912.5,6265812.5,235.3
19
+ ME868,Y5032010,Y5032010,MedEst_868,944812.5,6271462.5,506.8
@@ -0,0 +1,185 @@
1
+ import pandas as pd
2
+
3
+ coorespondance = (
4
+ "/home/maxime/DEV/smashbox/smashbox/asset/outlets/corresp_BNBV_HYDRO_valide.csv"
5
+ )
6
+ database = "/home/maxime/DEV/smashbox/smashbox/asset/outlets/db_bnbv_light.csv"
7
+
8
+ pd_coorespondance = pd.read_csv(coorespondance, sep=";")
9
+ pd_database = pd.read_csv(database)
10
+
11
+ for i in range(len(pd_coorespondance)):
12
+ index = pd_database[pd_database["CODE"] == pd_coorespondance["code_BNBV"][i]].index
13
+ if len(index) > 0:
14
+ pd_database.loc[index, "CODE_HYDRO_BNBV"] = pd_coorespondance["code_hydro"][i]
15
+
16
+
17
+ pd_database.loc[pd.isna(pd_database["CODE_HYDRO_BNBV"]), "CODE_HYDRO_BNBV"] = (
18
+ pd_database.loc[pd.isna(pd_database["CODE_HYDRO_BNBV"]), "ID_BNBV"]
19
+ )
20
+
21
+
22
+ pd_database.to_csv(
23
+ "/home/maxime/DEV/smashbox/smashbox/asset/outlets/db_bnbv_light_2.csv",
24
+ sep=",",
25
+ index=False,
26
+ columns=["CODE", "CODE_HYDRO_BNBV", "ID_BNBV", "X_L93", "Y_L93", "SURF"],
27
+ )
28
+
29
+
30
+ import pandas as pd
31
+
32
+ coorespondance = (
33
+ "/home/maxime/DEV/smashbox/smashbox/asset/outlets/corresp_BNBV_HYDRO_valide.csv"
34
+ )
35
+ database = "/home/maxime/DEV/smashbox/smashbox/asset/outlets/db_bnbv_fr.csv"
36
+
37
+ pd_coorespondance = pd.read_csv(coorespondance, sep=";")
38
+ pd_database = pd.read_csv(database)
39
+
40
+ for i in range(len(pd_coorespondance)):
41
+ index = pd_database[pd_database["CODE"] == pd_coorespondance["code_BNBV"][i]].index
42
+ if len(index) > 0:
43
+ pd_database.loc[index, "CODE_HYDRO_BNBV"] = pd_coorespondance["code_hydro"][i]
44
+
45
+
46
+ pd_database.loc[pd.isna(pd_database["CODE_HYDRO_BNBV"]), "CODE_HYDRO_BNBV"] = (
47
+ pd_database.loc[pd.isna(pd_database["CODE_HYDRO_BNBV"]), "CODE"]
48
+ )
49
+
50
+
51
+ pd_database.to_csv(
52
+ "/home/maxime/DEV/smashbox/smashbox/asset/outlets/db_bnbv_fr_2.csv",
53
+ sep=",",
54
+ index=False,
55
+ columns=["CODE", "CODE_HYDRO_BNBV", "ID_BNBV", "X_L93", "Y_L93", "SURF"],
56
+ )
57
+
58
+
59
+ import pandas as pd
60
+
61
+ coorespondance = "/home/maxime/DEV/smashbox/smashbox/asset/outlets/db_sites.csv"
62
+ database = "/home/maxime/DEV/smashbox/smashbox/asset/outlets/db_stations.csv"
63
+
64
+ pd_coorespondance = pd.read_csv(coorespondance, sep=",", on_bad_lines="warn")
65
+ pd_database = pd.read_csv(database)
66
+
67
+ for i in range(len(pd_database)):
68
+ index = pd_coorespondance[pd_coorespondance["ID_EX"] == pd_database["CODE"][i]].index
69
+
70
+ if len(index) > 0:
71
+ # pd_database.loc[i, "CODE_HYDRO"] = pd_coorespondance["CODE"][index]
72
+ pd_database.loc[i, "CODE_SITE"] = pd_coorespondance["CODE"][index].values[0]
73
+
74
+
75
+ pd_database.loc[pd.isna(pd_database["CODE_HYDRO"]), "CODE_HYDRO"] = pd_database.loc[
76
+ pd.isna(pd_database["CODE_HYDRO"]), "CODE"
77
+ ]
78
+
79
+
80
+ pd_database.loc[pd.isna(pd_database["CODE_SITE"]), "CODE_SITE"] = pd_database.loc[
81
+ pd.isna(pd_database["CODE_SITE"]), "CODE"
82
+ ]
83
+
84
+
85
+ pd_database.to_csv(
86
+ "/home/maxime/DEV/smashbox/smashbox/asset/outlets/db_stations_2.csv",
87
+ sep=",",
88
+ index=False,
89
+ columns=["CODE", "CODE_HYDRO", "CODE_SITE", "ID_EX", "X_L93", "Y_L93", "SURF"],
90
+ )
91
+
92
+
93
+ import pandas as pd
94
+
95
+ coorespondance = "/home/maxime/DEV/smashbox/smashbox/asset/outlets/db_sites.csv"
96
+ database = "/home/maxime/DEV/smashbox/smashbox/asset/outlets/db_bnbv_light.csv"
97
+
98
+ pd_coorespondance = pd.read_csv(coorespondance, sep=",", on_bad_lines="warn")
99
+ pd_database = pd.read_csv(database)
100
+
101
+ for i in range(len(pd_database)):
102
+ index = pd_coorespondance[
103
+ pd_coorespondance["CODE_BNBV"] == pd_database["CODE"][i]
104
+ ].index
105
+
106
+ if len(index) > 0:
107
+ # pd_database.loc[i, "CODE_HYDRO"] = pd_coorespondance["CODE"][index]
108
+ pd_database.loc[i, "CODE_SITE"] = pd_coorespondance["CODE_SITE"][index].values[0]
109
+
110
+
111
+ pd_database.loc[pd.isna(pd_database["CODE_SITE"]), "CODE_SITE"] = pd_database.loc[
112
+ pd.isna(pd_database["CODE_SITE"]), "CODE_HYDRO"
113
+ ]
114
+
115
+
116
+ pd_database.to_csv(
117
+ "/home/maxime/DEV/smashbox/smashbox/asset/outlets/db_bnbv_lignt_2.csv",
118
+ sep=",",
119
+ index=False,
120
+ columns=["CODE", "CODE_HYDRO", "CODE_SITE", "ID_BNBV", "X_L93", "Y_L93", "SURF"],
121
+ )
122
+
123
+
124
+ import pandas as pd
125
+
126
+ coorespondance = "/home/maxime/DEV/smashbox/smashbox/asset/outlets/db_sites.csv"
127
+ database = "/home/maxime/DEV/smashbox/smashbox/asset/outlets/db_bnbv_fr.csv"
128
+
129
+ pd_coorespondance = pd.read_csv(coorespondance, sep=",", on_bad_lines="warn")
130
+ pd_database = pd.read_csv(database)
131
+
132
+ for i in range(len(pd_database)):
133
+ index = pd_coorespondance[
134
+ pd_coorespondance["CODE_BNBV"] == pd_database["CODE_BNBV"][i]
135
+ ].index
136
+
137
+ if len(index) > 0:
138
+ pd_database.loc[i, "CODE_SITE"] = pd_coorespondance["CODE_SITE"][index].values[0]
139
+
140
+
141
+ pd_database.loc[pd.isna(pd_database["CODE_SITE"]), "CODE_SITE"] = pd_database.loc[
142
+ pd.isna(pd_database["CODE_SITE"]), "CODE_HYDRO"
143
+ ]
144
+
145
+
146
+ pd_database.to_csv(
147
+ "/home/maxime/DEV/smashbox/smashbox/asset/outlets/db_bnbv_fr_2.csv",
148
+ sep=",",
149
+ index=False,
150
+ columns=["CODE_BNBV", "CODE_HYDRO", "CODE_SITE", "ID_BNBV", "X_L93", "Y_L93", "SURF"],
151
+ )
152
+
153
+
154
+ import pandas as pd
155
+
156
+ coorespondance = "/home/maxime/DEV/smashbox/smashbox/asset/outlets/db_bnbv_fr.csv"
157
+ database = "/home/maxime/DEV/smashbox/smashbox/asset/outlets/db_bnbv_light.csv"
158
+
159
+ pd_coorespondance = pd.read_csv(coorespondance)
160
+ pd_database = pd.read_csv(database)
161
+
162
+ for i in range(len(pd_database)):
163
+ index = pd_coorespondance[
164
+ pd_database["CODE_HYDRO"][i] == pd_coorespondance["ID_BNBV"]
165
+ ].index
166
+
167
+ if len(index) > 0:
168
+ pd_database.loc[i, "CODE_HYDRO"] = pd_coorespondance["CODE_BNBV"][index].values[0]
169
+
170
+
171
+ for i in range(len(pd_database)):
172
+ index = pd_coorespondance[
173
+ pd_database["CODE_SITE"][i] == pd_coorespondance["ID_BNBV"]
174
+ ].index
175
+
176
+ if len(index) > 0:
177
+ pd_database.loc[i, "CODE_SITE"] = pd_coorespondance["CODE_BNBV"][index].values[0]
178
+
179
+
180
+ pd_database.to_csv(
181
+ "/home/maxime/DEV/smashbox/smashbox/asset/outlets/db_bnbv_lignt_2.csv",
182
+ sep=",",
183
+ index=False,
184
+ columns=["CODE_BNBV", "CODE_HYDRO", "CODE_SITE", "ID_BNBV", "X_L93", "Y_L93", "SURF"],
185
+ )
@@ -0,0 +1,5 @@
1
+ Les shapefile complémentaires sont localisés ici:
2
+ Pour la BNBV:
3
+ /nas/RHAX/UTILISATEURS/julie.demargne/SMASHchopin/REGIO/DATA/BNBV/BNBVlight/BNBV_light_bassins.shp
4
+ Pour les sites hydrométriques:
5
+ /nas/RHAX/UTILISATEURS/julie.demargne/SMASHchopin/REGIO/DATA/BNBV/Hydro_Bassins.shp
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,15 @@
1
+ adjust_interception: false
2
+ daily_interannual_pet: true
3
+ dt: 3600
4
+ end_time: 2014-02-01 00:00
5
+ snow_module: ssn
6
+ hydrological_module: gr4
7
+ pet_directory: /nas/RHAX/DONNEES/ETP/GRILLES/ETP-SFR-FRA-INTERA_L93/
8
+ prcp_conversion_factor: 0.1
9
+ prcp_directory: /nas/RHAX/DONNEES/PLUIE/SPATIAL/COMEP/L93_1km/60M/
10
+ qobs_directory: '/nas/RHAX/DONNEES/DEBITS/Extraction_sites_SCHAPI_20250226/QTVAR_to_QM/QM_60M/'
11
+ read_pet: true
12
+ read_prcp: true
13
+ read_qobs: true
14
+ routing_module: lr
15
+ start_time: 2014-01-01 00:00
@@ -0,0 +1,15 @@
1
+ adjust_interception: false
2
+ daily_interannual_pet: true
3
+ dt: 900
4
+ end_time: 2014-02-01 00:00
5
+ snow_module: ssn
6
+ hydrological_module: gr4
7
+ pet_directory: /nas/RHAX/DONNEES/ETP/GRILLES/ETP-SFR-FRA-INTERA_L93/
8
+ prcp_conversion_factor: 0.1
9
+ prcp_directory: /nas/RHAX/DONNEES/PLUIE/SPATIAL/COMEP/L93_1km/15M/
10
+ qobs_directory: '/nas/RHAX/DONNEES/DEBITS/Extraction_sites_SCHAPI_20250226/QTVAR_to_QM/QM_15M/'
11
+ read_pet: true
12
+ read_prcp: true
13
+ read_qobs: true
14
+ routing_module: lr
15
+ start_time: 2014-01-01 00:00
@@ -0,0 +1,15 @@
1
+ adjust_interception: false
2
+ daily_interannual_pet: true
3
+ dt: 3600
4
+ end_time: 2014-02-01 00:00
5
+ snow_module: ssn
6
+ hydrological_module: gr5
7
+ pet_directory: /nas/RHAX/DONNEES/ETP/GRILLES/ETP-SFR-FRA-INTERA_L93/
8
+ prcp_conversion_factor: 0.1
9
+ prcp_directory: /nas/RHAX/DONNEES/PLUIE/SPATIAL/COMEP/L93_1km/60M/
10
+ qobs_directory: '/nas/RHAX/DONNEES/DEBITS/Extraction_sites_SCHAPI_20250226/QTVAR_to_QM/QM_60M/'
11
+ read_pet: true
12
+ read_prcp: true
13
+ read_qobs: true
14
+ routing_module: lr
15
+ start_time: 2014-01-01 00:00
@@ -0,0 +1,15 @@
1
+ adjust_interception: false
2
+ daily_interannual_pet: true
3
+ dt: 900
4
+ end_time: 2014-02-01 00:00
5
+ snow_module: ssn
6
+ hydrological_module: gr5
7
+ pet_directory: /nas/RHAX/DONNEES/ETP/GRILLES/ETP-SFR-FRA-INTERA_L93/
8
+ prcp_conversion_factor: 0.1
9
+ prcp_directory: /nas/RHAX/DONNEES/PLUIE/SPATIAL/COMEP/L93_1km/15M/
10
+ qobs_directory: '/nas/RHAX/DONNEES/DEBITS/Extraction_sites_SCHAPI_20250226/QTVAR_to_QM/QM_15M/'
11
+ read_pet: true
12
+ read_prcp: true
13
+ read_qobs: true
14
+ routing_module: lr
15
+ start_time: 2014-01-01 00:00
@@ -0,0 +1,3 @@
1
+ # Module init
2
+
3
+ The "init" module contains functions and class for handle the SmashBox parameters, the model containers (creation, suppression, copy) and the multi-model statistics. This module is loaded at the root of the SmashBox module.
@@ -0,0 +1,3 @@
1
+ """
2
+ .. include:: ./README.md
3
+ """