Changeset 180 for trunk/src/read_civxdata.m
- Timestamp:
- Jan 18, 2011, 10:50:40 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/read_civxdata.m
r179 r180 61 61 [var,role,units,vel_type_out_cell]=varcivx_generator(FieldNames,VelType);%determine the names of constants and variables to read 62 62 [Field,vardetect,ichoice]=nc2struct(filename,var); 63 if isfield(Field,'Txt')64 return % error in file reading65 end63 % if isfield(Field,'Txt') 64 % return % error in file reading 65 % end 66 66 if vardetect(1)==0 67 67 Field.Txt=[ 'requested field not available in ' filename '/' VelType]; 68 return69 68 end 70 69 var_ind=find(vardetect); … … 89 88 Field.NbCoord=Field.nb_coord; 90 89 Field.NbDim=Field.nb_dim; 91 92 %determine the appropriate constant for time and dt for the PIV pair93 test_civ1=isequal(VelTypeOut,'civ1')||isequal(VelTypeOut,'interp1')||isequal(VelTypeOut,'filter1');94 test_civ2=isequal(VelTypeOut,'civ2')||isequal(VelTypeOut,'interp2')||isequal(VelTypeOut,'filter2');95 if test_civ196 Field.Time=double(Field.absolut_time_T0);97 Field.dt=double(Field.dt);98 elseif test_civ299 Field.Time=double(Field.absolut_time_T0_2);100 Field.dt=double(Field.dt2);101 else102 Field.Txt='the input file is not civx';103 display(Field.Txt)104 end105 90 106 91 % CivStage … … 119 104 end 120 105 106 %determine the appropriate constant for time and dt for the PIV pair 107 test_civ1=isequal(VelTypeOut,'civ1')||isequal(VelTypeOut,'interp1')||isequal(VelTypeOut,'filter1'); 108 test_civ2=isequal(VelTypeOut,'civ2')||isequal(VelTypeOut,'interp2')||isequal(VelTypeOut,'filter2'); 109 Field.Time=0; %default 110 if test_civ1 111 if isfield(Field,'absolut_time_T0') 112 Field.Time=double(Field.absolut_time_T0); 113 Field.dt=double(Field.dt); 114 else 115 Field.Txt='the input file is not civx'; 116 Field.CivStage=0; 117 Field.dt=0; 118 end 119 elseif test_civ2 120 Field.Time=double(Field.absolut_time_T0_2); 121 Field.dt=double(Field.dt2); 122 else 123 Field.Txt='the input file is not civx'; 124 Field.CivStage=0; 125 Field.dt=0; 126 end 127 128 129 121 130 %% rescale fields to pixel coordinates 122 131 if isfield(Field,'pixcmx')
Note: See TracChangeset
for help on using the changeset viewer.