/[MITgcm]/MITgcm/pkg/ctrl/ctrl_map_forcing.F
ViewVC logotype

Contents of /MITgcm/pkg/ctrl/ctrl_map_forcing.F

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


Revision 1.6 - (show annotations) (download)
Fri Jul 18 21:10:16 2003 UTC (20 years, 9 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint51k_post, checkpoint52l_pre, hrcube4, hrcube5, checkpoint52d_pre, checkpoint52j_pre, checkpoint51o_pre, checkpoint54d_post, checkpoint54e_post, checkpoint51l_post, checkpoint52l_post, checkpoint52k_post, checkpoint55, checkpoint54, checkpoint53, checkpoint52, checkpoint52f_post, checkpoint54f_post, checkpoint51f_post, checkpoint51d_post, checkpoint51t_post, checkpoint51n_post, checkpoint55i_post, checkpoint52i_pre, hrcube_1, hrcube_2, hrcube_3, checkpoint51s_post, checkpoint55c_post, checkpoint51j_post, checkpoint52e_pre, checkpoint52e_post, checkpoint51n_pre, checkpoint53d_post, checkpoint52b_pre, checkpoint54b_post, checkpoint51l_pre, checkpoint52m_post, checkpoint55g_post, checkpoint51q_post, checkpoint52b_post, checkpoint52c_post, checkpoint51h_pre, checkpoint52f_pre, checkpoint55d_post, checkpoint54a_pre, checkpoint53c_post, checkpoint55d_pre, checkpoint55j_post, branchpoint-genmake2, checkpoint54a_post, checkpoint55h_post, checkpoint51r_post, checkpoint51i_post, checkpoint55b_post, checkpoint53a_post, checkpoint55f_post, checkpoint52d_post, checkpoint53g_post, checkpoint52a_pre, checkpoint52i_post, checkpoint51i_pre, checkpoint52h_pre, checkpoint53f_post, checkpoint52j_post, branch-netcdf, checkpoint52n_post, checkpoint53b_pre, checkpoint51e_post, checkpoint55a_post, checkpoint51o_post, checkpoint51f_pre, checkpoint53b_post, checkpoint52a_post, checkpoint51g_post, ecco_c52_e35, checkpoint51m_post, checkpoint53d_pre, checkpoint55e_post, checkpoint54c_post, checkpoint51p_post, checkpoint51u_post
Branch point for: branch-genmake2, branch-nonh, tg2-branch, netcdf-sm0, checkpoint51n_branch
Changes since 1.5: +6 -6 lines
Merging from ecco-branch:
Use cluster local disks for purely local I/O
vs. globally visible disks needed for ctrl stuff.

1
2 #include "CTRL_CPPOPTIONS.h"
3
4 CBOP
5 C !ROUTINE: ctrl_map_ini
6 C !INTERFACE:
7 SUBROUTINE CTRL_MAP_FORCING(myThid)
8
9 C !DESCRIPTION: \bv
10 c *=================================================================
11 c | SUBROUTINE CTRL_MAP_FORCING
12 c | Add the surface flux anomalies of the control vector
13 c | to the model flux fields and update the tile halos.
14 c | The control vector is defined in the header file "ctrl.h".
15 c *=================================================================
16 C \ev
17
18 C !USES:
19 IMPLICIT NONE
20
21 C == Global variables ===
22 #include "SIZE.h"
23 #include "EEPARAMS.h"
24 #include "PARAMS.h"
25 #include "FFIELDS.h"
26 #include "DYNVARS.h"
27 #include "GRID.h"
28 #include "ctrl.h"
29 #include "ctrl_dummy.h"
30 #include "optim.h"
31
32 C !INPUT/OUTPUT PARAMETERS:
33 C == Routine arguments ==
34 C myThid - Thread number for this instance of the routine.
35 INTEGER myThid
36
37 C !LOCAL VARIABLES:
38 C == Local variables ==
39 integer bi,bj
40 integer i,j,k
41 integer itlo,ithi
42 integer jtlo,jthi
43 integer jmin,jmax
44 integer imin,imax
45 integer il
46
47 logical equal
48 logical doglobalread
49 logical ladinit
50
51 character*( 80) fnametauu
52 character*( 80) fnametauv
53 character*( 80) fnamesflux
54 character*( 80) fnamehflux
55 character*( 80) fnamesss
56 character*( 80) fnamesst
57
58 c == external ==
59 integer ilnblnk
60 external ilnblnk
61
62 c == end of interface ==
63 CEOP
64
65 jtlo = mybylo(mythid)
66 jthi = mybyhi(mythid)
67 itlo = mybxlo(mythid)
68 ithi = mybxhi(mythid)
69 jmin = 1
70 jmax = sny
71 imin = 1
72 imax = snx
73
74 doglobalread = .false.
75 ladinit = .false.
76
77 #ifdef ALLOW_TAUU0_CONTROL
78 c-- tauu0.
79 il=ilnblnk( xx_tauu_file )
80 write(fnametauu(1:80),'(2a,i10.10)')
81 & xx_tauu_file(1:il),'.',optimcycle
82 call active_read_xy_loc ( fnametauu, tmpfld2d, 1,
83 & doglobalread, ladinit, optimcycle,
84 & mythid, xx_tauu_dummy )
85 do bj = jtlo,jthi
86 do bi = itlo,ithi
87 do j = jmin,jmax
88 do i = imin,imax
89 fu(i,j,bi,bj) = fu(i,j,bi,bj) + tmpfld2d(i,j,bi,bj)
90 enddo
91 enddo
92 enddo
93 enddo
94 #endif
95
96 #ifdef ALLOW_TAUV0_CONTROL
97 c-- tauv0.
98 il=ilnblnk( xx_tauv_file )
99 write(fnametauv(1:80),'(2a,i10.10)')
100 & xx_tauv_file(1:il),'.',optimcycle
101 call active_read_xy_loc ( fnametauv, tmpfld2d, 1,
102 & doglobalread, ladinit, optimcycle,
103 & mythid, xx_tauv_dummy )
104 do bj = jtlo,jthi
105 do bi = itlo,ithi
106 do j = jmin,jmax
107 do i = imin,imax
108 fv(i,j,bi,bj) = fv(i,j,bi,bj) + tmpfld2d(i,j,bi,bj)
109 enddo
110 enddo
111 enddo
112 enddo
113 #endif
114
115 #ifdef ALLOW_SFLUX0_CONTROL
116 c-- sflux0.
117 il=ilnblnk( xx_sflux_file )
118 write(fnamesflux(1:80),'(2a,i10.10)')
119 & xx_sflux_file(1:il),'.',optimcycle
120 call active_read_xy_loc ( fnamesflux, tmpfld2d, 1,
121 & doglobalread, ladinit, optimcycle,
122 & mythid, xx_sflux_dummy )
123 do bj = jtlo,jthi
124 do bi = itlo,ithi
125 do j = jmin,jmax
126 do i = imin,imax
127 empmr(i,j,bi,bj) = empmr(i,j,bi,bj) + tmpfld2d(i,j,bi,bj)
128 enddo
129 enddo
130 enddo
131 enddo
132 #endif
133
134 #ifdef ALLOW_HFLUX0_CONTROL
135 c-- hflux0.
136 il=ilnblnk( xx_hflux_file )
137 write(fnamehflux(1:80),'(2a,i10.10)')
138 & xx_hflux_file(1:il),'.',optimcycle
139 call active_read_xy_loc ( fnamehflux, tmpfld2d, 1,
140 & doglobalread, ladinit, optimcycle,
141 & mythid, xx_hflux_dummy )
142 do bj = jtlo,jthi
143 do bi = itlo,ithi
144 do j = jmin,jmax
145 do i = imin,imax
146 qnet(i,j,bi,bj) = qnet(i,j,bi,bj) + tmpfld2d(i,j,bi,bj)
147 enddo
148 enddo
149 enddo
150 enddo
151 #endif
152
153 #ifdef ALLOW_SSS0_CONTROL
154 c-- sss0.
155 il=ilnblnk( xx_sss_file )
156 write(fnamesss(1:80),'(2a,i10.10)')
157 & xx_sss_file(1:il),'.',optimcycle
158 call active_read_xy_loc ( fnamesss, tmpfld2d, 1,
159 & doglobalread, ladinit, optimcycle,
160 & mythid, xx_sss_dummy )
161 do bj = jtlo,jthi
162 do bi = itlo,ithi
163 do j = jmin,jmax
164 do i = imin,imax
165 sss(i,j,bi,bj) = sss(i,j,bi,bj) + tmpfld2d(i,j,bi,bj)
166 enddo
167 enddo
168 enddo
169 enddo
170 #endif
171
172 #ifdef ALLOW_SST0_CONTROL
173 c-- sst0.
174 il=ilnblnk( xx_sst_file )
175 write(fnamesst(1:80),'(2a,i10.10)')
176 & xx_sst_file(1:il),'.',optimcycle
177 call active_read_xy_loc ( fnamesst, tmpfld2d, 1,
178 & doglobalread, ladinit, optimcycle,
179 & mythid, xx_sst_dummy )
180 do bj = jtlo,jthi
181 do bi = itlo,ithi
182 do j = jmin,jmax
183 do i = imin,imax
184 sst(i,j,bi,bj) = sst(i,j,bi,bj) + tmpfld2d(i,j,bi,bj)
185 enddo
186 enddo
187 enddo
188 enddo
189 #endif
190
191 #if (defined (ALLOW_TAUU0_CONTROL) || defined (ALLOW_TAUV0_CONTROL))
192 CALL EXCH_UV_XY_RS(fu,fv,.TRUE.,myThid)
193 #endif
194 #ifdef ALLOW_SFLUX0_CONTROL
195 _EXCH_XY_R4(EmPmR, myThid )
196 #endif
197 #ifdef ALLOW_HFLUX0_CONTROL
198 _EXCH_XY_R4(Qnet, myThid )
199 #endif
200 #ifdef ALLOW_SST0_CONTROL
201 _EXCH_XY_R4(SST, myThid )
202 #endif
203 #ifdef ALLOW_SSS0_CONTROL
204 _EXCH_XY_R4(SSS, myThid )
205 #endif
206
207 END

  ViewVC Help
Powered by ViewVC 1.1.22