Closed pawelbielski closed 4 years ago
@pierretoussing
The following code in deseasonalize_map()
can easily be vectorized, because every point can be deseasonalized seperataly, i.e. you could perform all the steps by vectorized operations. Currently the function deseasonalize_time_series()
is called 512 256 37 = 5 million times, what drastically reduces the code's usability.
for level in range(len_level):
for lat in range(len_latitude):
for lon in range(len_longitude):
time_series = map_array[:, level, lat, lon]
deseasonalized_series = deseasonalize_time_series(time_series, period_length)
deseasonalized_map[:, level, lat, lon] = deseasonalized_series
Well done!
It looks like that the Nature paper preprocessed all the data before further analysis:
[x] Investigate if preprocessing data pointwise before deriving index makes sense, or if the current implementation is correct
[x] If needed, adjust function
deseasonalize_time_series()
to work with all the dimensions (latitutde, longitude, altitude)[x] If needed, adopt the presentation for climate scientists #9 and notebook from #2 if needed. Comment on respective issues (e.g. by deleting nonrelevant information with
strikethroughand commenting on the bottom of the issue)