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/data/resources.py
CHANGED
|
@@ -16,7 +16,9 @@ from vortex.syntax.stdattrs import nativefmt_deco, notinrepr, term_deco
|
|
|
16
16
|
from .contents import DataContent, UnknownContent, FormatAdapter
|
|
17
17
|
|
|
18
18
|
#: Export Resource and associated Catalog classes.
|
|
19
|
-
__all__ = [
|
|
19
|
+
__all__ = [
|
|
20
|
+
"Resource",
|
|
21
|
+
]
|
|
20
22
|
|
|
21
23
|
logger = loggers.getLogger(__name__)
|
|
22
24
|
|
|
@@ -25,40 +27,40 @@ class Resource(footprints.FootprintBase):
|
|
|
25
27
|
"""Abstract class for any Resource."""
|
|
26
28
|
|
|
27
29
|
_abstract = True
|
|
28
|
-
_collector = (
|
|
30
|
+
_collector = ("resource",)
|
|
29
31
|
_footprint = [
|
|
30
32
|
nativefmt_deco,
|
|
31
33
|
dict(
|
|
32
|
-
info
|
|
33
|
-
attr
|
|
34
|
-
clscontents
|
|
35
|
-
info
|
|
36
|
-
type
|
|
37
|
-
isclass
|
|
38
|
-
optional
|
|
39
|
-
default
|
|
40
|
-
doc_visibility
|
|
34
|
+
info="Abstract Resource",
|
|
35
|
+
attr=dict(
|
|
36
|
+
clscontents=dict(
|
|
37
|
+
info="The class instantiated to read the container's content",
|
|
38
|
+
type=DataContent,
|
|
39
|
+
isclass=True,
|
|
40
|
+
optional=True,
|
|
41
|
+
default=UnknownContent,
|
|
42
|
+
doc_visibility=footprints.doc.visibility.ADVANCED,
|
|
41
43
|
)
|
|
42
44
|
),
|
|
43
|
-
fastkeys
|
|
44
|
-
)
|
|
45
|
+
fastkeys={"kind", "nativefmt"},
|
|
46
|
+
),
|
|
45
47
|
]
|
|
46
48
|
|
|
47
49
|
def __init__(self, *args, **kw):
|
|
48
|
-
logger.debug(
|
|
50
|
+
logger.debug("Resource init %s", self.__class__)
|
|
49
51
|
super().__init__(*args, **kw)
|
|
50
52
|
self._mailbox = LowerCaseDict()
|
|
51
53
|
|
|
52
54
|
@property
|
|
53
55
|
def realkind(self):
|
|
54
|
-
return
|
|
56
|
+
return "resource"
|
|
55
57
|
|
|
56
58
|
def _str_more(self):
|
|
57
59
|
"""Return a string representation of meaningful attributes for formatted output."""
|
|
58
60
|
d = self.footprint_as_shallow_dict()
|
|
59
61
|
for xdel in [x for x in notinrepr if x in d]:
|
|
60
62
|
del d[xdel]
|
|
61
|
-
return
|
|
63
|
+
return " ".join(["{:s}='{!s}'".format(k, v) for k, v in d.items()])
|
|
62
64
|
|
|
63
65
|
@property
|
|
64
66
|
def mailbox(self):
|
|
@@ -74,7 +76,9 @@ class Resource(footprints.FootprintBase):
|
|
|
74
76
|
|
|
75
77
|
def pathinfo(self, provider):
|
|
76
78
|
"""Proxy to the appropriate method prefixed by provider name."""
|
|
77
|
-
actualpathinfo = getattr(
|
|
79
|
+
actualpathinfo = getattr(
|
|
80
|
+
self, provider + "_pathinfo", self.generic_pathinfo
|
|
81
|
+
)
|
|
78
82
|
return actualpathinfo()
|
|
79
83
|
|
|
80
84
|
def generic_basename(self):
|
|
@@ -83,7 +87,9 @@ class Resource(footprints.FootprintBase):
|
|
|
83
87
|
|
|
84
88
|
def basename(self, provider):
|
|
85
89
|
"""Proxy to the appropriate method prefixed by provider name."""
|
|
86
|
-
actualbasename = getattr(
|
|
90
|
+
actualbasename = getattr(
|
|
91
|
+
self, provider + "_basename", self.generic_basename
|
|
92
|
+
)
|
|
87
93
|
return actualbasename()
|
|
88
94
|
|
|
89
95
|
def namebuilding_info(self):
|
|
@@ -91,7 +97,7 @@ class Resource(footprints.FootprintBase):
|
|
|
91
97
|
Returns anonymous dict with suitable informations from vortex point of view.
|
|
92
98
|
In real world, probably doomed to return an empty dict.
|
|
93
99
|
"""
|
|
94
|
-
return {
|
|
100
|
+
return {"radical": self.realkind}
|
|
95
101
|
|
|
96
102
|
def vortex_urlquery(self):
|
|
97
103
|
"""Query to be binded to the resource's location in vortex space."""
|
|
@@ -99,7 +105,9 @@ class Resource(footprints.FootprintBase):
|
|
|
99
105
|
|
|
100
106
|
def urlquery(self, provider):
|
|
101
107
|
"""Proxy to the appropriate method prefixed by provider name."""
|
|
102
|
-
actualurlquery = getattr(
|
|
108
|
+
actualurlquery = getattr(
|
|
109
|
+
self, provider + "_urlquery", self.vortex_urlquery
|
|
110
|
+
)
|
|
103
111
|
return actualurlquery()
|
|
104
112
|
|
|
105
113
|
def gget_basename(self):
|
|
@@ -112,7 +120,7 @@ class Resource(footprints.FootprintBase):
|
|
|
112
120
|
|
|
113
121
|
def genv_basename(self):
|
|
114
122
|
"""Just retrieve a potential gvar attribute."""
|
|
115
|
-
return getattr(self,
|
|
123
|
+
return getattr(self, "gvar", "")
|
|
116
124
|
|
|
117
125
|
def uenv_basename(self):
|
|
118
126
|
"""Proxy to :meth:`genv_basename`."""
|
|
@@ -120,7 +128,7 @@ class Resource(footprints.FootprintBase):
|
|
|
120
128
|
|
|
121
129
|
def gget_urlquery(self):
|
|
122
130
|
"""Duck typing: return an empty string by default."""
|
|
123
|
-
return
|
|
131
|
+
return ""
|
|
124
132
|
|
|
125
133
|
def uget_urlquery(self):
|
|
126
134
|
"""Proxy to :meth:`gget_urlquery`."""
|
|
@@ -155,34 +163,32 @@ class Resource(footprints.FootprintBase):
|
|
|
155
163
|
|
|
156
164
|
|
|
157
165
|
class Unknown(Resource):
|
|
158
|
-
|
|
159
166
|
_footprint = [
|
|
160
167
|
dict(
|
|
161
|
-
info
|
|
162
|
-
attr
|
|
163
|
-
unknown
|
|
164
|
-
|
|
165
|
-
|
|
168
|
+
info="Unknown assumed NWP Resource (development only !)",
|
|
169
|
+
attr=dict(
|
|
170
|
+
unknown=dict(info="Activate the unknown resource.", type=bool),
|
|
171
|
+
nickname=dict(
|
|
172
|
+
info="The string that serves the purpose of Vortex's basename radical",
|
|
173
|
+
optional=True,
|
|
174
|
+
default="unknown",
|
|
166
175
|
),
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
optional = True,
|
|
170
|
-
default = 'unknown'
|
|
171
|
-
),
|
|
172
|
-
clscontents = dict(
|
|
173
|
-
default = FormatAdapter,
|
|
176
|
+
clscontents=dict(
|
|
177
|
+
default=FormatAdapter,
|
|
174
178
|
),
|
|
175
179
|
),
|
|
176
|
-
fastkeys
|
|
180
|
+
fastkeys={"unknown"},
|
|
177
181
|
)
|
|
178
182
|
]
|
|
179
183
|
|
|
180
184
|
def namebuilding_info(self):
|
|
181
185
|
"""Keep the Unknown resource unknown."""
|
|
182
186
|
bdict = super().namebuilding_info()
|
|
183
|
-
bdict.update(
|
|
184
|
-
|
|
185
|
-
|
|
187
|
+
bdict.update(
|
|
188
|
+
radical=self.nickname,
|
|
189
|
+
)
|
|
190
|
+
if self.nativefmt in ("auto", "autoconfig", "foo", "unknown"):
|
|
191
|
+
del bdict["fmt"]
|
|
186
192
|
return bdict
|
|
187
193
|
|
|
188
194
|
|
|
@@ -190,12 +196,12 @@ class UnknownWithTerm(Unknown):
|
|
|
190
196
|
_footprint = [
|
|
191
197
|
term_deco,
|
|
192
198
|
dict(
|
|
193
|
-
info
|
|
199
|
+
info="Unknown assumed NWP Resource but with term (development only !)",
|
|
194
200
|
),
|
|
195
201
|
]
|
|
196
202
|
|
|
197
203
|
|
|
198
204
|
# Activate the footprint's fasttrack on the resources collector
|
|
199
|
-
fcollect = footprints.collectors.get(tag=
|
|
200
|
-
fcollect.fasttrack = (
|
|
205
|
+
fcollect = footprints.collectors.get(tag="resource")
|
|
206
|
+
fcollect.fasttrack = ("kind",)
|
|
201
207
|
del fcollect
|