/[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.1 - (show annotations) (download)
Thu Jan 17 17:03:34 2002 UTC (22 years, 3 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint46g_pre, checkpoint46f_post, checkpoint44f_post, checkpoint46b_post, chkpt44d_post, checkpoint44e_pre, checkpoint46d_pre, checkpoint45d_post, chkpt44a_post, checkpoint44h_pre, checkpoint46a_post, checkpoint46b_pre, chkpt44c_pre, checkpoint45a_post, checkpoint44e_post, checkpoint44g_post, checkpoint46e_pre, checkpoint45b_post, release1_final_v1, checkpoint46c_pre, checkpoint46, checkpoint44b_post, checkpoint46h_pre, checkpoint46a_pre, checkpoint45c_post, checkpoint44h_post, checkpoint46g_post, chkpt44a_pre, checkpoint46c_post, checkpoint46e_post, checkpoint44b_pre, checkpoint44, checkpoint45, chkpt44c_post, checkpoint44f_pre, checkpoint46d_post
Branch point for: release1_final, release1
* added Atlantic heat transport cost function
* added vector-valued cost function
...and corresponding options.

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

  ViewVC Help
Powered by ViewVC 1.1.22