/[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.4 - (show annotations) (download)
Thu Apr 2 20:54:03 2009 UTC (15 years, 1 month ago) by jmc
Branch: MAIN
CVS Tags: checkpoint64y, checkpoint64x, checkpoint64z, checkpoint64q, checkpoint64p, checkpoint64s, checkpoint64r, checkpoint64u, checkpoint64t, checkpoint64w, checkpoint64v, checkpoint64i, checkpoint64h, checkpoint64k, checkpoint64j, checkpoint64m, checkpoint64l, checkpoint64o, checkpoint64n, checkpoint64a, checkpoint64c, checkpoint64b, checkpoint64e, checkpoint64d, checkpoint64g, checkpoint64f, checkpoint63p, checkpoint63q, checkpoint63r, checkpoint63s, checkpoint63l, checkpoint63m, checkpoint63n, checkpoint63o, checkpoint63h, checkpoint63i, checkpoint63j, checkpoint63k, checkpoint63d, checkpoint63e, checkpoint63f, checkpoint63g, checkpoint63a, checkpoint63b, checkpoint63c, checkpoint64, checkpoint65, checkpoint62, checkpoint63, checkpoint66g, checkpoint66f, checkpoint66e, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint66o, checkpoint66n, checkpoint66m, checkpoint66l, checkpoint66k, checkpoint66j, checkpoint66i, checkpoint66h, checkpoint65z, checkpoint65x, checkpoint65y, checkpoint65r, checkpoint65s, checkpoint65p, checkpoint65q, checkpoint65v, checkpoint65w, checkpoint65t, checkpoint65u, checkpoint65j, checkpoint65k, checkpoint65h, checkpoint65i, checkpoint65n, checkpoint65o, checkpoint65l, checkpoint65m, checkpoint65b, checkpoint65c, checkpoint65a, checkpoint65f, checkpoint65g, checkpoint65d, checkpoint65e, checkpoint62c, checkpoint62b, checkpoint62a, checkpoint62g, checkpoint62f, checkpoint62e, checkpoint62d, checkpoint62k, checkpoint62j, checkpoint62i, checkpoint62h, checkpoint62o, checkpoint62n, checkpoint62m, checkpoint62l, checkpoint62s, checkpoint62r, checkpoint62q, checkpoint62p, checkpoint62w, checkpoint62v, checkpoint62u, checkpoint62t, checkpoint62z, checkpoint62y, checkpoint62x, checkpoint61n, checkpoint61o, checkpoint61l, checkpoint61m, checkpoint61v, checkpoint61w, checkpoint61t, checkpoint61u, checkpoint61r, checkpoint61s, checkpoint61p, checkpoint61q, checkpoint61z, checkpoint61x, checkpoint61y, HEAD
Changes since 1.3: +27 -27 lines
avoid blank after 72 column (produces warning with some compiler)

1 C $Header: /u/gcmpack/MITgcm/pkg/fizhi/slprs.F,v 1.3 2006/06/19 23:37:34 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