Global masked summation over domain for 2D array

Dear All,

I am trying to code some diagnostic in Nemo, and for that I need to do mpp_sum on a 2D array.
Meaning that mpp_sum would need to sum each member i,j of the array separately among all the processors. But I cannot find an example on how to do that, would have any idea ?

Thanks for your help,

Robinson

You have to use the function glob_sum to do that. There is several examples in src/OCE/DIA/diaar5.F90. The function itself is coded in src/OCE/lib_fortran.F90 and src/OCE/lib_fortran_generic.h90.

1 Like