/[MITgcm]/MITgcm/pkg/ptracers/ptracers_statvars.F
ViewVC logotype

Annotation of /MITgcm/pkg/ptracers/ptracers_statvars.F

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


Revision 1.2 - (hide annotations) (download)
Fri Jun 27 01:56:17 2003 UTC (20 years, 11 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint51j_post, branchpoint-genmake2, checkpoint51e_post, checkpoint51b_post, checkpoint51c_post, checkpoint51f_pre, checkpoint51h_pre, checkpoint51g_post, checkpoint51f_post, checkpoint51d_post, checkpoint51i_pre
Branch point for: branch-genmake2
Changes since 1.1: +6 -4 lines
o disentangled ALLOW_PTRACERS using new ALLOW_GCHEM
o made ptracers_forcing same as external_forcing_s

1 stephd 1.1 cswdptr -- added routine ---
2     #include "CPP_OPTIONS.h"
3 heimbach 1.2 #include "PTRACERS_OPTIONS.h"
4     #ifdef ALLOW_GCHEM
5     # include "GCHEM_OPTIONS.h"
6     #endif
7 stephd 1.1
8     SUBROUTINE PTRACERS_STATVARS(
9     I myTime, myIter, bi, bj, myThid)
10     C /==========================================================\
11     C | SUBROUTINE PTRACERS_STATVARS |
12     C | o Time averaging routine for PTRACERS |
13     C | in model main time-stepping |
14     C \==========================================================/
15     IMPLICIT NONE
16    
17     C == Global variables ===
18     #include "SIZE.h"
19     #include "EEPARAMS.h"
20     #include "PARAMS.h"
21     #include "DYNVARS.h"
22     #include "GRID.h"
23     #include "TIMEAVE_STATV.h"
24     #ifdef ALLOW_PTRACERS
25 heimbach 1.2 # include "PTRACERS.h"
26     # include "PTRACERS_STATV.h"
27 stephd 1.1 #endif
28    
29     LOGICAL DIFFERENT_MULTIPLE
30     EXTERNAL DIFFERENT_MULTIPLE
31    
32     C == Routine arguments ==
33     C myThid - Thread number for this instance of the routine.
34     C myIter - Iteration number
35     C myTime - Current time of simulation ( s )
36     INTEGER myThid
37     INTEGER myIter, bi, bj
38     _RL myTime
39    
40     #ifdef ALLOW_PTRACERS
41     #ifdef ALLOW_TIMEAVE
42    
43     C == Local variables ==
44     INTEGER iTracer, k
45     _RL DDTT
46    
47     C- Initialize fields for the first call ever
48     IF ( myIter .EQ. nIter0 ) THEN
49     do iTracer=1,PTRACERS_numInUse
50     CALL TIMEAVE_RESET(ptracertave(1-Olx,1-Oly,1,1,1,iTracer),
51     & Nr, bi, bj, myThid)
52     enddo
53     DO K=1,Nr
54     ptracer_half(k,bi,bj)=0.
55     ENDDO
56     ENDIF
57    
58     C-- Cumulate state-variables with Half or Full time step :
59     IF ( myIter .EQ. nIter0 .OR.
60     & DIFFERENT_MULTIPLE(taveFreq, myTime, myTime-deltaTClock)) THEN
61     DDTT=0.5*deltaTclock
62     ELSE
63     DDTT=deltaTclock
64     ENDIF
65    
66     C- Time Averages of single fields (no hFactor)
67     do iTracer=1,PTRACERS_numInUse
68     CALL TIMEAVE_CUMULATE(ptracertave(1-Olx,1-Oly,1,1,1,iTracer),
69     & ptracer(1-Olx,1-Oly,1,1,1,iTracer),
70     & Nr, DDTT, bi, bj, myThid)
71     enddo
72    
73     C- Keep record of how much time has been integrated over
74     DO K=1,Nr
75     ptracer_half(k,bi,bj)=ptracer_half(k,bi,bj)+DDTT
76     ENDDO
77    
78    
79    
80    
81     #endif /* ALLOW_TIMEAVE */
82     #endif
83    
84     RETURN
85     END

  ViewVC Help
Powered by ViewVC 1.1.22