Changeset 538 for XIOS/trunk/src/node/field.cpp
- Timestamp:
- 12/11/14 16:07:42 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/node/field.cpp
r518 r538 518 518 CContext* context = CContext::getCurrent(); 519 519 520 if (freq_op.isEmpty()) freq_op =string("1ts");520 if (freq_op.isEmpty()) freq_op.setValue(TimeStep); 521 521 522 522 if (operation.isEmpty() ) … … 527 527 } 528 528 529 CDuration freq_offset_ = NoneDu; 530 if (!freq_offset.isEmpty()) 531 { 532 freq_offset_ = CDuration::FromString(freq_offset.getValue()); 533 } 534 else 535 { 536 freq_offset.setValue(NoneDu.toString()); 537 } 529 if (freq_offset.isEmpty()) 530 freq_offset.setValue(NoneDu); 538 531 539 532 // if (CXIOSManager::GetStatus() == CXIOSManager::LOC_SERVER) … … 542 535 if (hasOutputFile) 543 536 { 544 this->freq_operation_srv = CDuration::FromString(this->file->output_freq.getValue());545 this->freq_write_srv = CDuration::FromString(this->file->output_freq.getValue());537 this->freq_operation_srv = this->file->output_freq.getValue(); 538 this->freq_write_srv = this->file->output_freq.getValue(); 546 539 } 547 this->lastlast_Write_srv 540 this->lastlast_Write_srv = boost::shared_ptr<CDate> 548 541 (new CDate(context->getCalendar()->getInitDate())); 549 542 this->last_Write_srv = boost::shared_ptr<CDate> … … 556 549 if (hasOutputFile) 557 550 { 558 const CDuration toffset = this->freq_operation_srv - freq_offset _- context->getCalendar()->getTimeStep();551 const CDuration toffset = this->freq_operation_srv - freq_offset.getValue() - context->getCalendar()->getTimeStep(); 559 552 *this->last_operation_srv = *this->last_operation_srv - toffset; 560 553 } … … 563 556 // if (context->hasClient) 564 557 // { 565 this->freq_operation = CDuration::FromString(freq_op.getValue());566 if (hasOutputFile) this->freq_write = CDuration::FromString(this->file->output_freq.getValue());558 this->freq_operation = freq_op.getValue(); 559 if (hasOutputFile) this->freq_write = this->file->output_freq.getValue(); 567 560 if (hasFieldOut) 568 561 { 569 this->freq_write = CDuration::FromString(this->fieldOut->freq_op.getValue());562 this->freq_write = this->fieldOut->freq_op.getValue(); 570 563 } 571 564 this->last_Write = boost::shared_ptr<CDate> … … 574 567 (new CDate(context->getCalendar()->getInitDate())); 575 568 576 const CDuration toffset = this->freq_operation - freq_offset _- context->getCalendar()->getTimeStep();569 const CDuration toffset = this->freq_operation - freq_offset.getValue() - context->getCalendar()->getTimeStep(); 577 570 *this->last_operation = *this->last_operation - toffset; 578 571
Note: See TracChangeset
for help on using the changeset viewer.