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

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

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


Revision 1.3 - (hide annotations) (download)
Wed Sep 26 18:09:15 2001 UTC (22 years, 8 months ago) by cnh
Branch: MAIN
CVS Tags: checkpoint44e_post, checkpoint46g_pre, release1_p13_pre, checkpoint46f_post, checkpoint44f_post, checkpoint46b_post, checkpoint43a-release1mods, release1_p13, chkpt44d_post, release1_p8, release1_p9, release1_p1, release1_p2, release1_p3, release1_p4, release1_p5, release1_p6, release1_p7, checkpoint44e_pre, release1_b1, checkpoint43, release1_chkpt44d_post, release1_p11, icebear5, icebear4, icebear3, icebear2, checkpoint46d_pre, release1-branch_tutorials, checkpoint45d_post, chkpt44a_post, checkpoint44h_pre, checkpoint46a_post, chkpt44c_pre, checkpoint45a_post, ecco_c44_e19, ecco_c44_e18, ecco_c44_e17, ecco_c44_e16, release1_p12, release1_p10, release1_p16, release1_p17, release1_p14, release1_p15, checkpoint44g_post, checkpoint46e_pre, checkpoint45b_post, checkpoint46b_pre, release1-branch-end, release1_final_v1, checkpoint46c_pre, checkpoint46, checkpoint44b_post, checkpoint46a_pre, checkpoint45c_post, ecco_ice2, ecco_ice1, checkpoint44h_post, release1_p12_pre, ecco_c44_e22, ecco_c44_e25, chkpt44a_pre, ecco_c44_e23, ecco_c44_e20, ecco_c44_e21, ecco_c44_e26, ecco_c44_e27, ecco_c44_e24, checkpoint46c_post, ecco-branch-mod1, ecco-branch-mod2, ecco-branch-mod3, ecco-branch-mod4, ecco-branch-mod5, checkpoint46e_post, release1_beta1, checkpoint44b_pre, checkpoint42, checkpoint41, checkpoint44, checkpoint45, chkpt44c_post, checkpoint44f_pre, checkpoint46d_post, release1-branch_branchpoint
Branch point for: c24_e25_ice, release1_final, release1-branch, release1, ecco-branch, release1_50yr, icebear, release1_coupled
Changes since 1.2: +20 -10 lines
Bringing comments up to data and formatting for document extraction.

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

  ViewVC Help
Powered by ViewVC 1.1.22