1 |
gforget |
1.10 |
C $Header: /u/gcmpack/MITgcm/pkg/ecco/cost_gencost_all.F,v 1.9 2012/08/10 19:45:26 jmc Exp $ |
2 |
jmc |
1.2 |
C $Name: $ |
3 |
gforget |
1.1 |
|
4 |
jmc |
1.9 |
#include "ECCO_OPTIONS.h" |
5 |
gforget |
1.1 |
|
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 |
heimbach |
1.8 |
#include "CTRL_SIZE.h" |
30 |
gforget |
1.1 |
#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 |
heimbach |
1.3 |
#ifdef ALLOW_GENCOST_CONTRIBUTION |
41 |
gforget |
1.1 |
c == local variables == |
42 |
|
|
|
43 |
heimbach |
1.6 |
integer i,j,k |
44 |
|
|
character*(max_len_mbuf) msgbuf |
45 |
heimbach |
1.3 |
|
46 |
heimbach |
1.6 |
integer nnzbar |
47 |
|
|
integer nnzobs |
48 |
|
|
integer nrecloc |
49 |
heimbach |
1.3 |
|
50 |
|
|
c == external functions == |
51 |
|
|
|
52 |
gforget |
1.1 |
c == end of interface == |
53 |
|
|
|
54 |
heimbach |
1.3 |
do k = 1, NGENCOST |
55 |
|
|
|
56 |
gforget |
1.7 |
if ( (gencost_name(k).NE.'sshv4-mdt').AND. |
57 |
|
|
& (gencost_name(k).NE.'sshv4-tp').AND. |
58 |
|
|
& (gencost_name(k).NE.'sshv4-ers').AND. |
59 |
|
|
& (gencost_name(k).NE.'sshv4-gfo').AND. |
60 |
|
|
& (gencost_name(k).NE.'sshv4-lsc').AND. |
61 |
|
|
& (gencost_name(k).NE.'sstv4-amsre').AND. |
62 |
|
|
& (gencost_name(k).NE.'sstv4-amsre-lsc') ) then |
63 |
|
|
|
64 |
heimbach |
1.3 |
write(msgbuf,'(a,x,i2.2)') 'ph-cost gencost #', k |
65 |
|
|
call print_message( msgbuf, standardmessageunit, |
66 |
|
|
& SQUEEZE_RIGHT , mythid) |
67 |
|
|
nnzbar = 1 |
68 |
|
|
nnzobs = 1 |
69 |
|
|
call cost_generic( |
70 |
jmc |
1.9 |
& nnzbar, gencost_barfile(k), |
71 |
|
|
& gencost_barfld(1-Olx,1-Oly,1,1,k), |
72 |
heimbach |
1.3 |
& xx_genbar_dummy(k), |
73 |
|
|
& nnzobs, gencost_datafile(k), mult_gencost(k), |
74 |
|
|
& gencost_nrec(k), modelstartdate, gencost_period(k), |
75 |
heimbach |
1.6 |
& gencost_mask(k), gencost_weight(1-Olx,1-Oly,1,1,k), |
76 |
jmc |
1.9 |
& gencost_spmin(k), gencost_spmax(k), |
77 |
heimbach |
1.3 |
& gencost_spzero(k), |
78 |
|
|
& objf_gencost(1,1,k), num_gencost(1,1,k), |
79 |
|
|
& myiter, mytime, mythid ) |
80 |
|
|
|
81 |
gforget |
1.7 |
endif |
82 |
|
|
|
83 |
heimbach |
1.3 |
end do |
84 |
|
|
|
85 |
gforget |
1.7 |
# if (defined(ALLOW_GENCOST_SSHV4)) |
86 |
gforget |
1.10 |
IF (using_cost_altim) |
87 |
|
|
& call cost_gencost_sshv4( myiter, mytime, mythid ) |
88 |
|
|
# endif /* ALLOW_GENCOST_SSHV4 */ |
89 |
gforget |
1.7 |
|
90 |
jmc |
1.9 |
# if (defined(ALLOW_GENCOST_SSTV4)) |
91 |
gforget |
1.10 |
IF (using_cost_sst) |
92 |
|
|
& call cost_gencost_sstv4( myiter, mytime, mythid ) |
93 |
|
|
# endif /* ALLOW_GENCOST_SSTV4 */ |
94 |
gforget |
1.7 |
|
95 |
heimbach |
1.3 |
#endif /* ALLOW_GENCOST_CONTRIBUTION */ |
96 |
gforget |
1.1 |
|
97 |
|
|
end |