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

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

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


Revision 1.8 - (hide annotations) (download)
Sun Nov 28 23:50:04 2004 UTC (19 years, 5 months ago) by mlosch
Branch: MAIN
CVS Tags: checkpoint57m_post, checkpoint57g_pre, checkpoint57s_post, checkpoint57b_post, checkpoint57g_post, checkpoint56b_post, checkpoint57r_post, checkpoint57d_post, checkpoint57i_post, checkpoint57, checkpoint57n_post, checkpoint57l_post, checkpoint57t_post, checkpoint57v_post, checkpoint57f_post, checkpoint57a_post, checkpoint57h_pre, checkpoint57x_post, checkpoint57h_post, checkpoint57c_post, checkpoint57c_pre, checkpoint57e_post, checkpoint57p_post, checkpint57u_post, checkpoint57q_post, eckpoint57e_pre, checkpoint56a_post, checkpoint57h_done, checkpoint57j_post, checkpoint57f_pre, checkpoint56c_post, checkpoint57a_pre, checkpoint57o_post, checkpoint57k_post, checkpoint57w_post
Changes since 1.7: +3 -3 lines
o GCHEM: finish reorganizating the package
  - ptracers_forcing now calls gchem_add_tendency instead of gchem_forcing_int

1 mlosch 1.8 C $Header: /u/gcmpack/MITgcm/pkg/ptracers/ptracers_forcing.F,v 1.7 2004/11/23 20:21:14 mlosch Exp $
2 heimbach 1.2 C $Name: $
3 adcroft 1.1
4     #include "PTRACERS_OPTIONS.h"
5    
6     CBOP
7     C !ROUTINE: PTRACERS_FORCING
8    
9     C !INTERFACE: ==========================================================
10     SUBROUTINE PTRACERS_FORCING(
11 mlosch 1.7 I bi,bj,iMin,iMax,jMin,jMax,k,iTracer,
12 heimbach 1.5 U gPtracer,surfPtracer,
13 adcroft 1.1 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 "PARAMS.h"
23 jmc 1.6 c #include "FFIELDS.h"
24     c #include "DYNVARS.h"
25 adcroft 1.1 #include "GRID.h"
26    
27     C !INPUT PARAMETERS: ===================================================
28     C bi,bj :: tile indices
29 dimitri 1.4 C iMin iMax jMin jMax :: working range of tile for applying forcing
30 adcroft 1.1 C k :: vertical level number
31 mlosch 1.7 C iTracer :: tracer number
32 adcroft 1.1 C gPtracer :: the tendancy array
33     C myIter :: time-step number
34     C myTime :: model time
35     C myThid :: thread number
36 mlosch 1.7 INTEGER bi,bj,iMin,iMax,jMin,jMax,k,iTracer
37 adcroft 1.1 _RL gPtracer(1-Olx:sNx+Olx,1-Oly:sNy+Oly,Nr,nSx,nSy)
38 heimbach 1.5 _RL surfPtracer(1-Olx:sNx+Olx,1-Oly:sNy+Oly,nSx,nSy)
39 adcroft 1.1 INTEGER myIter
40     _RL myTime
41     INTEGER myThid
42    
43     C !OUTPUT PARAMETERS: ==================================================
44     C gPtracer :: updates tendancy array
45    
46     #ifdef ALLOW_PTRACERS
47    
48     C !LOCAL VARIABLES: ====================================================
49     C i,j :: loop indices
50     INTEGER i,j
51 dimitri 1.4 C number of surface interface layer
52     INTEGER kSurface
53 adcroft 1.1 CEOP
54    
55 dimitri 1.4 if ( buoyancyRelation .eq. 'OCEANICP' ) then
56     kSurface = Nr
57     else
58     kSurface = 1
59     endif
60    
61 jmc 1.6 C-- Surface forcing term is surfaceForcingPtr, previously computed
62 dimitri 1.4 C by PTRACERS_FORCING because it is needed by KPP_TRANSPORT_PTR.
63    
64 mlosch 1.7 #ifdef ALLOW_GCHEM
65     IF ( useGCHEM )
66 mlosch 1.8 & CALL GCHEM_ADD_TENDENCY(
67 mlosch 1.7 I bi,bj,iMin,iMax,jMin,jMax,k,
68     I iTracer,
69     I myTime,myIter, myThid)
70     #else /* ALLOW_GCHEM */
71 mlosch 1.8 IF ( .NOT. useGCHEM .AND. k .EQ. kSurface ) THEN
72 dimitri 1.4 DO j=jMin,jMax
73     DO i=iMin,iMax
74 jmc 1.6 gPtracer(i,j,k,bi,bj) = gPtracer(i,j,k,bi,bj)
75     & + surfPtracer(i,j,bi,bj)
76     & *recip_drF(k)*recip_hFacC(i,j,k,bi,bj)
77 adcroft 1.1 ENDDO
78     ENDDO
79     ENDIF
80 mlosch 1.7 #endif /* ALLOW_GCHEM */
81 adcroft 1.1
82     #endif /* ALLOW_PTRACERS */
83    
84     RETURN
85     END

  ViewVC Help
Powered by ViewVC 1.1.22