320 | | The uvmat package represents data as 'Matlab structures', a set of data elements characterized by a tag name (char string) and a value. The value can be any Matlab object: number, array, character string or cell, or a structure containing itself elements in a hierarchical way. Each element is denoted in the form Data.tag=value. |
321 | | |
322 | | Data are kept in memory in the GUI uvmat as a Matlab structure, stored as 'UserData' in the figure. This structure can be extracted by the menu bar command '''[Export/field in work space] ''', then typing the Matlab command '>>Data_uvmat'. It contains the current input field as a substructure Data_uvmat.Field. |
323 | | |
324 | | This field has a specific organisation, mirroring the structure of netcdf files (see [section 7->#get_field]). This organisation defines a {field object}, used to specify the outcome of projections and plots. The field is described by a set of arrays or matrices, called the {variables}. The {dimensions} of these arrays have names, in order to identify correspondance between different arrays. For instance the arrays representing the velocity components U and V must have the same dimensions. A dimension has a specific value, which sets the common size of all arrays sharing this dimension. Field description furthermore involves optional {attributes} to document the field data, for instance to specify the role of variables or to provide units. These attributes can be global, or can be attached to a specific variable. |
325 | | |
326 | | In summary, the {field object} is specified by a structure with the following elements: -*(optional) .[wiki:ListGlobalAttribute]: list (cell array of character strings) of the names of global attributes Att_1, Att_2... -* (mandatory) .[wiki:ListVarName]: list of the variable names Var_1, Var_2....(cell array of character strings). -* (mandatory) .[wiki:VarDimName]: list of the dimensions associated with each variable: this is a cell array whose number of element is equal to that of .[wiki:ListVarName]. Each element is the dimension name for a unidimensional variable, or a cell array specifying the list of dimension names for a multidimensional variable. -* (optional) .[wiki:VarAttribute]: cell array of structures of the form .[wiki:VarAttribute]<HTML>{ivar}</HTML>.key=value, defining an attribute tag name and value for the variable #ivar (variable number in the list .[wiki:ListVarName]). -* .Att_1, Att_2... : values of the listed global attributes. -* .Var_1, .Var_2....: variables arrays whose names are listed in .[wiki:ListVarName] |
327 | | |
328 | | In some cases, it is useful to define the field object independently from its data content. Then the variables .Var1... are replaced by the lists of dimension names and values. -* .[wiki:ListDimName]: list of dimension names (cell array of character strings) -* .[wiki:DimValue]: array of dimension values corresponding to LisDimName. |
329 | | |
330 | | The following temporary information is added to manage projection and field substraction oerations, which must be done in general after projection: -* 'FieldRequest': 'interp_lin', 'interp_tps' indicate whether lin interpolation or derivatives by tps is needed to calculate the requested field. -* 'Operation': name (char string) of the operation to be performed to finalise the field cell after projection. -* 'SubCheck' 0 /1 indicate that the field must be substracted (second entry in uvmat) |
331 | | |
332 | | Any other element can be added, but will not be taken into account if they are not listed in .[wiki:ListGlobalAttribute] or .[wiki:ListVarName]. |
333 | | |
334 | | [sec5.3<-] |
| 318 | The uvmat package represents data as ''Matlab structures'', a set of data elements characterized by a tag name (char string) and a value. The value can be any Matlab object: number, array, character string or cell, or a structure containing elements in a hierarchical way. Each element is denoted in the form Data.tag=value. |
| 319 | |
| 320 | Data are kept in memory in the GUI uvmat as a Matlab structure, stored as ''!UserData'' in the GUI figure. This structure can be extracted by the menu bar command '''[Export/field in work space]''', then typing the Matlab command '>>Data_uvmat'. It contains the current input field as a substructure ''Data_uvmat.Field''. |
| 321 | |
| 322 | This field has a specific organisation, mirroring the structure of netcdf files (see [wiki:#a7-Netcdffilesandget_field.fig: section 7]). The field is described by a set of (single or multidimensional) data arrays, called the ''variables''. The ''dimensions'' of these arrays have names, in order to identify correspondance between different arrays. For instance the arrays representing the velocity components U and V must have the same dimensions. A dimension has a specific value, which sets the common size of all arrays sharing this dimension. Field description furthermore involves optional ''attributes'' to document the field data, for instance to specify the role of variables or to provide units. These attributes can be global, or can be attached to a specific variable. |
| 323 | |
| 324 | In summary, the ''field structure'' is specified by the following elements: |
| 325 | * (optional) '''!ListGlobalAttribute:''' list (cell array of character strings) of the names of global attributes Att_1, Att_2... |
| 326 | * (mandatory) '''!ListVarName:''' list of the variable names Var_1, Var_2....(cell array of character strings). |
| 327 | * (mandatory) '''!VarDimName:''' list of the dimensions associated with each variable: this is a cell array whose number of element is equal to that of '''!ListVarName'''. Each element is the dimension name for a unidimensional variable, or a cell array specifying the list of dimension names for a multidimensional variable. |
| 328 | * (optional) '''VarAttribute:''' cell array of structures of the form !VarAttribute{ivar}.key=value, defining an attribute tag name and value for the variable #ivar (variable number in the list !ListVarName]). |
| 329 | * .Att_1, Att_2... : values of the listed global attributes. |
| 330 | * .Var_1, .Var_2...: variables arrays whose names are listed in !ListVarName. |
| 331 | |
| 332 | In some cases, it is useful to define the field object independently from its data content. Then the variables .Var1... are replaced by the lists of dimension names and values. |
| 333 | * '''!ListDimName''': list of dimension names (cell array of character strings) |
| 334 | * '''!DimValue''': array of dimension values corresponding to !LisDimName. |
| 335 | |
| 336 | The following temporary information is added to manage projection and field substraction oerations, which must be done in general after projection: |
| 337 | * '''FieldRequest'''= ''interp_lin'' or ''interp_tps'' indicates whether lin interpolation or derivatives by tps is needed to calculate the requested field. |
| 338 | * '''Operation''': name (char string) of the operation to be performed to finalise the field cell after projection. |
| 339 | * '''SubCheck''' 0 /1 indicate that the field must be substracted (second entry in uvmat) |
| 340 | |
| 341 | Any other element can be added, but will not be taken into account if they are not listed in ''!ListGlobalAttribute'' or ''!ListVarName''. |