14 |
! half-level, between layers "l" and "l-1" |
! half-level, between layers "l" and "l-1" |
15 |
|
|
16 |
real, save:: presnivs(llm) |
real, save:: presnivs(llm) |
17 |
! pressions approximatives des milieux de couches, en Pa |
! approximate full level pressure for a reference surface pressure, in Pa |
18 |
|
|
19 |
real, parameter:: preff = 101325. ! in Pa |
real, parameter:: preff = 101325. ! in Pa |
20 |
real y, ya ! for the hybrid function |
real y, ya ! for the hybrid function |
45 |
real zz(llm) ! in km |
real zz(llm) ! in km |
46 |
|
|
47 |
character(len=20):: vert_sampling = "tropo" |
character(len=20):: vert_sampling = "tropo" |
48 |
! Allowed values: "tropo", "param", "strato", "read_hybrid", "read_pressure" |
! Allowed values: "tropo", "strato_custom", "strato", |
49 |
|
! "read_hybrid", "read_pressure". |
50 |
|
|
51 |
! These variables are used only in the case vert_sampling == |
! These variables are used only in the case vert_sampling == |
52 |
! "param", and all are in km: |
! "strato_custom", and all are in km: |
53 |
real:: vert_scale = 7. ! scale height |
real:: vert_scale = 7. ! scale height |
54 |
real:: vert_dzmin = 0.02 ! width of first layer |
real:: vert_dzmin = 0.017 ! width of first layer |
55 |
real:: vert_dzlow = 1. ! dz in the low atmosphere |
real:: vert_dzlow = 1. ! dz in the low atmosphere |
56 |
real:: vert_z0low = 8. ! height at which resolution reaches dzlow |
real:: vert_z0low = 8.7 ! height at which resolution reaches dzlow |
57 |
real:: vert_dzmid = 3. ! dz in the mid atmosphere |
real:: vert_dzmid = 2. ! dz in the mid atmosphere |
58 |
real:: vert_z0mid = 70. ! height at which resolution reaches dzmid |
real:: vert_z0mid = 70. ! height at which resolution reaches dzmid |
59 |
real:: vert_h_mid = 20. ! width of the transition |
real:: vert_h_mid = 20. ! width of the transition |
60 |
real:: vert_dzhig = 11. ! dz in the high atmosphere |
real:: vert_dzhig = 11. ! dz in the high atmosphere |
61 |
real:: vert_z0hig = 80. ! height at which resolution reaches dz |
real:: vert_z0hig = 75. ! height at which resolution reaches dz |
62 |
real:: vert_h_hig = 20. ! width of the transition |
real:: vert_h_hig = 20. ! width of the transition |
63 |
|
|
64 |
real, allocatable:: p(:) ! (llm + 1) pressure (in hPa) |
real, allocatable:: p(:) ! (2:llm or llm + 1) pressure (in hPa) |
65 |
|
|
66 |
namelist /disvert_nml/vert_sampling, vert_scale, vert_dzmin, vert_dzlow, & |
namelist /disvert_nml/vert_sampling, vert_scale, vert_dzmin, vert_dzlow, & |
67 |
vert_z0low, vert_dzmid, vert_z0mid, vert_h_mid, vert_dzhig, & |
vert_z0low, vert_dzmid, vert_z0mid, vert_h_mid, vert_dzhig, & |
82 |
select case (vert_sampling) |
select case (vert_sampling) |
83 |
|
|
84 |
case ("tropo") |
case ("tropo") |
85 |
! with llm = 19 for CMIP 3 |
! with llm = 19 and dsigmin = 1 for CMIP 3 |
86 |
|
|
87 |
forall (l = 1: llm) ds(l) & |
forall (l = 1: llm) ds(l) & |
88 |
= dsigmin + 7. * SIN(pi * (REAL(l) - 0.5) / real(llm + 1))**2 |
= dsigmin + 7. * SIN(pi * (REAL(l) - 0.5) / real(llm + 1))**2 |
95 |
call compute_ab |
call compute_ab |
96 |
|
|
97 |
case ("strato") |
case ("strato") |
98 |
! with llm = 39 and dsigmin = 0.3 for CMIP5 |
! with llm = 39 and dsigmin = 0.3 for CMIP5 |
99 |
|
|
100 |
forall (l = 1: llm) x(l) = pi * (l - 0.5) / (llm + 1) |
forall (l = 1: llm) x(l) = pi * (l - 0.5) / (llm + 1) |
101 |
|
|
108 |
|
|
109 |
call compute_ab |
call compute_ab |
110 |
|
|
111 |
case ("param") |
case ("strato_custom") |
112 |
! with llm = 79 for CMIP 6 |
! with llm = 79 for CMIP 6 |
113 |
|
|
114 |
zz(1) = 0. |
zz(1) = 0. |