/[MITgcm]/MITgcm_contrib/nesting_sannino/nest_child/nest_child_transp.F
ViewVC logotype

Annotation of /MITgcm_contrib/nesting_sannino/nest_child/nest_child_transp.F

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


Revision 1.3 - (hide annotations) (download)
Sun Nov 28 02:17:41 2010 UTC (15 years ago) by jmc
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +41 -61 lines
-move nesting arrays out of GRID.h into new header file "NEST_SHARED.h".
  (+ rename TRANSPORT_OVEST -> TRANSPORT_WEST )
-include NEST_CHILD_OPTIONS.h (instead of PACKAGES_CONFIG.h + CPP_OPTIONS.h)

1 jmc 1.3 C $Header: /u/gcmpack/MITgcm_contrib/nesting_sannino/nest_child/nest_child_transp.F,v 1.2 2009/10/23 19:44:03 sannino Exp $
2 heimbach 1.1 C $Name: $
3    
4 jmc 1.3 #include "NEST_CHILD_OPTIONS.h"
5 heimbach 1.1
6     CBOP
7     C !ROUTINE: NEST_CHILD_TRANSP
8     C !INTERFACE:
9     SUBROUTINE NEST_CHILD_TRANSP( myTime, myIter, myThid )
10    
11     C !DESCRIPTION: \bv
12     C *==================================================================
13     C | SUBROUTINE nest_child_transp
14     C | o Run the ocean model and, optionally, evaluate a cost function.
15     C *==================================================================
16     C \ev
17    
18     C !USES:
19     IMPLICIT NONE
20     C == Global variables ==
21     #include "SIZE.h"
22     #include "EEPARAMS.h"
23     #include "PARAMS.h"
24 jmc 1.3 #include "GRID.h"
25 heimbach 1.1 #include "DYNVARS.h"
26 jmc 1.3 #include "NEST_CHILD.h"
27     #include "NEST_SHARED.h"
28 heimbach 1.1
29     C !INPUT/OUTPUT PARAMETERS:
30     C == Routine arguments ==
31     C myTime :: time counter for this thread
32     C myIter :: iteration counter for this thread
33     C myThid :: thread number for this instance of the routine.
34     _RL myTime
35     INTEGER myIter
36     INTEGER myThid
37    
38     C !LOCAL VARIABLES:
39     C == Local variables ==
40     _RL Tr_T, Ar_T, Tr, Ar
41     _RL Tr_TW, Ar_TW
42     _RL Tr_TE, Ar_TE
43     INTEGER iG,jG,i,j,k,bi,bj
44     CEOP
45    
46     #ifdef ALLOW_DEBUG
47 jmc 1.3 IF (debugMode) CALL DEBUG_ENTER('NEST_CHILD_TRANSP',myThid)
48 heimbach 1.1 #endif
49    
50     Ar_TE = 0. _d 0
51     Tr_TE = 0. _d 0
52     Ar_TW = 0. _d 0
53     Tr_TW = 0. _d 0
54    
55 jmc 1.3 DO bj = myByLo(myThid), myByHi(myThid)
56     DO bi = myBxLo(myThid), myBxHi(myThid)
57     DO k=1,Nr
58 heimbach 1.1 DO J=1,sNy
59     DO I=1,sNx
60 jmc 1.3 iG = myXGlobalLo-1+(bi-1)*sNx+I
61     jG = myYGlobalLo-1+(bj-1)*sNy+J
62    
63     IF (Ig.EQ.1) THEN
64     Ar = drF(k)*hFacC(I,j,k,bi,bj)*dyG(I,j,bi,bj)
65     Ar_TW = Ar_TW + Ar
66     Tr_TW = Tr_TW + (Ar * uvel(I,J,K,bi,bj))
67     ENDIF
68    
69     IF (Ig.EQ.Nx) THEN
70     Ar = drF(k)*hFacC(I,j,k,bi,bj)*dyG(I,j,bi,bj)
71     Ar_TE = Ar_TE + Ar
72     Tr_TE = Tr_TE + (Ar * uvel(I,J,K,bi,bj))
73     ENDIf
74    
75 heimbach 1.1 ENDDO
76 jmc 1.3 ENDDO
77     ENDDO
78 heimbach 1.1 ENDDO
79     ENDDO
80    
81 jmc 1.3 _GLOBAL_SUM_RL( Ar_TE , myThid )
82     _GLOBAL_SUM_RL( Tr_TE , myThid )
83     _GLOBAL_SUM_RL( Ar_TW , myThid )
84     _GLOBAL_SUM_RL( Tr_TW , myThid )
85    
86     TRANSPORT_EAST = TRANSPORT_EAST + (Tr_Te)
87     TRANSPORT_WEST = TRANSPORT_WEST + (Tr_Tw)
88    
89     IF (PASSI.EQ.3) THEN
90     CALL NEST_CHILD_IO( myTime, myIter, myThid )
91     ENDIF
92    
93     TRANSPORT_EAST = 0. _d 0
94     TRANSPORT_WEST = 0. _d 0
95 heimbach 1.1
96     #ifdef ALLOW_DEBUG
97 jmc 1.3 IF (debugMode) CALL DEBUG_LEAVE('NEST_CHILD_TRANSP',myThid)
98 heimbach 1.1 #endif
99    
100     RETURN
101     END

  ViewVC Help
Powered by ViewVC 1.1.22