Changeset 1488


Ignore:
Timestamp:
04/20/18 17:04:38 (6 years ago)
Author:
oabramkina
Message:

Trunk and CMIP6: adding a check on output_freq attribute. Exception is thrown if it is empty.

Location:
XIOS
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/XIOS_DEV_CMIP6/src/node/context.cpp

    r1418 r1488  
    885885            if (allFiles[i]->enabled.getValue()) // Si l'attribut 'enabled' est fixé à vrai. 
    886886            { 
     887              if (!allFiles[i]->output_freq.isEmpty()) 
     888              { 
     889                 ERROR("CContext::findEnabledFiles()", 
     890                     << "Mandatory attribute output_freq must be defined for file \""<<allFiles[i]->getFileOutputName() 
     891                     <<" \".") 
     892              } 
    887893              if ((initDate + allFiles[i]->output_freq.getValue()) < (initDate + this->getCalendar()->getTimeStep())) 
    888894              { 
     
    897903         else 
    898904         { 
     905           if (!allFiles[i]->output_freq.isEmpty()) 
     906           { 
     907              ERROR("CContext::findEnabledFiles()", 
     908                  << "Mandatory attribute output_freq must be defined for file \""<<allFiles[i]->getFileOutputName() 
     909                  <<" \".") 
     910           } 
    899911           if ( (initDate + allFiles[i]->output_freq.getValue()) < (initDate + this->getCalendar()->getTimeStep())) 
    900912           { 
  • XIOS/trunk/src/node/context.cpp

    r1358 r1488  
    603603            if (allFiles[i]->enabled.getValue()) // Si l'attribut 'enabled' est fixé à vrai. 
    604604            { 
     605              if (allFiles[i]->output_freq.isEmpty()) 
     606              { 
     607                 ERROR("CContext::findEnabledFiles()", 
     608                     << "Mandatory attribute output_freq must be defined for file \""<<allFiles[i]->getFileOutputName() 
     609                     <<" \".") 
     610              } 
    605611              if ((initDate + allFiles[i]->output_freq.getValue()) < (initDate + this->getCalendar()->getTimeStep())) 
    606612              { 
     
    615621         else 
    616622         { 
     623           if (allFiles[i]->output_freq.isEmpty()) 
     624           { 
     625              ERROR("CContext::findEnabledFiles()", 
     626                  << "Mandatory attribute output_freq must be defined for file \""<<allFiles[i]->getFileOutputName() 
     627                  <<" \".") 
     628           }   
    617629           if ( (initDate + allFiles[i]->output_freq.getValue()) < (initDate + this->getCalendar()->getTimeStep())) 
    618630           { 
Note: See TracChangeset for help on using the changeset viewer.