source: LMDZ5/trunk/libf/dyn3dpar/iniconst.F90 @ 1733

Last change on this file since 1733 was 1625, checked in by lguez, 13 years ago

Created logical variable "pressure_exner". "pressure_exner" replaces
"disvert_type" to choose between calls to "exner_hyb" and
"exner_milieu". If "pressure_exner" is true, pressure inside layers is
computed from Exner function ("exner_hyb"), else it is the mean of
pressure values at interfaces ("exner_milieu"). "disvert_type" now
only chooses between "disvert" and "disvert_noterre". Default value
for "pressure_exner" is true if "disvert_type" equals 1.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.0 KB
RevLine 
[630]1!
[1403]2! $Id: iniconst.F90 1625 2012-05-09 13:14:48Z emillour $
[630]3!
[1625]4SUBROUTINE iniconst
[630]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
[1403]13
[1625]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"
[630]27
[1625]28  character(len=*),parameter :: modname="iniconst"
29  character(len=80) :: abort_message
30  !
31  !
32  !
33  !-----------------------------------------------------------------------
34  !   dimension des boucles:
35  !   ----------------------
[630]36
[1625]37  im      = iim
38  jm      = jjm
39  lllm    = llm
40  imp1    = iim
41  jmp1    = jjm + 1
42  lllmm1  = llm - 1
43  lllmp1  = llm + 1
[630]44
[1625]45  !-----------------------------------------------------------------------
[630]46
[1625]47  dtphys  = iphysiq * dtvr
48  unsim   = 1./iim
49  pi      = 2.*ASIN( 1. )
[630]50
[1625]51  !-----------------------------------------------------------------------
52  !
[630]53
[1625]54  r       = cpp * kappa
[630]55
[1625]56  write(lunout,*) trim(modname),': R  CP  Kappa ',r,cpp,kappa
57  !
58  !-----------------------------------------------------------------------
[630]59
[1625]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
[1520]69
[1625]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(pa,preff,ap,bp,dpres,presnivs,nivsigs,nivsig, scaleheight)
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
84END SUBROUTINE iniconst
Note: See TracBrowser for help on using the repository browser.