vortex-nwp 2.0.0__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 (144) hide show
  1. vortex/__init__.py +159 -0
  2. vortex/algo/__init__.py +13 -0
  3. vortex/algo/components.py +2462 -0
  4. vortex/algo/mpitools.py +1953 -0
  5. vortex/algo/mpitools_templates/__init__.py +1 -0
  6. vortex/algo/mpitools_templates/envelope_wrapper_default.tpl +27 -0
  7. vortex/algo/mpitools_templates/envelope_wrapper_mpiauto.tpl +29 -0
  8. vortex/algo/mpitools_templates/wrapstd_wrapper_default.tpl +18 -0
  9. vortex/algo/serversynctools.py +171 -0
  10. vortex/config.py +112 -0
  11. vortex/data/__init__.py +19 -0
  12. vortex/data/abstractstores.py +1510 -0
  13. vortex/data/containers.py +835 -0
  14. vortex/data/contents.py +622 -0
  15. vortex/data/executables.py +275 -0
  16. vortex/data/flow.py +119 -0
  17. vortex/data/geometries.ini +2689 -0
  18. vortex/data/geometries.py +799 -0
  19. vortex/data/handlers.py +1230 -0
  20. vortex/data/outflow.py +67 -0
  21. vortex/data/providers.py +487 -0
  22. vortex/data/resources.py +207 -0
  23. vortex/data/stores.py +1390 -0
  24. vortex/data/sync_templates/__init__.py +0 -0
  25. vortex/gloves.py +309 -0
  26. vortex/layout/__init__.py +20 -0
  27. vortex/layout/contexts.py +577 -0
  28. vortex/layout/dataflow.py +1220 -0
  29. vortex/layout/monitor.py +969 -0
  30. vortex/nwp/__init__.py +14 -0
  31. vortex/nwp/algo/__init__.py +21 -0
  32. vortex/nwp/algo/assim.py +537 -0
  33. vortex/nwp/algo/clim.py +1086 -0
  34. vortex/nwp/algo/coupling.py +831 -0
  35. vortex/nwp/algo/eda.py +840 -0
  36. vortex/nwp/algo/eps.py +785 -0
  37. vortex/nwp/algo/forecasts.py +886 -0
  38. vortex/nwp/algo/fpserver.py +1303 -0
  39. vortex/nwp/algo/ifsnaming.py +463 -0
  40. vortex/nwp/algo/ifsroot.py +404 -0
  41. vortex/nwp/algo/monitoring.py +263 -0
  42. vortex/nwp/algo/mpitools.py +694 -0
  43. vortex/nwp/algo/odbtools.py +1258 -0
  44. vortex/nwp/algo/oopsroot.py +916 -0
  45. vortex/nwp/algo/oopstests.py +220 -0
  46. vortex/nwp/algo/request.py +660 -0
  47. vortex/nwp/algo/stdpost.py +1641 -0
  48. vortex/nwp/data/__init__.py +30 -0
  49. vortex/nwp/data/assim.py +380 -0
  50. vortex/nwp/data/boundaries.py +314 -0
  51. vortex/nwp/data/climfiles.py +521 -0
  52. vortex/nwp/data/configfiles.py +153 -0
  53. vortex/nwp/data/consts.py +954 -0
  54. vortex/nwp/data/ctpini.py +149 -0
  55. vortex/nwp/data/diagnostics.py +209 -0
  56. vortex/nwp/data/eda.py +147 -0
  57. vortex/nwp/data/eps.py +432 -0
  58. vortex/nwp/data/executables.py +1045 -0
  59. vortex/nwp/data/fields.py +111 -0
  60. vortex/nwp/data/gridfiles.py +380 -0
  61. vortex/nwp/data/logs.py +584 -0
  62. vortex/nwp/data/modelstates.py +363 -0
  63. vortex/nwp/data/monitoring.py +193 -0
  64. vortex/nwp/data/namelists.py +696 -0
  65. vortex/nwp/data/obs.py +840 -0
  66. vortex/nwp/data/oopsexec.py +74 -0
  67. vortex/nwp/data/providers.py +207 -0
  68. vortex/nwp/data/query.py +206 -0
  69. vortex/nwp/data/stores.py +160 -0
  70. vortex/nwp/data/surfex.py +337 -0
  71. vortex/nwp/syntax/__init__.py +9 -0
  72. vortex/nwp/syntax/stdattrs.py +437 -0
  73. vortex/nwp/tools/__init__.py +10 -0
  74. vortex/nwp/tools/addons.py +40 -0
  75. vortex/nwp/tools/agt.py +67 -0
  76. vortex/nwp/tools/bdap.py +59 -0
  77. vortex/nwp/tools/bdcp.py +41 -0
  78. vortex/nwp/tools/bdm.py +24 -0
  79. vortex/nwp/tools/bdmp.py +54 -0
  80. vortex/nwp/tools/conftools.py +1661 -0
  81. vortex/nwp/tools/drhook.py +66 -0
  82. vortex/nwp/tools/grib.py +294 -0
  83. vortex/nwp/tools/gribdiff.py +104 -0
  84. vortex/nwp/tools/ifstools.py +203 -0
  85. vortex/nwp/tools/igastuff.py +273 -0
  86. vortex/nwp/tools/mars.py +68 -0
  87. vortex/nwp/tools/odb.py +657 -0
  88. vortex/nwp/tools/partitioning.py +258 -0
  89. vortex/nwp/tools/satrad.py +71 -0
  90. vortex/nwp/util/__init__.py +6 -0
  91. vortex/nwp/util/async.py +212 -0
  92. vortex/nwp/util/beacon.py +40 -0
  93. vortex/nwp/util/diffpygram.py +447 -0
  94. vortex/nwp/util/ens.py +279 -0
  95. vortex/nwp/util/hooks.py +139 -0
  96. vortex/nwp/util/taskdeco.py +85 -0
  97. vortex/nwp/util/usepygram.py +697 -0
  98. vortex/nwp/util/usetnt.py +101 -0
  99. vortex/proxy.py +6 -0
  100. vortex/sessions.py +374 -0
  101. vortex/syntax/__init__.py +9 -0
  102. vortex/syntax/stdattrs.py +867 -0
  103. vortex/syntax/stddeco.py +185 -0
  104. vortex/toolbox.py +1117 -0
  105. vortex/tools/__init__.py +20 -0
  106. vortex/tools/actions.py +523 -0
  107. vortex/tools/addons.py +316 -0
  108. vortex/tools/arm.py +96 -0
  109. vortex/tools/compression.py +325 -0
  110. vortex/tools/date.py +27 -0
  111. vortex/tools/ddhpack.py +10 -0
  112. vortex/tools/delayedactions.py +782 -0
  113. vortex/tools/env.py +541 -0
  114. vortex/tools/folder.py +834 -0
  115. vortex/tools/grib.py +738 -0
  116. vortex/tools/lfi.py +953 -0
  117. vortex/tools/listings.py +423 -0
  118. vortex/tools/names.py +637 -0
  119. vortex/tools/net.py +2124 -0
  120. vortex/tools/odb.py +10 -0
  121. vortex/tools/parallelism.py +368 -0
  122. vortex/tools/prestaging.py +210 -0
  123. vortex/tools/rawfiles.py +10 -0
  124. vortex/tools/schedulers.py +480 -0
  125. vortex/tools/services.py +940 -0
  126. vortex/tools/storage.py +996 -0
  127. vortex/tools/surfex.py +61 -0
  128. vortex/tools/systems.py +3976 -0
  129. vortex/tools/targets.py +440 -0
  130. vortex/util/__init__.py +9 -0
  131. vortex/util/config.py +1122 -0
  132. vortex/util/empty.py +24 -0
  133. vortex/util/helpers.py +216 -0
  134. vortex/util/introspection.py +69 -0
  135. vortex/util/iosponge.py +80 -0
  136. vortex/util/roles.py +49 -0
  137. vortex/util/storefunctions.py +129 -0
  138. vortex/util/structs.py +26 -0
  139. vortex/util/worker.py +162 -0
  140. vortex_nwp-2.0.0.dist-info/METADATA +67 -0
  141. vortex_nwp-2.0.0.dist-info/RECORD +144 -0
  142. vortex_nwp-2.0.0.dist-info/WHEEL +5 -0
  143. vortex_nwp-2.0.0.dist-info/licenses/LICENSE +517 -0
  144. vortex_nwp-2.0.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,337 @@
