da_get_2d_sum.inc

References to this file elsewhere.
1 subroutine da_get_2d_sum(var, name)
2 
3    !-----------------------------------------------------------------------
4    ! Purpose: TBD
5    !-----------------------------------------------------------------------
6 
7    implicit none
8 
9    real,             intent(in) :: var(ims:ime, jms:jme)
10    character(len=*), intent(in) :: name
11 
12    real :: partial, total
13 
14    if (trace_use) call da_trace_entry("da_get_2d_sum")
15 
16    partial = sum(var(its:ite,jts:jte)*var(its:ite,jts:jte))
17 
18    total = wrf_dm_sum_real( partial)
19 
20    write(unit=stdout, fmt='(3a, e24.14)') 'Square sum of <', trim(name), '>=', total
21 
22    if (trace_use) call da_trace_exit("da_get_2d_sum")
23 
24 end subroutine da_get_2d_sum
25 
26