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

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

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


Revision 1.2 - (show annotations) (download)
Mon Aug 27 18:43:46 2001 UTC (22 years, 10 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint40pre9, checkpoint40
Changes since 1.1: +4 -3 lines
Change name and definition of k_surf (now ksurfC)

1 C $Header: /u/gcmpack/models/MITgcmUV/model/src/ini_linear_phisurf.F,v 1.1 2001/07/06 21:39:37 jmc Exp $
2 C $Name: $
3
4 #include "CPP_OPTIONS.h"
5
6 SUBROUTINE INI_LINEAR_PHISURF( myThid )
7 C /==========================================================\
8 C | SUBROUTINE INI_LINEAR_PHISURF |
9 C | o Initialise the Linear Relation Phi_surf(eta) |
10 C |==========================================================|
11 C | Presently: Initialise -Boyancy at surface level (Bo_surf)|
12 C | to setup the Linear relation: Phi_surf(eta)=Bo_surf*eta |
13 C | Futur: might add other things for Non-Linear FreeSurface |
14 C \==========================================================/
15 IMPLICIT NONE
16
17 C === Global variables ===
18 #include "SIZE.h"
19 #include "EEPARAMS.h"
20 #include "PARAMS.h"
21 #include "GRID.h"
22 #include "SURFACE.h"
23
24 C === Routine arguments ===
25 C myThid - Thread no. that called this routine.
26 INTEGER myThid
27
28 C === Local variables ===
29 C bi,bj - Loop counters
30 C I,J,K
31 CHARACTER*(MAX_LEN_MBUF) msgBuf
32 INTEGER bi, bj
33 INTEGER I, J, K
34 _RL dPIdp
35
36 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
37
38 C-- Initialise -Boyancy at surface level : Bo_surf
39 C Bo_surf is defined as d/dr(Phi_surf) and set to g/rtoz (linear free surface)
40 C with rtoz = conversion factor from r-unit to z-unit (=horiVertRatio)
41 C an accurate formulation includes P_surf and T,S_surf effects on rho_surf:
42 C (setting uniformLin_PhiSurf=.FALSE.):
43 C z-ocean (rtoz=1) : Bo_surf = - Boyancy = gravity * rho_surf/rho_0
44 C p-atmos (rtoz=rho_c*g) : Bo_surf = (1/rho)_surf
45 C Note on Phi_surf splitting : Non-linear Time-dependent effects on b_surf
46 C [through eta & (T-tRef)_surf] are included in PhiHyd rather than in Bo_surf
47 C--
48 IF ( buoyancyRelation .eq. 'OCEANIC' ) THEN
49 C- gBaro = gravity (except for External mode test with reduced gravity)
50 DO bj=myByLo(myThid),myByHi(myThid)
51 DO bi=myBxLo(myThid),myBxHi(myThid)
52 DO J=1-Oly,sNy+Oly
53 DO I=1-Olx,sNx+Olx
54 Bo_surf(I,J,bi,bj) = gBaro
55 recip_Bo(I,J,bi,bj) = 1. _d 0 / gBaro
56 ENDDO
57 ENDDO
58 ENDDO
59 ENDDO
60 ELSEIF ( uniformLin_PhiSurf ) THEN
61 C- use a linear (in ps) uniform relation : Phi'_surf = 1/rhoConst * ps'_surf
62 DO bj=myByLo(myThid),myByHi(myThid)
63 DO bi=myBxLo(myThid),myBxHi(myThid)
64 DO J=1-Oly,sNy+Oly
65 DO I=1-Olx,sNx+Olx
66 Bo_surf(I,J,bi,bj) = recip_rhoConst
67 recip_Bo(I,J,bi,bj) = rhoConst
68 ENDDO
69 ENDDO
70 ENDDO
71 ENDDO
72 ELSE
73 C- use a linearized (in ps) Non-uniform relation : Bo_surf(Po_surf,tRef_surf)
74 C--- Bo = d/d_p(Phi_surf) = tRef_surf*d/d_p(PI) ; PI = Cp*(p/Po)^kappa
75 DO bj=myByLo(myThid),myByHi(myThid)
76 DO bi=myBxLo(myThid),myBxHi(myThid)
77 DO J=1-Oly,sNy+Oly
78 DO I=1-Olx,sNx+Olx
79 IF ( Ro_surf(I,J,bi,bj).GT.0. _d 0
80 & .AND. ksurfC(I,J,bi,bj).LE.Nr ) THEN
81 dPIdp = (atm_cp*atm_kappa/atm_po)*
82 & (Ro_surf(I,J,bi,bj)/atm_po)**(atm_kappa-1. _d 0)
83 Bo_surf(I,J,bi,bj) = dPIdp*tRef(ksurfC(I,J,bi,bj))
84 recip_Bo(I,J,bi,bj) = 1. _d 0 / Bo_surf(I,J,bi,bj)
85 ELSE
86 Bo_surf(I,J,bi,bj) = 0.
87 recip_Bo(I,J,bi,bj) = 0.
88 ENDIF
89 ENDDO
90 ENDDO
91 ENDDO
92 ENDDO
93 ENDIF
94
95 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
96
97 C-- Update overlap regions
98 _EXCH_XY_R8(Bo_surf, myThid)
99 _EXCH_XY_R8(recip_Bo, myThid)
100
101 IF ( buoyancyRelation .eq. 'ATMOSPHERIC' .AND.
102 & .NOT.uniformLin_PhiSurf ) THEN
103 CALL WRITE_FLD_XY_RL( 'Bo_surf',' ',Bo_surf,0,myThid)
104 ENDIF
105
106 RETURN
107 END

  ViewVC Help
Powered by ViewVC 1.1.22