OHHSPDF2 Joint (Scf,Hd) PDF for linear waves with Ochi-Hubble spectra. CALL: f = ohhspdf2(Hd,Scf,Hm0,def) 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 OHHSPDF2 approximates the joint distribution of (Scf, Hd) in time, i.e., crest front steepness (2*pi*Ac/(g*Td*Tcf)) and wave height, for a Gaussian process with a bimodal Ochi-Hubble spectral density (ohspec2). The empirical parameters of the model is fitted by least squares to simulated (Scf,Hd) data for 24 classes of Hm0. Between 50000 and 150000 zero-downcrossing waves were simulated for each class of Hm0. OHHSPDF is restricted to the following range for Hm0: 0.5 < Hm0 [m] < 12 The size of f is the common size of the input arguments, Hd, Scf and Hm0. Example: Hm0 = 6;Tp = 8;def= 2; h = linspace(0,4*Hm0/sqrt(2))'; v = linspace(0,6*1.25*Hm0/Tp^2)'; f = ohhspdf2(h,v,Hm0,def); w = linspace(0,40,5*1024+1).'; S = ohspec2(w,[Hm0 def]); dt = 0.3; x = spec2sdat(S,80000,.2); rate = 8; [si,hi] = dat2steep(x,rate,2); fk = kdebin([si,hi],'epan',[],[],.5,128); fk.title = f.title; fk.labx = f.labx; plot(si,hi,'.'), hold on pdfplot(f),pdfplot(fk,'r'),hold off See also ohhpdf, thspdf
PDF class constructor | |
Joint (Scf,Hd) PDF for linear waves 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] = ohhspdf2(Hd,Scf,Hm0,def,normalizedInput) 002 %OHHSPDF2 Joint (Scf,Hd) PDF for linear waves with Ochi-Hubble spectra. 003 % 004 % CALL: f = ohhspdf2(Hd,Scf,Hm0,def) 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 % OHHSPDF2 approximates the joint distribution of (Scf, Hd) in time, 015 % i.e., crest front steepness (2*pi*Ac/(g*Td*Tcf)) and wave height, 016 % for a Gaussian process with a bimodal Ochi-Hubble spectral density 017 % (ohspec2). The empirical 018 % parameters of the model is fitted by least squares to simulated 019 % (Scf,Hd) data for 24 classes of Hm0. Between 50000 and 150000 020 % zero-downcrossing waves were simulated for each class of Hm0. 021 % OHHSPDF is restricted to the following range for Hm0: 022 % 0.5 < Hm0 [m] < 12 023 % The size of f is the common size of the input arguments, Hd, Scf and 024 % Hm0. 025 % 026 % Example: 027 % Hm0 = 6;Tp = 8;def= 2; 028 % h = linspace(0,4*Hm0/sqrt(2))'; 029 % v = linspace(0,6*1.25*Hm0/Tp^2)'; 030 % f = ohhspdf2(h,v,Hm0,def); 031 % w = linspace(0,40,5*1024+1).'; 032 % S = ohspec2(w,[Hm0 def]); 033 % dt = 0.3; 034 % x = spec2sdat(S,80000,.2); rate = 8; 035 % [si,hi] = dat2steep(x,rate,2); 036 % fk = kdebin([si,hi],'epan',[],[],.5,128); 037 % fk.title = f.title; fk.labx = f.labx; 038 % plot(si,hi,'.'), hold on 039 % pdfplot(f),pdfplot(fk,'r'),hold off 040 % 041 % See also ohhpdf, thspdf 042 043 % Reference 044 % P. A. Brodtkorb (2004), 045 % The Probability of Occurrence of Dangerous Wave Situations at Sea. 046 % Dr.Ing thesis, Norwegian University of Science and Technolgy, NTNU, 047 % Trondheim, Norway. 048 049 050 % History 051 % revised pab 09.09.2003 052 % By pab 06.02.2001 053 054 055 056 error(nargchk(4,5,nargin)) 057 058 if (nargin < 5|isempty(normalizedInput)), normalizedInput = 0;end 059 if (nargin < 4|isempty(def)), def = 1;end 060 if (nargin < 3|isempty(Hm0)), Hm0 = 6;end 061 062 063 [V,H] = meshgrid(Scf,Hd); 064 065 f = createpdf(2); 066 [f.f,Hrms,Vrms,varargout{1:nargout-1}] = ohhspdf(H,V,Hm0,def,normalizedInput); 067 068 f.x = {Scf(:),Hd(:)}; 069 070 if (normalizedInput) 071 f.labx={'Scf', 'Hd'}; 072 f.norm = 1; 073 else 074 f.norm=0; 075 f.labx={'Scf', 'Hd [m]'}; 076 end 077 f.title = 'Joint distribution of (Hd,Scf) in time'; 078 f.note = ['ohhspec2 Hm0=' num2str(Hm0) ' def = ' num2str(def)]; 079 [f.cl,f.pl] = qlevels(f.f); 080 081 return
Comments or corrections to the WAFO group