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

Hello,

I was away from office for a while but I would like to thank you all,
especially those who contributed some ideas to the solution of my
problem. It was rather strange, if you ask me. All I have to do is to
change the name of the f90 code to something like 

 module w_netcdf

instead of 

 module write_netcdf_3d_field

and then in main f77 code:

 use w_netcdf

instead of

 use write_netcdf_3d_field

Keep on doing good work!

Goran



On Thu, 2008-03-13 at 17:27 +0000, Michael Bane wrote:
> 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
> 
> _______________________________________________
> netcdfgroup mailing list
> netcdfgroup@xxxxxxxxxxxxxxxx
> For list information or to unsubscribe,  visit: 
> http://www.unidata.ucar.edu/mailing_lists/ 
> 



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