mirror of https://github.com/ecmwf/eccodes.git
Formatting
This commit is contained in:
parent
8fe5635d9d
commit
c438c13c84
|
@ -295,15 +295,16 @@ int grib_nearest_find_generic(
|
|||
approximate this using the average of the semimajor and semiminor axes */
|
||||
if ((ret = grib_get_double(h, radius_keyname, &radiusInMetres)) == GRIB_SUCCESS &&
|
||||
!grib_is_missing(h, radius_keyname, &ret)) {
|
||||
radiusInKm = radiusInMetres/1000.0;
|
||||
} else {
|
||||
double minor=0, major=0;
|
||||
radiusInKm = radiusInMetres / 1000.0;
|
||||
}
|
||||
else {
|
||||
double minor = 0, major = 0;
|
||||
if ((ret = grib_get_double_internal(h, "earthMinorAxisInMetres", &minor)) != GRIB_SUCCESS) return ret;
|
||||
if ((ret = grib_get_double_internal(h, "earthMajorAxisInMetres", &major)) != GRIB_SUCCESS) return ret;
|
||||
if (grib_is_missing(h, "earthMinorAxisInMetres", &ret)) return GRIB_GEOCALCULUS_PROBLEM;
|
||||
if (grib_is_missing(h, "earthMajorAxisInMetres", &ret)) return GRIB_GEOCALCULUS_PROBLEM;
|
||||
radiusInMetres = (major + minor)/2;
|
||||
radiusInKm = radiusInMetres/1000.0;
|
||||
radiusInMetres = (major + minor) / 2;
|
||||
radiusInKm = radiusInMetres / 1000.0;
|
||||
}
|
||||
|
||||
neighbours = (PointStore*)grib_context_malloc(nearest->context, nvalues * sizeof(PointStore));
|
||||
|
|
Loading…
Reference in New Issue