/[MITgcm]/MITgcm/pkg/ebm/ebm_zonalmean.F
ViewVC logotype

Annotation of /MITgcm/pkg/ebm/ebm_zonalmean.F

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


Revision 1.1 - (hide annotations) (download)
Fri May 14 21:10:34 2004 UTC (20 years ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint53b_post
Commiting new energy balance model to repository
o package is pkg/ebm
o verif. is verification/global_ocean_ebm
o references are in ebm_driver.F
Will need long integration testing.

1 heimbach 1.1 C $Header: $
2     C $Name: $
3    
4     #include "EBM_OPTIONS.h"
5    
6     SUBROUTINE EBM_ZONALMEAN( myTime, myIter, myThid )
7     C |==========================================================|
8     C | S/R CALCULATE ZONAL MEAN TEMPERATURE |
9     C |==========================================================|
10    
11     IMPLICIT NONE
12    
13     C === Global variables ===
14     #include "SIZE.h"
15     #include "EEPARAMS.h"
16     #include "PARAMS.h"
17     #include "DYNVARS.h"
18     #include "GRID.h"
19     #ifdef ALLOW_EBM
20     # include "EBM.h"
21     #endif
22    
23     C === Routine arguments ===
24     C myThid - Instance number for this innvocation
25     INTEGER myThid
26     INTEGER myIter
27     _RL myTime
28    
29     CEndOfInterface
30     C == Local variables ==
31     C I, J, K - Loop counters
32     C CountX_tile - number of ocean points in each latitude band on each tile
33     C maskC - Land/Ocean mask
34     C ZonalMean_tile - zonal temperature average on each tile
35    
36     #ifdef ALLOW_EBM
37    
38     INTEGER i, j, k, bi, bj
39     _RL CountX_tile(1-OLy:sNy+OLy,nSx,nSy)
40     _RL ZonalMean_tile(1-OLy:sNy+OLy, nSx, nSy)
41    
42     C-- Top layer only
43     k = 1
44    
45     c-- Initialise
46     DO j=1-OLy,sNy+OLy
47     ZonalMeanSST(j) = 0.0
48     CountX(j) = 0.0
49     ENDDO
50    
51     C-- Calculate the zonal mean
52     DO bj=myByLo(myThid),myByHi(myThid)
53     DO bi=myBxLo(myThid),myBxHi(myThid)
54     DO j = 1-OLy, sNy+OLy
55     CountX_tile(j,bi,bj) = 0.0
56     ZonalMean_tile(j,bi,bj) = 0.0
57     DO i=1,sNx
58     ZonalMean_tile(j,bi,bj) = ZonalMean_tile(j,bi,bj) +
59     & theta(i,j,k,bi,bj)
60     CountX_tile(j,bi,bj) = CountX_tile(j,bi,bj) +
61     & maskC(i,j,k,bi,bj)
62     ENDDO
63     ZonalMeanSST(j) = ZonalMeanSST(j) + ZonalMean_tile(j,bi,bj)
64     CountX(j) = CountX(j) + CountX_tile(j,bi,bj)
65     ENDDO
66     ENDDO
67     ENDDO
68    
69     DO j=1-OLy,sNy+OLy
70     IF ( CountX(j) .GT. 0.0) THEN
71     ZonalMeanSST(j) = ZonalMeanSST(j)/CountX(j)
72     ENDIF
73     ENDDO
74    
75     #endif /* ALLOW_EBM */
76    
77     RETURN
78     END
79    
80    
81    

  ViewVC Help
Powered by ViewVC 1.1.22