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

[netCDF #PBA-273168]: netCDF-4 questions



> Ed,
>
> Thank you very very much for you quick reply. The int64 types are not
> 64-bit types, because when I use F90 API write 64-bit integers into a
> netCDF-4 data file using NF90_INT64 type, their range are -214783648 to
> 214783647 (32-bit), not 9223372036854775808 to 9223372036854775808
> (64-bit). The netCDF-4 data file can only hold an positive integer up to
> 214783647. (While, I didn't try the unsigned int, unsigned int64 yet.
> Should be a little bigger)
>
> Thanks,
> Chen

Hello Chen!

Turns out that you found a bug in netCDF-4. You were quite correct: 64-bit
integers were being converted to 32-bit before being written by the F90 API!

I have fixed this in the code base, and if you grab the snapshot you can use
int64s properly.
ftp://ftp.unidata.ucar.edu/pub/netcdf/snapshot/netcdf-4-daily.tar.gz

Please let me know if this works for you.

Meanwhile, I am not sure what to do about unsigned 64-bit ints. How can the
fortran 90 API deal with them? Fortran does not have unsigned ints. How would
you handle unsigned 64-bit ints in fortran?

Thanks,

Ed

Ticket Details
===================
Ticket ID: PBA-273168
Department: Support netCDF
Priority: High
Status: Closed