/[MITgcm]/MITgcm/pkg/seaice/seaice_cost_init_varia.F
ViewVC logotype

Contents of /MITgcm/pkg/seaice/seaice_cost_init_varia.F

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


Revision 1.2 - (show annotations) (download)
Thu Sep 1 14:28:22 2005 UTC (18 years, 7 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint58l_post, checkpoint57t_post, checkpoint58e_post, checkpoint57v_post, checkpoint58u_post, checkpoint58w_post, checkpoint57s_post, checkpoint58r_post, checkpoint57y_post, checkpoint58n_post, checkpoint58x_post, checkpoint58t_post, checkpoint58h_post, checkpoint57y_pre, checkpoint58q_post, checkpoint58j_post, checkpoint59e, checkpoint59d, checkpoint59g, checkpoint59f, checkpoint59a, checkpoint59c, checkpoint59b, checkpoint57r_post, checkpoint59, checkpoint58, checkpoint58f_post, checkpoint57x_post, checkpoint58d_post, checkpoint58c_post, checkpoint57w_post, checkpint57u_post, checkpoint58a_post, checkpoint58i_post, checkpoint58g_post, checkpoint58o_post, checkpoint57z_post, checkpoint58y_post, checkpoint58k_post, checkpoint58v_post, checkpoint58s_post, checkpoint58p_post, checkpoint58b_post, checkpoint58m_post
Changes since 1.1: +9 -2 lines
Adding some nice ifdef's

1 C $Header: /u/gcmpack/MITgcm/pkg/seaice/seaice_cost_init_varia.F,v 1.1 2005/08/25 16:10:42 heimbach Exp $
2
3 #include "AD_CONFIG.h"
4 #include "SEAICE_OPTIONS.h"
5
6 subroutine seaice_cost_init_varia( mythid )
7
8 c ==================================================================
9 c SUBROUTINE seaice_cost_init_varia
10 c ==================================================================
11 c
12 c o Initialise the variable cost function part.
13 c added sea-ice term: menemenlis@jpl.nasa.gov 26-Feb-2003
14 c
15 c ==================================================================
16 c SUBROUTINE seaice_cost_init_varia
17 c ==================================================================
18
19 implicit none
20
21 c == global variables ==
22
23 #include "EEPARAMS.h"
24 #include "SIZE.h"
25 #include "GRID.h"
26 #ifdef ALLOW_COST
27 # include "SEAICE_COST.h"
28 #endif
29
30 c == routine arguments ==
31
32 integer mythid
33
34 #ifdef ALLOW_COST
35 c == local variables ==
36
37 integer bi,bj
38 integer itlo,ithi
39 integer jtlo,jthi
40 integer imin, imax
41 integer jmin, jmax
42 integer i,j,k
43
44 logical exst
45
46 c == external functions ==
47
48 c == end of interface ==
49 jtlo = mybylo(mythid)
50 jthi = mybyhi(mythid)
51 itlo = mybxlo(mythid)
52 ithi = mybxhi(mythid)
53 jmin = 1-OLy
54 jmax = sny+OLy
55 imin = 1-OLx
56 imax = snx+OLy
57
58 c-- Initialise adjoint of monthly mean files calculated
59 c-- in cost_averagesfields (and their ad...).
60 cph call cost_averagesinit( mythid )
61 _BARRIER
62
63 #ifndef ALLOW_TANGENTLINEAR_RUN
64 cph(
65 cph The following init. shoud not be applied if in the middle
66 cph of a divided adjoint run
67 cph)
68 c inquire( file='costfinal', exist=exst )
69 c if ( .NOT. exst) then
70 c call ecco_cost_init_barfiles( mythid )
71 c endif
72 #endif
73
74 c-- Initialize the tiled cost function contributions.
75 do bj = jtlo,jthi
76 do bi = itlo,ithi
77 objf_ice(bi,bj) = 0. _d 0
78 objf_smrarea(bi,bj) = 0. _d 0
79 c
80 num_ice(bi,bj) = 0. _d 0
81 num_smrarea(bi,bj) = 0. _d 0
82 enddo
83 enddo
84
85 k = 1
86 do bj = jtlo,jthi
87 do bi = itlo,ithi
88 do j = jmin,jmax
89 do i = imin,imax
90 #ifdef ALLOW_TMI_SST_COST_CONTRIBUTION
91 c if (_hFacC(i,j,k,bi,bj) .eq. 0.) then
92 c tmimask(i,j,bi,bj) = 0. _d 0
93 c else
94 c tmimask(i,j,bi,bj) = 1. _d 0
95 c endif
96 c tmidat(i,j,bi,bj) = 0. _d 0
97 #endif
98 enddo
99 enddo
100 enddo
101 enddo
102
103 _BARRIER
104
105 #endif
106
107 return
108 end
109

  ViewVC Help
Powered by ViewVC 1.1.22