vortex-nwp 2.0.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 +159 -0
- vortex/algo/__init__.py +13 -0
- vortex/algo/components.py +2462 -0
- vortex/algo/mpitools.py +1953 -0
- vortex/algo/mpitools_templates/__init__.py +1 -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 +171 -0
- vortex/config.py +112 -0
- vortex/data/__init__.py +19 -0
- vortex/data/abstractstores.py +1510 -0
- vortex/data/containers.py +835 -0
- vortex/data/contents.py +622 -0
- vortex/data/executables.py +275 -0
- vortex/data/flow.py +119 -0
- vortex/data/geometries.ini +2689 -0
- vortex/data/geometries.py +799 -0
- vortex/data/handlers.py +1230 -0
- vortex/data/outflow.py +67 -0
- vortex/data/providers.py +487 -0
- vortex/data/resources.py +207 -0
- vortex/data/stores.py +1390 -0
- vortex/data/sync_templates/__init__.py +0 -0
- vortex/gloves.py +309 -0
- vortex/layout/__init__.py +20 -0
- vortex/layout/contexts.py +577 -0
- vortex/layout/dataflow.py +1220 -0
- vortex/layout/monitor.py +969 -0
- vortex/nwp/__init__.py +14 -0
- vortex/nwp/algo/__init__.py +21 -0
- vortex/nwp/algo/assim.py +537 -0
- vortex/nwp/algo/clim.py +1086 -0
- vortex/nwp/algo/coupling.py +831 -0
- vortex/nwp/algo/eda.py +840 -0
- vortex/nwp/algo/eps.py +785 -0
- vortex/nwp/algo/forecasts.py +886 -0
- vortex/nwp/algo/fpserver.py +1303 -0
- vortex/nwp/algo/ifsnaming.py +463 -0
- vortex/nwp/algo/ifsroot.py +404 -0
- vortex/nwp/algo/monitoring.py +263 -0
- vortex/nwp/algo/mpitools.py +694 -0
- vortex/nwp/algo/odbtools.py +1258 -0
- vortex/nwp/algo/oopsroot.py +916 -0
- vortex/nwp/algo/oopstests.py +220 -0
- vortex/nwp/algo/request.py +660 -0
- vortex/nwp/algo/stdpost.py +1641 -0
- vortex/nwp/data/__init__.py +30 -0
- vortex/nwp/data/assim.py +380 -0
- vortex/nwp/data/boundaries.py +314 -0
- vortex/nwp/data/climfiles.py +521 -0
- vortex/nwp/data/configfiles.py +153 -0
- vortex/nwp/data/consts.py +954 -0
- vortex/nwp/data/ctpini.py +149 -0
- vortex/nwp/data/diagnostics.py +209 -0
- vortex/nwp/data/eda.py +147 -0
- vortex/nwp/data/eps.py +432 -0
- vortex/nwp/data/executables.py +1045 -0
- vortex/nwp/data/fields.py +111 -0
- vortex/nwp/data/gridfiles.py +380 -0
- vortex/nwp/data/logs.py +584 -0
- vortex/nwp/data/modelstates.py +363 -0
- vortex/nwp/data/monitoring.py +193 -0
- vortex/nwp/data/namelists.py +696 -0
- vortex/nwp/data/obs.py +840 -0
- vortex/nwp/data/oopsexec.py +74 -0
- vortex/nwp/data/providers.py +207 -0
- vortex/nwp/data/query.py +206 -0
- vortex/nwp/data/stores.py +160 -0
- vortex/nwp/data/surfex.py +337 -0
- vortex/nwp/syntax/__init__.py +9 -0
- vortex/nwp/syntax/stdattrs.py +437 -0
- vortex/nwp/tools/__init__.py +10 -0
- vortex/nwp/tools/addons.py +40 -0
- vortex/nwp/tools/agt.py +67 -0
- vortex/nwp/tools/bdap.py +59 -0
- vortex/nwp/tools/bdcp.py +41 -0
- vortex/nwp/tools/bdm.py +24 -0
- vortex/nwp/tools/bdmp.py +54 -0
- vortex/nwp/tools/conftools.py +1661 -0
- vortex/nwp/tools/drhook.py +66 -0
- vortex/nwp/tools/grib.py +294 -0
- vortex/nwp/tools/gribdiff.py +104 -0
- vortex/nwp/tools/ifstools.py +203 -0
- vortex/nwp/tools/igastuff.py +273 -0
- vortex/nwp/tools/mars.py +68 -0
- vortex/nwp/tools/odb.py +657 -0
- vortex/nwp/tools/partitioning.py +258 -0
- vortex/nwp/tools/satrad.py +71 -0
- vortex/nwp/util/__init__.py +6 -0
- vortex/nwp/util/async.py +212 -0
- vortex/nwp/util/beacon.py +40 -0
- vortex/nwp/util/diffpygram.py +447 -0
- vortex/nwp/util/ens.py +279 -0
- vortex/nwp/util/hooks.py +139 -0
- vortex/nwp/util/taskdeco.py +85 -0
- vortex/nwp/util/usepygram.py +697 -0
- vortex/nwp/util/usetnt.py +101 -0
- vortex/proxy.py +6 -0
- vortex/sessions.py +374 -0
- vortex/syntax/__init__.py +9 -0
- vortex/syntax/stdattrs.py +867 -0
- vortex/syntax/stddeco.py +185 -0
- vortex/toolbox.py +1117 -0
- vortex/tools/__init__.py +20 -0
- vortex/tools/actions.py +523 -0
- vortex/tools/addons.py +316 -0
- vortex/tools/arm.py +96 -0
- vortex/tools/compression.py +325 -0
- vortex/tools/date.py +27 -0
- vortex/tools/ddhpack.py +10 -0
- vortex/tools/delayedactions.py +782 -0
- vortex/tools/env.py +541 -0
- vortex/tools/folder.py +834 -0
- vortex/tools/grib.py +738 -0
- vortex/tools/lfi.py +953 -0
- vortex/tools/listings.py +423 -0
- vortex/tools/names.py +637 -0
- vortex/tools/net.py +2124 -0
- vortex/tools/odb.py +10 -0
- vortex/tools/parallelism.py +368 -0
- vortex/tools/prestaging.py +210 -0
- vortex/tools/rawfiles.py +10 -0
- vortex/tools/schedulers.py +480 -0
- vortex/tools/services.py +940 -0
- vortex/tools/storage.py +996 -0
- vortex/tools/surfex.py +61 -0
- vortex/tools/systems.py +3976 -0
- vortex/tools/targets.py +440 -0
- vortex/util/__init__.py +9 -0
- vortex/util/config.py +1122 -0
- vortex/util/empty.py +24 -0
- vortex/util/helpers.py +216 -0
- vortex/util/introspection.py +69 -0
- vortex/util/iosponge.py +80 -0
- vortex/util/roles.py +49 -0
- vortex/util/storefunctions.py +129 -0
- vortex/util/structs.py +26 -0
- vortex/util/worker.py +162 -0
- vortex_nwp-2.0.0.dist-info/METADATA +67 -0
- vortex_nwp-2.0.0.dist-info/RECORD +144 -0
- vortex_nwp-2.0.0.dist-info/WHEEL +5 -0
- vortex_nwp-2.0.0.dist-info/licenses/LICENSE +517 -0
- vortex_nwp-2.0.0.dist-info/top_level.txt +1 -0
vortex/__init__.py
ADDED
|
@@ -0,0 +1,159 @@
|
|
|
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
|
+
import atexit
|
|
24
|
+
import sys
|
|
25
|
+
|
|
26
|
+
# importlib.metadata included in stdlib from 3.8 onwards.
|
|
27
|
+
# For older versions, import third-party importlib_metadata
|
|
28
|
+
if sys.version_info < (3, 8):
|
|
29
|
+
import importlib_metadata
|
|
30
|
+
import importlib
|
|
31
|
+
|
|
32
|
+
importlib.metadata = importlib_metadata
|
|
33
|
+
else:
|
|
34
|
+
import importlib.metadata
|
|
35
|
+
|
|
36
|
+
from bronx.fancies import loggers as bloggers
|
|
37
|
+
import bronx.stdtypes.date
|
|
38
|
+
|
|
39
|
+
import footprints
|
|
40
|
+
|
|
41
|
+
# Populate a fake proxy module with footprints shortcuts
|
|
42
|
+
from . import proxy, tools, sessions, config
|
|
43
|
+
|
|
44
|
+
# vortex user API
|
|
45
|
+
from .toolbox import input as input
|
|
46
|
+
from .toolbox import output as output
|
|
47
|
+
from .toolbox import executable as executable
|
|
48
|
+
from .toolbox import promise as promise
|
|
49
|
+
from .toolbox import diff as diff
|
|
50
|
+
from .toolbox import defaults as defaults
|
|
51
|
+
from .toolbox import algo as task
|
|
52
|
+
|
|
53
|
+
from . import nwp as nwp # footprints import
|
|
54
|
+
|
|
55
|
+
__version__ = "2.0.0"
|
|
56
|
+
__prompt__ = "Vortex v-" + __version__ + ":"
|
|
57
|
+
|
|
58
|
+
__nextversion__ = "2.0.1"
|
|
59
|
+
__tocinfoline__ = "VORTEX core package"
|
|
60
|
+
|
|
61
|
+
__all__ = [
|
|
62
|
+
"input",
|
|
63
|
+
"output",
|
|
64
|
+
"executable",
|
|
65
|
+
"task",
|
|
66
|
+
"promise",
|
|
67
|
+
"diff",
|
|
68
|
+
]
|
|
69
|
+
|
|
70
|
+
# Set vortex specific priorities for footprints usage
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
footprints.priorities.set_before("debug", "olive", "oper")
|
|
74
|
+
|
|
75
|
+
# Set a root logging mechanism for vortex
|
|
76
|
+
|
|
77
|
+
#: Shortcut to Vortex's root logger
|
|
78
|
+
logger = bloggers.getLogger("vortex")
|
|
79
|
+
|
|
80
|
+
setup = footprints.config.get()
|
|
81
|
+
setup.add_proxy(proxy)
|
|
82
|
+
proxy.cat = footprints.proxy.cat
|
|
83
|
+
proxy.objects = footprints.proxy.objects
|
|
84
|
+
|
|
85
|
+
# Set a background environment and a root session
|
|
86
|
+
rootenv = tools.env.Environment(active=True)
|
|
87
|
+
|
|
88
|
+
rs = sessions.get(
|
|
89
|
+
active=True, topenv=rootenv, glove=sessions.getglove(), prompt=__prompt__
|
|
90
|
+
)
|
|
91
|
+
if rs.system().systems_reload():
|
|
92
|
+
rs.system(refill=True)
|
|
93
|
+
del rs
|
|
94
|
+
|
|
95
|
+
# Insert a dynamic callback so that any footprint resolution could check the current Glove
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
def vortexfpdefaults():
|
|
99
|
+
"""Return actual glove, according to current environment."""
|
|
100
|
+
cur_session = sessions.current()
|
|
101
|
+
return dict(
|
|
102
|
+
glove=cur_session.glove, systemtarget=cur_session.sh.default_target
|
|
103
|
+
)
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
footprints.setup.callback = vortexfpdefaults
|
|
107
|
+
|
|
108
|
+
# Shorthands to sessions components
|
|
109
|
+
|
|
110
|
+
ticket = sessions.get
|
|
111
|
+
sh = sessions.system
|
|
112
|
+
|
|
113
|
+
# If a config file can be found in current dir, load it
|
|
114
|
+
config.load_config()
|
|
115
|
+
|
|
116
|
+
# Load some superstars sub-packages
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
# Now load plugins that have been installed with the
|
|
120
|
+
# 'vtx' entry point. Order matters: since plugins
|
|
121
|
+
# will typically depend on objects defined in 'vortex'
|
|
122
|
+
# and 'vortex.nwp', these must be imported /before/
|
|
123
|
+
# loading plugins.
|
|
124
|
+
for plugin in importlib.metadata.entry_points(group="vtx"):
|
|
125
|
+
plugin.load()
|
|
126
|
+
print(f"Loaded plugin {plugin.name}")
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
# Register proper vortex exit before the end of interpreter session
|
|
130
|
+
def complete():
|
|
131
|
+
sessions.exit()
|
|
132
|
+
import multiprocessing
|
|
133
|
+
|
|
134
|
+
for kid in multiprocessing.active_children():
|
|
135
|
+
logger.warning("Terminate active kid %s", str(kid))
|
|
136
|
+
kid.terminate()
|
|
137
|
+
print(
|
|
138
|
+
"Vortex",
|
|
139
|
+
__version__,
|
|
140
|
+
"completed",
|
|
141
|
+
"(",
|
|
142
|
+
bronx.stdtypes.date.at_second().reallynice(),
|
|
143
|
+
")",
|
|
144
|
+
)
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
atexit.register(complete)
|
|
148
|
+
del atexit, complete
|
|
149
|
+
|
|
150
|
+
print(
|
|
151
|
+
"Vortex",
|
|
152
|
+
__version__,
|
|
153
|
+
"loaded",
|
|
154
|
+
"(",
|
|
155
|
+
bronx.stdtypes.date.at_second().reallynice(),
|
|
156
|
+
")",
|
|
157
|
+
)
|
|
158
|
+
|
|
159
|
+
del footprints
|
vortex/algo/__init__.py
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
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 as components
|
|
8
|
+
from . import serversynctools as serversynctools
|
|
9
|
+
|
|
10
|
+
#: No automatic export
|
|
11
|
+
__all__ = []
|
|
12
|
+
|
|
13
|
+
__tocinfoline__ = "Generic AlgoComponent classes (and their utility classes)"
|