/[MITgcm]/MITgcm/verification/tutorial_global_oce_latlon/code/ptracers_forcing_surf.F
ViewVC logotype

Diff of /MITgcm/verification/tutorial_global_oce_latlon/code/ptracers_forcing_surf.F

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

revision 1.4 by dfer, Thu Oct 25 20:00:22 2007 UTC revision 1.5 by jmc, Mon Nov 5 19:27:02 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       &        + 1. _d 0 / (10. _d 0 * 86400. _d 0)       &        + 1. _d 0 / (10. _d 0 * 86400. _d 0)
64       &                  * ( 0. _d 0 - pTracer(i,j,ks,bi,bj,iTrc) )       &                  * ( 0. _d 0 - pTracer(i,j,ks,bi,bj,iTrc) )
65       &                  * drF(ks) * _hFacC(i,j,ks,bi,bj)       &                  * drF(ks) * _hFacC(i,j,ks,bi,bj)
# Line 76  c-  NonLin_FrSurf and RealFreshWaterFlux Line 77  c-  NonLin_FrSurf and RealFreshWaterFlux
77  c   the water column height ; temp., salt, (tracer) flux associated  c   the water column height ; temp., salt, (tracer) flux associated
78  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.
79  c  c
80           IF (PtRACERS_EvPrRn(iTrc).NE.UNSET_RL) THEN           IF (PTRACERS_EvPrRn(iTrc).NE.UNSET_RL) THEN
81            DO j = jMin, jMax            DO j = jMin, jMax
82             DO i = iMin, iMax             DO i = iMin, iMax
83               surfaceForcingPtr(i,j,bi,bj,iTrc) =               surfaceForcingPTr(i,j,bi,bj,iTrc) =
84       &          surfaceForcingPtr(i,j,bi,bj,iTrc)       &          surfaceForcingPTr(i,j,bi,bj,iTrc)
85       &        + PmEpR(i,j,bi,bj)       &        + PmEpR(i,j,bi,bj)
86       &          *( PTRACERS_EvPrRn(iTrc) - pTracer(i,j,ks,bi,bj,iTrc) )       &          *( PTRACERS_EvPrRn(iTrc) - pTracer(i,j,ks,bi,bj,iTrc) )
87       &          *mass2rUnit       &          *mass2rUnit
# Line 104  C-    use local surface tracer field to Line 105  C-    use local surface tracer field to
105    
106          DO iTrc=1,PTRACERS_numInUse          DO iTrc=1,PTRACERS_numInUse
107    
108           IF (PtRACERS_EvPrRn(iTrc).NE.UNSET_RL) THEN           IF (PTRACERS_EvPrRn(iTrc).NE.UNSET_RL) THEN
109  C        account for Rain/Evap tracer content (PtRACERS_EvPrRn) using  C        account for Rain/Evap tracer content (PTRACERS_EvPrRn) using
110  C        local surface tracer  C        local surface tracer
111            DO j = jMin, jMax            DO j = jMin, jMax
112             DO i = iMin, iMax             DO i = iMin, iMax
113              surfaceForcingPtr(i,j,bi,bj,iTrc) =              surfaceForcingPTr(i,j,bi,bj,iTrc) =
114       &          surfaceForcingPtr(i,j,bi,bj,iTrc)       &          surfaceForcingPTr(i,j,bi,bj,iTrc)
115       &        + EmPmR(i,j,bi,bj)       &        + EmPmR(i,j,bi,bj)
116       &          *( pTracer(i,j,ks,bi,bj,iTrc) - PtRACERS_EvPrRn(iTrc) )       &          *( pTracer(i,j,ks,bi,bj,iTrc) - PTRACERS_EvPrRn(iTrc) )
117       &          *mass2rUnit       &          *mass2rUnit
118             ENDDO             ENDDO
119            ENDDO            ENDDO
# Line 125  C-    use uniform tracer value to calcul Line 126  C-    use uniform tracer value to calcul
126    
127          DO iTrc=1,PTRACERS_numInUse          DO iTrc=1,PTRACERS_numInUse
128    
129           IF (PtRACERS_EvPrRn(iTrc).NE.UNSET_RL) THEN           IF (PTRACERS_EvPrRn(iTrc).NE.UNSET_RL) THEN
130  C     account for Rain/Evap tracer content (PtRACERS_EvPrRn) assuming uniform  C     account for Rain/Evap tracer content (PTRACERS_EvPrRn) assuming uniform
131  C     surface tracer (=PTRACERS_ref)  C     surface tracer (=PTRACERS_ref)
132            DO j = jMin, jMax            DO j = jMin, jMax
133             DO i = iMin, iMax             DO i = iMin, iMax
134              surfaceForcingPtr(i,j,bi,bj,iTrc) =              surfaceForcingPTr(i,j,bi,bj,iTrc) =
135       &          surfaceForcingPtr(i,j,bi,bj,iTrc)       &          surfaceForcingPTr(i,j,bi,bj,iTrc)
136       &        + EmPmR(i,j,bi,bj)       &        + EmPmR(i,j,bi,bj)
137       &            *( PTRACERS_ref(ks,iTrc) - PtRACERS_EvPrRn(iTrc) )       &            *( PTRACERS_ref(ks,iTrc) - PTRACERS_EvPrRn(iTrc) )
138       &            *mass2rUnit       &            *mass2rUnit
139             ENDDO             ENDDO
140            ENDDO            ENDDO

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

  ViewVC Help
Powered by ViewVC 1.1.22