Changeset 802 for XIOS/trunk/src/io/nc4_data_output.cpp
- Timestamp:
- 11/30/15 16:21:33 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/io/nc4_data_output.cpp
r796 r802 22 22 , filename(filename) 23 23 { 24 StdString timeid = StdString("time_counter");25 24 SuperClass::type = MULTI_FILE; 26 25 } … … 28 27 CNc4DataOutput::CNc4DataOutput 29 28 (const StdString & filename, bool exist, bool useClassicFormat, 30 MPI_Comm comm_file,bool multifile, bool isCollective )29 MPI_Comm comm_file,bool multifile, bool isCollective, const StdString& timeCounterName) 31 30 : SuperClass() 32 , SuperClassWriter(filename, exist, useClassicFormat, &comm_file, multifile )31 , SuperClassWriter(filename, exist, useClassicFormat, &comm_file, multifile, timeCounterName) 33 32 , comm_file(comm_file) 34 33 , filename(filename) 35 34 , isCollective(isCollective) 36 35 { 37 StdString timeid = StdString("time_counter");38 39 36 SuperClass::type = (multifile) ? MULTI_FILE : ONE_FILE; 40 37 } … … 952 949 try 953 950 { 954 SuperClassWriter::addDimension( "time_counter");951 SuperClassWriter::addDimension(getTimeCounterName()); 955 952 } 956 953 catch (CNetCdfException& e) … … 982 979 std::vector<StdString> axisList = grid->getAxisList(); 983 980 984 StdString timeid = StdString("time_counter");981 StdString timeid = getTimeCounterName(); 985 982 StdString dimXid,dimYid; 986 983 std::deque<StdString> dimIdList, dimCoordList; … … 1391 1388 else if (field->getOperationTimeType() == func::CFunctor::centered) timeAxisId = "time_centered"; 1392 1389 1393 StdString timeBoundId ("time_counter_bounds");1390 StdString timeBoundId = getTimeCounterName() + "_bounds"; 1394 1391 1395 1392 StdString timeAxisBoundId; … … 1492 1489 if (field->file->time_counter != CFile::time_counter_attr::none) 1493 1490 { 1494 SuperClassWriter::writeData(time_counter, string("time_counter"), isCollective, field->getNStep() - 1);1491 SuperClassWriter::writeData(time_counter, getTimeCounterName(), isCollective, field->getNStep() - 1); 1495 1492 if (field->file->time_counter != CFile::time_counter_attr::record) 1496 1493 SuperClassWriter::writeData(time_counter_bound, timeBoundId, isCollective, field->getNStep() - 1); … … 1619 1616 if (field->file->time_counter != CFile::time_counter_attr::none) 1620 1617 { 1621 SuperClassWriter::writeTimeAxisData(time_counter, string("time_counter"), isCollective, field->getNStep() - 1, isRoot);1618 SuperClassWriter::writeTimeAxisData(time_counter, getTimeCounterName(), isCollective, field->getNStep() - 1, isRoot); 1622 1619 if (field->file->time_counter != CFile::time_counter_attr::record) 1623 1620 SuperClassWriter::writeTimeAxisData(time_counter_bound, timeBoundId, isCollective, field->getNStep() - 1, isRoot); … … 1659 1656 StdString axisid("time_centered") ; 1660 1657 StdString axisBoundId("time_centered_bounds"); 1661 StdString timeid( "time_counter");1658 StdString timeid(getTimeCounterName()); 1662 1659 StdString timeBoundId("axis_nbounds"); 1663 1660 … … 1701 1698 { 1702 1699 // Adding time_counter 1703 axisid = "time_counter";1704 axisBoundId = "time_counter_bounds";1700 axisid = getTimeCounterName(); 1701 axisBoundId = getTimeCounterName() + "_bounds"; 1705 1702 dims.clear(); 1706 1703 dims.push_back(timeid); … … 1955 1952 if (it == timeToRecordCache.end()) 1956 1953 { 1957 StdString timeAxisBoundsId( "time_counter_bounds");1954 StdString timeAxisBoundsId(getTimeCounterName() + "_bounds"); 1958 1955 if (!SuperClassWriter::varExist(timeAxisBoundsId)) 1959 1956 timeAxisBoundsId = "time_instant_bounds";
Note: See TracChangeset
for help on using the changeset viewer.