/[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.8 by mlosch, Thu Oct 25 13:11:59 2007 UTC revision 1.9 by jmc, Mon Nov 5 18:48:04 2007 UTC
# Line 26  C !USES: =============================== Line 26  C !USES: ===============================
26  #include "FFIELDS.h"  #include "FFIELDS.h"
27  c #include "DYNVARS.h"  c #include "DYNVARS.h"
28  #include "PTRACERS_SIZE.h"  #include "PTRACERS_SIZE.h"
29  #include "PTRACERS.h"  #include "PTRACERS_PARAMS.h"
30    #include "PTRACERS_FIELDS.h"
31    
32  C !INPUT PARAMETERS: ===================================================  C !INPUT PARAMETERS: ===================================================
33  C  bi,bj                :: tile indices  C  bi,bj                :: tile indices
# Line 58  C Example of how to add forcing at the s Line 59  C Example of how to add forcing at the s
59        DO iTrc=1,PTRACERS_numInUse        DO iTrc=1,PTRACERS_numInUse
60            DO j = jMin, jMax            DO j = jMin, jMax
61             DO i = iMin, iMax             DO i = iMin, iMax
62               surfaceForcingPtr(i,j,bi,bj,iTrc) =               surfaceForcingPTr(i,j,bi,bj,iTrc) =
63       &               0. _d 0       &               0. _d 0
64  c    &               surfaceForcingS(i,j,bi,bj)  c    &               surfaceForcingS(i,j,bi,bj)
65             ENDDO             ENDDO
# Line 75  c-  NonLin_FrSurf and RealFreshWaterFlux Line 76  c-  NonLin_FrSurf and RealFreshWaterFlux
76  c   the water column height ; temp., salt, (tracer) flux associated  c   the water column height ; temp., salt, (tracer) flux associated
77  c   with this input/output of water is added here to the surface tendency.  c   with this input/output of water is added here to the surface tendency.
78  c  c
79           IF (PtRACERS_EvPrRn(iTrc).NE.UNSET_RL) THEN           IF (PTRACERS_EvPrRn(iTrc).NE.UNSET_RL) THEN
80            DO j = jMin, jMax            DO j = jMin, jMax
81             DO i = iMin, iMax             DO i = iMin, iMax
82               surfaceForcingPtr(i,j,bi,bj,iTrc) =               surfaceForcingPTr(i,j,bi,bj,iTrc) =
83       &          surfaceForcingPtr(i,j,bi,bj,iTrc)       &          surfaceForcingPTr(i,j,bi,bj,iTrc)
84       &        + PmEpR(i,j,bi,bj)       &        + PmEpR(i,j,bi,bj)
85       &          *( PTRACERS_EvPrRn(iTrc) - pTracer(i,j,ks,bi,bj,iTrc) )       &          *( PTRACERS_EvPrRn(iTrc) - pTracer(i,j,ks,bi,bj,iTrc) )
86       &          *mass2rUnit       &          *mass2rUnit
# Line 103  C-    use local surface tracer field to Line 104  C-    use local surface tracer field to
104    
105          DO iTrc=1,PTRACERS_numInUse          DO iTrc=1,PTRACERS_numInUse
106    
107           IF (PtRACERS_EvPrRn(iTrc).NE.UNSET_RL) THEN           IF (PTRACERS_EvPrRn(iTrc).NE.UNSET_RL) THEN
108  C        account for Rain/Evap tracer content (PtRACERS_EvPrRn) using  C        account for Rain/Evap tracer content (PTRACERS_EvPrRn) using
109  C        local surface tracer  C        local surface tracer
110            DO j = jMin, jMax            DO j = jMin, jMax
111             DO i = iMin, iMax             DO i = iMin, iMax
112              surfaceForcingPtr(i,j,bi,bj,iTrc) =              surfaceForcingPTr(i,j,bi,bj,iTrc) =
113       &          surfaceForcingPtr(i,j,bi,bj,iTrc)       &          surfaceForcingPTr(i,j,bi,bj,iTrc)
114       &        + EmPmR(i,j,bi,bj)       &        + EmPmR(i,j,bi,bj)
115       &          *( pTracer(i,j,ks,bi,bj,iTrc) - PtRACERS_EvPrRn(iTrc) )       &          *( pTracer(i,j,ks,bi,bj,iTrc) - PTRACERS_EvPrRn(iTrc) )
116       &          *mass2rUnit       &          *mass2rUnit
117             ENDDO             ENDDO
118            ENDDO            ENDDO
# Line 124  C-    use uniform tracer value to calcul Line 125  C-    use uniform tracer value to calcul
125    
126          DO iTrc=1,PTRACERS_numInUse          DO iTrc=1,PTRACERS_numInUse
127    
128           IF (PtRACERS_EvPrRn(iTrc).NE.UNSET_RL) THEN           IF (PTRACERS_EvPrRn(iTrc).NE.UNSET_RL) THEN
129  C     account for Rain/Evap tracer content (PtRACERS_EvPrRn) assuming uniform  C     account for Rain/Evap tracer content (PTRACERS_EvPrRn) assuming uniform
130  C     surface tracer (=PTRACERS_ref)  C     surface tracer (=PTRACERS_ref)
131            DO j = jMin, jMax            DO j = jMin, jMax
132             DO i = iMin, iMax             DO i = iMin, iMax
133              surfaceForcingPtr(i,j,bi,bj,iTrc) =              surfaceForcingPTr(i,j,bi,bj,iTrc) =
134       &          surfaceForcingPtr(i,j,bi,bj,iTrc)       &          surfaceForcingPTr(i,j,bi,bj,iTrc)
135       &        + EmPmR(i,j,bi,bj)       &        + EmPmR(i,j,bi,bj)
136       &            *( PTRACERS_ref(ks,iTrc) - PtRACERS_EvPrRn(iTrc) )       &            *( PTRACERS_ref(ks,iTrc) - PTRACERS_EvPrRn(iTrc) )
137       &            *mass2rUnit       &            *mass2rUnit
138             ENDDO             ENDDO
139            ENDDO            ENDDO

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

  ViewVC Help
Powered by ViewVC 1.1.22