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