/[MITgcm]/MITgcm_contrib/gael/pkg/smooth/smooth_inv_forcing.F
ViewVC logotype

Contents of /MITgcm_contrib/gael/pkg/smooth/smooth_inv_forcing.F

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


Revision 1.1 - (show annotations) (download)
Tue Jun 19 18:23:18 2007 UTC (18 years, 1 month ago) by gforget
Branch: MAIN
CVS Tags: HEAD
pkg/smooth preliminary version

1 C $Header: /u/gcmpack/MITgcm/pkg/ecco/cost_forcing.F,v 1.10 2006/03/02 02:53:23 heimbach Exp $
2
3 cc#include "COST_CPPOPTIONS.h"
4 #include "CPP_OPTIONS.h"
5
6 subroutine smooth_inv_forcing( mythid )
7
8 c ==================================================================
9 c SUBROUTINE cost_forcing
10 c ==================================================================
11 c
12 c o Evaluate cost function contributions of surface flux forcing.
13 c Now, these are heat flux, salt flux, zonal and meridional wind
14 c stress.
15 c
16 c started: Christian Eckert eckert@mit.edu 30-Jun-1999
17 c
18 c changed: Christian Eckert eckert@mit.edu 25-Feb-2000
19 c
20 c - Restructured the code in order to create a package
21 c for the MITgcmUV.
22 c
23 c ==================================================================
24 c SUBROUTINE cost_forcing
25 c ==================================================================
26
27 implicit none
28
29 c == global variables ==
30
31 #include "SIZE.h"
32 #include "EEPARAMS.h"
33 #include "PARAMS.h"
34 #include "GRID.h"
35
36 #include "cal.h"
37 #ifdef ALLOW_CTRL
38 #include "ctrl.h"
39 #include "ctrl_dummy.h"
40 #endif
41 #ifdef ALLOW_COST
42 #include "ecco_cost.h"
43 #endif
44 #include "smooth_inv.h"
45
46 c == routine arguments ==
47
48 integer mythid
49 integer myiter
50 _RL mytime
51
52 c == local variables ==
53
54 integer startrec
55 integer endrec
56
57 c == end of interface ==
58
59 #ifdef ALLOW_SMOOTH_INV
60
61 c-- Evaluate the individual cost function contributions.
62
63 #if (defined (ALLOW_HFLUX_COST_CONTRIBUTION) && \
64 defined (ALLOW_HFLUX_CONTROL))
65 c-- Heat flux contribution to the cost function.
66 startrec = ncvarrecstart(3)
67 endrec = ncvarrecsend(3)
68 call smooth_inv_forcing_gen(startrec, endrec, maskC,
69 & xx_hflux_file, xx_hfluxSMmR_file, xx_hfluxREF_file,
70 & xx_hflux_dummy, xx_hfluxSMmR_dummy, mythid)
71 #elif (defined (ALLOW_ATEMP_COST_CONTRIBUTION) && \
72 defined (ALLOW_ATEMP_CONTROL))
73 c-- Atmos. temp. contribution to the cost function.
74 startrec = ncvarrecstart(7)
75 endrec = ncvarrecsend(7)
76 call smooth_inv_forcing_gen(startrec, endrec, maskC,
77 & xx_atemp_file, xx_atempSMmR_file, xx_atempREF_file,
78 & xx_atemp_dummy, xx_atempSMmR_dummy, mythid)
79 #endif
80
81 #if (defined (ALLOW_SFLUX_COST_CONTRIBUTION) && \
82 defined (ALLOW_SFLUX_CONTROL))
83 c-- Salt flux contribution to the cost function.
84 startrec = ncvarrecstart(4)
85 endrec = ncvarrecsend(4)
86 call smooth_inv_forcing_gen(startrec, endrec, maskC,
87 & xx_sflux_file, xx_sfluxSMmR_file, xx_sfluxREF_file,
88 & xx_sflux_dummy, xx_sfluxSMmR_dummy, mythid)
89 #elif (defined (ALLOW_AQH_COST_CONTRIBUTION) && \
90 defined (ALLOW_AQH_CONTROL))
91 c-- Specific humidity contribution to the cost function.
92 startrec = ncvarrecstart(8)
93 endrec = ncvarrecsend(8)
94 call smooth_inv_forcing_gen(startrec, endrec, maskC,
95 & xx_aqh_file, xx_aqhSMmR_file, xx_aqhREF_file,
96 & xx_aqh_dummy, xx_aqhSMmR_dummy, mythid)
97 #endif
98
99 #if (defined (ALLOW_USTRESS_COST_CONTRIBUTION )&& \
100 defined (ALLOW_USTRESS_CONTROL))
101 c-- Zonal wind stress contribution to the cost function.
102 startrec = ncvarrecstart(5)
103 endrec = ncvarrecsend(5)
104 call smooth_inv_forcing_gen(startrec, endrec, maskW,
105 & xx_tauu_file, xx_tauuSMmR_file, xx_tauuREF_file,
106 & xx_tauu_dummy, xx_tauuSMmR_dummy, mythid)
107 #elif (defined (ALLOW_UWIND_COST_CONTRIBUTION )&& \
108 defined (ALLOW_UWIND_CONTROL))
109 c-- Zonal wind speed contribution to the cost function.
110 startrec = ncvarrecstart(9)
111 endrec = ncvarrecsend(9)
112 call smooth_inv_forcing_gen(startrec, endrec, maskW,
113 & xx_uwind_file, xx_uwindSMmR_file, xx_uwindREF_file,
114 & xx_uwind_dummy, xx_uwindSMmR_dummy, mythid)
115 #endif
116
117 #if (defined (ALLOW_VSTRESS_COST_CONTRIBUTION) && \
118 defined (ALLOW_VSTRESS_CONTROL))
119 c-- Meridional wind stress contribution to the cost function.
120 startrec = ncvarrecstart(6)
121 endrec = ncvarrecsend(6)
122 call smooth_inv_forcing_gen(startrec, endrec, maskS,
123 & xx_tauv_file, xx_tauvSMmR_file, xx_tauvREF_file,
124 & xx_tauv_dummy, xx_tauvSMmR_dummy, mythid)
125 #elif (defined (ALLOW_VWIND_COST_CONTRIBUTION) && \
126 defined (ALLOW_VWIND_CONTROL))
127 c-- Meridional wind speed contribution to the cost function.
128 startrec = ncvarrecstart(10)
129 endrec = ncvarrecsend(10)
130 call smooth_inv_forcing_gen(startrec, endrec, maskS,
131 & xx_vwind_file, xx_vwindSMmR_file, xx_vwindREF_file,
132 & xx_vwind_dummy, xx_vwindSMmR_dummy, mythid)
133 #endif
134
135 #if (defined (ALLOW_PRECIP_COST_CONTRIBUTION) && \
136 defined (ALLOW_PRECIP_CONTROL))
137 c-- Atmos. precip. contribution to the cost function.
138 startrec = ncvarrecstart(32)
139 endrec = ncvarrecsend(32)
140 call smooth_inv_forcing_gen(startrec, endrec, maskC,
141 & xx_precip_file, xx_precipSMmR_file, xx_precipREF_file,
142 & xx_precip_dummy, xx_precipSMmR_dummy, mythid)
143 #endif
144
145 #if (defined (ALLOW_SWFLUX_COST_CONTRIBUTION) && \
146 defined (ALLOW_SWFLUX_CONTROL))
147 c-- Atmos. swflux. contribution to the cost function.
148 startrec = ncvarrecstart(33)
149 endrec = ncvarrecsend(33)
150 call smooth_inv_forcing_gen(startrec, endrec, maskC,
151 & xx_swflux_file, xx_swfluxSMmR_file, xx_swfluxREF_file,
152 & xx_swflux_dummy, xx_swfluxSMmR_dummy, mythid)
153 #endif
154
155 #if (defined (ALLOW_SWDOWN_COST_CONTRIBUTION) && \
156 defined (ALLOW_SWDOWN_CONTROL))
157 c-- Atmos. swdown. contribution to the cost function.
158 startrec = ncvarrecstart(33)
159 endrec = ncvarrecsend(33)
160 call smooth_inv_forcing_gen(startrec, endrec, maskC,
161 & xx_swdown_file, xx_swdownSMmR_file, xx_swdownREF_file,
162 & xx_swdown_dummy, xx_swdownSMmR_dummy, mythid)
163 #endif
164
165 #endif
166
167 end

  ViewVC Help
Powered by ViewVC 1.1.22