Just installed rom3, my system is Linux, ifort, with netcdf-3.6.1.
With rom2.2, compiles well, but with rom3, always has error when compile mod_netcdf.f90.
Errors message as following.
fortcom: Error: mod_netcdf.f90, line 19: This module file was not generated by any release of this compiler. [NETCDF]
USE netcdf
------------^
fortcom: Error: mod_netcdf.f90, line 21: This symbol must be a defined parameter or an argument of an inquiry function that evaluates to a compile-time constant. [NF_REAL]
integer, parameter :: NF_FOUT = nf_real
----------------------------------------^
fortcom: Error: mod_netcdf.f90, line 22: This symbol must be a defined parameter or an argument of an inquiry function that evaluates to a compile-time constant. [NF_DOUBLE]
integer, parameter :: NF_FRST = nf_double
----------------------------------------^
fortcom: Error: mod_netcdf.f90, line 23: This symbol must be a defined parameter or an argument of an inquiry function that evaluates to a compile-time constant. [NF_DOUBLE]
integer, parameter :: NF_TYPE = nf_double
----------------------------------------^
fortcom: Error: mod_netcdf.f90, line 21: This name does not have a type, and must have an explicit type. [NF_REAL]
integer, parameter :: NF_FOUT = nf_real
----------------------------------------^
fortcom: Error: mod_netcdf.f90, line 22: This name does not have a type, and must have an explicit type. [NF_DOUBLE]
integer, parameter :: NF_FRST = nf_double
----------------------------------------^
compilation aborted for mod_netcdf.f90 (code 1)
Is that due to the version of netcdf? mine is too old?
Thanks,
Ming
about netcdf
It is complaining that it can't find your netcdf.mod file. This is for the Fortran 90 netcdf interface, which is used by ROMS 3, but not ROMS 2. It could be that netcdf never built the f90 interface when netcdf was compiled. Is there a netcdf.mod file in the same place as the netcdf.inc file?
netcdf 3.6.1 is not too old. You may have to recomplie netcdf anyway, checking to make sure the f90 stuff is not skipped. netcdf will search for compilers at configure time and skip optional languages such as Fortran if it can't easily find a working compiler.
If the netcdf.mod file is there, it may be unusable if it was compiled with a different compiler - this could be the case even if the f77 interface works.
netcdf 3.6.1 is not too old. You may have to recomplie netcdf anyway, checking to make sure the f90 stuff is not skipped. netcdf will search for compilers at configure time and skip optional languages such as Fortran if it can't easily find a working compiler.
If the netcdf.mod file is there, it may be unusable if it was compiled with a different compiler - this could be the case even if the f77 interface works.