Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/decoders/GribRegularInterpretor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,7 @@ void GribRegularInterpretor::interpretAsMatrix(GribDecoder& grib) const {

if (jPointsAreConsecutive) {
vector<double>* d = new vector<double>(nb); // temporary array
d->resize(nb);
double* d1 = &d->front(); // temporary array pointer
double* d2 = &u->front(); // final array

Expand All @@ -581,12 +582,14 @@ void GribRegularInterpretor::interpretAsMatrix(GribDecoder& grib) const {
else // otherwise, just copy the array of values as they are
{
if (v != NULL) {
v->resize(nb);
grib_get_double_array(grib.uHandle(), "values", &u->front(), &aux);
grib_get_double_array(grib.uHandle(), "values", &u->data_.front(), &aux);
grib_get_double_array(grib.vHandle(), "values", &v->front(), &aux);
grib_get_double_array(grib.vHandle(), "values", &v->data_.front(), &aux);
if (c) {
c->data_.resize(nb);
c->resize(nb);
grib_get_double_array(grib.cHandle(), "values", &c->front(), &aux);
grib_get_double_array(grib.cHandle(), "values", &c->data_.front(), &aux);
}
Expand Down Expand Up @@ -1546,6 +1549,7 @@ void GribRotatedInterpretor::interpretAsMatrix(GribDecoder& grib) const {
else // otherwise, just copy the array of values as they are
{
if (v != NULL) {
v->resize(aux);
grib_get_double_array(grib.uHandle(), "values", &u->front(), &aux);
grib_get_double_array(grib.uHandle(), "values", &u->data_.front(), &aux);
grib_get_double_array(grib.vHandle(), "values", &v->front(), &aux);
Expand Down
4 changes: 2 additions & 2 deletions src/visualisers/IsoPlot.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1677,7 +1677,7 @@ CellArray::CellArray(MatrixHandler& data, IntervalMap<int>& range, const Transfo
double missing = data.missing();


int i = 0;
auto i = points_.begin();

MagLog::dev() << "min = " << data.min() << " max = " << data.max() << endl;
for (vector<std::pair<double, double> >::iterator xy = xypoints.begin(); xy != xypoints.end(); ++xy) {
Expand All @@ -1701,7 +1701,7 @@ CellArray::CellArray(MatrixHandler& data, IntervalMap<int>& range, const Transfo
else {
// cout << "MISSING VALUE-->" << geo->second << ", " << geo->first << endl;
}
points_[i] = value;
points_.insert(i, value);
i++;
++geo;
}
Expand Down