36 public :: atmos_profile_isa
38 interface atmos_profile_isa
39 module procedure atmos_profile_isa_1d
40 module procedure atmos_profile_isa_3d
41 end interface atmos_profile_isa
56 integer,
private,
parameter :: nref = 8
57 real(RP),
private,
parameter :: z_isa(nref) = (/ 0.0_rp, &
65 real(RP),
private,
parameter :: gamma(nref) = (/ -6.5e-3_rp, &
78 subroutine atmos_profile_isa_1d( &
86 integer,
intent(in) ::
ka,
ks,
ke 87 real(RP),
intent(in) :: temp_sfc
88 real(RP),
intent(in) :: pres_sfc
89 real(RP),
intent(in) :: z (
ka)
90 real(RP),
intent(out) :: pott(
ka)
92 real(RP) :: temp_isa(nref)
93 real(RP) :: pres_isa(nref)
106 temp_isa(1) = temp_sfc
107 pres_isa(1) = pres_sfc
110 temp_isa(n) = temp_isa(n-1) + gamma(n-1) * ( z_isa(n)-z_isa(n-1) )
112 if ( gamma(n-1) == 0.0_rp )
then 113 pres_isa(n) = pres_isa(n-1) * exp( -gmr / temp_isa(n) * ( z_isa(n)-z_isa(n-1) ) )
115 pres_isa(n) = pres_isa(n-1) * ( temp_isa(n)/temp_isa(n-1) ) ** ( -gmr/gamma(n-1) )
120 if(
io_l )
write(
io_fid_log,*)
'###### ICAO International Standard Atmosphere ######' 121 if(
io_l )
write(
io_fid_log,*)
' height: lapse rate: pressure: temperature' 123 if(
io_l )
write(
io_fid_log,
'(4F13.5)') z_isa(n), gamma(n), pres_isa(n), temp_isa(n)
125 if(
io_l )
write(
io_fid_log,*)
'####################################################' 129 if ( z(k) <= z_isa(1) )
then 131 temp(k) = temp_isa(1) + gamma(1) * ( z(k)-z_isa(1) )
132 pres(k) = pres_isa(1) * ( temp(k)/temp_isa(1) ) ** ( -gmr/gamma(1) )
134 elseif( z(k) > z_isa(nref) )
then 136 temp(k) = temp_isa(nref)
137 pres(k) = pres_isa(nref) * exp( -gmr/temp_isa(nref) * ( z(k)-z_isa(nref) ) )
141 if ( z(k) > z_isa(n-1) .AND. z(k) <= z_isa(n) )
then 143 temp(k) = temp_isa(n-1) + gamma(n-1) * ( z(k)-z_isa(n-1) )
144 if ( gamma(n-1) == 0.0_rp )
then 145 pres(k) = pres_isa(n-1) * exp( -gmr/temp_isa(n-1) * ( z(k)-z_isa(n-1) ) )
147 pres(k) = pres_isa(n-1) * ( temp(k)/temp_isa(n-1) ) ** ( -gmr/gamma(n-1) )
154 pott(k) = temp(k) * ( p00/pres(k) )**rovcp
158 end subroutine atmos_profile_isa_1d
162 subroutine atmos_profile_isa_3d( &
172 integer,
intent(in) ::
ka,
ks,
ke 173 integer,
intent(in) ::
ia,
is,
ie 174 integer,
intent(in) ::
ja,
js,
je 175 real(RP),
intent(in) :: temp_sfc(
ia,
ja)
176 real(RP),
intent(in) :: pres_sfc(
ia,
ja)
177 real(RP),
intent(in) :: z (
ka,
ia,
ja)
178 real(RP),
intent(out) :: pott (
ka,
ia,
ja)
180 real(RP) :: temp_isa(nref,
ia,
ja)
181 real(RP) :: pres_isa(nref,
ia,
ja)
187 integer :: k, i, j, n
191 if(
io_l )
write(
io_fid_log,*)
'++++++ Module[PROFILE] / Categ[ATMOS SHARE] / Origin[SCALElib]' 199 temp_isa(1,i,j) = temp_sfc(i,j)
200 pres_isa(1,i,j) = pres_sfc(i,j)
207 temp_isa(n,i,j) = temp_isa(n-1,i,j) + gamma(n-1) * ( z_isa(n)-z_isa(n-1) )
209 if ( gamma(n-1) == 0.0_rp )
then 210 pres_isa(n,i,j) = pres_isa(n-1,i,j) * exp( -gmr / temp_isa(n,i,j) * ( z_isa(n)-z_isa(n-1) ) )
212 pres_isa(n,i,j) = pres_isa(n-1,i,j) * ( temp_isa(n,i,j)/temp_isa(n-1,i,j) ) ** ( -gmr/gamma(n-1) )
219 if(
io_l )
write(
io_fid_log,*)
'###### ICAO International Standard Atmosphere ######' 220 if(
io_l )
write(
io_fid_log,*)
' height: lapse rate: pressure: temperature' 224 if(
io_l )
write(
io_fid_log,*)
'####################################################' 230 if ( z(k,i,j) <= z_isa(1) )
then 232 temp(k) = temp_isa(1,i,j) + gamma(1) * ( z(k,i,j)-z_isa(1) )
233 pres(k) = pres_isa(1,i,j) * ( temp(k)/temp_isa(1,i,j) ) ** ( -gmr/gamma(1) )
235 elseif ( z(k,i,j) > z_isa(nref) )
then 237 temp(k) = temp_isa(nref,i,j)
238 pres(k) = pres_isa(nref,i,j) * exp( -gmr/temp_isa(nref,i,j) * ( z(k,i,j)-z_isa(nref) ) )
242 if ( z(k,i,j) > z_isa(n-1) .AND. z(k,i,j) <= z_isa(n) )
then 244 temp(k) = temp_isa(n-1,i,j) + gamma(n-1) * ( z(k,i,j)-z_isa(n-1) )
245 if ( gamma(n-1) == 0.0_rp )
then 246 pres(k) = pres_isa(n-1,i,j) * exp( -gmr/temp_isa(n-1,i,j) * ( z(k,i,j)-z_isa(n-1) ) )
248 pres(k) = pres_isa(n-1,i,j) * ( temp(k)/temp_isa(n-1,i,j) ) ** ( -gmr/gamma(n-1) )
255 pott(k,i,j) = temp(k) * ( p00/pres(k) )**rovcp
261 end subroutine atmos_profile_isa_3d
integer, public is
start point of inner domain: x, local
integer, public je
end point of inner domain: y, local
real(rp), public const_cpdry
specific heat (dry air,constant pressure) [J/kg/K]
logical, public io_l
output log or not? (this process)
integer, public ke
end point of inner domain: z, local
real(rp), public const_rdry
specific gas constant (dry air) [J/kg/K]
module ATMOSPHERE / Typical vertical profile
integer, public ia
of x whole cells (local, with HALO)
integer, public ka
of z whole cells (local, with HALO)
real(rp), public const_pre00
pressure reference [Pa]
real(rp), public const_grav
standard acceleration of gravity [m/s2]
integer, public js
start point of inner domain: y, local
integer, public ks
start point of inner domain: z, local
integer, public ie
end point of inner domain: x, local
integer, public io_fid_log
Log file ID.
integer, public ja
of y whole cells (local, with HALO)