NCL - 安装和配置
本篇随笔将介绍 NCL 的安装和环境配置
下载 NCL 安装包
访问 NCL 官网:
https://www.ncl.ucar.edu/Download/list_of_binaries.shtml
https://www.earthsystemgrid.org/dataset/ncl.html
选择合适的版本下载,这里选用:
ncl_ncarg-6.6.2-Debian7.11_64bit_gnu472.tar.gz
1 | wget https://www.earthsystemgrid.org/dataset/ncl.662.dap/file/ncl_ncarg-6.6.2-Debian7.11_64bit_gnu472.tar.gz |
解压到安装目录
1 | sudo mkdir /usr/local/ncl-6.6.2 |
配置环境
1 | vim ~/.zshrc |
测试
1 | ncl |
正确输出为
1 | Copyright (C) 1995-2019 - All Rights Reserved |
如果报错缺少某个依赖文件
1 | ncl: error while loading shared libraries: lib***.so.X: cannot open shared object file: No such file or directory |
则安装对应的依赖库即可,推荐使用 apt-file
寻找缺失文件所在的库
安装 apt-file
之前,添加 apt
的源
1 | sudo vim /etc/apt/sources.list |
安装 apt-file
1 | sudo apt-get install apt-file |
更新 apt-file
数据库
1 | sudo apt-file update |
查找缺失文件 lib***.so.X
所在的库,这里以 libgfortran.so.3
为例
1 | sudo apt-file search libgfortran.so.3 |
安装任何一个库即可解决问题
1 | sudo apt-get install libgfortran3 |
配置 vscode
安装 NCL
扩展
安装 Code Runner
扩展
配置 Code Runner
打开 ssh
/ wsl
配置文件
1 | vim /home/user/.vscode-server/data/Machine/settings.json |