/[MITgcm]/MITgcm/pkg/dic/car_flux.F
ViewVC logotype

Contents of /MITgcm/pkg/dic/car_flux.F

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


Revision 1.2 - (show annotations) (download)
Thu Oct 9 04:19:19 2003 UTC (20 years, 8 months ago) by edhill
Branch: MAIN
CVS Tags: checkpoint51k_post, checkpoint51o_pre, checkpoint51n_pre, checkpoint51l_post, checkpoint51q_post, checkpoint51r_post, checkpoint52b_pre, checkpoint51o_post, checkpoint51p_post, checkpoint52a_pre, checkpoint51i_post, checkpoint52, checkpoint52a_post, checkpoint52b_post, checkpoint52c_post, checkpoint51l_pre, ecco_c52_e35, checkpoint51t_post, checkpoint51n_post, checkpoint51u_post, checkpoint51m_post, checkpoint51s_post
Branch point for: branch-nonh, tg2-branch, checkpoint51n_branch
Changes since 1.1: +1 -1 lines
 o first check-in for the "branch-genmake2" merge
 o verification suite as run on shelley (gcc 3.2.2):

Wed Oct  8 23:42:29 EDT 2003
                T           S           U           V
G D M    c        m  s        m  s        m  s        m  s
E p a R  g  m  m  e  .  m  m  e  .  m  m  e  .  m  m  e  .
N n k u  2  i  a  a  d  i  a  a  d  i  a  a  d  i  a  a  d
2 d e n  d  n  x  n  .  n  x  n  .  n  x  n  .  n  x  n  .

OPTFILE=NONE

Y Y Y Y 13 16 16 16  0 16 16 16 16 16 16 16 16 13 12  0  0 pass  adjustment.128x64x1
Y Y Y Y 16 16 16 16  0 16 16 16 16 16 16  0  0 16 16  0  0 pass  adjustment.cs-32x32x1
Y Y Y Y 16 16 16 16  0 16 16 16 16 16 16 22  0 16 16 22  0 pass  adjust_nlfs.cs-32x32x1
Y Y Y Y -- 13 13 16 16 13 13 13 13 16 16 16 16 16 16 16 16 N/O   advect_cs
Y Y Y Y -- 22 16 16 16 16 16 16 13 16 16 16 16 16 16 16 16 N/O   advect_xy
Y Y Y Y -- 13 16 13 16 16 16 16 16 16 16 22 16 16 16 16 16 N/O   advect_xz
Y Y Y Y 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 pass  aim.5l_cs
Y Y Y Y 14 16 16 16 16 16 16 16 16 13 16 16 16 16 16 13 16 pass  aim.5l_Equatorial_Channel
Y Y Y Y 16 16 16 16 16 16 16 16 16 16 16 13 16 16 13 13 16 pass  aim.5l_LatLon
Y Y Y Y 13 16 16 16 16 16 16 16 16 16 13 12 13 13 16 13 16 pass  exp0
Y Y Y Y 14 16 16 16 16 16 16 16 22 16 16 16 13 16 16 22 16 pass  exp1
Y Y Y Y 13 13 16 13 16 16 16 16 16 13 13 16 16 13 13 13 13 pass  exp2
Y Y Y Y 16 16 16 16 16 16 16 16 22 16 16 16 16 16 16 16 16 pass  exp4
Y Y Y Y 16 16 16 16 16 16 16 16 16 16 16 22 16 16 16 22 16 pass  exp5
Y Y Y Y 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 pass  front_relax
Y Y Y Y 14 16 16 13 13 16 16 13 13 16 13 13 16 12 13 13 16 pass  global_ocean.90x40x15
Y Y Y Y 10 16 16 13 13 16 13 16 16 13 13 13 13 16 16 13 16 FAIL  global_ocean.cs32x15
Y Y Y Y  6 11 12 13 13 12 13 16 13  9  9  9  9 10  9  9 11 FAIL  global_ocean_pressure
Y Y Y Y 14 16 16 13 16 16 16 13 13 13 13 13 16 12 16 13 16 pass  global_with_exf
Y Y Y Y 14 16 16 16 16 16 16 16 16 11 13 22 13 16 16  9 16 pass  hs94.128x64x5
Y Y Y Y 13 16 16 16 16 16 16 16 16 11 16 16 16 13 16 22 13 pass  hs94.1x64x5
Y Y Y Y 14 16 16 16 16 16 16 16 16 13 16 13 13 16 16 22 13 pass  hs94.cs-32x32x5
Y Y Y Y 10 10 16 13 13 16 16 16 22 16 13 13 13 13 13 22 13 FAIL  ideal_2D_oce
Y Y Y Y  8 16 16 16 16 16 16 16 16 13 13  8 16 16 16 16 16 FAIL  internal_wave
Y Y Y Y 14 16 16 16 16 16 16 16 16 13 13 22 13 13 13 22 16 pass  inverted_barometer
Y Y Y Y 12 16 16 16 16 16 16 16 16 16 13 12 13 13 13 13 13 FAIL  lab_sea
Y Y Y Y 11 16 16 16 16 16 16 16 13 13 13 12 13 16 13 12 13 FAIL  natl_box
Y Y Y Y 16 16 16 16 16 16 16 16 22 16 16 16 16 16 16 16 16 pass  plume_on_slope
Y Y Y Y 13 16 16 16 16 13 16 16 16 16 16 16 16 13 16 16 16 pass  solid-body.cs-32x32x1

