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

Annotation of /MITgcm/pkg/seaice/seaice_cost_init_fixed.F

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


Revision 1.1 - (hide annotations) (download)
Thu Aug 25 16:10:42 2005 UTC (18 years, 8 months ago) by heimbach
Branch: MAIN
Moving seaice-related cost to pkg/seaice/

1 heimbach 1.1 C $Header: /u/gcmpack/MITgcm/pkg/ecco/ecco_cost_init_fixed.F,v 1.2 2003/11/17 22:32:33 heimbach Exp $
2    
3     #include "PACKAGES_CONFIG.h"
4     #include "AD_CONFIG.h"
5     #include "SEAICE_OPTIONS.h"
6    
7     subroutine seaice_cost_init_fixed( mythid )
8    
9     c ==================================================================
10     c SUBROUTINE seaice_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 "SEAICE_COST.h".
16     c
17     c ==================================================================
18     c SUBROUTINE seaice_cost_init_fixed
19     c ==================================================================
20    
21     implicit none
22    
23     c == global variables ==
24    
25     #include "EEPARAMS.h"
26     #include "SIZE.h"
27     #include "GRID.h"
28     #include "PARAMS.h"
29     #include "SEAICE_COST.h"
30    
31     #ifdef ALLOW_CAL
32     # include "cal.h"
33     #endif
34    
35     c == routine arguments ==
36    
37     integer mythid
38    
39     c == local variables ==
40    
41     integer tempDate1(4)
42     integer tempDate2(4)
43    
44     logical exst
45    
46     c == external functions ==
47    
48     #ifdef ALLOW_CAL
49     integer cal_IntMonths
50     external cal_IntMonths
51     integer cal_IntDays
52     external cal_IntDays
53     #endif
54    
55     c == end of interface ==
56    
57     #ifdef ALLOW_CAL
58    
59     _BEGIN_MASTER( myThid )
60    
61     c-- Sea-ice cost function start and stop times in model seconds.
62    
63     call cal_FullDate ( costIceStart1 , costIceStart2,
64     & tempDate1 , mythid )
65     call cal_TimePassed( modelstartdate, tempDate1 ,
66     & tempDate2 , mythid )
67     call cal_ToSeconds ( tempDate2 , costIceStart , mythid )
68     costIceStart = costIceStart + startTime
69    
70     call cal_FullDate ( costIceEnd1 , costIceEnd2 ,
71     & tempDate1 , mythid )
72     call cal_TimePassed( modelstartdate, tempDate1 ,
73     & tempDate2 , mythid )
74     call cal_ToSeconds ( tempDate2 , costIceEnd , mythid )
75     costIceEnd = costIceEnd + startTime
76    
77     _END_MASTER( mythid )
78    
79     #endif /* ALLOW_CAL */
80    
81     c-- Get the weights that are to be used for the individual cost
82     c-- function contributions.
83     cph call seaice_cost_weights( mythid )
84    
85     c-- Initialise adjoint of monthly mean files calculated
86     c-- in cost_averagesfields (and their ad...).
87     cph(
88     cph The following init. shoud not be applied if in the middle
89     cph of a divided adjoint run
90     cph)
91     #ifndef ALLOW_TANGENTLINEAR_RUN
92     cph!!! and I think it needs to be seen by TAF
93     cph!!! for repeated TLM runs
94     cph!!!
95     inquire( file='costfinal', exist=exst )
96     if ( .NOT. exst) then
97     cph call seaice_cost_init_barfiles( mythid )
98     endif
99     #endif
100    
101     _BARRIER
102    
103     end

  ViewVC Help
Powered by ViewVC 1.1.22