1 |
edhill |
1.3 |
#include "DIC_OPTIONS.h" |
2 |
stephd |
1.1 |
#include "GCHEM_OPTIONS.h" |
3 |
|
|
|
4 |
|
|
C !INTERFACE: ========================================================== |
5 |
stephd |
1.2 |
SUBROUTINE TRACER_MEANAREA(myThid,tracer, kLev, |
6 |
stephd |
1.1 |
& gsm_tracer) |
7 |
stephd |
1.4 |
|
8 |
|
|
C !DESCRIPTION: |
9 |
|
|
C Calculate surface means of tracer |
10 |
|
|
|
11 |
|
|
C !USES: =============================================================== |
12 |
stephd |
1.1 |
IMPLICIT NONE |
13 |
|
|
#include "SIZE.h" |
14 |
|
|
#include "GRID.h" |
15 |
|
|
#include "DYNVARS.h" |
16 |
|
|
#include "EEPARAMS.h" |
17 |
|
|
#include "PARAMS.h" |
18 |
stephd |
1.4 |
|
19 |
stephd |
1.1 |
C !INPUT PARAMETERS: =================================================== |
20 |
|
|
C myThid :: thread number |
21 |
stephd |
1.2 |
INTEGER myThid |
22 |
stephd |
1.1 |
INTEGER kLev |
23 |
|
|
_RL tracer (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nR,nSx,nSy) |
24 |
stephd |
1.4 |
|
25 |
|
|
C !OUTPUT PARAMETERS: =================================================== |
26 |
|
|
C gcm_tracer :: surface mean of tracer |
27 |
stephd |
1.1 |
_RL gsm_tracer |
28 |
|
|
|
29 |
stephd |
1.4 |
C !LOCAL VARIABLES: ==================================================== |
30 |
stephd |
1.1 |
INTEGER i,j,bi,bj |
31 |
|
|
_RL sumarea |
32 |
stephd |
1.4 |
CEOP |
33 |
stephd |
1.1 |
|
34 |
|
|
_BEGIN_MASTER(myThid) |
35 |
|
|
|
36 |
|
|
sumarea= 0. _d 0 |
37 |
|
|
gsm_tracer= 0. _d 0 |
38 |
|
|
|
39 |
|
|
DO bj=myByLo(myThid),myByHi(myThid) |
40 |
|
|
DO bi=myBxLo(myThid),myBxHi(myThid) |
41 |
|
|
DO i=1,sNx |
42 |
|
|
DO j=1,sNy |
43 |
|
|
sumarea=sumarea+ |
44 |
|
|
& rA(i,j,bi,bj)*maskC(i,j,kLev,bi,bj) |
45 |
|
|
gsm_tracer=gsm_tracer+ |
46 |
|
|
& tracer(i,j,kLev,bi,bj)*rA(i,j,bi,bj)* |
47 |
|
|
& maskC(i,j,kLev,bi,bj) |
48 |
|
|
ENDDO |
49 |
|
|
ENDDO |
50 |
|
|
ENDDO |
51 |
|
|
ENDDO |
52 |
|
|
gsm_tracer=gsm_tracer/sumarea |
53 |
|
|
|
54 |
|
|
_END_MASTER(myThid) |
55 |
|
|
|
56 |
|
|
C-- Everyone else must wait |
57 |
|
|
_BARRIER |
58 |
|
|
|
59 |
|
|
|
60 |
|
|
RETURN |
61 |
|
|
END |
62 |
|
|
|