/[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.6 - (show annotations) (download)
Tue Oct 26 20:10:25 2004 UTC (19 years, 7 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint57m_post, checkpoint57g_pre, checkpoint57s_post, checkpoint57b_post, checkpoint57g_post, checkpoint56b_post, checkpoint57y_post, checkpoint57r_post, checkpoint57d_post, checkpoint57i_post, checkpoint57, checkpoint56, checkpoint57n_post, checkpoint55i_post, checkpoint57l_post, checkpoint57t_post, checkpoint57v_post, checkpoint57f_post, checkpoint57a_post, checkpoint57h_pre, checkpoint57h_post, checkpoint57y_pre, checkpoint57c_post, checkpoint57c_pre, checkpoint55j_post, checkpoint57e_post, checkpoint57p_post, checkpint57u_post, checkpoint57q_post, eckpoint57e_pre, checkpoint56a_post, checkpoint57h_done, checkpoint57j_post, checkpoint57f_pre, checkpoint56c_post, checkpoint57a_pre, checkpoint57o_post, checkpoint57k_post, checkpoint57w_post, checkpoint57x_post
Changes since 1.5: +3 -4 lines
Modified objf_state_final

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

  ViewVC Help
Powered by ViewVC 1.1.22