/[MITgcm]/MITgcm/pkg/ptracers/ptracers_forcing.F
ViewVC logotype

Contents of /MITgcm/pkg/ptracers/ptracers_forcing.F

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


Revision 1.2 - (show annotations) (download)
Fri Jun 27 01:56:17 2003 UTC (21 years ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint51d_post, checkpoint51b_post, checkpoint51c_post, checkpoint51e_post, checkpoint51f_pre
Changes since 1.1: +8 -6 lines
o disentangled ALLOW_PTRACERS using new ALLOW_GCHEM
o made ptracers_forcing same as external_forcing_s

1 C $Header: /u/gcmpack/MITgcm/pkg/ptracers/ptracers_forcing.F,v 1.1 2002/03/04 19:01:29 adcroft Exp $
2 C $Name: $
3
4 #include "PTRACERS_OPTIONS.h"
5
6 CBOP
7 C !ROUTINE: PTRACERS_FORCING
8
9 C !INTERFACE: ==========================================================
10 SUBROUTINE PTRACERS_FORCING(
11 I bi,bj,k,iTracer,
12 U gPtracer,
13 I myIter,myTime,myThid )
14
15 C !DESCRIPTION:
16 C Adds sources and sinks of passive tracers to the tendancy arrays
17
18 C !USES: ===============================================================
19 IMPLICIT NONE
20 #include "SIZE.h"
21 #include "EEPARAMS.h"
22 #include "PTRACERS.h"
23 #include "PARAMS.h"
24 #include "FFIELDS.h"
25 #include "DYNVARS.h"
26 #include "GRID.h"
27
28 C !INPUT PARAMETERS: ===================================================
29 C bi,bj :: tile indices
30 C k :: vertical level number
31 C iTracer :: passive tracer index
32 C gPtracer :: the tendancy array
33 C myIter :: time-step number
34 C myTime :: model time
35 C myThid :: thread number
36 INTEGER bi,bj,k,iTracer
37 _RL gPtracer(1-Olx:sNx+Olx,1-Oly:sNy+Oly,Nr,nSx,nSy)
38 INTEGER myIter
39 _RL myTime
40 INTEGER myThid
41
42 C !OUTPUT PARAMETERS: ==================================================
43 C gPtracer :: updates tendancy array
44
45 #ifdef ALLOW_PTRACERS
46
47 C !LOCAL VARIABLES: ====================================================
48 C i,j :: loop indices
49 INTEGER i,j
50 CEOP
51
52 C Example of how to add forcing for iTracer=1
53 IF (iTracer.EQ.1) THEN
54
55 C Example of how to add forcing at the surface
56 IF (k.EQ.1) THEN
57 DO j=1-Oly,sNy+Oly
58 DO i=1-Olx,sNx+Olx
59
60 C Here, we'll copy the exact forcing used for salinity to allow us
61 C to test everything is working.
62 gPtracer(i,j,k,bi,bj)=gPtracer(i,j,k,bi,bj)
63 & +maskC(i,j,k,bi,bj)*surfaceTendencyS(i,j,bi,bj)
64
65 cph & + EmPmR(i,j,bi,bj)*convertFW2Salt
66 cph & *recip_drF(1)*recip_hFacC(i,j,1,bi,bj)
67 cph & - lambdaSaltClimRelax*
68 cph & (pTracer(i,j,k,bi,bj,iTracer)-SSS(i,j,bi,bj))
69
70 ENDDO
71 ENDDO
72 ENDIF
73
74 ENDIF
75
76 #endif /* ALLOW_PTRACERS */
77
78 RETURN
79 END

  ViewVC Help
Powered by ViewVC 1.1.22