Changeset 236 for trunk/src/read_field.m
- Timestamp:
- Apr 12, 2011, 12:12:19 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/read_field.m
r233 r236 36 36 if strcmp(FileType,'netcdf') %read the first nc field 37 37 ParamOut.FieldName=ParamIn.FieldName; 38 GUIName='get_field'; %default name of the GUI get ç_field38 GUIName='get_field'; %default name of the GUI get_field 39 39 if isfield(ParamIn,'GUIName') 40 40 GUIName=ParamIn.GUIName; … … 44 44 FieldList=calc_field;%list of possible fields for Civx data 45 45 ParamOut.ColorVar='';%default 46 field_index=strcmp(ParamOut.FieldName,FieldList);%look for ParamOut.FieldName in the list 47 if isempty(find(field_index,1))% ParamOut.FieldName is not in the list, check whether Civx data exist 48 Data=nc2struct(ObjectName,'ListGlobalAttribute','absolut_time_T0','civ'); 49 if ~isempty(Data.absolut_time_T0)&& ~isequal(Data.civ,0) 46 field_index=strcmp(ParamIn.FieldName,FieldList);%look for ParamIn.FieldName in the list of possible fields for Civx data 47 if isempty(find(field_index,1))% ParamIn.FieldName is not in the list, check whether Civx data exist 48 Data=nc2struct(ObjectName,'ListGlobalAttribute','Conventions','absolut_time_T0','civ'); 49 if isequal(Data.Conventions,'uvmat/civdata') 50 ParamOut.FieldName='velocity';%Civx data found, set .FieldName='velocity' by default 51 ParamOut.ColorVar='ima_cor'; 52 InputField=[{ParamOut.FieldName} {ParamOut.ColorVar}]; 53 [Field,ParamOut.VelType]=read_civdata(ObjectName,InputField,ParamIn.VelType); 54 test_civx=Field.CivStage; 55 elseif ~isempty(Data.absolut_time_T0)&& ~isequal(Data.civ,0) 50 56 ParamOut.FieldName='velocity';%Civx data found, set .FieldName='velocity' by default 51 57 ParamOut.ColorVar='ima_cor'; … … 67 73 InputField=[InputField {ParamOut.ColorVar}]; 68 74 end 69 [Field,ParamOut.VelType]=read_civxdata(ObjectName,InputField,ParamIn.VelType); 75 [Field,ParamOut.VelType,errormsg]=read_civxdata(ObjectName,InputField,ParamIn.VelType); 76 if ~isempty(errormsg) 77 return 78 end 70 79 test_civx=Field.CivStage; 71 80 ParamOut.CivStage=Field.CivStage;
Note: See TracChangeset
for help on using the changeset viewer.