added funcs to get min/max of lon/lat values
This commit is contained in:
parent
5d9228e549
commit
e674dde67b
|
|
@ -55,6 +55,22 @@ int UVGrid::timeStep() const {
|
|||
return times[1] - times[0];
|
||||
}
|
||||
|
||||
double UVGrid::lonMin() const {
|
||||
return this->lons.front();
|
||||
}
|
||||
|
||||
double UVGrid::lonMax() const {
|
||||
return this->lons.back();
|
||||
}
|
||||
|
||||
double UVGrid::latMin() const {
|
||||
return this->lats.front();
|
||||
}
|
||||
|
||||
double UVGrid::latMax() const {
|
||||
return this->lats.back();
|
||||
}
|
||||
|
||||
void UVGrid::streamSlice(ostream &os, size_t t) {
|
||||
for (int x = 0; x < latSize; x++) {
|
||||
for (int y = 0; y < lonSize; y++) {
|
||||
|
|
@ -63,4 +79,4 @@ void UVGrid::streamSlice(ostream &os, size_t t) {
|
|||
}
|
||||
os << endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,6 +38,30 @@ public:
|
|||
*/
|
||||
int timeStep() const;
|
||||
|
||||
/**
|
||||
* Returns the lowest longitudinal value of grid.
|
||||
* @return minimum longitude
|
||||
*/
|
||||
double lonMin() const;
|
||||
|
||||
/**
|
||||
* Returns the highest longitudinal value of grid.
|
||||
* @return maximum longitude
|
||||
*/
|
||||
double lonMax() const;
|
||||
|
||||
/**
|
||||
* Returns the lowest latitudinal value of grid.
|
||||
* @return minimum latitude
|
||||
*/
|
||||
double latMin() const;
|
||||
|
||||
/**
|
||||
* Returns the higehst latitudinal value of grid.
|
||||
* @return maximum latitude
|
||||
*/
|
||||
double latMax() const;
|
||||
|
||||
/**
|
||||
* times, lats, lons are vector of length timeSize, latSize, lonSize respectively.
|
||||
* The maintain the following invariant:
|
||||
|
|
|
|||
Loading…
Reference in New Issue