THSSPDF2 Joint (Scf,Hd) PDF for linear waves in space with Torsethaugen spectra. CALL: f = thsspdf2(Hd,Scf,Hm0,Tp) f = pdf struct evaluated at meshgrid(Scf,Hd) Hd = zero down crossing wave height Scf = crest front steepness Hm0 = significant wave height [m] Tp = Spectral peak period [s] THSSPDF2 approximates the joint distribution of (Scf, Hd), i.e., crest front steepness (Ac/Lcf) and wave height in space, for a Gaussian process with a Torsethaugen spectral density. The empirical parameters of the model is fitted by least squares to simulated (Scf,Hd) data for 600 classes of Hm0 and Tp. Between 100000 and 1000000 zero-downcrossing waves were simulated for each class of Hm0 and Tp. THSSPDF2 is restricted to the following range for Hm0 and Tp: 0.5 < Hm0 [m] < 12, 3.5 < Tp [s] < 20, and Hm0 < (Tp-2)*12/11. Example: Hm0 = 6;Tp = 8; h = linspace(0,4*Hm0/sqrt(2)); v = linspace(0,6*1.25*Hm0/Tp^2); f = thsspdf2(h,v,Hm0,Tp); w = linspace(0,10,2*1024+1).'; S = torsethaugen(w,[Hm0 Tp]); Sk = spec2spec(specinterp(S,.55),'k1d'); dk = 1; x = spec2sdat(Sk,80000,dk); rate = 8; [vi,hi] = dat2steep(x,rate,1); fk = kdebin([vi,hi],'epan',[],[],.5,128); fk.title = f.title; fk.labx = f.labx; plot(vi,hi,'.'), hold on pdfplot(f) pdfplot(fk,'r'), hold off See also thspdf
PDF class constructor | |
Calculates quantile levels which encloses P% of PDF | |
Joint (Scf,Hd) PDF for linear waves in space with Torsethaugen spectra. | |
Display message and abort function. | |
X and Y arrays for 3-D plots. | |
Convert number to string. (Fast version) |
001 function [f,varargout] = thsspdf2(Hd,Scf,Hm0,Tp,normalizedInput) 002 %THSSPDF2 Joint (Scf,Hd) PDF for linear waves in space with Torsethaugen spectra. 003 % 004 % CALL: f = thsspdf2(Hd,Scf,Hm0,Tp) 005 % 006 % f = pdf struct evaluated at meshgrid(Scf,Hd) 007 % Hd = zero down crossing wave height 008 % Scf = crest front steepness 009 % Hm0 = significant wave height [m] 010 % Tp = Spectral peak period [s] 011 % 012 % THSSPDF2 approximates the joint distribution of (Scf, Hd), i.e., crest 013 % front steepness (Ac/Lcf) and wave height in space, for a Gaussian 014 % process with a Torsethaugen spectral density. The empirical parameters 015 % of the model is fitted by least squares to simulated (Scf,Hd) data for 016 % 600 classes of Hm0 and Tp. Between 100000 and 1000000 zero-downcrossing 017 % waves were simulated for each class of Hm0 and Tp. 018 % THSSPDF2 is restricted to the following range for Hm0 and Tp: 019 % 0.5 < Hm0 [m] < 12, 3.5 < Tp [s] < 20, and Hm0 < (Tp-2)*12/11. 020 % 021 % Example: 022 % Hm0 = 6;Tp = 8; 023 % h = linspace(0,4*Hm0/sqrt(2)); 024 % v = linspace(0,6*1.25*Hm0/Tp^2); 025 % f = thsspdf2(h,v,Hm0,Tp); 026 % w = linspace(0,10,2*1024+1).'; 027 % S = torsethaugen(w,[Hm0 Tp]); 028 % Sk = spec2spec(specinterp(S,.55),'k1d'); 029 % dk = 1; 030 % x = spec2sdat(Sk,80000,dk); rate = 8; 031 % [vi,hi] = dat2steep(x,rate,1); 032 % fk = kdebin([vi,hi],'epan',[],[],.5,128); 033 % fk.title = f.title; fk.labx = f.labx; 034 % plot(vi,hi,'.'), hold on 035 % pdfplot(f) 036 % pdfplot(fk,'r'), hold off 037 % 038 % See also thspdf 039 040 041 % Reference 042 % P. A. Brodtkorb (2004), 043 % The Probability of Occurrence of Dangerous Wave Situations at Sea. 044 % Dr.Ing thesis, Norwegian University of Science and Technolgy, NTNU, 045 % Trondheim, Norway. 046 047 048 % History 049 % revised pab 09.08.2003 050 % By pab 20.12.2000 051 052 error(nargchk(3,5,nargin)) 053 if (nargin < 5|isempty(normalizedInput)), normalizedInput = 0;end 054 if (nargin < 4|isempty(Tp)), Tp = 8;end 055 if (nargin < 3|isempty(Hm0)), Hm0 = 6;end 056 057 058 [V,H] = meshgrid(Scf,Hd); 059 060 f = createpdf(2); 061 [f.f,varargout{1:nargout-1}] = thsspdf(H,V,Hm0,Tp,normalizedInput); 062 063 f.x = {Scf(:),Hd(:)}; 064 065 if (normalizedInput) 066 f.labx={'Scf', 'Hd'}; 067 f.norm = 1; 068 else 069 f.norm=0; 070 f.labx={'Scf', 'Hd [m]'}; 071 end 072 f.title = 'Joint distribution of (Hd,Scf) in Space'; 073 f.note = ['Torsethaugen Hm0=' num2str(Hm0) ' Tp = ' num2str(Tp)]; 074 try 075 [f.cl,f.pl] = qlevels(f.f); 076 end
Comments or corrections to the WAFO group