--- MITgcm/verification/aim.5l_cs/code/mom_vi_hfacz_diss.F 2002/01/09 00:28:56 1.1 +++ MITgcm/verification/aim.5l_cs/code/mom_vi_hfacz_diss.F 2003/07/13 19:26:05 1.2 @@ -1,4 +1,4 @@ -C $Header: /home/ubuntu/mnt/e9_copy/MITgcm/verification/aim.5l_cs/code/mom_vi_hfacz_diss.F,v 1.1 2002/01/09 00:28:56 jmc Exp $ +C $Header: /home/ubuntu/mnt/e9_copy/MITgcm/verification/aim.5l_cs/code/mom_vi_hfacz_diss.F,v 1.2 2003/07/13 19:26:05 jmc Exp $ C $Name: $ #include "CPP_OPTIONS.h" @@ -16,6 +16,8 @@ C == Global variables == #include "SIZE.h" +#include "EEPARAMS.h" +#include "PARAMS.h" #include "GRID.h" C == Routine arguments == @@ -53,5 +55,26 @@ ENDDO ENDDO +C- Special stuff for Cubed Sphere +C above formula is ambiguous when only 3 edges instead of 4, +C => return to min-3 definition at the Cubed-Sphere corners + IF (useCubedSphereExchange) THEN + DO j=1,sNy+1,sNy + DO i=1,sNx+1,sNx + hFacZOpen=MIN( _hFacW(i,j,k,bi,bj) + & , _hFacW(i,j-1,k,bi,bj) + & , _hFacS(i,j,k,bi,bj) + & , _hFacS(i-1,j,k,bi,bj) + & ) + hFacZ(i,j)=hFacZOpen + IF (hFacZOpen.EQ.0.) THEN + r_hFacZ(i,j)=0. + ELSE + r_hFacZ(i,j)=1./hFacZOpen + ENDIF + ENDDO + ENDDO + ENDIF + RETURN END