[524] | 1 | ! |
---|
[1403] | 2 | ! $Id: adaptdt.f90 5272 2024-10-24 15:53:15Z abarral $ |
---|
[524] | 3 | ! |
---|
[5246] | 4 | subroutine adaptdt(nadv,dtbon,n,pbaru, & |
---|
| 5 | masse) |
---|
[524] | 6 | |
---|
[5246] | 7 | USE comconst_mod, ONLY: dtvr |
---|
[5271] | 8 | USE dimensions_mod, ONLY: iim, jjm, llm, ndm |
---|
[5272] | 9 | USE paramet_mod_h, ONLY: iip1, iip2, iip3, jjp1, llmp1, llmp2, llmm1, kftd, ip1jm, ip1jmp1, & |
---|
| 10 | ip1jmi1, ijp1llm, ijmllm, mvar, jcfil, jcfllm |
---|
[5271] | 11 | IMPLICIT NONE |
---|
[524] | 12 | |
---|
[5271] | 13 | |
---|
[5272] | 14 | |
---|
[5246] | 15 | include "comdissip.h" |
---|
| 16 | include "comgeom2.h" |
---|
| 17 | include "description.h" |
---|
[524] | 18 | |
---|
[5246] | 19 | !---------------------------------------------------------- |
---|
| 20 | ! Arguments |
---|
| 21 | !---------------------------------------------------------- |
---|
| 22 | INTEGER :: n,nadv |
---|
| 23 | REAL :: dtbon |
---|
| 24 | REAL :: pbaru(iip1,jjp1,llm) |
---|
| 25 | REAL :: masse(iip1,jjp1,llm) |
---|
| 26 | !---------------------------------------------------------- |
---|
| 27 | ! Local |
---|
| 28 | !---------------------------------------------------------- |
---|
| 29 | INTEGER :: i,j,l |
---|
| 30 | REAL :: CFLmax,aaa,bbb |
---|
[524] | 31 | |
---|
[5246] | 32 | CFLmax=0. |
---|
| 33 | do l=1,llm |
---|
| 34 | do j=2,jjm |
---|
| 35 | do i=1,iim |
---|
| 36 | aaa=pbaru(i,j,l)*dtvr/masse(i,j,l) |
---|
| 37 | CFLmax=max(CFLmax,aaa) |
---|
| 38 | bbb=-pbaru(i,j,l)*dtvr/masse(i+1,j,l) |
---|
| 39 | CFLmax=max(CFLmax,bbb) |
---|
| 40 | enddo |
---|
| 41 | enddo |
---|
| 42 | enddo |
---|
| 43 | n=int(CFLmax)+1 |
---|
| 44 | ! pour reproduire cas VL du code qui appele x,y,z,y,x |
---|
| 45 | ! if (nadv.eq.30) n=n/2 ! Pour Prather |
---|
| 46 | dtbon=dtvr/n |
---|
[524] | 47 | |
---|
[5246] | 48 | return |
---|
| 49 | end subroutine adaptdt |
---|
[524] | 50 | |
---|
| 51 | |
---|
| 52 | |
---|
| 53 | |
---|
| 54 | |
---|
[5246] | 55 | |
---|
| 56 | |
---|