SCALE-RM
Data Types | Functions/Subroutines | Variables
scale_atmos_saturation Module Reference

module ATMOSPHERE / Saturation adjustment More...

Functions/Subroutines

subroutine, public atmos_saturation_setup
 Setup. More...
 
subroutine atmos_saturation_alpha_0d (alpha, temp)
 calc liquid/ice separation factor (0D) More...
 
subroutine, public atmos_saturation_dqsw_dtem_rho (dqsdtem, temp, dens)
 
subroutine, public atmos_saturation_dqsi_dtem_rho (dqsdtem, temp, dens)
 
subroutine, public atmos_saturation_dqsw_dtem_dpre (dqsdtem, dqsdpre, temp, pres)
 
subroutine, public atmos_saturation_dqsi_dtem_dpre (dqsdtem, dqsdpre, temp, pres)
 

Variables

real(rp), public cpovr_liq
 
real(rp), public cpovr_ice
 
real(rp), public cvovr_liq
 
real(rp), public cvovr_ice
 
real(rp), public lovr_liq
 
real(rp), public lovr_ice
 

Detailed Description

module ATMOSPHERE / Saturation adjustment

Description
Saturation adjustment module
Author
Team SCALE
History
  • 2011-10-24 (T.Seiki) [new] Import from NICAM
  • 2012-02-10 (H.Yashiro) [mod] Reconstruction
NAMELIST
  • PARAM_ATMOS_SATURATION
    nametypedefault valuecomment
    ATMOS_SATURATION_ULIMIT_TEMP real(RP) 273.15_RP upper limit temperature
    ATMOS_SATURATION_LLIMIT_TEMP real(RP) 233.15_RP lower limit temperature

History Output
No history output

Function/Subroutine Documentation

◆ atmos_saturation_setup()

subroutine, public scale_atmos_saturation::atmos_saturation_setup ( )

Setup.

Definition at line 156 of file scale_atmos_sub_saturation.F90.

References scale_const::const_ci, scale_const::const_cl, scale_const::const_cpvap, scale_const::const_cvvap, scale_const::const_lhs0, scale_const::const_lhs00, scale_const::const_lhv0, scale_const::const_lhv00, scale_const::const_thermodyn_type, cpovr_ice, cpovr_liq, cvovr_ice, cvovr_liq, scale_stdio::io_fid_conf, scale_stdio::io_fid_log, scale_stdio::io_fid_nml, scale_stdio::io_l, scale_stdio::io_nml, lovr_ice, lovr_liq, and scale_process::prc_mpistop().

Referenced by mod_rm_driver::scalerm(), and mod_rm_prep::scalerm_prep().

