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.
Hi John, >Date: Fri, 26 Apr 1996 15:02:19 -0400 (EDT) >From: address@hidden (John Sheldon) >Organization: NOAA/GFDL >To: address@hidden (Russ Rew) >Subject: Re: 2.3.2 vs. 2.4 netCDF question >Keywords: 199604222201.AA01657 In the above message you wrote: > Hi again- > > Yesterday, I CC'd you on some mail I sent to Jeff Kuehn about a timing > code which demonstrated the CP-time problem with pre-filling on our > Unicos 8 C90 under 2.4.1. > > Here's a modified version of that code that pretty simply demonstrates > that netCDF is writing one rendition of "1.E35" to the "missing_value" > attribute and another rendition to the data portion of the file. > > I hope we can get to the bottom of these issues pretty soon. I'm > riding what appears to be the crest of a tidal wave of new netCDF users > here at GFDL, and the fewer reefs I encounter, the better! We've discovered the problem and have generated a workaround (which will also be in the next release). The problem is that the writing of a floating-point attribute used the CRI-supplied xdr_float() function; whereas, the writing of a data value used the (also CRI-supplied) IEG parallel routines. Unfortunately, CRI didn't make these routines behave the same: for certain values, they create different XDR bit-patterns. We've modified the code to always use the IEG routines when appropriate. You'll find a patch for the file libsrc/array.c enclosed. Please let us know if this helps. Regards, Steve Emmerson <address@hidden> --------Begin patch Index: array.c =================================================================== RCS file: /upc/share/CVS/netcdf/libsrc/array.c,v retrieving revision 1.54 diff -c -r1.54 array.c *** 1.54 1995/10/13 19:28:51 --- array.c 1996/04/26 20:50:11 *************** *** 561,571 **** xdr_NC_fnct = xdr_nclong ; goto loop ; case NC_FLOAT : ! xdr_NC_fnct = xdr_float ; ! goto loop ; case NC_DOUBLE : ! xdr_NC_fnct = xdr_double ; ! goto loop ; /* private types */ case NC_STRING : xdr_NC_fnct = xdr_NC_string ; --- 561,571 ---- xdr_NC_fnct = xdr_nclong ; goto loop ; case NC_FLOAT : ! xdr_NC_fnct = xdr_floats ; ! goto func; case NC_DOUBLE : ! xdr_NC_fnct = xdr_doubles ; ! goto func; /* private types */ case NC_STRING : xdr_NC_fnct = xdr_NC_string ;