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

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

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


Revision 1.1 - (hide annotations) (download)
Mon Mar 4 19:01:29 2002 UTC (22 years, 3 months ago) by adcroft
Branch: MAIN
CVS Tags: checkpoint46b_post, checkpoint48f_post, checkpoint46k_post, checkpoint47j_post, checkpoint48d_pre, branch-exfmods-tag, checkpoint47e_post, checkpoint44h_pre, checkpoint47i_post, checkpoint48i_post, checkpoint46j_post, checkpoint47f_post, checkpoint48d_post, checkpoint47c_post, checkpoint50e_post, checkpoint50c_post, checkpoint47d_post, checkpoint47a_post, checkpoint46c_post, checkpoint46f_post, checkpoint46a_post, checkpoint48a_post, checkpoint46n_post, checkpoint46d_pre, checkpoint48e_post, checkpoint46e_post, checkpoint48h_post, checkpoint50c_pre, checkpoint44g_post, checkpoint46h_pre, checkpoint44h_post, checkpoint46l_post, checkpoint46e_pre, checkpoint50d_pre, checkpoint45d_post, checkpoint46j_pre, checkpoint45b_post, checkpoint46b_pre, checkpoint47h_post, checkpoint48c_post, checkpoint50b_pre, checkpoint46, checkpoint48, checkpoint49, checkpoint44f_post, checkpoint47b_post, checkpoint48g_post, checkpoint46l_pre, checkpoint51, checkpoint50, checkpoint50d_post, checkpoint46m_post, checkpoint46g_pre, checkpoint47g_post, checkpoint46a_pre, checkpoint50g_post, checkpoint45c_post, checkpoint46d_post, checkpoint48b_post, checkpoint50b_post, checkpoint46g_post, checkpoint45a_post, checkpoint50f_post, checkpoint50a_post, checkpoint46c_pre, checkpoint50f_pre, checkpoint47d_pre, checkpoint48c_pre, checkpoint46i_post, checkpoint47, checkpoint50h_post, checkpoint45, checkpoint46h_post, checkpoint50e_pre, checkpoint50i_post
Branch point for: ecco-branch, branch-exfmods-curt
Added PTRACERS package

This allows an arbitrary number of passive tracers to be integrated
forward simultaneously with the dynamicaly model.
 + Implemented so far:
    - basic forward algorithm (time-stepping, advection, diffusion, convection)
    - I/O and checkpointing
    - GM/Redi  *but*  using the GM/Redi coefficient of Salt
 + Not implemented so far:
    - KPP
    - OBCS
 + No specific example supplied (yet) but global_ocean.90x40x15 has the
   necessary data.ptracer file. Simply use -enable=ptracers and uncomment
   line in data.pkg. PTRACER01 then reproduces Salt exactly.
 + This package is disabled by default since it increases storage.

1 adcroft 1.1 C $Header: $
2     C $Name: $
3    
4     #include "PTRACERS_OPTIONS.h"
5    
6     CBOP
7     C !ROUTINE: PTRACERS_INIT
8    
9     C !INTERFACE: ==========================================================
10     SUBROUTINE PTRACERS_INIT( myThid )
11    
12     C !DESCRIPTION:
13     C Initialize PTRACERS data structures
14    
15     C !USES: ===============================================================
16     IMPLICIT NONE
17     #include "SIZE.h"
18     #include "EEPARAMS.h"
19     #include "PARAMS.h"
20     #include "PTRACERS.h"
21    
22     C !INPUT PARAMETERS: ===================================================
23     C myThid :: thread number
24     INTEGER myThid
25    
26     C !OUTPUT PARAMETERS: ==================================================
27     C none
28    
29     #ifdef ALLOW_PTRACERS
30    
31     C !LOCAL VARIABLES: ====================================================
32     C i,j,k,bi,bj,iTracer :: loop indices
33     INTEGER i,j,k,bi,bj,iTracer
34     CEOP
35    
36     C Loop over tracers
37     DO iTracer = 1, PTRACERS_num
38    
39     C Loop over tiles
40     DO bj = myByLo(myThid), myByHi(myThid)
41     DO bi = myBxLo(myThid), myBxHi(myThid)
42    
43     C Initialize arrays in common blocks :
44     DO k=1,Nr
45     DO j=1-Oly,sNy+OLy
46     DO i=1-Olx,sNx+Olx
47     pTracer(i,j,k,bi,bj,iTracer) = 0.
48     gPtr(i,j,k,bi,bj,iTracer) = 0.
49     gPtrNM1(i,j,k,bi,bj,iTracer) = 0.
50     ENDDO
51     ENDDO
52     ENDDO
53    
54     #ifdef ALLOW_TIMEAVE
55     C Initialize averages to zero
56     c CALL TIMEAVE_RESET(GM_Kwx_T,Nr, bi,bj,myThid)
57     c CALL TIMEAVE_RESET(GM_Kwy_T,Nr, bi,bj,myThid)
58     c CALL TIMEAVE_RESET(GM_Kwz_T,Nr, bi,bj,myThid)
59     c DO k=1,Nr
60     c GM_TimeAve(k,bi,bj)=0.
61     c ENDDO
62     #endif /* ALLOW_TIMEAVE */
63    
64     C end bi,bj loops
65     ENDDO
66     ENDDO
67    
68     C end of Tracer loop
69     ENDDO
70    
71     C Now read initial conditions and always exchange
72     IF (nIter0.EQ.0) THEN
73     DO iTracer = 1, PTRACERS_numInUse
74     IF ( PTRACERS_initialFile(iTracer) .NE. ' ' ) THEN
75     _BEGIN_MASTER( myThid )
76     CALL READ_FLD_XYZ_RL(PTRACERS_initialFile(iTracer),' ',
77     & pTracer(1-Olx,1-Oly,1,1,1,iTracer) ,0,myThid)
78     _END_MASTER(myThid)
79     ENDIF
80     _EXCH_XYZ_R8(pTracer(1-Olx,1-Oly,1,1,1,iTracer),myThid)
81     ENDDO
82     ENDIF
83    
84     C Read from a pickup file if nIter0
85     IF (nIter0.NE.0) THEN
86     CALL PTRACERS_READ_CHECKPOINT( nIter0,myThid )
87     ENDIF
88    
89     #endif /* ALLOW_PTRACERS */
90    
91     RETURN
92     END

  ViewVC Help
Powered by ViewVC 1.1.22