UPP (develop)
Loading...
Searching...
No Matches
CALPOT.f
Go to the documentation of this file.
1
21!-----------------------------------------------------------------------
27!-----------------------------------------------------------------------
28 SUBROUTINE calpot(P1D,T1D,THETA)
29
30!
31 use ctlblk_mod, only: jsta, jend, spval, im, ista, iend
32!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
33 implicit none
34!
35! SET REQUIRED CONSTANTS.
36 real,PARAMETER :: CAPA=0.28589641,p1000=1000.e2
37!
38! DECLARE VARIABLES.
39!
40 real,dimension(ista:iend,jsta:jend),intent(in) :: P1D,T1D
41 real,dimension(ista:iend,jsta:jend),intent(inout) :: THETA
42
43 integer I,J
44!
45!**********************************************************************
46! START CALPOT HERE.
47!
48! COMPUTE THETA
49!
50!$omp parallel do private(i,j)
51 DO j=jsta,jend
52 DO i=ista,iend
53 IF(t1d(i,j) < spval) THEN
54! IF(ABS(P1D(I,J)) > 1.0) THEN
55 IF(p1d(i,j) > 1.0) THEN
56 theta(i,j) = t1d(i,j) * (p1000/p1d(i,j))**capa
57 ELSE
58 theta(i,j) = 0.0
59 ENDIF
60 ELSE
61 theta(i,j) = spval
62 ENDIF
63 ENDDO
64 ENDDO
65! do j = 180, 185
66! print *, ' me, j, p1d,t1d,theta = ',
67! * me, j, p1d(10,j),t1d(10,j),theta (10,j)
68! end do
69! stop
70!
71! END OF ROUTINE.
72!
73 RETURN
74 END
subroutine calpot(p1d, t1d, theta)
Subroutine that computes potential temperature.
Definition CALPOT.f:29