UPP (develop)
Loading...
Searching...
No Matches
TRPAUS_NAM.f
Go to the documentation of this file.
1
5
35 SUBROUTINE trpaus(PTROP,TTROP,ZTROP,UTROP,VTROP,SHTROP)
36
37!
38!
39! INCLUDE ETA GRID DIMENSIONS. SET/DERIVE PARAMETERS.
40!
41 use vrbls3d, only:
42 use masks
43 use params_mod
44 use ctlblk_mod
45!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
46 implicit none
47!
48! PARAMTER CRTLAP SPECIFIES THE CRITICAL LAPSE RATE
49! (IN K/M) IDENTIFYING THE TROPOPAUSE. WE START
50! LOOKING FOR THE TROPOPAUSE ABOVE PRESSURE LEVEL
51! PSTART (IN PASALS).
52 parameter(crtlap=0.002e0, pstart=5.0e4)
53!
54! DECLARE VARIABLES.
55!
56 REAL PTROP(ISTA:IEND,JSTA:JEND),TTROP(ISTA:IEND,JSTA:JEND),ZTROP(ISTA:IEND,JSTA:JEND),UTROP(ISTA:IEND,JSTA:JEND)
57 REAL VTROP(ISTA:IEND,JSTA:JEND),SHTROP(ISTA:IEND,JSTA:JEND)
58 REAL TLAPSE(LM),DZ2(LM),DELT2(LM),TLAPSE2(LM)
59!
60 integer I,J
61 real PM,DELT,DZ,RSQDIF
62!
63!*****************************************************************************
64! START TRPAUS HERE.
65!
66! LOOP OVER THE HORIZONTAL GRID.
67!
68 DO j=jsta,jend
69 DO i=ista,iend
70 ptrop(i,j) = spval
71 ttrop(i,j) = spval
72 ztrop(i,j) = spval
73 utrop(i,j) = spval
74 vtrop(i,j) = spval
75 shtrop(i,j) = spval
76 ENDDO
77 ENDDO
78!
79!$omp parallel do
80!$omp& private(delt,delt2,dz,dz2,ie,iw,l,llmh,pm,rsqdif,
81!$omp& tlapse,tlapse2,u0,u0l,uh,uh0,ul,
82!$omp& v0,v0l,vh,vh0)
83 DO j=jsta,jend
84 loopi:DO i=ista,iend
85!
86! COMPUTE THE TEMPERATURE LAPSE RATE (-DT/DZ) BETWEEN ETA
87! LAYERS MOVING UP FROM THE GROUND. THE FIRST ETA LAYER
88! ABOVE PRESSURE "PSTART" IN WHICH THE LAPSE RATE IS LESS
89! THAN THE CRITCAL LAPSE RATE IS LABELED THE TROPOPAUSE.
90!
91 llmh=nint(lmh(i,j))
92!
93 loopl: DO l=llmh-1,2,-1
94 pm = pint(i,j,l)
95 delt = t(i,j,l-1)-t(i,j,l)
96 dz = d50*(zint(i,j,l-1)-zint(i,j,l+1))
97 tlapse(l) = -delt/dz
98!
99 IF ((tlapse(l)<crtlap).AND.(pm<pstart)) THEN
100 IF (l == 2 .AND. tlapse(l) < crtlap) goto15
101 dz2(l+1) = 0.
102!
103 DO 17 ll=l,3,-1
104 dz2(ll) = 0.
105 delt2(ll) = 0.
106 tlapse2(ll) = 0.
107 dz2(ll) = (2./3.)*(zint(i,j,ll-2)-zint(i,j,l+1))
108 IF ((dz2(ll) > 2000.) .AND. &
109 (dz2(ll+1) > 2000.)) GO TO 15
110 delt2(ll) = t(i,j,ll-2)-t(i,j,l)
111 tlapse2(ll) = -delt2(ll)/dz2(ll)
112!
113 IF (tlapse2(ll) > crtlap) THEN
114 cycle loopl
115 ENDIF
116!
117 17 CONTINUE
118 ELSE
119 cycle loopl
120 ENDIF
121!
122 15 ptrop(i,j) = d50*(pint(i,j,l)+pint(i,j,l+1))
123 ttrop(i,j) = t(i,j,l)
124 ztrop(i,j)= 0.5*(zint(i,j,l)+zint(i,j,l+1))
125!
126 utrop(i,j) = uh(i,j,l)
127 vtrop(i,j) = vh(i,j,l)
128 dz = zint(i,j,l)-zint(i,j,l+1)
129 rsqdif = sqrt(((uh(i,j,l-1)-uh(i,j,l+1))*0.5)**2 &
130 & +((vh(i,j,l-1)-vh(i,j,l+1))*0.5)**2)
131 shtrop(i,j) = rsqdif/dz
132 cycle loopi
133
134 ENDDO loopl
135
136!X WRITE(88,*)'REACHED TOP FOR K,P,TLAPSE: ',K,PM,TLAPSE
137
138 dz = d50*(zint(i,j,2)-zint(i,j,3))
139 ptrop(i,j) = d50*(pint(i,j,2)+pint(i,j,3))
140 ttrop(i,j) = t(i,j,2)
141 ztrop(i,j)= d50*(zint(i,j,2)+zint(i,j,3))
142 utrop(i,j) = uh(i,j,2)
143 vtrop(i,j) = vh(i,j,2)
144 rsqdif = sqrt(((uh(i,j,1)-uh(i,j,3))*0.5)**2 &
145 & +((vh(i,j,1)-vh(i,j,3))*0.5)**2)
146 shtrop(i,j) = rsqdif/dz
147
148!X WRITE(82,1010)I,J,L,PTROP(I,J)*D01,TTROP(I,J),
149!X X UTROP(I,J),VTROP(I,J),SHTROP(I,J)
150!
151 ENDDO loopi !end I
152 ENDDO !end J
153
154!
155! END OF ROUTINE.
156!
157 RETURN
158 END
subroutine trpaus(ptrop, ttrop, ztrop, utrop, vtrop, shtrop)
Computes tropopause data.
Definition TRPAUS.f:37