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

Contents of /MITgcm/pkg/ecco/cost_gen_transport.F

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


Revision 1.3 - (show annotations) (download)
Tue Oct 9 00:02:50 2007 UTC (16 years, 7 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint60, checkpoint61, checkpoint59q, checkpoint59p, checkpoint59r, checkpoint59m, checkpoint59l, checkpoint59o, checkpoint59n, checkpoint59i, checkpoint59k, checkpoint59j, checkpoint61d, checkpoint61b, checkpoint61c, checkpoint61a
Changes since 1.2: +4 -3 lines
add missing cvs $Header:$ or $Name:$

1 C $Header: $
2 C $Name: $
3
4 #include "COST_CPPOPTIONS.h"
5
6
7 subroutine cost_gen_transport(
8 I myiter,
9 I mytime,
10 I mythid
11 & )
12
13 c ==================================================================
14 c SUBROUTINE cost_gen_transport
15 c ==================================================================
16 c
17 c o Evaluate cost function contribution for transports
18 c
19 c ==================================================================
20 c SUBROUTINE cost_ssh
21 c ==================================================================
22
23 implicit none
24
25 c == global variables ==
26
27 #include "EEPARAMS.h"
28 #include "SIZE.h"
29 #include "PARAMS.h"
30
31 #include "ecco_cost.h"
32 #include "ctrl.h"
33 #include "ctrl_dummy.h"
34 #include "optim.h"
35 #include "DYNVARS.h"
36 #ifdef ALLOW_PROFILES
37 #include "profiles.h"
38 #endif
39
40 c == routine arguments ==
41
42 integer myiter
43 _RL mytime
44 integer mythid
45
46 #ifdef ALLOW_TRANSPORT_COST_CONTRIBUTION
47 c == local variables ==
48
49 integer bi,bj
50 integer itlo,ithi
51 integer jtlo,jthi
52 integer irec
53 integer ilps
54 logical doglobalread
55 logical ladinit
56 _RL ftmp
57 character*(max_len_mbuf) msgbuf
58
59 c == external functions ==
60
61 integer ilnblnk
62 external ilnblnk
63
64 c == end of interface ==
65
66 jtlo = mybylo(mythid)
67 jthi = mybyhi(mythid)
68 itlo = mybxlo(mythid)
69 ithi = mybxhi(mythid)
70
71 c-- Loop over records for the second time.
72 do irec = 1, ndaysrec
73
74 ftmp = 0. _d 0
75 do bj = jtlo,jthi
76 do bi = itlo,ithi
77 ftmp = ftmp + transpbar(irec,bi,bj)
78 enddo
79 enddo
80 _GLOBAL_SUM_R8( ftmp , myThid )
81
82 write(msgbuf,'(A,I,2(X,P2E22.14))')
83 & 'ph-cost-transport FS: day, 1-model, 2-obs ',
84 & irec, ftmp, transpobs(irec)
85 call print_message( msgbuf, standardmessageunit,
86 & SQUEEZE_RIGHT , mythid)
87
88 if ( ftmp.NE.0. .AND. wtransp(irec).NE.0. ) then
89 objf_transp = objf_transp +
90 & wtransp(irec)*( ftmp - transpobs(irec) )**2
91 num_transp = num_transp + 1. _d 0
92 endif
93
94 enddo
95
96 #endif /* ifdef ALLOW_TRANSPORT_COST_CONTRIBUTION */
97
98 end

  ViewVC Help
Powered by ViewVC 1.1.22