/[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.1 - (hide annotations) (download)
Wed Oct 21 00:00:29 2009 UTC (16 years, 2 months ago) by heimbach
Branch: MAIN
Initial checkin of two-way nesting code by
Sannino et al., Ocean Modeling, 2009

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     c-----------------------------------
80     iG = myXGlobalLo-1+(bi-1)*sNx+I
81     jG = myYGlobalLo-1+(bj-1)*sNy+J
82     c-----------------------------------------
83    
84     if (Ig.eq.1) then
85     Ar = drF(k)*hFacC(I,j,k,bi,bj)*dyG(I,j,bi,bj)
86     Ar_TW = Ar_TW + Ar
87     Tr_TW = Tr_TW + (Ar * uvel(I,J,K,bi,bj))
88     endif
89    
90     if (Ig.eq.Nx) then
91     Ar = drF(k)*hFacC(I,j,k,bi,bj)*dyG(I,j,bi,bj)
92     Ar_TE = Ar_TE + Ar
93     Tr_TE = Tr_TE + (Ar * uvel(I,J,K,bi,bj))
94     endif
95    
96     ENDDO
97     ENDDO
98     ENDDO
99     ENDDO
100     ENDDO
101    
102     c---------------------------
103     _GLOBAL_SUM_RL( Ar_TE , myThid )
104     _GLOBAL_SUM_RL( Tr_TE , myThid )
105     _GLOBAL_SUM_RL( Ar_TW , myThid )
106     _GLOBAL_SUM_RL( Tr_TW , myThid )
107    
108     c print*,'*** CHILD TRANSPORTS ***'
109     c print*,'TRANSPORT EST=',Tr_TE
110     c print*,' AREA EST=',Ar_TE
111     c print*,'TRANSPORT WEST=',Tr_TW
112     c print*,' AREA WEST=',Ar_TW
113     c---------------------------------
114     TRANSPORT_EST = TRANSPORT_EST + (Tr_Te)
115     TRANSPORT_OVEST = TRANSPORT_OVEST + (Tr_Tw)
116    
117     IF (PASSI.EQ.3) THEN
118     CALL NEST_CHILD_IO( myTime, myIter, myThid )
119     ENDIF
120    
121     TRANSPORT_EST = 0. _d 0
122     TRANSPORT_OVEST = 0. _d 0
123    
124     #ifdef ALLOW_DEBUG
125     IF ( debugLevel .GE. debLevB )
126     & CALL DEBUG_LEAVE('NEST_CHILD_TRANSP',myThid)
127     #endif
128    
129     RETURN
130     END

  ViewVC Help
Powered by ViewVC 1.1.22