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/syntax/stddeco.py
ADDED
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Class decorators used in abstract footprints defined in :mod:`vortex.syntax.stdattr`
|
|
3
|
+
in order to alter resource's behaviours to be consistent with the added
|
|
4
|
+
attribute.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def namebuilding_insert(
|
|
9
|
+
targetkey, valuecb, none_discard=False, setdefault=False
|
|
10
|
+
):
|
|
11
|
+
"""Insert/Overwrite an entry in the dictionary returned by namebuilding_info().
|
|
12
|
+
|
|
13
|
+
:param str targetkey: The dictionary's key to alter.
|
|
14
|
+
:param valuecb: The new value for this entry will be returned by the *valuecd*
|
|
15
|
+
callback function.
|
|
16
|
+
:param bool none_discard: ``None`` values are ignored silently.
|
|
17
|
+
:param bool setdefault: Use ``setdefault`` indtead of the usual ``setitem``
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
def _namebuilding_insert_stuff(cls):
|
|
21
|
+
if hasattr(cls, "namebuilding_info"):
|
|
22
|
+
original_namebuilding_info = cls.namebuilding_info
|
|
23
|
+
|
|
24
|
+
def namebuilding_info(self):
|
|
25
|
+
vinfo = original_namebuilding_info(self)
|
|
26
|
+
value = valuecb(self)
|
|
27
|
+
if not none_discard or value is not None:
|
|
28
|
+
if setdefault:
|
|
29
|
+
vinfo.setdefault(targetkey, value)
|
|
30
|
+
else:
|
|
31
|
+
vinfo[targetkey] = value
|
|
32
|
+
return vinfo
|
|
33
|
+
|
|
34
|
+
namebuilding_info.__doc__ = original_namebuilding_info.__doc__
|
|
35
|
+
cls.namebuilding_info = namebuilding_info
|
|
36
|
+
|
|
37
|
+
return cls
|
|
38
|
+
|
|
39
|
+
def _namebuilding_insert_stuff_as_dump():
|
|
40
|
+
return "<class-decorator: replace/add the *{:s}* entry in the namebuilding_info dictionary>".format(
|
|
41
|
+
targetkey
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
_namebuilding_insert_stuff.as_dump = _namebuilding_insert_stuff_as_dump
|
|
45
|
+
|
|
46
|
+
return _namebuilding_insert_stuff
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def namebuilding_append(targetkey, valuecb, none_discard=False):
|
|
50
|
+
"""Append something to an entry of the dictionary returned by namebuilding_info().
|
|
51
|
+
|
|
52
|
+
:param str targetkey: The dictionary's key to alter
|
|
53
|
+
:param valuecb: The new value for this entry will be returned by the *valuecd*
|
|
54
|
+
callback function.
|
|
55
|
+
:param bool none_discard: ``None`` values are ignored silently.
|
|
56
|
+
"""
|
|
57
|
+
|
|
58
|
+
def _namebuilding_append_stuff(cls):
|
|
59
|
+
if hasattr(cls, "namebuilding_info"):
|
|
60
|
+
original_namebuilding_info = cls.namebuilding_info
|
|
61
|
+
|
|
62
|
+
def namebuilding_info(self):
|
|
63
|
+
vinfo = original_namebuilding_info(self)
|
|
64
|
+
value = valuecb(self)
|
|
65
|
+
if not isinstance(value, list):
|
|
66
|
+
value = [
|
|
67
|
+
value,
|
|
68
|
+
]
|
|
69
|
+
if none_discard:
|
|
70
|
+
value = [v for v in value if v is not None]
|
|
71
|
+
if not none_discard or value:
|
|
72
|
+
if targetkey in vinfo:
|
|
73
|
+
some_stuff = vinfo[targetkey]
|
|
74
|
+
if not isinstance(some_stuff, list):
|
|
75
|
+
some_stuff = [
|
|
76
|
+
some_stuff,
|
|
77
|
+
]
|
|
78
|
+
some_stuff.extend(value)
|
|
79
|
+
else:
|
|
80
|
+
some_stuff = value
|
|
81
|
+
vinfo[targetkey] = some_stuff
|
|
82
|
+
return vinfo
|
|
83
|
+
|
|
84
|
+
namebuilding_info.__doc__ = original_namebuilding_info.__doc__
|
|
85
|
+
cls.namebuilding_info = namebuilding_info
|
|
86
|
+
|
|
87
|
+
return cls
|
|
88
|
+
|
|
89
|
+
def _namebuilding_append_stuff_as_dump():
|
|
90
|
+
return "<class-decorator: append things in the *{:s}* entry of the namebuilding_info dictionary>".format(
|
|
91
|
+
targetkey
|
|
92
|
+
)
|
|
93
|
+
|
|
94
|
+
_namebuilding_append_stuff.as_dump = _namebuilding_append_stuff_as_dump
|
|
95
|
+
|
|
96
|
+
return _namebuilding_append_stuff
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
def namebuilding_delete(targetkey):
|
|
100
|
+
"""Delete an entry from the dictionary returned by namebuilding_info().
|
|
101
|
+
|
|
102
|
+
:param str targetkey: The dictionary's key to alter
|
|
103
|
+
"""
|
|
104
|
+
|
|
105
|
+
def _namebuilding_delete_stuff(cls):
|
|
106
|
+
if hasattr(cls, "namebuilding_info"):
|
|
107
|
+
original_namebuilding_info = cls.namebuilding_info
|
|
108
|
+
|
|
109
|
+
def namebuilding_info(self):
|
|
110
|
+
vinfo = original_namebuilding_info(self)
|
|
111
|
+
del vinfo[targetkey]
|
|
112
|
+
return vinfo
|
|
113
|
+
|
|
114
|
+
namebuilding_info.__doc__ = original_namebuilding_info.__doc__
|
|
115
|
+
cls.namebuilding_info = namebuilding_info
|
|
116
|
+
|
|
117
|
+
return cls
|
|
118
|
+
|
|
119
|
+
def _namebuilding_delete_stuff_as_dump():
|
|
120
|
+
return "<class-decorator: delete the *{:s}* entry of the namebuilding_info dictionary>".format(
|
|
121
|
+
targetkey
|
|
122
|
+
)
|
|
123
|
+
|
|
124
|
+
_namebuilding_delete_stuff.as_dump = _namebuilding_delete_stuff_as_dump
|
|
125
|
+
|
|
126
|
+
return _namebuilding_delete_stuff
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
def generic_pathname_insert(
|
|
130
|
+
targetkey, valuecb, none_discard=False, setdefault=False
|
|
131
|
+
):
|
|
132
|
+
"""Insert/Overwrite an entry in the dictionary returned by generic_pathinfo().
|
|
133
|
+
|
|
134
|
+
:param str targetkey: The dictionary's key to alter.
|
|
135
|
+
:param valuecb: The new value for this entry will be returned by the *valuecd*
|
|
136
|
+
callback function.
|
|
137
|
+
:param bool none_discard: ``None`` values are ignored silently.
|
|
138
|
+
:param bool setdefault: Use ``setdefault`` indtead of the usual ``setitem``
|
|
139
|
+
"""
|
|
140
|
+
|
|
141
|
+
def _generic_pathinfo_insert_stuff(cls):
|
|
142
|
+
if hasattr(cls, "generic_pathinfo"):
|
|
143
|
+
original_generic_pathinfo = cls.generic_pathinfo
|
|
144
|
+
|
|
145
|
+
def generic_pathinfo(self):
|
|
146
|
+
vinfo = original_generic_pathinfo(self)
|
|
147
|
+
value = valuecb(self)
|
|
148
|
+
if not none_discard or value is not None:
|
|
149
|
+
if setdefault:
|
|
150
|
+
vinfo.setdefault(targetkey, value)
|
|
151
|
+
else:
|
|
152
|
+
vinfo[targetkey] = value
|
|
153
|
+
return vinfo
|
|
154
|
+
|
|
155
|
+
generic_pathinfo.__doc__ = original_generic_pathinfo.__doc__
|
|
156
|
+
cls.generic_pathinfo = generic_pathinfo
|
|
157
|
+
|
|
158
|
+
return cls
|
|
159
|
+
|
|
160
|
+
def _generic_pathinfo_insert_stuff_as_dump():
|
|
161
|
+
return "<class-decorator: replace/add the *{:s}* entry in the generic_pathinfo dictionary>".format(
|
|
162
|
+
targetkey
|
|
163
|
+
)
|
|
164
|
+
|
|
165
|
+
_generic_pathinfo_insert_stuff.as_dump = (
|
|
166
|
+
_generic_pathinfo_insert_stuff_as_dump
|
|
167
|
+
)
|
|
168
|
+
|
|
169
|
+
return _generic_pathinfo_insert_stuff
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
def overwrite_realkind(thekind):
|
|
173
|
+
"""Adds a realkind property
|
|
174
|
+
|
|
175
|
+
:param str thekind: The value returned by the realkind property
|
|
176
|
+
"""
|
|
177
|
+
|
|
178
|
+
def _actual_overwrite_realkind(cls):
|
|
179
|
+
def realkind(self):
|
|
180
|
+
return thekind
|
|
181
|
+
|
|
182
|
+
cls.realkind = property(realkind)
|
|
183
|
+
return cls
|
|
184
|
+
|
|
185
|
+
return _actual_overwrite_realkind
|