Changeset 364 for trunk/src/civ.m


Ignore:
Timestamp:
Jan 10, 2012, 5:06:30 PM (13 years ago)
Author:
sommeria
Message:

civ2, fix2, patch2 introduced under Matlab (no interpolation and rotation done yet)
small corrections in plot_field and read_civdata

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/civ.m

    r363 r364  
    257257% set(handles.thresh_text1,'Visible','off')
    258258set(handles.num_MaxDiff,'Visible','off')
     259set(handles.num_Nx,'Visible','on')
     260set(handles.num_Ny,'Visible','on')
     261set(handles.title_Nx,'Visible','on')
     262set(handles.title_Ny,'Visible','on')
    259263set(handles.title_MaxDiff,'Visible','off')
    260264set(handles.num_Rho,'Style','edit')
     
    272276set(handles.num_MaxDiff,'Visible','on')
    273277set(handles.title_MaxDiff,'Visible','on')
    274 
    275 % end
     278set(handles.num_Nx,'Visible','off')
     279set(handles.num_Ny,'Visible','off')
     280set(handles.title_Nx,'Visible','off')
     281set(handles.title_Ny,'Visible','off')
    276282set(handles.num_Rho,'Style','popupmenu')
    277283set(handles.num_Rho,'Value',1)
     
    346352    if strcmp(Data.Conventions,'uvmat/civdata')% case of new civ data,
    347353        set(handles.MenuMatlab,'checked','on') %select civ/Matlab by default
    348         set(handles.MenuCivX,'checked','off')
     354        MenuMatlab_Callback([],[], handles)
    349355        if ~isempty(Data.CivStage)%test for civ files
    350356            ind_opening=Data.CivStage;
     
    356362        end
    357363    elseif ~isempty(Data.absolut_time_T0')% case of  civx data,
    358         set(handles.MenuMatlab,'checked','off') %select Cix by default
    359         set(handles.MenuCivX,'checked','on')
     364        set(handles.MenuCivX,'checked','on') %select Cix by default
     365        MenuCivX_Callback([],[], handles)
    360366        if ~isempty(Data.fix2)
    361367            ind_opening=5;
     
    575581    set(handles.(ListOptions{index}),'value',0)
    576582end
    577 for index = ind_opening+1
    578     set(handles.(ListOptions{index}),'value',1)
    579 end
     583set(handles.(ListOptions{min(ind_opening+1,6)}),'value',1)
     584
    580585update_CivOptions(handles,1)
    581586
     
    11441149[filecell,i1_civ1,i2_civ1,j1_civ1,j2_civ1,i1_civ2,i2_civ2,j1_civ2,j2_civ2,nom_type_nc,xx,yy,compare]=...
    11451150    set_civ_filenames(handles,ref_i,ref_j,box_test);
     1151
    11461152Rootbat=fileparts(filecell.nc.civ1{1,1});%output netcdf file (without extention)
    11471153set(handles.civ,'UserData',filecell);%store for futur use of status callback
     
    22482254                    if checkbox(4)==0 ; %check the existence of civ2 if it is not calculated
    22492255                        Data=nc2struct(filename,'ListGlobalAttribute','CivStage','civ2');
    2250                         if ~isempty(Data.CivStage) && Data.CivStage<4 %test for civ files
     2256                        if isfield(Data,'Txt')
     2257                            msgbox_uvmat('ERROR',Data.Txt);
     2258                            return
     2259                        elseif ~isempty(Data.CivStage)% case of new civ files
     2260                            if Data.CivStage<4 %test for civ files
    22512261                            msgbox_uvmat('ERROR',['no civ2 data in ' filename])
    22522262                            filecell=[];
    22532263                            return
     2264                            end
    22542265                        elseif isempty(Data.civ2)||isequal(Data.civ2,0)
    22552266                            msgbox_uvmat('ERROR',['no civ2 data in ' filename])
Note: See TracChangeset for help on using the changeset viewer.