[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDF #PXE-716414]: netcdf fortran90 windows implementation

> Dear support,
> because being stupid, I've started to write the Fortran90 interface
> declarations for the windows version (intel fortran 11.1 compiler).
> There are still about 100 functions (out of about 300) to interface and
> I'm wondering if it is worth the effort (because all the test stuff has
> to be done as well) and ask therefore if someone else has finished this
> awesome task already.

No sorry, as far as we know, no one else has done this, except maybe the
GLIMMER project, as described here:

We usually recommend using cygwin and gfortran to get a Fortran-90
interface on Windows.

> I started because after having spent some days in writing my file
> specification in Fortran90 (Solaris mpif90) I was not very happy to
> recognize that the windows version is still incomplete and I thought it
> would be less effort (and perhaps useful to others) to write the
> interfaces instead of reimplementing my stuff in Fortran77.
> As a starting point I've had a look at the hdf5 Fortran90 interface and
> ended in code like this:
> INTEGER FUNCTION nf_inq_var(ncid, varid, name, externalType,
> numDimensions, dimensionIDs, numAttributes)
> integer, intent(in) :: ncid, varid
> character (len = *), intent(out) :: name
> integer, intent(out) :: externalType, numDimensions
> integer, dimension(:), intent(out) :: dimensionIDs
> integer, intent(out) :: numAttributes
> C,reference,decorate,alias:'nc_inq_var'::nf_inq_var
> END FUNCTION nf_inq_var
> as a (copy/paste) replacement for (much simpler version - but not
> compilable with intel fortran in windows):
> integer,              external :: nf_inq_var
> At least it compiles - but I've no idea if it will pass the tests or if
> there is some more to think of...
> As far as I know "mod" files are compiler dependent and using cygwin and
> gfortran/g95 is no solution if the linking app is compiled with wintel
> fortran.

Yes, you're right, the module files are compiler-dependent, which is a
problem in making a generally useful F90 interface for Windows.  You
really need to provide a separate library and module files for each
different Fortran compiler.

Please let us know if you succeed in getting a working F90 API for 
Windows.  I think there would be significant user interest in such a


Russ Rew                                         UCAR Unidata Program
address@hidden                      http://www.unidata.ucar.edu

Ticket Details
Ticket ID: PXE-716414
Department: Support netCDF
Priority: Normal
Status: Closed

NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.