/[MITgcm]/MITgcm/pkg/fizhi/slprs.F
ViewVC logotype

Contents of /MITgcm/pkg/fizhi/slprs.F

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


Revision 1.3 - (show annotations) (download)
Mon Jun 19 23:37:34 2006 UTC (18 years ago) by molod
Branch: MAIN
CVS Tags: checkpoint58l_post, checkpoint58u_post, checkpoint58w_post, checkpoint60, checkpoint61, checkpoint58r_post, checkpoint58n_post, checkpoint58x_post, checkpoint58t_post, checkpoint58q_post, checkpoint59q, checkpoint59p, checkpoint59r, checkpoint59e, checkpoint59d, checkpoint59g, checkpoint59f, checkpoint59a, checkpoint59c, checkpoint59b, checkpoint59m, checkpoint59l, checkpoint59o, checkpoint59n, checkpoint59i, checkpoint59h, checkpoint59k, checkpoint59j, checkpoint59, checkpoint58o_post, checkpoint58y_post, checkpoint58k_post, checkpoint58v_post, checkpoint58s_post, checkpoint61f, checkpoint61g, checkpoint61d, checkpoint61e, checkpoint61b, checkpoint61c, checkpoint58p_post, checkpoint61a, checkpoint61j, checkpoint61k, checkpoint61h, checkpoint61i, checkpoint58m_post
Changes since 1.2: +3 -3 lines
Bug fixes in SLP computation routine and call

1 C $Header: /u/gcmpack/MITgcm/pkg/fizhi/slprs.F,v 1.2 2006/05/18 22:14:23 molod Exp $
2 C $Name: $
3
4 #include "FIZHI_OPTIONS.h"
5 subroutine slprs (PHIS,PLE,THZ,lwmask,im,jm,lm,SLP)
6 C**********************************************************************
7 C INPUT
8 C PHIS .... SURFACE GEOPOTENTIAL (M2/S2)
9 C THZ ..... POTENTIAL TEMPERATURE (K) ON Model LEVELS
10 C grid .... Dynamics Grid Structure
11 C lwmask .. Land:(0.0) Water:(1.0) Mask
12 C
13 C OUTPUT
14 C SLP ..... SEA LEVEL PRESSURE (MB)
15 C
16 C NOTE: Level counting here for thz and ple is top down (thz(1) is top)
17 C***********************************************************************
18
19 implicit none
20
21 integer im,jm,lm
22 _RL SLP (im*jm)
23 _RL PHIS (im*jm), THZ (im*jm,lm)
24 _RL lwmask(im*jm)
25 _RL ple(im*jm,lm+1)
26
27 _RL TWO, BETA
28 PARAMETER(TWO = 2.0)
29 PARAMETER(BETA = 0.0065)
30
31 _RL getcon,g,r,ak
32 integer i,L
33 _RL tm (im*jm)
34 integer Ltop (im*jm)
35
36 G = GETCON('GRAVITY')
37 R = GETCON('RGAS')
38 AK = GETCON('KAPPA')
39 C***********************************************************************
40 C* COMPUTE MEAN THETA IN PBL (100 MB) *
41 C***********************************************************************
42
43 do i=1,im*jm
44 tm(i) = 0.0
45 Ltop(i) = lm
46 enddo
47
48 do L = lm,1,-1
49 do i=1,im*jm
50 if ( ple(i,L+1).ge.(ple(i,lm+1)-100.) ) then
51 Ltop(i) = L
52 tm(i) = tm(i) + thz(i,L)*(ple(i,L+1)-ple(i,L))
53 endif
54 enddo
55 enddo
56
57 do i=1,im*jm
58 tm(i) = tm(i)/(ple(i,lm+1)-ple(i,Ltop(i)))
59 enddo
60
61 C***********************************************************************
62 C* COMPUTE SEA LEVEL PRESSURE *
63 C***********************************************************************
64
65 do i=1,im*jm
66 if( lwmask(i).ne.0.0 ) then
67 TM(I) = TM(I) * (PLE(I,LM+1)/1000.)**AK + BETA*PHIS(I)/(TWO*G)
68 else
69 TM(I) = THZ(I,LM)*(PLE(I,LM+1)/1000.)**AK + BETA*PHIS(I)/(TWO*G)
70 endif
71
72 SLP(I) = PHIS(I) / ( R*TM(I) )
73 SLP(I) = PLE(I,LM+1) * EXP( SLP(I) )
74 enddo
75
76 RETURN
77 END

  ViewVC Help
Powered by ViewVC 1.1.22