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

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

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


Revision 1.1 - (hide annotations) (download)
Thu Nov 6 22:10:08 2003 UTC (20 years, 8 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint52a_pre, checkpoint52, ecco_c52_e35, checkpoint51u_post
o merging from ecco-branch
o pkg/ecco now containes ecco-specific part of cost function
o top level routines the_main_loop, forward_step
  supersede those in model/src/
  previous input data.cost now in data.ecco
  (new namelist ecco_cost_nml)

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

  ViewVC Help
Powered by ViewVC 1.1.22