温室气体排放更敏感的模型(即更高的平衡气候敏感性(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代码实现) 的相关文章

  • 为什么 JPA/hibernate 不能映射到 MySQL blob 类型?

    我收到以下错误 Caused by org hibernate HibernateException Wrong column type in TestTable for column PAYLOAD Found blob expected
  • Spring MVC - 从 JSP 提交对象

    我有一个显示客户列表的 JSP ArrayList searchResults 我希望能够选择其中之一 并将其 提交给 Spring MVC 控制器 但是 我似乎无法传递所选对象 只能传递它的属性 例如 customerId 我真的需要传递
  • Google CoLab 中的 Python 3 支持

    我一直在尝试使用 Jupyter 笔记本https colab research google com https colab research google com 并且默认情况下它们似乎运行 Python 2 7 有什么方法可以在 Co
  • python TypeError:“NoneType”对象没有属性“__getitem__”

    这次我尝试另一个例子索莱姆的博客 http www janeriksolem net 2012 08 reading gauges detecting lines and html 它是一个使用霍夫变换检测图像中的直线和圆的模块 这是代码
  • 枚举列表中的列表

    我有一个约会 并记录了那天发生的事件 我想枚举显示日历的日期的事件列表 我还需要能够从列表中删除事件 def command add date event calendar if date not in calendar calendar
  • 向类添加属性的更 Pythonic 方式?

    我正在使用来自两个不同网页的数据集 但对于同一个人 数据集是合法信息 一些数据在第一页上可用 因此我使用正确的信息初始化被告对象 并将我当前没有数据的属性设置为null 这是班级 class Defendant object holds d
  • Java如何处理IF语句和效率

    我只是好奇 Java 实际是如何工作的if声明 注意 当我在下面说 组件 时 我指的是语句检查的各个部分 例如a b c 哪个在计算方面更有效 if a b c do stuff or if a if b if c do stuff 我之所
  • 字符串包含相同的字符但仍然不同[重复]

    这个问题在这里已经有答案了 我正在尝试读取一个 txt 文件并使用每个句子作为团队的名称 同时使用该名称查找另一个 txt 文件以获取其内容 所有 txt 文件都位于我的资产文件夹的根目录中 第一个 txt 文件工作正常 我使用assetm
  • pip 安装与本地包具有相同命名空间的包

    我使用的是 Python 3 6 5 通过 miniconda 安装 我的问题是由于我正在安装一个与本地包具有相同命名空间的包 pip 安装此包后 我无法再从本地包导入 我收到一个ModuleNotFoundError错误 如果可能的话 命
  • 将数据导入 Django 的好方法

    我想定期将数据导入 Django 项目 我需要告诉我的数据提供者我想要以什么格式接收数据 我应该以 Json XML CSV 格式请求吗 在 Django 中通常如何处理这个问题 Django 有一个用于导入数据的完整框架 称为 Fixtu
  • 如何反序列化数组 google-gson 内的数组

    我有这样的 JSON Answers Locale Ru Name Name1 Locale En Name Name2 Locale Ru Name Name3 Locale En Name Name4 正如你所看到的 我的数组里面有数组
  • 如何使用 json 谷歌翻译 api?

    我正在尝试使用来自 python 的 google 翻译和 utf 8 文本 如何调用json api 他们有一个将其嵌入 html 的文档 但我在任何地方都找不到合适的 API 或 wsdl 谢谢 拉斐尔 这是最终对我有用的代码 使用没有
  • 如何在关心 NaN 值的同时获取数据框中值的百分比变化?

    我有以下数据框 Date A 2015 01 01 10 2015 01 02 14 2015 01 05 NaN 2015 01 06 NaN 2015 01 07 5 2015 01 10 1 2015 01 11 NaN 2015 0
  • 什么触发了java垃圾收集器

    我对 Java 中垃圾收集的工作原理有点困惑 我知道当不再有对某个对象的实时引用时 该对象就有资格进行垃圾回收 但是如果它有对实时对象的引用怎么办 可以说我有一个节点集合 它们再次引用更多节点 List 1 gt Node a gt Nod
  • Python:计算非整数的阶乘

    我想知道是否有一种快速的 Pythonic 的方法来计算非整数的阶乘 例如 3 4 当然 内置的factorial 函数在Math模块可用 但它仅适用于积分 我不关心这里的负数 你想用math gamma x http docs pytho
  • 如何将目录导入为 python 模块

    如果有目录 home project aaa 我知道它是一个Python包 那么 我如何通过知道它的路径来导入这个模块 这意味着 我希望代码能够正常工作 aaa load module home project aaa 我知道的唯一方法是
  • GWT 和身份验证

    保护 GWT Tomcat 应用程序执行身份验证和授权的最佳策略是什么 有两种基本策略 确保入口点安全 确保远程服务的安全 确保入口点安全 最简单的方法是使用常规 Web 应用程序安全工具限制对 GWT 生成的 html js 文件的访问
  • 使用scrapy到json文件只得到一行输出

    好吧 我对一般编程很陌生 并且具体使用 Scrapy 来实现此目的 我编写了一个爬虫来从 pinterest com 上的 pin 获取数据 问题是我以前从我正在抓取的页面上的所有引脚获取数据 但现在我只获取第一个引脚的数据 我认为问题出在
  • 为什么这个多处理代码会失败? [复制]

    这个问题在这里已经有答案了 def sample pass Process target sample start Process target sample start 上面的代码失败并出现错误 已尝试在当前进程之前启动新进程 进程已完成
  • 像 Java 一样覆盖 Objective-C 类中的方法

    我经常使用此语句来扩展类 而不需要编写整个单独的文件 假设 ClassFromFramework 是库中包含的框架的一部分的类 public ClassFromFramework public String myMethod operati

随机推荐