Changeset 1097
- Timestamp:
- 04/14/17 14:34:32 (7 years ago)
- Location:
- XIOS/trunk/src/io
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/io/nc4_data_output.cpp
r1096 r1097 2743 2743 2744 2744 CArray<double,2> timeAxisBounds; 2745 SuperClassWriter::getTimeAxisBounds(timeAxisBounds, timeAxisBoundsId, isCollective); 2746 timeAxisBounds*=factorUnit ; 2745 std::vector<StdSize> dimSize(SuperClassWriter::getDimensions(timeAxisBoundsId)) ; 2747 2746 2748 2747 StdSize record = 0; 2749 2748 double dtime(time); 2750 for ( int n = timeAxisBounds.extent(1)- 1; n >= 0; n--)2749 for (StdSize n = dimSize[0] - 1; n >= 0; n--) 2751 2750 { 2752 if (timeAxisBounds(1, n) < dtime) 2751 SuperClassWriter::getTimeAxisBounds(timeAxisBounds, timeAxisBoundsId, isCollective, n); 2752 timeAxisBounds*=factorUnit ; 2753 if (timeAxisBounds(1, 0) < dtime) 2753 2754 { 2754 2755 record = n + 1; -
XIOS/trunk/src/io/onetcdf4.cpp
r1050 r1097 247 247 } 248 248 249 //--------------------------------------------------------------- 249 void CONetCDF4::getTimeAxisBounds(CArray<double,2>& timeAxisBounds, const StdString& name, bool collective, size_t record) 250 { 251 int grpid = this->getCurrentGroup(); 252 int varid = this->getVariable(name); 253 254 std::vector<StdSize> start(2), count(2); 255 start[0] = record; 256 count[0] = 1 ; 257 start[1] = 0; 258 count[1] = 2; 259 260 timeAxisBounds.resize(2, 1); 261 262 if (this->wmpi && collective) 263 CNetCdfInterface::varParAccess(grpid, varid, NC_COLLECTIVE); 264 if (this->wmpi && !collective) 265 CNetCdfInterface::varParAccess(grpid, varid, NC_INDEPENDENT); 266 267 CNetCdfInterface::getVaraType(grpid, varid, &start[0], &count[0], timeAxisBounds.dataFirst()); 268 } 269 270 250 271 251 272 const CONetCDF4::CONetCDF4Path& CONetCDF4::getCurrentPath(void) const -
XIOS/trunk/src/io/onetcdf4.hpp
r878 r1097 97 97 const StdString& getTimeCounterName(void) const { return timeCounterName; }; 98 98 99 void getTimeAxisBounds(CArray<double,2>& timeAxisBounds, const StdString& name, bool collective); 99 void getTimeAxisBounds(CArray<double,2>& timeAxisBounds, const StdString& name, bool collective ); 100 void getTimeAxisBounds(CArray<double,2>& timeAxisBounds, const StdString& name, bool collective, size_t record); 100 101 101 102 bool varExist(const StdString& varname);
Note: See TracChangeset
for help on using the changeset viewer.