@@ -67,7 +67,7 @@ function daily_max_mean_min(cube::YAXArray, kwargs...)
67
67
# outdims = OutDims(RangeAxis("time", dates_builder_yearmonthday(new_dates)), CategoricalAxis("stats",["max","mean","min"]))
68
68
outdims = OutDims (Dim {:time} (dates_builder_yearmonthday (new_dates)), CategoricalAxis (" stats" ,[" max" ," mean" ," min" ]))
69
69
70
- mapCube (daily_max_mean_min, cube, indims= indims, outdims= outdims, index_list= index_in_cube)
70
+ mapCube (daily_max_mean_min, cube, indims= indims, outdims= outdims, index_list= index_in_cube, nthreads = Threads . nthreads () )
71
71
end
72
72
73
73
@@ -89,7 +89,7 @@ function percentiles(cube::YAXArray, quantiles=[0.1, 0.5, 0.9];lonname="longitud
89
89
indims = InDims (" number" )
90
90
outdims = OutDims (" time" , lonname, latname)
91
91
92
- mapCube (percentiles, cube, indims= indims, outdims= outdims, quantiles= quantiles)
92
+ mapCube (percentiles, cube, indims= indims, outdims= outdims, quantiles= quantiles, nthreads = Threads . nthreads () )
93
93
end
94
94
95
95
"""
@@ -127,7 +127,7 @@ function diff(cube::YAXArray)
127
127
indims = InDims (" time" )
128
128
outdims = OutDims (" time" )
129
129
130
- mapCube (diff, cube, indims= indims, outdims= outdims)
130
+ mapCube (diff, cube, indims= indims, outdims= outdims, nthreads = Threads . nthreads () )
131
131
end
132
132
133
133
"""
@@ -164,7 +164,7 @@ function cumsum(cube::YAXArray, kwargs...)
164
164
indims = InDims (" time" )
165
165
outdims = OutDims (" time" )
166
166
167
- mapCube (cumsum, cube, indims= indims, outdims= outdims)
167
+ mapCube (cumsum, cube, indims= indims, outdims= outdims, nthreads = Threads . nthreads () )
168
168
end
169
169
170
170
@@ -221,7 +221,7 @@ function daily_fct(cube::YAXArray; fct::Function=mean, shifthour=0, kwargs...)
221
221
indims = InDims (" time" )
222
222
outdims = OutDims (Dim {:time} (dates_builder_yearmonthday (new_dates)))
223
223
224
- mapCube (daily_fct, cube, indims= indims, outdims= outdims, fct= fct, index_list= index_in_cube)
224
+ mapCube (daily_fct, cube, indims= indims, outdims= outdims, fct= fct, index_list= index_in_cube, nthreads = Threads . nthreads () )
225
225
end
226
226
227
227
@@ -263,7 +263,7 @@ function yearly_clim(cube::YAXArray; fct::Function=mean, kwargs...)
263
263
indims = InDims (" time" )
264
264
outdims = OutDims (Dim {:time} (dates_builder_yearmonthday_hardcode (new_dates, imois= 7 , iday= 1 )))
265
265
266
- mapCube (yearly_clim, cube, fct= fct, indims= indims, outdims= outdims, index_list= index_in_cube)
266
+ mapCube (yearly_clim, cube, fct= fct, indims= indims, outdims= outdims, index_list= index_in_cube, nthreads = Threads . nthreads () )
267
267
end
268
268
269
269
"""
@@ -298,5 +298,5 @@ function daily_max(cube::YAXArray, kwargs...)
298
298
indims = InDims (" time" )
299
299
outdims = OutDims (Dim {:time} (dates_builder_yearmonthday (new_dates)))
300
300
301
- mapCube (daily_max, cube, indims= indims, outdims= outdims, index_list= index_in_cube)
301
+ mapCube (daily_max, cube, indims= indims, outdims= outdims, index_list= index_in_cube, nthreads = Threads . nthreads () )
302
302
end
0 commit comments