/[MITgcm]/MITgcm/verification/hs94.1x64x5/code_ad/cost_test.F
ViewVC logotype

Contents of /MITgcm/verification/hs94.1x64x5/code_ad/cost_test.F

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


Revision 1.1 - (show annotations) (download)
Sun Oct 26 01:58:09 2003 UTC (20 years, 9 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint58l_post, checkpoint57t_post, checkpoint57o_post, checkpoint52l_pre, checkpoint52e_pre, checkpoint58e_post, checkpoint57v_post, checkpoint52n_post, checkpoint52j_post, checkpoint53d_post, checkpoint58u_post, checkpoint58w_post, checkpoint54a_pre, checkpoint57m_post, checkpoint55c_post, checkpoint54e_post, checkpoint52e_post, checkpoint57s_post, checkpoint54a_post, checkpoint53c_post, checkpoint57k_post, checkpoint55d_pre, checkpoint57d_post, checkpoint57g_post, checkpoint51q_post, checkpoint57b_post, checkpoint57c_pre, checkpoint58r_post, checkpoint55j_post, checkpoint56b_post, checkpoint57i_post, checkpoint57y_post, checkpoint57e_post, branch-netcdf, checkpoint52l_post, checkpoint55h_post, checkpoint58n_post, checkpoint51r_post, checkpoint58x_post, checkpoint52k_post, checkpoint52b_pre, checkpoint57g_pre, checkpoint54b_post, checkpoint53b_pre, checkpoint55b_post, checkpoint58t_post, checkpoint58h_post, checkpoint54d_post, checkpoint56c_post, checkpoint52m_post, checkpoint57y_pre, checkpoint55, checkpoint53a_post, checkpoint57f_pre, checkpoint57a_post, checkpoint54, checkpoint58q_post, checkpoint54f_post, checkpoint53b_post, checkpoint55g_post, checkpoint51o_post, checkpoint51p_post, checkpoint58j_post, checkpoint52a_pre, checkpoint59e, checkpoint59d, checkpoint59g, checkpoint59f, checkpoint59a, checkpoint55f_post, checkpoint59c, checkpoint59b, checkpoint59h, checkpoint57r_post, checkpoint59, checkpoint58, checkpoint57a_pre, checkpoint55i_post, checkpoint57, checkpoint56, checkpoint53, checkpoint52, checkpoint52d_post, eckpoint57e_pre, checkpoint52a_post, checkpoint57h_done, checkpoint58f_post, checkpoint52b_post, checkpoint53g_post, checkpoint52f_post, checkpoint57x_post, checkpoint52c_post, checkpoint58d_post, checkpoint58c_post, checkpoint57w_post, checkpoint57p_post, checkpint57u_post, checkpoint57f_post, checkpoint58a_post, checkpoint58i_post, checkpoint57q_post, checkpoint58g_post, ecco_c52_e35, checkpoint58o_post, checkpoint57z_post, checkpoint57c_post, checkpoint58y_post, checkpoint55e_post, checkpoint58k_post, checkpoint52i_post, checkpoint52j_pre, checkpoint58v_post, checkpoint53f_post, checkpoint55a_post, checkpoint51t_post, checkpoint53d_pre, checkpoint54c_post, checkpoint58s_post, checkpoint58p_post, checkpoint57j_post, checkpoint58b_post, checkpoint57h_pre, checkpoint58m_post, checkpoint57l_post, checkpoint52i_pre, checkpoint51u_post, checkpoint52h_pre, checkpoint52f_pre, checkpoint57h_post, checkpoint56a_post, checkpoint51s_post, checkpoint55d_post
Branch point for: branch-nonh, netcdf-sm0
moving and updating adcode to code_ad etc.

1 C $Header: /u/gcmpack/MITgcm/verification/hs94.1x64x5/adcode/cost_test.F,v 1.1 2001/11/20 20:44:24 heimbach Exp $
2
3 #include "CPP_OPTIONS.h"
4
5 subroutine cost_test( myThid )
6 C /==========================================================\
7 C | subroutine cost_test |
8 C | o this routine computes the cost function for the tiles |
9 C | of this processor |
10 C |==========================================================|
11 C | |
12 C | Notes |
13 C | ===== |
14 C \==========================================================/
15 IMPLICIT NONE
16
17 C == Global variables ===
18 #include "SIZE.h"
19 #include "EEPARAMS.h"
20 #include "PARAMS.h"
21 #include "DYNVARS.h"
22 #include "GRID.h"
23 #ifdef ALLOW_PASSIVE_TRACER
24 # include "TR1.h"
25 #endif
26
27 #include "cost.h"
28
29 C == Routine arguments ==
30 C myThid - Thread number for this instance of the routine.
31 integer bi, bj
32 integer myThid
33
34 #ifdef ALLOW_COST_TEST
35 C == Local variables
36 _RL thetaRef
37
38 integer i, j, k
39 integer ig, jg
40 integer itlo,ithi
41 integer jtlo,jthi
42
43 jtlo = mybylo(mythid)
44 jthi = mybyhi(mythid)
45 itlo = mybxlo(mythid)
46 ithi = mybxhi(mythid)
47
48 iLocOut = 1
49 jLocOut = 32
50 kLocOut = 1
51
52 do bj = jtlo,jthi
53 do bi = itlo,ithi
54 objf_test(bi,bj)= 0. _d 0
55 enddo
56 enddo
57
58 ce some reference temperature
59 thetaRef = 24.0D0
60 C-- Calculate mask for tracer cells (0 => land, 1 => water)
61 k=1
62
63 C-- Calculate cost function on tile of this instance
64 do bj = jtlo,jthi
65 do bi = itlo,ithi
66 c
67 do j=1,sNy
68 jg = myYGlobalLo-1+(bj-1)*sNy+j
69 do i=1,sNx
70 ig = myXGlobalLo-1+(bi-1)*sNx+i
71
72 if ((jg .gt.30) .and. (jg .lt.40)) then
73 objf_test(bi,bj) = objf_test(bi,bj) +
74 & theta(i,j,kLocOut,bi,bj)
75 write(*,'(a,F10.1,3(x,i4),a,4(x,i4))')
76 & 'objf_test ', objf_test(bi,bj),
77 & ig,jg,kLocOut,' TILE ',i,j,bi,bj
78 endif
79
80 end do
81 end do
82 c
83 objf_test(bi,bj) = objf_test(bi,bj) / 9. _d 0
84 c
85 end do
86 end do
87
88 #endif
89
90 END

  ViewVC Help
Powered by ViewVC 1.1.22