156  use scale_process, only: &
158  use scale_const, only: &
159  cpvap => const_cpvap, &
160  cvvap => const_cvvap, &
161  cl => const_cl, &
162  ci => const_ci, &
163  lhv00 => const_lhv00, &
164  lhs00 => const_lhs00, &
165  lhv0 => const_lhv0, &
166  lhs0 => const_lhs0, &
168  implicit none
169 
170  namelist / param_atmos_saturation / &
171  atmos_saturation_ulimit_temp, &
172  atmos_saturation_llimit_temp
173 
174  integer :: ierr
175  !---------------------------------------------------------------------------
176 
177  if( io_l ) write(io_fid_log,*)
178  if( io_l ) write(io_fid_log,*) '++++++ Module[SATURATION] / Categ[ATMOS SHARE] / Origin[SCALElib]'
179 
180  !--- read namelist
181  rewind(io_fid_conf)
182  read(io_fid_conf,nml=param_atmos_saturation,iostat=ierr)
183  if( ierr < 0 ) then !--- missing
184  if( io_l ) write(io_fid_log,*) '*** Not found namelist. Default used.'
185  elseif( ierr > 0 ) then !--- fatal error
186  write(*,*) 'xxx Not appropriate names in namelist PARAM_ATMOS_SATURATION. Check!'
187  call prc_mpistop
188  endif
189  if( io_nml ) write(io_fid_nml,nml=param_atmos_saturation)
190 
191  rtem00 = 1.0_rp / tem00
192 
193  if ( const_thermodyn_type == 'EXACT' ) then
194 
195  cpovr_liq = ( cpvap - cl ) / rvap
196  cpovr_ice = ( cpvap - ci ) / rvap
197  cvovr_liq = ( cvvap - cl ) / rvap
198  cvovr_ice = ( cvvap - ci ) / rvap
199 
200  lovr_liq = lhv00 / rvap
201  lovr_ice = lhs00 / rvap
202 
203  elseif( const_thermodyn_type == 'SIMPLE' ) then
204 
205  cpovr_liq = 0.0_rp
206  cpovr_ice = 0.0_rp
207  cvovr_liq = 0.0_rp
208  cvovr_ice = 0.0_rp
209 
210  lovr_liq = lhv0 / rvap
211  lovr_ice = lhs0 / rvap
212 
213  endif
214 
215  dalphadt_const = 1.0_rp / ( atmos_saturation_ulimit_temp - atmos_saturation_llimit_temp )
216 
217  if( io_l ) write(io_fid_log,*)
218  if( io_l ) write(io_fid_log,'(1x,A,F7.2,A,F7.2)') '*** Temperature range for liquid/ice mixture : ', &
219  atmos_saturation_llimit_temp, ' - ', &
220  atmos_saturation_ulimit_temp
221 
222  return
subroutine, public prc_mpistop
Abort MPI.
real(rp), parameter, public const_ci
specific heat (ice) [J/kg/K]
Definition: scale_const.F90:69
real(rp), parameter, public const_cl
specific heat (liquid water) [J/kg/K]
Definition: scale_const.F90:68
real(rp), public const_cvvap
specific heat (water vapor, constant volume) [J/kg/K]
Definition: scale_const.F90:67
real(rp), parameter, public const_lhs0
latent heat of sublimation at 0C [J/kg]
Definition: scale_const.F90:79
real(rp), parameter, public const_lhv0
latent heat of vaporizaion at 0C [J/kg]
Definition: scale_const.F90:77
module PROCESS
real(rp), public const_lhs00
latent heat of sublimation at 0K [J/kg]
Definition: scale_const.F90:80
real(rp), public const_lhv00
latent heat of vaporizaion at 0K [J/kg]
Definition: scale_const.F90:78
module CONSTANT
Definition: scale_const.F90:14
real(rp), parameter, public const_cpvap
specific heat (water vapor, constant pressure) [J/kg/K]
Definition: scale_const.F90:66
character(len=h_short), public const_thermodyn_type
internal energy type
Definition: scale_const.F90:98
Here is the call graph for this function:
Here is the caller graph for this function:

◆ atmos_saturation_alpha_0d()

subroutine scale_atmos_saturation::atmos_saturation_alpha_0d ( real(rp), intent(out)  alpha,
real(rp), intent(in)  temp 
)

calc liquid/ice separation factor (0D)

Parameters
[out]alphaliquid/ice separation factor (0-1)
[in]temptemperature [K]

Definition at line 230 of file scale_atmos_sub_saturation.F90.

References cpovr_ice, cpovr_liq, scale_grid_index::ieb, scale_grid_index::isb, scale_grid_index::jeb, scale_grid_index::jsb, scale_grid_index::ke, scale_grid_index::ks, lovr_ice, and lovr_liq.

230  implicit none
231 
232  real(RP), intent(out) :: alpha
233  real(RP), intent(in) :: temp
234  !---------------------------------------------------------------------------
235 
236  alpha = ( temp - atmos_saturation_llimit_temp ) &
237  / ( atmos_saturation_ulimit_temp - atmos_saturation_llimit_temp )
238 
239  alpha = min( max( alpha, 0.0_rp ), 1.0_rp )
240 
241  return

◆ atmos_saturation_dqsw_dtem_rho()

