Index: issm/trunk-jpl/src/m/qmu/dakota_out_parse.m
===================================================================
--- issm/trunk-jpl/src/m/qmu/dakota_out_parse.m	(revision 14241)
+++ issm/trunk-jpl/src/m/qmu/dakota_out_parse.m	(revision 14242)
@@ -112,8 +112,13 @@
     elseif strncmp(fline,'Moments for each response function',34)
         [dresp]=moments_read(fidi,dresp,fline);
+    elseif strncmp(fline,'Moment-based statistics for each response function',50)
+        [dresp]=mbstats_read(fidi,dresp,fline);
     elseif strncmp(fline,'95% confidence intervals for each response function',51)
         [dresp]=cis_read(fidi,dresp,fline);
-    elseif strncmp(fline,'Probabilities for each response function',40)
+    elseif strncmp(fline,'Probabilities for each response function',40) || ...
+           strncmp(fline,'Level mappings for each response function',41)
         [dresp]=cdfs_read(fidi,dresp,fline);
+    elseif strncmp(fline,'Probability Density Function (PDF) histograms for each response function',72)
+        [dresp]=pdfs_read(fidi,dresp,fline);
     elseif strncmp(fline,'Simple Correlation Matrix',25)
         [scm]=corrmat_read(fidi,'Simple Correlation Matrix',fline);
@@ -137,5 +142,4 @@
     else
         display(['Unexpected line: ' deblank(fline)]);
-        fline=fgetl(fidi);
     end
     fline=fgetl(fidi);
@@ -316,4 +320,43 @@
 end
 
+%%  function to find and read the moment-based statistics
+
+function [dresp]=mbstats_read(fidi,dresp,fline)
+
+if ~exist('fline','var') || isempty(fline) || ~ischar(fline)
+    [fline]=findline(fidi,'Moment-based statistics for each response function');
+    if ~ischar(fline)
+        return
+    end
+end
+
+display('Reading moment-based statistics for response functions:');
+
+%  skip column headings of moment-based statistics
+
+    fline=fgetl(fidi);
+
+while 1
+    fline=fgetl(fidi);
+    if isempty(fline)
+        break;
+    end
+    [ntokens,tokens]=fltokens(fline);
+
+%  add new response function and moment-based statistics
+
+    dresp(end+1).descriptor=tokens{1}{ 1};
+    display(sprintf('  %s',dresp(end).descriptor));
+    dresp(end  ).mean      =tokens{1}{ 2};
+    dresp(end  ).stddev    =tokens{1}{ 3};
+    dresp(end  ).skewness  =tokens{1}{ 4};
+    dresp(end  ).kurtosis  =tokens{1}{ 5};
+end
+
+display(sprintf('  Number of Dakota response functions=%d.',...
+    length(dresp)));
+
+end
+
 %%  function to find and read the confidence intervals
 
@@ -336,4 +379,14 @@
     end
     [ntokens,tokens]=fltokens(fline);
+
+%  check for column headings in Dakota 5.2
+
+    if (ntokens == 4)
+        fline=fgetl(fidi);
+        if isempty(fline)
+            break;
+        end
+        [ntokens,tokens]=fltokens(fline);
+    end
 
 %  find response function associated with confidence intervals
@@ -354,8 +407,15 @@
 %  add confidence intervals to response functions
 
-    dresp(i).meanci  (1,1)=tokens{1}{ 5};
-    dresp(i).meanci  (2,1)=tokens{1}{ 6};
-    dresp(i).stddevci(1,1)=tokens{1}{12};
-    dresp(i).stddevci(2,1)=tokens{1}{13};
+    if (ntokens == 14)
+        dresp(i).meanci  (1,1)=tokens{1}{ 5};
+        dresp(i).meanci  (2,1)=tokens{1}{ 6};
+        dresp(i).stddevci(1,1)=tokens{1}{12};
+        dresp(i).stddevci(2,1)=tokens{1}{13};
+    else
+        dresp(i).meanci  (1,1)=tokens{1}{ 2};
+        dresp(i).meanci  (2,1)=tokens{1}{ 3};
+        dresp(i).stddevci(1,1)=tokens{1}{ 4};
+        dresp(i).stddevci(2,1)=tokens{1}{ 5};
+    end
 end
 
@@ -372,5 +432,8 @@
     [fline]=findline(fidi,'Probabilities for each response function');
     if ~ischar(fline)
-        return
+        [fline]=findline(fidi,'Level mappings for each response function');
+        if ~ischar(fline)
+            return
+        end
     end
 end
@@ -425,5 +488,71 @@
                     dresp(idresp).cdf(icdf,i)=tokens{1}{itoken};
                 end
-            end;
+            end
+            fline=fgetl(fidi);
+        end
+    end
+end
+
+display(sprintf('  Number of Dakota response functions=%d.',...
+    length(dresp)));
+
+end
+
+%%  function to find and read the pdf's
+
+function [dresp]=pdfs_read(fidi,dresp,fline)
+
+if ~exist('fline','var') || isempty(fline) || ~ischar(fline)
+    [fline]=findline(fidi,'Probability Density Function (PDF) histograms for each response function');
+    if ~ischar(fline)
+        return
+    end
+end
+
+display('Reading PDF''s for response functions:');
+
+while ischar(fline) && ~isempty(fline)
+    fline=fgetl(fidi);
+    if ~ischar(fline)
+        break;
+    end
+
+%  process header line of pdf
+
+    while ischar(fline) && ~isempty(fline)
+        [ntokens,tokens]=fltokens(fline);
+
+%  find response function associated with pdf
+
+        idresp=0;
+        for i=1:length(dresp)
+            if strcmpi(tokens{1}{ 3},dresp(i).descriptor)
+                idresp=i;
+                break;
+            end
+        end
+        if ~idresp
+            idresp=length(dresp)+1;
+            dresp(idresp).descriptor=tokens{1}{ 3};
+            display(sprintf('  %s',dresp(idresp).descriptor));
+        end
+
+%  skip column headings of pdf
+
+        fline=fgetl(fidi);
+        fline=fgetl(fidi);
+
+%  read and add pdf table to response function
+
+        fline=fgetl(fidi);
+        ipdf=0;
+        while ischar(fline) && ~isempty(fline) && ...
+              ~strncmpi(fline,'PDF for', 7)
+            [ntokens,tokens]=fltokens(fline);
+            ipdf=ipdf+1;
+            dresp(idresp).pdf(ipdf,1:3)=NaN;
+            for i=1:3
+                dresp(idresp).pdf(ipdf,i)=tokens{1}{i};
+            end
             fline=fgetl(fidi);
         end
