[5099] | 1 | |
---|
[1403] | 2 | ! $Id: adaptdt.f90 5136 2024-07-28 14:17:54Z abarral $ |
---|
[5099] | 3 | |
---|
[5105] | 4 | SUBROUTINE adaptdt(nadv,dtbon,n,pbaru, & |
---|
| 5 | masse) |
---|
[524] | 6 | |
---|
[5105] | 7 | USE comconst_mod, ONLY: dtvr |
---|
[5114] | 8 | USE lmdz_description, ONLY: descript |
---|
[5134] | 9 | USE lmdz_comdissip, ONLY: coefdis, tetavel, tetatemp, gamdissip, niterdis |
---|
[5136] | 10 | USE lmdz_comgeom2 |
---|
[5134] | 11 | |
---|
[5105] | 12 | IMPLICIT NONE |
---|
[524] | 13 | |
---|
[5134] | 14 | INCLUDE "dimensions.h" |
---|
| 15 | INCLUDE "paramet.h" |
---|
[524] | 16 | |
---|
[5105] | 17 | !---------------------------------------------------------- |
---|
| 18 | ! Arguments |
---|
| 19 | !---------------------------------------------------------- |
---|
| 20 | INTEGER :: n,nadv |
---|
| 21 | REAL :: dtbon |
---|
| 22 | REAL :: pbaru(iip1,jjp1,llm) |
---|
| 23 | REAL :: masse(iip1,jjp1,llm) |
---|
| 24 | !---------------------------------------------------------- |
---|
| 25 | ! Local |
---|
| 26 | !---------------------------------------------------------- |
---|
| 27 | INTEGER :: i,j,l |
---|
| 28 | REAL :: CFLmax,aaa,bbb |
---|
[524] | 29 | |
---|
[5105] | 30 | CFLmax=0. |
---|
| 31 | do l=1,llm |
---|
| 32 | do j=2,jjm |
---|
| 33 | do i=1,iim |
---|
| 34 | aaa=pbaru(i,j,l)*dtvr/masse(i,j,l) |
---|
| 35 | CFLmax=max(CFLmax,aaa) |
---|
| 36 | bbb=-pbaru(i,j,l)*dtvr/masse(i+1,j,l) |
---|
| 37 | CFLmax=max(CFLmax,bbb) |
---|
| 38 | enddo |
---|
| 39 | enddo |
---|
| 40 | enddo |
---|
| 41 | n=int(CFLmax)+1 |
---|
| 42 | ! pour reproduire cas VL du code qui appele x,y,z,y,x |
---|
[5117] | 43 | ! if (nadv.EQ.30) n=n/2 ! Pour Prather |
---|
[5105] | 44 | dtbon=dtvr/n |
---|
[524] | 45 | |
---|
[5116] | 46 | RETURN |
---|
| 47 | END SUBROUTINE adaptdt |
---|
[524] | 48 | |
---|
| 49 | |
---|
| 50 | |
---|
| 51 | |
---|
| 52 | |
---|
[5105] | 53 | |
---|
| 54 | |
---|