Skip to content

Commit

Permalink
Fixed small inefficiency in decoding reduced Gaussian grid GRIB fields
Browse files Browse the repository at this point in the history
  • Loading branch information
iainrussell committed Nov 21, 2019
1 parent 74b9acf commit adf58ac
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/decoders/GribRegularInterpretor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -960,15 +960,14 @@ void GribReducedGaussianInterpretor::interpretAsMatrix(GribDecoder& grib) const
double width = east - west;
double step = (width) / (nblon);

grib_get_double_array(grib.id(), "values", data1, &aux);
if (v) {
grib_get_double_array(grib.uHandle(), "values", data1, &aux);
grib_get_double_array(grib.vHandle(), "values", data2, &aux);
grib_get_double_array(grib.uHandle(), "values", data1, &nb);
grib_get_double_array(grib.vHandle(), "values", data2, &nb);
if (c)
grib_get_double_array(grib.cHandle(), "values", data3, &aux);
grib_get_double_array(grib.cHandle(), "values", data3, &nb);
}
else
grib_get_double_array(grib.id(), "values", data1, &aux);
grib_get_double_array(grib.id(), "values", data1, &nb);


int d = 0;
Expand Down

0 comments on commit adf58ac

Please sign in to comment.