/[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.2 - (hide annotations) (download)
Fri Oct 23 19:44:03 2009 UTC (16 years, 1 month ago) by sannino
Branch: MAIN
Changes since 1.1: +23 -32 lines
commit updated files (bug-fixes plus clean-ups)

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

  ViewVC Help
Powered by ViewVC 1.1.22