Changeset 1307 for XIOS/trunk
- Timestamp:
- 10/13/17 17:45:39 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/node/field.cpp
r1286 r1307 954 954 << "An operation must be defined for field \"" << getId() << "\"."); 955 955 956 if (freq_op.isEmpty())957 freq_op.setValue(TimeStep);958 if (freq_offset.isEmpty())959 freq_offset.setValue(NoneDu);960 961 956 const bool detectMissingValues = (!detect_missing_value.isEmpty() && !default_value.isEmpty() && detect_missing_value == true); 962 957 checkAttributes() ; 963 958 boost::shared_ptr<CTemporalFilter> temporalFilter(new CTemporalFilter(gc, operation, 964 959 CContext::getCurrent()->getCalendar()->getInitDate(), … … 996 991 << "An operation must be defined for field \"" << getId() << "\"."); 997 992 998 if (freq_op.isEmpty()) freq_op.setValue(TimeStep);999 if (freq_offset.isEmpty()) freq_offset.setValue(NoneDu);1000 1001 993 const bool detectMissingValues = (!detect_missing_value.isEmpty() && !default_value.isEmpty() && detect_missing_value == true); 1002 994 checkAttributes(); 1003 995 boost::shared_ptr<CTemporalFilter> temporalFilter(new CTemporalFilter(gc, operation, 1004 996 CContext::getCurrent()->getCalendar()->getInitDate(), … … 1452 1444 if (freq_op.isEmpty()) 1453 1445 { 1454 if (!freq_offset.isEmpty()) 1455 ERROR("CField::checkAttributes(void)", 1456 << "[ id = " << this->getId() << " , context = '" << CObjectFactory::GetCurrentContextId() << " ] " 1457 << "Attribute freq_offset cannot be defined if attribute freq_op is not defined. " 1458 << "Please define freq_op.") 1446 if (operation.getValue()=="instant") 1447 freq_op.setValue(file->output_freq.getValue()); 1459 1448 else 1460 { 1461 if (operation.getValue()=="instant") 1462 { 1463 freq_op.setValue(file->output_freq.getValue()); 1464 freq_offset.setValue(file->output_freq.getValue()-TimeStep); 1465 } 1466 else 1467 { 1468 freq_op.setValue(TimeStep); 1469 freq_offset.setValue(freq_op.getValue()-TimeStep); 1470 } 1471 } 1472 } 1473 else 1474 { 1475 if (freq_offset.isEmpty()) 1476 freq_offset.setValue(freq_op.getValue()-TimeStep); 1477 } 1449 freq_op.setValue(TimeStep); 1450 } 1451 if (freq_offset.isEmpty()) 1452 freq_offset.setValue(freq_op.getValue()-TimeStep); 1478 1453 } 1479 1454
Note: See TracChangeset
for help on using the changeset viewer.