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

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

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


Revision 1.4 - (show annotations) (download)
Mon Oct 8 23:59:21 2007 UTC (16 years, 6 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint62c, checkpoint62a, checkpoint62g, checkpoint62f, checkpoint62e, checkpoint62d, checkpoint62k, checkpoint62j, checkpoint62i, checkpoint62h, checkpoint62o, checkpoint62n, checkpoint62m, checkpoint62l, checkpoint62s, checkpoint62r, checkpoint62q, checkpoint62p, checkpoint62w, checkpoint62v, checkpoint62u, checkpoint62t, checkpoint62z, checkpoint62y, checkpoint62x, checkpoint60, checkpoint61, checkpoint62, checkpoint63, checkpoint63p, checkpoint63q, checkpoint63l, checkpoint63m, checkpoint63n, checkpoint63o, checkpoint63h, checkpoint63i, checkpoint63j, checkpoint63k, checkpoint63d, checkpoint63e, checkpoint63f, checkpoint63g, checkpoint63a, checkpoint63b, checkpoint63c, checkpoint59q, checkpoint59p, checkpoint59r, checkpoint59m, checkpoint59l, checkpoint59o, checkpoint59n, checkpoint59i, checkpoint59k, checkpoint59j, checkpoint62b, checkpoint61f, checkpoint61n, checkpoint61q, checkpoint61e, checkpoint61g, checkpoint61d, checkpoint61b, checkpoint61c, checkpoint61a, checkpoint61o, checkpoint61l, checkpoint61m, checkpoint61j, checkpoint61k, checkpoint61h, checkpoint61i, checkpoint61v, checkpoint61w, checkpoint61t, checkpoint61u, checkpoint61r, checkpoint61s, checkpoint61p, checkpoint61z, checkpoint61x, checkpoint61y
Changes since 1.3: +3 -1 lines
add missing cvs $Header:$ or $Name:$

1 C $Header: $
2 C $Name: $
3
4 #include "COST_CPPOPTIONS.h"
5
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 C Attention pYFaceA [m^2*gravity*rhoConst]
54 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 do i = 1,sNx
82 print*,' --> objf_vector(i,bi,bj) = ',
83 & objf_vector(i,bi,bj)
84 end do
85
86 END DO
87 END DO
88
89 #endif
90
91 end

  ViewVC Help
Powered by ViewVC 1.1.22