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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.