Ignore:
Timestamp:
Mar 31, 2021, 3:32:03 PM (3 years ago)
Author:
sommeria
Message:

reading mat files added, +-fixed,OpenDAP improved

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/proj_field.m

    r1094 r1095  
    11261126ProjMode=regexprep(ProjMode,' ',ObjectData.ProjMode);
    11271127icell_grid=[];% field cell index which defines the grid
     1128icell_scattered=[];% field cell index which defines fields with scattered coordinates
    11281129if strcmp(ObjectData.ProjMode,'projection')
    11291130    %% case of a grid requested by the input field
     
    11311132        if isfield(CellInfo{icell},'ProjModeRequest')
    11321133            switch CellInfo{icell}.ProjModeRequest
    1133                 case 'interp_lin'
    1134                     ProjMode{icell}='interp_lin';
     1134%                 case 'interp_lin'
     1135%                     ProjMode{icell}='interp_lin';
    11351136                case 'interp_tps'
    11361137                    ProjMode{icell}='interp_tps';
     
    11461147            end
    11471148            check_grid(icell)=1;
     1149        elseif strcmp(CellInfo{icell}.CoordType,'scattered')
     1150            icell_scattered=icell;
    11481151        end
    11491152    end
     
    12011204    ProjData.VarAttribute{1}.Role='coord_y';
    12021205    ProjData.VarAttribute{2}.Role='coord_x';
     1206    if ~isempty(icell_grid)
    12031207            YAttribute=FieldData.VarAttribute{CellInfo{icell_grid}.CoordIndex(NbDim-1)};
    12041208        XAttribute=FieldData.VarAttribute{CellInfo{icell_grid}.CoordIndex(NbDim)};
     1209    elseif ~isempty(icell_scattered)
     1210        NbDim=NbDimArray(icell_scattered);
     1211        YAttribute=FieldData.VarAttribute{CellInfo{icell_scattered}.CoordIndex(NbDim-1)};
     1212        XAttribute=FieldData.VarAttribute{CellInfo{icell_scattered}.CoordIndex(NbDim)};
     1213    end
    12051214    if ~testangle
    12061215        if isfield(YAttribute,'units')
Note: See TracChangeset for help on using the changeset viewer.