This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Juergen, > some addtitional informations: > > the reported problem is, when I use the 'netcdf.inc' include file. > > If I use a module which declares interfaces for the functions > (and not an include file), like > > interface > ... > INTEGER FUNCTION NF_PUT_VAR1_DOUBLE(NCID, VARID, INDEX, DVAL) > integer, intent ( in) :: NCID > integer, intent ( in) :: VARID > integer, dimension(:), intent ( in) :: INDEX > doubleprecision, intent ( in) :: DVAL > end function NF_PUT_VAR1_DOUBLE > ... > end interface > > NOTHING works!!! > > Neither the netcdf2.4 ,nor the netcdf3.4 routines give an output. > Neither with REAL, nor with doubleprecision! > They return an error code -40. > > WHY??? That error means "invalid coordinates" and would be expected if "INDEX" did not refer to a valid part of the netCDF variable. > How can an interface produce such an error? > > > (On an IBM RS/6000 C20 I have no problems with any of these problems) Maybe the above declaration should use "dimension(*)" instead of "dimension(:)"? I'm not sure whether that would make any difference for this problem, especially since it works fine on the RS/6000. This may be a symptom error in the J90 Fortran 90 compiler. Maybe you can create a small test case that is independent of netCDF that demonstrates the problem. Sorry I can't be of more help ... --Russ