- Timestamp:
- Nov 18, 2010, 10:52:50 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/calc_field.m
r89 r123 1 1 %'calc_field': defines fields (velocity, vort, div...) from civx data and calculate them 2 2 %--------------------------------------------------------------------- 3 % [DataOut,errormsg]=calc_field(FieldName,DataIn) 3 4 % 4 5 % OUTPUT: 5 6 % Scal: matlab vector representing the scalar values (length nbvec defined by var_read) 6 % if no input , Scal=list of programmed scalar names (to put in menus) 7 % if only the sclar name is put as input, vec_A=type of scalar, which can be: 7 % if no input, Scal=list of programmed scalar names (to put in menus) 8 % if only the field name is put as input, vec_A=type of scalar, which can be: 9 % 'discrete': related to the individual velocity vectors, not interpolated by patch 8 10 % 'vel': scalar calculated solely from velocity components 9 11 % 'der': needs spatial derivatives … … 14 16 % 15 17 % INPUT: 16 % ScalName: string representing the name of the scalar18 % FieldName: string representing the name of the field 17 19 % DataIn: structure representing the field, as defined in check_field_srtructure.m 18 20 % … … 29 31 % 'var': the scalar name corresponds to a field name in the netcdf files 30 32 % a specific variable name for civ1 and civ2 fields are also associated, if 31 % '' the scalar is calculated from other fields, as explicited below 33 % the scalar is calculated from other fields, as explicited below 34 32 35 %list_scal={title, type, civ1 var name,civ2 var name} 33 36 list_field={'velocity';...%image correlation corresponding to a vel vector 34 37 'ima_cor';...%image correlation corresponding to a vel vector 35 38 'norm_vel';...%norm of the velocity 36 39 'vort';...%vorticity … … 57 60 nbcoord=2; 58 61 end 59 DataOut=DataIn; %rep orduce global attribute62 DataOut=DataIn; %reproduce global attribute 60 63 ListVarName={}; 61 64 ValueList={}; … … 68 71 RoleList=[RoleList Role]; 69 72 units_cell=[units_cell units]; 70 73 end 71 74 %erase previous data (except coordinates) 72 75 for ivar=nbcoord+1:length(DataOut.ListVarName)
Note: See TracChangeset
for help on using the changeset viewer.