1 #include "DIC_OPTIONS.h"
2
3 CStartOfInterFace
4 SUBROUTINE CAR_FLUX( bioac, cflux,
5 I bi,bj,imin,imax,jmin,jmax,
6 I myIter,myTime,myThid)
7
8 C /==========================================================\
9 C | SUBROUTINE CAR_FLUX |
10 C | o Calculate carbonate fluxes |
11 C |==========================================================|
12 IMPLICIT NONE
13
14 C == GLobal variables ==
15 #include "SIZE.h"
16 #include "DYNVARS.h"
17 #include "EEPARAMS.h"
18 #include "PARAMS.h"
19 #include "GRID.h"
20 #include "DIC_BIOTIC.h"
21
22 C == Routine arguments ==
23 INTEGER myIter
24 _RL myTime
25 INTEGER myThid
26 _RL bioac(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr)
27 _RL cflux(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr)
28 INTEGER imin, imax, jmin, jmax, bi, bj
29
30 #ifdef ALLOW_PTRACERS
31 #ifdef DIC_BIOTIC
32 C == Local variables ==
33 _RL caexport(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
34 INTEGER I,J,k, ko
35 _RL depth_u, depth_l
36 _RL flux_u, flux_l
37 _RL zbase
38 c
39 c calculate carbonate flux from base of each nlev
40 DO j=1-OLy,sNy+OLy
41 DO i=1-OLx,sNx+OLx
42 DO k=1,nLev
43 if (hFacC(i,j,k,bi,bj).gt.0.d0) then
44 caexport(i,j)= R_cp*rain_ratio(i,j,bi,bj)*bioac(i,j,k)*
45 & (1.0-DOPfraction)*drF(k)*hFacC(i,j,k,bi,bj)
46 c calculate flux to each layer from base of k
47 zbase=-rF(k+1)
48 Do ko=k+1,Nr
49 if (hFacC(i,j,ko,bi,bj).gt.0.d0) then
50 depth_u=-rF(ko)
51 depth_l=depth_u+
52 & drF(ko)*hFacC(i,j,ko,bi,bj)
53 flux_u=caexport(i,j)*exp(-(depth_u-zbase)/zca)
54 c no flux to ocean bottom
55 if (ko.eq.Nr) then
56 flux_l=0.d0
57 else
58 if (hFacC(i,j,ko+1,bi,bj).eq.0.d0) then
59 flux_l=0.d0
60 else
61 flux_l=caexport(i,j)*exp(-(depth_l-zbase)/zca)
62 endif
63 endif
64 cflux(i,j,ko)=cflux(i,j,ko) +
65 & ( (Flux_u-Flux_l)/(drF(ko)*hFacC(i,j,ko,bi,bj)) )
66 else
67 c if no layer below initial layer, remineralize in place
68 if (ko.eq.k+1) cflux(i,j,k)=cflux(i,j,k)
69 & +bioac(i,j,k)*(1.0-DOPfraction)*
70 & R_cp*rain_ratio(i,j,bi,bj)
71 endif
72 ENDDO
73 endif
74 ENDDO
75 ENDDO
76 ENDDO
77 c
78 #endif
79 #endif
80 RETURN
81 END

  ViewVC Help
Powered by ViewVC 1.1.22