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

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

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


Revision 1.3 - (show annotations) (download)
Thu Oct 2 21:34:45 2003 UTC (20 years, 8 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint51k_post, checkpoint51l_post, checkpoint51j_post, checkpoint51l_pre, checkpoint51h_pre, checkpoint51i_post, checkpoint51i_pre, checkpoint51g_post, checkpoint51m_post
Branch point for: tg2-branch
Changes since 1.2: +15 -4 lines
Bringing cost/ ctrl/ up to date.

1 C $Header: /u/gcmpack/MITgcm/pkg/cost/cost_dependent_init.F,v 1.2 2002/07/13 03:01:39 heimbach Exp $
2
3 #include "COST_CPPOPTIONS.h"
4
5
6 subroutine cost_dependent_init( mythid )
7
8 c ==================================================================
9 c SUBROUTINE cost_dependent_init
10 c ==================================================================
11 c
12 c o Initialise the variable ad cost function part.
13 c
14 c started: heimbach@mit.edu 17-Jan-2002
15 c
16 c ==================================================================
17 c SUBROUTINE cost_dependent_init
18 c ==================================================================
19
20 implicit none
21
22 c == global variables ==
23
24 #include "EEPARAMS.h"
25 #include "SIZE.h"
26
27 #include "cost.h"
28 #include "adcost.h"
29
30 c == routine arguments ==
31
32 integer mythid
33
34 c == local variables ==
35
36 integer i,j,k
37 integer bi,bj
38 integer itlo,ithi
39 integer jtlo,jthi
40
41 c == external functions ==
42
43 c == end of interface ==
44 jtlo = mybylo(mythid)
45 jthi = mybyhi(mythid)
46 itlo = mybxlo(mythid)
47 ithi = mybxhi(mythid)
48
49 fc = 0.0
50
51 #if ( defined (ALLOW_ADJOINT_RUN) || \
52 defined (ALLOW_GRADIENT_CHECK) || \
53 defined (ALLOW_ECCO_OPTIMIZATION) )
54
55 adfc = 1.0
56 do bj = jtlo,jthi
57 do bi = itlo,ithi
58 #ifdef ALLOW_COST_VECTOR
59 do i=1,sNx
60 objf_vector(i,bi,bj) = 0. _d 0
61 adobjf_vector(i,bi,bj) = 1. _d 0
62 end do
63 #endif
64 #ifdef ALLOW_COST_STATE_FINAL
65 c do k=1,nr
66 do j=1,sNy
67 do i=1,sNx
68 objf_state_final(i,j,bi,bj) = 0. _d 0
69 cph No init. of cost_state_final here,
70 cph because we need it in ADM*TLM
71 end do
72 end do
73 c end do
74 #endif
75 enddo
76 enddo
77
78 #endif
79
80 return
81 end
82

  ViewVC Help
Powered by ViewVC 1.1.22