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

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

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


Revision 1.1 - (show annotations) (download)
Thu Mar 8 13:36:23 2001 UTC (23 years, 2 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint40pre3, checkpoint40pre1, checkpoint40pre7, checkpoint40pre6, checkpoint40pre9, checkpoint40pre8, checkpoint38, checkpoint40pre2, checkpoint40pre4, pre38tag1, c37_adj, pre38-close, checkpoint39, checkpoint37, checkpoint40pre5, checkpoint40
Branch point for: pre38
replace calc_grad_eta_surf (needed for precise atmos Phi_Surf gradient)

1 C $Header: /u/gcmpack/models/MITgcmUV/model/src/calc_grad_eta_surf.F,v 1.6 2001/03/06 16:51:02 jmc Exp $
2 C $Name: $
3
4 #include "CPP_OPTIONS.h"
5
6 C /==========================================================\
7 C | S/R CALC_GRAD_PHI_SURF |
8 C | o Calculate the gradient of the surface Potential anomaly|
9 C \==========================================================/
10 SUBROUTINE CALC_GRAD_PHI_SURF( bi, bj, iMin, iMax, jMin, jMax,
11 I etaFld,
12 O phiSurfX, phiSurfY,
13 I myThid )
14 IMPLICIT NONE
15 C == Global variables ==
16 #include "SIZE.h"
17 #include "EEPARAMS.h"
18 #include "PARAMS.h"
19 #include "GRID.h"
20 #include "SURFACE.h"
21
22 C == Routine Arguments ==
23 C etaFld - free-surface r-anomaly (r unit).
24 C phiSurfX, phiSurfY - Gradient in the X and Y directions of surface
25 C Potentiel anomaly (atmos: =Geopotential ; ocean: =Pressure/rho)
26 C bi,bj,iMin,iMax,jMin,jMax - Loop counters
27 C myThid - Instance number for this call of the routine.
28 INTEGER bi,bj,iMin,iMax,jMin,jMax
29 _RL etaFld(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
30 _RL phiSurfX(1-Olx:sNx+Olx,1-Oly:sNy+Oly)
31 _RL phiSurfY(1-Olx:sNx+Olx,1-Oly:sNy+Oly)
32 INTEGER myThid
33
34 C == Local variables ==
35 INTEGER i,j
36
37 C Zonal term
38 DO j=jMin,jMax
39 DO i=iMin,iMax
40 phiSurfX(i,j)=_recip_dxC(i,j,bi,bj)*
41 & ( Bo_surf(i,j,bi,bj)*etaFld(i,j,bi,bj)
42 & - Bo_surf(i-1,j,bi,bj)*etaFld(i-1,j,bi,bj) )
43 ENDDO
44 ENDDO
45
46 C Meridional term
47 DO j=jMin,jMax
48 DO i=iMin,iMax
49 phiSurfY(i,j)=_recip_dyC(i,j,bi,bj)*
50 & ( Bo_surf(i,j,bi,bj)*etaFld(i,j,bi,bj)
51 & - Bo_surf(i,j-1,bi,bj)*etaFld(i,j-1,bi,bj) )
52 ENDDO
53 ENDDO
54
55 RETURN
56 END

  ViewVC Help
Powered by ViewVC 1.1.22