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

Contents of /MITgcm/pkg/cost/cost_initvaria.F

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


Revision 1.4 - (show annotations) (download)
Thu Nov 6 22:03:49 2003 UTC (20 years, 10 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint53f_post, checkpoint54a_pre, checkpoint55c_post, checkpoint53b_pre, checkpoint52l_pre, checkpoint52e_pre, hrcube4, hrcube5, checkpoint52j_post, checkpoint52e_post, checkpoint52d_pre, checkpoint53c_post, checkpoint53d_post, checkpoint52j_pre, checkpoint54a_post, branch-netcdf, checkpoint52b_pre, checkpoint52n_post, checkpoint54b_post, checkpoint54d_post, checkpoint54e_post, checkpoint55b_post, checkpoint52m_post, checkpoint55, checkpoint53a_post, checkpoint55a_post, checkpoint52l_post, checkpoint52k_post, checkpoint54, checkpoint53b_post, checkpoint53, checkpoint52, checkpoint52d_post, checkpoint52a_post, checkpoint52b_post, checkpoint53g_post, checkpoint52f_post, checkpoint52c_post, ecco_c52_e35, checkpoint54f_post, checkpoint52a_pre, checkpoint53d_pre, checkpoint54c_post, checkpoint52i_post, checkpoint52i_pre, checkpoint51u_post, checkpoint52h_pre, checkpoint52f_pre, hrcube_1, hrcube_2, hrcube_3
Branch point for: netcdf-sm0
Changes since 1.3: +6 -13 lines
o merging from ecco-branch
o modularized cost package
  - ECCO-specific terms are now in pkg/ecco
  - cost package is driver

1 C $Header: /u/gcmpack/MITgcm/pkg/cost/cost_initvaria.F,v 1.3 2003/10/02 21:34:45 heimbach Exp $
2
3 #include "PACKAGES_CONFIG.h"
4 #include "COST_CPPOPTIONS.h"
5
6 subroutine cost_initvaria( mythid )
7
8 c ==================================================================
9 c SUBROUTINE cost_initvaria
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_initvaria
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 #ifdef ALLOW_COST_VECTOR
60 do i=1,sNx
61 objf_vector(i,bi,bj) = 0. _d 0
62 end do
63 #endif
64 #ifdef ALLOW_COST_STATE_FINAL
65 c do k=1,nr
66 do j=1,sNy
67 do i=1,sNx
68 objf_state_final(i,j,bi,bj) = 0. _d 0
69 cph No init. of cost_state_final here,
70 cph because we need it in ADM*TLM
71 end do
72 end do
73 c end do
74 #endif
75 enddo
76 enddo
77
78 #ifdef ALLOW_ECCO
79 call ecco_cost_initvaria( mythid )
80 #endif
81
82 c-- Initialise the "global" parts of the cost function.
83 _BEGIN_MASTER( mythid )
84 fc = 0. _d 0
85 _END_MASTER( mythid )
86
87 _BARRIER
88
89 return
90 end
91

  ViewVC Help
Powered by ViewVC 1.1.22