Difference between revisions of "NetCDF Data Processing Scripts"

From WikiROMS
Jump to navigationJump to search
(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)
 
Line 1: Line 1:
<div class="title">Matlab: NetCDF Processing Scripts</div>__NOTOC__
<div class="title">Matlab: NetCDF Data Processing Scripts</div>__NOTOC__


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.
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.

Revision as of 20:55, 23 April 2012

Matlab: NetCDF Data 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