Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 

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

Re: netcdf-4.0-beta1 release now available on netCDF web site...



Ed,

> What should be the default fill value of an unsigned int in f90, given
> that there are no unsigned types in F90?
> 
> As F90 users, what would you like to do with a file which contains
> unsigned ints? Read them into a larger type?
> 
> What about 64-bit unsigned ints? Can F90 make any use of such data?
> 
> Any input appreciated, from any Fortran user...

I think you should use -1 in the parameter statements for
nf90_fill_ubyte, nf90_fill_ushort, and nf90_fill_uint.  That's the
same value that actually gets assigned using the typeless hexadecimal
constants Z'FF', Z'FFFF', and Z'FFFFFFFF', which are technically
outside the range of signed ints (hence the error message).  So -1
gives you the same value without the errors and it's portable.

--Russ

===============================================================================
To unsubscribe netcdf-hdf, visit:
http://www.unidata.ucar.edu/mailing-list-delete-form.html
===============================================================================


 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Office of Programs University Corporation for Atmospheric Research (UCAR)   Unidata is a member of the UCAR Office of Programs, is managed by the University Corporation for Atmospheric Research, and is sponsored by the National Science Foundation.
P.O. Box 3000     Boulder, CO 80307-3000 USA     Tel: 303-497-8643     Fax: 303-497-8690