5 |
|
|
6 |
CStartOfInterface |
CStartOfInterface |
7 |
SUBROUTINE SEAICE_TRACER_PHYS( myTime, myIter, myThid ) |
SUBROUTINE SEAICE_TRACER_PHYS( myTime, myIter, myThid ) |
8 |
C /=======================================================\ |
C *=======================================================* |
9 |
C | SUBROUTINE seaice_tracer_phys | |
C | SUBROUTINE seaice_tracer_phys |
10 |
C | o Time step SItr/SItrEFF as a result of | |
C | o Time step SItr/SItrEFF as a result of |
11 |
C | seaice thermodynamics and specific tracer physics | |
C | seaice thermodynamics and specific tracer physics |
12 |
C \=======================================================/ |
C *=======================================================* |
13 |
IMPLICIT NONE |
IMPLICIT NONE |
14 |
|
|
15 |
C === Global variables === |
C === Global variables === |
21 |
#include "SEAICE.h" |
#include "SEAICE.h" |
22 |
#include "SEAICE_PARAMS.h" |
#include "SEAICE_PARAMS.h" |
23 |
#include "SEAICE_TRACER.h" |
#include "SEAICE_TRACER.h" |
24 |
|
#ifdef ALLOW_SALT_PLUME |
25 |
|
# include "SALT_PLUME.h" |
26 |
|
#endif |
27 |
|
|
28 |
C === Routine arguments === |
C === Routine arguments === |
29 |
C INPUT: |
C INPUT: |
58 |
|
|
59 |
DO bj=myByLo(myThid),myByHi(myThid) |
DO bj=myByLo(myThid),myByHi(myThid) |
60 |
DO bi=myBxLo(myThid),myBxHi(myThid) |
DO bi=myBxLo(myThid),myBxHi(myThid) |
61 |
DO iTr=1,SItrMaxNum |
DO iTr=1,SItrNumInUse |
62 |
|
|
63 |
c 0) set ice-ocean and ice-snow exchange values |
c 0) set ice-ocean and ice-snow exchange values |
64 |
c ============================================= |
c ============================================= |
65 |
DO J=1,sNy |
DO J=1,sNy |
66 |
DO I=1,sNx |
DO I=1,sNx |
67 |
SItrFromOcean(i,j)=0. _d 0 |
SItrFromOcean(i,j)=SItrFromOcean0(iTr) |
68 |
SItrFromFlood(i,j)=0. _d 0 |
SItrFromFlood(i,j)=SItrFromFlood0(iTr) |
69 |
SItrExpand(i,j)=0. _d 0 |
SItrExpand(i,j)=SItrExpand0(iTr) |
70 |
ENDDO |
ENDDO |
71 |
ENDDO |
ENDDO |
|
if (SItrName(iTr).EQ.'age') then |
|
|
c age tracer: no age in ocean, or effect from ice cover changes |
|
|
elseif (SItrName(iTr).EQ.'salinity') then |
|
72 |
c salinity tracer: |
c salinity tracer: |
73 |
|
if ( (SItrName(iTr).EQ.'salinity').AND. |
74 |
|
& (SItrFromOceanFrac(iTr).GT.ZERO) ) then |
75 |
DO J=1,sNy |
DO J=1,sNy |
76 |
DO I=1,sNx |
DO I=1,sNx |
77 |
SItrFromOcean(i,j)=SIsal0 |
SItrFromOcean(i,j)=SItrFromOceanFrac(iTr)*salt(I,j,ks,bi,bj) |
78 |
#ifdef SEAICE_VARIABLE_SALINITY |
SItrFromFlood(i,j)=SItrFromFloodFrac(iTr)*salt(I,j,ks,bi,bj) |
|
if (SIsalFRAC.GT.0.) |
|
|
& SItrFromOcean(i,j)=SIsalFRAC*salt(I,j,ks,bi,bj) |
|
|
#endif |
|
|
c as of now, flooding implies no salt extraction from ocean |
|
|
ENDDO |
|
|
ENDDO |
|
|
elseif (SItrName(iTr).EQ.'one') then |
|
|
c "ice concentration" tracer that should remain .EQ.1. |
|
|
DO J=1,sNy |
|
|
DO I=1,sNx |
|
|
SItrFromOcean(i,j)=1. _d 0 |
|
|
SItrFromFlood(i,j)=1. _d 0 |
|
79 |
ENDDO |
ENDDO |
80 |
ENDDO |
ENDDO |
81 |
endif |
endif |
195 |
if (SItrMate(iTr).EQ.'HEFF') then |
if (SItrMate(iTr).EQ.'HEFF') then |
196 |
WRITE(diagName,'(A4,I2.2,A2)') 'SItr',iTr,'FX' |
WRITE(diagName,'(A4,I2.2,A2)') 'SItr',iTr,'FX' |
197 |
tmpscal1=-ONE/SEAICE_deltaTtherm*SEAICE_rhoIce |
tmpscal1=-ONE/SEAICE_deltaTtherm*SEAICE_rhoIce |
198 |
CALL DIAGNOSTICS_SCALE_FILL(SItrBucket(1-oLx,1-oLy,bi,bj,iTr), |
CALL DIAGNOSTICS_SCALE_FILL(SItrBucket(1-OLx,1-OLy,bi,bj,iTr), |
199 |
& tmpscal1, 1, diagName,0,1,2,bi,bj,myThid) |
& tmpscal1, 1, diagName,0,1,2,bi,bj,myThid) |
200 |
endif |
endif |
201 |
#endif |
#endif |
202 |
if (SItrName(iTr).EQ.'age') then |
|
203 |
c age tracer: not passed to ocean |
if ( (SItrName(iTr).EQ.'salinity').AND. |
204 |
elseif (SItrName(iTr).EQ.'salinity') then |
& (SEAICE_salinityTracer) ) then |
205 |
c salinity tracer: salt flux |
c salinity tracer: salt flux |
206 |
c DO J=1,sNy |
DO J=1,sNy |
207 |
c DO I=1,sNx |
DO I=1,sNx |
208 |
c saltFlux(I,J,bi,bj) = - SItrBucket(i,j,bi,bj,iTr) |
saltFlux(I,J,bi,bj) = - SItrBucket(i,j,bi,bj,iTr) |
209 |
c & *HEFFM(I,J,bi,bj)/SEAICE_deltaTtherm*SEAICE_rhoIce |
& *HEFFM(I,J,bi,bj)/SEAICE_deltaTtherm*SEAICE_rhoIce |
210 |
c note: at this point of the time step, that is the correct sign |
c note: at this point of the time step, that is the correct sign |
211 |
c saltPlumeFlux(I,J,bi,bj) = ... |
#ifdef ALLOW_SALT_PLUME |
212 |
c ENDDO |
c should work for both constant and variable ice salinity -- to be tested |
213 |
c ENDDO |
saltPlumeFlux(I,J,bi,bj) = MAX(ZERO,saltFlux(I,J,bi,bj)) |
214 |
elseif (SItrName(iTr).EQ.'one') then |
& *SPsalFRAC*(salt(I,j,ks,bi,bj)-SItrFromOcean(i,j)) |
215 |
c "ice concentration" tracer: not passed to ocean |
#endif |
216 |
|
ENDDO |
217 |
|
ENDDO |
218 |
endif |
endif |
219 |
|
|
220 |
DO J=1,sNy |
DO J=1,sNy |
221 |
DO I=1,sNx |
DO I=1,sNx |
222 |
#ifdef ALLOW_SITRACER_DEBUG_DIAG |
#ifdef ALLOW_SITRACER_DEBUG_DIAG |
227 |
SItrBucket(i,j,bi,bj,iTr)=0. _d 0 |
SItrBucket(i,j,bi,bj,iTr)=0. _d 0 |
228 |
ENDDO |
ENDDO |
229 |
ENDDO |
ENDDO |
230 |
|
|
231 |
c TAF? elseif (SItrMate(iTr).EQ.'AREA') then |
c TAF? elseif (SItrMate(iTr).EQ.'AREA') then |
232 |
|
|
233 |
c 4) diagnostics |
c 4) diagnostics |
234 |
c ============== |
c ============== |
235 |
#ifdef ALLOW_SITRACER_DEBUG_DIAG |
#ifdef ALLOW_SITRACER_DEBUG_DIAG |
240 |
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) |
241 |
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 |
242 |
c DIAGarray(:,:,3) is the term of comparison for DIAGarray(:,:,2) |
c DIAGarray(:,:,3) is the term of comparison for DIAGarray(:,:,2) |
243 |
if (SItrName(iTr).EQ.'age') then |
if (SItrName(iTr).EQ.'salinity') then |
|
DIAGarray(I,J,3+(iTr-1)*5) = IceAgeTr(i,j,bi,bj,2) |
|
|
elseif (SItrName(iTr).EQ.'salinity') then |
|
244 |
DIAGarray(I,J,3+(iTr-1)*5) = HSALT(i,j,bi,bj)/SEAICE_rhoIce |
DIAGarray(I,J,3+(iTr-1)*5) = HSALT(i,j,bi,bj)/SEAICE_rhoIce |
245 |
elseif (SItrName(iTr).EQ.'one') then |
elseif (SItrName(iTr).EQ.'one') then |
246 |
DIAGarray(I,J,3+(iTr-1)*5) = HEFFpost |
DIAGarray(I,J,3+(iTr-1)*5) = HEFFpost |
255 |
AREApost=SItrAREA(i,j,bi,bj,3) |
AREApost=SItrAREA(i,j,bi,bj,3) |
256 |
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) |
257 |
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 |
|
c DIAGarray(:,:,3) is the term of comparison for DIAGarray(:,:,2) |
|
|
if (SItrName(iTr).EQ.'age') then |
|
|
DIAGarray(I,J,3+(iTr-1)*5) = IceAgeTr(i,j,bi,bj,1) |
|
|
endif |
|
258 |
ENDDO |
ENDDO |
259 |
ENDDO |
ENDDO |
260 |
endif |
endif |