Canoe模式的环境准备
What is Canoe?
Canoe is an light-weighted extension of an astrophysical code Athena++ to enable atmospheric simulations. We utilize the static/adaptive mesh-refinement, parallelization, curvilinear geometry, and dynamic task scheduling innate to the Athena++ code and augment it with a multi-fluid hydrodynamic solver that is specially designed for atmospheric flows involving condensible gases, clouds, hazes and precipitation. The purpose of the model is to fascilitate fundamental atmospheric research while maintaining a certain degree of sophistication and reality to explain the real world observation and phenomena.
- CANOE 文档地址:https://snap.chengcli.io/index.html;
- CANOE 仓库地址:https://github.com/chengcli/canoe.git
- ATHENA++仓库地址:https://github.com/PrincetonUniversity/athena.git
环境准备
本安装环境是RedHat商用系统,如果你用的是其他linux系统,请尝试做对应的依赖库的替换,请参考Canoe仓库的readme文件。
GitHub仓库拉取源码,安装依赖。
> git clone https://github.com/chengcli/canoe |
根据版本不同,如果package文件中没有包括mpich,就需要手动下载
> sudo yum install mpich-devel ## 安装 MPICH,支持并行 |
科学格式读写相关依赖库
安装支持NETCDF格式IO的库
> cd external/ |
安装FITS格式IO库
> sudo yum install cfitsio-devel |
安装后期处理的python和相关库
安装python3.9,虚拟环境和开机默认进入
> cd |
安装requirements文件中的依赖:
(env)> cd canoe/ |
安装格式检查:
(env)> pre-commit install |
这样,canoe编译和运行,后期处理相关的环境就准备好了。
项目编译
Canoe源码已经内置了一些构建好的项目,可以直接编译和运行:
``内列举了这些内置项目的名称,这些项目的源码位于canoe/examples/路径下。
你可以使用如下命令尽心项目的编译、安装和运行:
例如,对于straka项目:
(env)> cd ; mkdir -p strakaProj/build |
运行
cd .. |