Browse Source

Some files define time shift as double, not int

lintest
Michael Uleysky 8 months ago
parent
commit
3e9430673d
  1. 6
      include/layereddataz.h

6
include/layereddataz.h

@ -25,8 +25,8 @@ class LayeredDataZ: public NCFuncs
Error ReadTimes(const MString& tname)
{
static const MString pref = "LayeredDataZ::NC::ReadTimes";
if(!*this) return Error(pref, "Dataset not open");
std::vector<int8> time;
if(!*this) return Error(pref, "Dataset not open");
std::vector<double> time;
{
auto ret = Read(tname, time);
@ -46,7 +46,7 @@ class LayeredDataZ: public NCFuncs
}
times.resize(time.size());
for(size_t i = 0; i < times.size(); i++) times[i] = refdate + static_cast<time_t>(time[i]) * step;
for(size_t i = 0; i < time.size(); i++) times[i] = refdate + static_cast<time_t>(time[i] * step);
return Error();
}

Loading…
Cancel
Save