vortex-nwp 2.0.0b1__py3-none-any.whl → 2.1.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 (141) hide show
  1. vortex/__init__.py +75 -47
  2. vortex/algo/__init__.py +3 -2
  3. vortex/algo/components.py +944 -618
  4. vortex/algo/mpitools.py +802 -497
  5. vortex/algo/mpitools_templates/__init__.py +1 -0
  6. vortex/algo/serversynctools.py +34 -33
  7. vortex/config.py +19 -22
  8. vortex/data/__init__.py +9 -3
  9. vortex/data/abstractstores.py +593 -655
  10. vortex/data/containers.py +217 -162
  11. vortex/data/contents.py +65 -39
  12. vortex/data/executables.py +93 -102
  13. vortex/data/flow.py +40 -34
  14. vortex/data/geometries.py +228 -132
  15. vortex/data/handlers.py +436 -227
  16. vortex/data/outflow.py +15 -15
  17. vortex/data/providers.py +185 -163
  18. vortex/data/resources.py +48 -42
  19. vortex/data/stores.py +540 -417
  20. vortex/data/sync_templates/__init__.py +0 -0
  21. vortex/gloves.py +114 -87
  22. vortex/layout/__init__.py +1 -8
  23. vortex/layout/contexts.py +150 -84
  24. vortex/layout/dataflow.py +353 -202
  25. vortex/layout/monitor.py +264 -128
  26. vortex/nwp/__init__.py +5 -2
  27. vortex/nwp/algo/__init__.py +14 -5
  28. vortex/nwp/algo/assim.py +205 -151
  29. vortex/nwp/algo/clim.py +683 -517
  30. vortex/nwp/algo/coupling.py +447 -225
  31. vortex/nwp/algo/eda.py +437 -229
  32. vortex/nwp/algo/eps.py +403 -231
  33. vortex/nwp/algo/forecasts.py +416 -275
  34. vortex/nwp/algo/fpserver.py +683 -307
  35. vortex/nwp/algo/ifsnaming.py +205 -145
  36. vortex/nwp/algo/ifsroot.py +215 -122
  37. vortex/nwp/algo/monitoring.py +137 -76
  38. vortex/nwp/algo/mpitools.py +330 -190
  39. vortex/nwp/algo/odbtools.py +637 -353
  40. vortex/nwp/algo/oopsroot.py +454 -273
  41. vortex/nwp/algo/oopstests.py +90 -56
  42. vortex/nwp/algo/request.py +287 -206
  43. vortex/nwp/algo/stdpost.py +878 -522
  44. vortex/nwp/data/__init__.py +22 -4
  45. vortex/nwp/data/assim.py +125 -137
  46. vortex/nwp/data/boundaries.py +121 -68
  47. vortex/nwp/data/climfiles.py +193 -211
  48. vortex/nwp/data/configfiles.py +73 -69
  49. vortex/nwp/data/consts.py +426 -401
  50. vortex/nwp/data/ctpini.py +59 -43
  51. vortex/nwp/data/diagnostics.py +94 -66
  52. vortex/nwp/data/eda.py +50 -51
  53. vortex/nwp/data/eps.py +195 -146
  54. vortex/nwp/data/executables.py +440 -434
  55. vortex/nwp/data/fields.py +63 -48
  56. vortex/nwp/data/gridfiles.py +183 -111
  57. vortex/nwp/data/logs.py +250 -217
  58. vortex/nwp/data/modelstates.py +180 -151
  59. vortex/nwp/data/monitoring.py +72 -99
  60. vortex/nwp/data/namelists.py +254 -202
  61. vortex/nwp/data/obs.py +400 -308
  62. vortex/nwp/data/oopsexec.py +22 -20
  63. vortex/nwp/data/providers.py +90 -65
  64. vortex/nwp/data/query.py +71 -82
  65. vortex/nwp/data/stores.py +49 -36
  66. vortex/nwp/data/surfex.py +136 -137
  67. vortex/nwp/syntax/__init__.py +1 -1
  68. vortex/nwp/syntax/stdattrs.py +173 -111
  69. vortex/nwp/tools/__init__.py +2 -2
  70. vortex/nwp/tools/addons.py +22 -17
  71. vortex/nwp/tools/agt.py +24 -12
  72. vortex/nwp/tools/bdap.py +16 -5
  73. vortex/nwp/tools/bdcp.py +4 -1
  74. vortex/nwp/tools/bdm.py +3 -0
  75. vortex/nwp/tools/bdmp.py +14 -9
  76. vortex/nwp/tools/conftools.py +728 -378
  77. vortex/nwp/tools/drhook.py +12 -8
  78. vortex/nwp/tools/grib.py +65 -39
  79. vortex/nwp/tools/gribdiff.py +22 -17
  80. vortex/nwp/tools/ifstools.py +82 -42
  81. vortex/nwp/tools/igastuff.py +167 -143
  82. vortex/nwp/tools/mars.py +14 -2
  83. vortex/nwp/tools/odb.py +234 -125
  84. vortex/nwp/tools/partitioning.py +61 -37
  85. vortex/nwp/tools/satrad.py +27 -12
  86. vortex/nwp/util/async.py +83 -55
  87. vortex/nwp/util/beacon.py +10 -10
  88. vortex/nwp/util/diffpygram.py +174 -86
  89. vortex/nwp/util/ens.py +144 -63
  90. vortex/nwp/util/hooks.py +30 -19
  91. vortex/nwp/util/taskdeco.py +28 -24
  92. vortex/nwp/util/usepygram.py +278 -172
  93. vortex/nwp/util/usetnt.py +31 -17
  94. vortex/sessions.py +72 -39
  95. vortex/syntax/__init__.py +1 -1
  96. vortex/syntax/stdattrs.py +410 -171
  97. vortex/syntax/stddeco.py +31 -22
  98. vortex/toolbox.py +327 -192
  99. vortex/tools/__init__.py +11 -2
  100. vortex/tools/actions.py +110 -121
  101. vortex/tools/addons.py +111 -92
  102. vortex/tools/arm.py +42 -22
  103. vortex/tools/compression.py +72 -69
  104. vortex/tools/date.py +11 -4
  105. vortex/tools/delayedactions.py +242 -132
  106. vortex/tools/env.py +75 -47
  107. vortex/tools/folder.py +342 -171
  108. vortex/tools/grib.py +341 -162
  109. vortex/tools/lfi.py +423 -216
  110. vortex/tools/listings.py +109 -40
  111. vortex/tools/names.py +218 -156
  112. vortex/tools/net.py +655 -299
  113. vortex/tools/parallelism.py +93 -61
  114. vortex/tools/prestaging.py +55 -31
  115. vortex/tools/schedulers.py +172 -105
  116. vortex/tools/services.py +403 -334
  117. vortex/tools/storage.py +293 -358
  118. vortex/tools/surfex.py +24 -24
  119. vortex/tools/systems.py +1234 -643
  120. vortex/tools/targets.py +156 -100
  121. vortex/util/__init__.py +1 -1
  122. vortex/util/config.py +378 -327
  123. vortex/util/empty.py +2 -2
  124. vortex/util/helpers.py +56 -24
  125. vortex/util/introspection.py +18 -12
  126. vortex/util/iosponge.py +8 -4
  127. vortex/util/roles.py +4 -6
  128. vortex/util/storefunctions.py +39 -13
  129. vortex/util/structs.py +3 -3
  130. vortex/util/worker.py +29 -17
  131. vortex_nwp-2.1.0.dist-info/METADATA +67 -0
  132. vortex_nwp-2.1.0.dist-info/RECORD +144 -0
  133. {vortex_nwp-2.0.0b1.dist-info → vortex_nwp-2.1.0.dist-info}/WHEEL +1 -1
  134. vortex/layout/appconf.py +0 -109
  135. vortex/layout/jobs.py +0 -1276
  136. vortex/layout/nodes.py +0 -1424
  137. vortex/layout/subjobs.py +0 -464
  138. vortex_nwp-2.0.0b1.dist-info/METADATA +0 -50
  139. vortex_nwp-2.0.0b1.dist-info/RECORD +0 -146
  140. {vortex_nwp-2.0.0b1.dist-info → vortex_nwp-2.1.0.dist-info/licenses}/LICENSE +0 -0
  141. {vortex_nwp-2.0.0b1.dist-info → vortex_nwp-2.1.0.dist-info}/top_level.txt +0 -0
