function [ maxZ, yrs, a_mom, b_mom, design_mom ] = MOM_Gumb( TS, pr )
%MOM_Gumb Summary of this function goes here
%   Detailed explanation goes here

if  size(TS,1)> size(TS,2)
    TS = transpose(TS);
end

maxZ = max(TS,[],2);
yrs = length(maxZ); % number of periods (years)
%% ----------------- %
% method of moments %
% ----------------- %
b_mom = std(maxZ)/1.28254983; % initial value for b
a_mom = mean(maxZ) - 0.57721566*b_mom; % initial value for a
design_mom = a_mom - b_mom*log(-log(pr));

end

