NetCDF Data Processing Scripts

From WikiROMS
Revision as of 20:53, 23 April 2012 by Arango (talk | contribs) (Created page with "<div class="title">Matlab: NetCDF Processing Scripts</div>__NOTOC__ This page describes several Matlab scripts used to process NetCDF data. These scripts are located in the '''m…")
(change visibility) (diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search
Matlab: NetCDF Processing Scripts

This page describes several Matlab scripts used to process NetCDF data. These scripts are located in the matlab/netcdf sub-directory in the repository. They are high level scripts on top of lower level functions that use the native interface if using Matlab Version 2008b or newer for local NetCDF files and Matlab Version 2012a or newer for OpenDAP files. Otherwise for older Matlab versions, the MEXNC interface are used for local files whereas the SNCTOOLS java interface is used for OpenDAP files. Notice that processing of OpenDAP files is only possible for reading.



nc_attadd.m
Adds or modifies a global or variable attribute in a NetCDF file. If the Vname argument is missing, it is assumed that Aname is a global attribute.
status = nc_attadd  (ncname, Aname, Avalue, Vname)
On Input:
ncname:   NetCDF file name (string)
Aname:   Attribute name (string)
Avalue:   Attribute value (numeric or string)
Vname:   Variable name (string; optional)
On Input:
status:   Error flag