File without changes
vortex/gloves.py CHANGED
@@ -18,45 +18,45 @@ class Glove(footprints.FootprintBase):
18
18
  """Base class for GLObal Versatile Environment."""
19
19
 
20
20
  _abstract = True
21
- _collector = ('glove',)
21
+ _collector = ("glove",)
22
22
  _footprint = dict(
23
- info = 'Abstract glove',
24
- attr = dict(
25
- email = dict(
26
- alias = ['address'],
27
- optional = True,
28
- default = Environment(active=False)['email'],
29
- access = 'rwx',
23
+ info="Abstract glove",
24
+ attr=dict(
25
+ email=dict(
26
+ alias=["address"],
27
+ optional=True,
28
+ default=Environment(active=False)["email"],
29
+ access="rwx",
30
30
  ),
31
- vapp = dict(
32
- optional = True,
33
- default = 'play',
34
- access = 'rwx',
31
+ vapp=dict(
32
+ optional=True,
33
+ default="play",
34
+ access="rwx",
35
35
  ),
36
- vconf = dict(
37
- optional = True,
38
- default = 'sandbox',
39
- access = 'rwx',
36
+ vconf=dict(
37
+ optional=True,
38
+ default="sandbox",
39
+ access="rwx",
40
40
  ),
41
- tag = dict(
42
- optional = True,
43
- default = 'default',
41
+ tag=dict(
42
+ optional=True,
43
+ default="default",
44
44
  ),
45
- user = dict(
46
- alias = ('logname', 'username'),
47
- optional = True,
48
- default = Environment(active=False)['logname']
45
+ user=dict(
46
+ alias=("logname", "username"),
47
+ optional=True,
48
+ default=Environment(active=False)["logname"],
49
49
  ),
50
- profile = dict(
51
- alias = ('kind', 'membership'),
52
- values = ['oper', 'dble', 'test', 'research', 'tourist'],
53
- remap = dict(tourist = 'research')
54
- )
55
- )
50
+ profile=dict(
51
+ alias=("kind", "membership"),
52
+ values=["oper", "dble", "test", "research", "tourist"],
53
+ remap=dict(tourist="research"),
54
+ ),
55
+ ),
56
56
  )
57
57
 
58
58
  def __init__(self, *args, **kw):
59
- logger.debug('Glove abstract %s init', self.__class__)
59
+ logger.debug("Glove abstract %s init", self.__class__)
60
60
  super().__init__(*args, **kw)
61
61
  self._rmdepthmin = 3
62
62
  self._siteroot = None
@@ -70,32 +70,32 @@ class Glove(footprints.FootprintBase):
70
70
  @property
71
71
  def realkind(self):
72
72
  """Returns the litteral string identity of the current glove."""
73
- return 'glove'
73
+ return "glove"
74
74
 
75
75
  @property
76
76
  def configrc(self):
77
77
  """Returns the path of the default directory where ``.ini`` files are stored."""
78
- return Environment(active=False).HOME + '/.vortexrc'
78
+ return Environment(active=False).HOME + "/.vortexrc"
79
79
 
80
80
  @property
81
81
  def siteroot(self):
82
82
  """Returns the path of the vortex install directory."""
83
83
  if not self._siteroot:
84
- self._siteroot = '/'.join(__file__.split('/')[0:-3])
84
+ self._siteroot = "/".join(__file__.split("/")[0:-3])
85
85
  return self._siteroot
86
86
 
87
87
  @property
88
88
  def siteconf(self):
89
89
  """Returns the path of the default directory where ``.ini`` files are stored."""
90
90
  if not self._siteconf:
91
- self._siteconf = '/'.join((self.siteroot, 'conf'))
91
+ self._siteconf = "/".join((self.siteroot, "conf"))
92
92
  return self._siteconf
93
93
 
94
94
  @property
95
95
  def sitedoc(self):
96
96
  """Returns the path of the default directory where ``.ini`` files are stored."""
97
97
  if not self._sitedoc:
98
- self._sitedoc = '/'.join((self.siteroot, 'sphinx'))
98
+ self._sitedoc = "/".join((self.siteroot, "sphinx"))
99
99
  return self._sitedoc
100
100
 
101
101
  @property
@@ -103,8 +103,8 @@ class Glove(footprints.FootprintBase):
103
103
  """Returns the path of the default directory where ``.ini`` files are stored."""
104
104
  if not self._sitesrc:
105
105
  self._sitesrc = (
106
- '/'.join((self.siteroot, 'site')),
107
- '/'.join((self.siteroot, 'src'))
106
+ "/".join((self.siteroot, "site")),
107
+ "/".join((self.siteroot, "src")),
108
108
  )
109
109
  return self._sitesrc
110
110
 
@@ -120,8 +120,9 @@ class Glove(footprints.FootprintBase):
120
120
  """Refresh actual email with current username and provided ``domain``."""
121
121
  if domain is None:
122
122
  from vortex import sessions
123
+
123
124
  domain = sessions.system().getfqdn()
124
- return '@'.join((self.user, domain))
125
+ return "@".join((self.user, domain))
125
126
 
126
127
  @property
127
128
  def xmail(self):
@@ -156,14 +157,16 @@ class Glove(footprints.FootprintBase):
156
157
  if self._ftduser:
157
158
  return self._ftduser
158
159
  else:
159
- return Environment.current().get('VORTEX_ARCHIVE_USER',
160
- self.user if defaults_to_user else None)
160
+ return Environment.current().get(
161
+ "VORTEX_ARCHIVE_USER",
162
+ self.user if defaults_to_user else None,
163
+ )
161
164
 
162
165
  def _get_default_fthost(self):
163
166
  if self._ftdhost:
164
167
  return self._ftdhost
165
168
  else:
166
- return Environment.current().get('VORTEX_ARCHIVE_HOST', None)
169
+ return Environment.current().get("VORTEX_ARCHIVE_HOST", None)
167
170
 
168
171
  def _set_default_fthost(self, value):
169
172
  self._ftdhost = value
@@ -171,31 +174,57 @@ class Glove(footprints.FootprintBase):
171
174
  def _del_default_fthost(self):
172
175
  self._ftdhost = None
173
176
 
174
- default_fthost = property(_get_default_fthost, _set_default_fthost, _del_default_fthost)
177
+ default_fthost = property(
178
+ _get_default_fthost, _set_default_fthost, _del_default_fthost
179
+ )
175
180
 
176
- def describeftsettings(self, indent='+ '):
181
+ def describeftsettings(self, indent="+ "):
177
182
  """Returns a printable description of default file transfert usernames."""
178
183
  card = "\n".join(
179
- ['{0}{3:48s} = {4:s}', ] +
180
- ['{0}{1:48s} = {2:s}', ] +
181
- (['{0}Host specific FT users:', ] if self._ftusers else []) +
182
- ['{0}' + ' {:46s} = {:s}'.format(k, v) for k, v in self._ftusers.items() if v]
183
- ).format(indent,
184
- 'Default FT User', str(self._ftduser),
185
- 'Default FT Host', str(self._ftdhost))
184
+ [
185
+ "{0}{3:48s} = {4:s}",
186
+ ]
187
+ + [
188
+ "{0}{1:48s} = {2:s}",
189
+ ]
190
+ + (
191
+ [
192
+ "{0}Host specific FT users:",
193
+ ]
194
+ if self._ftusers
195
+ else []
196
+ )
197
+ + [
198
+ "{0}" + " {:46s} = {:s}".format(k, v)
199
+ for k, v in self._ftusers.items()
200
+ if v
201
+ ]
202
+ ).format(
203
+ indent,
204
+ "Default FT User",
205
+ str(self._ftduser),
206
+ "Default FT Host",
207
+ str(self._ftdhost),
208
+ )
186
209
  return card
187
210
 
188
- def idcard(self, indent='+ '):
211
+ def idcard(self, indent="+ "):
189
212
  """Returns a printable description of the current glove."""
190
- card = "\n".join((
191
- '{0}User = {1:s}',
192
- '{0}Profile = {2!s}',
193
- '{0}Vapp = {3:s}',
194
- '{0}Vconf = {4:s}',
195
- '{0}Configrc = {5:s}'
196
- )).format(
213
+ card = "\n".join(
214
+ (
215
+ "{0}User = {1:s}",
216
+ "{0}Profile = {2!s}",
217
+ "{0}Vapp = {3:s}",
218
+ "{0}Vconf = {4:s}",
219
+ "{0}Configrc = {5:s}",
220
+ )
221
+ ).format(
197
222
  indent,
198
- self.user, self.profile, self.vapp, self.vconf, self.configrc
223
+ self.user,
224
+ self.profile,
225
+ self.vapp,
226
+ self.vconf,
227
+ self.configrc,
199
228
  )
200
229
  return card
201
230
 
@@ -211,19 +240,19 @@ class ResearchGlove(Glove):
211
240
 
212
241
  _explicit = False
213
242
  _footprint = dict(
214
- info = 'Research glove',
215
- attr = dict(
216
- profile = dict(
217
- optional = True,
218
- values = ['research', 'tourist'],
219
- default = 'research',
243
+ info="Research glove",
244
+ attr=dict(
245
+ profile=dict(
246
+ optional=True,
247
+ values=["research", "tourist"],
248
+ default="research",
220
249
  )
221
- )
250
+ ),
222
251
  )
223
252
 
224
253
  @property
225
254
  def realkind(self):
226
- return 'research'
255
+ return "research"
227
256
 
228
257
 
229
258
  class OperGlove(Glove):
@@ -236,40 +265,38 @@ class OperGlove(Glove):
236
265
  """
237
266
 
238
267
  _footprint = dict(
239
- info = 'Operational glove',
240
- attr = dict(
241
- user = dict(
242
- values = ['mxpt001']
268
+ info="Operational glove",
269
+ attr=dict(
270
+ user=dict(values=["mxpt001"]),
271
+ profile=dict(
272
+ optional=False,
273
+ values=["oper", "dble", "test", "miroir"],
243
274
  ),
244
- profile = dict(
245
- optional = False,
246
- values = ['oper', 'dble', 'test', 'miroir'],
247
- )
248
- )
275
+ ),
249
276
  )
250
277
 
251
278
  @property
252
279
  def realkind(self):
253
- return 'opuser'
280
+ return "opuser"
254
281
 
255
282
 
256
283
  class UnitTestGlove(ResearchGlove):
257
284
  """A very special glove for unit-tests."""
258
285
 
259
286
  _footprint = dict(
260
- info = 'Unit-Test Glove',
261
- attr = dict(
262
- profile = dict(
263
- optional = False,
264
- values = ['utest'],
287
+ info="Unit-Test Glove",
288
+ attr=dict(
289
+ profile=dict(
290
+ optional=False,
291
+ values=["utest"],
265
292
  ),
266
- test_configrc = dict(
267
- optional = False,
293
+ test_configrc=dict(
294
+ optional=False,
268
295
  ),
269
- test_siteroot = dict(
270
- optional = False,
296
+ test_siteroot=dict(
297
+ optional=False,
271
298
  ),
272
- )
299
+ ),
273
300
  )
274
301
 
275
302
  def __init__(self, *args, **kw):
vortex/layout/__init__.py CHANGED
@@ -12,16 +12,9 @@ a VORTEX session:
12
12
  the list of sections and environment variables ;
13
13
  * the :mod:`monitor` module defines utility classes to monitor the state of an
14
14
  ensemble of :class:`~dataflow.Section` objects.
15
-
16
- It also provides modules that allows to create "standard" VORTEX's jobs:
17
-
18
- * the :mod:`nodes` modules defines a bunch of classes that helps to organise
19
- VORTEX jobs (creating tasks, families of tasks, ...);
20
- * the :mod:`jobs` module focuses on the actual job generation and initialisation.
21
-
22
15
  """
23
16
 
24
17
  #: No automatic export
25
18
  __all__ = []
26
19
 
27
- __tocinfoline__ = 'Package that helps organising a VORTEX session.'
20
+ __tocinfoline__ = "Package that helps organising a VORTEX session."