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

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

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


Revision 1.10 - (hide annotations) (download)
Mon Apr 26 15:58:54 2010 UTC (14 years, 1 month ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint62v, checkpoint62u, checkpoint62t, checkpoint62s, checkpoint62r, checkpoint62q, checkpoint62p, checkpoint62g, checkpoint62f, checkpoint62k, checkpoint62j, checkpoint62i, checkpoint62h, checkpoint62o, checkpoint62n, checkpoint62m, checkpoint62l, checkpoint62w, checkpoint62x
Changes since 1.9: +5 -3 lines
Step 1 of 2 of fixing global_sum_ad

1 edhill 1.4 C
2 heimbach 1.10 C $Header: /u/gcmpack/MITgcm/pkg/cost/cost_dependent_init.F,v 1.9 2009/10/15 05:21:50 heimbach Exp $
3 heimbach 1.5 C $Name: $
4 heimbach 1.1
5 heimbach 1.5 #include "PACKAGES_CONFIG.h"
6 heimbach 1.1 #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 heimbach 1.10 fc = 0. _d 0
53 heimbach 1.1
54 heimbach 1.5 #ifdef ALLOW_AUTODIFF
55 heimbach 1.1
56 heimbach 1.10 if ( myProcId .EQ. 0 ) then
57     adfc = 1. _d 0
58     endif
59 heimbach 1.8
60 heimbach 1.1 do bj = jtlo,jthi
61 heimbach 1.3 do bi = itlo,ithi
62 heimbach 1.1 #ifdef ALLOW_COST_VECTOR
63 heimbach 1.3 do i=1,sNx
64     objf_vector(i,bi,bj) = 0. _d 0
65     adobjf_vector(i,bi,bj) = 1. _d 0
66     end do
67     #endif
68     #ifdef ALLOW_COST_STATE_FINAL
69     do j=1,sNy
70 heimbach 1.1 do i=1,sNx
71 heimbach 1.7 do k=1,4*Nr
72     objf_state_final(i,j,bi,bj,k) = 0. _d 0
73     enddo
74     objf_state_final(i,j,bi,bj,4*Nr+1) = 0. _d 0
75 heimbach 1.3 cph No init. of cost_state_final here,
76     cph because we need it in ADM*TLM
77 heimbach 1.1 end do
78 heimbach 1.3 end do
79 heimbach 1.1 #endif
80     enddo
81     enddo
82    
83 heimbach 1.5 #endif /* ALLOW_AUTODIFF */
84 heimbach 1.1
85     return
86     end
87    

  ViewVC Help
Powered by ViewVC 1.1.22