vortex-nwp 2.0.0b1__py3-none-any.whl → 2.0.0b2__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 (139) hide show
  1. vortex/__init__.py +59 -45
  2. vortex/algo/__init__.py +3 -2
  3. vortex/algo/components.py +940 -614
  4. vortex/algo/mpitools.py +802 -497
  5. vortex/algo/serversynctools.py +34 -33
  6. vortex/config.py +19 -22
  7. vortex/data/__init__.py +9 -3
  8. vortex/data/abstractstores.py +593 -655
  9. vortex/data/containers.py +217 -162
  10. vortex/data/contents.py +65 -39
  11. vortex/data/executables.py +93 -102
  12. vortex/data/flow.py +40 -34
  13. vortex/data/geometries.py +228 -132
  14. vortex/data/handlers.py +428 -225
  15. vortex/data/outflow.py +15 -15
  16. vortex/data/providers.py +185 -163
  17. vortex/data/resources.py +48 -42
  18. vortex/data/stores.py +544 -413
  19. vortex/gloves.py +114 -87
  20. vortex/layout/__init__.py +1 -8
  21. vortex/layout/contexts.py +150 -84
  22. vortex/layout/dataflow.py +353 -202
  23. vortex/layout/monitor.py +264 -128
  24. vortex/nwp/__init__.py +5 -2
  25. vortex/nwp/algo/__init__.py +14 -5
  26. vortex/nwp/algo/assim.py +205 -151
  27. vortex/nwp/algo/clim.py +683 -517
  28. vortex/nwp/algo/coupling.py +447 -225
  29. vortex/nwp/algo/eda.py +437 -229
  30. vortex/nwp/algo/eps.py +403 -231
  31. vortex/nwp/algo/forecasts.py +420 -271
  32. vortex/nwp/algo/fpserver.py +683 -307
  33. vortex/nwp/algo/ifsnaming.py +205 -145
  34. vortex/nwp/algo/ifsroot.py +210 -122
  35. vortex/nwp/algo/monitoring.py +132 -76
  36. vortex/nwp/algo/mpitools.py +321 -191
  37. vortex/nwp/algo/odbtools.py +617 -353
  38. vortex/nwp/algo/oopsroot.py +449 -273
  39. vortex/nwp/algo/oopstests.py +90 -56
  40. vortex/nwp/algo/request.py +287 -206
  41. vortex/nwp/algo/stdpost.py +878 -522
  42. vortex/nwp/data/__init__.py +22 -4
  43. vortex/nwp/data/assim.py +125 -137
  44. vortex/nwp/data/boundaries.py +121 -68
  45. vortex/nwp/data/climfiles.py +193 -211
  46. vortex/nwp/data/configfiles.py +73 -69
  47. vortex/nwp/data/consts.py +426 -401
  48. vortex/nwp/data/ctpini.py +59 -43
  49. vortex/nwp/data/diagnostics.py +94 -66
  50. vortex/nwp/data/eda.py +50 -51
  51. vortex/nwp/data/eps.py +195 -146
  52. vortex/nwp/data/executables.py +440 -434
  53. vortex/nwp/data/fields.py +63 -48
  54. vortex/nwp/data/gridfiles.py +183 -111
  55. vortex/nwp/data/logs.py +250 -217
  56. vortex/nwp/data/modelstates.py +180 -151
  57. vortex/nwp/data/monitoring.py +72 -99
  58. vortex/nwp/data/namelists.py +254 -202
  59. vortex/nwp/data/obs.py +400 -308
  60. vortex/nwp/data/oopsexec.py +22 -20
  61. vortex/nwp/data/providers.py +90 -65
  62. vortex/nwp/data/query.py +71 -82
  63. vortex/nwp/data/stores.py +49 -36
  64. vortex/nwp/data/surfex.py +136 -137
  65. vortex/nwp/syntax/__init__.py +1 -1
  66. vortex/nwp/syntax/stdattrs.py +173 -111
  67. vortex/nwp/tools/__init__.py +2 -2
  68. vortex/nwp/tools/addons.py +22 -17
  69. vortex/nwp/tools/agt.py +24 -12
  70. vortex/nwp/tools/bdap.py +16 -5
  71. vortex/nwp/tools/bdcp.py +4 -1
  72. vortex/nwp/tools/bdm.py +3 -0
  73. vortex/nwp/tools/bdmp.py +14 -9
  74. vortex/nwp/tools/conftools.py +728 -378
  75. vortex/nwp/tools/drhook.py +12 -8
  76. vortex/nwp/tools/grib.py +65 -39
  77. vortex/nwp/tools/gribdiff.py +22 -17
  78. vortex/nwp/tools/ifstools.py +82 -42
  79. vortex/nwp/tools/igastuff.py +167 -143
  80. vortex/nwp/tools/mars.py +14 -2
  81. vortex/nwp/tools/odb.py +234 -125
  82. vortex/nwp/tools/partitioning.py +61 -37
  83. vortex/nwp/tools/satrad.py +27 -12
  84. vortex/nwp/util/async.py +83 -55
  85. vortex/nwp/util/beacon.py +10 -10
  86. vortex/nwp/util/diffpygram.py +174 -86
  87. vortex/nwp/util/ens.py +144 -63
  88. vortex/nwp/util/hooks.py +30 -19
  89. vortex/nwp/util/taskdeco.py +28 -24
  90. vortex/nwp/util/usepygram.py +278 -172
  91. vortex/nwp/util/usetnt.py +31 -17
  92. vortex/sessions.py +72 -39
  93. vortex/syntax/__init__.py +1 -1
  94. vortex/syntax/stdattrs.py +410 -171
  95. vortex/syntax/stddeco.py +31 -22
  96. vortex/toolbox.py +327 -192
  97. vortex/tools/__init__.py +11 -2
  98. vortex/tools/actions.py +125 -59
  99. vortex/tools/addons.py +111 -92
  100. vortex/tools/arm.py +42 -22
  101. vortex/tools/compression.py +72 -69
  102. vortex/tools/date.py +11 -4
  103. vortex/tools/delayedactions.py +242 -132
  104. vortex/tools/env.py +75 -47
  105. vortex/tools/folder.py +342 -171
  106. vortex/tools/grib.py +311 -149
  107. vortex/tools/lfi.py +423 -216
  108. vortex/tools/listings.py +109 -40
  109. vortex/tools/names.py +218 -156
  110. vortex/tools/net.py +632 -298
  111. vortex/tools/parallelism.py +93 -61
  112. vortex/tools/prestaging.py +55 -31
  113. vortex/tools/schedulers.py +172 -105
  114. vortex/tools/services.py +402 -333
  115. vortex/tools/storage.py +293 -358
  116. vortex/tools/surfex.py +24 -24
  117. vortex/tools/systems.py +1211 -631
  118. vortex/tools/targets.py +156 -100
  119. vortex/util/__init__.py +1 -1
  120. vortex/util/config.py +377 -327
  121. vortex/util/empty.py +2 -2
  122. vortex/util/helpers.py +56 -24
  123. vortex/util/introspection.py +18 -12
  124. vortex/util/iosponge.py +8 -4
  125. vortex/util/roles.py +4 -6
  126. vortex/util/storefunctions.py +39 -13
  127. vortex/util/structs.py +3 -3
  128. vortex/util/worker.py +29 -17
  129. vortex_nwp-2.0.0b2.dist-info/METADATA +66 -0
  130. vortex_nwp-2.0.0b2.dist-info/RECORD +142 -0
  131. {vortex_nwp-2.0.0b1.dist-info → vortex_nwp-2.0.0b2.dist-info}/WHEEL +1 -1
  132. vortex/layout/appconf.py +0 -109
  133. vortex/layout/jobs.py +0 -1276
  134. vortex/layout/nodes.py +0 -1424
  135. vortex/layout/subjobs.py +0 -464
  136. vortex_nwp-2.0.0b1.dist-info/METADATA +0 -50
  137. vortex_nwp-2.0.0b1.dist-info/RECORD +0 -146
  138. {vortex_nwp-2.0.0b1.dist-info → vortex_nwp-2.0.0b2.dist-info}/LICENSE +0 -0
  139. {vortex_nwp-2.0.0b1.dist-info → vortex_nwp-2.0.0b2.dist-info}/top_level.txt +0 -0
