Cosmetics

This commit is contained in:
Shahram Najm 2021-03-01 22:23:12 +00:00
parent 70147cd99d
commit f8b61c28bd
6 changed files with 12 additions and 9 deletions

View File

@ -535,7 +535,6 @@ static void grib_split_long_groups(grib_handle* hand, grib_context* c, long* num
long* localFirstOrderValues;
int maxNumberOfGroups = *numberOfGroups * 2;
/* the widthOfLengths is the same for all the groupLengths and therefore if
few big groups are present all the groups have to be coded with a large number
of bits (big widthOfLengths) even if the majority of them is small.

View File

@ -33,7 +33,6 @@
#define M_PI 3.14159265358979323846
#endif
static void gauss_first_guess(long trunc, double* vals)
{
long i = 0, numVals;

View File

@ -22,7 +22,6 @@
#define NULL_MARKER 0
#define NOT_NULL_MARKER 255
/* #if GRIB_PTHREADS */
#if 0
static pthread_once_t once = PTHREAD_ONCE_INIT;
@ -57,7 +56,6 @@ static void init()
}
#endif
static const char* mars_keys =
"mars.date,mars.time,mars.expver,mars.stream,mars.class,mars.type,"
"mars.step,mars.param,mars.levtype,mars.levelist,mars.number,mars.iteration,"
@ -81,7 +79,6 @@ static char* get_key(char** keys, int* type)
while (*p == ' ')
p++;
while (*p != 0 && *p != ':' && *p != ',')
p++;
if (*p == ':') {
@ -1404,7 +1401,6 @@ int grib_index_add_file(grib_index* index, const char* filename)
if (err) return err;
field->length=length;
if (field_tree->field) {
grib_field* pfield=field_tree->field;
while (pfield->next) pfield=pfield->next;

View File

@ -136,6 +136,9 @@ static int find(grib_nearest* nearest, grib_handle* h,
return ret;
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) {
double dummy = 0;
double olat = 1.e10;
@ -183,6 +186,9 @@ static int find(grib_nearest* nearest, grib_handle* h,
}
nearest->h = h;
/* 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
* 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) {
double* lons = NULL;
int nlon = 0;

View File

@ -175,7 +175,6 @@ static int find(grib_nearest* nearest, grib_handle* h,
}
nearest->h=h;
}
if (!self->distances || (flags & GRIB_NEAREST_SAME_POINT)==0
@ -258,6 +257,9 @@ static int find(grib_nearest* nearest, grib_handle* h,
return ret;
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) {
double dummy = 0;
double olat = 1.e10, olon = 1.e10;
@ -342,6 +344,9 @@ static int find(grib_nearest* nearest, grib_handle* h,
}
nearest->h = h;
/* 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
* 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) {
int nearest_lons_found = 0;

View File

@ -1086,7 +1086,6 @@ grib_handle* grib_util_set_spec2(grib_handle* h,
if (h->context->debug == -1)
fprintf(stderr, "ECCODES DEBUG grib_util: done grib_set_double_array \n");
/* convert to second_order if not constant field */
if (setSecondOrder) {
int constant = 0;
@ -1249,7 +1248,6 @@ grib_handle* grib_util_set_spec2(grib_handle* h,
COPY_SPEC_DOUBLE(latitudeOfLastGridPointInDegrees);
break;
case GRIB_UTIL_GRID_SPEC_REDUCED_LL:
COPY_SPEC_LONG(bitmapPresent);
if (spec->missingValue) COPY_SPEC_DOUBLE(missingValue);