Subversion Repositories pvinversion.ecmwf

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
3 michaesp 1
 
2
mode=2;
3
folder  ='/lhome/sprenger/PV_Inversion_Tool/';
4
filename='Z1_20060115_18';
5
 
6
% First image (otherwise first image is not correctly written)
7
figname = 'test.eps';
8
close;
9
fh=figure('Units','pixels','Position',[100 100 900 900])
10
set(gcf, 'PaperPosition', [2 1 15 10]);
11
print('-depsc2','-r0',figname);
12
 
13
% -------------------------------------------------------------------------- 
14
% Plot Coriolis parameter and get grid parameters
15
% --------------------------------------------------------------------------
16
 
17
if ( mode == 2 ) 
18
 
19
  m_deltax = cdf_loadV(folder,filename,'DELTAX');
20
  m_deltay = cdf_loadV(folder,filename,'DELTAY');
21
  m_deltaz = cdf_loadV(folder,filename,'DELTAZ');
22
 
23
  m_corlat = cdf_loadV(folder,filename,'CORLAT');
24
  m_coriol = cdf_loadV(folder,filename,'CORIOL');
25
 
26
  plot(m_coriol.var,m_corlat.var,'LineWidth',2)
27
  ylabel('Latitude','FontSize',15);
28
  xlabel('Coriolis parameter f','FontSize',15);
29
 
30
  figname = [ 'coriolis.eps' ];
31
  set(gcf, 'PaperPosition', [2 1 15 10]);
32
  print('-depsc2','-r0',figname);
33
 
34
end
35
 
36
 
37
% -------------------------------------------------------------------------- 
38
% Plot reference profile
39
% --------------------------------------------------------------------------
40
 
41
if ( mode == 3 ) 
42
 
43
  m_zref     = cdf_loadV(folder,filename,'ZREF');
44
  m_preref   = cdf_loadV(folder,filename,'PREREF');
45
  m_nsqref   = cdf_loadV(folder,filename,'NSQREF');
46
  m_rhoref   = cdf_loadV(folder,filename,'RHOREF');
47
  m_thetaref = cdf_loadV(folder,filename,'THETAREF');
48
 
49
  title('Reference profile');
50
 
51
  subplot(2,3,1);plot(10000*m_nsqref.var,  m_zref.var/1000); 
52
  xlabel('N^2 [10^{-4}s^{-2}]','FontSize',12);ylabel('Z [km]','FontSize',12);ylim([0 20]);
53
 
54
  subplot(2,3,2);plot(m_rhoref.var,  m_zref.var/1000); 
55
  xlabel('\rho [kg/m^3]','FontSize',12);ylim([0 20]);  
56
 
57
  subplot(2,3,3);plot(m_thetaref.var,m_zref.var/1000); 
58
  xlabel('\theta [K]','FontSize',12); ylim([0 20]);
59
 
60
  subplot(2,3,4);plot(10000*m_nsqref.var,  m_preref.var); 
61
  xlabel('N^2 [10^-{-4}s^{-2}]','FontSize',12);ylabel('P [hPa]','FontSize',12);set(gca,'YDir','reverse'); ylim([0 1020]);
62
 
63
  subplot(2,3,5);plot(m_rhoref.var,  m_preref.var); 
64
  xlabel('\rho [kg/m^3]','FontSize',12);set(gca,'YDir','reverse'); ylim([0 1020]);
65
 
66
  subplot(2,3,6);plot(m_thetaref.var,m_preref.var); 
67
  xlabel('\theta [K]','FontSize',12);set(gca,'YDir','reverse'); ylim([0 1020]);
68
 
69
  figname = [ 'reference.eps' ];
70
  set(gcf, 'PaperPosition', [2 1 15 10]);
71
  print('-depsc2','-r0',figname);
72
 
73
end
74
 
75