Back to home page

MITgcm

 
 

    


Warning, /utils/matlab/cs_grid/bk_line/check_bk_line.m is written in an unsupported language. File is not indexed.

view on githubraw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
28aaff1409 Jean*0001 function check_bk_line( ...
                0002          nc,ydim,jl,ylat,savNpts,savFlg,savIuv,savJuv,savXsg,savYsg);
                0003 
                0004 %------------------------------------------------------
                0005 if jl > 1 & ydim < 6*nc,
                0006 %-- check that this broken-line is different from any previous one :
                0007  jdif=ones(ydim,1);
                0008  it=savNpts(jl);
                0009  for j=1:jl-1,
                0010   if savNpts(j)==it, 
                0011    jdif(j)= max(abs(savXsg(1:it+1,j)-savXsg(1:it+1,jl))) ;
                0012    jdif(j)= jdif(j)+max(abs(savYsg(1:it+1,j)-savYsg(1:it+1,jl))) ;
                0013   end
                0014  end
                0015  [JJ]=find(jdif == 0);
                0016  if length(JJ) ~= 0, 
                0017    fprintf('WARNING => line identical to Ylat=');
                0018    for j=1:length(JJ), fprintf(' %8.3f,',ylat(JJ(j))); end ; fprintf('\n');
                0019  end
                0020 end
                0021 %------------------------------------------------------
                0022 
                0023 return