Py学习  »  Python

GMD | 基于Python的快速Barnes插值

气象学家 • 1 年前 • 281 次点击  

Fast Barnes Interpolation

GitHub:https://github.com/MeteoSwiss/fast-barnes-py


This repository provides a Python implementation of the formal algorithms for fast Barnes interpolation as presented in the corresponding paper published in the GMD journal. https://doi.org/10.5194/gmd-16-1697-2023IF: 6.892 Q1

Barnes interpolation is a method that is widely used in geospatial sciences like meteorology to remodel data values recorded at irregularly distributed points into a representative analytical field. It is defined as

with Gaussian weights

Naive computation of Barnes interpolation leads to an algorithmic complexity of O(N x W x H), where N is the number of sample points and W x H the size of the underlying grid.
As pointed out in the paper, for sufficiently large n (in general in the range from 3 to 6) a good approximation of Barnes interpolation with a reduced complexity O(N + W x H) can be obtained by the convolutional expression

where δ is the Dirac impulse function and r(.) an elementary rectangular function of a specific length that depends on σ and n.

The module interpolation implements the Barnes interpolation algorithms using the Euclidean distance metric, as described in chapter 4 and 5.4 of the paper. The Barnes interpolation algorithms that use spherical distance metric on the sphere S^2, as outlined in chapter 5.5, are implemented im module interpolationS2. However, be aware here that the supported geographical domain and projection - as in the paper - is currently fixed to the European latitudes and Lambert conformal projection and cannot be freely chosen. These algorithms are also available as fast-barnes-py package on PyPI, where you also find a minimal working example.

The directory demo provides Python scripts that reproduce the figures and the tables shown in the paper. In order to execute them you can follow these instructions.

If you want to find out how to use the code, you best read through the provided minimum working example.








声明:欢迎转载、转发本号原创内容,可留言区留言或者后台联系小编(微信:gavin7675)进行授权。气象学家公众号转载信息旨在传播交流,其内容由作者负责,不代表本号观点。文中部分图片来源于网络,如涉及作品内容、版权和其他问题,请后台联系小编处理。


往期推荐

 获取ERA5-Land陆面高分辨率再分析数据(32TB)

★ 获取最新版本CMIP6降尺度数据集30TB

★ 获取ERA5常用变量再分析数据(26TB)

 EC数据商店推出Python在线处理工具箱

★ EC打造实用气象Python工具Metview

★ 机器学习简介及在短临天气预警中的应用

★ Nature-地球系统科学领域的深度学习及理解

★ 采用神经网络与深度学习来预报降水、温度


   欢迎加入气象学家交流群   

请备注:姓名/昵称-单位/学校-研究方向


Python社区是高质量的Python/Django开发社区
本文地址:http://www.python88.com/topic/153357
 
281 次点击