/[MITgcm]/MITgcm/model/src/grad_sigma.F
ViewVC logotype

Contents of /MITgcm/model/src/grad_sigma.F

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


Revision 1.2 - (show annotations) (download)
Sun Feb 4 14:38:47 2001 UTC (23 years, 3 months ago) by cnh
Branch: MAIN
CVS Tags: checkpoint40pre3, checkpoint40pre1, checkpoint40pre7, checkpoint40pre6, checkpoint40pre9, checkpoint40pre8, checkpoint38, checkpoint40pre2, checkpoint40pre4, pre38tag1, c37_adj, pre38-close, checkpoint39, checkpoint37, checkpoint36, checkpoint35, checkpoint40pre5, checkpoint40
Branch point for: pre38
Changes since 1.1: +2 -1 lines
Made sure each .F and .h file had
the CVS keywords Header and Name at its start.
Most had header but very few currently have Name, so
lots of changes!

1 C $Header: /u/gcmpack/models/MITgcmUV/model/src/grad_sigma.F,v 1.1 2000/06/21 18:58:25 adcroft Exp $
2 C $Name: $
3
4 #include "CPP_OPTIONS.h"
5
6 SUBROUTINE GRAD_SIGMA(
7 I bi, bj, iMin, iMax, jMin, jMax, K,
8 I rhoK, sigKm1, sigKp1,
9 O sigmaX, sigmaY, sigmaR,
10 I myThid )
11 C /==========================================================\
12 C | SUBROUTINE CALC_ISOSLOPES |
13 C | o Calculate isoneutral gradients |
14 C |==========================================================|
15 C \==========================================================/
16 IMPLICIT NONE
17
18 C == Global variables ==
19 #include "SIZE.h"
20 #include "GRID.h"
21 #include "EEPARAMS.h"
22 #include "PARAMS.h"
23
24 C == Routine arguments ==
25 C
26 INTEGER bi,bj,iMin,iMax,jMin,jMax,K
27 _RL rhoK(1-Olx:sNx+Olx,1-Oly:sNy+Oly)
28 _RL sigKm1(1-Olx:sNx+Olx,1-Oly:sNy+Oly)
29 _RL sigKp1(1-Olx:sNx+Olx,1-Oly:sNy+Oly)
30 _RL sigmaX(1-Olx:sNx+Olx,1-Oly:sNy+Oly,Nr)
31 _RL sigmaY(1-Olx:sNx+Olx,1-Oly:sNy+Oly,Nr)
32 _RL sigmaR(1-Olx:sNx+Olx,1-Oly:sNy+Oly,Nr)
33 INTEGER myThid
34
35 C == Local variables ==
36 INTEGER i,j
37
38 DO j=1-Oly,sNy+Oly
39 DO i=1-Olx+1,sNx+Olx
40 sigmaX(i,j,k)=_maskW(i,j,k,bi,bj)
41 & *_recip_dxC(i,j,bi,bj)
42 & *(rhoK(i,j)-rhoK(i-1,j))
43 ENDDO
44 ENDDO
45
46 DO j=1-Oly+1,sNy+Oly
47 DO i=1-Olx,sNx+Olx
48 sigmaY(i,j,k)=_maskS(i,j,k,bi,bj)
49 & *_recip_dyC(i,j,bi,bj)
50 & *(rhoK(i,j)-rhoK(i,j-1))
51 ENDDO
52 ENDDO
53
54 DO j=1-Oly,sNy+Oly
55 DO i=1-Olx,sNx+Olx
56 IF (K.NE.1 .AND. hfacC(i,j,k,bi,bj).NE.0.) THEN
57 sigmaR(i,j,k)=recip_drC(k)*rkFac*(sigKm1(i,j)-sigKp1(i,j))
58 ELSE
59 sigmaR(i,j,k)=0.
60 ENDIF
61 ENDDO
62 ENDDO
63
64 RETURN
65 END

  ViewVC Help
Powered by ViewVC 1.1.22