source: LMDZ6/branches/contrails/libf/phylmd/Dust/minmaxsource.f90 @ 5456

Last change on this file since 5456 was 5367, checked in by abarral, 3 weeks ago

(WIP) Turn implicit into explicit declarations

File size: 717 bytes
Line 
1subroutine minmaxsource(zq,qmin,qmax,comment)
2
3  USE dimphy
4  USE infotrac_phy, ONLY: nbtr
5
6   ! character*20 comment
7  character(len=*) :: comment
8  real :: qmin,qmax,zqmin,zqmax
9  real :: zq(klon,nbtr)
10
11  integer :: ijmin, lmin, ijlmin
12  integer :: ijmax, lmax, ijlmax
13  integer :: ismin,ismax
14
15  ijlmin=ismin(klon*nbtr,zq,1)
16  lmin=(ijlmin-1)/klon+1
17  ijmin=ijlmin-(lmin-1)*klon
18  zqmin=zq(ijmin,lmin)
19
20  ijlmax=ismax(klon*nbtr,zq,1)
21  lmax=(ijlmax-1)/klon+1
22  ijmax=ijlmax-(lmax-1)*klon
23  zqmax=zq(ijmax,lmax)
24
25  if(zqmin.lt.qmin.or.zqmax.gt.qmax) &
26        write(*,9999) comment, &
27        ijmin,lmin,zqmin,ijmax,lmax,zqmax
28
29  return
309999   format(a20,2('  q(',i4,',',i2,')=',e12.5))
31end subroutine minmaxsource
Note: See TracBrowser for help on using the repository browser.