source: LMDZ5/trunk/libf/dyn3d_common/iniconst.F90 @ 2600

Last change on this file since 2600 was 2600, checked in by Ehouarn Millour, 8 years ago

Cleanup in the dynamics: turn comvert.h into module comvert_mod.F90
EM

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