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

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

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

revision 1.3 by dimitri, Tue Sep 23 04:34:25 2003 UTC revision 1.4 by dimitri, Wed Sep 24 04:52:39 2003 UTC
# Line 8  C !ROUTINE: PTRACERS_FORCING Line 8  C !ROUTINE: PTRACERS_FORCING
8    
9  C !INTERFACE: ==========================================================  C !INTERFACE: ==========================================================
10        SUBROUTINE PTRACERS_FORCING(        SUBROUTINE PTRACERS_FORCING(
11       I                            bi,bj,k,iTracer,       I                            bi,bj,iMin,iMax,jMin,jMax,k,iTracer,
12       U                            gPtracer,       U                            gPtracer,
13       I                            myIter,myTime,myThid )       I                            myIter,myTime,myThid )
14    
# Line 27  C !USES: =============================== Line 27  C !USES: ===============================
27    
28  C !INPUT PARAMETERS: ===================================================  C !INPUT PARAMETERS: ===================================================
29  C  bi,bj                :: tile indices  C  bi,bj                :: tile indices
30    C  iMin iMax jMin jMax  :: working range of tile for applying forcing
31  C  k                    :: vertical level number  C  k                    :: vertical level number
32  C  iTracer              :: passive tracer index  C  iTracer              :: passive tracer index
33  C  gPtracer             :: the tendancy array  C  gPtracer             :: the tendancy array
34  C  myIter               :: time-step number  C  myIter               :: time-step number
35  C  myTime               :: model time  C  myTime               :: model time
36  C  myThid               :: thread number  C  myThid               :: thread number
37        INTEGER bi,bj,k,iTracer        INTEGER bi,bj,iMin, iMax, jMin, jMax,k,iTracer
38        _RL gPtracer(1-Olx:sNx+Olx,1-Oly:sNy+Oly,Nr,nSx,nSy)        _RL gPtracer(1-Olx:sNx+Olx,1-Oly:sNy+Oly,Nr,nSx,nSy)
39        INTEGER myIter        INTEGER myIter
40        _RL myTime        _RL myTime
# Line 47  C  gPtracer            :: updates tendancy array Line 48  C  gPtracer            :: updates tendancy array
48  C !LOCAL VARIABLES: ====================================================  C !LOCAL VARIABLES: ====================================================
49  C  i,j                  :: loop indices  C  i,j                  :: loop indices
50        INTEGER i,j        INTEGER i,j
51    C     number of surface interface layer
52          INTEGER kSurface
53  CEOP  CEOP
54    
55  C Example of how to add forcing at the surface        if ( buoyancyRelation .eq. 'OCEANICP' ) then
56         IF (k.EQ.1) THEN         kSurface = Nr
57          DO j=1-Oly,sNy+Oly        else
58           DO i=1-Olx,sNx+Olx         kSurface = 1
59          endif
60  C Here, we'll copy the exact forcing used for salinity to allow us  
61  C to test everything is working.  C--   Surface forcing term is surfaceTendencyPtr, previously computed
62            gPtracer(i,j,k,bi,bj)=gPtracer(i,j,k,bi,bj)  C     by PTRACERS_FORCING because it is needed by KPP_TRANSPORT_PTR.
63       &   +maskC(i,j,k,bi,bj)*surfaceTendencyS(i,j,bi,bj)  
64           IF ( k .EQ. kSurface ) THEN
65            DO j=jMin,jMax
66             DO i=iMin,iMax
67              gPtracer(i,j,k,bi,bj) = gPtracer(i,j,k,bi,bj) +
68         &           maskC(i,j,k,bi,bj) *
69         &           surfaceTendencyPtr(i,j,bi,bj,iTracer)
70           ENDDO           ENDDO
71          ENDDO          ENDDO
72         ENDIF         ENDIF

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.22