SUM_GRID
This is part of the gridtools module

Sum the values of all the function at the points on a grid

Examples
Glossary of keywords and components
Description of components

By default the value of the calculated quantity can be referenced elsewhere in the input file by using the label of the action. Alternatively this Action can be used to calculate the following quantities by employing the keywords listed below. These quantities can be referenced elsewhere in the input by using this Action's label followed by a dot and the name of the quantity required from the list below.

Quantity Description
.#!value the sum of the value of the function over all the grid points where it has been evaluated
Compulsory keywords
PERIODIC if the output of your function is periodic then you should specify the periodicity of the function. If the output is not periodic you must state this using PERIODIC=NO
ARG the label of the function on a grid from which we are computing a sum
Options
SERIAL

( default=off ) do the calculation in serial. Do not parallelize