


'struct2nc': create a netcdf file from a Matlab structure
---------------------------------------------------------------------
errormsg=struct2nc(flname,Data)
OUPUT:
errormsg=error message, =[]: default, no error
INPUT:
flname: name of the netcdf file to create (must end with the extension '.nc')
Data: structure containing all the information of the netcdf file (or netcdf object)
with fields:
.ListGlobalAttribute: cell listing the names of the global attributes (note that a global atribute with the same name as a variable is excluded)
.Att_1,Att_2... : values of the global attributes
.ListDimName: cell listing the names of the array dimensions
.DimValue: array dimension values (Matlab vector with the same length as .ListDimName
.ListVarName: cell listing the names of the variables
.VarDimIndex: cell containing the set of dimension indices (in list .ListDimName) for each variable of .ListVarName
.VarAttribute: cell of structures s containing names and values of variable attributes (s.name=value) for each variable of .ListVarName
.Var1, .Var2....: variables (Matlab arrays) with names listed in .ListVarName
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Copyright Joel Sommeria, 2008, LEGI / CNRS-UJF-INPG, sommeria@coriolis-legi.org.
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
This file is part of the toolbox UVMAT.
UVMAT is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
UVMAT is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License (file UVMAT/COPYING.txt) for more details.
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA