Changeset 1048 for XIOS/trunk/src


Ignore:
Timestamp:
02/02/17 17:34:47 (7 years ago)
Author:
ymipsl
Message:
  • Xios output now an uuid for each files.
  • 2 new file attribute to parametrize uuid output :
    • uuid_name (default is "uuid")
    • uuid_format : the substring "%uuid%" will replace by the uuid (default : no format)

YM

Location:
XIOS/trunk/src
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/config/file_attribute.conf

    r1046 r1048  
    2929DECLARE_ATTRIBUTE(StdString, time_stamp_name) 
    3030DECLARE_ATTRIBUTE(StdString, time_stamp_format) 
     31DECLARE_ATTRIBUTE(StdString, uuid_name) 
     32DECLARE_ATTRIBUTE(StdString, uuid_format) 
  • XIOS/trunk/src/io/nc4_data_output.cpp

    r1046 r1048  
    1111#include "netCdfException.hpp" 
    1212#include "exception.hpp" 
     13#include "uuid.hpp" 
    1314 
    1415namespace xios 
     
    25682569           SuperClassWriter::addAttribute("Conventions", conventions); 
    25692570           // SuperClassWriter::addAttribute("production" , production); 
     2571 
    25702572           StdString timeStampStr ; 
    25712573           if (file->time_stamp_name.isEmpty()) timeStampStr="timeStamp" ; 
    25722574           else timeStampStr=file->time_stamp_name ; 
    25732575           SuperClassWriter::addAttribute(timeStampStr, timeStamp); 
     2576 
     2577           StdString uuidName ; 
     2578           if (file->uuid_name.isEmpty()) uuidName="uuid" ; 
     2579           else uuidName=file->uuid_name ; 
     2580 
     2581           if (file->uuid_format.isEmpty()) SuperClassWriter::addAttribute(uuidName, getUuidStr()); 
     2582           else SuperClassWriter::addAttribute(uuidName, getUuidStr(file->uuid_format)); 
     2583           
    25742584         } 
    25752585         catch (CNetCdfException& e) 
Note: See TracChangeset for help on using the changeset viewer.