-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
handled series with one element per year, for which the POT analysis …
…is meaningless
- Loading branch information
Lorenzo Mentaschi
authored and
Lorenzo Mentaschi
committed
Mar 23, 2017
1 parent
dc489ef
commit e0e65f4
Showing
12 changed files
with
158 additions
and
113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
function [annualMax, annualMaxDate, annualMaxIndx] = tsEvaComputeAnnualMaxima(timeAndSeries) | ||
|
||
timeStamps = timeAndSeries(:,1); | ||
srs = timeAndSeries(:,2); | ||
|
||
tmvec = datevec(timeStamps); | ||
years = tmvec(:,1); | ||
srsIndices = 1:numel(srs); | ||
|
||
function maxIndx = findMax(subIndxs) | ||
[~, subIndxMaxIndx] = max(srs(subIndxs)); | ||
maxIndx = subIndxs(subIndxMaxIndx); | ||
end | ||
|
||
annualMaxIndx = accumarray(years, srsIndices, [], @findMax); | ||
annualMaxIndx = annualMaxIndx(annualMaxIndx ~= 0); | ||
annualMax = srs(annualMaxIndx); | ||
annualMaxDate = timeStamps(annualMaxIndx); | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
function [ detrendSeries, trendSeries, filledTimeStamps, filledSeries, nRunMn ] = tsEvaDetrendTimeSeries( timeStamps, series, timeWindow, varargin ) | ||
|
||
args.extremeLowThreshold = -Inf; | ||
args = tsEasyParseNamedArgs(varargin, args); | ||
extremeLowThreshold = args.extremeLowThreshold; | ||
|
||
[trendSeries, filledTimeStamps, filledSeries, nRunMn] = tsEvaRunningMeanTrend(timeStamps, series, timeWindow); | ||
statSeries = filledSeries; | ||
statSeries(statSeries < extremeLowThreshold) = nan; | ||
detrendSeries = statSeries - trendSeries; | ||
|
||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.