温室气体排放更敏感的模型(即更高的平衡气候敏感性(ECS))在数年到数十年时间尺度上也具有更高的温度变化(Python代码实现)

2024-01-24

???????????????? 欢迎来到本博客 ❤️❤️????????

????博主优势: ???????????? 博客内容尽量做到思维缜密,逻辑清晰,为了方便读者。

⛳️ 座右铭: 行百里者,半于九十。

???????????? 本文目录如下: ????????????

目录

????1 概述

????2 运行结果

????3 参考文献

????4 Python代码、数据


????1 概述

文献:

Decadal global temperature variability increases strongly with climate sensitivity | Nature Climate Change

https://www.nature.com/articles/s41558-019-0527-4

https://www.nature.com/articles/s41558-019-0527-4

https://www.nature.com/articles/s41558-019-0527-4

摘要
气候相关的风险不仅取决于温室气体的变暖趋势,还取决于这一趋势的变化。然而,对气候变化影响的评估往往集中在全球变暖的最终水平上,偶尔关注全球变暖的速率,而很少关注变化趋势。在这里,我们展示了对温室气体排放更敏感的模型(即更高的平衡气候敏感性(ECS))在数年到数十年时间尺度上也具有更高的温度变化。与直觉相反,高敏感性气候不仅更有可能出现十年尺度的快速变暖,而且更有可能在历史上出现“停滞”时期,而低敏感性气候则更少出现。在历史时期,相对不常见的降温或停滞十年在高ECS世界(ECS=4.5 K)中的可能性是低ECS世界(ECS=1.5 K)的两倍多。由于ECS还影响未受控制的人为强迫未来情景下的背景变暖速率,因此超级变暖十年的可能性——超过二十世纪全球变暖的平均速率十倍以上——对ECS更加敏感。

???? 2 运行结果

部分代码:

# The warming probabilities
Z_proj_sup_warm = compute_odds_using_norm_distr(a, b, rate_list2/10, \
warming=True, mn=mn_war)
CS5 = ax5.contour(X, Y, Z_proj_sup_warm.transpose(), 6, colors='C3',\
levels=levels)
CS5.levels = [nf(val)*100 for val in CS5.levels]
ax5.clabel(CS5, CS5.levels, inline=True, fmt=fmt, fontsize=9)
#The cooling probabilities
Z_proj_sup_cool = compute_odds_using_norm_distr(a, b, rate_list2/10, \
warming=False, mn=mn_war)
CS6 = ax5.contour(X, Y, Z_proj_sup_cool.transpose(), 6, colors='c',\
levels=levels)
CS6.levels = [nf(val)*100 for val in CS6.levels]
ax5.clabel(CS6, CS6.levels, inline=True, fmt=fmt, fontsize=9)

ax5.set_xlabel(r'decadal trend (K decade$^{ {-1}}$)', size=12)
ax5.set_ylabel('ECS (K)', size=12)
ax5.set_title("Probability of decadal warming rate under RCP8.5", \
size=12, loc='center')
ax5.plot([anomaly_RCP85, anomaly_RCP85], [2, 4.5], lw=2, c="silver")

return fig, fig_sup, mod_vars

for experiment in ["control", "historical", "projections"]:
#for experiment in ["control"]:
nmods = 16
nfit = 49

#Bayesian, OLS, Bootstrap, Latentx,lognormalpsi, Latentx_quadratic, quadratic
linear_regression_type = 'OLS'
print_each_model = False
filter_models = 0       # filter_models=1 to use model output filtered to HadCRUT4 obs



# Data to consider
if experiment == 'control':
start_yr = 0        # If starting date not permitted; change nyr1 and nyr2
end_yr = 499        # If the end year is 499, one model (GISS) will me omitted
elif experiment == 'historical':
start_yr = 1880     # If starting date not permitted; change nyr1 and nyr2
end_yr = 2012
elif experiment == 'projections':
start_yr = 2000     # If starting date not permitted; change nyr1 and nyr2
end_yr = 2089
elif experiment == 'aroundnow':
start_yr = 1970
end_yr = 2040

