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.
Steve, >Date: 4 Jan 1999 13:21:11 -0500 >From: "Steve Mauget" <address@hidden> >Organization: USDA/ARS >To: "Steve Emmerson" <address@hidden> >Subject: Re: 19981231: Re: ncvgt sub >Keywords: 199812301538.IAA00805 In the above message, you wrote: > This weekend I rummaged around your support e-mail archive, and it turns > out we've been down this road before***. It was about 18 months ago, and I > completely forgot about the problems I was having with I*2 variables - could > only recall the problems with the NAG f90 compiler recognizing *.F files. The > fix back them was to add the -mismatch option when compiling, which downgrades > consistency checking of procedure argument lists so that mismatches produce > warning instead of error messages. I went ahead and added this argument to my > compile statement and the program now compiles, but does not correctly read > the I*2 data in my netcdf data file. (The returned array is full of 0's). I'm afraid I don't understand how the netCDF package's "fortran/ftest" application could succeed and yet your application fail to read Integer*2 data from your netCDF datafile. The netCDF fortran/ftest application tests exactly this combination (reading NC_SHORT data into an Integer*2 array) -- as well as all other combinations. > I'm now wondering whether installing version 3.4 will take care of this > mismatch problem. If you had to add the "-mismatch" option to the Fortran compilations before, then you'll have to add it again. We haven't made that automatic. Setting the FFLAGS environment variable prior to executing the configure script would seem appropriate. > The following is an excerpt from a 12 June 97 e-mail > ("netCDF & f90 compiler - M6925") between you and Barry Caplin of NAG. In it > he writes: > > ############################### > > > > Here's another idea. I don't know if you guys would want to > > rebuild netcdf with NAG f90. If so, you can download free demo > > versions our f77->f90 converter and our f90 compiler for most unix > > machines from our web site. > > Thanks. I might try that for other reasons. Unfortunately, I don't see > how it can help the current situation. > > ################################# > > Has this been done for version 3.4? If so, installing it may do the trick. If > not, I'll get ahold of NAG to see if they have any ideas regarding this > NC_short - NAG Integer*2 mismatch problem. I suggest determining why reading into an NC_SHORT array works in the "fortran/ftest" application but not in your application. Look at the file "fortran/ftest.F", in the routine "tncvgt", and follow accesses to the array "sarray". (The type NCSHORT_T is defined in the file "nfconfig.inc" and should be "integer*2".) -------- Steve Emmerson <http://www.unidata.ucar.edu>