|
|
|
@ -101,7 +101,7 @@ class NEMOData
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
auto unit = f.A<MString>(name, "units"); |
|
|
|
|
if(unit && unit.Get() == "m s-1") unitmul = 100.0; |
|
|
|
|
if(unit && (unit.Get() == "m s-1" || unit.Get() == "m/s")) unitmul = 100.0; |
|
|
|
|
|
|
|
|
|
Data data((p->xb < p->xe) ? (p->xe - p->xb + 1) : (nx + p->xe - p->xb + 1), p->ye - p->yb + 1, Lon(p->xb), Lat(p->yb), lonstep, latstep); |
|
|
|
|
|
|
|
|
@ -352,7 +352,7 @@ class NEMOData
|
|
|
|
|
|
|
|
|
|
ppar->yb = static_cast<size_t>(Floor((lat1 - latb) / latstep)); |
|
|
|
|
ppar->ye = static_cast<size_t>(Ceil((lat2 - latb) / latstep)); |
|
|
|
|
if(ppar->ye > 2040) ppar->ye = 2040; |
|
|
|
|
if(ppar->ye > ny - 1) ppar->ye = ny - 1; |
|
|
|
|
if(ppar->yb >= ppar->ye) return {nullptr, "Latb must be lesser then late"}; |
|
|
|
|
|
|
|
|
|
ppar->xb = static_cast<size_t>(Floor((lon1 - lonb) / lonstep)); |
|
|
|
@ -396,8 +396,8 @@ class NEMOData
|
|
|
|
|
// clang-format on
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
real Lon(size_t ix) const { return isOk() ? (-180.0 + ix / 12.0) : -1000.0; } |
|
|
|
|
real Lat(size_t iy) const { return isOk() ? (-80.0 + iy / 12.0) : -1000.0; } |
|
|
|
|
real Lon(size_t ix) const { return isOk() ? (lonb + ix * lonstep) : -1000.0; } |
|
|
|
|
real Lat(size_t iy) const { return isOk() ? (latb + iy * latstep) : -1000.0; } |
|
|
|
|
real Depth(size_t l) const { return isOk() ? depths[l] : -1000.0; } |
|
|
|
|
time_t Timestep() const { return isOk() ? (times[1] - times[0]) : 0; } |
|
|
|
|
MDateTime Time(size_t i) const |
|
|
|
|