Changeset 775 for trunk/src/get_field.m


Ignore:
Timestamp:
May 16, 2014, 8:40:58 AM (10 years ago)
Author:
sommeria
Message:

different bug corrections in series (time display for netcdf files)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/get_field.m

    r771 r775  
    6666
    6767%% enter input data
    68 if ischar(filename)% input file name
     68if ischar(filename) % input file name
    6969    set(handles.inputfile,'String',filename)% fill the input file name
    70     Field=nc2struct(filename,[]);% reads the  field structure, without the variables
    71 else
    72     'bad input to get_field'
     70    [Field,tild,tild,errormsg]=nc2struct(filename,[]);% reads the  field structure, without the variables
     71else
     72    msgbox_uvmat('ERROR','get_field requires a file name as input')% display error message for input file reading
     73    return
     74end
     75if ~isempty(errormsg)
     76    msgbox_uvmat('ERROR',['get_field/nc2struct/' errormsg])% display error message for input file reading
     77    return
     78end
     79if ~isfield(Field,'ListVarName')
     80    msgbox_uvmat('ERROR',['no variable found in ' filename])% display error message for input file reading
     81    return
    7382end
    7483if ~exist('ParamIn','var')
    7584    ParamIn=[];
    76 end
    77 if isfield(Field,'Txt')
    78     msgbox_uvmat('ERROR',['get_field/nc2struct/' Field.Txt])% display error message for input file reading
    79     return
    80 end
    81 if ~isfield(Field,'ListVarName')
    82     return
    8385end
    8486
Note: See TracChangeset for help on using the changeset viewer.