Changeset 422


Ignore:
Timestamp:
May 14, 2012, 7:04:39 AM (13 years ago)
Author:
sommeria
Message:

corrections in merge_proj and time_series: Conventions='uvmat' written in the result files

Location:
trunk/src/series
Files:
2 edited

Legend:

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

    r409 r422  
    403403            display([filebase_merge '.xml saved'])
    404404        else
    405             MergeData.ListGlobalAttribute={'Project','InputFile_1','InputFile_end','nb_coord','nb_dim','dt','Time','civ'};       
     405            MergeData.ListGlobalAttribute={'Conventions','Project','InputFile_1','InputFile_end','nb_coord','nb_dim','dt','Time','civ'};       
     406            MergeData.Conventions='uvmat';
    406407            MergeData.nb_coord=2;
    407408            MergeData.nb_dim=2;
  • trunk/src/series/time_series.m

    r394 r422  
    455455   
    456456    %remove time for global attributes if exists
    457     for iattr=1:numel(RecordData.ListGlobalAttribute)
    458         if strcmp(RecordData.ListGlobalAttribute{iattr},'Time')
    459             RecordData.ListGlobalAttribute(iattr)=[];
    460             break
    461         end
    462     end
     457    Time_index=find(strcmp('Time',RecordData.ListGlobalAttribute));
     458    if ~isempty(Time_search)
     459        RecordData.ListGlobalAttribute(Time_index)=[];
     460    end
     461    RecordData.Conventions='uvmat';
     462%     for iattr=1:numel(RecordData.ListGlobalAttribute)
     463%         if strcmp(RecordData.ListGlobalAttribute{iattr},'Time')
     464%             RecordData.ListGlobalAttribute(iattr)=[];
     465%             break
     466%         end
     467%     end
    463468    for ivar=1:numel(RecordData.ListVarName)
    464469        VarName=RecordData.ListVarName{ivar};
Note: See TracChangeset for help on using the changeset viewer.