subroutine, public scale_atmos_saturation::atmos_saturation_dqsw_dtem_rho ( real(rp), dimension(ka,ia,ja), intent(out)  dqsdtem,
real(rp), dimension (ka,ia,ja), intent(in)  temp,
real(rp), dimension (ka,ia,ja), intent(in)  dens 
)
Parameters
[out]dqsdtem(d qsw/d T)_{rho}
[in]temptemperature [K]
[in]denstemperature [K]

Definition at line 1178 of file scale_atmos_sub_saturation.F90.

References cpovr_liq, scale_grid_index::ieb, scale_grid_index::isb, scale_grid_index::jeb, scale_grid_index::jsb, scale_grid_index::ke, scale_grid_index::ks, and lovr_liq.

Referenced by scale_atmos_phy_mp_sn14::update_by_phase_change_kij().

1178  use scale_atmos_hydrometeor, only: &
1179  hydrometeor_lhv => atmos_hydrometeor_lhv
1180  implicit none
1181 
1182  real(RP), intent(out) :: dqsdtem(KA,IA,JA)
1183  real(RP), intent(in) :: temp (KA,IA,JA)
1184  real(RP), intent(in) :: dens (KA,IA,JA)
1185 
1186  real(RP) :: LHV(KA,IA,JA) ! latent heat of vaporization [J/kg]
1187  real(RP) :: psat
1188  real(RP) :: TEM
1189 
1190  integer :: k, i, j
1191  !---------------------------------------------------------------------------
1192 
1193  call hydrometeor_lhv( lhv(:,:,:), temp(:,:,:) )
1194 
1195  !$omp parallel do private(i,j,k,TEM,psat) OMP_SCHEDULE_ collapse(2)
1196  do j = jsb, jeb
1197  do i = isb, ieb
1198  do k = ks, ke
1199  tem = max( temp(k,i,j), tem_min )
1200 
1201  psat = psat0 * ( tem * rtem00 )**cpovr_liq &
1202  * exp( lovr_liq * ( rtem00 - 1.0_rp/tem ) )
1203 
1204  dqsdtem(k,i,j) = psat / ( dens(k,i,j) * rvap * temp(k,i,j) * temp(k,i,j) ) &
1205  * ( lhv(k,i,j) / ( rvap * temp(k,i,j) ) - 1.0_rp )
1206  enddo
1207  enddo
1208  enddo
1209 
1210  return
integer, public jeb
integer, public ieb
integer, public isb
integer, public jsb
Here is the caller graph for this function:

◆ atmos_saturation_dqsi_dtem_rho()

subroutine, public scale_atmos_saturation::atmos_saturation_dqsi_dtem_rho ( real(rp), dimension(ka,ia,ja), intent(out)  dqsdtem,
real(rp), dimension (ka,ia,ja), intent(in)  temp,
real(rp), dimension (ka,ia,ja), intent(in)  dens 
)

Definition at line 1219 of file scale_atmos_sub_saturation.F90.

References cpovr_ice, scale_grid_index::ieb, scale_grid_index::isb, scale_grid_index::jeb, scale_grid_index::jsb, scale_grid_index::ke, scale_grid_index::ks, and lovr_ice.

Referenced by scale_atmos_phy_mp_sn14::nucleation_kij(), and scale_atmos_phy_mp_sn14::update_by_phase_change_kij().

