function newarray=blankize(array)
%function newarray=blankize(array)
% replaces NaN with 1.70141x10**38 (for surfer)
%
badval=1.70141e38;
newarray=array;
[imax,jmax]=size(array);
if imax<jmax
  for i=1:imax
     bad=find(array(i,:)==NaN);
     if length(bad)>1 
         newarray(i,bad)=ones(bad)*badval;
     elseif length(bad)==1
         newarray(i,bad)=badval;
     end
  end
else
  for i=1:jmax
     bad=find(array(:,i)==NaN);
     if length(bad)>1 
         newarray(bad,i)=ones(bad)*badval;
     elseif length(bad)==1
         newarray(bad,i)=badval;
     end
   end
end
