/[MITgcm]/MITgcm_contrib/darwin2/pkg/darwin/dic_alk_surfforcing.F
ViewVC logotype

Annotation of /MITgcm_contrib/darwin2/pkg/darwin/dic_alk_surfforcing.F

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


Revision 1.1 - (hide annotations) (download)
Wed Apr 13 18:56:24 2011 UTC (14 years, 8 months ago) by jahn
Branch: MAIN
CVS Tags: ctrb_darwin2_ckpt62v_20110413, ctrb_darwin2_ckpt62y_20110526, ctrb_darwin2_ckpt62x_20110513, ctrb_darwin2_ckpt62w_20110426, ctrb_darwin2_ckpt63b_20110830, ctrb_darwin2_ckpt63a_20110804, ctrb_darwin2_ckpt63_20110728, ctrb_darwin2_baseline, ctrb_darwin2_ckpt62z_20110622
darwin2 initial checkin

1 jahn 1.1 #include "CPP_OPTIONS.h"
2     #include "PTRACERS_OPTIONS.h"
3     #include "DARWIN_OPTIONS.h"
4    
5     #ifdef ALLOW_PTRACERS
6     #ifdef ALLOW_DARWIN
7    
8     #ifdef ALLOW_CARBON
9    
10     CBOP
11     C !ROUTINE: ALK_SURFFORCING
12    
13     C !INTERFACE: ==========================================================
14     SUBROUTINE DIC_ALK_SURFFORCING( PTR_ALK , GALK,
15     I bi,bj,imin,imax,jmin,jmax,
16     I myIter,myTime,myThid)
17    
18     C !DESCRIPTION:
19     C Calculate the alkalinity change due to freshwater flux
20     C Update alkalinity tendency term
21    
22     C !USES: ===============================================================
23     IMPLICIT NONE
24     #include "SIZE.h"
25     #include "DYNVARS.h"
26     #include "EEPARAMS.h"
27     #include "PARAMS.h"
28     #include "GRID.h"
29     #include "FFIELDS.h"
30     #include "DARWIN_FLUX.h"
31    
32     C !INPUT PARAMETERS: ===================================================
33     C myThid :: thread number
34     C myIter :: current timestep
35     C myTime :: current time
36     C bi,bj :: tile indices
37     C PTR_ALK :: alkalinity field
38     INTEGER myIter, myThid
39     _RL myTime
40     _RL PTR_ALK(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr)
41     INTEGER iMin,iMax,jMin,jMax, bi, bj
42    
43     C !OUTPUT PARAMETERS: ==================================================
44     C GALK :: tendency term of alkalinity
45     _RL GALK(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
46    
47    
48     C !LOCAL VARIABLES: ====================================================
49     C i,j :: loop indices
50     INTEGER i,j
51     CEOP
52    
53     #ifdef ALLOW_OLD_VIRTUALFLUX
54     DO j=jmin,jmax
55     DO i=imin,imax
56     IF (maskC(i,j,1,bi,bj).NE.0. _d 0) THEN
57     c calculate virtual flux
58     c EminusPforV = dS/dt*(1/Sglob)
59     C NOTE: Be very careful with signs here!
60     C Positive EminusPforV => loss of water to atmos and increase
61     C in salinity. Thus, also increase in other surface tracers
62     C (i.e. positive virtual flux into surface layer)
63     GALK(i,j)=gsm_ALK*surfaceForcingS(i,j,bi,bj)*
64     & recip_drF(1)/gsm_S
65     c OR
66     c let virtual flux be zero
67     c GALK(i,j)=0.d0
68     c
69     ELSE
70     GALK(i,j)=0. _d 0
71     ENDIF
72     ENDDO
73     ENDDO
74     #endif /* ALLOW_OLD_VIRTUALFLUX */
75    
76     RETURN
77     END
78     #endif /*ALLOW_CARBON*/
79    
80     #endif /*DARWIN*/
81     #endif /*ALLOW_PTRACERS*/
82     c ==================================================================

  ViewVC Help
Powered by ViewVC 1.1.22