/[MITgcm]/MITgcm/pkg/cost/cost_vector.F
ViewVC logotype

Annotation of /MITgcm/pkg/cost/cost_vector.F

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


Revision 1.5 - (hide annotations) (download)
Fri Aug 10 19:36:02 2012 UTC (11 years, 9 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint65z, checkpoint65x, checkpoint65y, checkpoint65r, checkpoint65s, checkpoint65p, checkpoint65q, checkpoint65v, checkpoint65w, checkpoint65t, checkpoint65u, checkpoint65j, checkpoint65k, checkpoint65h, checkpoint65i, checkpoint65n, checkpoint65l, checkpoint65m, checkpoint65b, checkpoint65c, checkpoint65a, checkpoint65f, checkpoint65g, checkpoint65d, checkpoint65e, checkpoint64, checkpoint65, checkpoint66g, checkpoint66f, checkpoint66e, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint66o, checkpoint66n, checkpoint66m, checkpoint66l, checkpoint66k, checkpoint66j, checkpoint66i, checkpoint66h, checkpoint63r, checkpoint63s, checkpoint65o, checkpoint64y, checkpoint64x, checkpoint64z, checkpoint64q, checkpoint64p, checkpoint64s, checkpoint64r, checkpoint64u, checkpoint64t, checkpoint64w, checkpoint64v, checkpoint64i, checkpoint64h, checkpoint64k, checkpoint64j, checkpoint64m, checkpoint64l, checkpoint64o, checkpoint64n, checkpoint64a, checkpoint64c, checkpoint64b, checkpoint64e, checkpoint64d, checkpoint64g, checkpoint64f, HEAD
Changes since 1.4: +2 -2 lines
rename COST_CPPOPTIONS.h to COST_OPTIONS.h

1 jmc 1.5 C $Header: /u/gcmpack/MITgcm/pkg/cost/cost_vector.F,v 1.4 2007/10/08 23:59:21 jmc Exp $
2 jmc 1.4 C $Name: $
3 heimbach 1.1
4 jmc 1.5 #include "COST_OPTIONS.h"
5 heimbach 1.1
6     subroutine cost_vector( myThid )
7     C /==========================================================\
8     C | subroutine cost_vector |
9     C | o This routine computes the meridional heat transport. |
10     C | The current indices are for North Atlantic 29N |
11     C | 2x2 global setup. |
12     C \==========================================================/
13     implicit none
14    
15     C == Global variables ===
16     #include "SIZE.h"
17     #include "EEPARAMS.h"
18     #include "PARAMS.h"
19     #include "GRID.h"
20     #include "DYNVARS.h"
21    
22     #include "cost.h"
23    
24     C ======== Routine arguments ======================
25     C myThid - Thread number for this instance of the routine.
26     integer myThid
27    
28     #ifdef ALLOW_COST_VECTOR
29     C ========= Local variables =========================
30     integer isecbeg , isecend , jsec
31     integer kmaxdepth
32     integer i, j, k
33     integer ig, jg
34     integer bi, bj
35     _RL locfc
36     _RL vVel_bar(Nr), theta_bar(Nr), count(Nr)
37     _RL petawatt
38     _RL sum
39     parameter( petawatt = 1.e+15 )
40    
41     C 80W - 0W at 24N
42     parameter( isecbeg = 70, isecend = 90, jsec = 27 )
43     parameter ( kmaxdepth = 15 )
44     C 80W - 0W at 48N
45     C parameter( isecbeg = 70, isecend = 90, jsec = 33 )
46     C parameter ( kmaxdepth = 14 )
47    
48    
49    
50     C------------------------------------------------------
51     C Accumulate meridionally integrated transports
52     C Note bar(V)*bar(T) not bar(VT)
53 mlosch 1.2 C Attention pYFaceA [m^2*gravity*rhoConst]
54 heimbach 1.1 C------------------------------------------------------
55    
56     DO bj=myByLo(myThid),myByHi(myThid)
57     DO bi=myBxLo(myThid),myBxHi(myThid)
58    
59     locfc = 0.0
60     do j=1,sNy
61     jg = myYGlobalLo-1+(bj-1)*sNy+j
62     if (jg .eq. jsec) then
63    
64     do i=1,sNx
65     ig = myXGlobalLo-1+(bi-1)*sNx+i
66     if ((ig .ge. isecbeg) .and. (ig .le. isecend)) then
67     sum = 0. _d 0
68     do k = 1, kmaxdepth
69     sum = sum
70     & + vVel(i,j,k,bi,bj) * maskS(i,j,k,bi,bj)
71     & * drF(k)
72     C & * 0.5*(theta(i,j,k,bi,bj)+theta(i,j-1,k,bi,bj))
73     end do
74     objf_vector(i,bi,bj) = sum*dxG(i,j,bi,bj)
75     end if
76     end do
77    
78     end if
79     end do
80    
81 heimbach 1.3 do i = 1,sNx
82     print*,' --> objf_vector(i,bi,bj) = ',
83     & objf_vector(i,bi,bj)
84     end do
85    
86 heimbach 1.1 END DO
87     END DO
88    
89     #endif
90 jmc 1.4
91 heimbach 1.1 end

  ViewVC Help
Powered by ViewVC 1.1.22