/[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.2 - (hide annotations) (download)
Wed Sep 25 19:36:50 2002 UTC (21 years, 8 months ago) by mlosch
Branch: MAIN
CVS Tags: checkpoint46n_post, checkpoint47e_post, checkpoint46l_post, checkpoint47c_post, checkpoint50c_post, checkpoint48e_post, checkpoint50c_pre, checkpoint48i_post, checkpoint46l_pre, checkpoint50d_pre, checkpoint51, checkpoint50, checkpoint50d_post, checkpoint50b_pre, checkpoint51f_post, checkpoint48b_post, checkpoint51d_post, checkpoint48c_pre, checkpoint47d_pre, checkpoint47a_post, checkpoint48d_pre, checkpoint47i_post, checkpoint47d_post, checkpoint48d_post, checkpoint48f_post, checkpoint46j_pre, checkpoint48h_post, checkpoint51b_pre, checkpoint47g_post, checkpoint46j_post, checkpoint46k_post, checkpoint48a_post, checkpoint50f_post, checkpoint50a_post, checkpoint50f_pre, checkpoint47j_post, branch-exfmods-tag, branchpoint-genmake2, checkpoint48c_post, checkpoint51b_post, checkpoint51c_post, checkpoint47b_post, checkpoint46m_post, checkpoint50g_post, checkpoint50h_post, checkpoint50e_pre, checkpoint50i_post, checkpoint47f_post, checkpoint50e_post, checkpoint46i_post, checkpoint51e_post, checkpoint47, checkpoint48, checkpoint49, checkpoint46h_post, checkpoint51f_pre, checkpoint48g_post, checkpoint47h_post, checkpoint50b_post, checkpoint51a_post
Branch point for: branch-exfmods-curt, branch-genmake2
Changes since 1.1: +1 -1 lines
o cleaned up the use of rhoNil and rhoConst.
  - rhoNil should only appear in the LINEAR equation of state, everywhere
    else rhoNil is replaced by rhoConst, e.g. find_rho computes rho-rhoConst
    and the dynamical equations are all divided by rhoConst
o introduced new parameter rhoConstFresh, a reference density of fresh
  water, to remove the fresh water flux's dependence on rhoNil. The default
  value is 999.8 kg/m^3
o cleanup up external_forcing.F and external_forcing_surf.F
  - can now be used by both OCEANIC and OCEANICP

1 heimbach 1.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 mlosch 1.2 C Attention pYFaceA [m^2*gravity*rhoConst]
52 heimbach 1.1 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