stdbetaW15 = []
ECS_best_list = []
ECS_hi_list = []
ECS_lo_list = []


# Detrending options
dtrd = 1

# Length and number of windows
kwind = end_yr-start_yr+1-winlen

# Observational Variables
jvar = 0
var_names = [r'SD$[\beta]$']
jvar_max = len(var_names)

mod_vars_constr = np.zeros((jvar_max, kwind, nmods))


# Define common climatological period
if experiment == 'control':
nyr1 = start_yr
nyr2 = start_yr+30
ensemble = 'control'
elif experiment == 'historical':
nyr1 = 1970 - start_yr
nyr2 = 2000 - start_yr
ensemble = 'hist'
if filter_models > 0: ensemble = 'hist_f'
elif experiment == 'projections':
nyr1 = 2020 - start_yr
nyr2 = 2050 - start_yr
ensemble = 'RCP85'
elif experiment == 'aroundnow':
nyr1 = 1970 - start_yr
nyr2 = 2000 - start_yr
ensemble = 'RCP45'

nyrs = end_yr-start_yr + 1


# ========================================================================
# Get model output
# ========================================================================
N_mods, lambda_mod, ecs_mod, mod_name, mod_lab, dT_mods, yr, _, _ = \
get_CMIP_data(ensemble, nmods, start_yr, end_yr, nyrs, nyr1, nyr2, filter_models, last_n_yrs=True)

# ========================================================================
# Calculate statistics in each window
# ========================================================================
stdT, stdN, ar1T, ratio, mod_vars, end_of_window =\
calculate_major_statistics(dT_mods, N_mods, start_yr, end_yr, yr, jvar_max, dtrd, winlen, nmods)


# ========================================================================
# Calculate key statistics for each model
# ========================================================================
stdN_mod, mod_var, stdT_mod, ar1T_mod, ratio_mod, q2co2, rad_factor = \
calculate_statistics_per_model(stdT, stdN, mod_vars, jvar, ar1T, ratio, ecs_mod, \
mod_lab, mod_name, lambda_mod, print_each_model, nmods)


if experiment == 'control':
print_info_models(ecs_mod, stdN_mod, mod_var, rad_factor)


x = mod_var[0:nfit]
if experiment == 'control':
STDB_CTRL = x
ecs = ecs_mod[0:nfit]
xlab = var_names[jvar]
ylab = 'ECS (K)'

corr, dcorr = cross_corr(x, ecs, 0)
print(' ')
print('OLS Correlation of {} and {} in {} = {:.3f} +/- {:.3f}'.format(ylab, \
xlab, experiment, corr, dcorr))

if experiment == 'control':
x_obs = 10          # some fake numbers
dx_obs = 10         # some fake numbers
xfull = mod_var[0:nfit]
yfull = ecs_mod[0:nfit]

a, b, _, _, _, _, _, _, _ = EC_pdf_ECS(xfull, yfull, x_obs, dx_obs, xlab,\
ylab, mod_lab, lambda_mod, nmods, nfit, linear_regression_type, 0)

if experiment == 'control':
# This plots (a) of figure 4
fig_contour_odds, fig_sup, mod_vars_control = fig04_contour(experiment, True, mod_vars, \
fig_contour_odds, fig_sup)
else:
# This plots (c) of figure 4 and maybe also fig ED2a
fig04_contour(experiment, True, mod_vars_control, fig_contour_odds, fig_sup)

if experiment == 'control':
fig_contour_odds, fig_sup, mod_vars_control = fig04_contour(experiment, True, mod_vars, \
fig_contour_odds, fig_sup)


# The scatter part of the figures, so b, d and again b
def scatterandfit(STDB_CTRL, ecs, rate, warming=True):
'''scatterplot of chances getting over certain threshold and ECS,
depending on the background rate'''
if warming is True:
plot_scat_full(ecs, norm(rate, STDB_CTRL).sf(0.07)*100, 'ECS (K)', \
'probability of warming >0.7 K/dec', mod_lab, ecs_mod, 3, ecs_or_lambda='ecs')
OLSfit = sm.OLS(norm(rate, STDB_CTRL).sf(0.07), add_constant(ecs)).fit()

