1 |
guez |
52 |
|
2 |
|
|
SUBROUTINE cv_trigger(len,nd,icb,cbmf,tv,tvp,iflag) |
3 |
|
|
use cvparam |
4 |
|
|
implicit none |
5 |
|
|
|
6 |
|
|
!------------------------------------------------------------------- |
7 |
|
|
! --- Test for instability. |
8 |
|
|
! --- If there was no convection at last time step and parcel |
9 |
|
|
! --- is stable at icb, then set iflag to 4. |
10 |
|
|
!------------------------------------------------------------------- |
11 |
|
|
|
12 |
|
|
|
13 |
|
|
! inputs: |
14 |
|
|
integer len, nd, icb(len) |
15 |
|
|
real cbmf(len), tv(len,nd), tvp(len,nd) |
16 |
|
|
|
17 |
|
|
! outputs: |
18 |
|
|
integer iflag(len) ! also an input |
19 |
|
|
|
20 |
|
|
! local variables: |
21 |
|
|
integer i |
22 |
|
|
|
23 |
|
|
|
24 |
|
|
do 390 i=1,len |
25 |
|
|
if((cbmf(i).eq.0.0) .and.(iflag(i).eq.0).and. & |
26 |
|
|
(tvp(i,icb(i)).le.(tv(i,icb(i))-dtmax)))iflag(i)=4 |
27 |
|
|
390 continue |
28 |
|
|
|
29 |
|
|
return |
30 |
|
|
end |