diff --git a/definitions/grib1/grid_definition_90.def b/definitions/grib1/grid_definition_90.def index 63682ccb4..5d98f86d6 100644 --- a/definitions/grib1/grid_definition_90.def +++ b/definitions/grib1/grid_definition_90.def @@ -1,13 +1,14 @@ # GRID DEFINITION Space view, perspective or orthographic + # grib 1 -> 2 constant gridDefinitionTemplateNumber = 90; -unsigned[2] Nx : dump; +unsigned[2] Nx : dump; alias numberOfPointsAlongXAxis = Nx; alias Ni = Nx; alias geography.Nx=Nx; -unsigned[2] Ny : dump; +unsigned[2] Ny : dump; alias numberOfPointsAlongYAxis = Ny; alias Nj = Ny; alias geography.Ny=Ny; @@ -18,21 +19,20 @@ alias Lap=latitudeOfSubSatellitePoint; signed[3] longitudeOfSubSatellitePoint ; meta geography.longitudeOfSubSatellitePointInDegrees scale(longitudeOfSubSatellitePoint,oneConstant,grib1divider,truncateDegrees) : dump; -alias Lap=longitudeOfSubSatellitePoint; +alias Lop=longitudeOfSubSatellitePoint; include "grib1/resolution_flags.def"; -unsigned[3] dx : dump; +unsigned[3] dx : dump; alias geography.dx=dx; -unsigned[3] dy : dump; +unsigned[3] dy : dump; alias geography.dy=dy; -unsigned[2] XpInGridLengths : dump; +unsigned[2] XpInGridLengths : dump; alias geography.XpInGridLengths=XpInGridLengths; - -unsigned[2] YpInGridLengths : dump; +unsigned[2] YpInGridLengths : dump; alias geography.YpInGridLengths=YpInGridLengths; include "grib1/scanning_mode.def"; @@ -42,20 +42,21 @@ meta geography.orientationOfTheGridInDegrees scale(orientationOfTheGrid,oneCons unsigned[3] NrInRadiusOfEarth : edition_specific,can_be_missing,no_copy; alias altitudeOfTheCameraFromTheEarthsCentreMeasuredInUnitsOfTheEarthsRadius = NrInRadiusOfEarth; +meta NrInRadiusOfEarthScaled scale(NrInRadiusOfEarth,oneConstant,oneMillionConstant,truncateDegrees) : dump; -unsigned[2] Xo : dump; +unsigned[2] Xo : dump; alias xCoordinateOfOriginOfSectorImage=Xo; alias geography.Xo=Xo; -unsigned[2] Yo : dump; +unsigned[2] Yo : dump; alias yCoordinateOfOriginOfSectorImage=Yo; alias geography.Yo=Yo; -#Ce Length is normally 32 + stretched and/or rotated -#Ce parameters + vertical coordinate parameters + list of -#Ce numbers of points. -#Ce (Lambert conformal and Mercator are 42 octets in length, -#Ce while Space view is 40 for ECMWF (44 in GRIB specification) +#Ce Length is normally 32 + stretched and/or rotated +#Ce parameters + vertical coordinate parameters + list of +#Ce numbers of points. +#Ce (Lambert conformal and Mercator are 42 octets in length, +#Ce while Space view is 40 for ECMWF (44 in GRIB specification) if ( centre != 98 ) { pad padding_grid90_1(6); } @@ -64,3 +65,24 @@ meta numberOfDataPoints number_of_points(Ni,Nj,PLPresent,pl) : dump; alias numberOfPoints=numberOfDataPoints; meta numberOfValues number_of_values(values,bitsPerValue,numberOfDataPoints,bitmapPresent,bitmap,numberOfCodedValues) : dump; #alias ls.valuesCount=numberOfValues; + +iterator space_view(numberOfPoints, missingValue, values, radius, + earthIsOblate, + earthMajorAxis, earthMinorAxis, + Nx, Ny, + latitudeOfSubSatellitePointInDegrees, + longitudeOfSubSatellitePointInDegrees, + dx, dy, XpInGridLengths, YpInGridLengths, + orientationOfTheGridInDegrees, + NrInRadiusOfEarthScaled, Xo, Yo, + iScansNegatively, jScansPositively, + jPointsAreConsecutive, alternativeRowScanning); + +nearest space_view(values,radius,Nx,Ny); + +meta latLonValues latlonvalues(values); +alias latitudeLongitudeValues=latLonValues; +meta latitudes latitudes(values,0); +meta longitudes longitudes(values,0); +meta distinctLatitudes latitudes(values,1); +meta distinctLongitudes longitudes(values,1); diff --git a/definitions/grib2/template.3.90.def b/definitions/grib2/template.3.90.def index 7d51b21dc..a4f6a092f 100644 --- a/definitions/grib2/template.3.90.def +++ b/definitions/grib2/template.3.90.def @@ -14,10 +14,10 @@ alias numberOfPointsAlongYAxis = Ny; alias geography.Ny=Ny; # Lap - latitude of sub-satellite point -signed[4] latitudeOfSubSatellitePoint ; +signed[4] latitudeOfSubSatellitePoint; # Lop - longitude of sub-satellite point -signed[4] longitudeOfSubSatellitePoint ; +signed[4] longitudeOfSubSatellitePoint; meta geography.latitudeOfSubSatellitePointInDegrees scale(latitudeOfSubSatellitePoint,one,grib2divider,truncateDegrees) : dump; meta geography.longitudeOfSubSatellitePointInDegrees scale(longitudeOfSubSatellitePoint,one,grib2divider,truncateDegrees) : dump; @@ -57,6 +57,7 @@ meta geography.orientationOfTheGridInDegrees unsigned[4] Nr : edition_specific,can_be_missing,no_copy; alias altitudeOfTheCameraFromTheEarthsCentreMeasuredInUnitsOfTheEarthsRadius = Nr; meta geography.NrInRadiusOfEarth scale(Nr,oneConstant,oneMillionConstant,truncateDegrees) : dump; +alias NrInRadiusOfEarthScaled=NrInRadiusOfEarth; # Xo - X-coordinate of origin of sector image unsigned[4] Xo : dump; @@ -76,7 +77,7 @@ iterator space_view(numberOfPoints, missingValue, values, radius, longitudeOfSubSatellitePointInDegrees, dx, dy, XpInGridLengths, YpInGridLengths, orientationOfTheGridInDegrees, - NrInRadiusOfEarth, Xo, Yo, + NrInRadiusOfEarthScaled, Xo, Yo, iScansNegatively, jScansPositively, jPointsAreConsecutive, alternativeRowScanning); diff --git a/definitions/grib2/template.4.70.def b/definitions/grib2/template.4.70.def index 520106a26..399e81197 100644 --- a/definitions/grib2/template.4.70.def +++ b/definitions/grib2/template.4.70.def @@ -1,6 +1,6 @@ # (C) Copyright 2005- ECMWF. -# EFAS: Analysis or forecast at a horizontal level or in a horizontal layer at a point in time +# TEMPLATE 4.70, Analysis or forecast at a horizontal level or in a horizontal layer at a point in time include "grib2/template.4.parameter.def" include "grib2/template.4.postproc.def" diff --git a/definitions/grib2/template.4.71.def b/definitions/grib2/template.4.71.def index f91f2e366..ba40285b1 100644 --- a/definitions/grib2/template.4.71.def +++ b/definitions/grib2/template.4.71.def @@ -1,6 +1,6 @@ # (C) Copyright 2005- ECMWF. -# EFAS: Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer at a point in time +# TEMPLATE 4.71, Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer at a point in time include "grib2/template.4.parameter.def" include "grib2/template.4.postproc.def" diff --git a/definitions/grib2/template.4.72.def b/definitions/grib2/template.4.72.def index ba6ad7da9..33d58a725 100644 --- a/definitions/grib2/template.4.72.def +++ b/definitions/grib2/template.4.72.def @@ -1,6 +1,6 @@ # (C) Copyright 2005- ECMWF. -# EFAS: Average, accumulation, and/or extreme values or other statistically processed values at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval +# TEMPLATE 4.72, Average, accumulation, and/or extreme values or other statistically processed values at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval include "grib2/template.4.parameter.def" include "grib2/template.4.postproc.def" diff --git a/definitions/grib2/template.4.73.def b/definitions/grib2/template.4.73.def index 535d7ba4e..306ea6ed0 100644 --- a/definitions/grib2/template.4.73.def +++ b/definitions/grib2/template.4.73.def @@ -1,6 +1,6 @@ # (C) Copyright 2005- ECMWF. -# EFAS: Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval +# TEMPLATE 4.73, Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval include "grib2/template.4.parameter.def" include "grib2/template.4.postproc.def" diff --git a/definitions/grib2/template.4.92.def b/definitions/grib2/template.4.92.def new file mode 100644 index 000000000..d94c89015 --- /dev/null +++ b/definitions/grib2/template.4.92.def @@ -0,0 +1,11 @@ +# (C) Copyright 2005- ECMWF. + +# TEMPLATE 4.92, Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer at a local time + +include "grib2/template.4.parameter.def" +include "grib2/template.4.generating_process.def" +#include "grib2/template.4.forecast_time.def" +#include "grib2/template.4.point_in_time.def" +include "grib2/template.4.horizontal.def" +include "grib2/template.4.eps.def" +include "grib2/template.4.localtime.def" diff --git a/definitions/grib2/template.4.93.def b/definitions/grib2/template.4.93.def new file mode 100644 index 000000000..ba14d95d4 --- /dev/null +++ b/definitions/grib2/template.4.93.def @@ -0,0 +1,11 @@ +# (C) Copyright 2005- ECMWF. + +# TEMPLATE 4.93, Analysis or forecast at a horizontal level or in a horizontal layer at a local time + +include "grib2/template.4.parameter.def" +include "grib2/template.4.postproc.def" +include "grib2/template.4.generating_process.def" +#include "grib2/template.4.forecast_time.def" +#include "grib2/template.4.point_in_time.def" +include "grib2/template.4.horizontal.def" +include "grib2/template.4.localtime.def" diff --git a/definitions/grib2/template.4.94.def b/definitions/grib2/template.4.94.def new file mode 100644 index 000000000..0ba58bb53 --- /dev/null +++ b/definitions/grib2/template.4.94.def @@ -0,0 +1,12 @@ +# (C) Copyright 2005- ECMWF. + +# TEMPLATE 4.94, Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer at a local time + +include "grib2/template.4.parameter.def" +include "grib2/template.4.postproc.def" +include "grib2/template.4.generating_process.def" +#include "grib2/template.4.forecast_time.def" +#include "grib2/template.4.point_in_time.def" +include "grib2/template.4.horizontal.def" +include "grib2/template.4.eps.def" +include "grib2/template.4.localtime.def" diff --git a/definitions/grib2/template.4.95.def b/definitions/grib2/template.4.95.def new file mode 100644 index 000000000..53d2aef4e --- /dev/null +++ b/definitions/grib2/template.4.95.def @@ -0,0 +1,10 @@ +# (C) Copyright 2005- ECMWF. + +# TEMPLATE 4.95, Average, accumulation extreme values or other statistically processed value at a horizontal level or in a horizontal layer at a local time + +include "grib2/template.4.parameter.def" +include "grib2/template.4.generating_process.def" +# no template.4.forecast_time.def component in this template. +include "grib2/template.4.horizontal.def" +include "grib2/template.4.localtime_statistical.def" +include "grib2/template.4.localtime.def" diff --git a/definitions/grib2/template.4.96.def b/definitions/grib2/template.4.96.def new file mode 100644 index 000000000..f0d086cb4 --- /dev/null +++ b/definitions/grib2/template.4.96.def @@ -0,0 +1,12 @@ +# (C) Copyright 2005- ECMWF. + +# TEMPLATE 4.96, Average, accumulation, extreme values or other statistically processed values of an individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer at a local time + +include "grib2/template.4.parameter.def" +include "grib2/template.4.generating_process.def" +#include "grib2/template.4.forecast_time.def" +#include "grib2/template.4.point_in_time.def" +include "grib2/template.4.horizontal.def" +include "grib2/template.4.eps.def" +include "grib2/template.4.localtime_statistical.def" +include "grib2/template.4.localtime.def" diff --git a/definitions/grib2/template.4.97.def b/definitions/grib2/template.4.97.def new file mode 100644 index 000000000..67b315ff1 --- /dev/null +++ b/definitions/grib2/template.4.97.def @@ -0,0 +1,12 @@ +# (C) Copyright 2005- ECMWF. + +# TEMPLATE 4.97, Average, accumulation, extreme values or other statistically processed values of post-processing analysis or forecast at a horizontal level or in a horizontal layer at a local time + +include "grib2/template.4.parameter.def" +include "grib2/template.4.postproc.def" +include "grib2/template.4.generating_process.def" +#include "grib2/template.4.forecast_time.def" +#include "grib2/template.4.point_in_time.def" +include "grib2/template.4.horizontal.def" +include "grib2/template.4.localtime_statistical.def" +include "grib2/template.4.localtime.def" diff --git a/definitions/grib2/template.4.98.def b/definitions/grib2/template.4.98.def new file mode 100644 index 000000000..12e70affe --- /dev/null +++ b/definitions/grib2/template.4.98.def @@ -0,0 +1,13 @@ +# (C) Copyright 2005- ECMWF. + +# TEMPLATE 4.98, Average, accumulation, extreme values or other statistically processed values of a post-processing individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer at a local time + +include "grib2/template.4.parameter.def" +include "grib2/template.4.postproc.def" +include "grib2/template.4.generating_process.def" +#include "grib2/template.4.forecast_time.def" +#include "grib2/template.4.point_in_time.def" +include "grib2/template.4.horizontal.def" +include "grib2/template.4.eps.def" +include "grib2/template.4.localtime_statistical.def" +include "grib2/template.4.localtime.def" diff --git a/definitions/grib2/template.4.localtime_statistical.def b/definitions/grib2/template.4.localtime_statistical.def new file mode 100644 index 000000000..f07845f07 --- /dev/null +++ b/definitions/grib2/template.4.localtime_statistical.def @@ -0,0 +1,13 @@ +# (C) Copyright 2005- ECMWF. + +# Statistical process used to calculate the processed field from the field at each time increment during the time range +codetable[1] typeOfStatisticalProcessing ('4.10.table',masterDir,localDir) : edition_specific; + +# Indicator of unit of time for time range over which statistical processing is done +codetable[1] indicatorOfUnitForTimeRange ('4.4.table',masterDir,localDir) =1; + +# Length of the time range over which statistical processing is done, in units defined by the previous octet +unsigned[4] lengthOfTimeRange=0; + +# Number of statistically processed fields used in the local time composite field == number of stripes +unsigned[1] numberOfStatisticallyProcessedFieldsForLocalTime; diff --git a/Makefile.am b/deprecated/Makefile.am similarity index 100% rename from Makefile.am rename to deprecated/Makefile.am diff --git a/acinclude.m4 b/deprecated/acinclude.m4 similarity index 100% rename from acinclude.m4 rename to deprecated/acinclude.m4 diff --git a/autogen.sh b/deprecated/autogen.sh similarity index 100% rename from autogen.sh rename to deprecated/autogen.sh diff --git a/config/config.guess b/deprecated/config/config.guess similarity index 100% rename from config/config.guess rename to deprecated/config/config.guess diff --git a/config/config.sub b/deprecated/config/config.sub similarity index 100% rename from config/config.sub rename to deprecated/config/config.sub diff --git a/config/depcomp b/deprecated/config/depcomp similarity index 100% rename from config/depcomp rename to deprecated/config/depcomp diff --git a/config/install-sh b/deprecated/config/install-sh similarity index 100% rename from config/install-sh rename to deprecated/config/install-sh diff --git a/config/ltmain.sh b/deprecated/config/ltmain.sh similarity index 100% rename from config/ltmain.sh rename to deprecated/config/ltmain.sh diff --git a/config/missing b/deprecated/config/missing similarity index 100% rename from config/missing rename to deprecated/config/missing diff --git a/configure.ac b/deprecated/configure.ac similarity index 100% rename from configure.ac rename to deprecated/configure.ac diff --git a/m4/ax_linux_distribution.m4 b/deprecated/m4/ax_linux_distribution.m4 similarity index 100% rename from m4/ax_linux_distribution.m4 rename to deprecated/m4/ax_linux_distribution.m4 diff --git a/m4/ax_python_devel.m4 b/deprecated/m4/ax_python_devel.m4 similarity index 100% rename from m4/ax_python_devel.m4 rename to deprecated/m4/ax_python_devel.m4 diff --git a/m4/ax_rpm_init.m4 b/deprecated/m4/ax_rpm_init.m4 similarity index 100% rename from m4/ax_rpm_init.m4 rename to deprecated/m4/ax_rpm_init.m4 diff --git a/m4/libtool.m4 b/deprecated/m4/libtool.m4 similarity index 100% rename from m4/libtool.m4 rename to deprecated/m4/libtool.m4 diff --git a/m4/ltoptions.m4 b/deprecated/m4/ltoptions.m4 similarity index 100% rename from m4/ltoptions.m4 rename to deprecated/m4/ltoptions.m4 diff --git a/m4/ltsugar.m4 b/deprecated/m4/ltsugar.m4 similarity index 100% rename from m4/ltsugar.m4 rename to deprecated/m4/ltsugar.m4 diff --git a/m4/ltversion.m4 b/deprecated/m4/ltversion.m4 similarity index 100% rename from m4/ltversion.m4 rename to deprecated/m4/ltversion.m4 diff --git a/m4/lt~obsolete.m4 b/deprecated/m4/lt~obsolete.m4 similarity index 100% rename from m4/lt~obsolete.m4 rename to deprecated/m4/lt~obsolete.m4 diff --git a/perf/jmeter.awk b/deprecated/perf/jmeter.awk similarity index 100% rename from perf/jmeter.awk rename to deprecated/perf/jmeter.awk diff --git a/perf/time.sh b/deprecated/perf/time.sh similarity index 100% rename from perf/time.sh rename to deprecated/perf/time.sh diff --git a/version.sh b/deprecated/version.sh similarity index 100% rename from version.sh rename to deprecated/version.sh diff --git a/examples/python/binary_message.py b/examples/python/binary_message.py index de6016361..9f269646e 100644 --- a/examples/python/binary_message.py +++ b/examples/python/binary_message.py @@ -9,8 +9,8 @@ # nor does it submit to any jurisdiction. # -import traceback import sys +import traceback from eccodes import * diff --git a/examples/python/bufr_attributes.py b/examples/python/bufr_attributes.py index b3661fa3b..61f504c0a 100644 --- a/examples/python/bufr_attributes.py +++ b/examples/python/bufr_attributes.py @@ -15,8 +15,10 @@ # from __future__ import print_function -import traceback + import sys +import traceback + from eccodes import * INPUT = '../../data/bufr/syno_multi.bufr' diff --git a/examples/python/bufr_clone.py b/examples/python/bufr_clone.py index 1a54b9b79..f3384b171 100644 --- a/examples/python/bufr_clone.py +++ b/examples/python/bufr_clone.py @@ -16,8 +16,9 @@ # from __future__ import absolute_import -import traceback + import sys +import traceback from eccodes import * diff --git a/examples/python/bufr_copy_data.py b/examples/python/bufr_copy_data.py index b65e47124..a7d27e694 100644 --- a/examples/python/bufr_copy_data.py +++ b/examples/python/bufr_copy_data.py @@ -14,8 +14,10 @@ # position in the data tree and with the same number of values to the output handle # from __future__ import print_function -import traceback + import sys +import traceback + from eccodes import * VERBOSE = 1 # verbose error reporting diff --git a/examples/python/bufr_copy_data2.py b/examples/python/bufr_copy_data2.py index 5e6f54c7a..609cc725a 100644 --- a/examples/python/bufr_copy_data2.py +++ b/examples/python/bufr_copy_data2.py @@ -15,8 +15,10 @@ # This example is for messages which use the operator 203YYY (overridden reference values) # from __future__ import print_function -import traceback + import sys +import traceback + from eccodes import * VERBOSE = 1 # verbose error reporting diff --git a/examples/python/bufr_copy_data3.py b/examples/python/bufr_copy_data3.py index 9cf11ae81..10b9dacf0 100644 --- a/examples/python/bufr_copy_data3.py +++ b/examples/python/bufr_copy_data3.py @@ -15,8 +15,10 @@ # In this example we add the WIGOS sequence 301150 to a SYNOP # from __future__ import print_function -import traceback + import sys +import traceback + from eccodes import * VERBOSE = 1 # verbose error reporting diff --git a/examples/python/bufr_ecc-448.py b/examples/python/bufr_ecc-448.py index 7216df4b6..9e828af0f 100644 --- a/examples/python/bufr_ecc-448.py +++ b/examples/python/bufr_ecc-448.py @@ -8,8 +8,9 @@ # nor does it submit to any jurisdiction. from __future__ import print_function -import traceback + import sys +import traceback from eccodes import * diff --git a/examples/python/bufr_ecc-869.py b/examples/python/bufr_ecc-869.py index ef9671946..3a35d5ebe 100644 --- a/examples/python/bufr_ecc-869.py +++ b/examples/python/bufr_ecc-869.py @@ -3,8 +3,10 @@ # See ECC-869 from __future__ import print_function -import traceback + import sys +import traceback + from eccodes import * OUTPUT_FILENAME = 'outfile_ecc_869_test.bufr' diff --git a/examples/python/bufr_encode_flight.py b/examples/python/bufr_encode_flight.py index 9d6c9e13f..2b61058b3 100644 --- a/examples/python/bufr_encode_flight.py +++ b/examples/python/bufr_encode_flight.py @@ -11,11 +11,12 @@ # Description: how to encode flight dataset into BUFR from __future__ import print_function -from datetime import datetime -import traceback -import numpy as np -import sys +import sys +import traceback +from datetime import datetime + +import numpy as np from eccodes import * VERBOSE = 1 # verbose error reporting diff --git a/examples/python/bufr_expanded.py b/examples/python/bufr_expanded.py index a012e6db6..b5cca1141 100644 --- a/examples/python/bufr_expanded.py +++ b/examples/python/bufr_expanded.py @@ -13,10 +13,10 @@ # Description: how to read values of different type of keys from BUFR messages. # -from __future__ import absolute_import -from __future__ import print_function -import traceback +from __future__ import absolute_import, print_function + import sys +import traceback from eccodes import * diff --git a/examples/python/bufr_get_keys.py b/examples/python/bufr_get_keys.py index 35a1c6a0f..cf30075ff 100644 --- a/examples/python/bufr_get_keys.py +++ b/examples/python/bufr_get_keys.py @@ -15,8 +15,9 @@ # from __future__ import print_function -import traceback + import sys +import traceback from eccodes import * diff --git a/examples/python/bufr_keys_iterator.py b/examples/python/bufr_keys_iterator.py index f4a4eecfd..e2a89d5dd 100644 --- a/examples/python/bufr_keys_iterator.py +++ b/examples/python/bufr_keys_iterator.py @@ -16,8 +16,9 @@ from __future__ import print_function -import traceback + import sys +import traceback from eccodes import * diff --git a/examples/python/bufr_read_header.py b/examples/python/bufr_read_header.py index 163568dc6..058475b75 100644 --- a/examples/python/bufr_read_header.py +++ b/examples/python/bufr_read_header.py @@ -16,8 +16,9 @@ # from __future__ import print_function -import traceback + import sys +import traceback from eccodes import * diff --git a/examples/python/bufr_read_sample.py b/examples/python/bufr_read_sample.py index 4d66122cb..51e234d0b 100644 --- a/examples/python/bufr_read_sample.py +++ b/examples/python/bufr_read_sample.py @@ -14,8 +14,9 @@ # from __future__ import print_function -import traceback + import sys +import traceback from eccodes import * diff --git a/examples/python/bufr_read_scatterometer.py b/examples/python/bufr_read_scatterometer.py index da52ffe22..310cd34e3 100644 --- a/examples/python/bufr_read_scatterometer.py +++ b/examples/python/bufr_read_scatterometer.py @@ -20,8 +20,9 @@ # from __future__ import print_function -import traceback + import sys +import traceback from eccodes import * diff --git a/examples/python/bufr_read_synop.py b/examples/python/bufr_read_synop.py index 82496c18c..6cc1a87d2 100644 --- a/examples/python/bufr_read_synop.py +++ b/examples/python/bufr_read_synop.py @@ -19,8 +19,9 @@ # understand the structure of the messages. from __future__ import print_function -import traceback + import sys +import traceback from eccodes import * diff --git a/examples/python/bufr_read_temp.py b/examples/python/bufr_read_temp.py index 10e554312..1be6b8677 100644 --- a/examples/python/bufr_read_temp.py +++ b/examples/python/bufr_read_temp.py @@ -20,8 +20,10 @@ # understand the structure of the messages. # from __future__ import print_function -import traceback + import sys +import traceback + from eccodes import * INPUT = '../../data/bufr/PraticaTemp.bufr' diff --git a/examples/python/bufr_read_tempf.py b/examples/python/bufr_read_tempf.py index 555743858..1f83f042d 100644 --- a/examples/python/bufr_read_tempf.py +++ b/examples/python/bufr_read_tempf.py @@ -23,8 +23,10 @@ # understand the structure of the messages. # from __future__ import print_function -import traceback + import sys +import traceback + import numpy as np from eccodes import * diff --git a/examples/python/bufr_read_tropical_cyclone.py b/examples/python/bufr_read_tropical_cyclone.py index 5494af806..2a534b380 100644 --- a/examples/python/bufr_read_tropical_cyclone.py +++ b/examples/python/bufr_read_tropical_cyclone.py @@ -17,9 +17,10 @@ # from __future__ import print_function -import traceback -import sys + import collections +import sys +import traceback from eccodes import * diff --git a/examples/python/bufr_set_keys.py b/examples/python/bufr_set_keys.py index 1b48b2478..89141025c 100644 --- a/examples/python/bufr_set_keys.py +++ b/examples/python/bufr_set_keys.py @@ -15,8 +15,9 @@ # from __future__ import print_function -import traceback + import sys +import traceback from eccodes import * diff --git a/examples/python/bufr_subset.py b/examples/python/bufr_subset.py index 9e20a3dc4..29275f232 100644 --- a/examples/python/bufr_subset.py +++ b/examples/python/bufr_subset.py @@ -15,8 +15,9 @@ # from __future__ import print_function -import traceback + import sys +import traceback from eccodes import * diff --git a/examples/python/get_product_kind.py b/examples/python/get_product_kind.py index 7813315ca..48e93298f 100644 --- a/examples/python/get_product_kind.py +++ b/examples/python/get_product_kind.py @@ -15,8 +15,10 @@ # and print the kind of product (e.g. GRIB, BUFR etc) from __future__ import print_function -import traceback + import sys +import traceback + from eccodes import * VERBOSE = 1 # verbose error reporting diff --git a/examples/python/grib_ccsds.py b/examples/python/grib_ccsds.py index d171daa70..0bf7f8640 100644 --- a/examples/python/grib_ccsds.py +++ b/examples/python/grib_ccsds.py @@ -8,8 +8,9 @@ # nor does it submit to any jurisdiction. from __future__ import print_function -import traceback + import sys +import traceback from eccodes import * diff --git a/examples/python/grib_clone.py b/examples/python/grib_clone.py index 531ea22bb..624bf2618 100644 --- a/examples/python/grib_clone.py +++ b/examples/python/grib_clone.py @@ -9,9 +9,9 @@ # nor does it submit to any jurisdiction. # -import traceback -import sys import random +import sys +import traceback from eccodes import * diff --git a/examples/python/grib_count_messages.py b/examples/python/grib_count_messages.py index 28df17bd3..018cb729a 100644 --- a/examples/python/grib_count_messages.py +++ b/examples/python/grib_count_messages.py @@ -10,8 +10,9 @@ # from __future__ import print_function -import traceback + import sys +import traceback from eccodes import * diff --git a/examples/python/grib_get_keys.py b/examples/python/grib_get_keys.py index 1d94f492d..e4c63475a 100644 --- a/examples/python/grib_get_keys.py +++ b/examples/python/grib_get_keys.py @@ -13,8 +13,10 @@ # from __future__ import print_function -import traceback + import sys +import traceback + from eccodes import * INPUT = '../../data/reduced_latlon_surface.grib1' diff --git a/examples/python/grib_get_message_offset.py b/examples/python/grib_get_message_offset.py index 32583980e..701ee79d3 100644 --- a/examples/python/grib_get_message_offset.py +++ b/examples/python/grib_get_message_offset.py @@ -15,8 +15,10 @@ # from __future__ import print_function -import traceback + import sys +import traceback + from eccodes import * VERBOSE = 1 # verbose error reporting diff --git a/examples/python/grib_index.py b/examples/python/grib_index.py index b13cdae67..b78baee4d 100644 --- a/examples/python/grib_index.py +++ b/examples/python/grib_index.py @@ -13,9 +13,10 @@ # a file from __future__ import print_function -import traceback -import sys + import os +import sys +import traceback from eccodes import * diff --git a/examples/python/grib_iterator.py b/examples/python/grib_iterator.py index 2c7d5ede8..f693424ff 100644 --- a/examples/python/grib_iterator.py +++ b/examples/python/grib_iterator.py @@ -9,8 +9,9 @@ # from __future__ import print_function -import traceback + import sys +import traceback from eccodes import * diff --git a/examples/python/grib_iterator_bitmap.py b/examples/python/grib_iterator_bitmap.py index c2937de9b..e6fb3d838 100644 --- a/examples/python/grib_iterator_bitmap.py +++ b/examples/python/grib_iterator_bitmap.py @@ -13,8 +13,9 @@ # (rather than compare each value with the missingValue key) # from __future__ import print_function -import traceback + import sys +import traceback from eccodes import * diff --git a/examples/python/grib_keys_iterator.py b/examples/python/grib_keys_iterator.py index 237c016f3..666fe6367 100644 --- a/examples/python/grib_keys_iterator.py +++ b/examples/python/grib_keys_iterator.py @@ -10,8 +10,9 @@ # from __future__ import print_function -import traceback + import sys +import traceback from eccodes import * diff --git a/examples/python/grib_ls_JSON.py b/examples/python/grib_ls_JSON.py index 685687070..8cb3c3d08 100644 --- a/examples/python/grib_ls_JSON.py +++ b/examples/python/grib_ls_JSON.py @@ -12,10 +12,12 @@ # from __future__ import print_function -import traceback -import sys -import os + import getopt +import os +import sys +import traceback + from eccodes import * VERBOSE = 1 # verbose error reporting diff --git a/examples/python/grib_multi_write.py b/examples/python/grib_multi_write.py index e4386b9cf..2e7e447b8 100644 --- a/examples/python/grib_multi_write.py +++ b/examples/python/grib_multi_write.py @@ -9,8 +9,8 @@ # nor does it submit to any jurisdiction. # -import traceback import sys +import traceback from eccodes import * diff --git a/examples/python/grib_nearest.py b/examples/python/grib_nearest.py index 5eed9dff7..332afaa31 100644 --- a/examples/python/grib_nearest.py +++ b/examples/python/grib_nearest.py @@ -10,8 +10,9 @@ # from __future__ import print_function -import traceback + import sys +import traceback from eccodes import * diff --git a/examples/python/grib_print_data.py b/examples/python/grib_print_data.py index 735479e01..a3bd70b71 100644 --- a/examples/python/grib_print_data.py +++ b/examples/python/grib_print_data.py @@ -10,8 +10,9 @@ # from __future__ import print_function -import traceback + import sys +import traceback from eccodes import * diff --git a/examples/python/grib_read_sample.py b/examples/python/grib_read_sample.py index d044f5c7c..b48ac93ac 100644 --- a/examples/python/grib_read_sample.py +++ b/examples/python/grib_read_sample.py @@ -14,8 +14,9 @@ # from __future__ import print_function -import traceback + import sys +import traceback from eccodes import * diff --git a/examples/python/grib_samples.py b/examples/python/grib_samples.py index 7be5cbbbc..32558bcbc 100644 --- a/examples/python/grib_samples.py +++ b/examples/python/grib_samples.py @@ -9,8 +9,8 @@ # nor does it submit to any jurisdiction. # -import traceback import sys +import traceback from eccodes import * diff --git a/examples/python/grib_set_bitmap.py b/examples/python/grib_set_bitmap.py index d7e7f1ec6..0d8b73015 100644 --- a/examples/python/grib_set_bitmap.py +++ b/examples/python/grib_set_bitmap.py @@ -7,8 +7,10 @@ # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. from __future__ import print_function -import traceback + import sys +import traceback + from eccodes import * INPUT = '../../data/regular_latlon_surface.grib1' diff --git a/examples/python/grib_set_keys.py b/examples/python/grib_set_keys.py index c48edc84d..b741f1e12 100644 --- a/examples/python/grib_set_keys.py +++ b/examples/python/grib_set_keys.py @@ -13,12 +13,13 @@ # from __future__ import print_function -import traceback + import sys +import traceback +from collections import OrderedDict +from datetime import date from eccodes import * -from datetime import date -from collections import OrderedDict INPUT = '../../data/regular_latlon_surface_constant.grib1' OUTPUT = 'out.set.grib' diff --git a/examples/python/grib_set_missing.py b/examples/python/grib_set_missing.py index 703977b8f..dcf25d99f 100644 --- a/examples/python/grib_set_missing.py +++ b/examples/python/grib_set_missing.py @@ -9,8 +9,8 @@ # nor does it submit to any jurisdiction. # -import traceback import sys +import traceback from eccodes import * diff --git a/examples/python/grib_set_pv.py b/examples/python/grib_set_pv.py index e85f174e7..f08f67bfc 100644 --- a/examples/python/grib_set_pv.py +++ b/examples/python/grib_set_pv.py @@ -9,8 +9,8 @@ # nor does it submit to any jurisdiction. # -import traceback import sys +import traceback from eccodes import * diff --git a/examples/python/gts_get_keys.py b/examples/python/gts_get_keys.py index 1c9932889..2404b3100 100644 --- a/examples/python/gts_get_keys.py +++ b/examples/python/gts_get_keys.py @@ -14,8 +14,9 @@ # from __future__ import print_function -import traceback + import sys +import traceback from eccodes import * diff --git a/examples/python/keys_iterator_gts.py b/examples/python/keys_iterator_gts.py index 409546e8a..28f8fdeac 100644 --- a/examples/python/keys_iterator_gts.py +++ b/examples/python/keys_iterator_gts.py @@ -10,8 +10,9 @@ # from __future__ import print_function -import traceback + import sys +import traceback from eccodes import * diff --git a/examples/python/metar_get_keys.py b/examples/python/metar_get_keys.py index 292b82450..e9fa1fb52 100644 --- a/examples/python/metar_get_keys.py +++ b/examples/python/metar_get_keys.py @@ -15,8 +15,9 @@ # from __future__ import print_function -import traceback + import sys +import traceback from eccodes import * diff --git a/examples/python/prepBufr_create_defs.py b/examples/python/prepBufr_create_defs.py index 05aeb52c2..9a725b2c4 100644 --- a/examples/python/prepBufr_create_defs.py +++ b/examples/python/prepBufr_create_defs.py @@ -7,11 +7,11 @@ # granted to it by virtue of its status as an intergovernmental organisation # nor does it submit to any jurisdiction. -import traceback -import sys +import getopt import os import re -import getopt +import sys +import traceback from eccodes import * diff --git a/show_compile.sh b/experimental/show_compile.sh similarity index 100% rename from show_compile.sh rename to experimental/show_compile.sh diff --git a/src/grib_accessor_class_proj_string.c b/src/grib_accessor_class_proj_string.c index cc6f017b7..0dfca41bb 100644 --- a/src/grib_accessor_class_proj_string.c +++ b/src/grib_accessor_class_proj_string.c @@ -203,6 +203,16 @@ static int proj_regular_latlon(grib_handle* h, char* result) static int proj_space_view(grib_handle* h, char* result) { return GRIB_NOT_IMPLEMENTED; +#if 0 + int err = 0; + char shape[64] = {0,}; + + if ((err = get_earth_shape(h, shape)) != GRIB_SUCCESS) + return err; + /* Experimental: For now do the same as gdalsrsinfo - hard coded values! */ + sprintf(result, "+proj=geos +lon_0=0 +h=35785831 +x_0=0 +y_0=0 %s", shape); + return err; +#endif } static int proj_albers(grib_handle* h, char* result) { diff --git a/src/grib_iterator_class_space_view.c b/src/grib_iterator_class_space_view.c index d939030e7..bbfc6d366 100644 --- a/src/grib_iterator_class_space_view.c +++ b/src/grib_iterator_class_space_view.c @@ -97,6 +97,48 @@ static int next(grib_iterator* i, double* lat, double* lon, double* val) return 1; } +#if 0 +static void adjustBadlyEncodedEcmwfGribs(grib_handle* h, + long* nx, long* ny, double* dx, double* dy, double* xp, double* yp) +{ + /* Correct the information provided in the headers of certain satellite imagery that + * we have available. This is specific to ECMWF. + * Obtained through trial-and-error to get the best match with the coastlines. + * + * Copied from Magics GribSatelliteInterpretor::AdjustBadlyEncodedGribs() + */ + long centre = 0; + int err = grib_get_long(h, "centre", ¢re); + if (!err && centre == 98) { + int err1 = 0, err2 = 0, err3 = 0; + long satelliteIdentifier, channelNumber, functionCode; + /* These keys are defined in the ECMWF local definition 24 - Satellite image simulation */ + err1 = grib_get_long(h, "satelliteIdentifier", &satelliteIdentifier); + err2 = grib_get_long(h, "channelNumber", &channelNumber); + err3 = grib_get_long(h, "functionCode", &functionCode); + if (!err1 && !err2 && !err3) { + if (satelliteIdentifier == 54 && channelNumber == 2 && *dx == 1179) { /* Meteosat 7, channel 2 */ + *nx = *ny = 900; + *dx = *dy = 853; + *xp = *yp = 450; + } + else if (satelliteIdentifier == 54 && channelNumber == 3 && *dx == 1179) { /* Meteosat 7, channel 3 */ + *dx = *dy = 1184; + *xp = *yp = 635; + } + else if (satelliteIdentifier == 259 && channelNumber == 4 && *dx == 1185) { /* GOES-15 (West) channel 4 */ + *dx = *dy = 880; + *xp = *yp = 450; + } + else if (satelliteIdentifier == 57 && *dx == 1732) { /* MSG (Meteosat second generation), non-HRV channels */ + *dx = *dy = 1811; + *xp = *yp = 928; + } + } + } +} +#endif + #define RAD2DEG 57.29577951308232087684 /* 180 over pi */ #define DEG2RAD 0.01745329251994329576 /* pi over 180 */ @@ -115,7 +157,7 @@ static int init(grib_iterator* iter, grib_handle* h, grib_arguments* args) long Xo, Yo, jScansPositively, jPointsAreConsecutive, i; double major = 0, minor = 0, r_eq, r_pol, height; - double lap, lop, orient_angle, angular_size; + double lap, lop, angular_size; double xp, yp, dx, dy, rx, ry, x, y; double cos_x, cos_y, sin_x, sin_y; double factor_1, factor_2, tmp1, Sd, Sn, Sxy, S1, S2, S3; @@ -212,27 +254,33 @@ static int init(grib_iterator* iter, grib_handle* h, grib_arguments* args) else { r_eq = r_pol = radius * 0.001; /*conv to km*/ } + + if (nrInRadiusOfEarth == 0) { + grib_context_log(h->context, GRIB_LOG_ERROR, "Key %s must be greater than zero", sNrInRadiusOfEarth); + return GRIB_GEOCALCULUS_PROBLEM; + } + angular_size = 2.0 * asin(1.0 / nrInRadiusOfEarth); height = nrInRadiusOfEarth * r_eq; lap = latOfSubSatellitePointInDegrees; lop = lonOfSubSatellitePointInDegrees; - lap *= 1e-6; /* default scaling factor */ - lop *= 1e-6; if (lap != 0.0) return GRIB_NOT_IMPLEMENTED; - /*lap *= DEG2RAD;*/ - lop *= DEG2RAD; - orient_angle = orientationInDegrees; - if (orient_angle != 0.0) - return GRIB_NOT_IMPLEMENTED; + /*orient_angle = orientationInDegrees;*/ + /* if (orient_angle != 0.0) return GRIB_NOT_IMPLEMENTED; */ xp = xpInGridLengths; yp = ypInGridLengths; x0 = Xo; y0 = Yo; + /* adjustBadlyEncodedEcmwfGribs(h, &nx, &ny, &dx, &dy, &xp, &yp); */ + if (dx == 0 || dy == 0) { + grib_context_log(h->context, GRIB_LOG_ERROR, "Keys %s and %s must be greater than zero", sDx, sDy); + return GRIB_GEOCALCULUS_PROBLEM; + } rx = angular_size / dx; ry = (r_pol / r_eq) * angular_size / dy; diff --git a/src/grib_util.c b/src/grib_util.c index 125e44828..18c6ab61c 100644 --- a/src/grib_util.c +++ b/src/grib_util.c @@ -1038,7 +1038,8 @@ grib_handle* grib_util_set_spec2(grib_handle* h, setSecondOrder = 1; break; default: - fprintf(stderr, "invalid packing_spec->packing_type = %ld\n", (long)packing_spec->packing_type); + fprintf(stderr, "GRIB_UTIL_SET_SPEC: invalid packing_spec->packing_type (%ld)\n", + (long)packing_spec->packing_type); *err = GRIB_INTERNAL_ERROR; goto cleanup; break; @@ -1062,7 +1063,7 @@ grib_handle* grib_util_set_spec2(grib_handle* h, break; default: - fprintf(stderr, "invalid packing_spec->accuracy = %ld\n", (long)packing_spec->accuracy); + fprintf(stderr, "GRIB_UTIL_SET_SPEC: invalid packing_spec->accuracy (%ld)\n", (long)packing_spec->accuracy); *err = GRIB_INTERNAL_ERROR; goto cleanup; break; @@ -1079,7 +1080,7 @@ grib_handle* grib_util_set_spec2(grib_handle* h, } if ((*err = grib_set_values(h, values, count)) != 0) { - fprintf(stderr, "GRIB_UTIL_SET_SPEC: Cannot set values %s\n", grib_get_error_message(*err)); + fprintf(stderr, "GRIB_UTIL_SET_SPEC: Cannot set values: %s\n", grib_get_error_message(*err)); for (i = 0; i < count; i++) if (values[i].error) fprintf(stderr, " %s %s\n", values[i].name, grib_get_error_message(values[i].error)); goto cleanup; @@ -1144,16 +1145,14 @@ grib_handle* grib_util_set_spec2(grib_handle* h, } /* flags & GRIB_UTIL_SET_SPEC_FLAGS_ONLY_PACKING */ grid_type = get_grid_type_name(spec->grid_type); - if (grid_type == NULL) { - fprintf(stderr, "GRIB_UTIL_SET_SPEC: Unknown grid type: %d\n", spec->grid_type); + if (!grid_type) { + fprintf(stderr, "GRIB_UTIL_SET_SPEC: Unknown spec.grid_type (%d)\n", spec->grid_type); *err = GRIB_NOT_IMPLEMENTED; return NULL; } - SET_STRING_VALUE("gridType", grid_type); /* The "pl" is given from the template, but "section_copy" will take care of setting the right headers */ - { switch (spec->grid_type) { case GRIB_UTIL_GRID_SPEC_REDUCED_GG: @@ -1169,10 +1168,9 @@ grib_handle* grib_util_set_spec2(grib_handle* h, case GRIB_UTIL_GRID_SPEC_UNSTRUCTURED: if (editionNumber == 1) { /* This grid type is not available in edition 1 */ if (h->context->debug == -1) - fprintf(stderr, - "ECCODES DEBUG grib_util: '%s' specified " - "but input is GRIB1. Output must be a higher edition!\n", - grid_type); + fprintf(stderr, "ECCODES DEBUG grib_util: '%s' specified " + "but input is GRIB1. Output must be a higher edition!\n", + grid_type); convertEditionEarlier = 1; } sprintf(sample_name, "GRIB%ld", editionNumber); @@ -1186,7 +1184,7 @@ grib_handle* grib_util_set_spec2(grib_handle* h, if (spec->pl && spec->grid_name) { /* Cannot have BOTH pl and grid name specified */ - fprintf(stderr, "GRIB_UTIL_SET_SPEC: Cannot set BOTH pl and grid_name.\n"); + fprintf(stderr, "GRIB_UTIL_SET_SPEC: Cannot set BOTH spec.pl and spec.grid_name!\n"); goto cleanup; } if (spec->grid_name) { @@ -1444,7 +1442,7 @@ grib_handle* grib_util_set_spec2(grib_handle* h, setSecondOrder = 1; break; default: - fprintf(stderr, "invalid packing_spec->packing_type = %ld\n", (long)packing_spec->packing_type); + fprintf(stderr, "GRIB_UTIL_SET_SPEC: invalid packing_spec.packing_type (%ld)\n", (long)packing_spec->packing_type); *err = GRIB_INTERNAL_ERROR; goto cleanup; break; @@ -1498,7 +1496,7 @@ grib_handle* grib_util_set_spec2(grib_handle* h, break; default: - fprintf(stderr, "invalid packing_spec->accuracy = %ld\n", (long)packing_spec->accuracy); + fprintf(stderr, "GRIB_UTIL_SET_SPEC: invalid packing_spec.accuracy (%ld)\n", (long)packing_spec->accuracy); grib_handle_delete(h_sample); *err = GRIB_INTERNAL_ERROR; goto cleanup; @@ -1539,24 +1537,25 @@ grib_handle* grib_util_set_spec2(grib_handle* h, /* GRIB-857: Set "pl" array if provided (For reduced Gaussian grids) */ Assert(spec->pl_size >= 0); if (spec->pl && spec->pl_size == 0) { - fprintf(stderr, "pl array not NULL but pl_size == 0!\n"); + fprintf(stderr, "GRIB_UTIL_SET_SPEC: pl array not NULL but pl_size == 0!\n"); goto cleanup; } if (spec->pl_size > 0 && spec->pl == NULL) { - fprintf(stderr, "pl_size not zero but pl array == NULL!\n"); + fprintf(stderr, "GRIB_UTIL_SET_SPEC: pl_size not zero but pl array == NULL!\n"); goto cleanup; } if (spec->pl_size != 0 && (spec->grid_type == GRIB_UTIL_GRID_SPEC_REDUCED_GG || spec->grid_type == GRIB_UTIL_GRID_SPEC_REDUCED_ROTATED_GG)) { *err = grib_set_long_array(h_out, "pl", spec->pl, spec->pl_size); if (*err) { - fprintf(stderr, "SET_GRID_DATA_DESCRIPTION: Cannot set pl %s\n", grib_get_error_message(*err)); + fprintf(stderr, "GRIB_UTIL_SET_SPEC: Cannot set pl: %s\n", grib_get_error_message(*err)); goto cleanup; } if (global_grid) { size_t sum = sum_of_pl_array(spec->pl, spec->pl_size); if (data_values_count != sum) { - fprintf(stderr, "invalid reduced gaussian grid: specified as global, data_values_count=%ld but sum of pl array=%ld\n", + fprintf(stderr, "GRIB_UTIL_SET_SPEC: invalid reduced gaussian grid: " + "specified as global, data_values_count=%ld but sum of pl array=%ld\n", (long)data_values_count, (long)sum); *err = GRIB_WRONG_GRID; goto cleanup; @@ -1573,7 +1572,7 @@ grib_handle* grib_util_set_spec2(grib_handle* h, /* Apply adjustments to bounding box if needed */ if (expandBoundingBox) { if ((*err = expand_bounding_box(h_out, values, count)) != 0) { - fprintf(stderr, "SET_GRID_DATA_DESCRIPTION: Cannot expand bounding box: %s\n", grib_get_error_message(*err)); + fprintf(stderr, "GRIB_UTIL_SET_SPEC: Cannot expand bounding box: %s\n", grib_get_error_message(*err)); if (h->context->write_on_fail) grib_write_message(h_out, "error.grib", "w"); goto cleanup; @@ -1674,7 +1673,7 @@ grib_handle* grib_util_set_spec2(grib_handle* h, grib_set_string(h_out, "packingType", "grid_second_order", &slen); *err = grib_set_double_array(h_out, "values", data_values, data_values_count); if (*err != GRIB_SUCCESS) { - fprintf(stderr, "GRIB_UTIL_SET_SPEC: setting data values failed! %s\n", grib_get_error_message(*err)); + fprintf(stderr, "GRIB_UTIL_SET_SPEC: setting data values failed: %s\n", grib_get_error_message(*err)); goto cleanup; } } @@ -1729,7 +1728,7 @@ grib_handle* grib_util_set_spec2(grib_handle* h, } if ((*err = check_geometry(h_out, spec, data_values_count, global_grid)) != GRIB_SUCCESS) { - fprintf(stderr, "GRIB_UTIL_SET_SPEC: Geometry check failed! %s\n", grib_get_error_message(*err)); + fprintf(stderr, "GRIB_UTIL_SET_SPEC: Geometry check failed: %s\n", grib_get_error_message(*err)); if (h->context->write_on_fail) grib_write_message(h_out, "error.grib", "w"); goto cleanup; @@ -1739,7 +1738,7 @@ grib_handle* grib_util_set_spec2(grib_handle* h, #if 0 if ( (*err = check_handle_against_spec(h_out, editionNumber, spec, global_grid)) != GRIB_SUCCESS) { grib_context* c=grib_context_get_default(); - fprintf(stderr,"GRIB_UTIL_SET_SPEC: Geometry check failed! %s\n", grib_get_error_message(*err)); + fprintf(stderr,"GRIB_UTIL_SET_SPEC: Geometry check failed: %s\n", grib_get_error_message(*err)); if (editionNumber == 1) { fprintf(stderr,"Note: in GRIB edition 1 latitude and longitude values cannot be represented with sub-millidegree precision.\n"); } diff --git a/tests/grib_grid_space_view.sh b/tests/grib_grid_space_view.sh index 07f1853bb..71a1d0008 100755 --- a/tests/grib_grid_space_view.sh +++ b/tests/grib_grid_space_view.sh @@ -15,9 +15,10 @@ tempFilter="temp.${label}.filt" tempGrib="temp.${label}.grib" tempOut="temp.${label}.out" +# ----------- +# GRIB2 +# ----------- input=$ECCODES_SAMPLES_PATH/GRIB2.tmpl - -# Create a filter cat > $tempFilter < $tempOut ${tools_dir}/grib_ls -l 50,0 $tempGrib +# ----------- +# GRIB1 +# ----------- +input=$ECCODES_SAMPLES_PATH/GRIB1.tmpl +cat > $tempFilter < $tempOut + # Clean up rm -f $tempFilter $tempGrib $tempOut