source: trunk/LMDZ.PLUTO/libf/phypluto/globalaverage2d.F90 @ 3380

Last change on this file since 3380 was 3247, checked in by afalco, 9 months ago

Added missing files from pluto.old

File size: 1.1 KB
RevLine 
[3247]1      subroutine globalaverage2d(ngrid,var,globaverage2d)
2
3      use comgeomfi_h   
4      use geometry_mod, only: cell_area
5      implicit none
6
7!==================================================================
8!     Purpose
9!     -------
10
11!     Inputs
12!     ------
13!     ngrid                 Number of vertical columns
14!
15!     Authors
16!     -------
17!     Tanguy Bertrand 2015
18!     
19!==================================================================
20
21#include "dimensions.h"
22
23!-----------------------------------------------------------------------
24!     Arguments
25      INTEGER ngrid
26      REAL var(ngrid)
27
28      ! LOCAL VARIABLES
29      INTEGER ig
30
31      ! OUTPUT
32      REAL globaverage2d
33!-----------------------------------------------------------------------
34
35      globaverage2d = 0.d0
36      DO ig=2,ngrid-1
37           globaverage2d = globaverage2d + var(ig)*cell_area(ig)
38      END DO
39      globaverage2d = globaverage2d + var(1)*cell_area(1)*iim
40      globaverage2d = globaverage2d + var(ngrid)*cell_area(ngrid)*iim
41      globaverage2d = globaverage2d/(totarea+(cell_area(1)+cell_area(ngrid))*(iim-1))
42
43      end subroutine globalaverage2d
44
Note: See TracBrowser for help on using the repository browser.