mirror of https://github.com/ecmwf/eccodes.git
Examples: Cleanup
This commit is contained in:
parent
71f5dbd1df
commit
e1630d3435
|
@ -25,8 +25,7 @@ int main(int argc, char** argv)
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* h = codes_grib_handle_new_from_samples(NULL, "GRIB2"); */
|
h = codes_handle_new_from_samples(NULL, "nonexistentsample");
|
||||||
h = codes_handle_new_from_samples(NULL, "just a test");
|
|
||||||
if (h) return 1;
|
if (h) return 1;
|
||||||
|
|
||||||
h = codes_handle_new_from_samples(NULL, "GRIB2");
|
h = codes_handle_new_from_samples(NULL, "GRIB2");
|
||||||
|
@ -148,12 +147,6 @@ int main(int argc, char** argv)
|
||||||
CODES_CHECK(codes_set_long(h, "jScansPositively", 0), 0);
|
CODES_CHECK(codes_set_long(h, "jScansPositively", 0), 0);
|
||||||
CODES_CHECK(codes_set_long(h, "jPointsAreConsecutive", 0), 0);
|
CODES_CHECK(codes_set_long(h, "jPointsAreConsecutive", 0), 0);
|
||||||
CODES_CHECK(codes_set_long(h, "alternativeRowScanning", 0), 0);
|
CODES_CHECK(codes_set_long(h, "alternativeRowScanning", 0), 0);
|
||||||
CODES_CHECK(codes_set_long(h, "iScansPositively", 1), 0);
|
|
||||||
|
|
||||||
/* ITERATOR */
|
|
||||||
|
|
||||||
|
|
||||||
/* NEAREST */
|
|
||||||
|
|
||||||
CODES_CHECK(codes_set_long(h, "timeRangeIndicator", 0), 0);
|
CODES_CHECK(codes_set_long(h, "timeRangeIndicator", 0), 0);
|
||||||
CODES_CHECK(codes_set_long(h, "NV", 0), 0);
|
CODES_CHECK(codes_set_long(h, "NV", 0), 0);
|
||||||
|
@ -165,15 +158,12 @@ int main(int argc, char** argv)
|
||||||
|
|
||||||
/* Parameter information */
|
/* Parameter information */
|
||||||
|
|
||||||
|
|
||||||
/* 0 = Temperature (grib2/tables/4/4.1.0.table) */
|
/* 0 = Temperature (grib2/tables/4/4.1.0.table) */
|
||||||
CODES_CHECK(codes_set_long(h, "parameterCategory", 0), 0);
|
CODES_CHECK(codes_set_long(h, "parameterCategory", 0), 0);
|
||||||
|
|
||||||
|
|
||||||
/* 0 = Temperature (K) (grib2/tables/4/4.2.0.0.table) */
|
/* 0 = Temperature (K) (grib2/tables/4/4.2.0.0.table) */
|
||||||
CODES_CHECK(codes_set_long(h, "parameterNumber", 0), 0);
|
CODES_CHECK(codes_set_long(h, "parameterNumber", 0), 0);
|
||||||
|
|
||||||
|
|
||||||
/* 0 = Analysis (grib2/tables/4/4.3.table) */
|
/* 0 = Analysis (grib2/tables/4/4.3.table) */
|
||||||
CODES_CHECK(codes_set_long(h, "typeOfGeneratingProcess", 0), 0);
|
CODES_CHECK(codes_set_long(h, "typeOfGeneratingProcess", 0), 0);
|
||||||
|
|
||||||
|
@ -185,7 +175,6 @@ int main(int argc, char** argv)
|
||||||
/* 1 = Hour (grib2/tables/4/4.4.table) */
|
/* 1 = Hour (grib2/tables/4/4.4.table) */
|
||||||
CODES_CHECK(codes_set_long(h, "indicatorOfUnitOfTimeRange", 1), 0);
|
CODES_CHECK(codes_set_long(h, "indicatorOfUnitOfTimeRange", 1), 0);
|
||||||
|
|
||||||
|
|
||||||
/* 1 = Hour (stepUnits.table) */
|
/* 1 = Hour (stepUnits.table) */
|
||||||
CODES_CHECK(codes_set_long(h, "stepUnits", 1), 0);
|
CODES_CHECK(codes_set_long(h, "stepUnits", 1), 0);
|
||||||
|
|
||||||
|
@ -226,7 +215,6 @@ int main(int argc, char** argv)
|
||||||
|
|
||||||
/* grib 2 Section 6 BIT-MAP SECTION */
|
/* grib 2 Section 6 BIT-MAP SECTION */
|
||||||
|
|
||||||
|
|
||||||
/* 255 = A bit map does not apply to this product (grib2/tables/4/6.0.table) */
|
/* 255 = A bit map does not apply to this product (grib2/tables/4/6.0.table) */
|
||||||
CODES_CHECK(codes_set_long(h, "bitMapIndicator", 255), 0);
|
CODES_CHECK(codes_set_long(h, "bitMapIndicator", 255), 0);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue