Changeset 248 for trunk/src/civ.m


Ignore:
Timestamp:
May 9, 2011, 12:32:20 AM (13 years ago)
Author:
sommeria
Message:

various modifications

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/civ.m

    r246 r248  
    21522152                Param.Patch1.SubDomain=subdomain_patch1;
    21532153            end
     2154            if box_test(4)==1
     2155                Param.Civ2=par_civ2;
     2156            end
    21542157            [Data,erromsg]=civ_uvmat(Param,filecell.nc.civ1{ifile,j});
    21552158            if isempty(errormsg)
     
    27052708                if ~testdiff % civ2 or patch2 are written in the same file as civ1
    27062709                    if box_test(4)==0 ; %check the existence of civ2 if it is not calculated
    2707                         Data=nc2struct(filename,'ListGlobalAttribute','civ2');
    2708                         if isempty(Data.civ2)||isequal(Data.civ2,0)
     2710                        Data=nc2struct(filename,'ListGlobalAttribute','CivStage','civ2');
     2711                        if ~isempty(Data.CivStage) && Data.CivStage<4 %test for civ files
     2712                            msgbox_uvmat('ERROR',['no civ2 data in ' filename])
     2713                            filecell=[];
     2714                            return
     2715                        elseif isempty(Data.civ2)||isequal(Data.civ2,0)
    27092716                            msgbox_uvmat('ERROR',['no civ2 data in ' filename])
    27102717                            filecell=[];
     
    27122719                        end
    27132720                    elseif box_test(3)==0; %check the existence of patch if it is not calculated
    2714                         Data=nc2struct(filename,'ListGlobalAttribute','patch');
    2715                         if isempty(Data.patch)||isequal(Data.patch,0)
     2721                        Data=nc2struct(filename,'ListGlobalAttribute','CivStage','patch')
     2722                        if ~isempty(Data.CivStage)
     2723                            if Data.CivStage<3 %test for civ files
     2724                                msgbox_uvmat('ERROR',['no patch data in ' filename])
     2725                                filecell=[];
     2726                                return
     2727                            end
     2728                        elseif isempty(Data.patch)||isequal(Data.patch,0)
    27162729                            msgbox_uvmat('ERROR',['no patch data in ' filename])
    27172730                            filecell=[];
     
    28012814                    return
    28022815                else
    2803                     Data=nc2struct(filename,'ListGlobalAttribute','civ2');
    2804                     if isempty(Data.civ2)||isequal(Data.civ2,0)
     2816                    Data=nc2struct(filename,'ListGlobalAttribute','CivStage','civ2');
     2817                    if ~isempty(Data.CivStage) && Data.CivStage<4 %test for civ files
     2818                            msgbox_uvmat('ERROR',['no civ2 data in ' filename])
     2819                            filecell=[];
     2820                            return
     2821                    elseif isempty(Data.civ2)||isequal(Data.civ2,0)
    28052822                        msgbox_uvmat('ERROR',['no civ2 data in ' filename])
    28062823                        filecell=[];
     
    46774694    end
    46784695    [filecell,num1_civ1,num2_civ1,num_a_civ1,num_b_civ1,num1_civ2,num2_civ2,num_a_civ2,num_b_civ2,nom_type_nc,file_ref_fix1,file_ref_fix2]=...
    4679         set_civ_filenames(handles,ref_i,ref_j,[1 0 0 0 0 0]);
     4696        set_civ_filenames(handles,ref_i,ref_j,[1 0 0 0 0 0])
    46804697    Data.ListVarName={'ny','nx','A'};
    46814698    Data.VarDimName={'ny','nx',{'ny','nx'}};
Note: See TracChangeset for help on using the changeset viewer.