Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 

Re: [netcdfgroup] combining f77 and f90 modules with netcdf library

On Thu, 2008-03-13 at 00:53 +0100, Goran Georgievski wrote:
> Hello,
> 
> I have some read/write modules written in free form fortran (Fortran 90)
> and I have some fortran77 code that writes standard fortran binary
> files. However, I would prefer to have output in netcdf format. The
> question is if I can compile and link, fortran90 netcdf write module
> with the fortran 77 code. The platform that I am working on is Linux
> with Intel Fortran Compiler 8.1 and netcdf library version 3.6.0-p1.
> 
> ifort compiles the write netcdf module (f90 code), and it compiles the
> main code (f77) if I comment the lines that calls netcdf write
> subroutines. When I am trying to compile including these lines, ifort
> complains that it cannot find the module for writing netcdf. (ERROR in
> opening the Library module file [WRITE_3D_NETCDF_FIELD])  
> 
> Below are the headers of my netcdf write module and headers of main code
> that calls subroutine to write netcdf field, and the makefile that
> compiles everything. If somebody could tell me what I am doing wrong and
> point me to the solution, I would be the most thankful.
> 
> Goran 

In addition to pts made by others you should ensure all modules are
compiled with same version of the compiler. I doubt this is your problem
but always worth remembering.

I think you also need to have the mod file as requirements for your
exec... with ifort it's a mess setting up a Makefile

M



 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Community Programs   Unidata is a member of the UCAR Community Programs, is managed by the University Corporation for Atmospheric Research, and is sponsored by the National Science Foundation.
P.O. Box 3000     Boulder, CO 80307-3000 USA     Tel: 303-497-8643     Fax: 303-497-8690