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