歡迎訂閱微信公眾號:『氣象學家』
閱讀觀看建議
基於Julia的工作,視頻建議PC端觀看,原文PDF回復「posit」可以獲取!
Title:Posits as an alternative to floats for weather and climate models
標題:天氣和氣候模式中,Posits數制(基於Julia語言)成為浮點型數制的一種替代方案
作者:Milan Klöwern1, Peter D. Düben2, and Tim N. Palmer3
1Atmospheric, 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
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數制在進行淺水模型模擬的時候,模擬結果表明,Posit16數制明顯要比半精度浮點型數制更高的精度。我們因此推薦使用具有2指數位的16位作為標準的Posit格式,其32個數量級的寬動態範圍為天氣和氣候模式提供了巨大的潛力。雖然主要集中於地球物理流體的模擬,但研究結果也表明對於在計算流體力學的廣闊領域中應用精度較低的Posit數制具有重要的意義和應用前景。
圖文第一部分
第二部分
補充在2018年8月8日,MIT正式發布程式語言Julia 1.0,號稱:Python、R、C++三合一。據 Julia Computing 的宣傳,在七項基礎算法的測試中,Julia 比 Python 快 20 倍,比 R 快 100 倍,比 Matlab 快 93 倍。
Julia 語言的官網:https://julialang.org/
Julia中文社區:https://cn.julialang.org/
Julia 語言項目地址:https://github.com/JuliaLang
MIT 開發的 Julia 語言是全球熱度上升最快的程式語言之一,下載量超過 200 萬次,下載者包括谷歌、Facebook、FAA 和美國能源部等各個部門的開發者。近日,MIT CSAIL 實驗室正式發布了 Julia 1.0,該語言期望結合 C 的速度、Matlab 的數學表徵、Python 的通用編程與 Shell 的膠水命令行,並構建開源、自由與便捷的程式語言。具有以下特點:
快速:Julia 為高性能而生。Julia 程序通過 LLVM 為多個平臺編譯高效的本地代碼。
通用:它使用多分派作為範例,使得表達許多面向對象和函數式的編程模式變得容易。標準庫提供異步 I/O、進程控制、日誌記錄、性能分析、包管理器等。
動態:Julia 是動態型語言,與腳本語言類似,並且支持交互式使用。
專業:它擅長數值計算,其語法適用於數學,支持多種數值數據類型,並具有良好並行性。Julia 的多分派天生適合定義數字和類數組的數據類型。
多樣:Julia 擁有豐富的描述性數據類型,類型聲明使程序條理清晰且穩定。
可組合:Julia 的包可以很好地組合在一起。單位數量的矩陣,或者貨幣和顏色的數據列表,都可以組合——而且性能很好。
參考:
1.https://www.youtube.com/watch?v=wp7AYMWlPLw
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.https://web.stanford.edu/class/ee380/Abstracts/170201-slides.pdf
4.https://www.cl.cam.ac.uk/research/srg/han/hprls/orangepath/kiwic-demos/kiwi-posit-unum-and-custom-arithmetics/posits-gustafson-137-897-1-PB.pdf
5.https://www.oschina.net/news/98846/julia-1-0-released
歷史文章推薦(點擊閱讀)
Julia語言在氣候系統模式中的應用
並行下載最新ERA-5數據的Python腳本
利用PyCINRAD處理、顯示天氣雷達基數據
Python中如何使用NCL的全部色表Colormaps?
GMT5(The General Mapping Tools)初探の安裝、配置、運行
有任何問題都歡迎交流探討,共同學習進步!
點個試試! ↓❤↓۞↓➹↓♨↓۞↓
Still waters run deep!