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

Re: 20050525: netcdf-3.6.0 : change of default file creation format



Unidata Support <address@hidden> writes:

> From: Shaheen Tonse <address@hidden>
> Subject: netcdf-3.6.0 : change of default file creation format
> To: address@hidden
> Date: Wed, 25 May 2005 09:07:35 -0700
>
> Hi,
>
> I was trying to look at the documentation for the fortran-callable
> change of default file creation format between Classic format and
> 64-bit-offset format. The documentation page for the fortran version
> does not seem to exist:
>
> This is from your docs page:
> http://my.unidata.ucar.edu/content/software/netcdf/docs/netcdf/Large-File-Support.html#Large-File-Support

Yes, you're correct!

I've added that to our docs- it will appear on the web next time we
regenerate them...

>
> ********************
> When opening an existing netCDF file the netCDF library will
> transparently detect its format and adjust accordingly. However, netCDF
> library versions earlier than 3.6.0 cannot read 64-bit offset format
> files. NetCDF classic format files (even if created by version 3.6.0 or
> later) remain compatible with older versions of the netCDF library.
> Users are encouraged to use netCDF classic format to distribute data,
> for maximum portability.
>
> It is also possible to change the default creation format, to convert a
> large body of code without changing every create call. C programmers
> see nc_set_default_format (NetCDF C Interface Guide). Fortran programs
> see NF_SET_DEFAULT_FORMAT (NetCDF Fortran 77 Interface Guide).
>
> ************************
>
> Cheers,
> Shaheen Tonse
>


Just do something like this to use this function:

INCLUDE 'netcdf.inc'
   ... 
INTEGER STATUS, OLD_FORMAT
   ... 
STATUS = NF_SET_DEFAULT_FORMAT(nf_format_64bit, OLD_FORMAT)
IF (STATUS .NE. NF_NOERR) CALL HANDLE_ERR(STATUS)

The old format is returned in OLD_FORMAT, and can be ignored.

Ed
-- 
Ed Hartnett  -- address@hidden