vortex-nwp 2.0.0b1__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 (146) hide show
  1. vortex/__init__.py +135 -0
  2. vortex/algo/__init__.py +12 -0
  3. vortex/algo/components.py +2136 -0
  4. vortex/algo/mpitools.py +1648 -0
  5. vortex/algo/mpitools_templates/envelope_wrapper_default.tpl +27 -0
  6. vortex/algo/mpitools_templates/envelope_wrapper_mpiauto.tpl +29 -0
  7. vortex/algo/mpitools_templates/wrapstd_wrapper_default.tpl +18 -0
  8. vortex/algo/serversynctools.py +170 -0
  9. vortex/config.py +115 -0
  10. vortex/data/__init__.py +13 -0
  11. vortex/data/abstractstores.py +1572 -0
  12. vortex/data/containers.py +780 -0
  13. vortex/data/contents.py +596 -0
  14. vortex/data/executables.py +284 -0
  15. vortex/data/flow.py +113 -0
  16. vortex/data/geometries.ini +2689 -0
  17. vortex/data/geometries.py +703 -0
  18. vortex/data/handlers.py +1021 -0
  19. vortex/data/outflow.py +67 -0
  20. vortex/data/providers.py +465 -0
  21. vortex/data/resources.py +201 -0
  22. vortex/data/stores.py +1271 -0
  23. vortex/gloves.py +282 -0
  24. vortex/layout/__init__.py +27 -0
  25. vortex/layout/appconf.py +109 -0
  26. vortex/layout/contexts.py +511 -0
  27. vortex/layout/dataflow.py +1069 -0
  28. vortex/layout/jobs.py +1276 -0
  29. vortex/layout/monitor.py +833 -0
  30. vortex/layout/nodes.py +1424 -0
  31. vortex/layout/subjobs.py +464 -0
  32. vortex/nwp/__init__.py +11 -0
  33. vortex/nwp/algo/__init__.py +12 -0
  34. vortex/nwp/algo/assim.py +483 -0
  35. vortex/nwp/algo/clim.py +920 -0
  36. vortex/nwp/algo/coupling.py +609 -0
  37. vortex/nwp/algo/eda.py +632 -0
  38. vortex/nwp/algo/eps.py +613 -0
  39. vortex/nwp/algo/forecasts.py +745 -0
  40. vortex/nwp/algo/fpserver.py +927 -0
  41. vortex/nwp/algo/ifsnaming.py +403 -0
  42. vortex/nwp/algo/ifsroot.py +311 -0
  43. vortex/nwp/algo/monitoring.py +202 -0
  44. vortex/nwp/algo/mpitools.py +554 -0
  45. vortex/nwp/algo/odbtools.py +974 -0
  46. vortex/nwp/algo/oopsroot.py +735 -0
  47. vortex/nwp/algo/oopstests.py +186 -0
  48. vortex/nwp/algo/request.py +579 -0
  49. vortex/nwp/algo/stdpost.py +1285 -0
  50. vortex/nwp/data/__init__.py +12 -0
  51. vortex/nwp/data/assim.py +392 -0
  52. vortex/nwp/data/boundaries.py +261 -0
  53. vortex/nwp/data/climfiles.py +539 -0
  54. vortex/nwp/data/configfiles.py +149 -0
  55. vortex/nwp/data/consts.py +929 -0
  56. vortex/nwp/data/ctpini.py +133 -0
  57. vortex/nwp/data/diagnostics.py +181 -0
  58. vortex/nwp/data/eda.py +148 -0
  59. vortex/nwp/data/eps.py +383 -0
  60. vortex/nwp/data/executables.py +1039 -0
  61. vortex/nwp/data/fields.py +96 -0
  62. vortex/nwp/data/gridfiles.py +308 -0
  63. vortex/nwp/data/logs.py +551 -0
  64. vortex/nwp/data/modelstates.py +334 -0
  65. vortex/nwp/data/monitoring.py +220 -0
  66. vortex/nwp/data/namelists.py +644 -0
  67. vortex/nwp/data/obs.py +748 -0
  68. vortex/nwp/data/oopsexec.py +72 -0
  69. vortex/nwp/data/providers.py +182 -0
  70. vortex/nwp/data/query.py +217 -0
  71. vortex/nwp/data/stores.py +147 -0
  72. vortex/nwp/data/surfex.py +338 -0
  73. vortex/nwp/syntax/__init__.py +9 -0
  74. vortex/nwp/syntax/stdattrs.py +375 -0
  75. vortex/nwp/tools/__init__.py +10 -0
  76. vortex/nwp/tools/addons.py +35 -0
  77. vortex/nwp/tools/agt.py +55 -0
  78. vortex/nwp/tools/bdap.py +48 -0
  79. vortex/nwp/tools/bdcp.py +38 -0
  80. vortex/nwp/tools/bdm.py +21 -0
  81. vortex/nwp/tools/bdmp.py +49 -0
  82. vortex/nwp/tools/conftools.py +1311 -0
  83. vortex/nwp/tools/drhook.py +62 -0
  84. vortex/nwp/tools/grib.py +268 -0
  85. vortex/nwp/tools/gribdiff.py +99 -0
  86. vortex/nwp/tools/ifstools.py +163 -0
  87. vortex/nwp/tools/igastuff.py +249 -0
  88. vortex/nwp/tools/mars.py +56 -0
  89. vortex/nwp/tools/odb.py +548 -0
  90. vortex/nwp/tools/partitioning.py +234 -0
  91. vortex/nwp/tools/satrad.py +56 -0
  92. vortex/nwp/util/__init__.py +6 -0
  93. vortex/nwp/util/async.py +184 -0
  94. vortex/nwp/util/beacon.py +40 -0
  95. vortex/nwp/util/diffpygram.py +359 -0
  96. vortex/nwp/util/ens.py +198 -0
  97. vortex/nwp/util/hooks.py +128 -0
  98. vortex/nwp/util/taskdeco.py +81 -0
  99. vortex/nwp/util/usepygram.py +591 -0
  100. vortex/nwp/util/usetnt.py +87 -0
  101. vortex/proxy.py +6 -0
  102. vortex/sessions.py +341 -0
  103. vortex/syntax/__init__.py +9 -0
  104. vortex/syntax/stdattrs.py +628 -0
  105. vortex/syntax/stddeco.py +176 -0
  106. vortex/toolbox.py +982 -0
  107. vortex/tools/__init__.py +11 -0
  108. vortex/tools/actions.py +457 -0
  109. vortex/tools/addons.py +297 -0
  110. vortex/tools/arm.py +76 -0
  111. vortex/tools/compression.py +322 -0
  112. vortex/tools/date.py +20 -0
  113. vortex/tools/ddhpack.py +10 -0
  114. vortex/tools/delayedactions.py +672 -0
  115. vortex/tools/env.py +513 -0
  116. vortex/tools/folder.py +663 -0
  117. vortex/tools/grib.py +559 -0
  118. vortex/tools/lfi.py +746 -0
  119. vortex/tools/listings.py +354 -0
  120. vortex/tools/names.py +575 -0
  121. vortex/tools/net.py +1790 -0
  122. vortex/tools/odb.py +10 -0
  123. vortex/tools/parallelism.py +336 -0
  124. vortex/tools/prestaging.py +186 -0
  125. vortex/tools/rawfiles.py +10 -0
  126. vortex/tools/schedulers.py +413 -0
  127. vortex/tools/services.py +871 -0
  128. vortex/tools/storage.py +1061 -0
  129. vortex/tools/surfex.py +61 -0
  130. vortex/tools/systems.py +3396 -0
  131. vortex/tools/targets.py +384 -0
  132. vortex/util/__init__.py +9 -0
  133. vortex/util/config.py +1071 -0
  134. vortex/util/empty.py +24 -0
  135. vortex/util/helpers.py +184 -0
  136. vortex/util/introspection.py +63 -0
  137. vortex/util/iosponge.py +76 -0
  138. vortex/util/roles.py +51 -0
  139. vortex/util/storefunctions.py +103 -0
  140. vortex/util/structs.py +26 -0
  141. vortex/util/worker.py +150 -0
  142. vortex_nwp-2.0.0b1.dist-info/LICENSE +517 -0
  143. vortex_nwp-2.0.0b1.dist-info/METADATA +50 -0
  144. vortex_nwp-2.0.0b1.dist-info/RECORD +146 -0
  145. vortex_nwp-2.0.0b1.dist-info/WHEEL +5 -0
  146. vortex_nwp-2.0.0b1.dist-info/top_level.txt +1 -0