1
+ """
2
+ Various resources to handle climatology files used in the Surfex model.
3
+ """
4
+
5
+ from vortex.data.outflow import ModelGeoResource
6
+ from vortex.syntax.stddeco import namebuilding_delete
7
+ from ..syntax.stdattrs import gvar
8
+
9
+ #: No automatic export
10
+ __all__ = []
11
+
12
+
13
+ @namebuilding_delete("src")
14
+ class PGDRaw(ModelGeoResource):
15
+ """
16
+ SURFEX climatological resource.
17
+ A Genvkey can be provided.
18
+
19
+ :note: OBSOLETE classes do not use.
20
+ """
21
+
22
+ _abstract = True
23
+ _footprint = [
24
+ gvar,
25
+ dict(
26
+ info="Surfex climatological file",
27
+ attr=dict(
28
+ gvar=dict(
29
+ default="pgd_[nativefmt]",
30
+ ),
31
+ ),
32
+ ),
33
+ ]
34
+ _extension_remap = dict(netcdf="nc")
35
+
36
+ @property
37
+ def realkind(self):
38
+ return "pgd"
39
+
40
+ def olive_basename(self):
41
+ """OLIVE specific naming convention."""
42
+ return "PGDFILE-" + self.geometry.area + "." + self.nativefmt
43
+
44
+ def namebuilding_info(self):
45
+ nbi = super().namebuilding_info()
46
+ nbi.update(
47
+ # will work only with the @cen namebuilder:
48
+ cen_rawbasename=(
49
+ "PGD_"
50
+ + self.geometry.area
51
+ + "."
52
+ + self._extension_remap.get(self.nativefmt, self.nativefmt)
53
+ )
54
+ # With the standard provider, the usual keys will be used...
55
+ )
56
+ return nbi
57
+
58
+
59
+ class PGDLFI(PGDRaw):
60
+ """
61
+ SURFEX climatological resource in lfi format.
62
+ A Genvkey can be provided.
63
+
64
+ :note: OBSOLETE classes do not use.
65
+ """
66
+
67
+ _footprint = dict(
68
+ info="Grid-point data consts",
69
+ attr=dict(
70
+ kind=dict(
71
+ values=["pgdlfi"],
72
+ ),
73
+ nativefmt=dict(
74
+ default="lfi",
75
+ ),
76
+ ),
77
+ )
78
+
79
+
80
+ class PGDFA(PGDRaw):
81
+ """
82
+ SURFEX climatological resource in fa format.
83
+ A Genvkey can be provided.
84
+
85
+ :note: OBSOLETE classes do not use.
86
+ """
87
+
88
+ _footprint = dict(
89
+ info="Grid-point data consts",
90
+ attr=dict(
91
+ kind=dict(
92
+ values=["pgdfa"],
93
+ ),
94
+ nativefmt=dict(
95
+ default="fa",
96
+ ),
97
+ ),
98
+ )
99
+
100
+
101
+ class PGDNC(PGDRaw):
102
+ """
103
+ SURFEX climatological resource in netcdf format.
104
+ A Genvkey can be provided.
105
+
106
+ :note: OBSOLETE classes do not use.
107
+ """
108
+
109
+ _footprint = dict(
110
+ info="Grid-point data consts",
111
+ attr=dict(
112
+ kind=dict(
113
+ values=["pgdnc"],
114
+ ),
115
+ nativefmt=dict(
116
+ default="netcdf",
117
+ ),
118
+ ),
119
+ )
120
+
121
+
122
+ @namebuilding_delete("src")
123
+ class PGDWithGeo(ModelGeoResource):
124
+ """
125
+ SURFEX climatological resource.
126
+ A Genvkey can be provided.
127
+ """
128
+
129
+ _footprint = [
130
+ gvar,
131
+ dict(
132
+ info="Surfex climatological file",
133
+ attr=dict(
134
+ kind=dict(
135
+ values=[
136
+ "pgd",
137
+ ],
138
+ ),
139
+ nativefmt=dict(
140
+ values=["fa", "lfi", "netcdf", "txt"],
141
+ default="fa",
142
+ ),
143
+ gvar=dict(
144
+ default="pgd_[geometry::gco_grid_def]_[nativefmt]",
145
+ ),
146
+ ),
147
+ ),
148
+ ]
149
+ _extension_remap = dict(netcdf="nc")
150
+
151
+ @property
152
+ def realkind(self):
153
+ return "pgd"
154
+
155
+ def olive_basename(self):
156
+ """OLIVE specific naming convention."""
157
+ return "PGDFILE-" + self.geometry.area + "." + self.nativefmt
158
+
159
+
160
+ class CoverParams(ModelGeoResource):
161
+ """
162
+ Class of a tar-zip set of coefficients for radiative transfers computations.
163
+ A Genvkey can be given.
164
+ """
165
+
166
+ _footprint = [
167
+ gvar,
168
+ dict(
169
+ info="Coefficients of RRTM scheme",
170
+ attr=dict(
171
+ kind=dict(
172
+ values=["coverparams", "surfexcover"],
173
+ remap=dict(surfexcover="coverparams"),
174
+ ),
175
+ source=dict(
176
+ optional=True,
177
+ default="ecoclimap",
178
+ values=["ecoclimap", "ecoclimap1", "ecoclimap2"],
179
+ ),
180
+ gvar=dict(default="[source]_covers_param"),
181
+ ),
182
+ ),
183
+ ]
184
+
185
+ @property
186
+ def realkind(self):
187
+ return "coverparams"
188
+
189
+
190
+ class IsbaParams(ModelGeoResource):
191
+ """
192
+ Class of surface (vegetations, etc.) coefficients.
193
+ A Genvkey can be given.
194
+ """
195
+
196
+ _footprint = [
197
+ gvar,
198
+ dict(
199
+ info="ISBA parameters",
200
+ attr=dict(
201
+ kind=dict(
202
+ values=["isba", "isbaan"],
203
+ remap=dict(isbaan="isba"),
204
+ ),
205
+ gvar=dict(default="analyse_isba"),
206
+ ),
207
+ ),
208
+ ]
209
+
210
+ @property
211
+ def realkind(self):
212
+ return "isba"
213
+
214
+
215
+ class SandDB(ModelGeoResource):
216
+ """
217
+ Class of a tar-zip (.dir/.hdr) file containing surface sand database.
218
+ A Genvkey can be given.
219
+ """
220
+
221
+ _footprint = [
222
+ gvar,
223
+ dict(
224
+ info="Database for quantity of sand in soil",
225
+ attr=dict(
226
+ kind=dict(
227
+ values=["sand"],
228
+ ),
229
+ source=dict(),
230
+ gvar=dict(default="[source]_[kind]"),
231
+ ),
232
+ ),
233
+ ]
234
+
235
+ @property
236
+ def realkind(self):
237
+ return "sand"
238
+
239
+
240
+ class ClayDB(ModelGeoResource):
241
+ """
242
+ Class of a tar-zip (.dir/.hdr) file containing surface clay database.
243
+ A Genvkey can be given.
244
+ """
245
+
246
+ _footprint = [
247
+ gvar,
248
+ dict(
249
+ info="Database for quantity of clay in soil",
250
+ attr=dict(
251
+ kind=dict(
252
+ values=["clay"],
253
+ ),
254
+ source=dict(),
255
+ gvar=dict(default="[source]_[kind]"),
256
+ ),
257
+ ),
258
+ ]
259
+
260
+ @property
261
+ def realkind(self):
262
+ return "clay"
263
+
264
+
265
+ class OrographyDB(ModelGeoResource):
266
+ """
267
+ Class of a tar-zip (.dir/.hdr) file containing orography database.
268
+ A Genvkey can be given.
269
+ """
270
+
271
+ _footprint = [
272
+ gvar,
273
+ dict(
274
+ info="Database for orography",
275
+ attr=dict(
276
+ kind=dict(
277
+ values=["orography"],
278
+ ),
279
+ source=dict(),
280
+ gvar=dict(default="[source]_[kind]_[geometry::rnice_u]"),
281
+ ),
282
+ ),
283
+ ]
284
+
285
+ @property
286
+ def realkind(self):
287
+ return "orography"
288
+
289
+
290
+ class SurfaceTypeDB(ModelGeoResource):
291
+ """
292
+ Class of a tar-zip (.dir/.hdr) file containing surface type database.
293
+ A Genvkey can be given.
294
+ """
295
+
296
+ _footprint = [
297
+ gvar,
298
+ dict(
299
+ info="Database for surface type",
300
+ attr=dict(
301
+ kind=dict(
302
+ values=["surface_type"],
303
+ ),
304
+ source=dict(),
305
+ gvar=dict(default="[source]_[kind]"),
306
+ ),
307
+ ),
308
+ ]
309
+
310
+ @property
311
+ def realkind(self):
312
+ return "surface_type"
313
+
314
+
315
+ class BathymetryDB(ModelGeoResource):
316
+ """
317
+ Class of file containing bathymetry database.
318
+ A Genvkey can be given.
319
+ """
320
+
321
+ _footprint = [
322
+ gvar,
323
+ dict(
324
+ info="Database for bathymetry",
325
+ attr=dict(
326
+ kind=dict(
327
+ values=["bathymetry"],
328
+ ),
329
+ source=dict(),
330
+ gvar=dict(default="[source]_[kind]_[geometry::rnice_u]"),
331
+ ),
332
+ ),
333
+ ]
334
+
335
+ @property
336
+ def realkind(self):
337
+ return "bathymetry"
@@ -0,0 +1,9 @@
1
+ """
2
+ The :mod:`nwp` syntax mostly deals with attributes resolution and arguments expansion.
3
+ The most important usage is done by :class:`FootprintBase` derivated objects.
4
+ """
5
+
6
+ #: No automatic export
7
+ __all__ = []
8
+
9
+ __tocinfoline__ = "nwp module where standard attributes are defined."