运行convert_mpas报错:
./convert_mpas history.2021-06-29_00.00.nc history.2021-0* :
Reading MPAS mesh information from file 'history.2021-06-29_00.00.00.nc'
Target domain specification file 'target_domain' not found.
Default 0.5-degree global target domain will be used.
Error: Problems setting up MPAS mesh from file history.2021-06-29_00.00.00.nc
STOP 3
实在不明白为啥一周前还能运行,今天就不行了。翻开之前安装convert_mpas的日志,也没啥太大帮助。
我看了一下wly_env环境发现缺少了libnetcdf netcdf-fortran这两个库,可能是这个原因,于是重新安装,发现依然报错
又把Makefile的前几行修改成:
#FC = $(shell nf-config --fc)
#FC = gfortran
FC = $(shell nf-config --fc)
FFLAGS = -O3
FCINCLUDES = $(shell nf-config --fflags)
FCLIBS = $(shell nf-config --flibs)
FCLIBS += -L${PNETCDF}/lib -lpnetcdf
再次执行./convert_mpas history.2021-06-29_00.00.nc history.2021-0*
就好了,可能是库的问题
下次再出现问题:
1检查wly_env环境是否有netcdf的库
2修改Makefile
3重新编译,不要怕编译失败。经验是:不断的编译失败,等回过头来去convert_mpas文件夹下生成latlon.nc文件时,就可以正常运行了
唉,再摸索吧