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

Annotation of /MITgcm/verification/hs94.1x64x5/adcode/cost_test.F

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


Revision 1.1 - (hide annotations) (download)
Tue Nov 20 20:44:24 2001 UTC (22 years, 3 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint46n_post, checkpoint51k_post, checkpoint47j_post, checkpoint48d_pre, checkpoint44b_post, checkpoint51j_post, branch-exfmods-tag, checkpoint47e_post, checkpoint43a-release1mods, checkpoint44h_pre, checkpoint47i_post, checkpoint44e_post, checkpoint46l_post, checkpoint47f_post, checkpoint47c_post, checkpoint50e_post, checkpoint50c_post, checkpoint46i_post, checkpoint51n_pre, checkpoint47d_post, checkpoint44f_pre, checkpoint47a_post, checkpoint46f_post, checkpoint46d_pre, checkpoint48e_post, checkpoint46e_post, checkpoint48d_post, checkpoint50g_post, release1-branch_tutorials, checkpoint46c_post, checkpoint44g_post, branchpoint-genmake2, checkpoint44h_post, checkpoint50b_pre, checkpoint46e_pre, checkpoint48f_post, checkpoint45d_post, checkpoint46j_pre, checkpoint45b_post, checkpoint51i_post, checkpoint48c_post, chkpt44a_pre, release1-branch-end, release1_final_v1, checkpoint51e_post, checkpoint51b_post, checkpoint51l_pre, checkpoint46c_pre, checkpoint47d_pre, checkpoint47, checkpoint44, checkpoint45, checkpoint48, checkpoint49, checkpoint44f_post, checkpoint47b_post, checkpoint51l_post, checkpoint48i_post, checkpoint46l_pre, checkpoint51f_pre, checkpoint48h_post, checkpoint50d_pre, chkpt44d_post, checkpoint46h_pre, checkpoint51, checkpoint50, checkpoint47h_post, checkpoint50d_post, checkpoint46g_pre, checkpoint51b_pre, checkpoint46a_post, checkpoint47g_post, chkpt44a_post, checkpoint44b_pre, chkpt44c_post, checkpoint46m_post, checkpoint46j_post, checkpoint51h_pre, checkpoint46a_pre, checkpoint50c_pre, checkpoint45c_post, checkpoint46k_post, checkpoint44e_pre, checkpoint51g_post, checkpoint46b_pre, checkpoint46b_post, checkpoint51f_post, checkpoint46d_post, checkpoint48b_post, checkpoint50b_post, checkpoint46g_post, checkpoint51c_post, checkpoint45a_post, checkpoint50f_post, checkpoint50a_post, checkpoint50f_pre, checkpoint51d_post, checkpoint48c_pre, release1-branch_branchpoint, checkpoint46, checkpoint50h_post, checkpoint51a_post, checkpoint46h_post, checkpoint50e_pre, checkpoint50i_post, checkpoint51n_post, checkpoint48g_post, checkpoint51i_pre, chkpt44c_pre, checkpoint48a_post, checkpoint51m_post
Branch point for: branch-genmake2, release1, branch-exfmods-curt, tg2-branch, release1_final, checkpoint51n_branch, release1-branch
Modifying verification exp. for adjoint of hs94.1x...
Quick fix to exchange problem is to work with Nx=2.

1 heimbach 1.1 C $Header: /u/gcmpack/models/MITgcmUV/pkg/cost/cost_test.F,v 1.2 2001/04/10 22:35:26 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