njtbx-icon
Netcdf-Java Toolbox
previous NJ functions
Function nj_grid_varget Next

 
 
Function nj_attget

PURPOSE ^

NJ_ATTGET - Get global and variable attributes

SYNOPSIS ^

function result=nj_attget(ncRef,var,attrName)

DESCRIPTION ^

NJ_ATTGET - Get global and variable attributes

 Usage:   
   attr= nj_attget(ncRef);                 Returns only 'global' attributes
   attr= nj_attget(ncRef,'global',attrName)  returns a variable with the value of a global attribute
   attr= nj_attget(ncRef,var)                Returns only variable attributes
   attr= nj_attget(ncRef,var,attrName)       returns a variable with the value for a specific variable attribute
 where,
   ncRef - Reference to netcdf file. It can be either of two
           a. local file name or a URL  or
           b. An 'mDataset' matlab object, which is the reference to already
              open netcdf file.
              [ncRef=mDataset(uri)]
   var  = variable name or string 'global'(to retrieve global attributes)   
   attrName = global or variable attribute name  (case ignored)
 returns,
   attr - matlab strucure

CROSS-REFERENCE INFORMATION ^

This function makes following njTBX API calls:
  • mDataset mDataset class constructor - opens a netcdf file and creates a grid or netcdf mDataset object.
  • getVar mDataset/getVar - Retrieves a matlab variable object.
  • getAttributes mDataset/getAttributes - Returns a structure with global attributes or a value for specified global attribute name.
  • getAttributes mGeoGridVar/getAttributes -get attribute(s) associated with the gridded variable
  • getAttributes mVar/getAttributes -get attribute(s) associated with the variable


previous NJ functions
Function nj_grid_varget Next
© 2006-2009   Mississippi State University   • License Terms   • Credits