123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133 |
- module Phys_Convec_Clouds
- implicit none
-
-
-
-
- private
-
- public :: ConvCloudDim
-
-
- character(len=*), parameter :: mname = 'module Phys_Convec_Clouds'
- contains
-
-
-
-
-
-
-
-
-
-
-
-
- subroutine ConvCloudDim( updo, lm, detu, entd, &
- iclbas, ictop, icllfs, &
- status )
-
- character(len=1), intent(in) :: updo
- integer, intent(in) :: lm
- real, intent(in) :: detu(lm)
- real, intent(in) :: entd(lm)
-
-
- integer, intent(out) :: iclbas
- integer, intent(out) :: ictop
- integer, intent(out) :: icllfs
-
- integer, intent(out) :: status
-
-
-
- character(len=*), parameter :: rname = mname//', ConvCloudDim'
-
- integer :: l
- integer :: bot, top, one
-
-
- select case ( updo )
- case ( 'u', 'U' )
- bot = 1
- top = lm
- one = +1
- case ( 'd', 'D' )
- bot = lm
- top = 1
- one = -1
- case default
- write (*,'("ERROR - updo should be `u` or `d` ...")')
- write (*,'("ERROR in ",a)') rname; status=1; return
- end select
-
-
- if ( size(entd) /= lm ) then
- write (*,'("ERROR - input arrays should have save size:")')
- write (*,'("ERROR - size(detu) : ",i3)') size(detu)
- write (*,'("ERROR - size(entd) : ",i3)') size(entd)
- write (*,'("ERROR in ",a)') rname; status=1; return
- end if
-
-
-
-
- ictop = 0
- do l = top, bot, -one
- if ( detu(l) > 0.0 ) then
- ictop = l
- exit
- end if
- end do
-
-
-
-
- iclbas = 0
- do l = bot, top, one
- if ( detu(l) > 0.0 ) then
- iclbas = l
- exit
- end if
- end do
-
-
-
-
- icllfs = 0
- do l = top, bot, -one
- if ( entd(l) > 0.0 ) then
- icllfs = l
- exit
- end if
- end do
-
-
- status = 0
- end subroutine ConvCloudDim
-
-
- end module Phys_Convec_Clouds
|