This paper presents TorchNWP, a compilation library tool for the efficient coupling of artificial intelligence components and traditional numerical models. It aims to address the issues of poor cross-language compatibility, insufficient coupling flexibility, and low data transfer efficiency between operational numerical models developed in Fortran and Python-based deep learning frameworks. Based on LibTorch, it optimizes and designs a unified application-layer calling interface, converts deep learning models under the PyTorch framework into a static binary format, and provides C/C++ interfaces. Then, using hybrid Fortran/C/C++ programming, it enables the deployment of deep learning models within numerical models. Integrating TorchNWP into a numerical model only requires compiling it into a callable link library and linking it during the compilation and linking phase to generate the executable. On this basis, tangent linear and adjoint model based on neural networks are implemented at the C/C++ level, which can shield the internal structure of neural network models and simplify the construction process of four-dimensional variational data assimilation systems. Meanwhile, it supports deployment on heterogeneous platforms, is compatible with mainstream neural network models, and enables mapping of different parallel granularities and efficient parallel execution. Using this tool requires minimal code modifications to the original numerical model, thus reducing coupling costs. It can be efficiently integrated into numerical weather prediction models such as CMA-GFS and MCV, and has been applied to the coupling of deep learning-based physical parameterization schemes (e.g., radiation, non-orographic gravity wave drag) and the development of their tangent linear and adjoint models, significantly improving the accuracy and efficiency of numerical weather prediction.


翻译:本文提出TorchNWP,一种用于高效耦合人工智能组件与传统数值模型的编译库工具。该工具旨在解决Fortran开发的业务化数值模型与基于Python的深度学习框架之间跨语言兼容性差、耦合灵活性不足及数据传输效率低的问题。基于LibTorch,优化设计了统一的应用层调用接口,将PyTorch框架下的深度学习模型转换为静态二进制格式并提供C/C++接口,进而通过混合Fortran/C/C++编程实现深度学习模型在数值模型内部的部署。将TorchNWP集成至数值模型仅需将其编译为可调用链接库,并在编译链接阶段进行链接即可生成可执行文件。在此基础上,在C/C++层面实现了基于神经网络的切线性与伴随模型,能够屏蔽神经网络模型的内部结构,简化四维变分资料同化系统的构建过程。同时支持在异构平台上部署,兼容主流神经网络模型,可实现不同并行粒度的映射与高效并行执行。使用该工具仅需对原数值模型进行极少量的代码修改,从而降低耦合成本。该工具可高效集成至CMA-GFS、MCV等数值天气预报模式,并已应用于基于深度学习的物理参数化方案(如辐射、非地形重力波拖曳)的耦合及其切线性与伴随模型的研发,显著提升了数值天气预报的精度与效率。

0
下载
关闭预览

相关内容

如何用latext画神经网络?这个PlotNeuralNet能帮到你
专知会员服务
26+阅读 · 2022年1月15日
【干货书】PyTorch 深度学习,255页pdf
专知会员服务
281+阅读 · 2021年4月3日
TensorFlowLite:端侧机器学习框架
专知会员服务
33+阅读 · 2020年8月27日
专知会员服务
137+阅读 · 2020年8月24日
专知会员服务
119+阅读 · 2020年7月22日
TensorFlow Lite指南实战《TensorFlow Lite A primer》,附48页PPT
专知会员服务
70+阅读 · 2020年1月17日
100+前沿“拿来即用”开源深度学习模型汇总分享
深度学习与NLP
11+阅读 · 2019年8月29日
基于PyTorch/TorchText的自然语言处理库
专知
28+阅读 · 2019年4月22日
国家自然科学基金
6+阅读 · 2017年12月31日
国家自然科学基金
6+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
18+阅读 · 2009年12月31日
Arxiv
0+阅读 · 2月12日
VIP会员
最新内容
最新“指挥控制”领域出版物合集(16份)
专知会员服务
7+阅读 · 4月12日
面向军事作战需求开发的人工智能(RAIMOND)
专知会员服务
13+阅读 · 4月12日
远程空中优势:新一代超视距导弹的兴起
专知会员服务
2+阅读 · 4月12日
大语言模型溯因推理的统一分类学与综述
专知会员服务
3+阅读 · 4月12日
相关基金
国家自然科学基金
6+阅读 · 2017年12月31日
国家自然科学基金
6+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
18+阅读 · 2009年12月31日
Top
微信扫码咨询专知VIP会员