Ignore:
Timestamp:
05/04/11 17:34:07 (13 years ago)
Author:
cholod
Message:

patch_romstools_16_02_2011.tar : Bug in make_NCEP.m, get_NCEP_grid.m

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Roms_tools/Aforc_NCEP/get_NCEP_grid.m

    r1 r7  
    7979lat=lat(j); 
    8080% 
     81% If we are in OpenDap (Get_My_Data=0) we need 
     82% a shift of decal=1, because the indexes begin at 0 in OpenDap. 
     83% If we use local data, Get_My_Data=1, there is no shift needed,  
     84% then decal=0; 
     85 
     86if Get_My_Data==1 
     87    decal=0; 
     88else 
     89    decal=1; 
     90end 
     91% 
    8192if ~isempty(i1) 
    82   i1min=min(i1)-1; 
    83   i1max=max(i1)-1; 
     93  i1min=min(i1)-decal; 
     94  i1max=max(i1)-decal; 
    8495else 
    8596  i1min=[]; 
     
    8798end 
    8899if ~isempty(i2) 
    89   i2min=min(i2)-1; 
    90   i2max=max(i2)-1; 
     100  i2min=min(i2)-decal; 
     101  i2max=max(i2)-decal; 
    91102else 
    92103  i2min=[]; 
     
    94105end 
    95106if ~isempty(i3) 
    96   i3min=min(i3)-1; 
    97   i3max=max(i3)-1; 
     107  i3min=min(i3)-decal; 
     108  i3max=max(i3)-decal; 
    98109else 
    99110  i3min=[]; 
     
    101112end 
    102113% 
    103 jmin=min(j)-1; 
    104 jmax=max(j)-1; 
     114jmin=min(j)-decal; 
     115jmax=max(j)-decal; 
    105116jrange=['[',num2str(jmin),':',num2str(jmax),']']; 
    106117 
Note: See TracChangeset for help on using the changeset viewer.