1219  use scale_atmos_hydrometeor, only: &
1220  hydrometeor_lhs => atmos_hydrometeor_lhs
1221  implicit none
1222 
1223  real(RP), intent(out) :: dqsdtem(KA,IA,JA)
1224  real(RP), intent(in) :: temp (KA,IA,JA)
1225  real(RP), intent(in) :: dens (KA,IA,JA)
1226 
1227  real(RP) :: LHS(KA,IA,JA) ! latent heat of sublimation [J/kg]
1228  real(RP) :: psat
1229  real(RP) :: TEM
1230 
1231  integer :: k, i, j
1232  !---------------------------------------------------------------------------
1233 
1234  call hydrometeor_lhs( lhs(:,:,:), temp(:,:,:) )
1235 
1236  !$omp parallel do private(i,j,k,TEM,psat) OMP_SCHEDULE_ collapse(2)
1237  do j = jsb, jeb
1238  do i = isb, ieb
1239  do k = ks, ke
1240  tem = max( temp(k,i,j), tem_min )
1241 
1242  psat = psat0 * ( tem * rtem00 )**cpovr_ice &
1243  * exp( lovr_ice * ( rtem00 - 1.0_rp/tem ) )
1244 
1245  dqsdtem(k,i,j) = psat / ( dens(k,i,j) * rvap * temp(k,i,j) * temp(k,i,j) ) &
1246  * ( lhs(k,i,j) / ( rvap * temp(k,i,j) ) - 1.0_rp )
1247  enddo
1248  enddo
1249  enddo
1250 
1251  return
integer, public jeb
integer, public ieb
integer, public isb
integer, public jsb
Here is the caller graph for this function:

◆ atmos_saturation_dqsw_dtem_dpre()

subroutine, public scale_atmos_saturation::atmos_saturation_dqsw_dtem_dpre ( real(rp), dimension(ka,ia,ja), intent(out)  dqsdtem,
real(rp), dimension(ka,ia,ja), intent(out)  dqsdpre,
real(rp), dimension (ka,ia,ja), intent(in)  temp,
real(rp), dimension (ka,ia,ja), intent(in)  pres 
)

Definition at line 1261 of file scale_atmos_sub_saturation.F90.

References cpovr_liq, scale_grid_index::ieb, scale_grid_index::isb, scale_grid_index::jeb, scale_grid_index::jsb, scale_grid_index::ke, scale_grid_index::ks, and lovr_liq.

Referenced by scale_atmos_phy_mp_sn14::update_by_phase_change_kij().

1261  use scale_atmos_hydrometeor, only: &
1262  hydrometeor_lhv => atmos_hydrometeor_lhv
1263  implicit none
1264 
1265  real(RP), intent(out) :: dqsdtem(KA,IA,JA)
1266  real(RP), intent(out) :: dqsdpre(KA,IA,JA)
1267  real(RP), intent(in) :: temp (KA,IA,JA)
1268  real(RP), intent(in) :: pres (KA,IA,JA)
1269 
1270  real(RP) :: LHV(KA,IA,JA) ! latent heat of vaporization [J/kg]
1271  real(RP) :: psat
1272  real(RP) :: TEM
1273  real(RP) :: den1, den2 ! denominator
1274 
1275  integer :: k, i, j
1276  !---------------------------------------------------------------------------
1277 
1278  call hydrometeor_lhv( lhv(:,:,:), temp(:,:,:) )
1279 
1280  !$omp parallel do private(i,j,k,TEM,psat,den1,den2) OMP_SCHEDULE_ collapse(2)
1281  do j = jsb, jeb
1282  do i = isb, ieb
1283  do k = ks, ke
1284  tem = max( temp(k,i,j), tem_min )
1285 
1286  psat = psat0 * ( tem * rtem00 )**cpovr_liq &
1287  * exp( lovr_liq * ( rtem00 - 1.0_rp/tem ) )
1288 
1289  den1 = ( pres(k,i,j) - (1.0_rp-epsvap) * psat ) &
1290  * ( pres(k,i,j) - (1.0_rp-epsvap) * psat )
1291  den2 = den1 * rvap * temp(k,i,j) * temp(k,i,j)
1292 
1293  dqsdpre(k,i,j) = - epsvap * psat / den1
1294  dqsdtem(k,i,j) = epsvap * psat / den2 * lhv(k,i,j) * pres(k,i,j)
1295  enddo
1296  enddo
1297  enddo
1298 
1299  return
integer, public jeb
integer, public ieb
integer, public isb
integer, public jsb
Here is the caller graph for this function:

