Browse Source

Fixed sign of time interval

master
Michael Uleysky 3 weeks ago
parent
commit
c7d05077b0
  1. 6
      sources/VYLET.cpp

6
sources/VYLET.cpp

@ -258,7 +258,7 @@ VYLETData::Data VYLETData::ReadL() const
{
time = R2Time((*vylet)[tcol - 1][iy * lons.size() + ix]);
lambda = (*vylet)[lcol - 1][iy * lons.size() + ix];
days = (time - start).D();
days = (invtime ? -1.0 : 1.0) * (time - start).D();
out(ix, iy) = lambda / days;
}
@ -297,7 +297,7 @@ VYLETData::Data VYLETData::ReadT() const
x = (*vylet)[2][iy * lons.size() + ix];
y = (*vylet)[3][iy * lons.size() + ix];
time = R2Time((*vylet)[tcol - 1][iy * lons.size() + ix]);
days = (time - start).D();
days = (invtime ? -1.0 : 1.0) * (time - start).D();
if(days <= tstep * 1.5) days = 0.0;
inside = x > xl && x < xr && y > yd && y < yu;
maxtime = days >= maxdays - tstep * 0.5;
@ -515,7 +515,7 @@ VYLETData::Data VYLETData::ReadTmask() const
for(size_t ix = 0; ix < lons.size(); ix++)
{
time = R2Time((*vylet)[tcol - 1][iy * lons.size() + ix]);
days = (time - start).D();
days = (invtime ? -1.0 : 1.0) * (time - start).D();
maxtime = days >= maxdays - tstep * 0.5;
out(ix, iy) = maxtime ? 1.0 : NAN;
}

Loading…
Cancel
Save