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

Last change on this file since 5441 was 5159, checked in by abarral, 5 months ago

Put dimensions.h and paramet.h into modules

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