1 |
C $Header: /u/gcmpack/MITgcm/pkg/ecco/cost_gencost_all.F,v 1.11 2012/10/02 01:40:03 gforget Exp $ |
2 |
C $Name: $ |
3 |
|
4 |
#include "ECCO_OPTIONS.h" |
5 |
|
6 |
|
7 |
subroutine cost_gencost_all( myiter, mytime, mythid ) |
8 |
|
9 |
c ================================================================== |
10 |
c SUBROUTINE cost_gencost_all |
11 |
c ================================================================== |
12 |
c |
13 |
c o Evaluate user defined penalty terms |
14 |
c |
15 |
c ================================================================== |
16 |
c SUBROUTINE cost_gencost_all |
17 |
c ================================================================== |
18 |
|
19 |
implicit none |
20 |
|
21 |
c == global variables == |
22 |
|
23 |
#include "SIZE.h" |
24 |
#include "EEPARAMS.h" |
25 |
#include "PARAMS.h" |
26 |
#include "GRID.h" |
27 |
|
28 |
#include "cal.h" |
29 |
#include "CTRL_SIZE.h" |
30 |
#include "ctrl.h" |
31 |
#include "ctrl_dummy.h" |
32 |
#include "ecco_cost.h" |
33 |
|
34 |
c == routine arguments == |
35 |
|
36 |
integer mythid |
37 |
integer myiter |
38 |
_RL mytime |
39 |
|
40 |
#ifdef ALLOW_GENCOST_CONTRIBUTION |
41 |
c == local variables == |
42 |
|
43 |
integer i,j,k |
44 |
character*(max_len_mbuf) msgbuf |
45 |
|
46 |
integer nnzbar |
47 |
integer nnzobs |
48 |
integer nrecloc |
49 |
|
50 |
c == external functions == |
51 |
|
52 |
c == end of interface == |
53 |
|
54 |
do k = 1, NGENCOST |
55 |
|
56 |
if ( (using_gencost(k)).AND.( gencost_flag(k).EQ.1 ) ) then |
57 |
|
58 |
write(msgbuf,'(a,x,i2.2)') 'ph-cost gencost #', k |
59 |
call print_message( msgbuf, standardmessageunit, |
60 |
& SQUEEZE_RIGHT , mythid) |
61 |
nnzbar = 1 |
62 |
nnzobs = 1 |
63 |
call cost_generic( |
64 |
& nnzbar, gencost_barfile(k), |
65 |
& gencost_barfld(1-Olx,1-Oly,1,1,k), |
66 |
& xx_genbar_dummy(k), |
67 |
& nnzobs, gencost_datafile(k), mult_gencost(k), |
68 |
& gencost_nrec(k), modelstartdate, gencost_period(k), |
69 |
& gencost_mask(k), gencost_weight(1-Olx,1-Oly,1,1,k), |
70 |
& gencost_spmin(k), gencost_spmax(k), |
71 |
& gencost_spzero(k), |
72 |
& objf_gencost(1,1,k), num_gencost(1,1,k), |
73 |
& myiter, mytime, mythid ) |
74 |
|
75 |
endif |
76 |
|
77 |
end do |
78 |
|
79 |
# if (defined(ALLOW_GENCOST_SSHV4)) |
80 |
IF (using_cost_altim) |
81 |
& call cost_gencost_sshv4( myiter, mytime, mythid ) |
82 |
# endif /* ALLOW_GENCOST_SSHV4 */ |
83 |
|
84 |
# if (defined(ALLOW_GENCOST_SSTV4)) |
85 |
IF (using_cost_sst) |
86 |
& call cost_gencost_sstv4( myiter, mytime, mythid ) |
87 |
# endif /* ALLOW_GENCOST_SSTV4 */ |
88 |
|
89 |
#ifdef ALLOW_GENCOST_SEAICEV4 |
90 |
IF (using_cost_seaice) |
91 |
& call cost_gencost_seaicev4( mythid ) |
92 |
# endif /* ALLOW_GENCOST_SEAICEV4 */ |
93 |
|
94 |
#endif /* ALLOW_GENCOST_CONTRIBUTION */ |
95 |
|
96 |
end |