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.
- vortex/__init__.py +135 -0
- vortex/algo/__init__.py +12 -0
- vortex/algo/components.py +2136 -0
- vortex/algo/mpitools.py +1648 -0
- vortex/algo/mpitools_templates/envelope_wrapper_default.tpl +27 -0
- vortex/algo/mpitools_templates/envelope_wrapper_mpiauto.tpl +29 -0
- vortex/algo/mpitools_templates/wrapstd_wrapper_default.tpl +18 -0
- vortex/algo/serversynctools.py +170 -0
- vortex/config.py +115 -0
- vortex/data/__init__.py +13 -0
- vortex/data/abstractstores.py +1572 -0
- vortex/data/containers.py +780 -0
- vortex/data/contents.py +596 -0
- vortex/data/executables.py +284 -0
- vortex/data/flow.py +113 -0
- vortex/data/geometries.ini +2689 -0
- vortex/data/geometries.py +703 -0
- vortex/data/handlers.py +1021 -0
- vortex/data/outflow.py +67 -0
- vortex/data/providers.py +465 -0
- vortex/data/resources.py +201 -0
- vortex/data/stores.py +1271 -0
- vortex/gloves.py +282 -0
- vortex/layout/__init__.py +27 -0
- vortex/layout/appconf.py +109 -0
- vortex/layout/contexts.py +511 -0
- vortex/layout/dataflow.py +1069 -0
- vortex/layout/jobs.py +1276 -0
- vortex/layout/monitor.py +833 -0
- vortex/layout/nodes.py +1424 -0
- vortex/layout/subjobs.py +464 -0
- vortex/nwp/__init__.py +11 -0
- vortex/nwp/algo/__init__.py +12 -0
- vortex/nwp/algo/assim.py +483 -0
- vortex/nwp/algo/clim.py +920 -0
- vortex/nwp/algo/coupling.py +609 -0
- vortex/nwp/algo/eda.py +632 -0
- vortex/nwp/algo/eps.py +613 -0
- vortex/nwp/algo/forecasts.py +745 -0
- vortex/nwp/algo/fpserver.py +927 -0
- vortex/nwp/algo/ifsnaming.py +403 -0
- vortex/nwp/algo/ifsroot.py +311 -0
- vortex/nwp/algo/monitoring.py +202 -0
- vortex/nwp/algo/mpitools.py +554 -0
- vortex/nwp/algo/odbtools.py +974 -0
- vortex/nwp/algo/oopsroot.py +735 -0
- vortex/nwp/algo/oopstests.py +186 -0
- vortex/nwp/algo/request.py +579 -0
- vortex/nwp/algo/stdpost.py +1285 -0
- vortex/nwp/data/__init__.py +12 -0
- vortex/nwp/data/assim.py +392 -0
- vortex/nwp/data/boundaries.py +261 -0
- vortex/nwp/data/climfiles.py +539 -0
- vortex/nwp/data/configfiles.py +149 -0
- vortex/nwp/data/consts.py +929 -0
- vortex/nwp/data/ctpini.py +133 -0
- vortex/nwp/data/diagnostics.py +181 -0
- vortex/nwp/data/eda.py +148 -0
- vortex/nwp/data/eps.py +383 -0
- vortex/nwp/data/executables.py +1039 -0
- vortex/nwp/data/fields.py +96 -0
- vortex/nwp/data/gridfiles.py +308 -0
- vortex/nwp/data/logs.py +551 -0
- vortex/nwp/data/modelstates.py +334 -0
- vortex/nwp/data/monitoring.py +220 -0
- vortex/nwp/data/namelists.py +644 -0
- vortex/nwp/data/obs.py +748 -0
- vortex/nwp/data/oopsexec.py +72 -0
- vortex/nwp/data/providers.py +182 -0
- vortex/nwp/data/query.py +217 -0
- vortex/nwp/data/stores.py +147 -0
- vortex/nwp/data/surfex.py +338 -0
- vortex/nwp/syntax/__init__.py +9 -0
- vortex/nwp/syntax/stdattrs.py +375 -0
- vortex/nwp/tools/__init__.py +10 -0
- vortex/nwp/tools/addons.py +35 -0
- vortex/nwp/tools/agt.py +55 -0
- vortex/nwp/tools/bdap.py +48 -0
- vortex/nwp/tools/bdcp.py +38 -0
- vortex/nwp/tools/bdm.py +21 -0
- vortex/nwp/tools/bdmp.py +49 -0
- vortex/nwp/tools/conftools.py +1311 -0
- vortex/nwp/tools/drhook.py +62 -0
- vortex/nwp/tools/grib.py +268 -0
- vortex/nwp/tools/gribdiff.py +99 -0
- vortex/nwp/tools/ifstools.py +163 -0
- vortex/nwp/tools/igastuff.py +249 -0
- vortex/nwp/tools/mars.py +56 -0
- vortex/nwp/tools/odb.py +548 -0
- vortex/nwp/tools/partitioning.py +234 -0
- vortex/nwp/tools/satrad.py +56 -0
- vortex/nwp/util/__init__.py +6 -0
- vortex/nwp/util/async.py +184 -0
- vortex/nwp/util/beacon.py +40 -0
- vortex/nwp/util/diffpygram.py +359 -0
- vortex/nwp/util/ens.py +198 -0
- vortex/nwp/util/hooks.py +128 -0
- vortex/nwp/util/taskdeco.py +81 -0
- vortex/nwp/util/usepygram.py +591 -0
- vortex/nwp/util/usetnt.py +87 -0
- vortex/proxy.py +6 -0
- vortex/sessions.py +341 -0
- vortex/syntax/__init__.py +9 -0
- vortex/syntax/stdattrs.py +628 -0
- vortex/syntax/stddeco.py +176 -0
- vortex/toolbox.py +982 -0
- vortex/tools/__init__.py +11 -0
- vortex/tools/actions.py +457 -0
- vortex/tools/addons.py +297 -0
- vortex/tools/arm.py +76 -0
- vortex/tools/compression.py +322 -0
- vortex/tools/date.py +20 -0
- vortex/tools/ddhpack.py +10 -0
- vortex/tools/delayedactions.py +672 -0
- vortex/tools/env.py +513 -0
- vortex/tools/folder.py +663 -0
- vortex/tools/grib.py +559 -0
- vortex/tools/lfi.py +746 -0
- vortex/tools/listings.py +354 -0
- vortex/tools/names.py +575 -0
- vortex/tools/net.py +1790 -0
- vortex/tools/odb.py +10 -0
- vortex/tools/parallelism.py +336 -0
- vortex/tools/prestaging.py +186 -0
- vortex/tools/rawfiles.py +10 -0
- vortex/tools/schedulers.py +413 -0
- vortex/tools/services.py +871 -0
- vortex/tools/storage.py +1061 -0
- vortex/tools/surfex.py +61 -0
- vortex/tools/systems.py +3396 -0
- vortex/tools/targets.py +384 -0
- vortex/util/__init__.py +9 -0
- vortex/util/config.py +1071 -0
- vortex/util/empty.py +24 -0
- vortex/util/helpers.py +184 -0
- vortex/util/introspection.py +63 -0
- vortex/util/iosponge.py +76 -0
- vortex/util/roles.py +51 -0
- vortex/util/storefunctions.py +103 -0
- vortex/util/structs.py +26 -0
- vortex/util/worker.py +150 -0
- vortex_nwp-2.0.0b1.dist-info/LICENSE +517 -0
- vortex_nwp-2.0.0b1.dist-info/METADATA +50 -0
- vortex_nwp-2.0.0b1.dist-info/RECORD +146 -0
- vortex_nwp-2.0.0b1.dist-info/WHEEL +5 -0
- vortex_nwp-2.0.0b1.dist-info/top_level.txt +1 -0
vortex/__init__.py
ADDED
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
"""
|
|
2
|
+
*Versatile Objects Rounded-up in a Toolbox for Environmental eXperiments*
|
|
3
|
+
|
|
4
|
+
VORTEX is a set of objects for basic resources handling in the context
|
|
5
|
+
of numerical weather prediction. Objects should be versatile enough to
|
|
6
|
+
be used either in an operational or research environment.
|
|
7
|
+
|
|
8
|
+
The user is provided with a standard interface for the description of
|
|
9
|
+
miscellaneaous resources (constants, climatological files, executable
|
|
10
|
+
models, etc.) with could be used as standalone objects or gathered inside
|
|
11
|
+
a logical layout defining the workflow of the experiment (configurations,
|
|
12
|
+
bunches, tasks, etc.).
|
|
13
|
+
|
|
14
|
+
Using the vortex modules implies the setting of a default session, as delivered
|
|
15
|
+
by the :mod:`vortex.sessions`. The current session could be changed and simultaneous
|
|
16
|
+
sessions could coexist.
|
|
17
|
+
|
|
18
|
+
Advanced users could access to specific classes of objects, but the use
|
|
19
|
+
of the very high level interface defined in the :mod:`vortex.toolbox` module is
|
|
20
|
+
strongly advised.
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
__version__ = '2.0.0b1'
|
|
24
|
+
__prompt__ = 'Vortex v-' + __version__ + ':'
|
|
25
|
+
|
|
26
|
+
__nextversion__ = '2.0.0b2'
|
|
27
|
+
__tocinfoline__ = 'VORTEX core package'
|
|
28
|
+
|
|
29
|
+
__all__ = [
|
|
30
|
+
"input", "output", "executable", "task", "promise", "diff",
|
|
31
|
+
]
|
|
32
|
+
|
|
33
|
+
# Set vortex specific priorities for footprints usage
|
|
34
|
+
|
|
35
|
+
from bronx.fancies import loggers as bloggers
|
|
36
|
+
|
|
37
|
+
import footprints
|
|
38
|
+
footprints.priorities.set_before('debug', 'olive', 'oper')
|
|
39
|
+
|
|
40
|
+
# Set a root logging mechanism for vortex
|
|
41
|
+
|
|
42
|
+
#: Shortcut to Vortex's root logger
|
|
43
|
+
logger = bloggers.getLogger('vortex')
|
|
44
|
+
|
|
45
|
+
# Populate a fake proxy module with footprints shortcuts
|
|
46
|
+
|
|
47
|
+
from . import proxy
|
|
48
|
+
setup = footprints.config.get()
|
|
49
|
+
setup.add_proxy(proxy)
|
|
50
|
+
proxy.cat = footprints.proxy.cat
|
|
51
|
+
proxy.objects = footprints.proxy.objects
|
|
52
|
+
|
|
53
|
+
# Set a background environment and a root session
|
|
54
|
+
|
|
55
|
+
from . import tools
|
|
56
|
+
from . import sessions
|
|
57
|
+
from . import config
|
|
58
|
+
|
|
59
|
+
rootenv = tools.env.Environment(active=True)
|
|
60
|
+
|
|
61
|
+
rs = sessions.get(active=True, topenv=rootenv, glove=sessions.getglove(), prompt=__prompt__)
|
|
62
|
+
if rs.system().systems_reload():
|
|
63
|
+
rs.system(refill=True)
|
|
64
|
+
del rs
|
|
65
|
+
|
|
66
|
+
# Insert a dynamic callback so that any footprint resolution could check the current Glove
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
def vortexfpdefaults():
|
|
70
|
+
"""Return actual glove, according to current environment."""
|
|
71
|
+
cur_session = sessions.current()
|
|
72
|
+
return dict(
|
|
73
|
+
glove=cur_session.glove,
|
|
74
|
+
systemtarget=cur_session.sh.default_target
|
|
75
|
+
)
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
footprints.setup.callback = vortexfpdefaults
|
|
79
|
+
|
|
80
|
+
# Shorthands to sessions components
|
|
81
|
+
|
|
82
|
+
ticket = sessions.get
|
|
83
|
+
sh = sessions.system
|
|
84
|
+
|
|
85
|
+
# Specific toolbox exceptions
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
class VortexForceComplete(Exception):
|
|
89
|
+
"""Exception for handling fast exit mecanisms."""
|
|
90
|
+
pass
|
|
91
|
+
|
|
92
|
+
# If a config file can be found in current dir, load it
|
|
93
|
+
config.load_config()
|
|
94
|
+
|
|
95
|
+
# 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
|
|
106
|
+
|
|
107
|
+
# Now load plugins that have been installed with the
|
|
108
|
+
# 'vtx' entry point. Order matters: since plugins
|
|
109
|
+
# will typically depend on objects defined in 'vortex'
|
|
110
|
+
# and 'vortex.nwp', these must be imported /before/
|
|
111
|
+
# loading plugins.
|
|
112
|
+
from importlib.metadata import entry_points
|
|
113
|
+
for plugin in entry_points(group='vtx'):
|
|
114
|
+
plugin.load()
|
|
115
|
+
print(f"Loaded plugin {plugin.name}")
|
|
116
|
+
|
|
117
|
+
# Register proper vortex exit before the end of interpreter session
|
|
118
|
+
|
|
119
|
+
import bronx.stdtypes.date
|
|
120
|
+
def complete():
|
|
121
|
+
sessions.exit()
|
|
122
|
+
import multiprocessing
|
|
123
|
+
for kid in multiprocessing.active_children():
|
|
124
|
+
logger.warning('Terminate active kid %s', str(kid))
|
|
125
|
+
kid.terminate()
|
|
126
|
+
print('Vortex', __version__, 'completed', '(', bronx.stdtypes.date.at_second().reallynice(), ')')
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
import atexit
|
|
130
|
+
atexit.register(complete)
|
|
131
|
+
del atexit, complete
|
|
132
|
+
|
|
133
|
+
print('Vortex', __version__, 'loaded', '(', bronx.stdtypes.date.at_second().reallynice(), ')')
|
|
134
|
+
|
|
135
|
+
del footprints
|
vortex/algo/__init__.py
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Generic AlgoComponent classes (and related utility classes).
|
|
3
|
+
|
|
4
|
+
Application specific AlgoComponent classes should be defined in dedicated packages.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from . import components, serversynctools
|
|
8
|
+
|
|
9
|
+
#: No automatic export
|
|
10
|
+
__all__ = []
|
|
11
|
+
|
|
12
|
+
__tocinfoline__ = 'Generic AlgoComponent classes (and their utility classes)'
|