/[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.1 - (hide annotations) (download)
Mon Mar 4 19:01:29 2002 UTC (22 years, 2 months ago) by adcroft
Branch: MAIN
CVS Tags: checkpoint46n_post, checkpoint47e_post, checkpoint46l_post, checkpoint46g_pre, checkpoint47c_post, checkpoint50c_post, checkpoint46f_post, checkpoint48e_post, checkpoint50g_post, checkpoint46b_post, checkpoint44g_post, checkpoint48c_post, checkpoint48i_post, checkpoint46l_pre, checkpoint50d_pre, checkpoint51, checkpoint50, checkpoint50d_post, checkpoint50b_pre, checkpoint48b_post, checkpoint48c_pre, checkpoint48d_pre, checkpoint47i_post, checkpoint47d_post, checkpoint46d_pre, checkpoint48d_post, checkpoint48f_post, checkpoint45d_post, checkpoint46j_pre, checkpoint44h_pre, checkpoint48h_post, checkpoint51b_pre, checkpoint46a_post, checkpoint47g_post, checkpoint46j_post, checkpoint46k_post, checkpoint46b_pre, checkpoint45a_post, checkpoint50f_post, checkpoint50a_post, checkpoint50f_pre, checkpoint47j_post, checkpoint47a_post, branch-exfmods-tag, checkpoint46e_pre, checkpoint45b_post, checkpoint46c_pre, checkpoint46, checkpoint44f_post, checkpoint47b_post, checkpoint46h_pre, checkpoint46m_post, checkpoint46a_pre, checkpoint50c_pre, checkpoint45c_post, checkpoint44h_post, checkpoint46g_post, checkpoint50h_post, checkpoint50e_pre, checkpoint50i_post, checkpoint48a_post, checkpoint47f_post, checkpoint50e_post, checkpoint46i_post, checkpoint46c_post, checkpoint46e_post, checkpoint47d_pre, checkpoint47, checkpoint45, checkpoint48, checkpoint49, checkpoint46h_post, checkpoint47h_post, checkpoint46d_post, checkpoint50b_post, checkpoint51a_post, checkpoint48g_post
Branch point for: branch-exfmods-curt, ecco-branch
Added PTRACERS package

This allows an arbitrary number of passive tracers to be integrated
forward simultaneously with the dynamicaly model.
 + Implemented so far:
    - basic forward algorithm (time-stepping, advection, diffusion, convection)
    - I/O and checkpointing
    - GM/Redi  *but*  using the GM/Redi coefficient of Salt
 + Not implemented so far:
    - KPP
    - OBCS
 + No specific example supplied (yet) but global_ocean.90x40x15 has the
   necessary data.ptracer file. Simply use -enable=ptracers and uncomment
   line in data.pkg. PTRACER01 then reproduces Salt exactly.
 + This package is disabled by default since it increases storage.

1 adcroft 1.1 C $Header: $
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     & + EmPmR(i,j,bi,bj)*convertFW2Salt
64     & *recip_drF(1)*recip_hFacC(i,j,1,bi,bj)
65     & - lambdaSaltClimRelax*
66     & (pTracer(i,j,k,bi,bj,iTracer)-SSS(i,j,bi,bj))
67    
68     ENDDO
69     ENDDO
70     ENDIF
71    
72     ENDIF
73    
74     #endif /* ALLOW_PTRACERS */
75    
76     RETURN
77     END

  ViewVC Help
Powered by ViewVC 1.1.22