C $Header: /home/ubuntu/mnt/e9_copy/MITgcm/pkg/gmredi/gmredi_xtransport.F,v 1.1 2000/06/21 19:42:54 adcroft Exp $ #include "GMREDI_OPTIONS.h" subroutine GMREDI_XTRANSPORT( I iMin,iMax,jMin,jMax,bi,bj,K, I xA,Tracer, U df, I myThid) C /==========================================================\ C | o SUBROUTINE GMREDI_XTRANSPORT | C | Add horizontal x transport terms from GM/Redi | C | parameterization. | C |==========================================================| C \==========================================================/ IMPLICIT NONE C == GLobal variables == #include "SIZE.h" #include "EEPARAMS.h" #include "PARAMS.h" #include "GRID.h" #include "GMREDI.h" C == Routine arguments == C iMin,iMax,jMin, - Range of points for which calculation C jMax,bi,bj,k results will be set. C xA - Area of X face C Tracer - 3D Tracer field C df - Diffusive flux component work array. INTEGER iMin,iMax,jMin,jMax,bi,bj,k _RS xA(1-OLx:sNx+OLx,1-OLy:sNy+OLy) _RL Tracer(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr,nSx,nSy) _RL df (1-OLx:sNx+OLx,1-OLy:sNy+OLy) INTEGER myThid #ifdef ALLOW_GMREDI C == Local variables == C I, J - Loop counters INTEGER I, J IF (use_GMRedi) THEN C-- Area integrated zonal flux DO j=jMin,jMax DO i=iMin,iMax df(i,j) = df(i,j) & -xA(i,j) & *(GM_background_K #ifdef GM_VISBECK_VARIABLE_K & +0.5*(VisbeckK(i,j,myThid)+VisbeckK(i-1,j,myThid)) #endif & ) #ifdef GM_NON_UNITY_DIAGONAL & *Kux(i,j,k,myThid) #endif & *_recip_dxC(i,j,bi,bj) & *(Tracer(i,j,k,bi,bj)-Tracer(i-1,j,k,bi,bj)) ENDDO ENDDO ENDIF #endif /* ALLOW_GMREDI */ RETURN END