LMDZ
iniconst.F90
Go to the documentation of this file.
1 !
2 ! $Id: iniconst.F90 2040 2014-05-09 10:50:34Z emillour $
3 !
4 SUBROUTINE iniconst
5 
6  USE control_mod
7 #ifdef CPP_IOIPSL
8  use ioipsl
9 #else
10  ! if not using IOIPSL, we still need to use (a local version of) getin
11  use ioipsl_getincom
12 #endif
13 
14  IMPLICIT NONE
15  !
16  ! P. Le Van
17  !
18  ! Declarations:
19  ! -------------
20  !
21  include "dimensions.h"
22  include "paramet.h"
23  include "comconst.h"
24  include "temps.h"
25  include "comvert.h"
26  include "iniprint.h"
27 
28  character(len=*),parameter :: modname="iniconst"
29  character(len=80) :: abort_message
30  !
31  !
32  !
33  !-----------------------------------------------------------------------
34  ! dimension des boucles:
35  ! ----------------------
36 
37  im = iim
38  jm = jjm
39  lllm = llm
40  imp1 = iim
41  jmp1 = jjm + 1
42  lllmm1 = llm - 1
43  lllmp1 = llm + 1
44 
45  !-----------------------------------------------------------------------
46 
47  dtphys = iphysiq * dtvr
48  unsim = 1./iim
49  pi = 2.*asin( 1. )
50 
51  !-----------------------------------------------------------------------
52  !
53 
54  r = cpp * kappa
55 
56  write(lunout,*) trim(modname),': R CP Kappa ',r,cpp,kappa
57  !
58  !-----------------------------------------------------------------------
59 
60  ! vertical discretization: default behavior depends on planet_type flag
61  if (planet_type=="earth") then
62  disvert_type=1
63  else
64  disvert_type=2
65  endif
66  ! but user can also specify using one or the other in run.def:
67  call getin('disvert_type',disvert_type)
68  write(lunout,*) trim(modname),': disvert_type=',disvert_type
69 
70  pressure_exner = disvert_type == 1 ! default value
71  call getin('pressure_exner', pressure_exner)
72 
73  if (disvert_type==1) then
74  ! standard case for Earth (automatic generation of levels)
75  call disvert()
76  else if (disvert_type==2) then
77  ! standard case for planets (levels generated using z2sig.def file)
78  call disvert_noterre
79  else
80  write(abort_message,*) "Wrong value for disvert_type: ", disvert_type
81  call abort_gcm(modname,abort_message,0)
82  endif
83 
84 END SUBROUTINE iniconst
!$Id lllmm1
Definition: comconst.h:7
!$Id mode_top_bound COMMON comconstr r
Definition: comconst.h:7
!$Id mode_top_bound COMMON comconstr kappa
Definition: comconst.h:7
!$Id mode_top_bound COMMON comconstr omeg dissip_zref ihf INTEGER im
Definition: comconst.h:7
!$Id jm
Definition: comconst.h:7
!$Id imp1
Definition: comconst.h:7
character(len=10), save planet_type
Definition: control_mod.F90:32
subroutine abort_gcm(modname, message, ierr)
Definition: abort_gcm.F:7
!$Id Turb_fcg_gcssold get_uvd hqturb_gcssold endif!large scale llm day day1 day day1 *dt_toga endif!time annee_ref dt_toga u_toga vq_toga w_prof vq_prof llm day day1 day day1 *dt_dice endif!time annee_ref dt_dice swup_dice vg_dice omega_dice tg_prof vg_profd w_profd omega_profd!do llm!print llm l llm
!$Id mode_top_bound COMMON comconstr && pi
Definition: comconst.h:7
integer, save iphysiq
Definition: control_mod.F90:24
!$Id mode_top_bound COMMON comconstr dtphys
Definition: comconst.h:7
!$Id mode_top_bound COMMON comconstr unsim
Definition: comconst.h:7
!$Id mode_top_bound COMMON comconstr cpp
Definition: comconst.h:7
subroutine disvert()
Definition: disvert.F90:4
!$Id lllmp1
Definition: comconst.h:7
!$Id lllm
Definition: comconst.h:7
!$Id jmp1
Definition: comconst.h:7
!$Id mode_top_bound COMMON comconstr dtvr
Definition: comconst.h:7
c c zjulian c cym CALL iim cym klev iim
Definition: ini_bilKP_ave.h:24
subroutine disvert_noterre
subroutine iniconst
Definition: iniconst.F90:5
!$Header!gestion des impressions de sorties et de débogage la sortie standard prt_level COMMON comprint lunout
Definition: iniprint.h:7