/[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.5 - (hide annotations) (download)
Mon Oct 27 22:32:55 2003 UTC (20 years, 7 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint52l_pre, hrcube4, hrcube5, checkpoint52d_pre, checkpoint52j_pre, checkpoint54d_post, checkpoint54e_post, checkpoint52l_post, checkpoint52k_post, checkpoint55, checkpoint54, checkpoint53, checkpoint52, checkpoint52f_post, checkpoint54f_post, checkpoint51t_post, checkpoint52i_pre, hrcube_1, hrcube_2, hrcube_3, checkpoint51s_post, checkpoint55c_post, checkpoint52e_pre, checkpoint52e_post, checkpoint53d_post, checkpoint52b_pre, checkpoint54b_post, checkpoint52m_post, checkpoint55g_post, checkpoint51q_post, checkpoint52b_post, checkpoint52c_post, checkpoint52f_pre, checkpoint55d_post, checkpoint54a_pre, checkpoint53c_post, checkpoint55d_pre, checkpoint54a_post, checkpoint55h_post, checkpoint51r_post, checkpoint55b_post, checkpoint53a_post, checkpoint55f_post, checkpoint52d_post, checkpoint53g_post, checkpoint52a_pre, checkpoint52i_post, checkpoint52h_pre, checkpoint53f_post, checkpoint52j_post, branch-netcdf, checkpoint52n_post, checkpoint53b_pre, checkpoint55a_post, checkpoint51o_post, checkpoint53b_post, checkpoint52a_post, ecco_c52_e35, checkpoint53d_pre, checkpoint55e_post, checkpoint54c_post, checkpoint51p_post, checkpoint51u_post
Branch point for: branch-nonh, netcdf-sm0
Changes since 1.4: +5 -7 lines
o cleaning ALLOW_GRADIENT_CHECK -> ALLOW_GRDCHK
o cleaning some ALLOW_TANGENTLINEAR_RUN -> ALLOW_AUTODIFF
o bug fix in find_alpha.F for MDJWF:
  - modif. to alpha = 1/D*( dN/dT - rho*dD/Dt) to account for
    change rho -> rho-rhoConst
  - replace call find_rho to find_rhonum

1 edhill 1.4 C
2 heimbach 1.5 C $Header: /u/gcmpack/MITgcm/pkg/cost/cost_dependent_init.F,v 1.4 2003/10/23 04:41:40 edhill Exp $
3     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     fc = 0.0
53    
54 heimbach 1.5 #ifdef ALLOW_AUTODIFF
55 heimbach 1.1
56     adfc = 1.0
57     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     c do k=1,nr
67     do j=1,sNy
68 heimbach 1.1 do i=1,sNx
69 heimbach 1.3 objf_state_final(i,j,bi,bj) = 0. _d 0
70     cph No init. of cost_state_final here,
71     cph because we need it in ADM*TLM
72 heimbach 1.1 end do
73 heimbach 1.3 end do
74     c end do
75 heimbach 1.1 #endif
76     enddo
77     enddo
78    
79 heimbach 1.5 #endif /* ALLOW_AUTODIFF */
80 heimbach 1.1
81     return
82     end
83    

  ViewVC Help
Powered by ViewVC 1.1.22