/[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.5 - (hide annotations) (download)
Wed Sep 30 15:45:57 2009 UTC (14 years, 8 months ago) by mlosch
Branch: MAIN
CVS Tags: checkpoint63l, checkpoint63h, checkpoint63i, checkpoint63j, checkpoint63k, checkpoint63d, checkpoint63e, checkpoint63f, checkpoint63g, checkpoint63a, checkpoint63b, checkpoint63c, checkpoint62, checkpoint63, checkpoint62c, checkpoint62b, checkpoint62a, checkpoint62g, checkpoint62f, checkpoint62e, checkpoint62d, checkpoint62k, checkpoint62j, checkpoint62i, checkpoint62h, checkpoint62o, checkpoint62n, checkpoint62m, checkpoint62l, checkpoint62s, checkpoint62r, checkpoint62q, checkpoint62p, checkpoint62w, checkpoint62v, checkpoint62u, checkpoint62t, checkpoint62z, checkpoint62y, checkpoint62x, checkpoint61w, checkpoint61z, checkpoint61x, checkpoint61y
Changes since 1.4: +4 -3 lines
catch the case of an empty filename

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

  ViewVC Help
Powered by ViewVC 1.1.22