noahmp compile或run报错

  1. 问题1:
    Fatal Error: Cannot read module file ‘netcdf.mod’ opened at (1), because it was created by a different version of GNU Fortran
    解答:在user_build_options中将NETCDFMOD 与 NETCDFLIB 路径设置为netcdf-Fortran的路径。
    2.问题2:
    collect2: error: ld returned 1 exit status错误多种多样,如下列报错:

./lib/libsmda.a(module_grib2.o): In function __module_grib2_MOD_fortran_decode_jpeg2000': /home/hsy/Public/hrldas-4.0.1/HRLDAS_init/HRLDAS_forcing/lib/module_grib2.f90:148: undefined reference toinfo_jpeg2000’
/home/hsy/Public/hrldas-4.0.1/HRLDAS_init/HRLDAS_forcing/lib/module_grib2.f90:156: undefined reference to decode_jpeg2000' ./lib/libsmda.a(module_grib.o): In function__module_grib_MOD_findgrib’:
/home/hsy/Public/hrldas-4.0.1/HRLDAS_init/HRLDAS_forcing/lib/module_grib.f90:186: undefined reference to io_fread' /home/hsy/Public/hrldas-4.0.1/HRLDAS_init/HRLDAS_forcing/lib/module_grib.f90:203: undefined reference toio_fread’
/home/hsy/Public/hrldas-4.0.1/HRLDAS_init/HRLDAS_forcing/lib/module_grib.f90:223: undefined reference to io_fread' /home/hsy/Public/hrldas-4.0.1/HRLDAS_init/HRLDAS_forcing/lib/module_grib.f90:280: undefined reference toio_ftell’
./lib/libsmda.a(module_grib.o): In function __module_grib_MOD_getgrib': /home/hsy/Public/hrldas-4.0.1/HRLDAS_init/HRLDAS_forcing/lib/module_grib.f90:114: undefined reference toio_fread’
./lib/libsmda.a(module_grib.o): In function __module_grib_MOD_gribclose': /home/hsy/Public/hrldas-4.0.1/HRLDAS_init/HRLDAS_forcing/lib/module_grib.f90:77: undefined reference toc_close’
./lib/libsmda.a(module_grib.o): In function __module_grib_MOD_gribopen': /home/hsy/Public/hrldas-4.0.1/HRLDAS_init/HRLDAS_forcing/lib/module_grib.f90:67: undefined reference toc_gribopen’
collect2: error: ld returned 1 exit status
Makefile:28: recipe for target ‘create_forcing.exe’ failed
make[2]: *** [create_forcing.exe] Error 1
make[2]: Leaving directory ‘/home/hsy/Public/hrldas-4.0.1/HRLDAS_init/HRLDAS_forcing’
Makefile:12: recipe for target ‘default’ failed
make[1]: *** [default] Error 2
make[1]: Leaving directory ‘/home/hsy/Public/hrldas-4.0.1/HRLDAS_init/HRLDAS_forcing’
Makefile:8: recipe for target ‘all’ failed
make: *** [all] Error 2

解答:将user_build_options中的 F90FLAGS = -g -fconvert=big-endian -fbounds-check -fno-range-check -fno-underscoring中的-fno-underscoring注释掉。本人user_build_options如下:

COMPILERF90 = gfortran
FREESOURCE = -ffree-form -ffree-line-length-none
F90FLAGS = -g -fconvert=big-endian -fbounds-check -fno-range-check #-fno-underscoring
MODFLAG =
LDFLAGS =
CPP = /usr/bin/cpp
CPPFLAGS = -P -traditional -D_GFORTRAN_
LIBS =
LIBJASPER = -ljpeg -ljasper
INCJASPER = -I/jasper
NETCDFMOD = -I/home/hsy/anaconda3/envs/ncl_stable/include
NETCDFLIB = -L/home/hsy/anaconda3/envs/ncl_stable/lib -lnetcdf -lnetcdff
BZIP2 = NO
BZIP2_LIB = -lbz2
BZIP2_INCLUDE = -I/usr/include
RM = rm -f
CC = /usr/bin/gcc

3.问题3:
collect3: name = “IVGTYP”
STOP MODULE_NOAHLSM_HRLDAS_INPUT: get_landuse_netcdf: nf90_get_var

解答: 输入文件有误,请修改文件路径,将文件路径改为绝对路径。

  • 2
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值