source: LMDZ6/branches/Amaury_dev/libf/dyn3d_common/adaptdt.f90 @ 5209

Last change on this file since 5209 was 5195, checked in by abarral, 4 days ago

Correct r5192, some lmdz_description cases were missing

  • Property copyright set to
    Name of program: LMDZ
    Creation date: 1984
    Version: LMDZ5
    License: CeCILL version 2
    Holder: Laboratoire de m\'et\'eorologie dynamique, CNRS, UMR 8539
    See the license file in the root directory
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.1 KB
Line 
1
2! $Id: adaptdt.f90 5195 2024-09-16 13:18:00Z fairhead $
3
4SUBROUTINE adaptdt(nadv,dtbon,n,pbaru, &
5        masse)
6
7  USE comconst_mod, ONLY: dtvr
8  USE lmdz_comdissip, ONLY: coefdis, tetavel, tetatemp, gamdissip, niterdis
9  USE lmdz_comgeom2
10
11USE lmdz_dimensions, ONLY: iim, jjm, llm, ndm
12  USE lmdz_paramet
13  IMPLICIT NONE
14
15
16
17
18  !----------------------------------------------------------
19  ! Arguments
20  !----------------------------------------------------------
21  INTEGER :: n,nadv
22  REAL :: dtbon
23  REAL :: pbaru(iip1,jjp1,llm)
24  REAL :: masse(iip1,jjp1,llm)
25  !----------------------------------------------------------
26  ! Local
27  !----------------------------------------------------------
28  INTEGER :: i,j,l
29  REAL :: CFLmax,aaa,bbb
30
31    CFLmax=0.
32    DO l=1,llm
33     DO j=2,jjm
34      DO i=1,iim
35         aaa=pbaru(i,j,l)*dtvr/masse(i,j,l)
36         CFLmax=max(CFLmax,aaa)
37         bbb=-pbaru(i,j,l)*dtvr/masse(i+1,j,l)
38         CFLmax=max(CFLmax,bbb)
39      enddo
40     enddo
41    enddo
42    n=int(CFLmax)+1
43  ! pour reproduire cas VL du code qui appele x,y,z,y,x
44     ! if (nadv.EQ.30) n=n/2   ! Pour Prather
45    dtbon=dtvr/n
46
47   RETURN
48END SUBROUTINE adaptdt
49
50
51
52
53
54
55
Note: See TracBrowser for help on using the repository browser.