source: LMDZ6/trunk/libf/phylmd/ecrad/test/ifs/plot_ifs.m @ 5134

Last change on this file since 5134 was 4773, checked in by idelkadi, 12 months ago
  • Update of Ecrad in LMDZ The same organization of the Ecrad offline version is retained in order to facilitate the updating of Ecrad in LMDZ and the comparison between online and offline results. version 1.6.1 of Ecrad (https://github.com/lguez/ecrad.git)
  • Implementation of the double call of Ecrad in LMDZ


File size: 3.6 KB
Line 
1% This matlab scripts plots some of the inputs to the radiation scheme
2% in Fig. 1 and the outputs in Fig. 2
3
4% Location of loadnc.m
5path(path, '../common')
6
7code = 'ecrad_meridian';
8in = loadnc([code '.nc']);
9cases = {[code '_noaer_out.nc'],
10         [code '_ecckd_tc_noaer_out.nc'],
11         [code '_default_out.nc'],
12         [code '_ecckd_tc_out.nc'],
13         [code '_expexp_out.nc'],
14         [code '_tc_out.nc'],
15         [code '_spartacus_out.nc'],
16         [code '_ecckd_spartacus_out.nc'],
17         [code '_default_out_REFERENCE.nc']};
18clear out
19for icase = 1:length(cases)
20  out{icase} = loadnc(cases{icase});
21end
22case_list = [1 2 3 4 5 6 7 8 9];
23leg = {'McICA no aerosols',...
24       'ecCKD Tripleclouds no aerosols',...
25       'McICA',...
26       'ecCKD McICA',...
27       'McICA Exp-Exp',...
28       'Tripleclouds',...
29       'SPARTACUS',...
30       'ecCKD SPARTACUS',...
31       'McICA REFERENCE'};
32
33styles = {'b','b--','r','r--','g','m','c','k','k--'};
34
35p = 0.01.*0.5.*median(in.pressure_hl(1:end-1,:)+in.pressure_hl(2:end,:),2);
36
37figure(1)
38clf
39set(gcf,'defaultlinelinewidth',1);
40set(gcf,'units','inches','paperposition',[0.5 0.5 15 30]);
41nplot = 4;
42
43subplot(nplot,1,1)
44plot(in.lat,in.cos_solar_zenith_angle,'k')
45xlim([-90 90]);
46ylabel('Cosine of solar zenith angle');
47
48subplot(nplot,1,2)
49plot(in.lat,in.skin_temperature-273.15,'r');
50hold on
51plot(in.lat,in.temperature_hl(end-1,:)-273.15,'b');
52legend('Skin temperature','Air between first two model levels');
53xlim([-90 90]);
54ylabel('Temperature (\circC)');
55ylim([-50 60]);
56
57subplot(nplot,1,3)
58%contour(in.lat,p,in.q_ice,10.^[-5 -5],'b');
59%hold on
60%contour(in.lat,p,in.q_liquid,10.^[-5 -5],'r');
61contourf(in.lat,p,in.cloud_fraction,[0.05:0.1:0.95],'k');
62%shading flat
63colormap(jet)
64set(gca,'ydir','reverse');
65ylim([0 1013]);
66xlim([-90 90]);
67ylabel('Pressure (hPa)');
68text(-90, 0, [' ' 10 '  Cloud fraction'],'verticalalignment','top')
69
70subplot(nplot,1,4)
71sea_salt = 1e9.*sum(squeeze(in.aerosol_mmr(end,1:3,:)),1);
72dust = 1e9.*sum(squeeze(in.aerosol_mmr(end,4:6,:)),1);
73organics = 1e9.*sum(squeeze(in.aerosol_mmr(end,7:8,:)),1);
74black_carbon = 1e9.*sum(squeeze(in.aerosol_mmr(end,9:10,:)),1);
75sulphate = 1e9.*sum(squeeze(in.aerosol_mmr(end,11:12,:)),1);
76
77plot(in.lat,sea_salt,'b');
78hold on
79plot(in.lat,dust,'r');
80plot(in.lat,organics,'g');
81plot(in.lat,black_carbon,'k');
82plot(in.lat,sulphate,'m');
83legend('Sea salt','Dust','Organics','Black carbon','Sulphate');
84ylabel('Aerosol mass mixing ratio (\mug kg^{-1})');
85xlabel('Latitude (\circN)');
86xlim([-90 90]);
87set(gca,'yscale','log');
88
89figure(2)
90clf
91set(gcf,'defaultlinelinewidth',1);
92set(gcf,'units','inches','paperposition',[0.5 0.5 15 30]);
93nplot = 4;
94subplot(nplot,1,1)
95for icase = case_list
96  plot(in.lat, out{icase}.flux_dn_sw(end,:),styles{icase})
97  hold on
98%  plot(in.lat, out{icase}.flux_dn_sw_clear(end,:),[styles{icase} '--'])
99%  plot(in.lat, out{icase}.flux_dn_direct_sw(end,:),[styles{icase} '--'])
100end
101xlim([-90 90]);
102ylabel('Surface SW down (W m^{-2})');
103legend(leg{case_list})
104
105subplot(nplot,1,2)
106for icase = case_list
107  cre =  out{icase}.flux_dn_sw(1,:)-out{icase}.flux_dn_sw_clear(1,:) ...
108        -out{icase}.flux_up_sw(1,:)+out{icase}.flux_up_sw_clear(1,:);
109  plot(in.lat, cre,styles{icase})
110  hold on
111end
112xlim([-90 90]);
113ylabel('SW cloud radiative effect (W m^{-2})');
114
115subplot(nplot,1,3)
116for icase = case_list
117  cre =  out{icase}.flux_dn_lw(1,:)-out{icase}.flux_dn_lw_clear(1,:) ...
118        -out{icase}.flux_up_lw(1,:)+out{icase}.flux_up_lw_clear(1,:);
119  plot(in.lat, cre,styles{icase})
120  hold on
121end
122xlim([-90 90]);
123ylabel('LW cloud radiative effect (W m^{-2})');
124
125subplot(nplot,1,4)
126for icase = case_list
127  plot(in.lat, out{icase}.cloud_cover_sw,styles{icase});
128  hold on
129end
130xlim([-90 90]);
131ylabel('Cloud cover');
132xlabel('Latitude (\circN)');
Note: See TracBrowser for help on using the repository browser.