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

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

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


Revision 1.6 - (hide annotations) (download)
Wed Jun 7 01:55:13 2006 UTC (17 years, 11 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint58l_post, checkpoint58h_post, checkpoint58j_post, checkpoint58i_post, checkpoint58k_post, checkpoint58m_post
Changes since 1.5: +7 -1 lines
Modifications for bottom topography control
o replace hFacC by _hFacC at various places
o replace ALLOW_HFACC_CONTROL by ALLOW_DEPTH_CONTROL
o add non-self-adjoint cg2d_nsa
o update autodiff support routines
o re-initialise hfac after ctrl_depth_ini
o works for 5x5 box, doesnt work for global_ocean.90x40x15

1 heimbach 1.6 C $Header: /u/gcmpack/MITgcm/pkg/cost/cost_init_varia.F,v 1.5 2006/05/06 14:33:25 heimbach Exp $
2 heimbach 1.1
3     #include "PACKAGES_CONFIG.h"
4     #include "COST_CPPOPTIONS.h"
5    
6     subroutine cost_init_varia( mythid )
7    
8     c ==================================================================
9     c SUBROUTINE cost_init_varia
10     c ==================================================================
11     c
12     c o Initialise the variable cost function part.
13     c
14     c started: Christian Eckert eckert@mit.edu 30-Jun-1999
15     c
16     c changed: Christian Eckert eckert@mit.edu 18-Apr-2000
17     c
18     c - Restructured the code in order to create a package
19     c for the MITgcmUV.
20     c
21     c ==================================================================
22     c SUBROUTINE cost_init_varia
23     c ==================================================================
24    
25     implicit none
26    
27     c == global variables ==
28    
29     #include "EEPARAMS.h"
30     #include "SIZE.h"
31    
32     #include "cost.h"
33    
34     c == routine arguments ==
35    
36     integer mythid
37    
38     c == local variables ==
39    
40     integer i,j,k
41     integer bi,bj
42     integer itlo,ithi
43     integer jtlo,jthi
44    
45     c == external functions ==
46    
47     c == end of interface ==
48     jtlo = mybylo(mythid)
49     jthi = mybyhi(mythid)
50     itlo = mybxlo(mythid)
51     ithi = mybxhi(mythid)
52    
53     c-- Initialize the tiled cost function contributions.
54     do bj = jtlo,jthi
55     do bi = itlo,ithi
56     objf_atl(bi,bj) = 0. _d 0
57     objf_test(bi,bj) = 0. _d 0
58     objf_tracer(bi,bj) = 0. _d 0
59 heimbach 1.6 #ifdef ALLOW_COST_TRANSPORT
60     objf_transport(bi,bj) = 0. _d 0
61     #endif
62     #ifdef ALLOW_COST_DEPTH
63     objf_depth(bi,bj) = 0. _d 0
64     #endif
65 heimbach 1.1 #ifdef ALLOW_COST_VECTOR
66     do i=1,sNx
67     objf_vector(i,bi,bj) = 0. _d 0
68     end do
69     #endif
70     c
71 heimbach 1.2 #if (defined (ALLOW_COST_TEST) || defined (ALLOW_COST_ATLANTIC_HEAT))
72 heimbach 1.1 do k=1,nr
73     do j=1,sNy
74     do i=1,sNx
75     cMeanTheta(i,j,k,bi,bj) = 0. _d 0
76     cMeanUVel(i,j,k,bi,bj) = 0. _d 0
77     cMeanVVel(i,j,k,bi,bj) = 0. _d 0
78     end do
79     end do
80     end do
81     #endif
82     c
83     #ifdef ALLOW_COST_STATE_FINAL
84     do j=1,sNy
85 heimbach 1.3 do i=1,sNx
86     do k=1,4*Nr
87     objf_state_final(i,j,bi,bj,k) = 0. _d 0
88     enddo
89     objf_state_final(i,j,bi,bj,4*Nr+1) = 0. _d 0
90 heimbach 1.1 cph No init. of cost_state_final here,
91     cph because we need it in ADM*TLM
92     end do
93     end do
94     #endif
95     enddo
96     enddo
97    
98     #ifdef ALLOW_SEAICE
99     call seaice_cost_init_varia( mythid )
100     #endif
101    
102     #ifdef ALLOW_ECCO
103     call ecco_cost_init_varia( mythid )
104     #endif
105    
106     c-- Initialise the "global" parts of the cost function.
107     _BEGIN_MASTER( mythid )
108     fc = 0. _d 0
109     _END_MASTER( mythid )
110    
111     _BARRIER
112    
113     return
114     end
115    

  ViewVC Help
Powered by ViewVC 1.1.22