The code below illustrates how it can be done by using Metview's built-in field arithmetic:
import metview as mv # read grib data into a Fieldset object f = mv.read("my_data.grib") # add up the values in first two fields point-by-point in their storage order. # No geographical locations are checked/matched. The fields must have the same # number of gridpoints. r = f[0] + f[1] # an alternative solution r = mv.sum(f[:2]) # the resulting object is Fieldset with one field only. We can save it to disk as # a GRIB file r.write("my_result.grib")
See also the other basic mathematical operators available for GRIB data: https://metview.readthedocs.io/en/latest/api/functions/math.html