[1] | 1 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
| 2 | % |
---|
| 3 | % Make 1 plot from the results of the UPWELLING test case |
---|
| 4 | % |
---|
| 5 | % Further Information: |
---|
| 6 | % http://www.brest.ird.fr/Roms_tools/ |
---|
| 7 | % |
---|
| 8 | % This file is part of ROMSTOOLS |
---|
| 9 | % |
---|
| 10 | % ROMSTOOLS is free software; you can redistribute it and/or modify |
---|
| 11 | % it under the terms of the GNU General Public License as published |
---|
| 12 | % by the Free Software Foundation; either version 2 of the License, |
---|
| 13 | % or (at your option) any later version. |
---|
| 14 | % |
---|
| 15 | % ROMSTOOLS is distributed in the hope that it will be useful, but |
---|
| 16 | % WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 17 | % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
| 18 | % GNU General Public License for more details. |
---|
| 19 | % |
---|
| 20 | % You should have received a copy of the GNU General Public License |
---|
| 21 | % along with this program; if not, write to the Free Software |
---|
| 22 | % Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
---|
| 23 | % MA 02111-1307 USA |
---|
| 24 | % |
---|
| 25 | % Copyright (c) 2002-2006 by Pierrick Penven |
---|
| 26 | % e-mail:Pierrick.Penven@ird.fr |
---|
| 27 | % |
---|
| 28 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
| 29 | clear all |
---|
| 30 | close all |
---|
| 31 | |
---|
| 32 | tndx=5; |
---|
| 33 | nc=netcdf('roms_avg.nc'); |
---|
| 34 | time=(nc{'scrum_time'}(tndx))/(24*3600); |
---|
| 35 | h=nc{'h'}(:); |
---|
| 36 | y=squeeze(nc{'y_rho'}(:,2)); |
---|
| 37 | zeta=squeeze(nc{'zeta'}(tndx,:,:)); |
---|
| 38 | t=squeeze(nc{'temp'}(tndx,:,:,2)); |
---|
| 39 | u=squeeze(nc{'u'}(tndx,:,:,2)); |
---|
| 40 | [N,M]=size(t); |
---|
| 41 | theta_s=nc.theta_s(:); |
---|
| 42 | theta_b=nc.theta_b(:); |
---|
| 43 | hc=nc.hc(:); |
---|
| 44 | close(nc); |
---|
| 45 | |
---|
| 46 | zr = zlevs(h,zeta,theta_s,theta_b,hc,N,'r'); |
---|
| 47 | zr=squeeze(zr(:,:,1)); |
---|
| 48 | yr=reshape(y,1,M); |
---|
| 49 | yr=repmat(yr,[N 1])/1000; |
---|
| 50 | |
---|
| 51 | contourf(yr,zr,t,[9:0.5:20]) |
---|
| 52 | shading flat |
---|
| 53 | colorbar |
---|
| 54 | caxis([10 18]) |
---|
| 55 | hold on |
---|
| 56 | [C1,h1,]=contour(yr,zr,100*u,[-100:20:100],'k'); |
---|
| 57 | clabel(C1,h1) |
---|
| 58 | title(['UPWELLING - temp [^oC] - day = ',num2str(time)]) |
---|
| 59 | |
---|
| 60 | |
---|