clear
tpr_no=squeeze(ncread('daily_no_sahara.nc','tpr'));
tpr_yes=squeeze(ncread('daily_yes_sahara.nc','tpr'));
tpr_no=squeeze(nanmean(tpr_no));
tpr_no=squeeze(nanmean(tpr_no));
tpr_yes=squeeze(nanmean(tpr_yes));
tpr_yes=squeeze(nanmean(tpr_yes));
subplot(2,1,1)
p = gkdeb(tpr_no);
plot(p.x,p.pdf)
p = gkdeb(tpr_yes);
hold on
plot(p.x,p.pdf,'r')
xlim([0 15])
ylim([0 0.25])
title('Savanna')
clear
tpr_no=squeeze(ncread('daily_no_rainforest.nc','tpr'));
tpr_yes=squeeze(ncread('daily_yes_rainforest.nc','tpr'));
tpr_no=squeeze(nanmean(tpr_no));
tpr_no=squeeze(nanmean(tpr_no));
tpr_yes=squeeze(nanmean(tpr_yes));
tpr_yes=squeeze(nanmean(tpr_yes));
subplot(2,1,2)
p = gkdeb(tpr_no);
plot(p.x,p.pdf)
p = gkdeb(tpr_yes);
hold on
plot(p.x,p.pdf,'r')
xlim([0 15])
ylim([0 0.5])
title('rainforest')
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear
t2m_no=squeeze(ncread('daily_no_sahara.nc','t2m'));
t2m_yes=squeeze(ncread('daily_yes_sahara.nc','t2m'));
t2m_no=squeeze(nanmean(t2m_no));
t2m_no=squeeze(nanmean(t2m_no));
t2m_yes=squeeze(nanmean(t2m_yes));
t2m_yes=squeeze(nanmean(t2m_yes));
subplot(2,1,1)
p = gkdeb(t2m_no);
plot(p.x,p.pdf)
p = gkdeb(t2m_yes);
hold on
plot(p.x,p.pdf,'r')
xlim([20 32])
ylim([0 0.5])
title('Savanna')
clear
t2m_no=squeeze(ncread('daily_no_rainforest.nc','t2m'))-271;
t2m_yes=squeeze(ncread('daily_yes_rainforest.nc','t2m'))-271;
t2m_no=squeeze(nanmean(t2m_no));
t2m_no=squeeze(nanmean(t2m_no));
t2m_yes=squeeze(nanmean(t2m_yes));
t2m_yes=squeeze(nanmean(t2m_yes));
subplot(2,1,2)
p = gkdeb(t2m_no);
plot(p.x,p.pdf)
p = gkdeb(t2m_yes);
hold on
plot(p.x,p.pdf,'r')
xlim([20 32])
ylim([0 0.5])
title('rainforest')
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% density
%% rainfall density
% savanna
tpr_no=squeeze(ncread('daily_no_sahara.nc','tpr'));
tpr_yes=squeeze(ncread('daily_yes_sahara.nc','tpr'));
tpr_no=squeeze(nanmean(tpr_no));
tpr_no=squeeze(nanmean(tpr_no));
tpr_yes=squeeze(nanmean(tpr_yes));
tpr_yes=squeeze(nanmean(tpr_yes));
index= find(tpr_yes>0&tpr_yes<=5);
a=tpr_no(index);
density(1,1)=mean(a);
index= find(tpr_yes>5&tpr_yes<=15);
a=tpr_no(index);
density(1,2)=mean(a);
index= find(tpr_no>0&tpr_no<=5);
a=tpr_no(index);
density(2,1)=mean(a);
index= find(tpr_no>5&tpr_no<=15);
a=tpr_no(index);
density(2,2)=mean(a);
bar(density');
title('savanna')
% rainforest
tpr_no=squeeze(ncread('daily_no_rainforest.nc','tpr'));
tpr_yes=squeeze(ncread('daily_yes_rainforest.nc','tpr'));
tpr_no=squeeze(nanmean(tpr_no));
tpr_no=squeeze(nanmean(tpr_no));
tpr_yes=squeeze(nanmean(tpr_yes));
tpr_yes=squeeze(nanmean(tpr_yes));
index= find(tpr_yes>0&tpr_yes<=5);
a=tpr_no(index);
density(1,1)=mean(a);
index= find(tpr_yes>5&tpr_yes<=15);
a=tpr_no(index);
density(1,2)=mean(a);
index= find(tpr_no>0&tpr_no<=5);
a=tpr_no(index);
density(2,1)=mean(a);
index= find(tpr_no>5&tpr_no<=15);
a=tpr_no(index);
density(2,2)=mean(a);
bar(density');
title('rainforest')
https://blog.sciencenet.cn/blog-569118-626171.html
上一篇:
estimating 5-day precipitation extremes下一篇:
estimating sensitivity of rainfall frequencies to vegetation