Changeset 93 for trunk/src/series


Ignore:
Timestamp:
May 27, 2010, 7:25:58 PM (15 years ago)
Author:
sommeria
Message:

FFT: improved to deal with NaN data
merge_proj: corrected to reproduce dt if unique
uvmat.fig: tooltip corrected
plot_field: bug for isocontour corrected,
im_filter: cleaning
phys_polar: spatial derivative included (still to check)
set_obeject.fig: minor correction
struct2nc: comments improved
uvmat: button NB implemented
read_civxdata: error message improved

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/series/merge_proj.m

    r89 r93  
    267267                    Field{iview}.VarAttribute=SubField.VarAttribute;
    268268                end
     269                if isfield(Field{iview},'Txt')
     270                    msgbox_uvmat('ERROR',Field{iview}.Txt)
     271                    return
     272                end
    269273                if isfield(Field{iview},'Time')
    270274                    timeread(iview)=Field{iview}.Time;
     
    280284                Field{iview}=transform_fct(Field{iview},XmlData{iview});%transform to phys if requested
    281285            end
    282             min(Field{iview}.X)
    283286            if testcivx
    284287                    Field{iview}=calc_field(FieldName,Field{iview});
    285288            end
    286             min(Field{iview}.X)
    287289
    288290            %projection on object (gridded plane)
     
    350352            MergeData.nb_coord=2;
    351353            MergeData.nb_dim=2;
    352             MergeData.dt=1;
     354            dt=[];
     355            if isfield(Field{1},'dt')&& isnumeric(Field{1}.dt)
     356                dt=Field{1}.dt;
     357            end
     358            for iview =2:numel(Field)
     359                if ~(isfield(Field{iview},'dt')&& isequal(Field{iview}.dt,dt))
     360                    dt=[];%dt not the same for all fields
     361                end
     362            end
     363            if isempty(dt)
     364                MergeData.ListGlobalAttribute(6)=[];
     365            else
     366               MergeData.dt=dt;
     367            end
     368            %MergeData.dt=1;
    353369            MergeData.Time=time_i;
    354370            error=struct2nc(mergename,MergeData); %save result file
     
    387403    return
    388404end
     405
     406
     407
    389408
    390409%group the variables (fields of 'FieldData') in cells of variables with the same dimensions
     
    412431        test_grid=0;
    413432    end
    414 %    DimIndices=Data{1}.VarDimIndex{VarIndex(1)};%indices of the dimensions of the first variable (common to all variables in the cell)
    415433    %case of input fields with unstructured coordinates
    416434    if ~test_grid
     
    423441    %case of fields defined on a structured  grid
    424442    else 
    425 %        DimValue=MergeData.DimValue(DimIndices);%set of dimension values
    426443        testFF=0;
    427444        for iview=2:nbview
    428 %             if ~isequal(DimValue,Data{iview}.DimValue(DimIndices))
    429 %                 MergeData.Txt='ERROR: attempt at merging structured fields with different sizes';
    430 %                 return
    431 %             end
    432445            for ivar=VarIndex
    433446                VarName=MergeData.ListVarName{ivar};
Note: See TracChangeset for help on using the changeset viewer.