mirror of https://github.com/ecmwf/eccodes.git
ECC-1164: clean up and comments
This commit is contained in:
parent
83ad95218c
commit
352f65852a
|
@ -173,6 +173,9 @@ static int find(grib_nearest* nearest, grib_handle* h,
|
||||||
return ret;
|
return ret;
|
||||||
radius = ((double)iradius) / 1000.0;
|
radius = ((double)iradius) / 1000.0;
|
||||||
|
|
||||||
|
/* Compute lat/lon info, create iterator etc if it's the 1st time or different grid.
|
||||||
|
* This is for performance: if the grid has not changed, we only do this once
|
||||||
|
* and reuse for other messages */
|
||||||
if (!nearest->h || (flags & GRIB_NEAREST_SAME_GRID) == 0) {
|
if (!nearest->h || (flags & GRIB_NEAREST_SAME_GRID) == 0) {
|
||||||
double dummy = 0;
|
double dummy = 0;
|
||||||
double olat = 1.e10;
|
double olat = 1.e10;
|
||||||
|
@ -229,8 +232,7 @@ static int find(grib_nearest* nearest, grib_handle* h,
|
||||||
|
|
||||||
/* Compute distances if it's the 1st time or different point or different grid.
|
/* Compute distances if it's the 1st time or different point or different grid.
|
||||||
* This is for performance: if the grid and the input point have not changed
|
* This is for performance: if the grid and the input point have not changed
|
||||||
* we only do this once and reuse for other messages
|
* we only do this once and reuse for other messages */
|
||||||
*/
|
|
||||||
if (!self->distances || (flags & GRIB_NEAREST_SAME_POINT) == 0 || (flags & GRIB_NEAREST_SAME_GRID) == 0) {
|
if (!self->distances || (flags & GRIB_NEAREST_SAME_POINT) == 0 || (flags & GRIB_NEAREST_SAME_GRID) == 0) {
|
||||||
double* lons = NULL;
|
double* lons = NULL;
|
||||||
int nlon = 0;
|
int nlon = 0;
|
||||||
|
|
Loading…
Reference in New Issue