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/nwp/data/fields.py
CHANGED
|
@@ -11,86 +11,101 @@ from vortex.syntax.stddeco import namebuilding_delete, namebuilding_insert
|
|
|
11
11
|
__all__ = []
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
@namebuilding_insert(
|
|
15
|
-
@namebuilding_insert(
|
|
16
|
-
|
|
14
|
+
@namebuilding_insert("radical", lambda s: s.fields)
|
|
15
|
+
@namebuilding_insert(
|
|
16
|
+
"src",
|
|
17
|
+
lambda s: [
|
|
18
|
+
s.origin,
|
|
19
|
+
],
|
|
20
|
+
)
|
|
21
|
+
@namebuilding_delete("fmt")
|
|
17
22
|
class RawFields(StaticResource):
|
|
18
|
-
|
|
19
23
|
_footprint = [
|
|
20
|
-
date_deco,
|
|
24
|
+
date_deco,
|
|
25
|
+
cutoff_deco,
|
|
21
26
|
dict(
|
|
22
|
-
info
|
|
23
|
-
attr
|
|
24
|
-
kind
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
27
|
+
info="File containing a limited list of observations fields",
|
|
28
|
+
attr=dict(
|
|
29
|
+
kind=dict(values=["rawfields"]),
|
|
30
|
+
origin=dict(
|
|
31
|
+
values=[
|
|
32
|
+
"bdm",
|
|
33
|
+
"nesdis",
|
|
34
|
+
"ostia",
|
|
35
|
+
"psy4",
|
|
36
|
+
"mercator_global",
|
|
37
|
+
"bdpe",
|
|
38
|
+
"safosi",
|
|
39
|
+
"safosi_hn",
|
|
40
|
+
"safosi_hs",
|
|
32
41
|
]
|
|
33
42
|
),
|
|
34
|
-
fields
|
|
35
|
-
values
|
|
43
|
+
fields=dict(
|
|
44
|
+
values=[
|
|
45
|
+
"sst",
|
|
46
|
+
"seaice",
|
|
47
|
+
"ocean",
|
|
48
|
+
"seaice_conc",
|
|
49
|
+
"seaice_thick",
|
|
50
|
+
]
|
|
36
51
|
),
|
|
37
|
-
)
|
|
38
|
-
)
|
|
52
|
+
),
|
|
53
|
+
),
|
|
39
54
|
]
|
|
40
55
|
|
|
41
56
|
@property
|
|
42
57
|
def realkind(self):
|
|
43
|
-
return
|
|
58
|
+
return "rawfields"
|
|
44
59
|
|
|
45
60
|
def olive_basename(self):
|
|
46
|
-
if self.origin ==
|
|
47
|
-
bname =
|
|
48
|
-
elif self.fields ==
|
|
49
|
-
bname =
|
|
61
|
+
if self.origin == "nesdis" and self.fields == "sst":
|
|
62
|
+
bname = ".".join((self.fields, self.origin, "bdap"))
|
|
63
|
+
elif self.fields == "seaice":
|
|
64
|
+
bname = "ice_concent"
|
|
50
65
|
else:
|
|
51
|
-
bname =
|
|
66
|
+
bname = ".".join((self.fields, self.origin))
|
|
52
67
|
return bname
|
|
53
68
|
|
|
54
69
|
def archive_basename(self):
|
|
55
|
-
if self.origin ==
|
|
56
|
-
bname =
|
|
57
|
-
elif self.fields ==
|
|
58
|
-
bname =
|
|
70
|
+
if self.origin == "nesdis" and self.fields == "sst":
|
|
71
|
+
bname = ".".join((self.fields, self.origin, "bdap"))
|
|
72
|
+
elif self.fields == "seaice":
|
|
73
|
+
bname = "ice_concent"
|
|
59
74
|
else:
|
|
60
|
-
bname =
|
|
75
|
+
bname = ".".join((self.fields, self.origin))
|
|
61
76
|
return bname
|
|
62
77
|
|
|
63
78
|
|
|
64
|
-
@namebuilding_insert(
|
|
79
|
+
@namebuilding_insert("radical", lambda s: s.fields)
|
|
65
80
|
class GeoFields(GeoFlowResource):
|
|
66
|
-
|
|
67
81
|
_footprint = [
|
|
68
82
|
dict(
|
|
69
|
-
info
|
|
70
|
-
attr
|
|
71
|
-
kind
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
83
|
+
info="File containing a limited list of fields in a specific geometry",
|
|
84
|
+
attr=dict(
|
|
85
|
+
kind=dict(values=["geofields"]),
|
|
86
|
+
fields=dict(
|
|
87
|
+
values=[
|
|
88
|
+
"sst",
|
|
89
|
+
"seaice",
|
|
90
|
+
"ocean",
|
|
91
|
+
"seaice_conc",
|
|
92
|
+
"seaice_thick",
|
|
93
|
+
]
|
|
80
94
|
),
|
|
81
|
-
|
|
95
|
+
nativefmt=dict(values=["fa"], default="fa"),
|
|
96
|
+
),
|
|
82
97
|
)
|
|
83
98
|
]
|
|
84
99
|
|
|
85
100
|
@property
|
|
86
101
|
def realkind(self):
|
|
87
|
-
return
|
|
102
|
+
return "geofields"
|
|
88
103
|
|
|
89
104
|
def olive_basename(self):
|
|
90
|
-
bname =
|
|
91
|
-
if self.fields ==
|
|
105
|
+
bname = "icmshanal" + self.fields
|
|
106
|
+
if self.fields == "seaice":
|
|
92
107
|
bname = bname.upper()
|
|
93
108
|
return bname
|
|
94
109
|
|
|
95
110
|
def archive_basename(self):
|
|
96
|
-
return
|
|
111
|
+
return "icmshanal" + self.fields
|
vortex/nwp/data/gridfiles.py
CHANGED
|
@@ -21,7 +21,7 @@ _ORIGIN_INFO = """Describes where the data originaly comes from. The most common
|
|
|
21
21
|
values are: ana (that stands for analysis), fcst (that stands for
|
|
22
22
|
forecast), hst (that stands for Historic file. i.e a file that contains a
|
|
23
23
|
full model state variable), stat_ad (that stands for statistical adapatation)."""
|
|
24
|
-
_ORIGIN_INFO = _ORIGIN_INFO.replace(
|
|
24
|
+
_ORIGIN_INFO = _ORIGIN_INFO.replace("\n", " ")
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
class AbstractGridpoint(GeoFlowResource):
|
|
@@ -35,48 +35,67 @@ class AbstractGridpoint(GeoFlowResource):
|
|
|
35
35
|
|
|
36
36
|
_abstract = True
|
|
37
37
|
_footprint = dict(
|
|
38
|
-
info
|
|
39
|
-
attr
|
|
40
|
-
origin
|
|
41
|
-
info
|
|
42
|
-
values
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
38
|
+
info="Any kind of GridPoint file.",
|
|
39
|
+
attr=dict(
|
|
40
|
+
origin=dict(
|
|
41
|
+
info=_ORIGIN_INFO,
|
|
42
|
+
values=[
|
|
43
|
+
"analyse",
|
|
44
|
+
"ana",
|
|
45
|
+
"guess",
|
|
46
|
+
"gss",
|
|
47
|
+
"arpege",
|
|
48
|
+
"arp",
|
|
49
|
+
"arome",
|
|
50
|
+
"aro",
|
|
51
|
+
"aladin",
|
|
52
|
+
"ald",
|
|
53
|
+
"historic",
|
|
54
|
+
"hst",
|
|
55
|
+
"forecast",
|
|
56
|
+
"fcst",
|
|
57
|
+
"era40",
|
|
58
|
+
"e40",
|
|
59
|
+
"era15",
|
|
60
|
+
"e15",
|
|
61
|
+
"interp",
|
|
62
|
+
"sumo",
|
|
63
|
+
"filter",
|
|
64
|
+
"stat_ad",
|
|
46
65
|
],
|
|
47
|
-
remap
|
|
48
|
-
analyse
|
|
49
|
-
guess
|
|
50
|
-
arpege
|
|
51
|
-
aladin
|
|
52
|
-
arome
|
|
53
|
-
historic
|
|
54
|
-
forecast
|
|
55
|
-
era40
|
|
56
|
-
era15
|
|
57
|
-
)
|
|
66
|
+
remap=dict(
|
|
67
|
+
analyse="ana",
|
|
68
|
+
guess="gss",
|
|
69
|
+
arpege="arp",
|
|
70
|
+
aladin="ald",
|
|
71
|
+
arome="aro",
|
|
72
|
+
historic="hst",
|
|
73
|
+
forecast="fcst",
|
|
74
|
+
era40="e40",
|
|
75
|
+
era15="e15",
|
|
76
|
+
),
|
|
58
77
|
),
|
|
59
|
-
kind
|
|
60
|
-
values
|
|
61
|
-
remap
|
|
62
|
-
fullpos = 'gridpoint'
|
|
63
|
-
)
|
|
78
|
+
kind=dict(
|
|
79
|
+
values=["gridpoint", "gribfile", "fullpos"],
|
|
80
|
+
remap=dict(fullpos="gridpoint"),
|
|
64
81
|
),
|
|
65
|
-
nativefmt
|
|
66
|
-
values
|
|
82
|
+
nativefmt=dict(
|
|
83
|
+
values=["grib", "grib1", "grib2", "netcdf", "fa"],
|
|
67
84
|
),
|
|
68
|
-
filtername
|
|
85
|
+
filtername=dict(
|
|
69
86
|
# Dummy argument but avoid priority related messages with footprints
|
|
70
|
-
info
|
|
71
|
-
optional
|
|
72
|
-
values
|
|
87
|
+
info="With GridPoint files, leave filtername empty...",
|
|
88
|
+
optional=True,
|
|
89
|
+
values=[
|
|
90
|
+
None,
|
|
91
|
+
],
|
|
73
92
|
),
|
|
74
|
-
)
|
|
93
|
+
),
|
|
75
94
|
)
|
|
76
95
|
|
|
77
96
|
@property
|
|
78
97
|
def realkind(self):
|
|
79
|
-
return
|
|
98
|
+
return "gridpoint"
|
|
80
99
|
|
|
81
100
|
def olive_basename(self):
|
|
82
101
|
"""OLIVE specific naming convention (abstract)."""
|
|
@@ -89,35 +108,32 @@ class AbstractGridpoint(GeoFlowResource):
|
|
|
89
108
|
def namebuilding_info(self):
|
|
90
109
|
"""Generic information, radical = ``grid``."""
|
|
91
110
|
ninfo = super().namebuilding_info()
|
|
92
|
-
if self.origin in (
|
|
111
|
+
if self.origin in ("stat_ad",):
|
|
93
112
|
# For new ``origin`` please use this code path... Please, no more
|
|
94
113
|
# weird logic like the one hard-coded in the else statement !
|
|
95
114
|
source = self.origin
|
|
96
115
|
else:
|
|
97
|
-
if self.model ==
|
|
98
|
-
if self.origin ==
|
|
99
|
-
source =
|
|
116
|
+
if self.model == "mocage":
|
|
117
|
+
if self.origin == "hst":
|
|
118
|
+
source = "forecast"
|
|
100
119
|
else:
|
|
101
|
-
source =
|
|
102
|
-
elif self.model in (
|
|
103
|
-
if self.origin ==
|
|
104
|
-
source =
|
|
120
|
+
source = "sumo"
|
|
121
|
+
elif self.model in ("hycom", "mfwam"):
|
|
122
|
+
if self.origin == "ana":
|
|
123
|
+
source = "analysis"
|
|
105
124
|
else:
|
|
106
|
-
source =
|
|
125
|
+
source = "forecast"
|
|
107
126
|
else:
|
|
108
|
-
source =
|
|
127
|
+
source = "forecast"
|
|
109
128
|
ninfo.update(
|
|
110
|
-
radical=
|
|
129
|
+
radical="grid",
|
|
111
130
|
src=[self.model, source],
|
|
112
131
|
)
|
|
113
132
|
return ninfo
|
|
114
133
|
|
|
115
134
|
def iga_pathinfo(self):
|
|
116
135
|
"""Standard path information for IGA inline cache."""
|
|
117
|
-
directory = dict(
|
|
118
|
-
fa='fic_day',
|
|
119
|
-
grib='bdap'
|
|
120
|
-
)
|
|
136
|
+
directory = dict(fa="fic_day", grib="bdap")
|
|
121
137
|
return dict(
|
|
122
138
|
fmt=directory[self.nativefmt],
|
|
123
139
|
nativefmt=self.nativefmt,
|
|
@@ -132,7 +148,9 @@ class GridPoint(AbstractGridpoint):
|
|
|
132
148
|
"""
|
|
133
149
|
|
|
134
150
|
_abstract = True
|
|
135
|
-
_footprint = [
|
|
151
|
+
_footprint = [
|
|
152
|
+
term_deco,
|
|
153
|
+
]
|
|
136
154
|
|
|
137
155
|
|
|
138
156
|
class TimePeriodGridPoint(AbstractGridpoint):
|
|
@@ -145,33 +163,48 @@ class TimePeriodGridPoint(AbstractGridpoint):
|
|
|
145
163
|
_footprint = [
|
|
146
164
|
timeperiod_deco,
|
|
147
165
|
dict(
|
|
148
|
-
attr
|
|
149
|
-
begintime
|
|
150
|
-
optional
|
|
151
|
-
default
|
|
166
|
+
attr=dict(
|
|
167
|
+
begintime=dict(
|
|
168
|
+
optional=True,
|
|
169
|
+
default=Time(0),
|
|
152
170
|
)
|
|
153
171
|
)
|
|
154
|
-
)
|
|
172
|
+
),
|
|
155
173
|
]
|
|
156
174
|
|
|
157
175
|
|
|
158
176
|
# A bunch of generic footprint declaration to ease with class creation
|
|
159
177
|
_NATIVEFMT_FULLPOS_FP = footprints.Footprint(
|
|
160
|
-
info=
|
|
161
|
-
attr=dict(
|
|
162
|
-
|
|
178
|
+
info="Abstract nativefmt for fullpos files.",
|
|
179
|
+
attr=dict(
|
|
180
|
+
nativefmt=dict(
|
|
181
|
+
values=["fa"],
|
|
182
|
+
default="fa",
|
|
183
|
+
)
|
|
184
|
+
),
|
|
163
185
|
)
|
|
164
186
|
_NATIVEFMT_GENERIC_FP = footprints.Footprint(
|
|
165
|
-
info=
|
|
166
|
-
attr=dict(
|
|
167
|
-
|
|
187
|
+
info="Abstract nativefmt for any other gridpoint files.",
|
|
188
|
+
attr=dict(
|
|
189
|
+
nativefmt=dict(
|
|
190
|
+
values=["grib", "grib1", "grib2", "netcdf"], default="grib"
|
|
191
|
+
)
|
|
192
|
+
),
|
|
168
193
|
)
|
|
169
194
|
_FILTERNAME_AWARE_FPDECO = footprints.DecorativeFootprint(
|
|
170
195
|
footprints.Footprint(
|
|
171
|
-
info=
|
|
172
|
-
attr=dict(
|
|
173
|
-
|
|
174
|
-
|
|
196
|
+
info="Abstract filtering attribute (used when the filtername attribute is allowed).",
|
|
197
|
+
attr=dict(
|
|
198
|
+
filtername=dict(
|
|
199
|
+
info="The filter used to obtain this data.",
|
|
200
|
+
optional=False,
|
|
201
|
+
values=[],
|
|
202
|
+
)
|
|
203
|
+
),
|
|
204
|
+
),
|
|
205
|
+
decorator=[
|
|
206
|
+
namebuilding_insert("filtername", lambda s: s.filtername),
|
|
207
|
+
],
|
|
175
208
|
)
|
|
176
209
|
|
|
177
210
|
|
|
@@ -179,25 +212,27 @@ class GridPointMap(FlowResource):
|
|
|
179
212
|
"""Map of the gridpoint files as produced by fullpos."""
|
|
180
213
|
|
|
181
214
|
_footprint = dict(
|
|
182
|
-
info
|
|
183
|
-
attr
|
|
184
|
-
kind
|
|
185
|
-
values
|
|
186
|
-
remap
|
|
215
|
+
info="Gridpoint Files Map",
|
|
216
|
+
attr=dict(
|
|
217
|
+
kind=dict(
|
|
218
|
+
values=["gridpointmap", "gribfilemap", "fullposmap"],
|
|
219
|
+
remap=dict(
|
|
220
|
+
fullposmap="gridpointmap",
|
|
221
|
+
),
|
|
187
222
|
),
|
|
188
|
-
clscontents
|
|
189
|
-
default
|
|
223
|
+
clscontents=dict(
|
|
224
|
+
default=JsonDictContent,
|
|
190
225
|
),
|
|
191
|
-
nativefmt
|
|
192
|
-
values
|
|
193
|
-
default
|
|
226
|
+
nativefmt=dict(
|
|
227
|
+
values=["json"],
|
|
228
|
+
default="json",
|
|
194
229
|
),
|
|
195
|
-
)
|
|
230
|
+
),
|
|
196
231
|
)
|
|
197
232
|
|
|
198
233
|
@property
|
|
199
234
|
def realkind(self):
|
|
200
|
-
return
|
|
235
|
+
return "gridpointmap"
|
|
201
236
|
|
|
202
237
|
|
|
203
238
|
class GridPointFullPos(GridPoint):
|
|
@@ -205,7 +240,7 @@ class GridPointFullPos(GridPoint):
|
|
|
205
240
|
|
|
206
241
|
_footprint = [
|
|
207
242
|
_NATIVEFMT_FULLPOS_FP,
|
|
208
|
-
dict(info=
|
|
243
|
+
dict(info="GridPoint file produced by Fullpos (with a single term)"),
|
|
209
244
|
]
|
|
210
245
|
|
|
211
246
|
def olive_basename(self):
|
|
@@ -213,46 +248,60 @@ class GridPointFullPos(GridPoint):
|
|
|
213
248
|
|
|
214
249
|
t = self.term.hour
|
|
215
250
|
e = env.current()
|
|
216
|
-
if
|
|
251
|
+
if "VORTEX_ANA_TERMSHIFT" not in e and self.origin == "ana":
|
|
217
252
|
t = 0
|
|
218
253
|
|
|
219
254
|
name = None
|
|
220
|
-
if self.model ==
|
|
221
|
-
if self.origin ==
|
|
222
|
-
name =
|
|
223
|
-
elif self.origin ==
|
|
224
|
-
deltastr =
|
|
255
|
+
if self.model == "mocage":
|
|
256
|
+
if self.origin == "hst":
|
|
257
|
+
name = "HM" + self.geometry.area + "+" + self.term.fmthour
|
|
258
|
+
elif self.origin == "sumo":
|
|
259
|
+
deltastr = "PT{!s}H".format(self.term.hour)
|
|
225
260
|
deltadate = self.date + deltastr
|
|
226
|
-
name =
|
|
227
|
-
|
|
228
|
-
|
|
261
|
+
name = (
|
|
262
|
+
"SM" + self.geometry.area + "_void" + "+" + deltadate.ymd
|
|
263
|
+
)
|
|
264
|
+
elif self.origin == "interp":
|
|
265
|
+
deltastr = "PT{!s}H".format(self.term.hour)
|
|
229
266
|
deltadate = self.date + deltastr
|
|
230
|
-
name =
|
|
267
|
+
name = (
|
|
268
|
+
"SM" + self.geometry.area + "_interp" + "+" + deltadate.ymd
|
|
269
|
+
)
|
|
231
270
|
else:
|
|
232
|
-
name =
|
|
271
|
+
name = (
|
|
272
|
+
"PFFPOS"
|
|
273
|
+
+ self.origin.upper()
|
|
274
|
+
+ self.geometry.area
|
|
275
|
+
+ "+"
|
|
276
|
+
+ self.term.nice(t)
|
|
277
|
+
)
|
|
233
278
|
|
|
234
279
|
if name is None:
|
|
235
|
-
raise ValueError(
|
|
280
|
+
raise ValueError(
|
|
281
|
+
"Could not build a proper olive name: {!s}".format(self)
|
|
282
|
+
)
|
|
236
283
|
|
|
237
284
|
return name
|
|
238
285
|
|
|
239
286
|
def archive_basename(self):
|
|
240
287
|
"""OP ARCHIVE specific naming convention."""
|
|
241
288
|
|
|
242
|
-
deltastr =
|
|
289
|
+
deltastr = "PT{!s}H".format(self.term.hour)
|
|
243
290
|
deltadate = self.date + deltastr
|
|
244
291
|
|
|
245
292
|
name = None
|
|
246
|
-
if self.origin ==
|
|
247
|
-
if self.model ==
|
|
248
|
-
name =
|
|
293
|
+
if self.origin == "hst":
|
|
294
|
+
if self.model == "ifs":
|
|
295
|
+
name = "PFFPOS" + self.geometry.area + "+" + self.term.fmthour
|
|
249
296
|
else:
|
|
250
|
-
name =
|
|
251
|
-
elif self.origin ==
|
|
252
|
-
name =
|
|
297
|
+
name = "HM" + self.geometry.area + "+" + deltadate.ymdh
|
|
298
|
+
elif self.origin == "interp":
|
|
299
|
+
name = "SM" + self.geometry.area + "+" + deltadate.ymd
|
|
253
300
|
|
|
254
301
|
if name is None:
|
|
255
|
-
raise ValueError(
|
|
302
|
+
raise ValueError(
|
|
303
|
+
"Could not build a proper archive name: {!s}".format(self)
|
|
304
|
+
)
|
|
256
305
|
|
|
257
306
|
return name
|
|
258
307
|
|
|
@@ -262,7 +311,7 @@ class GridPointExport(GridPoint):
|
|
|
262
311
|
|
|
263
312
|
_footprint = [
|
|
264
313
|
_NATIVEFMT_GENERIC_FP,
|
|
265
|
-
dict(info=
|
|
314
|
+
dict(info="Generic gridpoint file (with a single term)"),
|
|
266
315
|
]
|
|
267
316
|
|
|
268
317
|
def olive_basename(self):
|
|
@@ -270,39 +319,62 @@ class GridPointExport(GridPoint):
|
|
|
270
319
|
|
|
271
320
|
t = self.term.hour
|
|
272
321
|
e = env.current()
|
|
273
|
-
if
|
|
322
|
+
if "VORTEX_ANA_TERMSHIFT" not in e and self.origin == "ana":
|
|
274
323
|
t = 0
|
|
275
|
-
return
|
|
324
|
+
return (
|
|
325
|
+
"GRID"
|
|
326
|
+
+ self.origin.upper()
|
|
327
|
+
+ self.geometry.area
|
|
328
|
+
+ "+"
|
|
329
|
+
+ self.term.nice(t)
|
|
330
|
+
)
|
|
276
331
|
|
|
277
332
|
def archive_basename(self):
|
|
278
333
|
"""OP ARCHIVE specific naming convention."""
|
|
279
334
|
|
|
280
335
|
name = None
|
|
281
|
-
if re.match(
|
|
282
|
-
name =
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
336
|
+
if re.match("aladin|arome", self.model):
|
|
337
|
+
name = (
|
|
338
|
+
"GRID"
|
|
339
|
+
+ self.geometry.area
|
|
340
|
+
+ "r{!s}".format(self.date.hour)
|
|
341
|
+
+ "_"
|
|
342
|
+
+ self.term.fmthour
|
|
343
|
+
)
|
|
344
|
+
elif re.match("arp|hycom|surcotes", self.model):
|
|
345
|
+
name = "(gribfix:igakey)"
|
|
346
|
+
elif self.model == "ifs":
|
|
347
|
+
deltastr = "PT{!s}H".format(self.term.hour)
|
|
287
348
|
deltadate = self.date + deltastr
|
|
288
|
-
name =
|
|
349
|
+
name = "MET" + deltadate.ymd + "." + self.geometry.area + ".grb"
|
|
289
350
|
|
|
290
351
|
if name is None:
|
|
291
|
-
raise ValueError(
|
|
352
|
+
raise ValueError(
|
|
353
|
+
"Could not build a proper archive name: {!s}".format(self)
|
|
354
|
+
)
|
|
292
355
|
|
|
293
356
|
return name
|
|
294
357
|
|
|
295
358
|
|
|
296
359
|
class FilteredGridPointExport(GridPointExport):
|
|
297
360
|
"""Generic single term gridpoint file using a standard format."""
|
|
298
|
-
|
|
361
|
+
|
|
362
|
+
_footprint = [
|
|
363
|
+
_FILTERNAME_AWARE_FPDECO,
|
|
364
|
+
]
|
|
299
365
|
|
|
300
366
|
|
|
301
367
|
class TimePeriodGridPointExport(TimePeriodGridPoint):
|
|
302
368
|
"""Generic multi term gridpoint file using a standard format."""
|
|
303
|
-
|
|
369
|
+
|
|
370
|
+
_footprint = [
|
|
371
|
+
_NATIVEFMT_GENERIC_FP,
|
|
372
|
+
]
|
|
304
373
|
|
|
305
374
|
|
|
306
375
|
class FilteredTimePeriodGridPointExport(TimePeriodGridPointExport):
|
|
307
376
|
"""Generic multi term gridpoint file using a standard format."""
|
|
308
|
-
|
|
377
|
+
|
|
378
|
+
_footprint = [
|
|
379
|
+
_FILTERNAME_AWARE_FPDECO,
|
|
380
|
+
]
|