source: trunk/LMDZ.COMMON/libf/dyn3d_common/iniconst.F90 @ 3711

Last change on this file since 3711 was 3631, checked in by afalco, 4 months ago

Pluto: initialize variable to 0.
AF

File size: 2.1 KB
RevLine 
[1]1!
[776]2! $Id: iniconst.F90 1625 2012-05-09 13:14:48Z lguez $
[1]3!
[776]4SUBROUTINE iniconst
[1]5
[776]6  USE control_mod
[127]7#ifdef CPP_IOIPSL
[776]8  use IOIPSL
[127]9#else
[776]10  ! if not using IOIPSL, we still need to use (a local version of) getin
11  use ioipsl_getincom
[127]12#endif
[1422]13  USE comvert_mod, ONLY: disvert_type,pressure_exner
14  USE comconst_mod, ONLY: im,jm,lllm,imp1,jmp1,lllmm1,lllmp1,   &
15                dtphys,dtvr,unsim,r,cpp,kappa,pi
[1]16
[776]17  IMPLICIT NONE
18  !
19  !      P. Le Van
20  !
21  !   Declarations:
22  !   -------------
23  !
24  include "dimensions.h"
25  include "paramet.h"
26  include "iniprint.h"
[1]27
[776]28  character(len=*),parameter :: modname="iniconst"
29  character(len=80) :: abort_message
30  !
31  !
32  !
33  !-----------------------------------------------------------------------
34  !   dimension des boucles:
35  !   ----------------------
[1]36
[776]37  im      = iim
38  jm      = jjm
39  lllm    = llm
[3631]40  imp1    = iim
[776]41  jmp1    = jjm + 1
42  lllmm1  = llm - 1
43  lllmp1  = llm + 1
[1]44
[776]45  !-----------------------------------------------------------------------
46  dtphys  = iphysiq * dtvr
47  unsim   = 1./iim
48  pi      = 2.*ASIN( 1. )
[1]49
[776]50  !-----------------------------------------------------------------------
51  !
[1]52
[776]53  r       = cpp * kappa
[1]54
[776]55  write(lunout,*) trim(modname),': R  CP  Kappa ',r,cpp,kappa
56  !
57  !-----------------------------------------------------------------------
[1]58
[776]59  ! vertical discretization: default behavior depends on planet_type flag
60  if (planet_type=="earth") then
61     disvert_type=1
62  else
63     disvert_type=2
64  endif
65  ! but user can also specify using one or the other in run.def:
66  call getin('disvert_type',disvert_type)
67  write(lunout,*) trim(modname),': disvert_type=',disvert_type
[1]68
[776]69  pressure_exner = disvert_type == 1 ! default value
70  call getin('pressure_exner', pressure_exner)
[127]71
[776]72  if (disvert_type==1) then
73     ! standard case for Earth (automatic generation of levels)
[1302]74     call disvert()
[776]75  else if (disvert_type==2) then
76     ! standard case for planets (levels generated using z2sig.def file)
77     call disvert_noterre
78  else
79     write(abort_message,*) "Wrong value for disvert_type: ", disvert_type
80     call abort_gcm(modname,abort_message,0)
81  endif
82
83END SUBROUTINE iniconst
Note: See TracBrowser for help on using the repository browser.