Genray完全安装手册
Genray是一个通用的射线追踪程序,一般用于几何光学近似下电磁波传播和吸收的计算。
安装步骤 (基于Ubuntu 18.04)
安装Gfortran-9 和 Gcc-9 参考资料链接
sudo apt-add-repository "deb http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu bionic main"
# 对于不同版本的ubuntu上面一行中的bionic需要被替换
# Ubuntu 18.04 bionic
# Ubuntu 20.04 focal
# 其余的版本名请自行百度
sudo apt -y install gfortran-9
sudo apt -y install gcc-9
构建gfortran和gcc的软链接。
sudo update-alternatives --install /usr/bin/gfortran gfortran /usr/bin/gfortran-7 7
sudo update-alternatives --install /usr/bin/gfortran gfortran /usr/bin/gfortran-9 9
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 9
没有出现error,并使用gfortran -v 和 gcc -v 查看版本没有问题即安装成功。
安装PGPLOT和 NETCDF4 参考资料链接
sudo apt -y install nco
sudo apt -y install netcdf-bin libnetcdff-dev pgplot5
sudo apt install python-netcdf4
sudo apt-get install ncview #用于查看.nc文件
构建并测试 参考资料链接
# 执行下列命