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

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

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

revision 1.4 by jmc, Sat May 14 22:51:03 2005 UTC revision 1.5 by jmc, Tue May 23 23:32:41 2006 UTC
# Line 20  C !USES: =============================== Line 20  C !USES: ===============================
20        IMPLICIT NONE        IMPLICIT NONE
21  #include "SIZE.h"  #include "SIZE.h"
22  #include "EEPARAMS.h"  #include "EEPARAMS.h"
 #include "PTRACERS_SIZE.h"  
 #include "PTRACERS.h"  
23  #include "PARAMS.h"  #include "PARAMS.h"
24    #include "GRID.h"
25    #include "SURFACE.h"
26  #include "FFIELDS.h"  #include "FFIELDS.h"
27  c #include "DYNVARS.h"  c #include "DYNVARS.h"
28  #include "GRID.h"  #include "PTRACERS_SIZE.h"
29    #include "PTRACERS.h"
30    
31  C !INPUT PARAMETERS: ===================================================  C !INPUT PARAMETERS: ===================================================
32  C  bi,bj                :: tile indices  C  bi,bj                :: tile indices
# Line 41  C  myThid               :: thread number Line 42  C  myThid               :: thread number
42    
43  C !LOCAL VARIABLES: ====================================================  C !LOCAL VARIABLES: ====================================================
44  C  i,j                  :: loop indices  C  i,j                  :: loop indices
45        INTEGER i, j, iTracer  C  iTrc                 :: tracer index
46    C  ks                   :: surface level index
47          INTEGER i, j
48          INTEGER iTrc, ks
49  CEOP  CEOP
50    
51          IF ( usingPCoords ) THEN
52            ks = Nr
53          ELSE
54            ks = 1
55          ENDIF
56    
57  C Example of how to add forcing at the surface  C Example of how to add forcing at the surface
58         DO iTracer=1,PTRACERS_numInUse        DO iTrc=1,PTRACERS_numInUse
59            DO j = jMin, jMax            DO j = jMin, jMax
60             DO i = iMin, iMax             DO i = iMin, iMax
61               surfaceForcingPtr(i,j,bi,bj,iTracer) =               surfaceForcingPtr(i,j,bi,bj,iTrc) =
62       &               0. _d 0       &               0. _d 0
63  c    &               surfaceForcingS(i,j,bi,bj)  c    &               surfaceForcingS(i,j,bi,bj)
64             ENDDO             ENDDO
65            ENDDO            ENDDO
66          ENDDO
67    
68    #ifdef EXACT_CONSERV
69          IF ( (nonlinFreeSurf.GT.0 .OR. usingPCoords)
70         &     .AND. useRealFreshWaterFlux ) THEN
71    
72           DO iTrc=1,PTRACERS_numInUse
73    
74    c-  NonLin_FrSurf and RealFreshWaterFlux : PmEpR effectively changes
75    c   the water column height ; temp., salt, (tracer) flux associated
76    c   with this input/output of water is added here to the surface tendency.
77    c
78             IF (PtRACERS_EvPrRn(iTrc).NE.UNSET_RL) THEN
79              DO j = jMin, jMax
80               DO i = iMin, iMax
81                 surfaceForcingPtr(i,j,bi,bj,iTrc) =
82         &          surfaceForcingPtr(i,j,bi,bj,iTrc)
83         &        + PmEpR(i,j,bi,bj)
84         &          *( PTRACERS_EvPrRn(iTrc) - pTracer(i,j,ks,bi,bj,iTrc) )
85         &          *convertEmP2rUnit
86               ENDDO
87              ENDDO
88             ENDIF
89    
90         ENDDO         ENDDO
91          ENDIF
92    #endif /* EXACT_CONSERV */
93    
94  #endif /* ALLOW_PTRACERS */  #endif /* ALLOW_PTRACERS */
95    

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

  ViewVC Help
Powered by ViewVC 1.1.22