...
When converting to JPEG packing with the Jasper library, there is an assertion JasPer library, you get the above assertion:
Code Block |
---|
% grib_set -s packingType=grid_jpeg input.grib2 output.grib2
grib_set: jpc_enc.c:186: jpc_abstorelstepsize: Assertion `!((expn) & (~0x1f))' failed.
Aborted (core dumped) |
This problem can also occur if you have an existing JPEG packed field and you wish to encode it with different values e.g. scaling all values up
Code Block |
---|
% grib_set -s scaleValuesBy=150 input.grib2 output.grib2 |
Solution
This is a problem in the Jasper library. Try to reduced It seems to be related to the number of bits per value of the input field.
Panel |
---|
|
Pick a decimal precision value that will avoid the assertion and preserves the required precision
grib_set -s setDecimalPrecision=4,packingType=grid_jpeg input.grib2 output.grib2 - Check the statistics before and after
grib_ls -n statistics input.grib2 grib_ls -n statistics output.grib2 - Compare the results
|
Related articles
...
Content by Label |
---|
showLabels | false |
---|
max | 5 |
---|
spaces | UDOC |
---|
showSpace | false |
---|
sort | modified |
---|
reverse | true |
---|
type | page |
---|
cql | label in ("grib","jpeg","jasper","packing") and label in ("grib","jpeg","packing") and label in ("encode","jpeg") and type = "page" and space = "UDOC" |
---|
labels | grib jpeg packing jasper |
---|
|
...