Warning, /verification/tutorial_global_oce_latlon/diags_matlab/mit_plotzonalvelocity.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
051ee7f715 Jean*0001 % m-file: mit_plotzonalvelocity.m
0002
0003 % select timestep
0004 k=kmax;
0005
0006 up = u(:,:,:,k).*grd.pacific_hfacw;
0007 upzm = mit_zonalmean(up,grd.pacific_hfacw,grd.dxg);
0008 ua = u(:,:,:,k).*grd.atlantic_hfacw;
0009 uazm = mit_zonalmean(ua,grd.atlantic_hfacw,grd.dxg);
0010
0011 caxup = [min(upzm(:)) max(upzm(:))];
0012 uplev = -1:.1:1;
0013 if max(abs(caxup)) < .1
0014 uplev = .5*uplev;
0015 end
0016 if max(abs(caxup)) < .2
0017 uplev = .2*uplev;
0018 end
0019
0020 caxua = [min(uazm(:)) max(uazm(:))];
0021 ualev = -1:.1:1;
0022 if max(abs(caxua)) < .1
0023 ualev = .5*ualev;
0024 end
0025 if max(abs(caxua)) < .2
0026 ualev = .2*ualev;
0027 end
0028
0029 ixpw = 41;
0030 ixpc = 53;
0031 ixpe = 65;
0032
0033 ixaw = 83;
0034 ixac = 85;
0035 ixae = 2;
0036
0037 zaxis = -grd.zc;
0038 zaxis = -grd.zg;
0039 yaxis = grd.latg;
0040 %zaxis = -[1:grd.nz];
0041
0042 figure('PaperPosition',[0.25 0.621429 8 9.75714])
0043 sh = subplot(4,2,1);
0044 pcol(yaxis,zaxis,upzm')
0045 title('Pacific Ocean: zonal average')
0046 sh(3) = subplot(4,2,3);
0047 pcol(yaxis,zaxis,sq(up(ixpw,:,:))')
0048 title(['section at ' num2str(grd.long(ixpw)) '^{\circ}E'])
0049 sh(5) = subplot(4,2,5);
0050 pcol(yaxis,zaxis,sq(up(ixpc,:,:))')
0051 title(['section at ' num2str(grd.long(ixpc)) '^{\circ}E'])
0052 sh(7) = subplot(4,2,7);
0053 pcol(yaxis,zaxis,sq(up(ixpe,:,:))')
0054 title(['section at ' num2str(grd.long(ixpe)) '^{\circ}E'])
0055 sh(2) = subplot(4,2,2);
0056 pcol(yaxis,zaxis,uazm',ualev)
0057 title('Atlantic Ocean: zonal average')
0058 sh(4) = subplot(4,2,4);
0059 pcol(yaxis,zaxis,sq(ua(ixaw,:,:))')
0060 title(['section at ' num2str(grd.long(ixaw)) '^{\circ}E'])
0061 sh(6) = subplot(4,2,6);
0062 pcol(yaxis,zaxis,sq(ua(ixac,:,:))')
0063 title(['section at ' num2str(grd.long(ixac)) '^{\circ}E'])
0064 sh(8) = subplot(4,2,8);
0065 pcol(yaxis,zaxis,sq(ua(ixae,:,:))')
0066 title(['section at ' num2str(grd.long(ixae)) '^{\circ}E'])
0067
0068 set(sh,'xlim',[-1 1]*30,'ylim',[-400 0])
0069 set(sh,'layer','top')
0070 set(sh(1:2:end),'clim',[uplev(1) uplev(end)])
0071 set(sh(2:2:end),'clim',[ualev(1) ualev(end)])
0072 set(gcf,'currentAxes',sh(end-1));colorbar('h')
0073 set(gcf,'currentAxes',sh(end));colorbar('h')
0074
0075 suptitle(['experiment ' grd.dname ...
0076 ', timestep = ' num2str(timesteps(k)) ...
0077 ', ' tuname ' = ' num2str(tim(k)) ', zonal velocity [m/s]'])