/[MITgcm]/MITgcm/verification/OpenAD/code_oad_all/cost_dependent_init.F
ViewVC logotype

Contents of /MITgcm/verification/OpenAD/code_oad_all/cost_dependent_init.F

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


Revision 1.1 - (show annotations) (download)
Thu Jan 29 21:46:50 2009 UTC (15 years, 4 months ago) by utke
Branch: MAIN
CVS Tags: checkpoint62c, checkpoint62b, checkpoint62a, checkpoint62g, checkpoint62f, checkpoint62e, checkpoint62d, checkpoint62k, checkpoint62j, checkpoint62i, checkpoint62h, checkpoint62o, checkpoint62n, checkpoint62m, checkpoint62l, checkpoint62s, checkpoint62r, checkpoint62q, checkpoint62p, checkpoint62w, checkpoint62v, checkpoint62u, checkpoint62t, checkpoint61p, checkpoint62z, checkpoint62y, checkpoint62x, checkpoint61k, checkpoint61x, checkpoint61q, checkpoint61y, checkpoint61i, checkpoint61n, checkpoint61o, checkpoint61l, checkpoint61m, checkpoint63l, checkpoint63m, checkpoint63n, checkpoint63o, checkpoint63h, checkpoint63i, checkpoint63j, checkpoint63k, checkpoint63d, checkpoint63e, checkpoint63f, checkpoint63g, checkpoint61z, checkpoint63a, checkpoint63b, checkpoint63c, checkpoint61v, checkpoint61w, checkpoint61j, checkpoint61t, checkpoint61u, checkpoint62, checkpoint63, checkpoint61r, checkpoint61s
added files following the new naming convention _oad for OpenAD
verification experiments

1 C
2 C $Header: /u/gcmpack/MITgcm_contrib/heimbach/OpenAD/code_common/cost_dependent_init.F,v 1.1 2008/10/08 20:44:39 utke 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%v = 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 do k=1,4*Nr
69 objf_state_final(i,j,bi,bj,k) = 0. _d 0
70 enddo
71 objf_state_final(i,j,bi,bj,4*Nr+1) = 0. _d 0
72 cph No init. of cost_state_final here,
73 cph because we need it in ADM*TLM
74 end do
75 end do
76 #endif
77 enddo
78 enddo
79
80 #endif /* ALLOW_AUTODIFF */
81
82 return
83 end
84

  ViewVC Help
Powered by ViewVC 1.1.22