Skip to content

Commit 41011ee

Browse files
authored
Merge pull request #106 from ecmwf/feature/performance_optimisation
Feature/performance optimisation
2 parents 4eeefff + b439d66 commit 41011ee

File tree

4 files changed

+3
-5
lines changed

4 files changed

+3
-5
lines changed

performance/fdb_performance_3D.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ def setup_method(self, method):
2020
"date": {"transformation": {"merge": {"with": "time", "linkers": [" ", "00"]}}},
2121
"step": {"transformation": {"type_change": "int"}},
2222
"levelist": {"transformation": {"type_change": "int"}},
23+
"longitude": {"transformation": {"cyclic": [0, 360]}},
2324
}
2425
self.config = {"class": "od", "expver": "0001", "levtype": "sfc"}
2526
self.fdbdatacube = FDBDatacube(self.config, axis_options=self.options)

polytope/datacube/datacube_axis.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ def __init__(self):
131131
self.name = None
132132
self.tol = 1e-12
133133
self.range = None
134+
# TODO: Maybe here, store transformations as a dico instead
134135
self.transformations = []
135136
self.type = 0
136137

polytope/datacube/transformations/datacube_transformations.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ def change_val_type(self, axis_name, values):
5050
"merge": "DatacubeAxisMerger",
5151
"reverse": "DatacubeAxisReverse",
5252
"type_change": "DatacubeAxisTypeChange",
53-
"null": "DatacubeNullTransformation",
5453
}
5554

5655
_type_to_transformation_file_lookup = {
@@ -59,7 +58,6 @@ def change_val_type(self, axis_name, values):
5958
"merge": "merger",
6059
"reverse": "reverse",
6160
"type_change": "type_change",
62-
"null": "null_transformation",
6361
}
6462

6563
has_transform = {
@@ -68,5 +66,4 @@ def change_val_type(self, axis_name, values):
6866
"merge": "has_merger",
6967
"reverse": "reorder",
7068
"type_change": "type_change",
71-
"null": "null",
7269
}

polytope/utility/geometry.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22

33

44
def lerp(a, b, value):
5-
direction = [a - b for a, b in zip(a, b)]
6-
intersect = [b + value * d for b, d in zip(b, direction)]
5+
intersect = [b + (a - b) * value for a, b in zip(a, b)]
76
return intersect
87

98

0 commit comments

Comments
 (0)