vortex/__init__.py CHANGED
@@ -20,45 +20,64 @@ of the very high level interface defined in the :mod:`vortex.toolbox` module is
20
20
  strongly advised.
21
21
  """
22
22
 
23
- __version__ = '2.0.0b1'
24
- __prompt__ = 'Vortex v-' + __version__ + ':'
23
+ import atexit
24
+ import importlib.metadata
25
+
26
+ from bronx.fancies import loggers as bloggers
27
+ import bronx.stdtypes.date
28
+
29
+ import footprints
30
+
31
+ # Populate a fake proxy module with footprints shortcuts
32
+ from . import proxy, tools, sessions, config
33
+
34
+ # vortex user API
35
+ from .toolbox import input as input
36
+ from .toolbox import output as output
37
+ from .toolbox import executable as executable
38
+ from .toolbox import promise as promise
39
+ from .toolbox import diff as diff
40
+ from .toolbox import defaults as defaults
41
+ from .toolbox import algo as task
42
+
43
+ from . import nwp as nwp # footprints import
25
44
 
26
- __nextversion__ = '2.0.0b2'
27
- __tocinfoline__ = 'VORTEX core package'
45
+ __version__ = "2.0.0b2"
46
+ __prompt__ = "Vortex v-" + __version__ + ":"
47
+
48
+ __nextversion__ = "2.0.0b3"
49
+ __tocinfoline__ = "VORTEX core package"
28
50
 
29
51
  __all__ = [
30
- "input", "output", "executable", "task", "promise", "diff",
52
+ "input",
53
+ "output",
54
+ "executable",
55
+ "task",
56
+ "promise",
57
+ "diff",
31
58
  ]
32
59
 
33
60
  # Set vortex specific priorities for footprints usage
34
61
 
35
- from bronx.fancies import loggers as bloggers
36
62
 
37
- import footprints
38
- footprints.priorities.set_before('debug', 'olive', 'oper')
63
+ footprints.priorities.set_before("debug", "olive", "oper")
39
64
 
40
65
  # Set a root logging mechanism for vortex
41
66
 
42
67
  #: Shortcut to Vortex's root logger
43
- logger = bloggers.getLogger('vortex')
44
-
45
- # Populate a fake proxy module with footprints shortcuts
68
+ logger = bloggers.getLogger("vortex")
46
69
 
47
- from . import proxy
48
70
  setup = footprints.config.get()
49
71
  setup.add_proxy(proxy)
50
72
  proxy.cat = footprints.proxy.cat
51
73
  proxy.objects = footprints.proxy.objects
52
74
 
53
75
  # Set a background environment and a root session
54
-
55
- from . import tools
56
- from . import sessions
57
- from . import config
58
-
59
76
  rootenv = tools.env.Environment(active=True)
60
77
 
61
- rs = sessions.get(active=True, topenv=rootenv, glove=sessions.getglove(), prompt=__prompt__)
78
+ rs = sessions.get(
79
+ active=True, topenv=rootenv, glove=sessions.getglove(), prompt=__prompt__
80
+ )
62
81
  if rs.system().systems_reload():
63
82
  rs.system(refill=True)
64
83
  del rs
@@ -70,8 +89,7 @@ def vortexfpdefaults():
70
89
  """Return actual glove, according to current environment."""
71
90
  cur_session = sessions.current()
72
91
  return dict(
73
- glove=cur_session.glove,
74
- systemtarget=cur_session.sh.default_target
92
+ glove=cur_session.glove, systemtarget=cur_session.sh.default_target
75
93
  )
76
94
 
77
95
 
@@ -82,54 +100,50 @@ footprints.setup.callback = vortexfpdefaults
82
100
  ticket = sessions.get
83
101
  sh = sessions.system
84
102
 
85
- # Specific toolbox exceptions
86
-
87
-
88
- class VortexForceComplete(Exception):
89
- """Exception for handling fast exit mecanisms."""
90
- pass
91
-
92
103
  # If a config file can be found in current dir, load it
93
104
  config.load_config()
94
105
 
95
106
  # Load some superstars sub-packages
96
- from .toolbox import (
97
- input,
98
- output,
99
- executable,
100
- promise,
101
- diff,
102
- defaults,
103
- )
104
- from .toolbox import algo as task
105
- from . import nwp
107
+
106
108
 
107
109
  # Now load plugins that have been installed with the
108
110
  # 'vtx' entry point. Order matters: since plugins
109
111
  # will typically depend on objects defined in 'vortex'
110
112
  # and 'vortex.nwp', these must be imported /before/
111
113
  # loading plugins.
112
- from importlib.metadata import entry_points
113
- for plugin in entry_points(group='vtx'):
114
+ for plugin in importlib.metadata.entry_points(group="vtx"):
114
115
  plugin.load()
115
116
  print(f"Loaded plugin {plugin.name}")
116
117
 
117
- # Register proper vortex exit before the end of interpreter session
118
118
 
119
- import bronx.stdtypes.date
119
+ # Register proper vortex exit before the end of interpreter session
120
120
  def complete():
121
121
  sessions.exit()
122
122
  import multiprocessing
123
+
123
124
  for kid in multiprocessing.active_children():
124
- logger.warning('Terminate active kid %s', str(kid))
125
+ logger.warning("Terminate active kid %s", str(kid))
125
126
  kid.terminate()
126
- print('Vortex', __version__, 'completed', '(', bronx.stdtypes.date.at_second().reallynice(), ')')
127
+ print(
128
+ "Vortex",
129
+ __version__,
130
+ "completed",
131
+ "(",
132
+ bronx.stdtypes.date.at_second().reallynice(),
133
+ ")",
134
+ )
127
135
 
128
136
 
129
- import atexit
130
137
  atexit.register(complete)
131
138
  del atexit, complete
132
139
 
133
- print('Vortex', __version__, 'loaded', '(', bronx.stdtypes.date.at_second().reallynice(), ')')
140
+ print(
141
+ "Vortex",
142
+ __version__,
143
+ "loaded",
144
+ "(",
145
+ bronx.stdtypes.date.at_second().reallynice(),
146
+ ")",
147
+ )
134
148
 
135
149
  del footprints
vortex/algo/__init__.py CHANGED
@@ -4,9 +4,10 @@ Generic AlgoComponent classes (and related utility classes).
4
4
  Application specific AlgoComponent classes should be defined in dedicated packages.
5
5
  """
6
6
 
7
- from . import components, serversynctools
7
+ from . import components as components
8
+ from . import serversynctools as serversynctools
8
9
 
9
10
  #: No automatic export
10
11
  __all__ = []
11
12
 
12
- __tocinfoline__ = 'Generic AlgoComponent classes (and their utility classes)'
13
+ __tocinfoline__ = "Generic AlgoComponent classes (and their utility classes)"