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

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

rename modules properly lmdz_*
move ismin, ismax, minmax into new lmdz_libmath.f90
(lint) uppercase fortran keywords

  • 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
2! $Id: iniconst.F90 5116 2024-07-24 12:54:37Z abarral $
3
4SUBROUTINE iniconst
5
6  USE control_mod
7  use IOIPSL
8  USE comconst_mod, ONLY: im, imp1, jm, jmp1, lllm, lllmm1, lllmp1, &
9                          unsim, pi, r, kappa, cpp, dtvr, dtphys
10  USE comvert_mod, ONLY: disvert_type, pressure_exner
11 
12  IMPLICIT NONE
13
14  !      P. Le Van
15
16  !   Declarations:
17  !   -------------
18
19  include "dimensions.h"
20  include "paramet.h"
21  include "iniprint.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.