/[MITgcm]/MITgcm/pkg/sbo/sbo_calc.F
ViewVC logotype

Contents of /MITgcm/pkg/sbo/sbo_calc.F

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


Revision 1.17 - (show annotations) (download)
Fri May 30 17:10:15 2014 UTC (9 years, 11 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint65z, checkpoint65x, checkpoint65y, checkpoint65r, checkpoint65s, checkpoint65p, checkpoint65q, checkpoint65v, checkpoint65w, checkpoint65t, checkpoint65u, checkpoint65j, checkpoint65k, checkpoint65h, checkpoint65i, checkpoint65n, checkpoint65l, checkpoint65m, checkpoint65b, checkpoint65c, checkpoint65a, checkpoint65f, checkpoint65g, checkpoint65d, checkpoint65e, checkpoint65, checkpoint66g, checkpoint66f, checkpoint66e, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint66o, checkpoint66n, checkpoint66m, checkpoint66l, checkpoint66k, checkpoint66j, checkpoint66i, checkpoint66h, checkpoint65o, checkpoint64y, checkpoint64z, HEAD
Changes since 1.16: +11 -2 lines
sort out some multi-threading issues in output part

1 C $Header: /u/gcmpack/MITgcm/pkg/sbo/sbo_calc.F,v 1.16 2014/05/29 17:08:51 jmc Exp $
2 C $Name: $
3
4 #include "SBO_OPTIONS.h"
5 #ifdef ALLOW_SEAICE
6 # include "SEAICE_OPTIONS.h"
7 #endif
8
9 CBOP
10 C !ROUTINE: SBO_CALC
11
12 C !INTERFACE: ==========================================================
13 SUBROUTINE SBO_CALC( myTime, myIter, myThid )
14
15 C !DESCRIPTION: \bv
16 C *==========================================================*
17 C | SUBROUTINE SBO_CALC |
18 C | o Do SBO diagnostic output. |
19 C *==========================================================*
20 C | NOTE: The following subtleties are ignored for time |
21 C | being but may need revisiting at some point in time. |
22 C | 1) The model is volume-preserving and Boussinesq so |
23 C | quantities like oceanic mass need to be interpreted |
24 C | with some care. We remove spurious mass variations |
25 C | using the Greatbatch correction. Real freshwater |
26 C | fluxes retained in mass load. |
27 C | 2) The sea surface height variable etaN might lag other |
28 C | prognostic variables by half a time step. This lag |
29 C | is ignored in SBO computations. |
30 C | 3) OAM due to currents assumes constant density |
31 C | (=rhoConst), rms differences using variable density |
32 C | is less than 1%, assuming rhoConst is a good measure |
33 C | of the actual mean density |
34 C | 4) Seaice motion added to OAMC. Seaice mass is in OAMP |
35 C | and COM. Net freshwater flux is between atmosphere |
36 C | and liquid ocean plus seaice. I.e. changes in seaice |
37 C | mass due to melt/freeze with liquid ocean do not |
38 C | change net freshwater flux. |
39 C *==========================================================*
40
41 C=======================================================================
42 C
43 C Based on ftp://euler.jpl.nasa.gov/sbo/software/calc_sbo2.f
44 C Written by Richard Gross (Richard.Gross@jpl.nasa.gov)
45 C Reference
46 C Gross, R. S., F. O. Bryan, Y. Chao, J. O. Dickey, S. L. Marcus,
47 C R. M. Ponte, and R. Tokmakian, The IERS Special Bureau for the
48 C Oceans, in IERS Technical Note on the IERS Global Geophysical
49 C Fluids Center, edited by B. Chao, in press, Observatoire de Paris,
50 C Paris, France, 2002.
51 C
52 C June 10, 2001: Modified for online computations in MIT GCM UV
53 C by Dimitris Menemenlis (Menemenlis@jpl.nasa.gov)
54 C Jan 7, 2014: Modified for real freshwater flux and coordinates other
55 C than spherical polar by Katy Quinn (kquinn@aer.com)
56 C
57 C Purpose
58 C calc_sbo calculates the core products of the IERS Special Bureau
59 C for the Oceans including oceanic mass, center-of-mass, and angular
60 C momentum.
61 C
62 C=======================================================================
63 C \ev
64
65 C !USES: ===============================================================
66 IMPLICIT NONE
67 C === Global variables ===
68 #include "SIZE.h"
69 #include "EEPARAMS.h"
70 #include "PARAMS.h"
71 #include "GRID.h"
72 #include "DYNVARS.h"
73 #include "FFIELDS.h"
74 #include "SBO.h"
75 #ifdef ALLOW_SEAICE
76 # include "SEAICE_SIZE.h"
77 # include "SEAICE.h"
78 #endif
79
80 C !INPUT PARAMETERS: ===================================================
81 C == Routine arguments ==
82 C myTime :: Current time of simulation ( s )
83 C myIter :: Iteration number
84 C myThid :: Number of this instance of SBO_CALC
85 _RL myTime
86 INTEGER myIter, myThid
87
88 #ifdef ALLOW_SBO
89
90 C !LOCAL VARIABLES: ====================================================
91 C bi, bj :: array indices
92 C i :: index over longitude grid points
93 C j :: index over latitude grid points
94 C k :: index over layers
95 C lat :: latitude of grid point (radians)
96 C lon :: longitude of grid point (radians)
97 C darea :: element of surface area (m**2)
98 C dvolume :: element of volume (m**3)
99 C ae :: mean radius of Earth (m) (PREM value)
100 C sbo_omega :: mean angular velocity of Earth (rad/s)
101 C UE,VN :: geographic (east,north) ocean velocities at cell centers (m/s)
102 C UEice,VNice :: geographic (east,north) seaice velocities at cell centers (m/s)
103 C Mload :: total mass load (kg/m**2)
104 C GCload :: mass load for Greatbatch correction (kg/m**2)
105 C FWLoad :: real freshwater flux mass load (kg/m**2)
106 integer bi, bj, i, j, k
107 _RL lat, lon, darea, dvolume
108 _RL ae, sbo_omega
109 PARAMETER ( ae = 6.3710 _d 6 )
110 PARAMETER ( sbo_omega = 7.292115 _d -5 )
111 _RL UE(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
112 _RL VN(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy)
113 _RL UEice(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
114 _RL VNice(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
115 _RL Mload(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
116 _RL GCload, FWload
117 C Tiled global sums
118 _RL tile_FWload(nSx,nSy)
119 _RL tile_sboarea(nSx,nSy)
120 _RL tile_GCload(nSx,nSy)
121 _RL tile_mass(nSx,nSy)
122 _RL tile_xcom(nSx,nSy)
123 _RL tile_ycom(nSx,nSy)
124 _RL tile_zcom(nSx,nSy)
125 _RL tile_xoamc(nSx,nSy)
126 _RL tile_yoamc(nSx,nSy)
127 _RL tile_zoamc(nSx,nSy)
128 _RL tile_xoamp(nSx,nSy)
129 _RL tile_yoamp(nSx,nSy)
130 _RL tile_zoamp(nSx,nSy)
131 _RL tile_xoamc_si(nSx,nSy)
132 _RL tile_yoamc_si(nSx,nSy)
133 _RL tile_zoamc_si(nSx,nSy)
134 _RL tile_mass_si(nSx,nSy)
135 _RL tile_mass_fw(nSx,nSy)
136 _RL tile_xcom_fw(nSx,nSy)
137 _RL tile_ycom_fw(nSx,nSy)
138 _RL tile_zcom_fw(nSx,nSy)
139 _RL tile_xoamp_fw(nSx,nSy)
140 _RL tile_yoamp_fw(nSx,nSy)
141 _RL tile_zoamp_fw(nSx,nSy)
142 _RL tile_mass_gc (nSx,nSy)
143 C Pre-computed cos(lat), sin(lat), cos(lon), sin(lon)
144 _RL COSlat(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
145 _RL SINlat(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
146 _RL COSlon(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
147 _RL SINlon(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
148 CEOP
149
150 C Initialize variables to be computed---------------------------------
151 C- note: only done once (by master thread) for var in common block
152 _BEGIN_MASTER(myThid)
153
154 xoamc = 0.0
155 yoamc = 0.0
156 zoamc = 0.0
157 xoamp = 0.0
158 yoamp = 0.0
159 zoamp = 0.0
160 mass = 0.0
161 xcom = 0.0
162 ycom = 0.0
163 zcom = 0.0
164 sboarea = 0.0
165
166 xoamc_si = 0.0
167 yoamc_si = 0.0
168 zoamc_si = 0.0
169 mass_si = 0.0
170
171 xoamp_fw = 0.0
172 yoamp_fw = 0.0
173 zoamp_fw = 0.0
174 mass_fw = 0.0
175 xcom_fw = 0.0
176 ycom_fw = 0.0
177 zcom_fw = 0.0
178
179 mass_gc = 0.0
180
181 _END_MASTER(myThid)
182
183 C Get geographic (East,North) velocities------------------------------
184
185 CALL ROTATE_UV2EN_RL(
186 U uVel, vVel,
187 U UE, VN,
188 I .TRUE., .TRUE., .FALSE., Nr, mythid )
189
190 #ifdef ALLOW_SEAICE
191 IF ( useSEAICE ) THEN
192 CALL ROTATE_UV2EN_RL(
193 U UICE, VICE,
194 U UEice, VNice,
195 I .TRUE., .TRUE., .FALSE., 1, mythid )
196 ELSE
197 #else /* ALLOW_SEAICE */
198 IF ( .TRUE. ) THEN
199 #endif /* ALLOW_SEAICE */
200 DO bj = myByLo(myThid), myByHi(myThid)
201 DO bi = myBxLo(myThid), myBxHi(myThid)
202 DO j=1-OLy,sNy+OLy
203 DO i=1-OLx,sNx+OLx
204 UEice(i,j,bi,bj) = 0.
205 VNice(i,j,bi,bj) = 0.
206 ENDDO
207 ENDDO
208 ENDDO
209 ENDDO
210 ENDIF
211
212 C Calculate mass load-------------------------------------------------
213 C Calculate mass load (Mload), Greatbatch correction for
214 C spurious mass but spatial mean freshwater flux retained.
215 C Mload *needs* to be total mass (for center of mass), so add
216 C back missing time invariant term: -R_low*rhoConst
217
218 c Calculate freshwater load
219 C Calculate Greatbatch correction load over global ocean volume
220 c Note: no halo regions in i,j loops, do not want to double book sums
221 FWload = 0.0
222 GCload = 0.0
223 DO bj = myByLo(myThid), myByHi(myThid)
224 DO bi = myBxLo(myThid), myBxHi(myThid)
225 tile_FWload(bi,bj) = 0.0
226 tile_GCload(bi,bj) = 0.0
227 tile_sboarea(bi,bj) = 0.0
228 DO j = 1, sNy
229 DO i = 1, sNx
230 darea = rA(i,j,bi,bj)*maskC(i,j,1,bi,bj)
231 tile_sboarea(bi,bj) = tile_sboarea(bi,bj) + darea
232 tile_FWload(bi,bj) = tile_FWload(bi,bj) +
233 & rhoConst*etaN(i,j,bi,bj)*darea +
234 & sIceLoad(i,j,bi,bj)*darea
235 DO k = 1, Nr
236 dvolume = rA(i,j,bi,bj)*drF(k)*hFacC(i,j,k,bi,bj)
237 tile_GCload(bi,bj) = tile_GCload(bi,bj) +
238 & rhoInSitu(i,j,k,bi,bj) * dvolume
239 ENDDO
240 ENDDO
241 ENDDO
242 ENDDO
243 ENDDO
244 CALL GLOBAL_SUM_TILE_RL( tile_FWload , FWload , myThid )
245 CALL GLOBAL_SUM_TILE_RL( tile_sboarea , sboarea , myThid )
246 CALL GLOBAL_SUM_TILE_RL( tile_GCload , GCload , myThid )
247 FWload = FWload/sboarea
248 GCload = -1.0 * GCload/sboarea
249
250 c Total mass load with freshwater flux
251 DO bj = myByLo(myThid), myByHi(myThid)
252 DO bi = myBxLo(myThid), myBxHi(myThid)
253 DO j = 1-OLy, sNy+OLy
254 DO i = 1-OLx, sNx+OLx
255 Mload(i,j,bi,bj) = rhoConst*etaN(i,j,bi,bj) +
256 & sIceLoad(i,j,bi,bj) +
257 & GCload - R_low(i,j,bi,bj)*rhoConst
258 DO k = 1, Nr
259 Mload(i,j,bi,bj) = Mload(i,j,bi,bj) +
260 & rhoInSitu(i,j,k,bi,bj)*drF(k)*hFacC(i,j,k,bi,bj)
261 ENDDO
262 ENDDO
263 ENDDO
264 ENDDO
265 ENDDO
266
267 c Pre-compute cos(lat), sin(lat), cos(lon), sin(lon)
268 DO bj = myByLo(myThid), myByHi(myThid)
269 DO bi = myBxLo(myThid), myBxHi(myThid)
270 DO j = 1-OLy, sNy+OLy
271 DO i = 1-OLx, sNx+OLx
272 lat = yC(i,j,bi,bj) * deg2rad
273 lon = xC(i,j,bi,bj) * deg2rad
274 COSlat(i,j,bi,bj) = COS(lat)
275 SINlat(i,j,bi,bj) = SIN(lat)
276 COSlon(i,j,bi,bj) = COS(lon)
277 SINlon(i,j,bi,bj) = SIN(lon)
278 ENDDO
279 ENDDO
280 ENDDO
281 ENDDO
282
283 C Main loops----------------------------------------------------------
284 C loop over all grid points, accumulating mass, com, oam
285 C Note: no halo regions in i,j loops, do not want to double book sums
286
287 DO bj = myByLo(myThid), myByHi(myThid)
288 DO bi = myBxLo(myThid), myBxHi(myThid)
289
290 C Initialize tile sums---------------------------------
291 tile_xoamc(bi,bj) = 0.0
292 tile_yoamc(bi,bj) = 0.0
293 tile_zoamc(bi,bj) = 0.0
294 tile_xoamp(bi,bj) = 0.0
295 tile_yoamp(bi,bj) = 0.0
296 tile_zoamp(bi,bj) = 0.0
297 tile_mass(bi,bj) = 0.0
298 tile_xcom(bi,bj) = 0.0
299 tile_ycom(bi,bj) = 0.0
300 tile_zcom(bi,bj) = 0.0
301
302 tile_xoamc_si(bi,bj) = 0.0
303 tile_yoamc_si(bi,bj) = 0.0
304 tile_zoamc_si(bi,bj) = 0.0
305 tile_mass_si(bi,bj) = 0.0
306
307 tile_xoamp_fw(bi,bj) = 0.0
308 tile_yoamp_fw(bi,bj) = 0.0
309 tile_zoamp_fw(bi,bj) = 0.0
310 tile_mass_fw(bi,bj) = 0.0
311 tile_xcom_fw(bi,bj) = 0.0
312 tile_ycom_fw(bi,bj) = 0.0
313 tile_zcom_fw(bi,bj) = 0.0
314
315 tile_mass_gc(bi,bj) = 0.0
316
317 DO j = 1, sNy
318 DO i = 1, sNx
319
320 IF ( maskC(i,j,1,bi,bj) .NE. 0. ) THEN
321
322 C horizontal area
323 darea = rA(i,j,bi,bj)*maskC(i,j,1,bi,bj)
324
325 C accumulate mass of oceans, Greatbatch correction, seaice
326 tile_mass(bi,bj) = tile_mass(bi,bj) +
327 & Mload(i,j,bi,bj)*darea
328 tile_mass_gc(bi,bj) = tile_mass_gc(bi,bj) +
329 & GCload*darea
330 tile_mass_si(bi,bj) = tile_mass_si(bi,bj) +
331 & sIceLoad(i,j,bi,bj)*darea
332
333 C accumulate center-of-mass of oceans (need to divide by total mass at end)
334 tile_xcom(bi,bj) = tile_xcom(bi,bj) +
335 & Mload(i,j,bi,bj)*COSlat(i,j,bi,bj)*COSlon(i,j,bi,bj)
336 & * ae * darea
337 tile_ycom(bi,bj) = tile_ycom(bi,bj) +
338 & Mload(i,j,bi,bj)*COSlat(i,j,bi,bj)*SINlon(i,j,bi,bj)
339 & * ae * darea
340 tile_zcom(bi,bj) = tile_zcom(bi,bj) +
341 & Mload(i,j,bi,bj)*SINlat(i,j,bi,bj)
342 & * ae * darea
343
344 C accumulate oceanic angular momentum due to currents (need depth integral too)
345 C Note: depth integral goes from k=1,Nr. hFacC takes care of R_low and etaN (as per JMC)
346 DO k = 1, Nr
347 dvolume = rA(i,j,bi,bj)*drF(k)
348 & * maskC(i,j,k,bi,bj)*hFacC(i,j,k,bi,bj)
349 tile_xoamc(bi,bj) = tile_xoamc(bi,bj) +
350 & ( VN(i,j,k,bi,bj)*SINlon(i,j,bi,bj) -
351 & UE(i,j,k,bi,bj)*
352 & SINlat(i,j,bi,bj)*COSlon(i,j,bi,bj) )
353 & * rhoConst * ae * dvolume
354 tile_yoamc(bi,bj) = tile_yoamc(bi,bj) +
355 & (-VN(i,j,k,bi,bj)*COSlon(i,j,bi,bj) -
356 & UE(i,j,k,bi,bj)*
357 & SINlat(i,j,bi,bj)*SINlon(i,j,bi,bj) )
358 & * rhoConst * ae * dvolume
359 tile_zoamc(bi,bj) = tile_zoamc(bi,bj) +
360 & UE(i,j,k,bi,bj)*COSlat(i,j,bi,bj)
361 & * rhoConst * ae * dvolume
362 ENDDO
363
364 C accumulate sea angular momentum due to motion (one layer, so no depth integral needed)
365 tile_xoamc_si(bi,bj) = tile_xoamc_si(bi,bj) +
366 & ( VNice(i,j,bi,bj)*SINlon(i,j,bi,bj) -
367 & UEice(i,j,bi,bj)*
368 & SINlat(i,j,bi,bj)*COSlon(i,j,bi,bj) )
369 & * sIceLoad(i,j,bi,bj) * ae * darea
370 tile_yoamc_si(bi,bj) = tile_yoamc_si(bi,bj) +
371 & (-VNice(i,j,bi,bj)*COSlon(i,j,bi,bj) -
372 & UEice(i,j,bi,bj)*
373 & SINlat(i,j,bi,bj)*SINlon(i,j,bi,bj) )
374 & * sIceLoad(i,j,bi,bj) * ae * darea
375 tile_zoamc_si(bi,bj) = tile_zoamc_si(bi,bj) +
376 & UEice(i,j,bi,bj)*COSlat(i,j,bi,bj)
377 & * sIceLoad(i,j,bi,bj) * ae * darea
378
379 C accumulate oceanic angular momentum due to pressure
380 tile_xoamp(bi,bj) = tile_xoamp(bi,bj) -
381 & SINlat(i,j,bi,bj)*COSlat(i,j,bi,bj)*COSlon(i,j,bi,bj)
382 & * sbo_omega * Mload(i,j,bi,bj) * ae*ae * darea
383 tile_yoamp(bi,bj) = tile_yoamp(bi,bj) -
384 & SINlat(i,j,bi,bj)*COSlat(i,j,bi,bj)*SINlon(i,j,bi,bj)
385 & * sbo_omega * Mload(i,j,bi,bj) * ae*ae * darea
386 tile_zoamp(bi,bj) = tile_zoamp(bi,bj) +
387 & COSlat(i,j,bi,bj) * COSlat(i,j,bi,bj)
388 & * sbo_omega * Mload(i,j,bi,bj) * ae*ae * darea
389
390 C accumulate mass of real freshwater flux
391 tile_mass_fw(bi,bj) = tile_mass_fw(bi,bj) +
392 & FWload * darea
393
394 C accumulate center-of-mass of real freshwater flux (need to divide by total FW mass at end)
395 tile_xcom_fw(bi,bj) = tile_xcom_fw(bi,bj) +
396 & FWload * COSlat(i,j,bi,bj) * COSlon(i,j,bi,bj)
397 & * ae * darea
398 tile_ycom_fw(bi,bj) = tile_ycom_fw(bi,bj) +
399 & FWload * COSlat(i,j,bi,bj) * SINlon(i,j,bi,bj)
400 & * ae * darea
401 tile_zcom_fw(bi,bj) = tile_zcom_fw(bi,bj) +
402 & FWload * SINlat(i,j,bi,bj)
403 & * ae * darea
404
405 C accumulate oceanic angular momentum due to real freshwater flux
406 tile_xoamp_fw(bi,bj) = tile_xoamp_fw(bi,bj) -
407 & SINlat(i,j,bi,bj)*COSlat(i,j,bi,bj)*COSlon(i,j,bi,bj)
408 & * sbo_omega * FWload * ae*ae * darea
409 tile_yoamp_fw(bi,bj) = tile_yoamp_fw(bi,bj) -
410 & SINlat(i,j,bi,bj)*COSlat(i,j,bi,bj)*SINlon(i,j,bi,bj)
411 & * sbo_omega * FWload * ae*ae * darea
412 tile_zoamp_fw(bi,bj) = tile_zoamp_fw(bi,bj) +
413 & COSlat(i,j,bi,bj) * COSlat(i,j,bi,bj)
414 & * sbo_omega * FWload * ae*ae * darea
415
416 C end if over ocean
417 ENDIF
418 C end loop over i,j
419 ENDDO
420 ENDDO
421
422 C end loop over bi,bj
423 ENDDO
424 ENDDO
425
426 C sum all global values across model tiles
427 CALL GLOBAL_SUM_TILE_RL( tile_mass , mass , myThid )
428 CALL GLOBAL_SUM_TILE_RL( tile_xcom , xcom , myThid )
429 CALL GLOBAL_SUM_TILE_RL( tile_ycom , ycom , myThid )
430 CALL GLOBAL_SUM_TILE_RL( tile_zcom , zcom , myThid )
431 CALL GLOBAL_SUM_TILE_RL( tile_xoamc , xoamc , myThid )
432 CALL GLOBAL_SUM_TILE_RL( tile_yoamc , yoamc , myThid )
433 CALL GLOBAL_SUM_TILE_RL( tile_zoamc , zoamc , myThid )
434 CALL GLOBAL_SUM_TILE_RL( tile_xoamp , xoamp , myThid )
435 CALL GLOBAL_SUM_TILE_RL( tile_yoamp , yoamp , myThid )
436 CALL GLOBAL_SUM_TILE_RL( tile_zoamp , zoamp , myThid )
437
438 CALL GLOBAL_SUM_TILE_RL( tile_xoamc_si , xoamc_si , myThid )
439 CALL GLOBAL_SUM_TILE_RL( tile_yoamc_si , yoamc_si , myThid )
440 CALL GLOBAL_SUM_TILE_RL( tile_zoamc_si , zoamc_si , myThid )
441 CALL GLOBAL_SUM_TILE_RL( tile_mass_si , mass_si , myThid )
442
443 CALL GLOBAL_SUM_TILE_RL( tile_mass_fw , mass_fw , myThid )
444 CALL GLOBAL_SUM_TILE_RL( tile_xcom_fw , xcom_fw , myThid )
445 CALL GLOBAL_SUM_TILE_RL( tile_ycom_fw , ycom_fw , myThid )
446 CALL GLOBAL_SUM_TILE_RL( tile_zcom_fw , zcom_fw , myThid )
447 CALL GLOBAL_SUM_TILE_RL( tile_xoamp_fw , xoamp_fw , myThid )
448 CALL GLOBAL_SUM_TILE_RL( tile_yoamp_fw , yoamp_fw , myThid )
449 CALL GLOBAL_SUM_TILE_RL( tile_zoamp_fw , zoamp_fw , myThid )
450 CALL GLOBAL_SUM_TILE_RL( tile_mass_gc , mass_gc , myThid )
451
452 C finish calculating center-of-mass of oceans
453 C- note: only master thread updates/modifies var in common block
454 _BEGIN_MASTER(myThid)
455
456 IF ( mass.NE.zeroRL ) THEN
457 xcom = xcom / mass
458 ycom = ycom / mass
459 zcom = zcom / mass
460 ENDIF
461
462 IF ( mass_fw.NE.zeroRL ) THEN
463 xcom_fw = xcom_fw / mass_fw
464 ycom_fw = ycom_fw / mass_fw
465 zcom_fw = zcom_fw / mass_fw
466 ENDIF
467
468 C Add seaice OAMC to total OAMC
469 xoamc = xoamc + xoamc_si
470 yoamc = yoamc + yoamc_si
471 zoamc = zoamc + zoamc_si
472
473 _END_MASTER(myThid)
474
475 #endif /* ALLOW_SBO */
476
477 RETURN
478 END

  ViewVC Help
Powered by ViewVC 1.1.22