if warming is False:
plot_scat_full(ecs, norm(rate, STDB_CTRL).cdf(0.0)*100, \
'ECS (K)', 'cooling decade chance', mod_lab, ecs_mod, 3, ecs_or_lambda='ecs')
OLSfit = sm.OLS(norm(rate, STDB_CTRL).cdf(0.0), add_constant(ecs)).fit()

rsquared = OLSfit.rsquared
print('rsquared of ECS/anomolous trend X is {:.2f}'.format(rsquared))
return


if experiment == 'historical':
# ax3 assumes that there is a constant background warming, independent of model
ax3 = fig_sup.add_subplot(122)
rate = [anomaly_hist/10] * len(ecs)
plt.sca(ax3)
scatterandfit(STDB_CTRL, ecs, rate, warming=False)


ax3.plot(np.linspace(2.0, 4.5, 100), Z_hist_con[argmin0]*100, lw=2, color='silver')
ax3.set_xlabel('ECS (K)', fontsize=12)
ax3.set_ylabel('Probability (%)', fontsize=12)
ax3.tick_params(axis='both', which='major', labelsize=12)
ax3.set_title(r'Probability of anomaly in trend <-{:.1f} K decade$^{ {-1}}$'.format(anomaly_hist), \
loc='center', size=12)


ax3.spines['right'].set_visible(False)                   # remove axes top, right
ax3.spines['top'].set_visible(False)

# ax4 assumes a variable background warming, dependent on ECS
ax4 = fig_contour_odds.add_subplot(222)
rate = background_warming('hist')['rate_explained_by_ECS']
rate = background_warming('RCP45', experiment='aroundnow')['rate_explained_by_ECS']
plt.sca(ax4)
scatterandfit(STDB_CTRL, ecs, rate, warming=False)
ax4.plot(np.linspace(2.0, 4.5, 100), Z_hist_sup[argmin0]*100, color='silver', lw=2)
ax4.set_xlabel('ECS (K)', fontsize=12)
ax4.set_ylabel('Probability (%)', fontsize=12)
ax4.tick_params(axis='both', which='major', labelsize=12)
ax4.set_title('Probability cooling under competing processes', size=12, loc='center')
ax4.set_ylim([0.0, 12])

ax4.spines['right'].set_visible(False)                   # remove axes top, right
ax4.spines['top'].set_visible(False)

????3 参考文献

文章中一些内容引自网络,会注明出处或引用为参考文献,难免有未尽之处,如有不妥,请随时联系删除。

???? 4 Python代码、数据

a 小部件

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

