Detecting storms from wave height data
显示 更早的评论
I'm using the Image Analyst code to detect sea storms from wave height data using a threshold value as suggested by https://it.mathworks.com/matlabcentral/answers/2119581-detection-of-storms-from-precipitation-data#answer_1459176.
I fixed a threshold for wave height and a minimum storm duration.
Now I would like to modify the code to include small holes in the subsamples (for example 2 or more missing data) or few values below threshold. I would like to prevent storm splitting (see attached figure).

Thanks a lot to Image Anayst for his support.
load ('H.mat'); %3 hour data
threshold=1 %
% Find time periods with H >= threshold
stormPeriods = bwconncomp(H >= threshold);
props = regionprops(stormPeriods, H, 'Area', 'MeanIntensity','MaxIntensity',"SubarrayIdx");
values = [props.Area];
props = props(values*3 > 12 ); % storms with duration >12 h
A_cell = (struct2cell(props));
1 个评论
Image Analyst
2024-11-14
"include small holes in the subsamples (for example 2 or more missing data" <== So you want all NaN values to be considered as storms no matter how long the run of NaN's is?
"few values below threshold" <== like for example, what? 5 values below should be considered part of the storm on either side of that run of low values? 10 values? I guess we can just set a variable and you cann set it to whatever you want.
In your plot above, how many storms do you want there to be and where do they start and stop?
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Axis Labels 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

