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