vortex-nwp 2.0.0b1__py3-none-any.whl → 2.0.0b2__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 +59 -45
- vortex/algo/__init__.py +3 -2
- vortex/algo/components.py +940 -614
- vortex/algo/mpitools.py +802 -497
- 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 +428 -225
- vortex/data/outflow.py +15 -15
- vortex/data/providers.py +185 -163
- vortex/data/resources.py +48 -42
- vortex/data/stores.py +544 -413
- 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 +420 -271
- vortex/nwp/algo/fpserver.py +683 -307
- vortex/nwp/algo/ifsnaming.py +205 -145
- vortex/nwp/algo/ifsroot.py +210 -122
- vortex/nwp/algo/monitoring.py +132 -76
- vortex/nwp/algo/mpitools.py +321 -191
- vortex/nwp/algo/odbtools.py +617 -353
- vortex/nwp/algo/oopsroot.py +449 -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 +125 -59
- 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 +311 -149
- vortex/tools/lfi.py +423 -216
- vortex/tools/listings.py +109 -40
- vortex/tools/names.py +218 -156
- vortex/tools/net.py +632 -298
- vortex/tools/parallelism.py +93 -61
- vortex/tools/prestaging.py +55 -31
- vortex/tools/schedulers.py +172 -105
- vortex/tools/services.py +402 -333
- vortex/tools/storage.py +293 -358
- vortex/tools/surfex.py +24 -24
- vortex/tools/systems.py +1211 -631
- vortex/tools/targets.py +156 -100
- vortex/util/__init__.py +1 -1
- vortex/util/config.py +377 -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.0.0b2.dist-info/METADATA +66 -0
- vortex_nwp-2.0.0b2.dist-info/RECORD +142 -0
- {vortex_nwp-2.0.0b1.dist-info → vortex_nwp-2.0.0b2.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.0.0b2.dist-info}/LICENSE +0 -0
- {vortex_nwp-2.0.0b1.dist-info → vortex_nwp-2.0.0b2.dist-info}/top_level.txt +0 -0
vortex/nwp/tools/igastuff.py
CHANGED
|
@@ -11,56 +11,70 @@ __all__ = []
|
|
|
11
11
|
fuzzystr = dict(
|
|
12
12
|
histfix=dict(
|
|
13
13
|
historic=dict(
|
|
14
|
-
pearp=
|
|
15
|
-
|
|
14
|
+
pearp="prev",
|
|
15
|
+
arome="AROM",
|
|
16
|
+
arpege="arpe",
|
|
17
|
+
arp_court="arpe",
|
|
18
|
+
aearp="arpe",
|
|
19
|
+
aladin="ALAD",
|
|
20
|
+
surfex="SURF",
|
|
16
21
|
)
|
|
17
22
|
),
|
|
18
23
|
prefix=dict(
|
|
19
24
|
# LFM 2016/12/30: It was dble='PA' but apparently it's wrong. No idea why...
|
|
20
|
-
gridpoint=dict(oper=
|
|
21
|
-
historic=dict(
|
|
22
|
-
|
|
25
|
+
gridpoint=dict(oper="PE", dble="PE", mirr="PE", hycom_grb="vent"),
|
|
26
|
+
historic=dict(
|
|
27
|
+
hycom="s_init0_", mfwam="BLS_", mfwam_BLS="BLS_", mfwam_LAW="LAW_"
|
|
28
|
+
),
|
|
29
|
+
analysis=dict(hycom="s_init0_", mfwam="LAW_"),
|
|
23
30
|
),
|
|
24
31
|
suffix=dict(
|
|
25
|
-
bgstderr=dict(input=
|
|
26
|
-
analysis=dict(
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
32
|
+
bgstderr=dict(input="in", output="out"),
|
|
33
|
+
analysis=dict(
|
|
34
|
+
hycom_hycom=".gz", hycom_surcotes=".gz", hycom_surcotes_oi=".gz"
|
|
35
|
+
),
|
|
36
|
+
historic=dict(
|
|
37
|
+
surfex_arpege=".sfx",
|
|
38
|
+
surfex_aearp=".sfx",
|
|
39
|
+
hycom_hycom=".gz",
|
|
40
|
+
hycom_surcotes=".gz",
|
|
41
|
+
hycom_surcotes_oi=".gz",
|
|
42
|
+
),
|
|
43
|
+
gridpoint=dict(hycom_grb="grb"),
|
|
30
44
|
),
|
|
31
45
|
term0003=dict(
|
|
32
|
-
bgstderr=dict(input=
|
|
46
|
+
bgstderr=dict(input="", output="_assim"),
|
|
33
47
|
),
|
|
34
48
|
term0009=dict(
|
|
35
|
-
bgstderr=dict(input=
|
|
49
|
+
bgstderr=dict(input="", output="_production"),
|
|
36
50
|
),
|
|
37
51
|
term0012=dict(
|
|
38
|
-
bgstderr=dict(input=
|
|
52
|
+
bgstderr=dict(input="_production_dsbscr", output="_production_dsbscr"),
|
|
39
53
|
),
|
|
40
54
|
varbcarpege=dict(
|
|
41
|
-
varbc=dict(input=
|
|
55
|
+
varbc=dict(input=".cycle_arp", output=".cycle"),
|
|
42
56
|
),
|
|
43
57
|
varbcaladin=dict(
|
|
44
|
-
varbc=dict(input=
|
|
58
|
+
varbc=dict(input=".cycle_alad", output=".cycle"),
|
|
45
59
|
),
|
|
46
60
|
varbcarome=dict(
|
|
47
|
-
varbc=dict(input=
|
|
61
|
+
varbc=dict(input=".cycle_aro", output=".cycle"),
|
|
48
62
|
),
|
|
49
63
|
surf0000=dict(
|
|
50
|
-
histsurf=dict(input=
|
|
51
|
-
historic=dict(input=
|
|
64
|
+
histsurf=dict(input="INIT_SURF", output="INIT_SURF"),
|
|
65
|
+
historic=dict(input="INIT_SURF", output="INIT_SURF"),
|
|
52
66
|
),
|
|
53
67
|
surf0003=dict(
|
|
54
|
-
histsurf=dict(input=
|
|
55
|
-
historic=dict(input=
|
|
68
|
+
histsurf=dict(input="PREP", output="AROMOUT_.0003"),
|
|
69
|
+
historic=dict(input="PREP", output="AROMOUT_.0003"),
|
|
56
70
|
),
|
|
57
71
|
surf0006=dict(
|
|
58
|
-
histsurf=dict(input=
|
|
59
|
-
historic=dict(input=
|
|
72
|
+
histsurf=dict(input="PREP", output="AROMOUT_.0006"),
|
|
73
|
+
historic=dict(input="PREP", output="AROMOUT_.0006"),
|
|
60
74
|
),
|
|
61
75
|
)
|
|
62
76
|
|
|
63
|
-
arpcourt_vconf = (
|
|
77
|
+
arpcourt_vconf = ("courtfr", "frcourt", "court")
|
|
64
78
|
|
|
65
79
|
|
|
66
80
|
def fuzzyname(entry, realkind, key, default=None):
|
|
@@ -81,35 +95,21 @@ def archive_suffix(model, cutoff, date, vconf=None):
|
|
|
81
95
|
for h in hh:
|
|
82
96
|
hrange.append("%02d" % h)
|
|
83
97
|
|
|
84
|
-
if cutoff ==
|
|
85
|
-
rr = dict(
|
|
86
|
-
zip(
|
|
87
|
-
zip(
|
|
88
|
-
(cutoff,) * len(hrange),
|
|
89
|
-
hh
|
|
90
|
-
),
|
|
91
|
-
hrange
|
|
92
|
-
)
|
|
93
|
-
)
|
|
98
|
+
if cutoff == "assim":
|
|
99
|
+
rr = dict(zip(zip((cutoff,) * len(hrange), hh), hrange))
|
|
94
100
|
else:
|
|
95
|
-
if re.search(r
|
|
101
|
+
if re.search(r"court|arome", model) or vconf in arpcourt_vconf:
|
|
96
102
|
rr = dict(
|
|
97
103
|
zip(
|
|
98
|
-
zip(
|
|
99
|
-
|
|
100
|
-
hh
|
|
101
|
-
),
|
|
102
|
-
('CM', 'TR', 'SX', 'NF', 'PM', 'QZ', 'DH', 'VU')
|
|
104
|
+
zip((cutoff,) * len(hrange), hh),
|
|
105
|
+
("CM", "TR", "SX", "NF", "PM", "QZ", "DH", "VU"),
|
|
103
106
|
)
|
|
104
107
|
)
|
|
105
108
|
else:
|
|
106
109
|
rr = dict(
|
|
107
110
|
zip(
|
|
108
|
-
zip(
|
|
109
|
-
|
|
110
|
-
hh
|
|
111
|
-
),
|
|
112
|
-
('AM', 'TR', 'SX', 'NF', 'PM', 'QZ', 'DH', 'VU')
|
|
111
|
+
zip((cutoff,) * len(hrange), hh),
|
|
112
|
+
("AM", "TR", "SX", "NF", "PM", "QZ", "DH", "VU"),
|
|
113
113
|
)
|
|
114
114
|
)
|
|
115
115
|
|
|
@@ -123,7 +123,7 @@ class _BaseIgakeyFactory(str):
|
|
|
123
123
|
Needs to be subclassed !
|
|
124
124
|
"""
|
|
125
125
|
|
|
126
|
-
_re_appconf = re.compile(r
|
|
126
|
+
_re_appconf = re.compile(r"^(\w+)/([\w@]+)$")
|
|
127
127
|
_keymap = {}
|
|
128
128
|
|
|
129
129
|
def __new__(cls, value):
|
|
@@ -134,9 +134,9 @@ class _BaseIgakeyFactory(str):
|
|
|
134
134
|
"""
|
|
135
135
|
val_split = cls._re_appconf.match(value)
|
|
136
136
|
if val_split:
|
|
137
|
-
value = cls._keymap.get(val_split.group(1),
|
|
138
|
-
|
|
139
|
-
|
|
137
|
+
value = cls._keymap.get(val_split.group(1), {}).get(
|
|
138
|
+
val_split.group(2), val_split.group(1)
|
|
139
|
+
)
|
|
140
140
|
return str.__new__(cls, value)
|
|
141
141
|
|
|
142
142
|
|
|
@@ -145,52 +145,65 @@ class IgakeyFactoryArchive(_BaseIgakeyFactory):
|
|
|
145
145
|
Given the vapp/vconf, returns a default value for the igakey attribute
|
|
146
146
|
"""
|
|
147
147
|
|
|
148
|
-
_keymap = {
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
148
|
+
_keymap = {
|
|
149
|
+
"arpege": {
|
|
150
|
+
"4dvarfr": "arpege",
|
|
151
|
+
"4dvar": "arpege",
|
|
152
|
+
"pearp": "pearp",
|
|
153
|
+
"aearp": "aearp",
|
|
154
|
+
"courtfr": "arpege",
|
|
155
|
+
"frcourt": "arpege",
|
|
156
|
+
"court": "arpege",
|
|
157
|
+
},
|
|
158
|
+
"mocage": {
|
|
159
|
+
"camsfcst": "macc",
|
|
160
|
+
"camsassim": "macc",
|
|
161
|
+
},
|
|
162
|
+
"arome": {
|
|
163
|
+
"3dvarfr": "arome",
|
|
164
|
+
"france": "arome",
|
|
165
|
+
"pegase": "pegase",
|
|
166
|
+
},
|
|
167
|
+
"aladin": {
|
|
168
|
+
"antiguy": "antiguy",
|
|
169
|
+
"caledonie": "caledonie",
|
|
170
|
+
"nc": "caledonie",
|
|
171
|
+
"polynesie": "polynesie",
|
|
172
|
+
"reunion": "reunion",
|
|
173
|
+
},
|
|
174
|
+
"hycom": {
|
|
175
|
+
"atl@anarp": "surcotes",
|
|
176
|
+
"med@anarp": "surcotes",
|
|
177
|
+
"atl@fcarp": "surcotes",
|
|
178
|
+
"med@fcarp": "surcotes",
|
|
179
|
+
"atl@anaro": "surcotes",
|
|
180
|
+
"med@anaro": "surcotes",
|
|
181
|
+
"atl@fcaro": "surcotes",
|
|
182
|
+
"med@fcaro": "surcotes",
|
|
183
|
+
"atl@fcaoc": "surcotes",
|
|
184
|
+
"med@fcaoc": "surcotes",
|
|
185
|
+
"oin@ancep": "surcotes_oi",
|
|
186
|
+
"oin@fcaro": "surcotes_oi",
|
|
187
|
+
},
|
|
188
|
+
"mfwam": {
|
|
189
|
+
"globalcep02": "mfwamglocep02",
|
|
190
|
+
"globalcep01": "mfwamglocep01",
|
|
191
|
+
"reuaro01": "mfwamreuaro",
|
|
192
|
+
"polyaro01": "mfwampolyaro",
|
|
193
|
+
"caledaro01": "mfwamcaledaro",
|
|
194
|
+
"globalarp02": "mfwamgloarp02",
|
|
195
|
+
"globalarpc02": "mfwamgloarpc02",
|
|
196
|
+
"atourxarp01": "mfwamatourx01arp",
|
|
197
|
+
"euratarpc01": "mfwameurcourt",
|
|
198
|
+
"frangparo0025": "mfwamfrangp0025",
|
|
199
|
+
"frangparoifs0025": "mfwamfrangp0025ifs",
|
|
200
|
+
"assmp1": "mfwamassmp1",
|
|
201
|
+
"assmp2": "mfwamassmp2",
|
|
202
|
+
"assms1": "mfwamassms1",
|
|
203
|
+
"assms2": "mfwamassms2",
|
|
204
|
+
"angola0025": "mfwamangola",
|
|
205
|
+
},
|
|
206
|
+
}
|
|
194
207
|
|
|
195
208
|
|
|
196
209
|
class IgakeyFactoryInline(_BaseIgakeyFactory):
|
|
@@ -198,52 +211,63 @@ class IgakeyFactoryInline(_BaseIgakeyFactory):
|
|
|
198
211
|
Given the vapp/vconf, returns a default value for the igakey attribute
|
|
199
212
|
"""
|
|
200
213
|
|
|
201
|
-
_keymap = {
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
214
|
+
_keymap = {
|
|
215
|
+
"arpege": {
|
|
216
|
+
"4dvarfr": "france",
|
|
217
|
+
"4dvar": "france",
|
|
218
|
+
"pearp": "pearp",
|
|
219
|
+
"aearp": "aearp",
|
|
220
|
+
"courtfr": "frcourt",
|
|
221
|
+
"frcourt": "frcourt",
|
|
222
|
+
"court": "frcourt",
|
|
223
|
+
},
|
|
224
|
+
"arome": {
|
|
225
|
+
"3dvarfr": "france",
|
|
226
|
+
"france": "france",
|
|
227
|
+
"pegase": "pegase",
|
|
228
|
+
},
|
|
229
|
+
"aladin": {
|
|
230
|
+
"antiguy": "antiguy",
|
|
231
|
+
"caledonie": "caledonie",
|
|
232
|
+
"nc": "caledonie",
|
|
233
|
+
"polynesie": "polynesie",
|
|
234
|
+
"reunion": "reunion",
|
|
235
|
+
},
|
|
236
|
+
"hycom": {
|
|
237
|
+
"atl@anarp": "surcotes",
|
|
238
|
+
"med@anarp": "surcotes",
|
|
239
|
+
"atl@fcarp": "surcotes",
|
|
240
|
+
"med@fcarp": "surcotes",
|
|
241
|
+
"atl@ancep": "surcotes",
|
|
242
|
+
"med@ancep": "surcotes",
|
|
243
|
+
"atl@fccep": "surcotes",
|
|
244
|
+
"med@fccep": "surcotes",
|
|
245
|
+
"atl@anaro": "surcotes",
|
|
246
|
+
"med@anaro": "surcotes",
|
|
247
|
+
"atl@fcaro": "surcotes",
|
|
248
|
+
"med@fcaro": "surcotes",
|
|
249
|
+
"atl@red": "surcotes",
|
|
250
|
+
"med@red": "surcotes",
|
|
251
|
+
"oin@ancep": "surcotes_oi",
|
|
252
|
+
"oin@fcaro": "surcotes_oi",
|
|
253
|
+
"oin@red": "surcotes_oi",
|
|
254
|
+
},
|
|
255
|
+
"mfwam": {
|
|
256
|
+
"globalcep02": "mfwamglocep02",
|
|
257
|
+
"globalcep01": "mfwamglocep01",
|
|
258
|
+
"reuaro01": "mfwamreuaro",
|
|
259
|
+
"polyaro01": "mfwampolyaro",
|
|
260
|
+
"caledaro01": "mfwamcaledaro",
|
|
261
|
+
"globalarp02": "mfwamgloarp02",
|
|
262
|
+
"globalarpc02": "mfwamgloarpc02",
|
|
263
|
+
"atourxarp01": "mfwamatourx01arp",
|
|
264
|
+
"euratarpc01": "mfwameurcourt",
|
|
265
|
+
"frangparo0025": "mfwamfrangp0025",
|
|
266
|
+
"frangparoifs0025": "mfwamfrangp0025ifs",
|
|
267
|
+
"assmp1": "mfwamassmp1",
|
|
268
|
+
"assmp2": "mfwamassmp2",
|
|
269
|
+
"assms1": "mfwamassms1",
|
|
270
|
+
"assms2": "mfwamassms2",
|
|
271
|
+
"angola0025": "mfwamangola",
|
|
272
|
+
},
|
|
273
|
+
}
|
vortex/nwp/tools/mars.py
CHANGED
|
@@ -14,16 +14,19 @@ logger = loggers.getLogger(__name__)
|
|
|
14
14
|
|
|
15
15
|
class MarsError(Exception):
|
|
16
16
|
"""General Mars error."""
|
|
17
|
+
|
|
17
18
|
pass
|
|
18
19
|
|
|
19
20
|
|
|
20
21
|
class MarsConfigurationError(MarsError):
|
|
21
22
|
"""Specific Mars configuration error."""
|
|
23
|
+
|
|
22
24
|
pass
|
|
23
25
|
|
|
24
26
|
|
|
25
27
|
class MarsGetError(MarsError):
|
|
26
28
|
"""Generic Mars get error."""
|
|
29
|
+
|
|
27
30
|
pass
|
|
28
31
|
|
|
29
32
|
|
|
@@ -35,7 +38,9 @@ def findMarsExtractCommand(sh, inifile=None, command=None):
|
|
|
35
38
|
actual_command = sh.default_target.get("mars:command", None)
|
|
36
39
|
else:
|
|
37
40
|
actual_config = GenericConfigParser(inifile=actual_inifile)
|
|
38
|
-
if actual_config.has_section(
|
|
41
|
+
if actual_config.has_section("mars") and actual_config.has_option(
|
|
42
|
+
"mars", "command"
|
|
43
|
+
):
|
|
39
44
|
actual_command = actual_config.get("mars", "command")
|
|
40
45
|
if actual_command is None:
|
|
41
46
|
raise MarsConfigurationError("Could not find a proper command.")
|
|
@@ -53,4 +58,11 @@ def callMarsExtract(sh, query_file, command=None, fatal=True):
|
|
|
53
58
|
:return: The return code of the Mars extraction.
|
|
54
59
|
"""
|
|
55
60
|
command_line = " ".join([command, query_file])
|
|
56
|
-
return sh.spawn(
|
|
61
|
+
return sh.spawn(
|
|
62
|
+
[
|
|
63
|
+
command_line,
|
|
64
|
+
],
|
|
65
|
+
shell=True,
|
|
66
|
+
output=False,
|
|
67
|
+
fatal=fatal,
|
|
68
|
+
)
|