source: issm/oecreview/Archive/20545-21336/ISSM-20796-20797.diff@ 21337

Last change on this file since 21337 was 21337, checked in by Mathieu Morlighem, 8 years ago

CHG: added Archive/20545-21336

File size: 1.6 KB
  • ../trunk-jpl/examples/Pig/PigRegion.m

     
    77% Get necessary data to build up the velocity grid
    88xmin    = ncreadatt(nsidc_vel,'/','xmin');
    99ymax    = ncreadatt(nsidc_vel,'/','ymax');
    10 spacing = ncreadatt(nsidc_vel,'/','spacing');ls
     10spacing = ncreadatt(nsidc_vel,'/','spacing');
    1111
    12 nx      = double(ncreadatt(nsidc_vel,'/','nx'));
    13 ny      = double(ncreadatt(nsidc_vel,'/','ny'));
    14 vx      = double(ncread(nsidc_vel,'vx'));
    15 vy      = double(ncread(nsidc_vel,'vy'));
     12nx = double(ncreadatt(nsidc_vel,'/','nx'));
     13ny = double(ncreadatt(nsidc_vel,'/','ny'));
     14vx = double(ncread(nsidc_vel,'vx'));
     15vy = double(ncread(nsidc_vel,'vy'));
    1616
    1717xmin = strtrim(xmin);  % this is a string, and we need to recover the double value
    1818xmin = str2num(xmin(1:end-2));  % get rid of the unit and convert to double
     
    2828y=(ymax)-(0:1:ny)'*spacing;
    2929
    3030%Limit the region to Pine Island
    31 posx=find(x<=-12.0e5 & x>=-18.0e5);
    32 x_pig=x(posx);
    33 posy=find(y<=1.0e5 & y>-4.0e5);
    34 y_pig=flipud(y(posy));
     31posx  = find(x<=-12.0e5 & x>=-18.0e5);
     32x_pig = x(posx);
     33posy  = find(y<=1.0e5 & y>-4.0e5);
     34y_pig = flipud(y(posy));
    3535
    36 vx_pig=flipud(vx(posx,posy)');
    37 vy_pig=flipud(vy(posx,posy)');
    38 vel_pig=sqrt(vx_pig.^2+vy_pig.^2);
     36vx_pig  = flipud(vx(posx,posy)');
     37vy_pig  = flipud(vy(posx,posy)');
     38vel_pig = sqrt(vx_pig.^2+vy_pig.^2);
    3939
    40 imagesc(x_pig,y_pig,log(vel_pig+1))
    41 axis xy equal
     40imagesc(x_pig,y_pig,log(vel_pig+1));
     41axis xy equal tight;
Note: See TracBrowser for help on using the repository browser.