/[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.12 - (hide annotations) (download)
Fri Aug 10 19:36:02 2012 UTC (11 years, 9 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint63r, checkpoint63s
Changes since 1.11: +2 -2 lines
rename COST_CPPOPTIONS.h to COST_OPTIONS.h

1 jmc 1.12 C $Header: /u/gcmpack/MITgcm/pkg/cost/cost_dependent_init.F,v 1.11 2011/05/24 22:14:36 jmc Exp $
2 heimbach 1.5 C $Name: $
3 heimbach 1.1
4 jmc 1.12 #include "COST_OPTIONS.h"
5 heimbach 1.1
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 heimbach 1.10 fc = 0. _d 0
50 heimbach 1.1
51 heimbach 1.5 #ifdef ALLOW_AUTODIFF
52 heimbach 1.1
53 heimbach 1.10 if ( myProcId .EQ. 0 ) then
54     adfc = 1. _d 0
55     endif
56 heimbach 1.8
57 heimbach 1.1 do bj = jtlo,jthi
58 heimbach 1.3 do bi = itlo,ithi
59 heimbach 1.1 #ifdef ALLOW_COST_VECTOR
60 heimbach 1.3 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 heimbach 1.1 do i=1,sNx
68 heimbach 1.7 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 heimbach 1.3 cph No init. of cost_state_final here,
73     cph because we need it in ADM*TLM
74 heimbach 1.1 end do
75 heimbach 1.3 end do
76 heimbach 1.1 #endif
77     enddo
78     enddo
79    
80 heimbach 1.5 #endif /* ALLOW_AUTODIFF */
81 heimbach 1.1
82     return
83     end

  ViewVC Help
Powered by ViewVC 1.1.22