1 |
C $Header: /u/gcmpack/MITgcm/pkg/cost/Attic/cost_forcing.F,v 1.1.2.1 2002/02/05 20:23:57 heimbach Exp $ |
2 |
|
3 |
#include "COST_CPPOPTIONS.h" |
4 |
|
5 |
|
6 |
subroutine cost_forcing( |
7 |
I myiter, |
8 |
I mytime, |
9 |
I mythid |
10 |
& ) |
11 |
|
12 |
c ================================================================== |
13 |
c SUBROUTINE cost_forcing |
14 |
c ================================================================== |
15 |
c |
16 |
c o Evaluate cost function contributions of surface flux forcing. |
17 |
c Now, these are heat flux, salt flux, zonal and meridional wind |
18 |
c stress. |
19 |
c |
20 |
c started: Christian Eckert eckert@mit.edu 30-Jun-1999 |
21 |
c |
22 |
c changed: Christian Eckert eckert@mit.edu 25-Feb-2000 |
23 |
c |
24 |
c - Restructured the code in order to create a package |
25 |
c for the MITgcmUV. |
26 |
c |
27 |
c ================================================================== |
28 |
c SUBROUTINE cost_forcing |
29 |
c ================================================================== |
30 |
|
31 |
implicit none |
32 |
|
33 |
c == global variables == |
34 |
|
35 |
#include "SIZE.h" |
36 |
#include "EEPARAMS.h" |
37 |
|
38 |
#include "cal.h" |
39 |
#include "ctrl.h" |
40 |
|
41 |
c == routine arguments == |
42 |
|
43 |
integer mythid |
44 |
integer myiter |
45 |
_RL mytime |
46 |
|
47 |
c == local variables == |
48 |
|
49 |
integer startrec |
50 |
integer endrec |
51 |
|
52 |
c == end of interface == |
53 |
|
54 |
c-- Evaluate the individual cost function contributions. |
55 |
|
56 |
#if (defined (ALLOW_HFLUX_COST_CONTRIBUTION) && \ |
57 |
defined (ALLOW_HFLUX_CONTROL)) |
58 |
c-- Heat flux contribution to the cost function. |
59 |
startrec = ncvarrecstart(3) |
60 |
endrec = ncvarrecsend(3) |
61 |
call cost_heatflux ( myiter, mytime, |
62 |
& startrec, endrec, mythid ) |
63 |
#elif (defined (ALLOW_ATEMP_COST_CONTRIBUTION) && \ |
64 |
defined (ALLOW_ATEMP_CONTROL)) |
65 |
c-- Atmos. temp. contribution to the cost function. |
66 |
startrec = ncvarrecstart(7) |
67 |
endrec = ncvarrecsend(7) |
68 |
call cost_atemp ( myiter, mytime, |
69 |
& startrec, endrec, mythid ) |
70 |
#endif |
71 |
|
72 |
#if (defined (ALLOW_SFLUX_COST_CONTRIBUTION) && \ |
73 |
defined (ALLOW_SFLUX_CONTROL)) |
74 |
c-- Salt flux contribution to the cost function. |
75 |
startrec = ncvarrecstart(4) |
76 |
endrec = ncvarrecsend(4) |
77 |
call cost_saltflux ( myiter, mytime, |
78 |
& startrec, endrec, mythid ) |
79 |
#elif (defined (ALLOW_AQH_COST_CONTRIBUTION) && \ |
80 |
defined (ALLOW_AQH_CONTROL)) |
81 |
c-- Specific humidity contribution to the cost function. |
82 |
startrec = ncvarrecstart(8) |
83 |
endrec = ncvarrecsend(8) |
84 |
call cost_aqh ( myiter, mytime, |
85 |
& startrec, endrec, mythid ) |
86 |
#endif |
87 |
|
88 |
#if (defined (ALLOW_USTRESS_COST_CONTRIBUTION )&& \ |
89 |
defined (ALLOW_USTRESS_CONTROL)) |
90 |
c-- Zonal wind stress contribution to the cost function. |
91 |
startrec = ncvarrecstart(5) |
92 |
endrec = ncvarrecsend(5) |
93 |
call cost_zonstress( myiter, mytime, |
94 |
& startrec, endrec, mythid ) |
95 |
#elif (defined (ALLOW_UWIND_COST_CONTRIBUTION )&& \ |
96 |
defined (ALLOW_UWIND_CONTROL)) |
97 |
c-- Zonal wind speed contribution to the cost function. |
98 |
startrec = ncvarrecstart(9) |
99 |
endrec = ncvarrecsend(9) |
100 |
call cost_uwind( myiter, mytime, |
101 |
& startrec, endrec, mythid ) |
102 |
#endif |
103 |
|
104 |
#if (defined (ALLOW_VSTRESS_COST_CONTRIBUTION) && \ |
105 |
defined (ALLOW_VSTRESS_CONTROL)) |
106 |
c-- Meridional wind stress contribution to the cost function. |
107 |
startrec = ncvarrecstart(6) |
108 |
endrec = ncvarrecsend(6) |
109 |
call cost_merstress( myiter, mytime, |
110 |
& startrec, endrec, mythid ) |
111 |
#elif (defined (ALLOW_VWIND_COST_CONTRIBUTION) && \ |
112 |
defined (ALLOW_VWIND_CONTROL)) |
113 |
c-- Meridional wind speed contribution to the cost function. |
114 |
startrec = ncvarrecstart(10) |
115 |
endrec = ncvarrecsend(10) |
116 |
call cost_vwind( myiter, mytime, |
117 |
& startrec, endrec, mythid ) |
118 |
#endif |
119 |
|
120 |
end |