Julia编程语言助力天气/气候模式

本文在『气象学家』同步推送传送门;天气和气候模式中,Posits数制(基于Julia语言)成为浮点型数制的一种替代方案

TitlePosits as an alternative to floats for weather and climate models


**标题**:**天气和气候模式中,Posits数制(基于Julia语言)成为浮点型数制的一种替代方案**
**作者**:Milan Klöwern**1**, Tongtiegang Zhao** 2**, Peter D. Düben**2**, and Tim N. Palmer**3**
**1** Atmospheric, Oceanic and Planetary Physics, University of Oxford, Oxford, UK

2European Centre for Medium-Range, Weather Forecasts, Reading, UK

3Atmospheric, Oceanic and Planetary Physics, University of Oxford, Oxford, UK


**会议**:Proceedings of the Conference for Next Generation Arithmetic 2019. ACM, 2019: 2
**DOI**: [**https://doi.org/10.1145/3316279.3316281**](https://doi.org/10.1145/3316279.3316281)

Abstract

Posit numbers, a recently proposed alternative to floating-point numbers, claim to have smaller arithmetic rounding errors in many applications. By studying weather and climate models of low and medium complexity (the Lorenz system and a shallow water model) we present benefits of posits compared to floats at 16 bit. As a standardised posit processor does not exist yet, we emulate posit arithmetic on a conventional CPU. Using a shallow water model, forecasts based on 16-bit posits with 1 or 2 exponent bits are clearly more accurate than half precision floats. We therefore propose 16 bit with 2 exponent bits as a standard posit format, as its wide dynamic range of 32 orders of magnitude provides a great potential for many weather and climate models. Although the focus is on geophysical fluid simulations, the results are also meaningful and promising for reduced precision posit arithmetic in the wider field of computational fluid dynamics.


原文摘要

Posit数制号称在许多领域的应用中具有更小的算术舍入误差,成为了替代浮点数制的一种方案。通过研究天气和气候领域中低复杂度的模式,譬如,Lorenz系统和浅水模型,相比于传统的float16数制能够取得良好的效果。尽管一款标准化的数制处理器并不存在,但是我们可以利用传统的CPU来模拟数制算法。基于1或2指数位的Posit16数制在进行浅水模型模拟的时候,明显要比半精度浮点型数制更高的精度。我们因此推荐使用具有2指数位的16位作为标准的Posit格式,其32个数量级的宽动态范围为天气和气候模式提供了巨大的潜力。虽然主要集中于地球物理流体的模拟,但研究结果也表明对于在计算流体力学的广阔领域中应用精度较低的Posit数制具有重要的意义和应用前景。


图文





视频

https://www.youtube.com/watch?v=wp7AYMWlPLw

Julia背景信息

在2018年8月8日,MIT正式发布编程语言Julia 1.0,号称:Python、R、C++三合一。据 Julia Computing 的宣传,在七项基础算法的测试中,Julia 比 Python 快 20 倍,比 R 快 100 倍,比 Matlab 快 93 倍。

MIT 开发的 Julia 语言是全球热度上升最快的编程语言之一,下载量超过 200 万次,下载者包括谷歌、Facebook、FAA 和美国能源部等各个部门的开发者。近日,MIT CSAIL 实验室正式发布了 Julia 1.0,该语言期望结合 C 的速度、Matlab 的数学表征、Python 的通用编程与 Shell 的胶水命令行,并构建开源、自由与便捷的编程语言。具有以下特点:

  • 快速:Julia 为高性能而生。Julia 程序通过 LLVM 为多个平台编译高效的本地代码。
  • 通用:它使用多分派作为范例,使得表达许多面向对象和函数式的编程模式变得容易。标准库提供异步 I/O、进程控制、日志记录、性能分析、包管理器等。
  • 动态:Julia 是动态型语言,与脚本语言类似,并且支持交互式使用。
  • 专业:它擅长数值计算,其语法适用于数学,支持多种数值数据类型,并具有良好并行性。Julia 的多分派天生适合定义数字和类数组的数据类型。
  • 多样:Julia 拥有丰富的描述性数据类型,类型声明使程序条理清晰且稳定。
  • 可组合:Julia 的包可以很好地组合在一起。单位数量的矩阵,或者货币和颜色的数据列表,都可以组合——而且性能很好。

参考:

链接.1
[链接.2](Klöwer M, Düben P D, Palmer T N. Posits as an alternative to floats for weather and climate models[C]//Proceedings of the Conference for Next Generation Arithmetic 2019. ACM, 2019: 2.)
链接.3
链接.4
链接.5

有任何问题都欢迎交流探讨,共同学习进步!


-------------本文结束 感谢阅读-------------
作者Gavin
有问题请在相应页面留言(评论系统DISQUS需要"翻墙"才可见)
或者私信给我 GMAIL: zhpfu.atm@gmail.com
满分是10分的话,这篇文章你给几分
--> -->