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

[netCDF #MXU-426658]: Setting the default behavior to NetCDF-4 in



> NetCDF Gurus,
>
> How do I specify the default behavior to create NetCDF-4 files in Fortran
90?
> The documentation is a bit confusing.
>
> We've got an existing F90 Fortran code (ROMS) that uses NetCDF
> extensively, with lots of calls to "nf90_create" sprinkled through the
> code.   I can set the flag in each of these calls to write NetCDF-4,
> but on this page:
> http://www.unidata.ucar.edu/software/netcdf/docs/netcdf/Which-Format.html
> it mentions that "It is also possible to change the default creation
> format, to convert a large body of code without changing every create
> call, and mentions the NF_SET_DEFAULT_FORMAT function".    The link to
> that function:
>
http://www.unidata.ucar.edu/software/netcdf/docs/netcdf-f77/NF_005fSET_005fDEFAULT_005fFORMAT.html
> says that the usage is:
>
> INTEGER FUNCTION NF_SET_DEFAULT_FORMAT(INTEGER FORMAT, INTEGER OLD_FORMT)
>
> FORMAT   Either nf_format_64bit or nf_format_classic.
> OLD_FORMAT  The default format at the time the function is called is
> returned here.
>
> -Rich
> --
> Dr. Richard P. Signell   (508) 457-2229
> USGS, 384 Woods Hole Rd.
> Woods Hole, MA 02543-1598
>
>

Howdy Rich!

That's a bug in our documentation, which I have fixed. Thanks for pointing it
out.

To answer your question, you can use nf_set_nf_format_netcdf4 or
nf_format_netcdf4_classic to set the default format. (You probably want
nf_format_netcdf4_classic).

Please let me know if this doesn't help.

Thanks,

Ed


Ticket Details
===================
Ticket ID: MXU-426658
Department: Support netCDF
Priority: Normal
Status: Closed