source: LMDZ5/branches/LMDZ5_AR5/libf/dyn3dpar/iniconst.F @ 2025

Last change on this file since 2025 was 1520, checked in by Ehouarn Millour, 13 years ago

Implementation of a different vertical discretization (from/for planets, but
can in principle also be used for Earth).
Choice of vertical discretization is set by flag 'disvert_type';
'disvert_type=1' is Earth standard (default; ie set to 1 if
planet_type=="earth") case.
With 'disvert_type=2', approximate altitude of layers and reference atmospheric
scale height must be given using an input file ("z2sig.def", first line
should give scale height, in km, following lines must specify the altitude,
in km above surface, of mid-layers, one per line; see disvert_noterre.F).

Checked that these changes do not impact on 'bench' results, on Vargas.

EM.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.1 KB
Line 
1!
2! $Id: iniconst.F 1520 2011-05-23 11:37:09Z fhourdin $
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
15c
16c      P. Le Van
17c
18c-----------------------------------------------------------------------
19c   Declarations:
20c   -------------
21c
22#include "dimensions.h"
23#include "paramet.h"
24#include "comconst.h"
25#include "temps.h"
26#include "comvert.h"
27#include "iniprint.h"
28
29      character(len=*),parameter :: modname="iniconst"
30      character(len=80) :: abort_message
31c
32c
33c
34c-----------------------------------------------------------------------
35c   dimension des boucles:
36c   ----------------------
37
38      im      = iim
39      jm      = jjm
40      lllm    = llm
41      imp1    = iim
42      jmp1    = jjm + 1
43      lllmm1  = llm - 1
44      lllmp1  = llm + 1
45
46c-----------------------------------------------------------------------
47
48      dtphys  = iphysiq * dtvr
49      unsim   = 1./iim
50      pi      = 2.*ASIN( 1. )
51
52c-----------------------------------------------------------------------
53c
54
55      r       = cpp * kappa
56
57      write(lunout,*) trim(modname),': R  CP  Kappa ',r,cpp,kappa
58c
59c-----------------------------------------------------------------------
60
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
70     
71      if (disvert_type==1) then
72       ! standard case for Earth (automatic generation of levels)
73       call disvert(pa,preff,ap,bp,dpres,presnivs,nivsigs,nivsig,
74     &              scaleheight)
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: ",
80     &                        disvert_type
81        call abort_gcm(modname,abort_message,0)
82      endif
83
84      END
Note: See TracBrowser for help on using the repository browser.