about netcdf

Discussion of how to use ROMS on different regional and basin scale applications.

Moderators: arango, robertson

Post Reply
Message
Author
gming

about netcdf

#1 Unread post by gming »

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

User avatar
kate
Posts: 4088
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

#2 Unread post by kate »

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.

gming

#3 Unread post by gming »

Just installed netcdf-3.6.2, it compiles with no errors now.
I think it's just 3.6.1 too old for roms3.

Thanks,
Ming

Post Reply