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

Next: , Previous: NF_OPEN_PAR, Up: Datasets



2.11 NF_REDEF

The function NF_REDEF puts an open netCDF dataset into define mode, so dimensions, variables, and attributes can be added or renamed and attributes can be deleted.

Usage

     INTEGER FUNCTION NF_REDEF(INTEGER NCID)
NCID
netCDF ID, from a previous call to NF_OPEN or NF_CREATE.

Errors

NF_REDEF returns the value NF_NOERR if no errors occurred. Otherwise, the returned status indicates an error. Possible causes of errors include:

Example

Here is an example using NF_REDEF to open an existing netCDF dataset named foo.nc and put it into define mode:

     INCLUDE 'netcdf.inc'
        ...
     INTEGER NCID, STATUS
        ...
     STATUS = NF_OPEN('foo.nc', NF_WRITE, NCID)   ! open dataset
     IF (STATUS .NE. NF_NOERR) CALL HANDLE_ERR(STATUS)
        ...
     STATUS = NF_REDEF(NCID)                      ! put in define mode
     IF (STATUS .NE. NF_NOERR) CALL HANDLE_ERR(STATUS)
 
 
  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