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

Re: Russ Rew: Re: [Fwd: problem with []() in 3.4 version]



Reimar,

> Let me ask some more question belonging to the netCDF situation where we are.
> 
> Is the following interpretation of the two netCDF formats correct?  I
> can use netcdf2.4 to write signs like "()" and read it with netcdf3.4
> (not patched).  All whats stored with netcdf3.4 could be read from
> netcdf2.4 version too.

Yes, that's exactly right.

> I believe I found another difference in implementing netCDF libraries.
> In the previous version (2.4) I was able to use modules implemented by "use".
> Now in the actual version (3.4) it's only allowed to use "include".
> Why?

I didn't know you could use Fortran90 "use" modules with netcdf version
2.4.  The 2.4 version should be less usable with Fortran 90, because it
uses the same functions for reading different numeric types by assuming a
numeric argument can be used for integer or real values of different
sizes.  The 3.4 version is type-safe.  We haven't provided a Fortran90
interface for netCDF 3.4 yet though; the current interface is intended
for Fortran77 and doesn't really use any Fortran 90 features.

> Another question is the different command names for C and Fortran.
> Why they are  named different?

I'm not sure what different command names you mean.  If you are
referring to the names of the commands used to invoke the C and Fortran
compilers when building the library, for example "c89" instead of "cc",
we are just using what we tested with on each platform, and often it
doesn't matter for the purpose of building netCDF which name you use for
the compiler if there is more than one.

If you are referring to the library function names, we provided
different function names to make type-safe interfaces, but we still
provide the old interfaces that call the new interfaces, for backwards
compatibility.

> Will I get in trouble if I use always the C netCDF library linked to
> the fortran code?  or in other words why should I use the fortran
> netCDF Library linked to fortran?

If you don't use the Fortran interfaces, you can just build the C
library by specifying an empty string for the Fortran compiler when you
are using the Unix "configure" system.  On PC's you should be able to
leave out the Fortran interfaces, if you don't need them, by just not
building the Fortran library.  I don't know what "the fortran netCDF
library linked to fortran" means.  The Fortran netCDF functions just
call the C functions underneath a thin Fortran layer.

I hope this helps.  Feel free to send more specific questions to
"address@hidden" and we'll try to route them to the person who
can answer them best.  I'm not much of a Fortran expert, so you may get
better results that way ...

--Russ

_____________________________________________________________________

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