/[MITgcm]/MITgcm/pkg/seaice/seaice_tracer_phys.F
ViewVC logotype

Diff of /MITgcm/pkg/seaice/seaice_tracer_phys.F

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

revision 1.2 by gforget, Thu Jun 9 19:37:01 2011 UTC revision 1.3 by gforget, Mon Jun 13 23:21:18 2011 UTC
# Line 41  C     === Local variables === Line 41  C     === Local variables ===
41        _RL HEFFprev, HEFFpost, growFact, meltPart, tmpscal1        _RL HEFFprev, HEFFpost, growFact, meltPart, tmpscal1
42        _RL SItrExpand  (1:sNx,1:sNy)        _RL SItrExpand  (1:sNx,1:sNy)
43        _RL AREAprev, AREApost, expandFact        _RL AREAprev, AREApost, expandFact
44          CHARACTER*8   diagName
45    
46  #ifdef ALLOW_SITRACER_DIAG  #ifdef ALLOW_SITRACER_DEBUG_DIAG
47        _RL DIAGarray     (1:sNx,1:sNy,Nr)        _RL DIAGarray     (1:sNx,1:sNy,Nr)
48  #endif  #endif
49    
# Line 94  c ================================== Line 95  c ==================================
95        DO J=1,sNy        DO J=1,sNy
96         DO I=1,sNx         DO I=1,sNx
97          HEFFprev=SItrHEFF(i,j,bi,bj,1)          HEFFprev=SItrHEFF(i,j,bi,bj,1)
98  #ifdef ALLOW_SITRACER_DIAG  #ifdef ALLOW_SITRACER_DEBUG_DIAG
99          diagArray(I,J,5+(iTr-1)*5) =          DIAGarray(I,J,5+(iTr-1)*5) =
100       &    HEFFprev*SItracer(i,j,bi,bj,iTr) + SItrBucket(i,j,bi,bj,iTr)       &    HEFFprev*SItracer(i,j,bi,bj,iTr) + SItrBucket(i,j,bi,bj,iTr)
101  #endif  #endif
102  c apply the sequence of thermodynamics increments to actual traceur  c apply the sequence of thermodynamics increments to actual traceur
# Line 131  c rk: flooding can only imply an ocean-i Line 132  c rk: flooding can only imply an ocean-i
132  c as we dont have snow tracers, so it goes through SItrBucket.  c as we dont have snow tracers, so it goes through SItrBucket.
133            SItrBucket(i,j,bi,bj,iTr)=SItrBucket(i,j,bi,bj,iTr)            SItrBucket(i,j,bi,bj,iTr)=SItrBucket(i,j,bi,bj,iTr)
134       &             -HEFFpost*SItrFromFlood(i,j)*(1. _d 0 - growFact)       &             -HEFFpost*SItrFromFlood(i,j)*(1. _d 0 - growFact)
135  #ifdef ALLOW_SITRACER_DIAG  #ifdef ALLOW_SITRACER_DEBUG_DIAG
136          diagArray(I,J,5+(iTr-1)*5) = HEFFpost*SItracer(i,j,bi,bj,iTr)          DIAGarray(I,J,5+(iTr-1)*5) = HEFFpost*SItracer(i,j,bi,bj,iTr)
137       &  +SItrBucket(i,j,bi,bj,iTr)-diagArray(I,J,5+(iTr-1)*5)       &  +SItrBucket(i,j,bi,bj,iTr)-DIAGarray(I,J,5+(iTr-1)*5)
138  #endif  #endif
139         ENDDO         ENDDO
140        ENDDO        ENDDO
# Line 200  c ice melt reduces ridges/roughness Line 201  c ice melt reduces ridges/roughness
201        endif        endif
202  c 3) ice-ocean tracer exchange/mapping to external variables  c 3) ice-ocean tracer exchange/mapping to external variables
203  c ==========================================================  c ==========================================================
204    #ifdef ALLOW_DIAGNOSTICS
205          if (SItrMate(iTr).EQ.'HEFF') then
206            WRITE(diagName,'(A4,I2.2,A2)') 'SItr',iTr,'FX'
207            tmpscal1=-ONE/SEAICE_deltaTtherm*SEAICE_rhoIce
208            CALL DIAGNOSTICS_SCALE_FILL(SItrBucket(1-oLx,1-oLy,bi,bj,iTr),
209         &   tmpscal1, 1, diagName,0,1,2,bi,bj,myThid)
210          endif
211    #endif
212        if (SItrName(iTr).EQ.'age') then        if (SItrName(iTr).EQ.'age') then
213  c age tracer: not passed to ocean  c age tracer: not passed to ocean
214        elseif (SItrName(iTr).EQ.'salinity') then        elseif (SItrName(iTr).EQ.'salinity') then
# Line 217  c "ice concentration" tracer: not passed Line 226  c "ice concentration" tracer: not passed
226        endif        endif
227        DO J=1,sNy        DO J=1,sNy
228         DO I=1,sNx         DO I=1,sNx
229  #ifdef ALLOW_SITRACER_DIAG  #ifdef ALLOW_SITRACER_DEBUG_DIAG
230          diagArray(I,J,4+(iTr-1)*5) = - SItrBucket(i,j,bi,bj,iTr)          DIAGarray(I,J,4+(iTr-1)*5) = - SItrBucket(i,j,bi,bj,iTr)
231       &  *HEFFM(I,J,bi,bj)/SEAICE_deltaTtherm*SEAICE_rhoIce       &  *HEFFM(I,J,bi,bj)/SEAICE_deltaTtherm*SEAICE_rhoIce
232  #endif  #endif
233  c empty bucket  c empty bucket
# Line 228  c empty bucket Line 237  c empty bucket
237  c TAF? elseif (SItrMate(iTr).EQ.'AREA') then  c TAF? elseif (SItrMate(iTr).EQ.'AREA') then
238  c 4) diagnostics  c 4) diagnostics
239  c ==============  c ==============
240  #ifdef ALLOW_SITRACER_DIAG  #ifdef ALLOW_SITRACER_DEBUG_DIAG
241        if (SItrMate(iTr).EQ.'HEFF') then        if (SItrMate(iTr).EQ.'HEFF') then
242        DO J=1,sNy        DO J=1,sNy
243         DO I=1,sNx         DO I=1,sNx
244          HEFFpost=SItrHEFF(i,j,bi,bj,5)          HEFFpost=SItrHEFF(i,j,bi,bj,5)
245          DIAGarray(I,J,1+(iTr-1)*5) = SItracer(i,j,bi,bj,iTr)          DIAGarray(I,J,1+(iTr-1)*5) = SItracer(i,j,bi,bj,iTr)
246          DIAGarray(I,J,2+(iTr-1)*5) = SItracer(i,j,bi,bj,iTr)*HEFFpost          DIAGarray(I,J,2+(iTr-1)*5) = SItracer(i,j,bi,bj,iTr)*HEFFpost
247  c diagArray(:,:,3) is the term of comparison for diagArray(:,:,2)  c DIAGarray(:,:,3) is the term of comparison for DIAGarray(:,:,2)
248          if (SItrName(iTr).EQ.'age') then          if (SItrName(iTr).EQ.'age') then
249            DIAGarray(I,J,3+(iTr-1)*5) = IceAgeTr(i,j,bi,bj,2)            DIAGarray(I,J,3+(iTr-1)*5) = IceAgeTr(i,j,bi,bj,2)
250          elseif (SItrName(iTr).EQ.'salinity') then          elseif (SItrName(iTr).EQ.'salinity') then
# Line 243  c diagArray(:,:,3) is the term of compar Line 252  c diagArray(:,:,3) is the term of compar
252          elseif (SItrName(iTr).EQ.'one') then          elseif (SItrName(iTr).EQ.'one') then
253            DIAGarray(I,J,3+(iTr-1)*5) = HEFFpost            DIAGarray(I,J,3+(iTr-1)*5) = HEFFpost
254          endif          endif
255  c diagArray(:,:,4) allows check of conservation : del(SItrBucket)+del(SItr*HEFF)=0. over do_phys  c DIAGarray(:,:,4) allows check of conservation : del(SItrBucket)+del(SItr*HEFF)=0. over do_phys
256  c diagArray(:,:,5) is the tracer flux from the ocean (<0 incr. ocean tracer)  c DIAGarray(:,:,5) is the tracer flux from the ocean (<0 incr. ocean tracer)
257         ENDDO         ENDDO
258        ENDDO        ENDDO
259        else        else
# Line 253  c diagArray(:,:,5) is the tracer flux fr Line 262  c diagArray(:,:,5) is the tracer flux fr
262          AREApost=SItrAREA(i,j,bi,bj,3)          AREApost=SItrAREA(i,j,bi,bj,3)
263          DIAGarray(I,J,1+(iTr-1)*5) = SItracer(i,j,bi,bj,iTr)          DIAGarray(I,J,1+(iTr-1)*5) = SItracer(i,j,bi,bj,iTr)
264          DIAGarray(I,J,2+(iTr-1)*5) = SItracer(i,j,bi,bj,iTr)*AREApost          DIAGarray(I,J,2+(iTr-1)*5) = SItracer(i,j,bi,bj,iTr)*AREApost
265  c diagArray(:,:,3) is the term of comparison for diagArray(:,:,2)  c DIAGarray(:,:,3) is the term of comparison for DIAGarray(:,:,2)
266          if (SItrName(iTr).EQ.'age') then          if (SItrName(iTr).EQ.'age') then
267            DIAGarray(I,J,3+(iTr-1)*5) = IceAgeTr(i,j,bi,bj,1)            DIAGarray(I,J,3+(iTr-1)*5) = IceAgeTr(i,j,bi,bj,1)
268          endif          endif
# Line 262  c diagArray(:,:,3) is the term of compar Line 271  c diagArray(:,:,3) is the term of compar
271        endif        endif
272  #endif  #endif
273        ENDDO        ENDDO
274  #ifdef ALLOW_SITRACER_DIAG  #ifdef ALLOW_SITRACER_DEBUG_DIAG
275        CALL DIAGNOSTICS_FILL(DIAGarray,'UDIAG1  ',0,Nr,3,bi,bj,myThid)        CALL DIAGNOSTICS_FILL(DIAGarray,'UDIAG1  ',0,Nr,3,bi,bj,myThid)
276  #endif  #endif
277        ENDDO        ENDDO

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.22