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

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

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


Revision 1.4 - (hide annotations) (download)
Fri Jun 27 01:54:20 2003 UTC (20 years, 11 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint51k_post, checkpoint52l_pre, hrcube4, hrcube5, checkpoint52d_pre, checkpoint52j_pre, checkpoint51o_pre, checkpoint51l_post, checkpoint52l_post, checkpoint52k_post, checkpoint54, checkpoint53, checkpoint52, checkpoint52f_post, checkpoint51f_post, checkpoint51d_post, checkpoint51t_post, checkpoint51n_post, checkpoint52i_pre, hrcube_1, hrcube_2, hrcube_3, checkpoint51s_post, checkpoint51j_post, checkpoint52e_pre, checkpoint52e_post, checkpoint51n_pre, checkpoint53d_post, checkpoint52b_pre, checkpoint54b_post, checkpoint51l_pre, checkpoint52m_post, checkpoint51q_post, checkpoint52b_post, checkpoint52c_post, checkpoint51h_pre, checkpoint52f_pre, checkpoint54a_pre, checkpoint53c_post, branchpoint-genmake2, checkpoint54a_post, checkpoint51r_post, checkpoint51i_post, checkpoint51b_post, checkpoint51c_post, checkpoint53a_post, checkpoint52d_post, checkpoint53g_post, checkpoint52a_pre, checkpoint52i_post, checkpoint51i_pre, checkpoint52h_pre, checkpoint53f_post, checkpoint52j_post, branch-netcdf, checkpoint52n_post, checkpoint53b_pre, checkpoint51e_post, checkpoint51o_post, checkpoint51f_pre, checkpoint53b_post, checkpoint52a_post, checkpoint51g_post, ecco_c52_e35, checkpoint51m_post, checkpoint53d_pre, checkpoint51p_post, checkpoint51u_post
Branch point for: branch-genmake2, branch-nonh, tg2-branch, netcdf-sm0, checkpoint51n_branch
Changes since 1.3: +24 -9 lines
extend cost, ctr, to deal with ALLOW_PTRACERS

1 heimbach 1.4 C $Header: /u/gcmpack/MITgcm/pkg/cost/cost_tracer.F,v 1.3 2002/07/13 03:01:39 heimbach Exp $
2 heimbach 1.1
3 heimbach 1.2 #include "COST_CPPOPTIONS.h"
4 heimbach 1.4 #ifdef ALLOW_PTRACERS
5     # include "PTRACERS_OPTIONS.h"
6     #endif
7 heimbach 1.1
8     subroutine cost_tracer( bi, bj, myThid )
9     C /==========================================================\
10     C | subroutine cost_tracer |
11     C | o this routine computes the cost function for the tiles |
12     C | of this processor |
13     C |==========================================================|
14     C | |
15     C | Notes |
16     C | ===== |
17     C \==========================================================/
18     IMPLICIT NONE
19    
20     C == Global variables ===
21     #include "SIZE.h"
22     #include "EEPARAMS.h"
23     #include "PARAMS.h"
24     #include "DYNVARS.h"
25     #include "GRID.h"
26 heimbach 1.4 #ifdef ALLOW_COST_TRACER
27     # if (defined (ALLOW_PASSIVE_TRACER))
28     # include "TR1.h"
29     # elif (defined (ALLOW_PTRACERS))
30     # include "PTRACERS.h"
31     # endif
32     #endif
33 heimbach 1.1
34     #include "cost.h"
35    
36     C == Routine arguments ==
37     C myThid - Thread number for this instance of the routine.
38     integer bi, bj
39     integer myThid
40    
41     #ifdef ALLOW_COST_TRACER
42     C == Local variables
43     _RL thetaRef
44     _RL locfc
45    
46     integer i, j, k
47     integer ig, jg
48     ce some reference temperature
49     thetaRef = 24.0D0
50    
51     locfc = 0. _d 0
52    
53     k=1
54     DO j=1,sNy
55     DO i=1,sNx
56 heimbach 1.4 #if (defined (ALLOW_PASSIVE_TRACER))
57 heimbach 1.1 locfc = locfc + maskC(i,j,k,bi,bj)*
58     & lambdaTr1ClimRelax*Tr1(i,j,k,bi,bj)*
59     & rA(i,j,bi,bj)*drF(k)*deltaTtracer
60 heimbach 1.4 #elif (defined (ALLOW_PTRACERS))
61     locfc = locfc + maskC(i,j,k,bi,bj)*
62     & lambdaTr1ClimRelax*ptracer(i,j,k,bi,bj,1)*
63     & rA(i,j,bi,bj)*drF(k)*deltaTtracer
64     #endif
65 heimbach 1.1 ENDDO
66     ENDDO
67    
68     objf_tracer(bi,bj) = objf_tracer(bi,bj) + locfc
69    
70 heimbach 1.4 #if (defined (ALLOW_PASSIVE_TRACER))
71     print *, 'COST TRACER nach', objf_tracer(bi,bj),
72     & Tr1(83,33,1,1,1), Tr1(83,33,2,1,1)
73     #elif (defined (ALLOW_PTRACERS))
74     print *, 'COST TRACER nach', objf_tracer(bi,bj),
75     & ptracer(83,33,1,1,1,1), ptracer(83,33,2,1,1,1)
76     #endif
77 heimbach 1.1
78     #endif /* ALLOW_COST_TRACER */
79    
80     RETURN
81     END

  ViewVC Help
Powered by ViewVC 1.1.22