UPP (develop)
Loading...
Searching...
No Matches
CALDWP.f
Go to the documentation of this file.
1
3!
21 SUBROUTINE caldwp(P1D,Q1D,TDWP,T1D)
22
23!
24!
25! SET PARAMETERS.
26 use params_mod, only: eps, oneps, d001, h1m12
27 use ctlblk_mod, only: jsta, jend, im, spval, ista, iend
28!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
29 implicit none
30!
31! DECLARE VARIABLES.
32!
33 REAL,dimension(ista:iend,jsta:jend),intent(in) :: P1D,Q1D,T1D
34 REAL,dimension(ista:iend,jsta:jend),intent(inout) :: TDWP
35
36 REAL EVP(ista:iend,jsta:jend)
37 integer I,J
38!
39!****************************************************************************
40! START CALDWP HERE.
41!
42! COMPUTE VAPOR PRESSURE. CONVERT TO CENITBARS.
43!
44!$omp parallel do private(i,j)
45 DO j=jsta,jend
46 DO i=ista,iend
47 IF(p1d(i,j)<spval .and. q1d(i,j)<spval) THEN
48 evp(i,j) = p1d(i,j)*q1d(i,j)/(eps+oneps*q1d(i,j))
49 evp(i,j) = max(h1m12,evp(i,j)*d001)
50 ELSE
51 evp(i,j) = spval
52 ENDIF
53 ENDDO
54 ENDDO
55!
56! COMPUTE DEWPOINT TEMPERATURE.
57!
58 CALL dewpoint(evp,tdwp)
59!
60! ENSURE DEWPOINT TEMPERATURE DOES NOT EXCEED AMBIENT TEMPERATURE.
61!
62!$omp parallel do private(i,j)
63 DO j=jsta,jend
64 DO i=ista,iend
65 tdwp(i,j) = min(tdwp(i,j),t1d(i,j))
66 ENDDO
67 ENDDO
68!
69! END OF ROUTINE.
70!
71 RETURN
72 END
subroutine caldwp(p1d, q1d, tdwp, t1d)
Computes dewpoint from P, T, and Q.
Definition CALDWP.f:28
subroutine dewpoint(vp, td)
DEWPOINT() Subroutine that computes dewpoints from vapor pressure.
Definition DEWPOINT.f:52