/[MITgcm]/MITgcm/pkg/dic/tracer_meanarea.F
ViewVC logotype

Annotation of /MITgcm/pkg/dic/tracer_meanarea.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.4 - (hide annotations) (download)
Thu Feb 12 16:11:46 2004 UTC (20 years, 4 months ago) by stephd
Branch: MAIN
CVS Tags: checkpoint53f_post, checkpoint52l_pre, hrcube4, checkpoint52n_post, checkpoint52j_post, checkpoint53d_post, checkpoint54a_pre, checkpoint53c_post, checkpoint52j_pre, checkpoint54a_post, checkpoint52l_post, checkpoint52k_post, checkpoint54b_post, checkpoint53b_pre, checkpoint54d_post, checkpoint52m_post, checkpoint53a_post, checkpoint54, checkpoint53b_post, checkpoint53, checkpoint53g_post, hrcube5, checkpoint53d_pre, checkpoint54c_post
Changes since 1.3: +11 -1 lines
o clean up and add extra documentation

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    

  ViewVC Help
Powered by ViewVC 1.1.22