Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Periodically we receive reports of negative precipitation totals being computed from IFS output in GRIB.  Although such reports often refer to "negative precipitation accumulation", the same issue can affect any accumulated fieldfield accumulated from the start of the forecast and small but spurious positive accumulations are also possible.   Positive accumulations can lead to small increases in, say, solar radiation during night time hours when a zero increase is expected.  This page explains both why this occurs and the circumstances in which it occurs.

The effect is often blamed on the interpolation.  However, it is a side-effect of the GRIB packing and can also occur when the field is stored on the native model octahedral reduced Gaussian grid.

Note
iconfalse

Note that the problem described here affects only fields accumulated from the start of the forecast

.In particular, the ERA5 short forecast accumulations should not suffer from the same problem  because they are packed and archived as accumulations since the previous post processing (archiving) step  i.e. they are already de-accumulated before packing. 



GRIB packing discretises the values

...

The packing error depends on the range of values vafieldslues and the number of bits per value used to pack the values.

Packing error increases with increasing range of values

The issue for accumulated fields accumulated  from the start of the forecast is that the packing parameters - and hence the discretisation and the packing error - change as the range of values increases.  Because the bits per value remains constant, the effect is to increase the packing error by a factor of two periodically as the range increases.  This is illustrated in the figure Figure 1 below which shows how the packing error (the red line) increases as the values of the sunshine duration field increase throughout a 10-day forecast

Image Modified

Figure 1

Figure 1

The plot

on the left shows how the packing error (red line) increases as the range of values of the sunshine duration field (blue line) increases throughout at 10-day forecast.

Each time the range of values increases by a factor of two (indicated by the points where the blue line crosses the horizontal dashed lines) the packing error also increases by a factor of two.

Although the packing error is less than 1 second in the first 24 hours of the forecast, it is 8 seconds by the end of the forecast.


Packed values depend on the packing error

The increase in packing error also has an effect on the packed values themselves.  This is illustrated in the diagrams below.

Figure 2(a)In this case, the packing error=0.5 (represented by the green boxes) and hence  values are packed to the nearest 1.0.

Note that the true "exact model" values represented at the top are not stored exactly.  The value 291.7 yields the decoded value 292.0 on unpacking whereas 297.4 becomes 297.0 on unpacking. 

Figure 2(b): At some point as the range of values increases, the packing error increases by a factor of two.  In this case, the packing error=1.0 and so values are packed to the nearest 2.0. 

Here we see that a true input value of 294.6 which yields a decoded value of 295.0 on unpacking in case (a) yields the lower decoded value of 294.0 even though the true input value is unchanged.

Similarly, the true input value of 297.4 which yields a decoded value of 297.0 on unpacking in the case shown in Figure 1(a) yields a higher decoded value of 298.0 in the  case illustrated in Figure 2(b)


How small spurious negative - and positive - values appear when de-accumulating an accumulated field

The example below for a small grid of 9 points shows how the packing error and hence the packed values change as the range of the values increases.  The deaccumulated packed values are the difference between the packed values at the current step and those at the previous step.  Here, a "step" can be considered as any time step where the data has been stored, and hence packed, in GRIB. Typically, this will be a forecast time step in hours.

Step=0

Accumulated
model
values
Accumulated
packed
GRIB values
Deaccumulated
packed values
packing error


0.000000.000000.00000
0.000000.000000.00000
0.000000.000000.00000



0.000000.000000.00000
0.000000.000000.00000
0.000000.000000.00000





...

Accumulated
model
values
Accumulated
packed
GRIB values
Deaccumulated
packed values
packing error


0.000001.5000040.00000
3.250004.550005.90000
2.200000.031252.00000



0.000001.5000040.00000
3.250004.500006.00000
2.250000.000002.00000



0.000000.0000020.00000
0.000000.000000.12500
0.000000.000000.00000


0.12500
  • The Again only the model value at the north east point increases further from 20.0 to 40.0Model values at all other points remain the same as at step=3
  • The increase in the range of values increases the packing error.
  • Now all packed values are multiples of 2*packing error=0.25
  • The model value at the eastern point is unchanged at 5.9 but now its packed value is 6.0 giving an apparent positive accumulation  of +0.125

...

For accumulated fields, such as precipitation, the GRIB packing can have a strange affect on the totals, even when the data are used on the native model reduced Gaussian grid.  In some cases, the values concerned are sufficiently small that the issue can be ignored, but for others - for example when looking at the frequency of zero rain, or light drizzle on forecast day 10 - action is needed. The figures below highlight the issue is and its impacts:

Image Modified

Figure 3(a): Illustration of discretisation levels in 12h precipitation totals calculated for one ENS forecast control run - refer also to annotationshowing the correspondence between the lead times where negative precipitation accumulations occur (red points) and the points where the packing error, and hence the discretisation of the field, changes (indicated by the "step" changes in the blue line).  The negative accumulations occur due to the subtraction of values from two different levels of descritisation. The example shown is for total precipitation from  a 10-day ENS forecast control run.

Figure 3(b): (b) Ambiguity in identifying zero rain areas on day 10 in one example ENS forecast control run (see legend)

On the map plot example in Figure 3(b) one can see that a large part of the world (blue & pink areas) is affected by the issue.  The graph in Figure 3(a) shows how the capacity of the model output to represent small values in 12h (or indeed any) periods diminishes at longer lead times. The discretisation will naturally be worse at the end of, say, the monthly forecast. This also means that the total areas of zero rain in a given period will become larger as the forecast progresses, purely because of the GRIB packing.

...