Home > wafo > wavemodels > ohhpdf.m

ohhpdf

PURPOSE ^

Marginal wave height, Hd, PDF for Bimodal Ochi-Hubble spectra.

SYNOPSIS ^

f = ohhpdf(h,Hm0,def,dim)

DESCRIPTION ^

 OHHPDF Marginal wave height, Hd, PDF for Bimodal Ochi-Hubble spectra. 
  
   CALL: f = ohhpdf(h,Hm0,def,dim) 
   
   f   = pdf evaluated at h. 
   h   = vectors of evaluation points. 
   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 
  dim = 'time'  : Hd distribution in time (default) 
        'space' : Hd distribution in space 
  
  OHHPDF approximates the marginal PDF of Hd, i.e., 
  zero-downcrossing 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 Hd data for 24 
  classes of Hm0. Between 50000 and 150000 zero-downcrossing waves were 
  simulated for each class of Hm0 in DIM=='time'. 
  Between 50000 and 300000 zero-downcrossing waves were 
  simulated for each class of Hm0 for DIM=='space'. 
  OHHPDF is restricted to the following range for Hm0:  
   0 < Hm0 [m] < 12,  1 <= def < 11,  
  
  Example: 
  Hm0 = 6;def = 8; dim = 'time'; 
  h = linspace(0,4*Hm0/sqrt(2))';  
  f = ohhpdf(h,Hm0,def,dim); 
  plot(h,f) 
  dt = 0.4; w = linspace(0,2*pi/dt,256)'; 
  xs = spec2sdat(ohspec2(w,[Hm0, def]),26000); rate=8; method=1; 
  [S,H] = dat2steep(xs,rate,method); 
  fk = kdebin(H,'epan',[],[],.5,128);  
  hold on, pdfplot(fk,'g'), hold off 
  
  See also  ohhvpdf

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

001 function f = ohhpdf(h,Hm0,def,dim) 
002 %OHHPDF Marginal wave height, Hd, PDF for Bimodal Ochi-Hubble spectra. 
003 % 
004 %  CALL: f = ohhpdf(h,Hm0,def,dim) 
005 %  
006 %  f   = pdf evaluated at h. 
007 %  h   = vectors of evaluation points. 
008 %  Hm0 = significant wave height [m]. 
009 %  def = defines the parametrization of the spectral density (default 1) 
010 %        1 : The most probable spectrum  (default) 
011 %        2,3,...11 : gives 95% Confidence spectra 
012 % dim = 'time'  : Hd distribution in time (default) 
013 %       'space' : Hd distribution in space 
014 % 
015 % OHHPDF approximates the marginal PDF of Hd, i.e., 
016 % zero-downcrossing wave height, for a Gaussian process with a Bimodal 
017 % Ochi-Hubble spectral density (ohspec2). The empirical parameters of 
018 % the model is fitted by least squares to simulated Hd data for 24 
019 % classes of Hm0. Between 50000 and 150000 zero-downcrossing waves were 
020 % simulated for each class of Hm0 in DIM=='time'. 
021 % Between 50000 and 300000 zero-downcrossing waves were 
022 % simulated for each class of Hm0 for DIM=='space'. 
023 % OHHPDF is restricted to the following range for Hm0:  
024 %  0 < Hm0 [m] < 12,  1 <= def < 11,  
025 % 
026 % Example: 
027 % Hm0 = 6;def = 8; dim = 'time'; 
028 % h = linspace(0,4*Hm0/sqrt(2))';  
029 % f = ohhpdf(h,Hm0,def,dim); 
030 % plot(h,f) 
031 % dt = 0.4; w = linspace(0,2*pi/dt,256)'; 
032 % xs = spec2sdat(ohspec2(w,[Hm0, def]),26000); rate=8; method=1; 
033 % [S,H] = dat2steep(xs,rate,method); 
034 % fk = kdebin(H,'epan',[],[],.5,128);  
035 % hold on, pdfplot(fk,'g'), hold off 
036 % 
037 % See also  ohhvpdf 
038  
039    
040 % Reference   
041 % P. A. Brodtkorb (2004),   
042 % The Probability of Occurrence of Dangerous Wave Situations at Sea. 
043 % Dr.Ing thesis, Norwegian University of Science and Technolgy, NTNU, 
044 % Trondheim, Norway.    
045    
046 % History 
047 % revised pab Jan 2004 
048 % By pab 20.01.2001 
049  
050  
051 error(nargchk(2,4,nargin)) 
052  
053 if nargin<4|isempty(dim), dim  = 'time';end  
054 if nargin<3|isempty(def), def  = 1;end  
055  
056 if Hm0>12| Hm0<=0  
057   disp('Warning: Hm0 is outside the valid range') 
058   disp('The validity of the Hd distribution is questionable') 
059 end 
060  
061 if def>11|def<1  
062   Warning('DEF is outside the valid range') 
063   def = mod(def-1,11)+1; 
064 end 
065  
066 Hrms = Hm0/sqrt(2); 
067  
068 [A0 B0 C0] = ohhgparfun(Hm0,def,dim); 
069 f = wggampdf(h/Hrms,A0,B0,C0)/Hrms; 
070 return 
071  
072

Mathematical Statistics
Centre for Mathematical Sciences
Lund University with Lund Institute of Technology

Comments or corrections to the WAFO group


Generated on Thu 06-Oct-2005 02:21:16 for WAFO by m2html © 2003