Changeset 1205 for XIOS/dev/branch_yushan_merged/src/node/file.cpp
- Timestamp:
- 07/10/17 18:17:04 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/branch_yushan_merged/src/node/file.cpp
r1172 r1205 16 16 #include "context_client.hpp" 17 17 #include "mpi.hpp" 18 #include "timer.hpp" 18 19 19 20 namespace xios { … … 274 275 if (mode.isEmpty() || mode.getValue() == mode_attr::write) 275 276 { 277 CTimer::get("Files : create headers").resume(); 276 278 if (!isOpen) createHeader(); 279 CTimer::get("Files : create headers").suspend(); 277 280 checkSync(); 278 281 } 279 282 else 280 283 { 284 CTimer::get("Files : open headers").resume(); 281 285 if (!isOpen) openInReadMode(); 286 CTimer::get("Files : open headers").suspend(); 282 287 } 283 288 checkSplit(); … … 395 400 if (!split_freq.isEmpty()) 396 401 { 397 CDate splitEnd = lastSplit + split_freq - 1 * Second; 402 CDate split_start ; 403 CDate splitEnd ; 404 if (!split_start_offset.isEmpty()) split_start=lastSplit + split_start_offset ; 405 else split_start=lastSplit ; 406 407 splitEnd = lastSplit + split_freq ; 408 if (!split_last_date.isEmpty()) 409 { 410 CDate splitLastDate=CDate::FromString(split_last_date,*CContext::getCurrent()->getCalendar()) ; 411 if( splitLastDate < splitEnd) splitEnd=splitLastDate ; 412 } 413 414 if (!split_end_offset.isEmpty()) splitEnd = splitEnd + split_end_offset; 415 else splitEnd = splitEnd - 1 * Second; 398 416 399 417 string splitFormat; … … 410 428 411 429 oss << firstPart ; 412 if (hasStartDate) oss << lastSplit.getStr(splitFormat) ;430 if (hasStartDate) oss << split_start.getStr(splitFormat) ; 413 431 oss << middlePart ; 414 432 if (hasEndDate) oss << splitEnd.getStr(splitFormat);
Note: See TracChangeset
for help on using the changeset viewer.