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

Annotation of /MITgcm/pkg/dic/alk_surfforcing.F

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


Revision 1.4 - (hide annotations) (download)
Sun Jul 18 01:13:50 2004 UTC (19 years, 11 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint54d_post, checkpoint54c_post
Changes since 1.3: +2 -2 lines
replace surfaceTendencyPtr by surfaceForcingPtr

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

  ViewVC Help
Powered by ViewVC 1.1.22