1 |
C $Header: /u/gcmpack/models/MITgcmUV/pkg/mom_vecinv/Attic/mom_calc_hfacz.F,v 1.1.2.1 2001/03/30 21:13:33 adcroft Exp $ |
2 |
C $Name: pre38-close $ |
3 |
|
4 |
#include "CPP_OPTIONS.h" |
5 |
|
6 |
SUBROUTINE MOM_CALC_HFACZ( |
7 |
I bi,bj,k, |
8 |
O hFacZ,r_hFacZ, |
9 |
I myThid) |
10 |
IMPLICIT NONE |
11 |
C |
12 |
C Calculate Kinetic Energy, KE, with units (m/s)^2 |
13 |
C - assumes hydrostatic formulation only |
14 |
C |
15 |
|
16 |
C == Global variables == |
17 |
#include "SIZE.h" |
18 |
#include "GRID.h" |
19 |
|
20 |
C == Routine arguments == |
21 |
INTEGER bi,bj,k |
22 |
_RS hFacZ(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
23 |
_RS r_hFacZ(1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
24 |
_RL hFacZOpen |
25 |
INTEGER myThid |
26 |
|
27 |
C == Local variables == |
28 |
INTEGER I,J |
29 |
|
30 |
C-- Calculate open water fraction at vorticity points |
31 |
|
32 |
DO i=1-Olx,sNx+Olx |
33 |
hFacZ(i,1-Oly)=0. |
34 |
r_hFacZ(i,1-Oly)=0. |
35 |
ENDDO |
36 |
|
37 |
DO j=2-Oly,sNy+Oly |
38 |
hFacZ(1-Olx,j)=0. |
39 |
r_hFacZ(1-Olx,j)=0. |
40 |
DO i=2-Olx,sNx+Olx |
41 |
hFacZOpen=min(_hFacW(i,j,k,bi,bj), |
42 |
& _hFacW(i,j-1,k,bi,bj)) |
43 |
hFacZOpen=min(_hFacS(i,j,k,bi,bj),hFacZOpen) |
44 |
hFacZOpen=min(_hFacS(i-1,j,k,bi,bj),hFacZOpen) |
45 |
hFacZ(i,j)=hFacZOpen |
46 |
IF (hFacZ(i,j).EQ.0.) THEN |
47 |
r_hFacZ(i,j)=0. |
48 |
ELSE |
49 |
r_hFacZ(i,j)=1./hFacZ(i,j) |
50 |
ENDIF |
51 |
ENDDO |
52 |
ENDDO |
53 |
|
54 |
RETURN |
55 |
END |