NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.

To learn about what's going on, see About the Archive Site.

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



  • 2008 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: