Changeset 93 for trunk/src/struct2nc.m
- Timestamp:
- May 27, 2010, 7:25:58 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/struct2nc.m
r55 r93 1 % 'struct2nc': create a netcdf file from a Matlab structure1 % 'struct2nc': create a netcdf file from a Matlab structure 2 2 %--------------------------------------------------------------------- 3 3 % errormsg=struct2nc(flname,Data) 4 4 % 5 % OUPUT:6 % errormsg=error message, =[]: default, no error5 % OUPUT: 6 % errormsg=error message, =[]: default, no error 7 7 % 8 % INPUT:9 % flname: name of the netcdf file to create (must end with the extension '.nc')8 % INPUT: 9 % flname: name of the netcdf file to create (must end with the extension '.nc') 10 10 % Data: structure containing all the information of the netcdf file (or netcdf object) 11 11 % with fields: 12 % (optional) .ListGlobalAttribute: cell listing the names of the global attributes 13 % .Att_1,Att_2... : values of the global attributes 14 % (requested) .ListVarName: list of variable names to select (cell array of char strings {'VarName1', 'VarName2',...} ) 15 % (requested) .VarDimName: list of dimension names for each element of .ListVarName (cell array of string cells) 16 % (requested) .Var1, .Var2....: variables (Matlab arrays) with names listed in .ListVarName 17 % 12 % (optional) .ListGlobalAttribute: list (cell array of character strings) of the names of the global attributes Att_1, Att_2... 13 % .Att_1,Att_2...: values of the global attributes 14 % (requested) .ListVarName: list of the variable names Var_1, Var_2....(cell array of character strings). 15 % (requested) .VarDimName: list of dimension names for each element of .ListVarName (cell array of string cells) 16 % (optional) .VarAttribute: cell array of structures of the form .VarAttribute{ivar}.key=value, defining an attribute key name and value for the variable #ivar 17 % (requested) .Var1, .Var2....: variables (Matlab arrays) with names listed in .ListVarName 18 18 19 %AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 19 20 % Copyright Joel Sommeria, 2008, LEGI / CNRS-UJF-INPG, sommeria@coriolis-legi.org.
Note: See TracChangeset
for help on using the changeset viewer.