35 public :: atmos_saturation_alpha
37 public :: atmos_saturation_psat_all
38 public :: atmos_saturation_psat_liq
39 public :: atmos_saturation_psat_ice
41 public :: atmos_saturation_psat2qsat_pres
42 public :: atmos_saturation_psat2qsat_dens
44 public :: atmos_saturation_pres2qsat_all
45 public :: atmos_saturation_pres2qsat_liq
46 public :: atmos_saturation_pres2qsat_ice
48 public :: atmos_saturation_dens2qsat_all
49 public :: atmos_saturation_dens2qsat_liq
50 public :: atmos_saturation_dens2qsat_ice
52 public :: atmos_saturation_dalphadt
54 public :: atmos_saturation_dqs_dtem_dens_liq
55 public :: atmos_saturation_dqs_dtem_dens_ice
56 public :: atmos_saturation_dqs_dtem_dpre_liq
57 public :: atmos_saturation_dqs_dtem_dpre_ice
59 public :: atmos_saturation_tdew_liq
61 public :: atmos_saturation_pote
63 public :: atmos_saturation_moist_conversion_dens_liq
64 public :: atmos_saturation_moist_conversion_dens_all
65 public :: atmos_saturation_moist_conversion_pres_liq
67 interface atmos_saturation_alpha
69 module procedure atmos_saturation_alpha_1d
70 module procedure atmos_saturation_alpha_3d
71 end interface atmos_saturation_alpha
73 interface atmos_saturation_psat_all
74 module procedure atmos_saturation_psat_all_0d
75 module procedure atmos_saturation_psat_all_1d
76 module procedure atmos_saturation_psat_all_2d
77 module procedure atmos_saturation_psat_all_3d
78 end interface atmos_saturation_psat_all
79 interface atmos_saturation_psat_liq
80 module procedure atmos_saturation_psat_liq_0d
81 module procedure atmos_saturation_psat_liq_1d
82 module procedure atmos_saturation_psat_liq_2d
83 module procedure atmos_saturation_psat_liq_3d
84 end interface atmos_saturation_psat_liq
85 interface atmos_saturation_psat_ice
86 module procedure atmos_saturation_psat_ice_0d
87 module procedure atmos_saturation_psat_ice_1d
88 module procedure atmos_saturation_psat_ice_2d
89 module procedure atmos_saturation_psat_ice_3d
90 end interface atmos_saturation_psat_ice
92 interface atmos_saturation_psat2qsat_pres
93 module procedure atmos_saturation_psat2qsat_pres_0d
94 end interface atmos_saturation_psat2qsat_pres
95 interface atmos_saturation_psat2qsat_dens
96 module procedure atmos_saturation_psat2qsat_dens_0d
97 end interface atmos_saturation_psat2qsat_dens
99 interface atmos_saturation_pres2qsat_all
100 module procedure atmos_saturation_pres2qsat_all_0d
101 module procedure atmos_saturation_pres2qsat_all_1d
102 module procedure atmos_saturation_pres2qsat_all_2d
103 module procedure atmos_saturation_pres2qsat_all_3d
104 end interface atmos_saturation_pres2qsat_all
105 interface atmos_saturation_pres2qsat_liq
106 module procedure atmos_saturation_pres2qsat_liq_0d
107 module procedure atmos_saturation_pres2qsat_liq_1d
108 module procedure atmos_saturation_pres2qsat_liq_3d
109 end interface atmos_saturation_pres2qsat_liq
110 interface atmos_saturation_pres2qsat_ice
111 module procedure atmos_saturation_pres2qsat_ice_0d
112 module procedure atmos_saturation_pres2qsat_ice_1d
113 module procedure atmos_saturation_pres2qsat_ice_3d
114 end interface atmos_saturation_pres2qsat_ice
116 interface atmos_saturation_dens2qsat_all
117 module procedure atmos_saturation_dens2qsat_all_0d
118 module procedure atmos_saturation_dens2qsat_all_1d
119 module procedure atmos_saturation_dens2qsat_all_3d
120 end interface atmos_saturation_dens2qsat_all
121 interface atmos_saturation_dens2qsat_liq
122 module procedure atmos_saturation_dens2qsat_liq_0d
123 module procedure atmos_saturation_dens2qsat_liq_1d
124 module procedure atmos_saturation_dens2qsat_liq_3d
125 end interface atmos_saturation_dens2qsat_liq
126 interface atmos_saturation_dens2qsat_ice
127 module procedure atmos_saturation_dens2qsat_ice_0d
128 module procedure atmos_saturation_dens2qsat_ice_1d
129 module procedure atmos_saturation_dens2qsat_ice_3d
130 end interface atmos_saturation_dens2qsat_ice
132 interface atmos_saturation_dalphadt
133 module procedure atmos_saturation_dalphadt_0d
134 module procedure atmos_saturation_dalphadt_1d
135 module procedure atmos_saturation_dalphadt_3d
136 end interface atmos_saturation_dalphadt
138 interface atmos_saturation_dqs_dtem_dens_liq
139 module procedure atmos_saturation_dqs_dtem_dens_liq_0d
141 end interface atmos_saturation_dqs_dtem_dens_liq
142 interface atmos_saturation_dqs_dtem_dens_ice
143 module procedure atmos_saturation_dqs_dtem_dens_ice_0d
145 end interface atmos_saturation_dqs_dtem_dens_ice
146 interface atmos_saturation_dqs_dtem_dpre_liq
147 module procedure atmos_saturation_dqs_dtem_dpre_liq_0d
149 end interface atmos_saturation_dqs_dtem_dpre_liq
150 interface atmos_saturation_dqs_dtem_dpre_ice
151 module procedure atmos_saturation_dqs_dtem_dpre_ice_0d
153 end interface atmos_saturation_dqs_dtem_dpre_ice
155 interface atmos_saturation_tdew_liq
156 module procedure atmos_saturation_tdew_liq_0d
158 module procedure atmos_saturation_tdew_liq_3d
159 end interface atmos_saturation_tdew_liq
161 interface atmos_saturation_pote
164 module procedure atmos_saturation_pote_3d
165 end interface atmos_saturation_pote
167 interface atmos_saturation_moist_conversion_dens_liq
168 module procedure atmos_saturation_moist_conversion_dens_liq_0d
169 end interface atmos_saturation_moist_conversion_dens_liq
170 interface atmos_saturation_moist_conversion_dens_all
172 end interface atmos_saturation_moist_conversion_dens_all
173 interface atmos_saturation_moist_conversion_pres_liq
175 end interface atmos_saturation_moist_conversion_pres_liq
189 real(RP),
private,
parameter :: tem_min = 10.0_rp
191 real(RP),
private :: atmos_saturation_ulimit_temp = 273.15_rp
192 real(RP),
private :: atmos_saturation_llimit_temp = 233.15_rp
194 real(RP),
private :: rtem00
195 real(RP),
private :: dalphadt_const
196 real(RP),
private :: psat_min_liq
197 real(RP),
private :: psat_min_ice
199 real(RP),
private :: cpovr_liq
200 real(RP),
private :: cpovr_ice
201 real(RP),
private :: cvovr_liq
202 real(RP),
private :: cvovr_ice
203 real(RP),
private :: lovr_liq
204 real(RP),
private :: lovr_ice
227 namelist / param_atmos_saturation / &
228 atmos_saturation_ulimit_temp, &
229 atmos_saturation_llimit_temp
235 log_info(
"ATMOS_SATURATION_setup",*)
'Setup' 239 read(
io_fid_conf,nml=param_atmos_saturation,iostat=ierr)
241 log_info(
"ATMOS_SATURATION_setup",*)
'Not found namelist. Default used.' 242 elseif( ierr > 0 )
then 243 log_error(
"ATMOS_SATURATION_setup",*)
'Not appropriate names in namelist PARAM_ATMOS_SATURATION. Check!' 246 log_nml(param_atmos_saturation)
248 rtem00 = 1.0_rp / tem00
252 cpovr_liq = ( cpvap - cl ) / rvap
253 cpovr_ice = ( cpvap - ci ) / rvap
254 cvovr_liq = ( cvvap - cl ) / rvap
255 cvovr_ice = ( cvvap - ci ) / rvap
257 lovr_liq = lhv00 / rvap
258 lovr_ice = lhs00 / rvap
267 lovr_liq = lhv0 / rvap
268 lovr_ice = lhs0 / rvap
272 dalphadt_const = 1.0_rp / ( atmos_saturation_ulimit_temp - atmos_saturation_llimit_temp )
275 log_info(
"ATMOS_SATURATION_setup",
'(1x,A,F7.2,A,F7.2)')
'Temperature range for liquid/ice mixture : ', &
276 atmos_saturation_llimit_temp,
' - ', &
277 atmos_saturation_ulimit_temp
281 call atmos_saturation_psat_liq( tem_min, psat_min_liq )
282 call atmos_saturation_psat_ice( tem_min, psat_min_ice )
294 real(RP),
intent(in) :: temp
295 real(RP),
intent(out) :: alpha
298 alpha = ( temp - atmos_saturation_llimit_temp ) &
299 / ( atmos_saturation_ulimit_temp - atmos_saturation_llimit_temp )
301 alpha = min( max( alpha, 0.0_rp ), 1.0_rp )
309 subroutine atmos_saturation_alpha_1d( &
314 integer,
intent(in) :: KA, KS, KE
316 real(RP),
intent(in) :: temp (ka)
318 real(RP),
intent(out) :: alpha(ka)
329 end subroutine atmos_saturation_alpha_1d
333 subroutine atmos_saturation_alpha_3d( &
334 KA, KS, KE, IA, IS, IE, JA, JS, JE, &
338 integer,
intent(in) :: KA, KS, KE
339 integer,
intent(in) :: IA, IS, IE
340 integer,
intent(in) :: JA, JS, JE
342 real(RP),
intent(in) :: temp (ka,ia,ja)
343 real(RP),
intent(out) :: alpha(ka,ia,ja)
360 end subroutine atmos_saturation_alpha_3d
364 subroutine atmos_saturation_psat_all_0d( &
369 real(RP),
intent(in) :: temp
370 real(RP),
intent(out) :: psat
372 real(RP) :: alpha, psatl, psati
375 call atmos_saturation_alpha ( temp, alpha )
376 call atmos_saturation_psat_liq( temp, psatl )
377 call atmos_saturation_psat_ice( temp, psati )
379 psat = psatl * ( alpha ) &
380 + psati * ( 1.0_rp - alpha )
383 end subroutine atmos_saturation_psat_all_0d
388 subroutine atmos_saturation_psat_all_1d( &
393 integer,
intent(in) :: KA, KS, KE
395 real(RP),
intent(in) :: temp(ka)
396 real(RP),
intent(out) :: psat(ka)
402 call atmos_saturation_psat_all_0d( temp(k), &
407 end subroutine atmos_saturation_psat_all_1d
411 subroutine atmos_saturation_psat_all_2d( &
417 integer,
intent(in) :: IA, IS, IE
418 integer,
intent(in) :: JA, JS, JE
420 real(RP),
intent(in) :: temp(ia,ja)
422 real(RP),
intent(out) :: psat(ia,ja)
430 call atmos_saturation_psat_all_0d( temp(i,j), &
436 end subroutine atmos_saturation_psat_all_2d
440 subroutine atmos_saturation_psat_all_3d( &
448 integer,
intent(in) :: KA, KS, KE
449 integer,
intent(in) :: IA, IS, IE
450 integer,
intent(in) :: JA, JS, JE
452 real(RP),
intent(in) :: temp(ka,ia,ja)
453 real(RP),
intent(out) :: psat(ka,ia,ja)
462 call atmos_saturation_psat_all_0d( temp(k,i,j), &
469 end subroutine atmos_saturation_psat_all_3d
473 subroutine atmos_saturation_psat_liq_0d( &
478 real(RP),
intent(in) :: temp
479 real(RP),
intent(out) :: psat
482 psat = psat0 * ( temp * rtem00 )**cpovr_liq &
483 * exp( lovr_liq * ( rtem00 - 1.0_rp/temp ) )
486 end subroutine atmos_saturation_psat_liq_0d
491 subroutine atmos_saturation_psat_liq_1d( &
496 integer,
intent(in) :: KA, KS, KE
498 real(RP),
intent(in) :: temp(ka)
499 real(RP),
intent(out) :: psat(ka)
505 call atmos_saturation_psat_liq_0d( temp(k), &
510 end subroutine atmos_saturation_psat_liq_1d
514 subroutine atmos_saturation_psat_liq_2d( &
521 integer,
intent(in) :: IA, IS, IE
522 integer,
intent(in) :: JA, JS, JE
524 real(RP),
intent(in) :: temp(ia,ja)
525 real(RP),
intent(out) :: psat(ia,ja)
533 call atmos_saturation_psat_liq_0d( temp(i,j), &
539 end subroutine atmos_saturation_psat_liq_2d
543 subroutine atmos_saturation_psat_liq_3d( &
551 integer,
intent(in) :: KA, KS, KE
552 integer,
intent(in) :: IA, IS, IE
553 integer,
intent(in) :: JA, JS, JE
555 real(RP),
intent(in) :: temp(ka,ia,ja)
556 real(RP),
intent(out) :: psat(ka,ia,ja)
565 call atmos_saturation_psat_liq_0d( temp(k,i,j), &
572 end subroutine atmos_saturation_psat_liq_3d
576 subroutine atmos_saturation_psat_ice_0d( &
581 real(RP),
intent(in) :: temp
583 real(RP),
intent(out) :: psat
586 psat = psat0 * ( temp * rtem00 )**cpovr_ice &
587 * exp( lovr_ice * ( rtem00 - 1.0_rp/temp ) )
590 end subroutine atmos_saturation_psat_ice_0d
595 subroutine atmos_saturation_psat_ice_1d( &
600 integer,
intent(in) :: KA, KS, KE
602 real(RP),
intent(in) :: temp(ka)
603 real(RP),
intent(out) :: psat(ka)
609 call atmos_saturation_psat_ice_0d( temp(k), &
614 end subroutine atmos_saturation_psat_ice_1d
618 subroutine atmos_saturation_psat_ice_2d( &
625 integer,
intent(in) :: IA, IS, IE
626 integer,
intent(in) :: JA, JS, JE
628 real(RP),
intent(in) :: temp(ia,ja)
629 real(RP),
intent(out) :: psat(ia,ja)
637 call atmos_saturation_psat_ice_0d( temp(i,j), &
643 end subroutine atmos_saturation_psat_ice_2d
647 subroutine atmos_saturation_psat_ice_3d( &
655 integer,
intent(in) :: KA, KS, KE
656 integer,
intent(in) :: IA, IS, IE
657 integer,
intent(in) :: JA, JS, JE
659 real(RP),
intent(in) :: temp(ka,ia,ja)
660 real(RP),
intent(out) :: psat(ka,ia,ja)
669 call atmos_saturation_psat_ice_0d( temp(k,i,j), &
676 end subroutine atmos_saturation_psat_ice_3d
681 subroutine atmos_saturation_psat2qsat_pres_0d( &
686 real(RP),
intent(in) :: psat
687 real(RP),
intent(in) :: pres
688 real(RP),
intent(in) :: qdry
690 real(RP),
intent(out) :: qsat
695 qsat = epsvap * qdry * psat / ( pres - psat )
698 end subroutine atmos_saturation_psat2qsat_pres_0d
701 subroutine atmos_saturation_pres2qsat_all_0d( &
706 real(RP),
intent(in) :: temp
707 real(RP),
intent(in) :: pres
708 real(RP),
intent(in) :: qdry
710 real(RP),
intent(out) :: qsat
715 call atmos_saturation_psat_all_0d( temp, psat )
716 call atmos_saturation_psat2qsat_pres_0d( psat, pres, qdry, &
720 end subroutine atmos_saturation_pres2qsat_all_0d
725 subroutine atmos_saturation_pres2qsat_all_1d( &
730 integer,
intent(in) :: KA, KS, KE
732 real(RP),
intent(in) :: temp(ka)
733 real(RP),
intent(in) :: pres(ka)
734 real(RP),
intent(in) :: qdry(ka)
736 real(RP),
intent(out) :: qsat(ka)
742 call atmos_saturation_pres2qsat_all_0d( temp(k), pres(k), qdry(k), &
747 end subroutine atmos_saturation_pres2qsat_all_1d
751 subroutine atmos_saturation_pres2qsat_all_2d( &
752 IA, IS, IE, JA, JS, JE, &
756 integer,
intent(in) :: IA, IS, IE
757 integer,
intent(in) :: JA, JS, JE
759 real(RP),
intent(in) :: temp(ia,ja)
760 real(RP),
intent(in) :: pres(ia,ja)
761 real(RP),
intent(in) :: qdry(ia,ja)
763 real(RP),
intent(out) :: qsat(ia,ja)
771 call atmos_saturation_pres2qsat_all_0d( temp(i,j), pres(i,j), qdry(i,j), &
777 end subroutine atmos_saturation_pres2qsat_all_2d
781 subroutine atmos_saturation_pres2qsat_all_3d( &
782 KA, KS, KE, IA, IS, IE, JA, JS, JE, &
786 integer,
intent(in) :: KA, KS, KE
787 integer,
intent(in) :: IA, IS, IE
788 integer,
intent(in) :: JA, JS, JE
790 real(RP),
intent(in) :: temp(ka,ia,ja)
791 real(RP),
intent(in) :: pres(ka,ia,ja)
792 real(RP),
intent(in) :: qdry(ka,ia,ja)
794 real(RP),
intent(out) :: qsat(ka,ia,ja)
803 call atmos_saturation_pres2qsat_all_0d( temp(k,i,j), pres(k,i,j), qdry(k,i,j), &
810 end subroutine atmos_saturation_pres2qsat_all_3d
814 subroutine atmos_saturation_pres2qsat_liq_0d( &
819 real(RP),
intent(in) :: temp
820 real(RP),
intent(in) :: pres
821 real(RP),
intent(in) :: qdry
823 real(RP),
intent(out) :: qsat
828 call atmos_saturation_psat_liq( temp, psat )
829 call atmos_saturation_psat2qsat_pres( psat, pres, qdry, &
833 end subroutine atmos_saturation_pres2qsat_liq_0d
838 subroutine atmos_saturation_pres2qsat_liq_1d( &
843 integer,
intent(in) :: KA, KS, KE
845 real(RP),
intent(in) :: temp(ka)
846 real(RP),
intent(in) :: pres(ka)
847 real(RP),
intent(in) :: qdry(ka)
849 real(RP),
intent(out) :: qsat(ka)
855 call atmos_saturation_pres2qsat_liq_0d( temp(k), pres(k), qdry(k), &
860 end subroutine atmos_saturation_pres2qsat_liq_1d
864 subroutine atmos_saturation_pres2qsat_liq_3d( &
865 KA, KS, KE, IA, IS, IE, JA, JS, JE, &
869 integer,
intent(in) :: KA, KS, KE
870 integer,
intent(in) :: IA, IS, IE
871 integer,
intent(in) :: JA, JS, JE
873 real(RP),
intent(in) :: temp(ka,ia,ja)
874 real(RP),
intent(in) :: pres(ka,ia,ja)
875 real(RP),
intent(in) :: qdry(ka,ia,ja)
877 real(RP),
intent(out) :: qsat(ka,ia,ja)
886 call atmos_saturation_pres2qsat_liq_0d( temp(k,i,j), pres(k,i,j), qdry(k,i,j), &
893 end subroutine atmos_saturation_pres2qsat_liq_3d
897 subroutine atmos_saturation_pres2qsat_ice_0d( &
902 real(RP),
intent(in) :: temp
903 real(RP),
intent(in) :: pres
904 real(RP),
intent(in) :: qdry
906 real(RP),
intent(out) :: qsat
911 call atmos_saturation_psat_ice( temp, psat )
912 call atmos_saturation_psat2qsat_pres( psat, pres, qdry, &
916 end subroutine atmos_saturation_pres2qsat_ice_0d
921 subroutine atmos_saturation_pres2qsat_ice_1d( &
926 integer,
intent(in) :: KA, KS, KE
928 real(RP),
intent(in) :: temp(ka)
929 real(RP),
intent(in) :: pres(ka)
930 real(RP),
intent(in) :: qdry(ka)
932 real(RP),
intent(out) :: qsat(ka)
938 call atmos_saturation_pres2qsat_ice_0d( temp(k), pres(k), qdry(k), &
943 end subroutine atmos_saturation_pres2qsat_ice_1d
947 subroutine atmos_saturation_pres2qsat_ice_3d( &
948 KA, KS, KE, IA, IS, IE, JA, JS, JE, &
952 integer,
intent(in) :: KA, KS, KE
953 integer,
intent(in) :: IA, IS, IE
954 integer,
intent(in) :: JA, JS, JE
956 real(RP),
intent(in) :: temp(ka,ia,ja)
957 real(RP),
intent(in) :: pres(ka,ia,ja)
958 real(RP),
intent(in) :: qdry(ka,ia,ja)
960 real(RP),
intent(out) :: qsat(ka,ia,ja)
969 call atmos_saturation_pres2qsat_ice_0d( temp(k,i,j), pres(k,i,j), qdry(k,i,j), &
976 end subroutine atmos_saturation_pres2qsat_ice_3d
980 subroutine atmos_saturation_psat2qsat_dens_0d( &
984 real(RP),
intent(in) :: psat
985 real(RP),
intent(in) :: temp
986 real(RP),
intent(in) :: dens
988 real(RP),
intent(out) :: qsat
990 qsat = psat / ( dens * rvap * temp )
993 end subroutine atmos_saturation_psat2qsat_dens_0d
997 subroutine atmos_saturation_dens2qsat_all_0d( &
1002 real(RP),
intent(in) :: temp
1003 real(RP),
intent(in) :: dens
1005 real(RP),
intent(out) :: qsat
1010 call atmos_saturation_psat_all( temp, psat )
1011 call atmos_saturation_psat2qsat_dens_0d( psat, temp, dens, &
1015 end subroutine atmos_saturation_dens2qsat_all_0d
1020 subroutine atmos_saturation_dens2qsat_all_1d( &
1025 integer,
intent(in) :: KA, KS, KE
1027 real(RP),
intent(in) :: temp(ka)
1028 real(RP),
intent(in) :: dens(ka)
1030 real(RP),
intent(out) :: qsat(ka)
1036 call atmos_saturation_dens2qsat_all_0d( temp(k), dens(k), &
1041 end subroutine atmos_saturation_dens2qsat_all_1d
1045 subroutine atmos_saturation_dens2qsat_all_3d( &
1053 integer,
intent(in) :: KA, KS, KE
1054 integer,
intent(in) :: IA, IS, IE
1055 integer,
intent(in) :: JA, JS, JE
1057 real(RP),
intent(in) :: temp(ka,ia,ja)
1058 real(RP),
intent(in) :: dens(ka,ia,ja)
1060 real(RP),
intent(out) :: qsat(ka,ia,ja)
1069 call atmos_saturation_dens2qsat_all_0d( temp(k,i,j), dens(k,i,j), &
1076 end subroutine atmos_saturation_dens2qsat_all_3d
1080 subroutine atmos_saturation_dens2qsat_liq_0d( &
1085 real(RP),
intent(in) :: temp
1086 real(RP),
intent(in) :: dens
1088 real(RP),
intent(out) :: qsat
1093 call atmos_saturation_psat_liq_0d( temp, psat )
1094 call atmos_saturation_psat2qsat_dens_0d( psat, temp, dens, &
1098 end subroutine atmos_saturation_dens2qsat_liq_0d
1103 subroutine atmos_saturation_dens2qsat_liq_1d( &
1108 integer,
intent(in) :: KA, KS, KE
1110 real(RP),
intent(in) :: temp(ka)
1111 real(RP),
intent(in) :: dens(ka)
1113 real(RP),
intent(out) :: qsat(ka)
1119 call atmos_saturation_dens2qsat_liq_0d( temp(k), dens(k), &
1124 end subroutine atmos_saturation_dens2qsat_liq_1d
1128 subroutine atmos_saturation_dens2qsat_liq_3d( &
1129 KA, KS, KE, IA, IS, IE, JA, JS, JE, &
1133 integer,
intent(in) :: KA, KS, KE
1134 integer,
intent(in) :: IA, IS, IE
1135 integer,
intent(in) :: JA, JS, JE
1137 real(RP),
intent(in) :: temp(ka,ia,ja)
1138 real(RP),
intent(in) :: dens(ka,ia,ja)
1140 real(RP),
intent(out) :: qsat(ka,ia,ja)
1149 call atmos_saturation_dens2qsat_liq_0d( temp(k,i,j), dens(k,i,j), &
1156 end subroutine atmos_saturation_dens2qsat_liq_3d
1160 subroutine atmos_saturation_dens2qsat_ice_0d( &
1165 real(RP),
intent(in) :: temp
1166 real(RP),
intent(in) :: dens
1168 real(RP),
intent(out) :: qsat
1173 call atmos_saturation_psat_ice( temp, psat )
1174 call atmos_saturation_psat2qsat_dens( psat, temp, dens, &
1177 end subroutine atmos_saturation_dens2qsat_ice_0d
1182 subroutine atmos_saturation_dens2qsat_ice_1d( &
1187 integer,
intent(in) :: KA, KS, KE
1189 real(RP),
intent(in) :: temp(ka)
1190 real(RP),
intent(in) :: dens(ka)
1192 real(RP),
intent(out) :: qsat(ka)
1198 call atmos_saturation_dens2qsat_ice_0d( temp(k), dens(k), &
1203 end subroutine atmos_saturation_dens2qsat_ice_1d
1207 subroutine atmos_saturation_dens2qsat_ice_3d( &
1208 KA, KS, KE, IA, IS, IE, JA, JS, JE, &
1212 integer,
intent(in) :: KA, KS, KE
1213 integer,
intent(in) :: IA, IS, IE
1214 integer,
intent(in) :: JA, JS, JE
1216 real(RP),
intent(in) :: temp(ka,ia,ja)
1217 real(RP),
intent(in) :: dens(ka,ia,ja)
1219 real(RP),
intent(out) :: qsat(ka,ia,ja)
1228 call atmos_saturation_dens2qsat_ice_0d( temp(k,i,j), dens(k,i,j), &
1235 end subroutine atmos_saturation_dens2qsat_ice_3d
1239 subroutine atmos_saturation_dalphadt_0d( &
1243 real(RP),
intent(in) :: temp
1245 real(RP),
intent(out) :: dalpha_dT
1247 real(RP) :: lim1, lim2
1251 lim1 = 0.5_rp + sign( 0.5_rp, atmos_saturation_ulimit_temp - temp )
1253 lim2 = 0.5_rp + sign( 0.5_rp, temp - atmos_saturation_llimit_temp )
1255 dalpha_dt = dalphadt_const * lim1 * lim2
1258 end subroutine atmos_saturation_dalphadt_0d
1263 subroutine atmos_saturation_dalphadt_1d( &
1268 integer,
intent(in) :: KA, KS, KE
1270 real(RP),
intent(in) :: temp (ka)
1272 real(RP),
intent(out) :: dalpha_dT(ka)
1278 call atmos_saturation_dalphadt_0d( temp(k), dalpha_dt(k) )
1282 end subroutine atmos_saturation_dalphadt_1d
1286 subroutine atmos_saturation_dalphadt_3d( &
1287 KA, KS, KE, IA, IS, IE, JA, JS, JE, &
1291 integer,
intent(in) :: KA, KS, KE
1292 integer,
intent(in) :: IA, IS, IE
1293 integer,
intent(in) :: JA, JS, JE
1295 real(RP),
intent(in) :: temp (ka,ia,ja)
1297 real(RP),
intent(out) :: dalpha_dT(ka,ia,ja)
1306 call atmos_saturation_dalphadt_0d( temp(k,i,j), dalpha_dt(k,i,j) )
1312 end subroutine atmos_saturation_dalphadt_3d
1316 subroutine atmos_saturation_dqs_dtem_dens_liq_0d( &
1320 hydrometeor_lhv => atmos_hydrometeor_lhv
1323 real(RP),
intent(in) :: temp
1324 real(RP),
intent(in) :: dens
1326 real(RP),
intent(out) :: dqsdtem
1327 real(RP),
intent(out),
optional :: qsat
1333 call hydrometeor_lhv( temp, lhv )
1334 call atmos_saturation_psat_liq( temp, psat )
1336 dqsdtem = psat / ( dens* rvap * temp**2 ) &
1337 * ( lhv / ( rvap * temp ) - 1.0_rp )
1339 if (
present(qsat) ) &
1340 call atmos_saturation_psat2qsat_dens( psat, temp, dens, &
1344 end subroutine atmos_saturation_dqs_dtem_dens_liq_0d
1349 KA, KS, KE, IA, IS, IE, JA, JS, JE, &
1353 integer,
intent(in) :: KA, KS, KE
1354 integer,
intent(in) :: IA, IS, IE
1355 integer,
intent(in) :: JA, JS, JE
1357 real(RP),
intent(in) :: temp (ka,ia,ja)
1358 real(RP),
intent(in) :: dens (ka,ia,ja)
1360 real(RP),
intent(out) :: dqsdtem(ka,ia,ja)
1369 call atmos_saturation_dqs_dtem_dens_liq_0d( temp(k,i,j), dens(k,i,j), &
1380 subroutine atmos_saturation_dqs_dtem_dens_ice_0d( &
1384 hydrometeor_lhs => atmos_hydrometeor_lhs
1387 real(RP),
intent(in) :: temp
1388 real(RP),
intent(in) :: dens
1390 real(RP),
intent(out) :: dqsdtem
1391 real(RP),
intent(out),
optional :: qsat
1398 call hydrometeor_lhs( temp, lhs )
1399 call atmos_saturation_psat_ice( temp, psat )
1401 dqsdtem = psat / ( dens * rvap * temp**2 ) &
1402 * ( lhs / ( rvap * temp ) - 1.0_rp )
1404 if (
present(qsat) ) &
1405 call atmos_saturation_psat2qsat_dens( psat, temp, dens, &
1409 end subroutine atmos_saturation_dqs_dtem_dens_ice_0d
1414 KA, KS, KE, IA, IS, IE, JA, JS, JE, &
1418 integer,
intent(in) :: KA, KS, KE
1419 integer,
intent(in) :: IA, IS, IE
1420 integer,
intent(in) :: JA, JS, JE
1422 real(RP),
intent(in) :: temp (ka,ia,ja)
1423 real(RP),
intent(in) :: dens (ka,ia,ja)
1425 real(RP),
intent(out) :: dqsdtem(ka,ia,ja)
1434 call atmos_saturation_dqs_dtem_dens_ice_0d( temp(k,i,j), dens(k,i,j), &
1445 subroutine atmos_saturation_dqs_dtem_dens_all_0d( &
1448 qsat, qsat_liq, qsat_ice, &
1452 real(RP),
intent(in) :: temp
1453 real(RP),
intent(in) :: dens
1455 real(RP),
intent(out) :: dqsat_dT
1457 real(RP),
intent(out),
optional :: qsat
1458 real(RP),
intent(out),
optional :: qsat_liq
1459 real(RP),
intent(out),
optional :: qsat_ice
1460 real(RP),
intent(out),
optional :: alpha
1462 real(RP) :: qsat_liq_, qsat_ice_, alpha_
1463 real(RP) :: dqsat_dT_liq, dqsat_dT_ice, dalpha_dT
1467 call atmos_saturation_dqs_dtem_dens_liq_0d( temp, dens, &
1468 dqsat_dt_liq, qsat_liq_ )
1469 call atmos_saturation_dqs_dtem_dens_ice_0d( temp, dens, &
1470 dqsat_dt_ice, qsat_ice_ )
1471 call atmos_saturation_alpha ( temp, alpha_ )
1472 call atmos_saturation_dalphadt( temp, dalpha_dt )
1474 dqsat_dt = qsat_liq_ * dalpha_dt + dqsat_dt_liq * ( alpha_ ) &
1475 - qsat_ice_ * dalpha_dt + dqsat_dt_ice * ( 1.0_rp-alpha_ )
1477 if (
present(qsat) ) qsat = qsat_liq_ * alpha_ + qsat_ice_ * ( 1.0_rp-alpha_ )
1478 if (
present(qsat_liq) ) qsat_liq = qsat_liq_
1479 if (
present(qsat_ice) ) qsat_ice = qsat_ice_
1480 if (
present(alpha ) ) alpha = alpha_
1483 end subroutine atmos_saturation_dqs_dtem_dens_all_0d
1487 subroutine atmos_saturation_dqs_dtem_dpre_liq_0d( &
1489 dqsat_dT, dqsat_dP, &
1492 hydrometeor_lhv => atmos_hydrometeor_lhv
1495 real(RP),
intent(in) :: temp
1496 real(RP),
intent(in) :: pres
1497 real(RP),
intent(in) :: qdry
1499 real(RP),
intent(out) :: dqsat_dT
1500 real(RP),
intent(out) :: dqsat_dP
1502 real(RP),
intent(out),
optional :: qsat
1503 real(RP),
intent(out),
optional :: psat
1507 real(RP) :: den1, den2
1511 call hydrometeor_lhv( temp, lhv )
1512 call atmos_saturation_psat_liq( temp, psat_ )
1514 den1 = ( pres - (1.0_rp-epsvap) * psat_ )**2
1515 den2 = den1 * rvap * temp**2
1517 dqsat_dp = - epsvap * psat_ / den1
1518 dqsat_dt = epsvap * psat_ / den2 * lhv * pres
1520 if (
present(qsat) ) &
1521 call atmos_saturation_psat2qsat_pres( psat_, pres, qdry, &
1523 if (
present(psat) ) psat = psat_
1526 end subroutine atmos_saturation_dqs_dtem_dpre_liq_0d
1531 KA, KS, KE, IA, IS, IE, JA, JS, JE, &
1533 dqsat_dT, dqsat_dP )
1535 integer,
intent(in) :: KA, KS, KE
1536 integer,
intent(in) :: IA, IS, IE
1537 integer,
intent(in) :: JA, JS, JE
1539 real(RP),
intent(in) :: temp (ka,ia,ja)
1540 real(RP),
intent(in) :: pres (ka,ia,ja)
1541 real(RP),
intent(in) :: qdry (ka,ia,ja)
1543 real(RP),
intent(out) :: dqsat_dT(ka,ia,ja)
1544 real(RP),
intent(out) :: dqsat_dP(ka,ia,ja)
1553 call atmos_saturation_dqs_dtem_dpre_liq_0d( temp(k,i,j), pres(k,i,j), qdry(k,i,j), &
1554 dqsat_dt(k,i,j), dqsat_dp(k,i,j) )
1565 subroutine atmos_saturation_dqs_dtem_dpre_ice_0d( &
1567 dqsat_dT, dqsat_dP, &
1570 hydrometeor_lhs => atmos_hydrometeor_lhs
1573 real(RP),
intent(in) :: temp
1574 real(RP),
intent(in) :: pres
1575 real(RP),
intent(in) :: qdry
1577 real(RP),
intent(out) :: dqsat_dT
1578 real(RP),
intent(out) :: dqsat_dP
1580 real(RP),
intent(out),
optional :: qsat
1584 real(RP) :: den1, den2
1588 call hydrometeor_lhs( temp, lhs )
1589 call atmos_saturation_psat_ice( temp, psat )
1591 den1 = ( pres - (1.0_rp-epsvap) * psat )**2
1592 den2 = den1 * rvap * temp**2
1594 dqsat_dp = - epsvap * psat / den1
1595 dqsat_dt = epsvap * psat / den2 * lhs * pres
1597 if (
present(qsat) ) &
1598 call atmos_saturation_psat2qsat_pres( psat, pres, qdry, &
1601 end subroutine atmos_saturation_dqs_dtem_dpre_ice_0d
1607 KA, KS, KE, IA, IS, IE, JA, JS, JE, &
1609 dqsat_dT, dqsat_dP )
1611 integer,
intent(in) :: KA, KS, KE
1612 integer,
intent(in) :: IA, IS, IE
1613 integer,
intent(in) :: JA, JS, JE
1615 real(RP),
intent(in) :: temp (ka,ia,ja)
1616 real(RP),
intent(in) :: pres (ka,ia,ja)
1617 real(RP),
intent(in) :: qdry (ka,ia,ja)
1619 real(RP),
intent(out) :: dqsat_dT(ka,ia,ja)
1620 real(RP),
intent(out) :: dqsat_dP(ka,ia,ja)
1629 call atmos_saturation_dqs_dtem_dpre_ice( temp(k,i,j), pres(k,i,j), qdry(k,i,j), &
1630 dqsat_dt(k,i,j), dqsat_dp(k,i,j) )
1641 subroutine atmos_saturation_dqs_dtem_dpre_all_0d( &
1643 dqsat_dT, dqsat_dP, &
1644 qsat, qsat_liq, qsat_ice, &
1648 real(RP),
intent(in) :: temp
1649 real(RP),
intent(in) :: pres
1650 real(RP),
intent(in) :: qdry
1652 real(RP),
intent(out) :: dqsat_dT
1653 real(RP),
intent(out) :: dqsat_dP
1655 real(RP),
intent(out),
optional :: qsat
1656 real(RP),
intent(out),
optional :: qsat_liq
1657 real(RP),
intent(out),
optional :: qsat_ice
1658 real(RP),
intent(out),
optional :: alpha
1660 real(RP) :: qsat_liq_, qsat_ice_, alpha_
1661 real(RP) :: dqsat_dT_liq, dqsat_dT_ice
1662 real(RP) :: dqsat_dP_liq, dqsat_dP_ice
1663 real(RP) :: dalpha_dT
1667 call atmos_saturation_dqs_dtem_dpre_liq_0d( temp, pres, qdry, &
1668 dqsat_dt_liq, dqsat_dp_liq, &
1670 call atmos_saturation_dqs_dtem_dpre_ice_0d( temp, pres, qdry, &
1671 dqsat_dt_ice, dqsat_dp_ice, &
1673 call atmos_saturation_alpha ( temp, alpha_ )
1674 call atmos_saturation_dalphadt( temp, dalpha_dt )
1676 dqsat_dt = qsat_liq_ * dalpha_dt + dqsat_dt_liq * ( alpha_ ) &
1677 - qsat_ice_ * dalpha_dt + dqsat_dt_ice * ( 1.0_rp-alpha_ )
1678 dqsat_dp = dqsat_dp_liq * ( alpha_ ) &
1679 + dqsat_dp_ice * ( 1.0_rp-alpha_ )
1681 if (
present(qsat) ) qsat = qsat_liq * alpha_ + qsat_ice * ( 1.0_rp-alpha_ )
1682 if (
present(qsat_liq) ) qsat_liq = qsat_liq_
1683 if (
present(qsat_ice) ) qsat_ice = qsat_ice_
1684 if (
present(alpha ) ) alpha = alpha_
1687 end subroutine atmos_saturation_dqs_dtem_dpre_all_0d
1692 subroutine atmos_saturation_tdew_liq_0d( &
1699 atmos_hydrometeor_lhv
1700 real(RP),
intent(in) :: DENS
1701 real(RP),
intent(in) :: TEMP
1702 real(RP),
intent(in) :: QV
1704 real(RP),
intent(out) :: Tdew
1705 logical,
intent(out) :: converged
1707 real(RP),
parameter :: A = 17.625_rp
1708 real(RP),
parameter :: B = 243.04_rp
1709 real(RP),
parameter :: C = 610.94_rp
1710 integer,
parameter :: itelim = 100
1711 real(RP),
parameter :: criteria = 0.1_rp**(2+
rp/2)
1714 real(RP) :: pvap, psat
1715 real(RP) :: dpsat_dT
1721 pvap = dens * qv * rvap * temp
1723 if ( pvap < psat_min_liq )
then 1731 tdew = b * log( pvap / c ) / ( a - log( pvap / c ) ) + tem00
1735 call atmos_saturation_psat_liq( tdew, psat )
1736 call atmos_hydrometeor_lhv( tdew, lhv )
1738 dpsat_dt = psat * lhv / ( rvap * tdew**2 )
1739 dtdew = ( psat - pvap ) / dpsat_dt
1740 if ( dtdew < criteria )
then 1747 if( .not. converged )
then 1748 log_warn(
"ATMOS_SATURATION_tdew_liq_0D",*) dens, temp, qv, pvap, tdew, dtdew, dpsat_dt
1752 end subroutine atmos_saturation_tdew_liq_0d
1760 integer,
intent(in) :: KA, KS, KE
1762 real(RP),
intent(in) :: DENS(ka)
1763 real(RP),
intent(in) :: TEMP(ka)
1764 real(RP),
intent(in) :: QV (ka)
1766 real(RP),
intent(out) :: Tdew(ka)
1767 logical,
intent(out) :: converged
1773 call atmos_saturation_tdew_liq_0d( dens(k), temp(k), qv(k), &
1774 tdew(k), converged )
1775 if ( .not. converged )
exit 1780 subroutine atmos_saturation_tdew_liq_3d( &
1781 KA, KS, KE, IA, IS, IE, JA, JS, JE, &
1786 integer,
intent(in) :: KA, KS, KE
1787 integer,
intent(in) :: IA, IS, IE
1788 integer,
intent(in) :: JA, JS, JE
1790 real(RP),
intent(in) :: DENS(ka,ia,ja)
1791 real(RP),
intent(in) :: TEMP(ka,ia,ja)
1792 real(RP),
intent(in) :: QV (ka,ia,ja)
1794 real(RP),
intent(out) :: Tdew(ka,ia,ja)
1796 logical :: converged, error
1806 call atmos_saturation_tdew_liq_0d( dens(k,i,j), temp(k,i,j), qv(k,i,j), &
1807 tdew(k,i,j), converged )
1808 if ( .not. converged )
then 1809 log_error(
"ATMOS_SATURATION_tdew_liq_3D",*)
'not converged! ', k,i,j
1819 end subroutine atmos_saturation_tdew_liq_3d
1830 DENS, POTT, TEMP, QV, &
1836 atmos_hydrometeor_lhv
1837 real(RP),
intent(in) :: DENS
1838 real(RP),
intent(in) :: POTT
1839 real(RP),
intent(in) :: TEMP
1840 real(RP),
intent(in) :: QV
1842 real(RP),
intent(out) :: POTE
1848 pv = dens * qv * rvap * temp
1849 tl = 55.0_rp + 2840.0_rp / ( cpdry / rdry * log(temp) - log(pv) - 4.805_rp )
1850 call atmos_hydrometeor_lhv( temp, lhv )
1852 pote = pott * exp( lhv * qv / ( cpdry * temp ) &
1853 * 1.0784_rp * ( 1.0_rp + 0.810_rp * qv ) )
1861 DENS, POTT, TEMP, QV, &
1863 integer,
intent(in) :: KA, KS, KE
1865 real(RP),
intent(in) :: DENS(ka)
1866 real(RP),
intent(in) :: POTT(ka)
1867 real(RP),
intent(in) :: TEMP(ka)
1868 real(RP),
intent(in) :: QV (ka)
1870 real(RP),
intent(out) :: POTE(ka)
1882 subroutine atmos_saturation_pote_3d( &
1883 KA, KS, KE, IA, IS, IE, JA, JS, JE, &
1884 DENS, POTT, TEMP, QV, &
1886 integer,
intent(in) :: KA, KS, KE
1887 integer,
intent(in) :: IA, IS, IE
1888 integer,
intent(in) :: JA, JS, JE
1890 real(RP),
intent(in) :: DENS(ka,ia,ja)
1891 real(RP),
intent(in) :: POTT(ka,ia,ja)
1892 real(RP),
intent(in) :: TEMP(ka,ia,ja)
1893 real(RP),
intent(in) :: QV (ka,ia,ja)
1895 real(RP),
intent(out) :: POTE(ka,ia,ja)
1904 dens(k,i,j), pott(k,i,j), temp(k,i,j), qv(k,i,j), &
1911 end subroutine atmos_saturation_pote_3d
1917 subroutine atmos_saturation_moist_conversion_dens_liq_0d( &
1919 TEMP, QV, QC, CPtot, CVtot, &
1931 real(RP),
intent(in) :: DENS
1932 real(RP),
intent(in) :: Emoist0
1934 real(RP),
intent(inout) :: TEMP
1935 real(RP),
intent(inout) :: QV
1936 real(RP),
intent(inout) :: QC
1937 real(RP),
intent(inout) :: CPtot
1938 real(RP),
intent(inout) :: CVtot
1940 logical,
intent(out) :: converged
1949 real(RP) :: dqsatl_dT
1951 real(RP) :: dCVtot_dT
1952 real(RP) :: dEmoist_dT
1955 integer,
parameter :: itelim = 100
1956 real(RP),
parameter :: dtemp_criteria = 0.1_rp**(2+
rp/2)
1962 call atmos_saturation_dens2qsat_liq( temp, dens, &
1965 if ( qsum <= qsat )
then 1970 temp = ( emoist0 -
lhv * qv ) / cvtot
1981 call atmos_saturation_dqs_dtem_dens_liq_0d( temp, dens, &
1984 dqc_dt = - dqsatl_dt
1989 demoist_dt = temp * dcvtot_dt + cvtot + dqsatl_dt *
lhv 1994 emoist = temp * cvtot + qsat *
lhv 1998 dtemp = ( emoist - emoist0 ) / demoist_dt
2001 if ( abs(dtemp) < dtemp_criteria )
then 2006 if( temp*0.0_rp /= 0.0_rp )
exit 2014 end subroutine atmos_saturation_moist_conversion_dens_liq_0d
2022 TEMP, QV, QC, QI, CPtot, CVtot, &
2037 real(RP),
intent(in) :: DENS
2038 real(RP),
intent(in) :: Emoist0
2040 real(RP),
intent(inout) :: TEMP
2041 real(RP),
intent(inout) :: QV
2042 real(RP),
intent(inout) :: QC
2043 real(RP),
intent(inout) :: QI
2044 real(RP),
intent(inout) :: CPtot
2045 real(RP),
intent(inout) :: CVtot
2047 logical,
intent(out) :: converged
2052 real(RP) :: QV0, QC0, QI0
2059 real(RP) :: dalpha_dT
2060 real(RP) :: dqsat_dT
2061 real(RP) :: dqc_dT, dqi_dT
2062 real(RP) :: dCVtot_dT
2063 real(RP) :: dEmoist_dT
2066 integer,
parameter :: itelim = 100
2067 real(RP),
parameter :: dtemp_criteria = 0.1_rp**(2+
rp/2)
2078 call atmos_saturation_dens2qsat_all( temp, dens, &
2081 if ( qsum <= qsat )
then 2087 temp = ( emoist0 -
lhv * qv ) / cvtot
2096 call atmos_saturation_dqs_dtem_dens_all_0d( temp, dens, &
2098 qsat=qsat, alpha=alpha )
2099 call atmos_saturation_dalphadt( temp, dalpha_dt )
2101 dqc_dt = ( qsum - qv ) * dalpha_dt - dqsat_dt * ( alpha )
2102 dqi_dt = -( qsum - qv ) * dalpha_dt - dqsat_dt * ( 1.0_rp-alpha )
2108 demoist_dt = temp * dcvtot_dt + cvtot + dqsat_dt *
lhv - dqi_dt *
lhf 2112 qc = ( qsum - qsat ) * ( alpha )
2113 qi = ( qsum - qsat ) * ( 1.0_rp - alpha )
2120 emoist = temp * cvtot + qv *
lhv - qi *
lhf 2123 dtemp = ( emoist - emoist0 ) / demoist_dt
2126 if ( abs(dtemp) < dtemp_criteria )
then 2131 if( temp*0.0_rp /= 0.0_rp )
exit 2155 atmos_hydrometeor_entr, &
2156 atmos_hydrometeor_entr2temp, &
2160 real(RP),
intent(in) :: PRES
2161 real(RP),
intent(in) :: ENTR
2162 real(RP),
intent(in) :: Qdry
2164 real(RP),
intent(inout) :: QV
2165 real(RP),
intent(inout) :: QC
2166 real(RP),
intent(inout) :: CPtot
2167 real(RP),
intent(inout) :: Rtot
2169 real(RP),
intent(out) :: TEMP
2170 logical,
intent(out) :: converged
2172 real(RP),
parameter :: TEMMIN = 0.1_rp
2173 real(RP),
parameter :: criteria = 1.e-8_rp
2174 integer,
parameter :: itelim = 100
2178 real(RP) :: qsat, psat
2180 real(RP) :: TEMP_ite
2182 real(RP) :: ENTR_ite
2183 real(RP) :: Rtot_ite
2184 real(RP) :: CPtot_ite
2186 real(RP) :: dqsat_dT, dqsat_dP
2188 real(RP) :: TEMP_prev
2189 real(RP) :: dENTR_dT
2195 rtot = rtot + qc * rvap
2200 call atmos_hydrometeor_entr2temp( entr, pres, qsum, 0.0_rp, qdry, &
2204 call atmos_saturation_pres2qsat_liq( temp, pres, qdry, &
2206 if ( qsum <= qsat )
then 2220 call atmos_saturation_dqs_dtem_dpre_liq_0d( temp_ite, pres, qdry, &
2221 dqsat_dt, dqsat_dp, &
2222 qsat=qsat, psat=psat )
2224 qv_ite = min( qsum, qsat )
2226 rtot_ite = rtot - ( qsum - qv_ite ) * rvap
2229 dentr_dt = cptot_ite / temp_ite &
2231 - rvap * log( psat/ psat0 ) &
2235 call atmos_hydrometeor_entr( temp_ite, pres, &
2236 qv_ite, 0.0_rp, qdry, &
2237 rtot_ite, cptot_ite, &
2240 temp_prev = temp_ite
2241 temp_ite = temp_ite - ( entr_ite - entr ) / max( dentr_dt, eps )
2242 temp_ite = max( temp_ite, temmin )
2244 if( abs(temp_ite-temp_prev) < criteria )
then real(rp), parameter, public const_psat0
saturate pressure of water vapor at 0C [Pa]
real(rp), public const_cpdry
specific heat (dry air,constant pressure) [J/kg/K]
module atmosphere / saturation
subroutine, public atmos_saturation_setup
Setup.
real(rp), public cv_ice
CV for ice [J/kg/K].
real(rp), parameter, public const_ci
specific heat (ice) [J/kg/K]
real(rp), public cp_ice
CP for ice [J/kg/K].
subroutine atmos_saturation_dqs_dtem_dens_ice_3d(KA, KS, KE, IA, IS, IE, JA, JS, JE, temp, dens, dqsdtem)
real(rp), parameter, public const_cl
specific heat (liquid water) [J/kg/K]
subroutine atmos_saturation_pote_1d(KA, KS, KE, DENS, POTT, TEMP, QV, POTE)
subroutine atmos_saturation_pote_0d(DENS, POTT, TEMP, QV, POTE)
calculate equivalent potential temperature Bolton, D., 1980: The computation of equivalent potential ...
real(rp), parameter, public const_tem00
temperature reference (0C) [K]
subroutine atmos_saturation_alpha_0d(temp, alpha)
calc liquid/ice separation factor (0D)
integer, public io_fid_conf
Config file ID.
real(rp), public const_cvvap
specific heat (water vapor, constant volume) [J/kg/K]
subroutine atmos_saturation_dqs_dtem_dpre_ice_3d(KA, KS, KE, IA, IS, IE, JA, JS, JE, temp, pres, qdry, dqsat_dT, dqsat_dP)
real(rp), public const_rdry
specific gas constant (dry air) [J/kg/K]
real(rp), public const_undef
subroutine atmos_saturation_dqs_dtem_dens_liq_3d(KA, KS, KE, IA, IS, IE, JA, JS, JE, temp, dens, dqsdtem)
real(rp), parameter, public const_lhs0
latent heat of sublimation at 0C [J/kg]
real(rp), public cv_vapor
CV for vapor [J/kg/K].
module atmosphere / hydrometeor
real(rp), parameter, public const_lhv0
latent heat of vaporizaion at 0C [J/kg]
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 lhf
latent heat of fusion for use [J/kg]
real(rp), parameter, public const_rvap
specific gas constant (water vapor) [J/kg/K]
subroutine, public prc_abort
Abort Process.
real(rp), public lhv
latent heat of vaporization for use [J/kg]
subroutine atmos_saturation_moist_conversion_pres_liq_0d(PRES, Entr, Qdry, QV, QC, Rtot, CPtot, TEMP, converged)
Iterative moist conversion for liquid water at constant pressure.
subroutine atmos_saturation_dqs_dtem_dpre_liq_3d(KA, KS, KE, IA, IS, IE, JA, JS, JE, temp, pres, qdry, dqsat_dT, dqsat_dP)
real(rp), public const_eps
small number
subroutine, public atmos_hydrometeor_setup
Setup.
subroutine atmos_saturation_moist_conversion_dens_all_0d(DENS, Emoist0, TEMP, QV, QC, QI, CPtot, CVtot, converged)
Iterative moist conversion (liquid/ice mixture) at constant density (volume)
subroutine atmos_saturation_tdew_liq_1d(KA, KS, KE, DENS, TEMP, QV, Tdew, converged)
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
real(rp), public cp_vapor
CP for vapor [J/kg/K].
integer, parameter, public rp
real(rp), public cp_water
CP for water [J/kg/K].
real(rp), public cv_water
CV for water [J/kg/K].