Previous: File Level Functions in LibCF Next: Latitude and Longitude Functions in LibCF Table of contents Frames 2010 Unidata NetCDF Workshop > libcf: A New Library for CF Conventions Support

24.4 Variable Metadata in LibCF
LibCF includes some functions to help with variable metadata.

 

   /* Add some or all of the CF recomended text attributes to a variable. */
   int nccf_def_var(int ncid, int varid, const char *units, 
		    const char *long_name, const char *standard_name, 
		    int ncoord_vars, int *coord_varids);

   /* Read any existing CF recomended text attributes from a variable. */
   int nccf_inq_var(int ncid, int varid, size_t *units_lenp, char *units, 
		    size_t *long_name_lenp, char *long_name, 
		    size_t *standard_name_lenp, char *standard_name,
		    int *ncoord_vars, int *coord_varids);

   /* Set attributes to define missing data information. */
   int nccf_def_var_missing(int ncid, int varid, const void *fill_valuep, 
			    const void *valid_minp, const void *valid_maxp);

   /* Get attributes which define missing data information. If the
    * attributes are not there, then provide the valid data anyway, based
    * on netCDF defaults. */
   int nccf_inq_var_missing(int ncid, int varid, void *fill_valuep, 
			    void *valid_minp, void *valid_maxp);


   /* Add any or all of these four attributes to a file or variable. */
   int nccf_def_notes(int ncid, int varid, const char *institution, 
		      const char *source, const char *comment, 
		      const char *references);

   /* Read any or all of these four attributes of a file or
    * variable. */
   int nccf_inq_notes(int ncid, int varid,
		      size_t *institution_lenp, char *institution, 
		      size_t *source_lenp, char *source, 
		      size_t *comment_lenp, char *comment, 
		      size_t *references_lenp, char *references);

 


Previous: File Level Functions in LibCF Next: Latitude and Longitude Functions in LibCF Table of contents Frames 2010 Unidata NetCDF Workshop > libcf: A New Library for CF Conventions Support