Ignore:
Timestamp:
12/11/14 11:45:48 (9 years ago)
Author:
rlacroix
Message:

Backport r534 to XIOS 1.0: Add an error message when the timestep was not configured by the user.

Previously no error message was displayed but the output file(s) was not written.

Also improve the error message when the calendar type or the start date is missing.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/branchs/xios-1.0/src/node/context.cpp

    r501 r535  
    7373   { 
    7474      if (this->calendar.get() != NULL) return; 
    75       if (calendar_type.isEmpty() || start_date.isEmpty()) 
     75      if (calendar_type.isEmpty()) 
    7676         ERROR(" CContext::solveCalendar(void)", 
    7777               << "[ context id = " << this->getId() << " ] " 
    78                << "Impossible to define a calendar (an attribute is missing)."); 
     78               << "Impossible to define a calendar: the calendar type is missing."); 
     79      if (start_date.isEmpty()) 
     80         ERROR(" CContext::solveCalendar(void)", 
     81               << "[ context id = " << this->getId() << " ] " 
     82               << "Impossible to define a calendar: the start date is missing."); 
     83      if (timestep.isEmpty()) 
     84         ERROR(" CContext::solveCalendar(void)", 
     85               << "[ context id = " << this->getId() << " ] " 
     86               << "Impossible to define a calendar: the timestep is missing."); 
    7987 
    8088#define DECLARE_CALENDAR(MType  , mtype)                              \ 
     
    8694      else this->calendar =  boost::shared_ptr<CCalendar>       \ 
    8795           (new C##MType##Calendar(start_date.getValue(),time_origin.getValue()));     \ 
    88       if (!this->timestep.isEmpty())                                  \ 
    89        this->calendar->setTimeStep                                    \ 
     96      this->calendar->setTimeStep                                     \ 
    9097          (CDuration::FromString(this->timestep.getValue()));   \ 
    9198      return;                                                         \ 
Note: See TracChangeset for help on using the changeset viewer.