/[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.1 - (show annotations) (download)
Wed Jun 21 18:58:25 2000 UTC (23 years, 11 months ago) by adcroft
Branch: MAIN
CVS Tags: checkpoint29, branch-atmos-merge-freeze, branch-atmos-merge-start, branch-atmos-merge-shapiro, checkpoint33, checkpoint32, checkpoint31, checkpoint30, checkpoint34, branch-atmos-merge-zonalfilt, branch-atmos-merge-phase5, branch-atmos-merge-phase4, branch-atmos-merge-phase7, branch-atmos-merge-phase6, branch-atmos-merge-phase1, branch-atmos-merge-phase3, branch-atmos-merge-phase2
Branch point for: branch-atmos-merge
Added grad_sigma() to clarify the calulcation of iso-neutral slopes.

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

  ViewVC Help
Powered by ViewVC 1.1.22