22 |
#include "GRID.h" |
#include "GRID.h" |
23 |
|
|
24 |
C == Routine arguments == |
C == Routine arguments == |
25 |
C myThid - Number of this instance of INI_CARTESIAN_GRID |
C myThid - Number of this instance of INI_MASKS_ETC |
26 |
INTEGER myThid |
INTEGER myThid |
27 |
CEndOfInterface |
CEndOfInterface |
28 |
|
|
55 |
DO K=1, Nr |
DO K=1, Nr |
56 |
DO J=1,sNy |
DO J=1,sNy |
57 |
DO I=1,sNx |
DO I=1,sNx |
58 |
IF ( H(I,J,bi,bj) .GE. rF(K) ) THEN |
IF ( H(I,J,bi,bj)*rkFac .GE. rF(K)*rkFac ) THEN |
59 |
C Top of cell is below base of domain |
C Top of cell is below base of domain |
60 |
hFacC(I,J,K,bi,bj) = 0. |
hFacC(I,J,K,bi,bj) = 0. |
61 |
ELSEIF ( H(I,J,bi,bj) .LE. rF(K+1) ) THEN |
ELSEIF ( H(I,J,bi,bj)*rkFac .LE. rF(K+1)*rkFac ) THEN |
62 |
C Base of domain is below bottom of this cell |
C Base of domain is below bottom of this cell |
63 |
hFacC(I,J,K,bi,bj) = 1. |
hFacC(I,J,K,bi,bj) = 1. |
64 |
ELSE |
ELSE |
65 |
C Base of domain is in this cell |
C Base of domain is in this cell |
66 |
C Set hFac to the fraction of the cell that is open. |
C Set hFac to the fraction of the cell that is open. |
67 |
hFacC(I,J,K,bi,bj) = (rF(K)-H(I,J,bi,bj))*recip_drF(K) |
hFacC(I,J,K,bi,bj) = (rF(K)*rkFac-H(I,J,bi,bj)*rkFac)*recip_drF(K) |
68 |
ENDIF |
ENDIF |
69 |
C Impose minimum fraction |
C Impose minimum fraction |
70 |
IF (hFacC(I,J,K,bi,bj).LT.hFacMin) THEN |
IF (hFacC(I,J,K,bi,bj).LT.hFacMin) THEN |