Changeset 1028 for XIOS/trunk/src


Ignore:
Timestamp:
01/12/17 14:37:00 (7 years ago)
Author:
oabramkina
Message:

Correcting a bug introduced in r1015 with a check if output_frequency >= timestep.

Location:
XIOS/trunk/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/attribute_template_impl.hpp

    r778 r1028  
    7171         T CAttributeTemplate<T>::getValue(void) const 
    7272      { 
    73          return CType<T>::get() ; 
    74 /* 
    75          if (SuperClass::isEmpty()) 
    76          { 
    77             ERROR("T CAttributeTemplate<T>::getValue(void) const", 
    78                   << "[ id = " << this->getId() << "]" 
    79                   << " L'attribut est requis mais n'est pas défini !"); 
    80           } 
    81          return (SuperClass::getValue<T>()); 
     73        return CType<T>::get() ; 
     74/* 
     75        if (SuperClass::isEmpty()) 
     76        { 
     77           ERROR("T CAttributeTemplate<T>::getValue(void) const", 
     78                 << "[ id = " << this->getId() << "]" 
     79                 << " L'attribut est requis mais n'est pas défini !"); 
     80         } 
     81        return (SuperClass::getValue<T>()); 
    8282*/ 
    8383      } 
  • XIOS/trunk/src/duration.cpp

    r1015 r1028  
    2424        hour = duration.hour; minute = duration.minute; second = duration.second; timestep = duration.timestep; 
    2525        return *this; 
    26       } 
    27  
    28       bool operator<(CDuration a, CDuration b) 
    29       { 
    30         double aSeconds = a.second + 60.*(a.minute + 60.*(a.hour + 24.*(a.day + a.year*365.25) ) ); 
    31         double bSeconds = b.second + 60.*(b.minute + 60.*(b.hour + 24.*(b.day + b.year*365.25) ) ); 
    32         return (aSeconds < bSeconds); 
    3326      } 
    3427 
  • XIOS/trunk/src/duration.hpp

    r1015 r1028  
    2222            /// Opérateurs /// 
    2323            CDuration& operator=(const CDuration& duration); 
    24  
    25             friend bool operator<(CDuration a, CDuration b); 
    2624 
    2725            friend StdOStream& operator<<(StdOStream& out, const CDuration& duration); 
  • XIOS/trunk/src/node/context.cpp

    r1015 r1028  
    566566   { 
    567567      const std::vector<CFile*> allFiles = CFile::getAll(); 
     568      const CDate& initDate = calendar->getInitDate(); 
    568569 
    569570      for (unsigned int i = 0; i < allFiles.size(); i++) 
     
    572573            if (allFiles[i]->enabled.getValue()) // Si l'attribut 'enabled' est fixé à vrai. 
    573574            { 
    574               if ( allFiles[i]->output_freq.getValue() < this->getCalendar()->getTimeStep()) 
     575              if ((initDate + allFiles[i]->output_freq.getValue()) < (initDate + this->getCalendar()->getTimeStep())) 
    575576              { 
    576577                error(0)<<"WARNING: void CContext::findEnabledFiles()"<<endl 
    577                     << "Output frequency in file \""<<allFiles[i]->getId() 
    578                     <<"\" is greater than the time step. File will not be written."<<endl; 
     578                    << "Output frequency in file \""<<allFiles[i]->getFileOutputName() 
     579                    <<"\" is less than the time step. File will not be written."<<endl; 
    579580              } 
    580581              else 
     
    584585         else 
    585586         { 
    586            if ( allFiles[i]->output_freq.getValue() < this->getCalendar()->getTimeStep()) 
     587           if ( (initDate + allFiles[i]->output_freq.getValue()) < (initDate + this->getCalendar()->getTimeStep())) 
    587588           { 
    588589             error(0)<<"WARNING: void CContext::findEnabledFiles()"<<endl 
    589                  << "Output frequency in file \""<<allFiles[i]->getId() 
    590                  <<"\" is greater than the time step. File will not be written."<<endl; 
     590                 << "Output frequency in file \""<<allFiles[i]->getFileOutputName() 
     591                 <<"\" is less than the time step. File will not be written."<<endl; 
    591592           } 
    592593           else 
Note: See TracChangeset for help on using the changeset viewer.