27 |
! "pa" should be defined before this procedure is called. |
! "pa" should be defined before this procedure is called. |
28 |
|
|
29 |
use nr_util, only: pi |
use nr_util, only: pi |
30 |
use new_unit_m, only: new_unit |
use jumble, only: new_unit |
31 |
|
use unit_nml_m, only: unit_nml |
32 |
|
|
33 |
REAL s(llm+1) |
REAL s(llm+1) |
34 |
! "s(l)" is the atmospheric hybrid sigma-pressure coordinate at |
! "s(l)" is the atmospheric hybrid sigma-pressure coordinate at |
38 |
! "ds(l)" : épaisseur de la couche "l" dans la coordonnée "s" |
! "ds(l)" : épaisseur de la couche "l" dans la coordonnée "s" |
39 |
|
|
40 |
INTEGER l, unit |
INTEGER l, unit |
41 |
REAL alpha, x(llm), trash |
REAL alpha, x(llm) |
42 |
|
|
43 |
character(len=7):: s_sampling = "LMD5" |
character(len=7):: s_sampling = "tropo" |
44 |
! (other allowed values are "param", "strato1", "strato2" and "read") |
! (other allowed values are "param", "strato1", "strato" and "read") |
45 |
|
|
46 |
real:: h = 7. ! scale height, in km |
real:: h = 7. ! scale height, in km |
47 |
! (used only if "s_sampling" == "param" or "strato1") |
! (used only if "s_sampling" == "param" or "strato1") |
67 |
|
|
68 |
print *, "Enter namelist 'disvert_nml'." |
print *, "Enter namelist 'disvert_nml'." |
69 |
read(unit=*, nml=disvert_nml) |
read(unit=*, nml=disvert_nml) |
70 |
write(unit=*, nml=disvert_nml) |
write(unit_nml, nml=disvert_nml) |
71 |
|
|
72 |
select case (s_sampling) |
select case (s_sampling) |
73 |
case ("param") |
case ("param") |
78 |
= cosh((l - 1) / k0) **(- alpha * k0 / h) & |
= cosh((l - 1) / k0) **(- alpha * k0 / h) & |
79 |
* exp(- alpha / h * tanh((llm - k1) / k0) & |
* exp(- alpha / h * tanh((llm - k1) / k0) & |
80 |
* beta **(l - 1 - (llm - k1)) / log(beta)) |
* beta **(l - 1 - (llm - k1)) / log(beta)) |
81 |
case ("LMD5") |
case ("tropo") |
|
! Ancienne discrétisation |
|
82 |
s(1) = 1. |
s(1) = 1. |
83 |
s(llm+1) = 0. |
s(llm+1) = 0. |
84 |
forall (l = 1: llm) ds(l) & |
forall (l = 1: llm) ds(l) & |
102 |
|
|
103 |
s(2:llm) = (exp(- zz(2:llm) / h) - exp(- zz(llm + 1) / h)) & |
s(2:llm) = (exp(- zz(2:llm) / h) - exp(- zz(llm + 1) / h)) & |
104 |
/ (1. - exp(- zz(llm + 1) / h)) |
/ (1. - exp(- zz(llm + 1) / h)) |
105 |
case ("strato2") |
case ("strato") |
106 |
! Recommended by F. Lott for a domain including the stratosphere |
! Recommended by F. Lott for a domain including the stratosphere |
107 |
s(1) = 1. |
s(1) = 1. |
108 |
s(llm+1) = 0. |
s(llm+1) = 0. |
120 |
position="rewind") |
position="rewind") |
121 |
read(unit, fmt=*) ! skip title line |
read(unit, fmt=*) ! skip title line |
122 |
do l = 1, llm + 1 |
do l = 1, llm + 1 |
123 |
read(unit, fmt=*) trash, s(l) |
read(unit, fmt=*) s(l) |
124 |
end do |
end do |
125 |
close(unit) |
close(unit) |
126 |
! Quick check: |
! Quick check: |