da_lcl.inc

References to this file elsewhere.
1 subroutine da_lcl(P0, Z0, T0, Q0, PLCL, ZLCL, TLCL, QLCL)
2 
3    !-----------------------------------------------------------------------
4    ! Purpose: TBD
5    !-----------------------------------------------------------------------
6 
7    implicit none
8 
9    real, intent(in)   :: P0, Z0, T0, Q0
10    real, intent(out)  :: PLCL, ZLCL, TLCL, QLCL
11 
12    real   :: DP, QS, EPS
13 
14    DP=5.
15    PLCL=300.
16 
17    do
18       TLCL=T0*((PLCL/P0)**0.286)
19 
20       call da_qfrmrh(PLCL, TLCL, 100., QS)
21 
22       EPS=QS-Q0
23 
24       if (EPS >= 0.) then
25          ZLCL=(1004./gravity)*(T0-TLCL)+Z0
26          QLCL=QS
27          return
28       else
29          PLCL=PLCL+DP
30 
31          if (PLCL >= P0) then
32             ZLCL=Z0
33             QLCL=Q0
34             PLCL=P0
35             return
36         end if
37       end if
38    end do
39 
40 end subroutine da_lcl
41 
42