/[MITgcm]/MITgcm/pkg/ecco/ecco_cost_init_fixed.F
ViewVC logotype

Contents of /MITgcm/pkg/ecco/ecco_cost_init_fixed.F

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


Revision 1.2 - (show annotations) (download)
Mon Nov 17 22:32:33 2003 UTC (20 years, 7 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint57o_post, checkpoint52l_pre, checkpoint52e_pre, hrcube4, checkpoint52n_post, checkpoint52j_post, checkpoint53d_post, checkpoint54a_pre, checkpoint57m_post, checkpoint55c_post, checkpoint54e_post, checkpoint52e_post, checkpoint54a_post, checkpoint53c_post, checkpoint57k_post, checkpoint55d_pre, checkpoint57d_post, checkpoint57g_post, checkpoint57b_post, checkpoint57c_pre, checkpoint55j_post, checkpoint56b_post, checkpoint57i_post, hrcube_1, checkpoint57e_post, branch-netcdf, checkpoint52d_pre, checkpoint52l_post, checkpoint55h_post, checkpoint52k_post, checkpoint52b_pre, checkpoint57g_pre, checkpoint54b_post, checkpoint53b_pre, checkpoint55b_post, checkpoint54d_post, checkpoint56c_post, checkpoint52m_post, checkpoint55, checkpoint53a_post, checkpoint57f_pre, checkpoint57a_post, checkpoint54, checkpoint54f_post, checkpoint53b_post, checkpoint55g_post, checkpoint55f_post, checkpoint57a_pre, checkpoint55i_post, checkpoint57, checkpoint56, checkpoint53, checkpoint52d_post, eckpoint57e_pre, checkpoint52a_post, checkpoint57h_done, checkpoint52b_post, checkpoint53g_post, checkpoint52f_post, checkpoint57n_post, checkpoint52c_post, checkpoint57p_post, checkpoint57f_post, checkpoint57q_post, hrcube5, checkpoint57c_post, checkpoint55e_post, checkpoint52i_post, checkpoint52j_pre, checkpoint53f_post, checkpoint55a_post, checkpoint53d_pre, checkpoint54c_post, checkpoint57j_post, checkpoint57h_pre, checkpoint57l_post, checkpoint52i_pre, checkpoint52h_pre, checkpoint52f_pre, checkpoint57h_post, hrcube_2, hrcube_3, checkpoint56a_post, checkpoint55d_post
Branch point for: netcdf-sm0
Changes since 1.1: +2 -1 lines
fixes for DIVA

1 C $Header: /u/gcmpack/MITgcm/pkg/ecco/ecco_cost_init_fixed.F,v 1.1 2003/11/06 22:10:08 heimbach Exp $
2
3 #include "PACKAGES_CONFIG.h"
4 #include "AD_CONFIG.h"
5 #include "COST_CPPOPTIONS.h"
6
7 subroutine ecco_cost_init_fixed( mythid )
8
9 c ==================================================================
10 c SUBROUTINE ecco_cost_init_fixed
11 c ==================================================================
12 c
13 c o Set contributions to the cost function and the cost function
14 c itself to zero. The cost function and the individual contribu-
15 c tions are defined in the header file "ecco_cost.h".
16 c
17 c started: Christian Eckert eckert@mit.edu 30-Jun-1999
18 c
19 c changed: Christian Eckert eckert@mit.edu 25-Feb-2000
20 c
21 c - Restructured the code in order to create a package
22 c for the MITgcmUV.
23 c
24 c changed: Ralf Giering 18-Jan-2001
25 c
26 c - move namelist reading to cost_readparms.F
27 c
28 c ==================================================================
29 c SUBROUTINE ecco_cost_init_fixed
30 c ==================================================================
31
32 implicit none
33
34 c == global variables ==
35
36 #include "EEPARAMS.h"
37 #include "SIZE.h"
38 #include "GRID.h"
39 #include "PARAMS.h"
40
41 #include "cal.h"
42 #include "ecco_cost.h"
43
44 c == routine arguments ==
45
46 integer mythid
47
48 c == local variables ==
49
50 integer tempDate1(4)
51 integer tempDate2(4)
52
53 logical exst
54
55 c == external functions ==
56
57 integer cal_IntMonths
58 external cal_IntMonths
59 integer cal_IntDays
60 external cal_IntDays
61
62 c == end of interface ==
63
64 #ifdef ALLOW_CAL
65
66 c-- The number of monthly and daily averages generated by the
67 c-- current model integration.
68 nmonsrec = cal_IntMonths( mythid )
69 ndaysrec = cal_IntDays( mythid )
70
71 _BEGIN_MASTER( myThid )
72
73 c-- Get the complete dates of the ...
74 c-- ... TMI data.
75 call cal_FullDate( tmistartdate1, tmistartdate2,
76 & tmistartdate, mythid )
77 c-- ... SST data.
78 call cal_FullDate( sststartdate1, sststartdate2,
79 & sststartdate, mythid )
80 c-- ... SSS data.
81 call cal_FullDate( sssstartdate1, sssstartdate2,
82 & sssstartdate, mythid )
83 c-- ... T/P data.
84 call cal_FullDate( topexstartdate1, topexstartdate2,
85 & topexstartdate, mythid )
86 c-- ... ERS data.
87 call cal_FullDate( ersstartdate1, ersstartdate2,
88 & ersstartdate, mythid )
89 c-- ... SCAT data.
90 call cal_FullDate( scatstartdate1, scatstartdate2,
91 & scatxstartdate, mythid )
92 call cal_FullDate( scatstartdate1, scatstartdate2,
93 & scatystartdate, mythid )
94 c-- ... ARGO data.
95 call cal_FullDate( argotstartdate1, argotstartdate2,
96 & argotstartdate, mythid )
97 call cal_FullDate( argosstartdate1, argotstartdate2,
98 & argosstartdate, mythid )
99
100 c-- Sea-ice cost function start and stop times in model seconds.
101
102 call cal_FullDate ( costIceStart1 , costIceStart2,
103 & tempDate1 , mythid )
104 call cal_TimePassed( modelstartdate, tempDate1 ,
105 & tempDate2 , mythid )
106 call cal_ToSeconds ( tempDate2 , costIceStart , mythid )
107 costIceStart = costIceStart + startTime
108
109 call cal_FullDate ( costIceEnd1 , costIceEnd2 ,
110 & tempDate1 , mythid )
111 call cal_TimePassed( modelstartdate, tempDate1 ,
112 & tempDate2 , mythid )
113 call cal_ToSeconds ( tempDate2 , costIceEnd , mythid )
114 costIceEnd = costIceEnd + startTime
115
116 _END_MASTER( mythid )
117
118 #endif /* ALLOW_CAL */
119
120 c-- Get the weights that are to be used for the individual cost
121 c-- function contributions.
122 call ecco_cost_weights( mythid )
123
124 c-- Initialise adjoint of monthly mean files calculated
125 c-- in cost_averagesfields (and their ad...).
126 cph(
127 cph The following init. shoud not be applied if in the middle
128 cph of a divided adjoint run
129 cph)
130 #ifndef ALLOW_TANGENTLINEAR_RUN
131 cph!!! and I think it needs to be seen by TAF
132 cph!!! for repeated TLM runs
133 cph!!!
134 inquire( file='costfinal', exist=exst )
135 if ( .NOT. exst) then
136 call ecco_cost_init_barfiles( mythid )
137 endif
138 #endif
139
140 c-- Summarize the cost function's setup.
141 _BEGIN_MASTER( mythid )
142 call ecco_cost_summary( mythid )
143 _END_MASTER( mythid )
144
145 _BARRIER
146
147 end

  ViewVC Help
Powered by ViewVC 1.1.22