@@ -0,0 +1,338 @@
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
+ _abstract = True
22
+ _footprint = [
23
+ gvar,
24
+ dict(
25
+ info = 'Surfex climatological file',
26
+ attr = dict(
27
+ gvar = dict(
28
+ default = 'pgd_[nativefmt]',
29
+ ),
30
+ )
31
+ )
32
+ ]
33
+ _extension_remap = dict(netcdf='nc')
34
+
35
+ @property
36
+ def realkind(self):
37
+ return 'pgd'
38
+
39
+ def olive_basename(self):
40
+ """OLIVE specific naming convention."""
41
+ return 'PGDFILE-' + self.geometry.area + '.' + self.nativefmt
42
+
43
+ def namebuilding_info(self):
44
+ nbi = super().namebuilding_info()
45
+ nbi.update(
46
+ # will work only with the @cen namebuilder:
47
+ cen_rawbasename=('PGD_' + self.geometry.area + '.' +
48
+ self._extension_remap.get(self.nativefmt, self.nativefmt))
49
+ # With the standard provider, the usual keys will be used...
50
+ )
51
+ return nbi
52
+
53
+
54
+ class PGDLFI(PGDRaw):
55
+ """
56
+ SURFEX climatological resource in lfi format.
57
+ A Genvkey can be provided.
58
+
59
+ :note: OBSOLETE classes do not use.
60
+ """
61
+ _footprint = dict(
62
+ info = 'Grid-point data consts',
63
+ attr = dict(
64
+ kind = dict(
65
+ values = ['pgdlfi'],
66
+ ),
67
+ nativefmt = dict(
68
+ default = 'lfi',
69
+ )
70
+ )
71
+ )
72
+
73
+
74
+ class PGDFA(PGDRaw):
75
+ """
76
+ SURFEX climatological resource in fa format.
77
+ A Genvkey can be provided.
78
+
79
+ :note: OBSOLETE classes do not use.
80
+ """
81
+ _footprint = dict(
82
+ info = 'Grid-point data consts',
83
+ attr = dict(
84
+ kind = dict(
85
+ values = ['pgdfa'],
86
+ ),
87
+ nativefmt = dict(
88
+ default = 'fa',
89
+ )
90
+ )
91
+ )
92
+
93
+
94
+ class PGDNC(PGDRaw):
95
+ """
96
+ SURFEX climatological resource in netcdf format.
97
+ A Genvkey can be provided.
98
+
99
+ :note: OBSOLETE classes do not use.
100
+ """
101
+ _footprint = dict(
102
+ info = 'Grid-point data consts',
103
+ attr = dict(
104
+ kind = dict(
105
+ values = ['pgdnc'],
106
+ ),
107
+ nativefmt = dict(
108
+ default = 'netcdf',
109
+ )
110
+ )
111
+ )
112
+
113
+
114
+ @namebuilding_delete('src')
115
+ class PGDWithGeo(ModelGeoResource):
116
+ """
117
+ SURFEX climatological resource.
118
+ A Genvkey can be provided.
119
+ """
120
+ _footprint = [
121
+ gvar,
122
+ dict(
123
+ info = 'Surfex climatological file',
124
+ attr = dict(
125
+ kind = dict(
126
+ values = ['pgd', ],
127
+ ),
128
+ nativefmt = dict(
129
+ values = ['fa', 'lfi', 'netcdf', 'txt'],
130
+ default = 'fa',
131
+ ),
132
+ gvar = dict(
133
+ default = 'pgd_[geometry::gco_grid_def]_[nativefmt]',
134
+ ),
135
+ )
136
+ )
137
+ ]
138
+ _extension_remap = dict(netcdf='nc')
139
+
140
+ @property
141
+ def realkind(self):
142
+ return 'pgd'
143
+
144
+ def olive_basename(self):
145
+ """OLIVE specific naming convention."""
146
+ return 'PGDFILE-' + self.geometry.area + '.' + self.nativefmt
147
+
148
+
149
+ class CoverParams(ModelGeoResource):
150
+ """
151
+ Class of a tar-zip set of coefficients for radiative transfers computations.
152
+ A Genvkey can be given.
153
+ """
154
+ _footprint = [
155
+ gvar,
156
+ dict(
157
+ info = 'Coefficients of RRTM scheme',
158
+ attr = dict(
159
+ kind = dict(
160
+ values = ['coverparams', 'surfexcover'],
161
+ remap = dict(surfexcover = 'coverparams'),
162
+ ),
163
+ source = dict(
164
+ optional = True,
165
+ default = 'ecoclimap',
166
+ values = ['ecoclimap', 'ecoclimap1', 'ecoclimap2'],
167
+ ),
168
+ gvar = dict(
169
+ default = '[source]_covers_param'
170
+ ),
171
+ )
172
+ )
173
+ ]
174
+
175
+ @property
176
+ def realkind(self):
177
+ return 'coverparams'
178
+
179
+
180
+ class IsbaParams(ModelGeoResource):
181
+ """
182
+ Class of surface (vegetations, etc.) coefficients.
183
+ A Genvkey can be given.
184
+ """
185
+ _footprint = [
186
+ gvar,
187
+ dict(
188
+ info = 'ISBA parameters',
189
+ attr = dict(
190
+ kind = dict(
191
+ values = ['isba', 'isbaan'],
192
+ remap = dict(isbaan = 'isba'),
193
+ ),
194
+ gvar = dict(
195
+ default = 'analyse_isba'
196
+ ),
197
+ )
198
+ )
199
+ ]
200
+
201
+ @property
202
+ def realkind(self):
203
+ return 'isba'
204
+
205
+
206
+ class SandDB(ModelGeoResource):
207
+ """
208
+ Class of a tar-zip (.dir/.hdr) file containing surface sand database.
209
+ A Genvkey can be given.
210
+ """
211
+ _footprint = [
212
+ gvar,
213
+ dict(
214
+ info = 'Database for quantity of sand in soil',
215
+ attr = dict(
216
+ kind = dict(
217
+ values = ['sand'],
218
+ ),
219
+ source = dict(
220
+ ),
221
+ gvar = dict(
222
+ default = '[source]_[kind]'
223
+ ),
224
+ )
225
+ )
226
+ ]
227
+
228
+ @property
229
+ def realkind(self):
230
+ return 'sand'
231
+
232
+
233
+ class ClayDB(ModelGeoResource):
234
+ """
235
+ Class of a tar-zip (.dir/.hdr) file containing surface clay database.
236
+ A Genvkey can be given.
237
+ """
238
+ _footprint = [
239
+ gvar,
240
+ dict(
241
+ info = 'Database for quantity of clay in soil',
242
+ attr = dict(
243
+ kind = dict(
244
+ values = ['clay'],
245
+ ),
246
+ source = dict(
247
+ ),
248
+ gvar = dict(
249
+ default = '[source]_[kind]'
250
+ ),
251
+ )
252
+ )
253
+ ]
254
+
255
+ @property
256
+ def realkind(self):
257
+ return 'clay'
258
+
259
+
260
+ class OrographyDB(ModelGeoResource):
261
+ """
262
+ Class of a tar-zip (.dir/.hdr) file containing orography database.
263
+ A Genvkey can be given.
264
+ """
265
+ _footprint = [
266
+ gvar,
267
+ dict(
268
+ info = 'Database for orography',
269
+ attr = dict(
270
+ kind = dict(
271
+ values = ['orography'],
272
+ ),
273
+ source = dict(
274
+ ),
275
+ gvar = dict(
276
+ default = '[source]_[kind]_[geometry::rnice_u]'
277
+ ),
278
+ )
279
+ )
280
+ ]
281
+
282
+ @property
283
+ def realkind(self):
284
+ return 'orography'
285
+
286
+
287
+ class SurfaceTypeDB(ModelGeoResource):
288
+ """
289
+ Class of a tar-zip (.dir/.hdr) file containing surface type database.
290
+ A Genvkey can be given.
291
+ """
292
+ _footprint = [
293
+ gvar,
294
+ dict(
295
+ info = 'Database for surface type',
296
+ attr = dict(
297
+ kind = dict(
298
+ values = ['surface_type'],
299
+ ),
300
+ source = dict(
301
+ ),
302
+ gvar = dict(
303
+ default = '[source]_[kind]'
304
+ ),
305
+ )
306
+ )
307
+ ]
308
+
309
+ @property
310
+ def realkind(self):
311
+ return 'surface_type'
312
+
313
+
314
+ class BathymetryDB(ModelGeoResource):
315
+ """
316
+ Class of file containing bathymetry database.
317
+ A Genvkey can be given.
318
+ """
319
+ _footprint = [
320
+ gvar,
321
+ dict(
322
+ info = 'Database for bathymetry',
323
+ attr = dict(
324
+ kind = dict(
325
+ values = ['bathymetry'],
326
+ ),
327
+ source = dict(
328
+ ),
329
+ gvar = dict(
330
+ default = '[source]_[kind]_[geometry::rnice_u]'
331
+ ),
332
+ )
333
+ )
334
+ ]
335
+
336
+ @property
337
+ def realkind(self):
338
+ 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.'