15 #include "inc_openmp.h" 41 public :: atmos_saturation_alpha
43 public :: atmos_saturation_psat_all
44 public :: atmos_saturation_psat_liq
45 public :: atmos_saturation_psat_ice
47 public :: atmos_saturation_pres2qsat_all
48 public :: atmos_saturation_pres2qsat_liq
49 public :: atmos_saturation_pres2qsat_ice
51 public :: atmos_saturation_dens2qsat_all
52 public :: atmos_saturation_dens2qsat_liq
53 public :: atmos_saturation_dens2qsat_ice
55 public :: atmos_saturation_dalphadt
62 interface atmos_saturation_alpha
64 module procedure atmos_saturation_alpha_1d
65 module procedure atmos_saturation_alpha_3d
66 end interface atmos_saturation_alpha
68 interface atmos_saturation_psat_all
69 module procedure atmos_saturation_psat_all_0d
70 module procedure atmos_saturation_psat_all_1d
71 module procedure atmos_saturation_psat_all_3d
72 end interface atmos_saturation_psat_all
73 interface atmos_saturation_psat_liq
74 module procedure atmos_saturation_psat_liq_0d
75 module procedure atmos_saturation_psat_liq_1d
76 module procedure atmos_saturation_psat_liq_3d
77 end interface atmos_saturation_psat_liq
78 interface atmos_saturation_psat_ice
79 module procedure atmos_saturation_psat_ice_0d
80 module procedure atmos_saturation_psat_ice_1d
81 module procedure atmos_saturation_psat_ice_3d
82 end interface atmos_saturation_psat_ice
84 interface atmos_saturation_pres2qsat_all
85 module procedure atmos_saturation_pres2qsat_all_0d
86 module procedure atmos_saturation_pres2qsat_all_1d
87 module procedure atmos_saturation_pres2qsat_all_2d
88 module procedure atmos_saturation_pres2qsat_all_3d
89 module procedure atmos_saturation_pres2qsat_all_3d_k
90 end interface atmos_saturation_pres2qsat_all
91 interface atmos_saturation_pres2qsat_liq
92 module procedure atmos_saturation_pres2qsat_liq_0d
93 module procedure atmos_saturation_pres2qsat_liq_1d
94 module procedure atmos_saturation_pres2qsat_liq_3d
95 end interface atmos_saturation_pres2qsat_liq
96 interface atmos_saturation_pres2qsat_ice
97 module procedure atmos_saturation_pres2qsat_ice_0d
98 module procedure atmos_saturation_pres2qsat_ice_1d
99 module procedure atmos_saturation_pres2qsat_ice_3d
100 end interface atmos_saturation_pres2qsat_ice
102 interface atmos_saturation_dens2qsat_all
103 module procedure atmos_saturation_dens2qsat_all_0d
104 module procedure atmos_saturation_dens2qsat_all_1d
105 module procedure atmos_saturation_dens2qsat_all_3d
106 end interface atmos_saturation_dens2qsat_all
107 interface atmos_saturation_dens2qsat_liq
108 module procedure atmos_saturation_dens2qsat_liq_0d
109 module procedure atmos_saturation_dens2qsat_liq_1d
110 module procedure atmos_saturation_dens2qsat_liq_3d
111 end interface atmos_saturation_dens2qsat_liq
112 interface atmos_saturation_dens2qsat_ice
113 module procedure atmos_saturation_dens2qsat_ice_0d
114 module procedure atmos_saturation_dens2qsat_ice_1d
115 module procedure atmos_saturation_dens2qsat_ice_3d
116 end interface atmos_saturation_dens2qsat_ice
118 interface atmos_saturation_dalphadt
119 module procedure atmos_saturation_dalphadt_0d
120 module procedure atmos_saturation_dalphadt_1d
121 module procedure atmos_saturation_dalphadt_3d
122 end interface atmos_saturation_dalphadt
143 real(RP),
private,
parameter :: tem_min = 10.0_rp
145 real(RP),
private,
save :: atmos_saturation_ulimit_temp = 273.15_rp
146 real(RP),
private,
save :: atmos_saturation_llimit_temp = 233.15_rp
148 real(RP),
private,
save :: rtem00
149 real(RP),
private,
save :: dalphadt_const
170 namelist / param_atmos_saturation / &
171 atmos_saturation_ulimit_temp, &
172 atmos_saturation_llimit_temp
178 if(
io_l )
write(
io_fid_log,*)
'++++++ Module[SATURATION] / Categ[ATMOS SHARE] / Origin[SCALElib]' 182 read(
io_fid_conf,nml=param_atmos_saturation,iostat=ierr)
184 if(
io_l )
write(
io_fid_log,*)
'*** Not found namelist. Default used.' 185 elseif( ierr > 0 )
then 186 write(*,*)
'xxx Not appropriate names in namelist PARAM_ATMOS_SATURATION. Check!' 191 rtem00 = 1.0_rp / tem00
215 dalphadt_const = 1.0_rp / ( atmos_saturation_ulimit_temp - atmos_saturation_llimit_temp )
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
232 real(RP),
intent(out) :: alpha
233 real(RP),
intent(in) :: temp
236 alpha = ( temp - atmos_saturation_llimit_temp ) &
237 / ( atmos_saturation_ulimit_temp - atmos_saturation_llimit_temp )
239 alpha = min( max( alpha, 0.0_rp ), 1.0_rp )
246 subroutine atmos_saturation_alpha_1d( &
251 real(RP),
intent(out) :: alpha(KA)
252 real(RP),
intent(in) :: temp (KA)
259 alpha(k) = ( temp(k) - atmos_saturation_llimit_temp ) &
260 / ( atmos_saturation_ulimit_temp - atmos_saturation_llimit_temp )
261 alpha(k) = min( max( alpha(k), 0.0_rp ), 1.0_rp )
266 end subroutine atmos_saturation_alpha_1d
270 subroutine atmos_saturation_alpha_3d( &
275 real(RP),
intent(out) :: alpha(KA,IA,JA)
276 real(RP),
intent(in) :: temp (KA,IA,JA)
287 alpha(k,i,j) = ( temp(k,i,j) - atmos_saturation_llimit_temp ) &
288 / ( atmos_saturation_ulimit_temp - atmos_saturation_llimit_temp )
289 alpha(k,i,j) = min( max( alpha(k,i,j), 0.0_rp ), 1.0_rp )
296 end subroutine atmos_saturation_alpha_3d
300 subroutine atmos_saturation_psat_all_0d( &
305 real(RP),
intent(out) :: psat
306 real(RP),
intent(in) :: temp
308 real(RP) :: alpha, psatl, psati
311 call atmos_saturation_alpha ( alpha, temp )
312 call atmos_saturation_psat_liq( psatl, temp )
313 call atmos_saturation_psat_ice( psati, temp )
315 psat = psatl * ( alpha ) &
316 + psati * ( 1.0_rp - alpha )
319 end subroutine atmos_saturation_psat_all_0d
323 subroutine atmos_saturation_psat_all_1d( &
328 real(RP),
intent(out) :: psat(KA)
329 real(RP),
intent(in) :: temp(KA)
331 real(RP) :: alpha(KA), psatl(KA), psati(KA)
336 call atmos_saturation_alpha ( alpha(:), temp(:) )
337 call atmos_saturation_psat_liq( psatl(:), temp(:) )
338 call atmos_saturation_psat_ice( psati(:), temp(:) )
341 psat(k) = psatl(k) * ( alpha(k) ) &
342 + psati(k) * ( 1.0_rp - alpha(k) )
346 end subroutine atmos_saturation_psat_all_1d
350 subroutine atmos_saturation_psat_all_3d( &
355 real(RP),
intent(out) :: psat(KA,IA,JA)
356 real(RP),
intent(in) :: temp(KA,IA,JA)
358 real(RP) :: alpha, psatl, psati
368 alpha = ( temp(k,i,j) - atmos_saturation_llimit_temp ) &
369 / ( atmos_saturation_ulimit_temp - atmos_saturation_llimit_temp )
370 alpha = min( max( alpha, 0.0_rp ), 1.0_rp )
372 psatl = psat0 * ( temp(k,i,j) * rtem00 )**
cpovr_liq &
373 * exp(
lovr_liq * ( rtem00 - 1.0_rp/temp(k,i,j) ) )
375 psati = psat0 * ( temp(k,i,j) * rtem00 )**
cpovr_ice &
376 * exp(
lovr_ice * ( rtem00 - 1.0_rp/temp(k,i,j) ) )
378 psat(k,i,j) = psatl * ( alpha ) &
379 + psati * ( 1.0_rp - alpha )
386 end subroutine atmos_saturation_psat_all_3d
390 subroutine atmos_saturation_psat_liq_0d( &
395 real(RP),
intent(out) :: psat
396 real(RP),
intent(in) :: temp
399 psat = psat0 * ( temp * rtem00 )**
cpovr_liq &
400 * exp(
lovr_liq * ( rtem00 - 1.0_rp/temp ) )
403 end subroutine atmos_saturation_psat_liq_0d
407 subroutine atmos_saturation_psat_liq_1d( &
412 real(RP),
intent(out) :: psat(KA)
413 real(RP),
intent(in) :: temp(KA)
419 psat(k) = psat0 * ( temp(k) * rtem00 )**
cpovr_liq &
420 * exp(
lovr_liq * ( rtem00 - 1.0_rp/temp(k) ) )
424 end subroutine atmos_saturation_psat_liq_1d
428 subroutine atmos_saturation_psat_liq_3d( &
433 real(RP),
intent(out) :: psat(KA,IA,JA)
434 real(RP),
intent(in) :: temp(KA,IA,JA)
443 psat(k,i,j) = psat0 * ( temp(k,i,j) * rtem00 )**
cpovr_liq &
444 * exp(
lovr_liq * ( rtem00 - 1.0_rp/temp(k,i,j) ) )
450 end subroutine atmos_saturation_psat_liq_3d
454 subroutine atmos_saturation_psat_ice_0d( &
459 real(RP),
intent(out) :: psat
460 real(RP),
intent(in) :: temp
463 psat = psat0 * ( temp * rtem00 )**
cpovr_ice &
464 * exp(
lovr_ice * ( rtem00 - 1.0_rp/temp ) )
467 end subroutine atmos_saturation_psat_ice_0d
471 subroutine atmos_saturation_psat_ice_1d( &
476 real(RP),
intent(out) :: psat(KA)
477 real(RP),
intent(in) :: temp(KA)
483 psat(k) = psat0 * ( temp(k) * rtem00 )**
cpovr_ice &
484 * exp(
lovr_ice * ( rtem00 - 1.0_rp/temp(k) ) )
488 end subroutine atmos_saturation_psat_ice_1d
492 subroutine atmos_saturation_psat_ice_3d( &
497 real(RP),
intent(out) :: psat(KA,IA,JA)
498 real(RP),
intent(in) :: temp(KA,IA,JA)
507 psat(k,i,j) = psat0 * ( temp(k,i,j) * rtem00 )**
cpovr_ice &
508 * exp(
lovr_ice * ( rtem00 - 1.0_rp/temp(k,i,j) ) )
514 end subroutine atmos_saturation_psat_ice_3d
518 subroutine atmos_saturation_pres2qsat_all_0d( &
524 real(RP),
intent(out) :: qsat
525 real(RP),
intent(in) :: temp
526 real(RP),
intent(in) :: pres
531 call atmos_saturation_psat_all( psat, temp )
533 qsat = epsvap * psat / ( pres - ( 1.0_rp-epsvap ) * psat )
536 end subroutine atmos_saturation_pres2qsat_all_0d
540 subroutine atmos_saturation_pres2qsat_all_1d( &
546 real(RP),
intent(out) :: qsat(KA)
547 real(RP),
intent(in) :: temp(KA)
548 real(RP),
intent(in) :: pres(KA)
555 call atmos_saturation_psat_all( psat(:), temp(:) )
558 qsat(k) = epsvap * psat(k) / ( pres(k) - ( 1.0_rp-epsvap ) * psat(k) )
562 end subroutine atmos_saturation_pres2qsat_all_1d
566 subroutine atmos_saturation_pres2qsat_all_2d( &
572 real(RP),
intent(out) :: qsat(IA,JA)
573 real(RP),
intent(in) :: temp(IA,JA)
574 real(RP),
intent(in) :: pres(IA,JA)
583 call atmos_saturation_psat_all( psat, temp(i,j) )
585 qsat(i,j) = epsvap * psat / ( pres(i,j) - ( 1.0_rp-epsvap ) * psat )
590 end subroutine atmos_saturation_pres2qsat_all_2d
594 subroutine atmos_saturation_pres2qsat_all_3d( &
600 real(RP),
intent(out) :: qsat(KA,IA,JA)
601 real(RP),
intent(in) :: temp(KA,IA,JA)
602 real(RP),
intent(in) :: pres(KA,IA,JA)
604 real(RP) :: alpha, psatl, psati
615 alpha = ( temp(k,i,j) - atmos_saturation_llimit_temp ) &
616 / ( atmos_saturation_ulimit_temp - atmos_saturation_llimit_temp )
617 alpha = min( max( alpha, 0.0_rp ), 1.0_rp )
619 psatl = psat0 * ( temp(k,i,j) * rtem00 )**
cpovr_liq &
620 * exp(
lovr_liq * ( rtem00 - 1.0_rp/temp(k,i,j) ) )
622 psati = psat0 * ( temp(k,i,j) * rtem00 )**
cpovr_ice &
623 * exp(
lovr_ice * ( rtem00 - 1.0_rp/temp(k,i,j) ) )
625 psat = psatl * ( alpha ) &
626 + psati * ( 1.0_rp - alpha )
628 qsat(k,i,j) = epsvap * psat / ( pres(k,i,j) - ( 1.0_rp-epsvap ) * psat )
635 end subroutine atmos_saturation_pres2qsat_all_3d
639 subroutine atmos_saturation_pres2qsat_all_3d_k( &
646 integer,
intent(in) :: knum
647 real(RP),
intent(out) :: qsat(knum,IA,JA)
648 real(RP),
intent(in) :: temp(knum,IA,JA)
649 real(RP),
intent(in) :: pres(knum,IA,JA)
660 call atmos_saturation_psat_all( psat, temp(k,i,j) )
662 qsat(k,i,j) = epsvap * psat / ( pres(k,i,j) - ( 1.0_rp-epsvap ) * psat )
668 end subroutine atmos_saturation_pres2qsat_all_3d_k
672 subroutine atmos_saturation_pres2qsat_liq_0d( &
678 real(RP),
intent(out) :: qsat
679 real(RP),
intent(in) :: temp
680 real(RP),
intent(in) :: pres
685 call atmos_saturation_psat_liq( psat, temp )
687 qsat = epsvap * psat / ( pres - ( 1.0_rp-epsvap ) * psat )
690 end subroutine atmos_saturation_pres2qsat_liq_0d
694 subroutine atmos_saturation_pres2qsat_liq_1d( &
700 real(RP),
intent(out) :: qsat(KA)
701 real(RP),
intent(in) :: temp(KA)
702 real(RP),
intent(in) :: pres(KA)
709 call atmos_saturation_psat_liq( psat(:), temp(:) )
712 qsat(k) = epsvap * psat(k) / ( pres(k) - ( 1.0_rp-epsvap ) * psat(k) )
716 end subroutine atmos_saturation_pres2qsat_liq_1d
720 subroutine atmos_saturation_pres2qsat_liq_3d( &
726 real(RP),
intent(out) :: qsat(KA,IA,JA)
727 real(RP),
intent(in) :: temp(KA,IA,JA)
728 real(RP),
intent(in) :: pres(KA,IA,JA)
739 psat = psat0 * ( temp(k,i,j) * rtem00 )**
cpovr_liq &
740 * exp(
lovr_liq * ( rtem00 - 1.0_rp/temp(k,i,j) ) )
742 qsat(k,i,j) = epsvap * psat / ( pres(k,i,j) - ( 1.0_rp-epsvap ) * psat )
748 end subroutine atmos_saturation_pres2qsat_liq_3d
752 subroutine atmos_saturation_pres2qsat_ice_0d( &
758 real(RP),
intent(out) :: qsat
759 real(RP),
intent(in) :: temp
760 real(RP),
intent(in) :: pres
765 call atmos_saturation_psat_ice( psat, temp )
767 qsat = epsvap * psat / ( pres - ( 1.0_rp-epsvap ) * psat )
770 end subroutine atmos_saturation_pres2qsat_ice_0d
774 subroutine atmos_saturation_pres2qsat_ice_1d( &
780 real(RP),
intent(out) :: qsat(KA)
781 real(RP),
intent(in) :: temp(KA)
782 real(RP),
intent(in) :: pres(KA)
789 call atmos_saturation_psat_ice( psat(:), temp(:) )
792 qsat(k) = epsvap * psat(k) / ( pres(k) - ( 1.0_rp-epsvap ) * psat(k) )
796 end subroutine atmos_saturation_pres2qsat_ice_1d
800 subroutine atmos_saturation_pres2qsat_ice_3d( &
806 real(RP),
intent(out) :: qsat(KA,IA,JA)
807 real(RP),
intent(in) :: temp(KA,IA,JA)
808 real(RP),
intent(in) :: pres(KA,IA,JA)
819 psat = psat0 * ( temp(k,i,j) * rtem00 )**
cpovr_ice &
820 * exp(
lovr_ice * ( rtem00 - 1.0_rp/temp(k,i,j) ) )
822 qsat(k,i,j) = epsvap * psat / ( pres(k,i,j) - ( 1.0_rp-epsvap ) * psat )
828 end subroutine atmos_saturation_pres2qsat_ice_3d
832 subroutine atmos_saturation_dens2qsat_all_0d( &
838 real(RP),
intent(out) :: qsat
839 real(RP),
intent(in) :: temp
840 real(RP),
intent(in) :: dens
845 call atmos_saturation_psat_all( psat, temp )
847 qsat = psat / ( dens * rvap * temp )
850 end subroutine atmos_saturation_dens2qsat_all_0d
854 subroutine atmos_saturation_dens2qsat_all_1d( &
860 real(RP),
intent(out) :: qsat(KA)
861 real(RP),
intent(in) :: temp(KA)
862 real(RP),
intent(in) :: dens(KA)
869 call atmos_saturation_psat_all( psat(:), temp(:) )
872 qsat(k) = psat(k) / ( dens(k) * rvap * temp(k) )
876 end subroutine atmos_saturation_dens2qsat_all_1d
880 subroutine atmos_saturation_dens2qsat_all_3d( &
886 real(RP),
intent(out) :: qsat(KA,IA,JA)
887 real(RP),
intent(in) :: temp(KA,IA,JA)
888 real(RP),
intent(in) :: dens(KA,IA,JA)
890 real(RP) :: alpha, psatl, psati
903 alpha = ( temp(k,i,j) - atmos_saturation_llimit_temp ) &
904 / ( atmos_saturation_ulimit_temp - atmos_saturation_llimit_temp )
905 alpha = min( max( alpha, 0.0_rp ), 1.0_rp )
907 psatl = psat0 * ( temp(k,i,j) * rtem00 )**
cpovr_liq &
908 * exp(
lovr_liq * ( rtem00 - 1.0_rp/temp(k,i,j) ) )
910 psati = psat0 * ( temp(k,i,j) * rtem00 )**
cpovr_ice &
911 * exp(
lovr_ice * ( rtem00 - 1.0_rp/temp(k,i,j) ) )
913 psat = psatl * ( alpha ) &
914 + psati * ( 1.0_rp - alpha )
916 qsat(k,i,j) = psat / ( dens(k,i,j) * rvap * temp(k,i,j) )
922 end subroutine atmos_saturation_dens2qsat_all_3d
926 subroutine atmos_saturation_dens2qsat_liq_0d( &
932 real(RP),
intent(out) :: qsat
933 real(RP),
intent(in) :: temp
934 real(RP),
intent(in) :: dens
939 call atmos_saturation_psat_liq( psat, temp )
941 qsat = psat / ( dens * rvap * temp )
944 end subroutine atmos_saturation_dens2qsat_liq_0d
948 subroutine atmos_saturation_dens2qsat_liq_1d( &
954 real(RP),
intent(out) :: qsat(KA)
955 real(RP),
intent(in) :: temp(KA)
956 real(RP),
intent(in) :: dens(KA)
963 call atmos_saturation_psat_liq( psat(:), temp(:) )
966 qsat(k) = psat(k) / ( dens(k) * rvap * temp(k) )
970 end subroutine atmos_saturation_dens2qsat_liq_1d
974 subroutine atmos_saturation_dens2qsat_liq_3d( &
980 real(RP),
intent(out) :: qsat(KA,IA,JA)
981 real(RP),
intent(in) :: temp(KA,IA,JA)
982 real(RP),
intent(in) :: dens(KA,IA,JA)
994 psat = psat0 * ( temp(k,i,j) * rtem00 )**
cpovr_liq &
995 * exp(
lovr_liq * ( rtem00 - 1.0_rp/temp(k,i,j) ) )
997 qsat(k,i,j) = psat / ( dens(k,i,j) * rvap * temp(k,i,j) )
1003 end subroutine atmos_saturation_dens2qsat_liq_3d
1007 subroutine atmos_saturation_dens2qsat_ice_0d( &
1013 real(RP),
intent(out) :: qsat
1014 real(RP),
intent(in) :: temp
1015 real(RP),
intent(in) :: dens
1020 call atmos_saturation_psat_ice( psat, temp )
1022 qsat = psat / ( dens * rvap * temp )
1025 end subroutine atmos_saturation_dens2qsat_ice_0d
1029 subroutine atmos_saturation_dens2qsat_ice_1d( &
1035 real(RP),
intent(out) :: qsat(KA)
1036 real(RP),
intent(in) :: temp(KA)
1037 real(RP),
intent(in) :: dens(KA)
1039 real(RP) :: psat(KA)
1044 call atmos_saturation_psat_ice( psat(:), temp(:) )
1047 qsat(k) = psat(k) / ( dens(k) * rvap * temp(k) )
1051 end subroutine atmos_saturation_dens2qsat_ice_1d
1055 subroutine atmos_saturation_dens2qsat_ice_3d( &
1061 real(RP),
intent(out) :: qsat(KA,IA,JA)
1062 real(RP),
intent(in) :: temp(KA,IA,JA)
1063 real(RP),
intent(in) :: dens(KA,IA,JA)
1075 psat = psat0 * ( temp(k,i,j) * rtem00 )**
cpovr_ice &
1076 * exp(
lovr_ice * ( rtem00 - 1.0_rp/temp(k,i,j) ) )
1078 qsat(k,i,j) = psat / ( dens(k,i,j) * rvap * temp(k,i,j) )
1084 end subroutine atmos_saturation_dens2qsat_ice_3d
1088 subroutine atmos_saturation_dalphadt_0d( &
1093 real(RP),
intent(out) :: dalpha_dT
1094 real(RP),
intent(in) :: temp
1096 real(RP) :: lim1, lim2
1100 lim1 = 0.5_rp + sign( 0.5_rp, atmos_saturation_ulimit_temp - temp )
1102 lim2 = 0.5_rp + sign( 0.5_rp, temp - atmos_saturation_llimit_temp )
1104 dalpha_dt = dalphadt_const * lim1 * lim2
1107 end subroutine atmos_saturation_dalphadt_0d
1111 subroutine atmos_saturation_dalphadt_1d( &
1116 real(RP),
intent(out) :: dalpha_dT(KA)
1117 real(RP),
intent(in) :: temp (KA)
1119 real(RP) :: lim1, lim2
1127 lim1 = 0.5_rp + sign( 0.5_rp, atmos_saturation_ulimit_temp - temp(k) )
1129 lim2 = 0.5_rp + sign( 0.5_rp, temp(k) - atmos_saturation_llimit_temp )
1131 dalpha_dt(k) = dalphadt_const * lim1 * lim2
1136 end subroutine atmos_saturation_dalphadt_1d
1140 subroutine atmos_saturation_dalphadt_3d( &
1145 real(RP),
intent(out) :: dalpha_dT(KA,IA,JA)
1146 real(RP),
intent(in) :: temp (KA,IA,JA)
1148 real(RP) :: lim1, lim2
1159 lim1 = 0.5_rp + sign( 0.5_rp, atmos_saturation_ulimit_temp - temp(k,i,j) )
1161 lim2 = 0.5_rp + sign( 0.5_rp, temp(k,i,j) - atmos_saturation_llimit_temp )
1163 dalpha_dt(k,i,j) = dalphadt_const * lim1 * lim2
1170 end subroutine atmos_saturation_dalphadt_3d
1179 hydrometeor_lhv => atmos_hydrometeor_lhv
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)
1186 real(RP) :: lhv(
ka,
ia,
ja)
1193 call hydrometeor_lhv( lhv(:,:,:), temp(:,:,:) )
1199 tem = max( temp(k,i,j), tem_min )
1201 psat = psat0 * ( tem * rtem00 )**
cpovr_liq &
1202 * exp(
lovr_liq * ( rtem00 - 1.0_rp/tem ) )
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 )
1220 hydrometeor_lhs => atmos_hydrometeor_lhs
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)
1227 real(RP) :: lhs(
ka,
ia,
ja)
1234 call hydrometeor_lhs( lhs(:,:,:), temp(:,:,:) )
1240 tem = max( temp(k,i,j), tem_min )
1242 psat = psat0 * ( tem * rtem00 )**
cpovr_ice &
1243 * exp(
lovr_ice * ( rtem00 - 1.0_rp/tem ) )
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 )
1262 hydrometeor_lhv => atmos_hydrometeor_lhv
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)
1270 real(RP) :: lhv(
ka,
ia,
ja)
1273 real(RP) :: den1, den2
1278 call hydrometeor_lhv( lhv(:,:,:), temp(:,:,:) )
1284 tem = max( temp(k,i,j), tem_min )
1286 psat = psat0 * ( tem * rtem00 )**
cpovr_liq &
1287 * exp(
lovr_liq * ( rtem00 - 1.0_rp/tem ) )
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)
1293 dqsdpre(k,i,j) = - epsvap * psat / den1
1294 dqsdtem(k,i,j) = epsvap * psat / den2 * lhv(k,i,j) * pres(k,i,j)
1311 hydrometeor_lhs => atmos_hydrometeor_lhs
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)
1319 real(RP) :: lhs(
ka,
ia,
ja)
1322 real(RP) :: den1, den2
1327 call hydrometeor_lhs( lhs(:,:,:), temp(:,:,:) )
1333 tem = max( temp(k,i,j), tem_min )
1335 psat = psat0 * ( tem * rtem00 )**
cpovr_ice &
1336 * exp(
lovr_ice * ( rtem00 - 1.0_rp/tem ) )
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)
1342 dqsdpre(k,i,j) = - epsvap * psat / den1
1343 dqsdtem(k,i,j) = epsvap * psat / den2 * lhs(k,i,j) * pres(k,i,j)
real(rp), parameter, public const_psat0
saturate pressure of water vapor at 0C [Pa]
module ATMOSPHERE / Saturation adjustment
subroutine, public prc_mpistop
Abort MPI.
subroutine, public atmos_saturation_setup
Setup.
real(rp), parameter, public const_ci
specific heat (ice) [J/kg/K]
real(rp), public cvovr_liq
logical, public io_l
output log or not? (this process)
real(rp), public cpovr_liq
real(rp), parameter, public const_cl
specific heat (liquid water) [J/kg/K]
real(rp), public cvovr_ice
integer, public ke
end point of inner domain: z, local
real(rp), parameter, public const_tem00
temperature reference (0C) [K]
real(rp), public const_cvvap
specific heat (water vapor, constant volume) [J/kg/K]
subroutine, public atmos_saturation_dqsw_dtem_rho(dqsdtem, temp, dens)
subroutine, public atmos_saturation_dqsw_dtem_dpre(dqsdtem, dqsdpre, temp, pres)
real(rp), parameter, public const_lhs0
latent heat of sublimation at 0C [J/kg]
subroutine, public atmos_saturation_dqsi_dtem_rho(dqsdtem, temp, dens)
logical, public io_nml
output log or not? (for namelist, this process)
integer, public ia
of whole cells: x, local, with HALO
integer, public ka
of whole cells: z, local, with HALO
real(rp), parameter, public const_lhv0
latent heat of vaporizaion at 0C [J/kg]
subroutine atmos_saturation_alpha_0d(alpha, temp)
calc liquid/ice separation factor (0D)
real(rp), public const_lhs00
latent heat of sublimation at 0K [J/kg]
real(rp), public const_lhv00
latent heat of vaporizaion at 0K [J/kg]
real(rp), public const_epsvap
Rdry / Rvap.
real(rp), public lovr_ice
real(rp), parameter, public const_rvap
specific gas constant (water vapor) [J/kg/K]
subroutine, public atmos_saturation_dqsi_dtem_dpre(dqsdtem, dqsdpre, temp, pres)
integer, public ks
start point of inner domain: z, local
real(rp), public lovr_liq
integer, public io_fid_conf
Config file ID.
integer, public io_fid_log
Log file ID.
real(rp), parameter, public const_cpvap
specific heat (water vapor, constant pressure) [J/kg/K]
character(len=h_short), public const_thermodyn_type
internal energy type
integer, public io_fid_nml
Log file ID (only for output namelist)
real(rp), public cpovr_ice
integer, public ja
of whole cells: y, local, with HALO