◆ atmos_saturation_dqsi_dtem_dpre()

subroutine, public scale_atmos_saturation::atmos_saturation_dqsi_dtem_dpre ( real(rp), dimension(ka,ia,ja), intent(out)  dqsdtem,
real(rp), dimension(ka,ia,ja), intent(out)  dqsdpre,
real(rp), dimension (ka,ia,ja), intent(in)  temp,
real(rp), dimension (ka,ia,ja), intent(in)  pres 
)

Definition at line 1310 of file scale_atmos_sub_saturation.F90.

References cpovr_ice, scale_grid_index::ieb, scale_grid_index::isb, scale_grid_index::jeb, scale_grid_index::jsb, scale_grid_index::ke, scale_grid_index::ks, and lovr_ice.

Referenced by scale_atmos_phy_mp_sn14::update_by_phase_change_kij().

1310  use scale_atmos_hydrometeor, only: &
1311  hydrometeor_lhs => atmos_hydrometeor_lhs
1312  implicit none
1313 
1314  real(RP), intent(out) :: dqsdtem(KA,IA,JA)
1315  real(RP), intent(out) :: dqsdpre(KA,IA,JA)
1316  real(RP), intent(in) :: temp (KA,IA,JA)
1317  real(RP), intent(in) :: pres (KA,IA,JA)
1318 
1319  real(RP) :: LHS(KA,IA,JA) ! latent heat of sublimation [J/kg]
1320  real(RP) :: psat
1321  real(RP) :: TEM
1322  real(RP) :: den1, den2 ! denominator
1323 
1324  integer :: k, i, j
1325  !---------------------------------------------------------------------------
1326 
1327  call hydrometeor_lhs( lhs(:,:,:), temp(:,:,:) )
1328 
1329  !$omp parallel do private(i,j,k,TEM,psat,den1,den2) OMP_SCHEDULE_ collapse(2)
1330  do j = jsb, jeb
1331  do i = isb, ieb
1332  do k = ks, ke
1333  tem = max( temp(k,i,j), tem_min )
1334 
1335  psat = psat0 * ( tem * rtem00 )**cpovr_ice &
1336  * exp( lovr_ice * ( rtem00 - 1.0_rp/tem ) )
1337 
1338  den1 = ( pres(k,i,j) - (1.0_rp-epsvap) * psat ) &
1339  * ( pres(k,i,j) - (1.0_rp-epsvap) * psat )
1340  den2 = den1 * rvap * temp(k,i,j) * temp(k,i,j)
1341 
1342  dqsdpre(k,i,j) = - epsvap * psat / den1
1343  dqsdtem(k,i,j) = epsvap * psat / den2 * lhs(k,i,j) * pres(k,i,j)
1344  enddo
1345  enddo
1346  enddo
1347 
1348  return
integer, public jeb
integer, public ieb
integer, public isb
integer, public jsb
Here is the caller graph for this function:

Variable Documentation

◆ cpovr_liq

real(rp), public scale_atmos_saturation::cpovr_liq

◆ cpovr_ice

real(rp), public scale_atmos_saturation::cpovr_ice

◆ cvovr_liq

real(rp), public scale_atmos_saturation::cvovr_liq

Definition at line 130 of file scale_atmos_sub_saturation.F90.

Referenced by scale_atmos_phy_mp_common::atmos_phy_mp_saturation_adjustment(), and atmos_saturation_setup().

130  real(RP), public :: CVovR_liq

◆ cvovr_ice

real(rp), public scale_atmos_saturation::cvovr_ice

Definition at line 131 of file scale_atmos_sub_saturation.F90.

Referenced by scale_atmos_phy_mp_common::atmos_phy_mp_saturation_adjustment(), and atmos_saturation_setup().

131  real(RP), public :: CVovR_ice

◆ lovr_liq

real(rp), public scale_atmos_saturation::lovr_liq

◆ lovr_ice

real(rp), public scale_atmos_saturation::lovr_ice