OHHSSPDF2 Joint (Scf,Hd) PDF linear waves in space with Ochi-Hubble spectra. CALL: f = ohhsspdf2(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]. def = defines the parametrization of the spectral density (default 1) 1 : The most probable spectrum (default) 2,3,...11 : gives 95% Confidence spectra OHHSSPDF2 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 bimodal Ochi-Hubble spectral density. The empirical parameters of the model is fitted by least squares to simulated (Scf,Hd) data for 24 classes of Hm0. Between 50000 and 300000 zero-downcrossing waves were simulated for each class of Hm0. OHHSSPDF2 is restricted to the following range for Hm0: 0.5 < Hm0 [m] < 12 Example: Hm0 = 6;Tp = 8;def= 2; h = linspace(0,4*Hm0/sqrt(2))'; v = linspace(0,Hm0/Tp)'; f = ohhsspdf2(h,v,Hm0,def); w = linspace(0,10,2*1024+1).'; S = ohspec2(w,[Hm0 def]); 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 ohhspdf, thvpdf
PDF class constructor | |
Joint (Scf,Hd) PDF linear waves in space with Ochi-Hubble spectra. | |
Calculates quantile levels which encloses P% of PDF | |
Display message and abort function. | |
X and Y arrays for 3-D plots. | |
Convert number to string. (Fast version) |
001 function [f,varargout] = ohhsspdf(Hd,Scf,Hm0,def,normalizedInput,condon) 002 %OHHSSPDF2 Joint (Scf,Hd) PDF linear waves in space with Ochi-Hubble spectra. 003 % 004 % CALL: f = ohhsspdf2(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 % def = defines the parametrization of the spectral density (default 1) 011 % 1 : The most probable spectrum (default) 012 % 2,3,...11 : gives 95% Confidence spectra 013 % 014 % OHHSSPDF2 approximates the joint distribution of (Scf, Hd), i.e., crest 015 % front steepness (Ac/Lcf) and wave height in space, for a Gaussian 016 % process with a bimodal Ochi-Hubble spectral density. The empirical 017 % parameters of the model is fitted by least squares to simulated 018 % (Scf,Hd) data for 24 classes of Hm0. 019 % Between 50000 and 300000 zero-downcrossing waves were simulated for 020 % each class of Hm0. 021 % OHHSSPDF2 is restricted to the following range for Hm0: 022 % 0.5 < Hm0 [m] < 12 023 % 024 % Example: 025 % Hm0 = 6;Tp = 8;def= 2; 026 % h = linspace(0,4*Hm0/sqrt(2))'; 027 % v = linspace(0,Hm0/Tp)'; 028 % f = ohhsspdf2(h,v,Hm0,def); 029 % w = linspace(0,10,2*1024+1).'; 030 % S = ohspec2(w,[Hm0 def]); 031 % Sk = spec2spec(specinterp(S,.55),'k1d'); 032 % dk = 1; 033 % x = spec2sdat(Sk,80000,dk); rate = 8; 034 % [vi,hi] = dat2steep(x,rate,1); 035 % fk = kdebin([vi,hi],'epan',[],[],.5,128); 036 % fk.title = f.title; fk.labx = f.labx; 037 % plot(vi,hi,'.'), hold on 038 % pdfplot(f), 039 % pdfplot(fk,'r'), hold off 040 % 041 % See also ohhspdf, thvpdf 042 043 044 % Reference 045 % P. A. Brodtkorb (2004), 046 % The Probability of Occurrence of Dangerous Wave Situations at Sea. 047 % Dr.Ing thesis, Norwegian University of Science and Technolgy, NTNU, 048 % Trondheim, Norway. 049 050 % History 051 % revised pab 09.09.2003 052 % By pab 20.12.2000 053 054 055 error(nargchk(4,5,nargin)) 056 057 if (nargin < 5|isempty(normalizedInput)), normalizedInput = 0;end 058 if (nargin < 4|isempty(def)), def = 1;end 059 if (nargin < 3|isempty(Hm0)), Hm0 = 6;end 060 061 062 [V,H] = meshgrid(Scf,Hd); 063 064 f = createpdf(2); 065 [f.f,Hrms,Vrms,varargout{1:nargout-1}] = ohhsspdf(H,V,Hm0,def,normalizedInput); 066 067 f.x = {Scf(:),Hd(:)}; 068 069 if (normalizedInput) 070 f.labx={'Scf', 'Hd'}; 071 f.norm = 1; 072 else 073 f.norm=0; 074 f.labx={'Scf', 'Hd [m]'}; 075 end 076 f.title = 'Joint distribution of (Hd,Scf) in space'; 077 f.note = ['ohhspec2 Hm0=' num2str(Hm0) ' def = ' num2str(def)]; 078 [f.cl,f.pl] = qlevels(f.f); 079 080 return
Comments or corrections to the WAFO group