604 |
DO k=Nr-1,1,-1 |
DO k=Nr-1,1,-1 |
605 |
DO j=1-Oly,sNy+Oly-1 |
DO j=1-Oly,sNy+Oly-1 |
606 |
DO i=1-Olx,sNx+Olx-1 |
DO i=1-Olx,sNx+Olx-1 |
607 |
IF(k.LE.surfk(i,j) .AND. .NOT. GM_K3D_likeGM) THEN |
IF(k.LE.surfk(i,j) .AND. GM_K3D_PVsheet) THEN |
608 |
C We are in the surface layer, so set the thickness flux |
C We are in the surface layer, so set the thickness flux |
609 |
C based on the average slope over the surface layer |
C based on the average slope over the surface layer |
610 |
C If we are on the edge of a "cliff" the surface layer at the |
C If we are on the edge of a "cliff" the surface layer at the |
718 |
ENDDO |
ENDDO |
719 |
ENDDO |
ENDDO |
720 |
|
|
721 |
|
C If GM_K3D_likeGM=.TRUE., K3D becomes a diagnostic field only |
722 |
|
C and the diffusivity is set to a constant GM_K3D_constK. |
723 |
|
C If the diffusivity is constant the method here is the same as GM. |
724 |
|
C For the Redi diffusivity K3D is set to GM_K3D_constK at the end |
725 |
|
C of this routine (after the diagnostics are filled). |
726 |
IF(GM_K3D_likeGM) THEN |
IF(GM_K3D_likeGM) THEN |
727 |
DO k=1,Nr |
DO k=1,Nr |
728 |
DO j=1-Oly,sNy+Oly |
DO j=1-Oly,sNy+Oly |
859 |
ENDDO |
ENDDO |
860 |
ENDDO |
ENDDO |
861 |
|
|
862 |
C ENDIF GM_K3D_likeGM |
C ENDIF (.NOT. GM_K3D_smooth) |
863 |
ENDIF |
ENDIF |
864 |
|
|
865 |
|
|
959 |
ENDIF |
ENDIF |
960 |
#endif |
#endif |
961 |
|
|
962 |
|
C For the Redi diffusivity, we set K3D to a constant if |
963 |
|
C GM_K3D_likeGM=.TRUE. (see earlier comments) |
964 |
|
IF (GM_K3D_likeGM) THEN |
965 |
|
DO k=1,Nr |
966 |
|
DO j=1-Oly,sNy+Oly |
967 |
|
DO i=1-Olx,sNx+Olx |
968 |
|
K3D(i,j,k,bi,bj) = GM_K3D_constK |
969 |
|
ENDDO |
970 |
|
ENDDO |
971 |
|
ENDDO |
972 |
|
ENDIF |
973 |
|
|
974 |
#endif /* GM_K3D */ |
#endif /* GM_K3D */ |
975 |
RETURN |
RETURN |
976 |
END |
END |