/[MITgcm]/MITgcm/pkg/mom_fluxform/mom_calc_ke.F
ViewVC logotype

Contents of /MITgcm/pkg/mom_fluxform/mom_calc_ke.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (show annotations) (download)
Tue May 29 14:01:38 2001 UTC (23 years, 1 month ago) by adcroft
Branch: MAIN
CVS Tags: checkpoint40pre1, checkpoint40pre9, checkpoint40pre2, checkpoint40pre5, checkpoint40pre6, checkpoint40pre8, checkpoint40pre4, checkpoint40pre3, checkpoint40pre7, checkpoint40
Changes since 1.1: +70 -0 lines
Merge from branch pre38:
 o essential mods for cubed sphere
 o debugged atmosphere, dynamcis + physics (aim)
 o new packages (mom_vecinv, mom_fluxform, ...)

1 C $Header: /u/gcmpack/models/MITgcmUV/pkg/mom_fluxform/Attic/mom_calc_ke.F,v 1.1.2.2 2001/03/30 21:07:54 adcroft Exp $
2 C $Name: pre38-close $
3
4 #include "CPP_OPTIONS.h"
5
6 SUBROUTINE MOM_CALC_KE(
7 I bi,bj,k,
8 I uFld, vFld,
9 O KE,
10 I myThid)
11 IMPLICIT NONE
12 C
13 C Calculate Kinetic Energy, KE, with units (m/s)^2
14 C - assumes hydrostatic formulation only
15 C
16
17 C == Global variables ==
18 #include "SIZE.h"
19 #include "GRID.h"
20
21 C == Routine arguments ==
22 INTEGER bi,bj,k
23 _RL uFld(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
24 _RL vFld(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
25 _RL KE(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
26 INTEGER myThid
27
28 C == Local variables ==
29 INTEGER I,J
30
31 DO J=1-OLy,sNy+OLy-1
32 DO I=1-OLx,sNx+OLx-1
33
34 C This defn of KE should not ever be used. Just to let you know.
35 C 2 2
36 C 1 / ___I ___J \
37 C KE = --- | U + V |
38 C 2 \ /
39 C
40 c KE(i,j) = 0.125*(
41 c & ( uFld(i,j)+uFld(i+1, j ) )**2
42 c & +( vFld(i,j)+vFld( i ,j+1) )**2 )
43
44 C This defn of KE should be used for the vector invariant equations.
45 C _____I _____J
46 C 1 / 2 2 \
47 C KE = --- | U + V |
48 C 2 \ /
49 C
50 c KE(i,j) = 0.25*(
51 c & uFld( i , j )*uFld( i , j )
52 c & +uFld(i+1, j )*uFld(i+1, j )
53 c & +vFld( i , j )*vFld( i , j )
54 c & +vFld( i ,j+1)*vFld( i ,j+1) )
55
56 C As above but including the lopping factors and should be used
57 C for the conservative form of the momentum equations.
58 KE(i,j) = 0.25*(
59 & uFld( i , j )*uFld( i , j )*hFacW(i,j,k,bi,bj)
60 & +uFld(i+1, j )*uFld(i+1, j )*hFacW(i+1,j,k,bi,bj)
61 & +vFld( i , j )*vFld( i , j )*hFacS(i,j,k,bi,bj)
62 & +vFld( i ,j+1)*vFld( i ,j+1)*hFacS(i,j+1,k,bi,bj)
63 & )
64 & *recip_hFacC(i,j,k,bi,bj)
65
66 ENDDO
67 ENDDO
68
69 RETURN
70 END

  ViewVC Help
Powered by ViewVC 1.1.22