温室气体排放更敏感的模型(即更高的平衡气候敏感性(ECS))在数年到数十年时间尺度上也具有更高的温度变化(Python代码实现) 的相关文章

  • 在pyyaml中表示具有相同基类的不同类的实例

    我有一些单元测试集 希望将每个测试运行的结果存储为 YAML 文件以供进一步分析 YAML 格式的转储数据在几个方面满足我的需求 但测试属于不同的套装 结果有不同的父类 这是我所拥有的示例 gt gt gt rz shorthand for
  • 以编程方式在java的resources/source文件夹中创建文件?

    我有两个资源文件夹 src 这是我的 java 文件 资源 这是我的资源文件 图像 properties 组织在文件夹 包 中 有没有办法以编程方式在该资源文件夹中添加另一个 properties 文件 我尝试过这样的事情 public s
  • 在游戏视图下添加 admob

    我一直试图将 admob 放在我的游戏视图下 这是我的代码 public class HoodStarGame extends AndroidApplication Override public void onCreate Bundle
  • react-native run-android 失败并出现错误:任务 ':app:dexDebug' 执行失败

    我使用的是 Windows 8 1 和react native cli 1 0 0 and react native 0 31 0 添加后react native maps对于该项目 我运行了命令react native upgrade并给
  • 编辑文件名在 JComboBox 中的显示方式,同时保持对文件的访问

    我对 Java 很陌生 对堆栈溢出也很陌生 我正在尝试利用 JMF API 创建一个用 Java 编码的简单媒体播放器 到目前为止 我已经能够设置一个简单的队列 播放列表来使用JComboBox called playListHolder
  • ExpectedFailure 被计为错误而不是通过

    我在用着expectedFailure因为有一个我想记录的错误 我现在无法修复 但想将来再回来解决 我的理解expectedFailure是它会将测试计为通过 但在摘要中表示预期失败的数量为 x 类似于它如何处理跳过的 tets 但是 当我
  • 循环中断打破tqdm

    下面的简单代码使用tqdm https github com tqdm tqdm在循环迭代时显示进度条 import tqdm for f in tqdm tqdm range 100000000 if f gt 100000000 4 b
  • Numpy 优化

    我有一个根据条件分配值的函数 我的数据集大小通常在 30 50k 范围内 我不确定这是否是使用 numpy 的正确方法 但是当数字超过 5k 时 它会变得非常慢 有没有更好的方法让它更快 import numpy as np N 5000
  • 通过数据框与函数进行交互

    如果我有这样的日期框架 氮 EG 00 04 NEG 04 08 NEG 08 12 NEG 12 16 NEG 16 20 NEG 20 24 datum von 2017 10 12 21 69 15 36 0 87 1 42 0 76
  • 在 Spring 中重构这个的最佳方法?

    private final ExecutorService executorParsers Executors newFixedThreadPool 10 public void parse List
  • 游戏内的java.awt.Robot?

    我正在尝试使用下面的代码来模拟击键 当我打开记事本时 它工作正常 但当我打开我想使用它的游戏时 它没有执行任何操作 所以按键似乎不起作用 我尝试模拟鼠标移动和点击 这些动作确实有效 有谁知道如何解决这个问题 我发现这个问题 如何在游戏中使用
  • VSCode:调试配置中的 Python 路径无效

    对 Python 和 VSCode 以及 stackoverflow 非常陌生 直到最近 我已经使用了大约 3 个月 一切都很好 当尝试在调试器中运行任何基本的 Python 程序时 弹出窗口The Python path in your
  • glpk.LPX 向后兼容性?

    较新版本的glpk没有LPXapi 旧包需要它 我如何使用旧包 例如COBRA http opencobra sourceforge net openCOBRA Welcome html 与较新版本的glpk 注意COBRA适用于 MATL
  • Java中的Object类是什么?

    什么是或什么类型private Object obj Object http download oracle com javase 6 docs api java lang Object html是Java继承层次结构中每个类的最终祖先 从
  • spring中如何使用jackson代替JdkSerializationRedisSerializer

    我在我的一个 Java 应用程序中使用 Redis 并且正在序列化要存储在 Redis 中的对象列表 但是 我注意到使用 RedisTemplate 会使用 JdkSerializationRedisSerializer 相反 我想使用 J
  • javafx android 中的文本字段和组合框问题

    我在简单的 javafx android 应用程序中遇到问题 问题是我使用 gradle javafxmobile plugin 在 netbeans ide 中构建了非常简单的应用程序 其中包含一些文本字段和组合框 我在 android
  • Eclipse 中 Spring MVC 模型对象的 (jsp /jstl) 视图中的代码辅助

    在 Spring MVC 中 当将对象放置在视图模型中时 如下所示 public String getUser Model model fetch user model addAttribute user user return viewN
  • 循环标记时出现“ValueError:无法识别的标记样式 -d”

    我正在尝试编码pyplot允许不同标记样式的绘图 这些图是循环生成的 标记是从列表中选取的 为了演示目的 我还提供了一个颜色列表 版本是Python 2 7 9 IPython 3 0 0 matplotlib 1 4 3 这是一个简单的代
  • FileOutputStream.close() 中的设备 ioctl 不合适

    我有一些代码可以使用以下命令将一些首选项保存到文件中FileOutputStream 这是我已经写了一千遍的标准代码 FileOutputStream out new FileOutputStream file try BufferedOu
  • Python:元类属性有时会覆盖类属性?

    下面代码的结果让我感到困惑 class MyClass type property def a self return 1 class MyObject object metaclass MyClass a 2 print MyObject

随机推荐