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

Contents of /MITgcm/pkg/cost/cost_test.F

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


Revision 1.5 - (show annotations) (download)
Sat Jul 13 03:01:39 2002 UTC (21 years, 10 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint46n_post, checkpoint47e_post, checkpoint46l_post, checkpoint46g_pre, checkpoint47c_post, checkpoint50c_post, checkpoint46f_post, checkpoint48e_post, checkpoint50c_pre, checkpoint46b_post, checkpoint48i_post, checkpoint46l_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, checkpoint46d_pre, checkpoint48d_post, checkpoint48f_post, checkpoint46j_pre, checkpoint48h_post, checkpoint51b_pre, checkpoint46a_post, checkpoint47g_post, checkpoint46j_post, checkpoint51h_pre, checkpoint46k_post, checkpoint48a_post, checkpoint50f_post, checkpoint50a_post, checkpoint50f_pre, checkpoint47j_post, branch-exfmods-tag, branchpoint-genmake2, checkpoint46e_pre, checkpoint48c_post, checkpoint46b_pre, checkpoint51i_post, checkpoint51b_post, checkpoint51c_post, checkpoint46c_pre, checkpoint46, checkpoint47b_post, checkpoint46h_pre, checkpoint46m_post, checkpoint46a_pre, checkpoint50g_post, checkpoint46g_post, checkpoint50h_post, checkpoint50e_pre, checkpoint50i_post, checkpoint51i_pre, checkpoint47f_post, checkpoint50e_post, checkpoint46i_post, checkpoint46c_post, checkpoint50d_pre, checkpoint46e_post, checkpoint51e_post, checkpoint47, checkpoint48, checkpoint49, checkpoint46h_post, checkpoint51f_pre, checkpoint48g_post, checkpoint47h_post, checkpoint51g_post, checkpoint46d_post, checkpoint50b_post, checkpoint51a_post
Branch point for: branch-exfmods-curt, branch-genmake2
Changes since 1.4: +1 -1 lines
Merging from release1_p5:
o Compatible with new ctrl package
o added Eliassen Palm cost hooks
o modif's of existing cost functions

1 C $Header: /u/gcmpack/MITgcm/pkg/cost/cost_test.F,v 1.2.2.2 2002/04/08 20:27:12 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
24 #include "cost.h"
25
26 C == Routine arguments ==
27 C myThid - Thread number for this instance of the routine.
28 integer bi, bj
29 integer myThid
30
31 #ifdef ALLOW_COST_TEST
32 C == Local variables
33 _RL thetaRef
34
35 integer i, j, k
36 integer ig, jg
37 integer itlo,ithi
38 integer jtlo,jthi
39
40 jtlo = mybylo(mythid)
41 jthi = mybyhi(mythid)
42 itlo = mybxlo(mythid)
43 ithi = mybxhi(mythid)
44
45 iLocOut = 80
46 jLocOut = 30
47 kLocOut = 1
48
49 ce some reference temperature
50 thetaRef = 24.0D0
51
52 C-- Calculate mask for tracer cells (0 => land, 1 => water)
53 k=1
54
55 C-- Calculate cost function on tile of this instance
56 do bj = jtlo,jthi
57 do bi = itlo,ithi
58 do j=1,sNy
59 jg = myYGlobalLo-1+(bj-1)*sNy+j
60 do i=1,sNx
61 ig = myXGlobalLo-1+(bi-1)*sNx+i
62
63 if ((ig .eq. iLocOut) .and. (jg .eq. jLocOut)) then
64 write(*,'(a,3(x,i4),a,4(x,i4))')
65 & 'COST ',ig,jg,kLocOut,' TILE ',i,j,bi,bj
66 objf_test(bi,bj) = theta(i,j,kLocOut,bi,bj)
67 cph(
68 print *, 'ph-cost ', ig, jg, kLocOut,
69 & theta(i,j,kLocOut,bi,bj)
70 cph)
71 endif
72
73 end do
74 end do
75 end do
76 end do
77
78 #endif
79
80 END

  ViewVC Help
Powered by ViewVC 1.1.22