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

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

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


Revision 1.1.2.2 - (hide annotations) (download)
Fri Mar 30 21:07:54 2001 UTC (23 years, 1 month ago) by adcroft
Branch: pre38
CVS Tags: pre38tag1, pre38-close
Changes since 1.1.2.1: +17 -16 lines
Made a different copy for use with vector invariant form and changed
this version to use conservative definition of KE.

1 adcroft 1.1.2.2 C $Header: /u/gcmpack/models/MITgcmUV/pkg/mom_fluxform/Attic/mom_calc_ke.F,v 1.1.2.1 2001/03/28 19:51:14 adcroft Exp $
2 adcroft 1.1.2.1 C $Name: $
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 adcroft 1.1.2.2 C This defn of KE should not ever be used. Just to let you know.
35 adcroft 1.1.2.1 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 adcroft 1.1.2.2 C This defn of KE should be used for the vector invariant equations.
45 adcroft 1.1.2.1 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 adcroft 1.1.2.2 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 adcroft 1.1.2.1
66     ENDDO
67     ENDDO
68    
69     RETURN
70     END

  ViewVC Help
Powered by ViewVC 1.1.22