source: LMDZ6/trunk/libf/phylmd/Dust/minmaxsource.f90

Last change on this file was 5367, checked in by abarral, 2 weeks ago

(WIP) Turn implicit into explicit declarations

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