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

Last change on this file since 5342 was 5337, checked in by Laurent Fairhead, 5 weeks ago

Getting rid of dependance to dynamics

File size: 706 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
9  real :: zq(klon,nbtr)
10
11  integer :: ijmin, lmin, ijlmin
12  integer :: ijmax, lmax, ijlmax
13
14  integer :: ismin,ismax
15
16  ijlmin=ismin(klon*nbtr,zq,1)
17  lmin=(ijlmin-1)/klon+1
18  ijmin=ijlmin-(lmin-1)*klon
19  zqmin=zq(ijmin,lmin)
20
21  ijlmax=ismax(klon*nbtr,zq,1)
22  lmax=(ijlmax-1)/klon+1
23  ijmax=ijlmax-(lmax-1)*klon
24  zqmax=zq(ijmax,lmax)
25
26  if(zqmin.lt.qmin.or.zqmax.gt.qmax) &
27        write(*,9999) comment, &
28        ijmin,lmin,zqmin,ijmax,lmax,zqmax
29
30  return
319999   format(a20,2('  q(',i4,',',i2,')=',e12.5))
32end subroutine minmaxsource
Note: See TracBrowser for help on using the repository browser.