source: LMDZ6/branches/Amaury_dev/libf/dyn3d_common/iniconst.F90 @ 5134

Last change on this file since 5134 was 5134, checked in by abarral, 4 months ago

Replace academic.h, alpale.h, comdissip.h, comdissipn.h, comdissnew.h by modules
Remove unused clesph0.h

  • 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.9 KB
Line 
1! $Id: iniconst.F90 5134 2024-07-26 15:56:37Z abarral $
2
3SUBROUTINE iniconst
4
5  USE control_mod
6  USE IOIPSL
7  USE comconst_mod, ONLY: im, imp1, jm, jmp1, lllm, lllmm1, lllmp1, &
8          unsim, pi, r, kappa, cpp, dtvr, dtphys
9  USE comvert_mod, ONLY: disvert_type, pressure_exner
10  USE lmdz_iniprint, ONLY: lunout, prt_level
11
12
13  IMPLICIT NONE
14
15  !      P. Le Van
16
17  !   Declarations:
18  !   -------------
19
20  INCLUDE "dimensions.h"
21  INCLUDE "paramet.h"
22
23  CHARACTER(LEN = *), parameter :: modname = "iniconst"
24  CHARACTER(LEN = 80) :: abort_message
25
26
27
28  !-----------------------------------------------------------------------
29  !   dimension des boucles:
30  !   ----------------------
31
32  im = iim
33  jm = jjm
34  lllm = llm
35  imp1 = iim
36  jmp1 = jjm + 1
37  lllmm1 = llm - 1
38  lllmp1 = llm + 1
39
40  !-----------------------------------------------------------------------
41
42  dtphys = iphysiq * dtvr
43  unsim = 1. / iim
44  pi = 2. * ASIN(1.)
45
46  !-----------------------------------------------------------------------
47
48  r = cpp * kappa
49
50  WRITE(lunout, *) trim(modname), ': R  CP  Kappa ', r, cpp, kappa
51
52  !-----------------------------------------------------------------------
53
54  ! vertical discretization: default behavior depends on planet_type flag
55  IF (planet_type=="earth") THEN
56    disvert_type = 1
57  else
58    disvert_type = 2
59  ENDIF
60  ! but user can also specify using one or the other in run.def:
61  CALL getin('disvert_type', disvert_type)
62  WRITE(lunout, *) trim(modname), ': disvert_type=', disvert_type
63
64  pressure_exner = disvert_type == 1 ! default value
65  CALL getin('pressure_exner', pressure_exner)
66
67  IF (disvert_type==1) THEN
68    ! standard case for Earth (automatic generation of levels)
69    CALL disvert()
70  ELSE IF (disvert_type==2) THEN
71    ! standard case for planets (levels generated using z2sig.def file)
72    CALL disvert_noterre
73  else
74    WRITE(abort_message, *) "Wrong value for disvert_type: ", disvert_type
75    CALL abort_gcm(modname, abort_message, 0)
76  ENDIF
77
78END SUBROUTINE iniconst
Note: See TracBrowser for help on using the repository browser.