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

Last change on this file since 5214 was 5159, checked in by abarral, 7 weeks ago

Put dimensions.h and paramet.h into modules

  • 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
RevLine 
[1403]1! $Id: iniconst.F90 5159 2024-08-02 19:58:25Z dcugnet $
[5099]2
[1625]3SUBROUTINE iniconst
[524]4
[1625]5  USE control_mod
[5117]6  USE IOIPSL
[2597]7  USE comconst_mod, ONLY: im, imp1, jm, jmp1, lllm, lllmm1, lllmp1, &
[5118]8          unsim, pi, r, kappa, cpp, dtvr, dtphys
[2600]9  USE comvert_mod, ONLY: disvert_type, pressure_exner
[5118]10  USE lmdz_iniprint, ONLY: lunout, prt_level
11
[5128]12
[5159]13  USE lmdz_dimensions, ONLY: iim, jjm, llm, ndm
14  USE lmdz_paramet
[1625]15  IMPLICIT NONE
[5099]16
[1625]17  !      P. Le Van
[5099]18
[1625]19  !   Declarations:
20  !   -------------
[5099]21
[524]22
[5159]23
24
[5118]25  CHARACTER(LEN = *), parameter :: modname = "iniconst"
26  CHARACTER(LEN = 80) :: abort_message
[5099]27
28
29
[1625]30  !-----------------------------------------------------------------------
31  !   dimension des boucles:
32  !   ----------------------
[524]33
[5118]34  im = iim
35  jm = jjm
36  lllm = llm
37  imp1 = iim
38  jmp1 = jjm + 1
39  lllmm1 = llm - 1
40  lllmp1 = llm + 1
[524]41
[1625]42  !-----------------------------------------------------------------------
[524]43
[5118]44  dtphys = iphysiq * dtvr
45  unsim = 1. / iim
46  pi = 2. * ASIN(1.)
[524]47
[1625]48  !-----------------------------------------------------------------------
[524]49
[5118]50  r = cpp * kappa
[524]51
[5118]52  WRITE(lunout, *) trim(modname), ': R  CP  Kappa ', r, cpp, kappa
[5099]53
[1625]54  !-----------------------------------------------------------------------
[524]55
[1625]56  ! vertical discretization: default behavior depends on planet_type flag
[5117]57  IF (planet_type=="earth") THEN
[5118]58    disvert_type = 1
[1625]59  else
[5118]60    disvert_type = 2
[5117]61  ENDIF
[1625]62  ! but user can also specify using one or the other in run.def:
[5118]63  CALL getin('disvert_type', disvert_type)
64  WRITE(lunout, *) trim(modname), ': disvert_type=', disvert_type
[1520]65
[1625]66  pressure_exner = disvert_type == 1 ! default value
[5101]67  CALL getin('pressure_exner', pressure_exner)
[1625]68
[5117]69  IF (disvert_type==1) THEN
[5118]70    ! standard case for Earth (automatic generation of levels)
71    CALL disvert()
[5117]72  ELSE IF (disvert_type==2) THEN
[5118]73    ! standard case for planets (levels generated using z2sig.def file)
74    CALL disvert_noterre
[1625]75  else
[5118]76    WRITE(abort_message, *) "Wrong value for disvert_type: ", disvert_type
77    CALL abort_gcm(modname, abort_message, 0)
[5117]78  ENDIF
[1625]79
80END SUBROUTINE iniconst
Note: See TracBrowser for help on using the repository browser.