fix: unit conversion and indexing
This commit is contained in:
1 parent
824fb967a2
commit
0aa58537b1
6 files changed
+77
-27
No files matched your search
@@ -39,7 +39,7 @@ const Vel &UVGrid::operator[](size_t timeIndex, size_t latIndex, size_t lonIndex
|
||||
or lonIndex < 0 or lonIndex >= lonSize) {
|
||||
throw std::out_of_range("Index out of bounds");
|
||||
}
|
||||
size_t index = timeIndex * (latSize * lonSize) + latIndex * lonIndex + lonIndex;
|
||||
size_t index = timeIndex * (latSize * lonSize) + latIndex * lonSize + lonIndex;
|
||||
return uvData[index];
|
||||
}
|
||||
|
||||
@@ -63,4 +63,4 @@ void UVGrid::streamSlice(ostream &os, size_t t) {
|
||||
}
|
||||
os << endl;
|
||||
}
|
||||
}
|
||||
}
|
||||