Back to home page

MITgcm

 
 

    


File indexing completed on 2022-01-06 06:12:25 UTC

view on githubraw file Latest commit 9f5240b5 on 2022-01-05 15:24:45 UTC
5ed655852f Jean*0001 #include "COST_OPTIONS.h"
bbf42b7711 Patr*0002 
                0003       subroutine cost_tracer( bi, bj, myThid )
                0004 C     /==========================================================\
                0005 C     | subroutine cost_tracer                                   |
                0006 C     | o this routine computes the cost function for the tiles  |
                0007 C     |   of this processor                                      |
                0008 C     |==========================================================|
                0009 C     |                                                          |
                0010 C     | Notes                                                    |
                0011 C     | =====                                                    |
                0012 C     \==========================================================/
                0013       IMPLICIT NONE
                0014 
                0015 C     == Global variables ===
                0016 #include "SIZE.h"
                0017 #include "EEPARAMS.h"
                0018 #include "PARAMS.h"
                0019 #include "DYNVARS.h"
                0020 #include "GRID.h"
adfc056bef Patr*0021 #ifdef ALLOW_COST_TRACER
8a28092f34 Patr*0022 # ifdef ALLOW_PTRACERS
862edcc91c Jean*0023 #  include "PTRACERS_SIZE.h"
02e2357f10 Jean*0024 #  include "PTRACERS_PARAMS.h"
85f77391e5 Jean*0025 #  include "PTRACERS_FIELDS.h"
adfc056bef Patr*0026 # endif
                0027 #endif
bbf42b7711 Patr*0028 #include "cost.h"
                0029 
                0030 C     == Routine arguments ==
                0031 C     myThid - Thread number for this instance of the routine.
                0032       integer bi, bj
                0033       integer myThid
                0034 
                0035 #ifdef ALLOW_COST_TRACER
9f5240b52a Jean*0036 #ifdef ALLOW_PTRACERS
bbf42b7711 Patr*0037 C     == Local variables
                0038       _RL locfc
                0039       integer i, j, k
                0040 
                0041       locfc = 0. _d 0
                0042       k=1
                0043       DO j=1,sNy
                0044          DO i=1,sNx
ec6be1154b Patr*0045             locfc = locfc + hFacC(i,j,k,bi,bj)*
adfc056bef Patr*0046      &           lambdaTr1ClimRelax*ptracer(i,j,k,bi,bj,1)*
062a876ce5 Jean*0047      &           rA(i,j,bi,bj)*drF(k)*dTtracerLev(k)
bbf42b7711 Patr*0048          ENDDO
                0049       ENDDO
                0050 
                0051       objf_tracer(bi,bj) = objf_tracer(bi,bj) + locfc
                0052 
9f5240b52a Jean*0053 #endif /* ALLOW_PTRACERS */
bbf42b7711 Patr*0054 #endif /* ALLOW_COST_TRACER */
                0055 
                0056       RETURN
                0057       END