mirror of https://github.com/ecmwf/eccodes.git
Cleanup
This commit is contained in:
parent
57898591a1
commit
040093c655
|
@ -23,7 +23,7 @@
|
|||
IMPLEMENTS = create_accessor
|
||||
IMPLEMENTS = dump
|
||||
IMPLEMENTS = destroy
|
||||
IMPLEMENTS = xref
|
||||
IMPLEMENTS = xref
|
||||
IMPLEMENTS = reparse;execute
|
||||
MEMBERS = grib_expression *expression
|
||||
MEMBERS = grib_action *block_true
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
CLASS = action
|
||||
SUPER = action_class_section
|
||||
IMPLEMENTS = destroy
|
||||
IMPLEMENTS = xref
|
||||
IMPLEMENTS = xref
|
||||
IMPLEMENTS = execute
|
||||
MEMBERS = grib_arguments* args
|
||||
MEMBERS = grib_case *Case
|
||||
|
|
|
@ -324,7 +324,7 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len)
|
|||
/*printf("SETTING TOTAL number_of_data_points %s %ld\n",self->number_of_data_points,*len);*/
|
||||
if (self->number_of_data_points)
|
||||
grib_set_long_internal(hand, self->number_of_data_points, *len);
|
||||
|
||||
|
||||
err = grib_set_double_array_internal(hand, self->coded_values, val, *len);
|
||||
return err;
|
||||
}
|
||||
|
|
|
@ -30,8 +30,8 @@
|
|||
IMPLEMENTS = value_count
|
||||
MEMBERS=int edition
|
||||
MEMBERS=const char* units_factor
|
||||
MEMBERS=const char* units_bias
|
||||
MEMBERS=const char* changing_precision
|
||||
MEMBERS=const char* units_bias
|
||||
MEMBERS=const char* changing_precision
|
||||
MEMBERS=const char* number_of_values
|
||||
MEMBERS=const char* bits_per_value
|
||||
MEMBERS=const char* reference_value
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
*/
|
||||
|
||||
#include "grib_api_internal.h"
|
||||
/*
|
||||
/*
|
||||
This is used by make_class.pl
|
||||
|
||||
START_CLASS_DEF
|
||||
|
@ -144,7 +144,7 @@ static void init(grib_accessor* a, const long len, grib_arguments* args)
|
|||
static int pack_long(grib_accessor* a, const long* val, size_t* len)
|
||||
{
|
||||
#if 0
|
||||
grib_accessor_class* super = *(a->cclass->super);
|
||||
grib_accessor_class* super = *(a->cclass->super);
|
||||
|
||||
/* Here we assume that the totalLength will be coded AFTER the section4 length, and
|
||||
the section4 length will be overwritten by the totalLength accessor for large GRIBs */
|
||||
|
|
|
@ -19,14 +19,14 @@
|
|||
IMPLEMENTS = init;dump
|
||||
MEMBERS = const char* start_step
|
||||
MEMBERS = const char* unit
|
||||
|
||||
|
||||
MEMBERS = const char* year
|
||||
MEMBERS = const char* month
|
||||
MEMBERS = const char* day
|
||||
MEMBERS = const char* hour
|
||||
MEMBERS = const char* minute
|
||||
MEMBERS = const char* second
|
||||
|
||||
|
||||
MEMBERS = const char* year_of_end_of_interval
|
||||
MEMBERS = const char* month_of_end_of_interval
|
||||
MEMBERS = const char* day_of_end_of_interval
|
||||
|
|
|
@ -210,7 +210,7 @@ static int proj_space_view(grib_handle* h, char* result)
|
|||
|
||||
if ((err = get_earth_shape(h, shape)) != GRIB_SUCCESS)
|
||||
return err;
|
||||
|
||||
|
||||
if ((err = grib_get_double_internal(h, "longitudeOfSubSatellitePointInDegrees", &lonOfSubSatellitePointInDegrees)) != GRIB_SUCCESS)
|
||||
return err;
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
SUPER = grib_accessor_class_ascii
|
||||
IMPLEMENTS = pack_string;unpack_string;value_count
|
||||
IMPLEMENTS = init;string_length
|
||||
MEMBERS= grib_arguments* args
|
||||
MEMBERS= grib_arguments* args
|
||||
END_CLASS_DEF
|
||||
|
||||
*/
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
*/
|
||||
|
||||
#include "grib_api_internal.h"
|
||||
/*
|
||||
/*
|
||||
This is used by make_class.pl
|
||||
|
||||
START_CLASS_DEF
|
||||
|
@ -20,7 +20,7 @@
|
|||
IMPLEMENTS = pack_long;unpack_long
|
||||
IMPLEMENTS = pack_double;unpack_double
|
||||
IMPLEMENTS = init
|
||||
MEMBERS= grib_arguments* args
|
||||
MEMBERS= grib_arguments* args
|
||||
END_CLASS_DEF
|
||||
|
||||
*/
|
||||
|
|
|
@ -151,7 +151,7 @@ static void init(grib_accessor* a, const long l, grib_arguments* arg)
|
|||
static int unpack_string(grib_accessor* a, char* val, size_t* len)
|
||||
{
|
||||
grib_accessor_trim* self = (grib_accessor_trim*)a;
|
||||
|
||||
|
||||
int err = 0;
|
||||
grib_handle* h = grib_handle_of_accessor(a);
|
||||
char input[256] = {0,};
|
||||
|
@ -171,7 +171,7 @@ static int unpack_string(grib_accessor* a, char* val, size_t* len)
|
|||
static int pack_string(grib_accessor* a, const char* val, size_t* len)
|
||||
{
|
||||
char input[256] = {0,};
|
||||
|
||||
|
||||
size_t inputLen = 256;
|
||||
char buf[256] = {0,};
|
||||
char* pBuf = NULL;
|
||||
|
@ -186,7 +186,7 @@ static int pack_string(grib_accessor* a, const char* val, size_t* len)
|
|||
|
||||
if ((err = grib_get_string(h, self->input, input, &inputLen)) != GRIB_SUCCESS)
|
||||
return err;
|
||||
|
||||
|
||||
sprintf(buf, "%s", val);
|
||||
pBuf = buf;
|
||||
lrtrim(&pBuf, self->trim_left, self->trim_right);
|
||||
|
|
|
@ -840,7 +840,7 @@ void grib_context_delete(grib_context* c)
|
|||
/* grib_trie_delete(c->def_files); TODO:masn */
|
||||
|
||||
grib_context_reset(c);
|
||||
|
||||
|
||||
if (c != &default_grib_context)
|
||||
grib_context_free_persistent(&default_grib_context, c);
|
||||
|
||||
|
|
|
@ -4182,11 +4182,11 @@ double geographic_distance_ellipsoid(double major, double minor, double lon1, do
|
|||
double sinDlon = sin(deltaLon/2.0);
|
||||
double sin2Dlat = sinDlat*sinDlat;
|
||||
double sin2Dlon = sinDlon*sinDlon;
|
||||
|
||||
|
||||
double a = sin2Dlat + cos(rlat1) * cos(rlat2) * sin2Dlon;
|
||||
double c = 2 * atan2(sqrt(a), sqrt(1.0-a));
|
||||
double f = (major - minor)/major; /*flattening*/
|
||||
|
||||
|
||||
double latr1 = atan( (1.0-f)*tan(rlat1) ); /*Reduced latitude1*/
|
||||
double latr2 = atan( (1.0-f)*tan(rlat2) ); /*Reduced latitude2*/
|
||||
double P = (latr1+latr2)/2;
|
||||
|
@ -4197,14 +4197,14 @@ double geographic_distance_ellipsoid(double major, double minor, double lon1, do
|
|||
double cos2Q = cosQ*cosQ;
|
||||
double cosc2 = cos(c/2);
|
||||
double cos2c2 = cosc2*cosc2;
|
||||
|
||||
|
||||
double sinQ = sin(Q);
|
||||
double sin2Q = sinQ*sinQ;
|
||||
double cosP = cos(P);
|
||||
double cos2P = cosP*cosP;
|
||||
double sinc2 = sin(c/2);
|
||||
double sin2c2 = sinc2*sinc2;
|
||||
|
||||
|
||||
double X = (c - sin(c))* sin2P * cos2Q / cos2c2;
|
||||
double Y = (c + sin(c))*sin2Q*cos2P/sin2c2;
|
||||
double dist = major * (c - f*(X+Y)/2);
|
||||
|
|
|
@ -60,7 +60,7 @@ int main(int argc, char** argv)
|
|||
bad = out;
|
||||
cbad = cout;
|
||||
}
|
||||
|
||||
|
||||
sMaxNumMessages = getenv(ENV_VAR);
|
||||
if (sMaxNumMessages) {
|
||||
long lmax = 0;
|
||||
|
|
Loading…
Reference in New Issue