Skip to content

Commit 7c24321

Browse files
committed
GEV on grid
1 parent 34af0a4 commit 7c24321

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ DimensionalData = "0.27, 0.28, 0.29"
3131
Extremes = "1"
3232
Interpolations = "0.13, 0.14, 0.15"
3333
LombScargle = "1"
34-
LongMemory = "0.1.2"
34+
LongMemory = "0.1"
3535
MarSwitching = "0.2"
3636
NetCDF = "0.10, 0.11, 0.12"
3737
Polynomials = "4"

src/aggregate.jl

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ function daily_max_mean_min(cube::YAXArray, kwargs...)
6767
# outdims = OutDims(RangeAxis("time", dates_builder_yearmonthday(new_dates)), CategoricalAxis("stats",["max","mean","min"]))
6868
outdims = OutDims(Dim{:time}(dates_builder_yearmonthday(new_dates)), CategoricalAxis("stats",["max","mean","min"]))
6969

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())
7171
end
7272

7373

@@ -89,7 +89,7 @@ function percentiles(cube::YAXArray, quantiles=[0.1, 0.5, 0.9];lonname="longitud
8989
indims = InDims("number")
9090
outdims = OutDims("time", lonname, latname)
9191

92-
mapCube(percentiles, cube, indims=indims, outdims=outdims, quantiles=quantiles)
92+
mapCube(percentiles, cube, indims=indims, outdims=outdims, quantiles=quantiles, nthreads=Threads.nthreads())
9393
end
9494

9595
"""
@@ -127,7 +127,7 @@ function diff(cube::YAXArray)
127127
indims = InDims("time")
128128
outdims = OutDims("time")
129129

130-
mapCube(diff, cube, indims=indims, outdims=outdims)
130+
mapCube(diff, cube, indims=indims, outdims=outdims, nthreads=Threads.nthreads())
131131
end
132132

133133
"""
@@ -164,7 +164,7 @@ function cumsum(cube::YAXArray, kwargs...)
164164
indims = InDims("time")
165165
outdims = OutDims("time")
166166

167-
mapCube(cumsum, cube, indims=indims, outdims=outdims)
167+
mapCube(cumsum, cube, indims=indims, outdims=outdims, nthreads=Threads.nthreads())
168168
end
169169

170170

@@ -221,7 +221,7 @@ function daily_fct(cube::YAXArray; fct::Function=mean, shifthour=0, kwargs...)
221221
indims = InDims("time")
222222
outdims = OutDims(Dim{:time}(dates_builder_yearmonthday(new_dates)))
223223

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())
225225
end
226226

227227

@@ -263,7 +263,7 @@ function yearly_clim(cube::YAXArray; fct::Function=mean, kwargs...)
263263
indims = InDims("time")
264264
outdims = OutDims(Dim{:time}(dates_builder_yearmonthday_hardcode(new_dates, imois=7, iday=1)))
265265

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())
267267
end
268268

269269
"""
@@ -298,5 +298,5 @@ function daily_max(cube::YAXArray, kwargs...)
298298
indims = InDims("time")
299299
outdims = OutDims(Dim{:time}(dates_builder_yearmonthday(new_dates)))
300300

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())
302302
end

src/gev.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ function rlevels_cube(xout, xin; threshold=nothing, rlevels = [1, 2, 5, 10, 25,
2020

2121
xout .= [x.value[1] for x in r_h]
2222

23-
else
23+
else
2424
xout .= missing
2525
return
2626
end

0 commit comments

Comments
 (0)