17 #include "macro_thermodyn.h" 18 #include "inc_openmp.h" 55 public :: atmos_thermodyn_qd
56 public :: atmos_thermodyn_cv
57 public :: atmos_thermodyn_cp
58 public :: atmos_thermodyn_pott
59 public :: atmos_thermodyn_rhoe
60 public :: atmos_thermodyn_rhot
61 public :: atmos_thermodyn_temp_pres
62 public :: atmos_thermodyn_temp_pres_e
63 public :: atmos_thermodyn_templhv
64 public :: atmos_thermodyn_templhs
65 public :: atmos_thermodyn_templhf
66 public :: atmos_thermodyn_entr
68 interface atmos_thermodyn_qd
70 module procedure atmos_thermodyn_qd_3d
71 end interface atmos_thermodyn_qd
73 interface atmos_thermodyn_cp
74 module procedure atmos_thermodyn_cp_0d
75 module procedure atmos_thermodyn_cp_3d
76 end interface atmos_thermodyn_cp
78 interface atmos_thermodyn_cv
79 module procedure atmos_thermodyn_cv_0d
80 module procedure atmos_thermodyn_cv_3d
81 end interface atmos_thermodyn_cv
83 interface atmos_thermodyn_rhoe
84 module procedure atmos_thermodyn_rhoe_0d
85 module procedure atmos_thermodyn_rhoe_3d
86 end interface atmos_thermodyn_rhoe
88 interface atmos_thermodyn_rhot
89 module procedure atmos_thermodyn_rhot_0d
90 module procedure atmos_thermodyn_rhot_3d
91 end interface atmos_thermodyn_rhot
93 interface atmos_thermodyn_pott
94 module procedure atmos_thermodyn_pott_0d
95 module procedure atmos_thermodyn_pott_1d
96 module procedure atmos_thermodyn_pott_3d
97 end interface atmos_thermodyn_pott
99 interface atmos_thermodyn_temp_pres
100 module procedure atmos_thermodyn_temp_pres_0d
101 module procedure atmos_thermodyn_temp_pres_3d
102 end interface atmos_thermodyn_temp_pres
104 interface atmos_thermodyn_temp_pres_e
105 module procedure atmos_thermodyn_temp_pres_e_0d
106 module procedure atmos_thermodyn_temp_pres_e_3d
107 end interface atmos_thermodyn_temp_pres_e
109 interface atmos_thermodyn_templhv
110 module procedure atmos_thermodyn_templhv_0d
111 module procedure atmos_thermodyn_templhv_2d
112 module procedure atmos_thermodyn_templhv_3d
113 end interface atmos_thermodyn_templhv
115 interface atmos_thermodyn_templhs
116 module procedure atmos_thermodyn_templhs_0d
117 module procedure atmos_thermodyn_templhs_2d
118 module procedure atmos_thermodyn_templhs_3d
119 end interface atmos_thermodyn_templhs
121 interface atmos_thermodyn_templhf
122 module procedure atmos_thermodyn_templhf_0d
123 module procedure atmos_thermodyn_templhf_2d
124 module procedure atmos_thermodyn_templhf_3d
125 end interface atmos_thermodyn_templhf
127 interface atmos_thermodyn_entr
128 module procedure atmos_thermodyn_entr_0d
129 module procedure atmos_thermodyn_entr_2d
130 module procedure atmos_thermodyn_entr_3d
131 end interface atmos_thermodyn_entr
142 real(RP),
public,
allocatable ::
aq_cp(:)
143 real(RP),
public,
allocatable ::
aq_cv(:)
173 if(
io_l )
write(
io_fid_log,*)
'++++++ Module[THERMODYN] / Categ[ATMOS SHARE] / Origin[SCALElib]' 178 if ( thermodyn_type ==
'EXACT' )
then 197 elseif( thermodyn_type ==
'SIMPLE' )
then 228 real(RP),
intent(out) :: qdry
229 real(RP),
intent(in) :: q(
qa)
246 subroutine atmos_thermodyn_qd_3d( &
251 real(RP),
intent(out) :: qdry(
ka,
ia,
ja)
252 real(RP),
intent(in) :: q (
ka,
ia,
ja,
qa)
254 integer :: k, i, j, iqw
266 calc_qdry( qdry(k,i,j), q, k, i, j, iqw )
273 end subroutine atmos_thermodyn_qd_3d
277 subroutine atmos_thermodyn_cp_0d( &
283 real(RP),
intent(out) :: CPtot
284 real(RP),
intent(in) :: q(
qa)
285 real(RP),
intent(in) :: qdry
293 cptot = cptot + q(iqw) *
aq_cp(iqw)
298 end subroutine atmos_thermodyn_cp_0d
302 subroutine atmos_thermodyn_cp_3d( &
308 real(RP),
intent(out) :: CPtot(
ka,
ia,
ja)
309 real(RP),
intent(in) :: q (
ka,
ia,
ja,
qa)
310 real(RP),
intent(in) :: qdry (
ka,
ia,
ja)
312 integer :: k, i, j, iqw
325 calc_cp(cptot(k,i,j), qdry(k,i,j), q, k, i, j, iqw, cpdry,
aq_cp)
332 end subroutine atmos_thermodyn_cp_3d
336 subroutine atmos_thermodyn_cv_0d( &
342 real(RP),
intent(out) :: CVtot
343 real(RP),
intent(in) :: q(
qa)
344 real(RP),
intent(in) :: qdry
352 cvtot = cvtot + q(iqw) *
aq_cv(iqw)
357 end subroutine atmos_thermodyn_cv_0d
361 subroutine atmos_thermodyn_cv_3d( &
367 real(RP),
intent(out) :: CVtot(
ka,
ia,
ja)
368 real(RP),
intent(in) :: q (
ka,
ia,
ja,
qa)
369 real(RP),
intent(in) :: qdry (
ka,
ia,
ja)
371 integer :: k, i, j, iqw
384 calc_cv(cvtot(k,i,j), qdry(k,i,j), q, k, i, j, iqw, cvdry,
aq_cv)
391 end subroutine atmos_thermodyn_cv_3d
394 subroutine atmos_thermodyn_pott_0d( &
401 real(RP),
intent(out) :: pott
402 real(RP),
intent(in) :: temp
403 real(RP),
intent(in) :: pres
404 real(RP),
intent(in) :: q(
qa)
407 real(RP) :: Rtot, CVtot, RovCP
420 cvtot = cvtot + q(iqw) *
aq_cv(iqw)
422 cvtot = cvdry * qdry + cvtot
423 rtot = rdry * qdry + rvap * q(
i_qv)
426 rovcp = rtot / ( cvtot + rtot )
428 pott = temp * ( pre00 / pres )**rovcp
431 end subroutine atmos_thermodyn_pott_0d
434 subroutine atmos_thermodyn_pott_1d( &
441 real(RP),
intent(out) :: pott(
ka)
442 real(RP),
intent(in) :: temp(
ka)
443 real(RP),
intent(in) :: pres(
ka)
444 real(RP),
intent(in) :: q (
ka,
qa)
447 real(RP) :: Rtot, CVtot, RovCP
460 qdry = qdry - q(k,iqw)
461 cvtot = cvtot + q(k,iqw) *
aq_cv(iqw)
463 cvtot = cvdry * qdry + cvtot
464 rtot = rdry * qdry + rvap * q(k,
i_qv)
467 rovcp = rtot / ( cvtot + rtot )
469 pott(k) = temp(k) * ( pre00 / pres(k) )**rovcp
473 end subroutine atmos_thermodyn_pott_1d
476 subroutine atmos_thermodyn_pott_3d( &
483 real(RP),
intent(out) :: pott(
ka,
ia,
ja)
484 real(RP),
intent(in) :: temp(
ka,
ia,
ja)
485 real(RP),
intent(in) :: pres(
ka,
ia,
ja)
486 real(RP),
intent(in) :: q (
ka,
ia,
ja,
qa)
489 real(RP) :: Rtot, CVtot, RovCP
491 integer :: k, i, j, iqw
504 qdry = qdry - q(k,i,j,iqw)
505 cvtot = cvtot + q(k,i,j,iqw) *
aq_cv(iqw)
507 cvtot = cvdry * qdry + cvtot
508 rtot = rdry * qdry + rvap * q(k,i,j,
i_qv)
511 rovcp = rtot / ( cvtot + rtot )
513 pott(k,i,j) = temp(k,i,j) * ( pre00 / pres(k,i,j) )**rovcp
519 end subroutine atmos_thermodyn_pott_3d
523 subroutine atmos_thermodyn_rhoe_0d( &
529 real(RP),
intent(out) :: rhoe
530 real(RP),
intent(in) :: rhot
531 real(RP),
intent(in) :: q(
qa)
535 real(RP) :: Rtot, CVtot, CPovCV
548 cvtot = cvtot + q(iqw) *
aq_cv(iqw)
550 cvtot = cvdry * qdry + cvtot
551 rtot = rdry * qdry + rvap * q(
i_qv)
554 cpovcv = ( cvtot + rtot ) / cvtot
556 pres = pre00 * ( rhot * rtot / pre00 )**cpovcv
558 rhoe = pres / rtot * cvtot
561 end subroutine atmos_thermodyn_rhoe_0d
565 subroutine atmos_thermodyn_rhoe_3d( &
571 real(RP),
intent(out) :: rhoe(
ka,
ia,
ja)
572 real(RP),
intent(in) :: rhot(
ka,
ia,
ja)
573 real(RP),
intent(in) :: q (
ka,
ia,
ja,
qa)
577 real(RP) :: Rtot, CVtot, CPovCV
579 integer :: k, i, j, iqw
593 qdry = qdry - q(k,i,j,iqw)
594 cvtot = cvtot + q(k,i,j,iqw) *
aq_cv(iqw)
596 cvtot = cvdry * qdry + cvtot
597 rtot = rdry * qdry + rvap * q(k,i,j,
i_qv)
601 cpovcv = ( cvtot + rtot ) / cvtot
603 pres = pre00 * ( rhot(k,i,j) * rtot / pre00 )**cpovcv
605 rhoe(k,i,j) = pres / rtot * cvtot
611 end subroutine atmos_thermodyn_rhoe_3d
615 subroutine atmos_thermodyn_rhot_0d( &
621 real(RP),
intent(out) :: rhot
622 real(RP),
intent(in) :: rhoe
623 real(RP),
intent(in) :: q(
qa)
627 real(RP) :: Rtot, CVtot, RovCP
640 cvtot = cvtot + q(iqw) *
aq_cv(iqw)
642 cvtot = cvdry * qdry + cvtot
643 rtot = rdry * qdry + rvap * q(
i_qv)
646 rovcp = rtot / ( cvtot + rtot )
648 pres = rhoe * rtot / cvtot
650 rhot = rhoe / cvtot * ( pre00 / pres )**rovcp
653 end subroutine atmos_thermodyn_rhot_0d
657 subroutine atmos_thermodyn_rhot_3d( &
663 real(RP),
intent(out) :: rhot(
ka,
ia,
ja)
664 real(RP),
intent(in) :: rhoe(
ka,
ia,
ja)
665 real(RP),
intent(in) :: q (
ka,
ia,
ja,
qa)
669 real(RP) :: Rtot, CVtot, RovCP
671 integer :: k, i, j, iqw
686 qdry = qdry - q(k,i,j,iqw)
687 cvtot = cvtot + q(k,i,j,iqw) *
aq_cv(iqw)
689 cvtot = cvdry * qdry + cvtot
690 rtot = rdry * qdry + rvap * q(k,i,j,
i_qv)
693 rovcp = rtot / ( cvtot + rtot )
695 pres = rhoe(k,i,j) * rtot / cvtot
697 rhot(k,i,j) = rhoe(k,i,j) / cvtot * ( pre00 / pres )**rovcp
703 end subroutine atmos_thermodyn_rhot_3d
707 subroutine atmos_thermodyn_temp_pres_0d( &
715 real(RP),
intent(out) :: temp
716 real(RP),
intent(out) :: pres
717 real(RP),
intent(in) :: dens
718 real(RP),
intent(in) :: rhot
719 real(RP),
intent(in) :: q(
qa)
722 real(RP) :: Rtot, CVtot, CPovCV
735 cvtot = cvtot + q(iqw) *
aq_cv(iqw)
737 cvtot = cvdry * qdry + cvtot
738 rtot = rdry * qdry + rvap * q(
i_qv)
741 cpovcv = ( cvtot + rtot ) / cvtot
743 pres = pre00 * ( rhot * rtot / pre00 )**cpovcv
744 temp = pres / ( dens * rtot )
747 end subroutine atmos_thermodyn_temp_pres_0d
751 subroutine atmos_thermodyn_temp_pres_3d( &
759 real(RP),
intent(out) :: temp(
ka,
ia,
ja)
760 real(RP),
intent(out) :: pres(
ka,
ia,
ja)
761 real(RP),
intent(in) :: dens(
ka,
ia,
ja)
762 real(RP),
intent(in) :: rhot(
ka,
ia,
ja)
763 real(RP),
intent(in) :: q (
ka,
ia,
ja,
qa)
766 real(RP) :: Rtot, CVtot, CPovCV
768 integer :: k, i, j, iqw
782 qdry = qdry - q(k,i,j,iqw)
783 cvtot = cvtot + q(k,i,j,iqw) *
aq_cv(iqw)
785 cvtot = cvdry * qdry + cvtot
786 rtot = rdry * qdry + rvap * q(k,i,j,
i_qv)
789 cpovcv = ( cvtot + rtot ) / cvtot
791 pres(k,i,j) = pre00 * ( rhot(k,i,j) * rtot / pre00 )**cpovcv
792 temp(k,i,j) = pres(k,i,j) / ( dens(k,i,j) * rtot )
798 end subroutine atmos_thermodyn_temp_pres_3d
802 subroutine atmos_thermodyn_temp_pres_e_0d( &
810 real(RP),
intent(out) :: temp
811 real(RP),
intent(out) :: pres
812 real(RP),
intent(in) :: dens
813 real(RP),
intent(in) :: rhoe
814 real(RP),
intent(in) :: q(
qa)
817 real(RP) :: Rtot, CVtot
830 cvtot = cvtot + q(iqw) *
aq_cv(iqw)
832 cvtot = cvdry * qdry + cvtot
833 rtot = rdry * qdry + rvap * q(
i_qv)
836 temp = rhoe / ( dens * cvtot )
837 pres = dens * rtot * temp
840 end subroutine atmos_thermodyn_temp_pres_e_0d
844 subroutine atmos_thermodyn_temp_pres_e_3d( &
852 real(RP),
intent(out) :: temp(
ka,
ia,
ja)
853 real(RP),
intent(out) :: pres(
ka,
ia,
ja)
854 real(RP),
intent(in) :: dens(
ka,
ia,
ja)
855 real(RP),
intent(in) :: rhoe(
ka,
ia,
ja)
856 real(RP),
intent(in) :: q (
ka,
ia,
ja,
qa)
859 real(RP) :: Rtot, CVtot
861 integer :: k, i, j, iqw
875 qdry = qdry - q(k,i,j,iqw)
876 cvtot = cvtot + q(k,i,j,iqw) *
aq_cv(iqw)
878 cvtot = cvdry * qdry + cvtot
879 rtot = rdry * qdry + rvap * q(k,i,j,
i_qv)
882 temp(k,i,j) = rhoe(k,i,j) / ( dens(k,i,j) * cvtot )
883 pres(k,i,j) = dens(k,i,j) * rtot * temp(k,i,j)
889 end subroutine atmos_thermodyn_temp_pres_e_3d
892 subroutine atmos_thermodyn_templhv_0d( &
897 real(RP),
intent(out) :: lhv
898 real(RP),
intent(in) :: temp
904 end subroutine atmos_thermodyn_templhv_0d
907 subroutine atmos_thermodyn_templhv_2d( &
912 real(RP),
intent(out) :: lhv (
ia,
ja)
913 real(RP),
intent(in) :: temp(
ia,
ja)
920 lhv(i,j) = lhv0 + ( cpvap - cl ) * ( temp(i,j) - tem00 ) *
thermodyn_emask 925 end subroutine atmos_thermodyn_templhv_2d
928 subroutine atmos_thermodyn_templhv_3d( &
933 real(RP),
intent(out) :: lhv (
ka,
ia,
ja)
934 real(RP),
intent(in) :: temp(
ka,
ia,
ja)
942 lhv(k,i,j) = lhv0 + ( cpvap - cl ) * ( temp(k,i,j) - tem00 ) *
thermodyn_emask 948 end subroutine atmos_thermodyn_templhv_3d
951 subroutine atmos_thermodyn_templhs_0d( &
956 real(RP),
intent(out) :: lhs
957 real(RP),
intent(in) :: temp
963 end subroutine atmos_thermodyn_templhs_0d
966 subroutine atmos_thermodyn_templhs_2d( &
971 real(RP),
intent(out) :: lhs (
ia,
ja)
972 real(RP),
intent(in) :: temp(
ia,
ja)
979 lhs(i,j) = lhs0 + ( cpvap - ci ) * ( temp(i,j) - tem00 ) *
thermodyn_emask 984 end subroutine atmos_thermodyn_templhs_2d
987 subroutine atmos_thermodyn_templhs_3d( &
992 real(RP),
intent(out) :: lhs (
ka,
ia,
ja)
993 real(RP),
intent(in) :: temp(
ka,
ia,
ja)
1001 lhs(k,i,j) = lhs0 + ( cpvap - ci ) * ( temp(k,i,j) - tem00 ) *
thermodyn_emask 1007 end subroutine atmos_thermodyn_templhs_3d
1010 subroutine atmos_thermodyn_templhf_0d( &
1015 real(RP),
intent(out) :: lhf
1016 real(RP),
intent(in) :: temp
1022 end subroutine atmos_thermodyn_templhf_0d
1025 subroutine atmos_thermodyn_templhf_2d( &
1030 real(RP),
intent(out) :: lhf (
ia,
ja)
1031 real(RP),
intent(in) :: temp(
ia,
ja)
1038 lhf(i,j) = lhf0 + ( cl - ci ) * ( temp(i,j) - tem00 ) *
thermodyn_emask 1043 end subroutine atmos_thermodyn_templhf_2d
1046 subroutine atmos_thermodyn_templhf_3d( &
1051 real(RP),
intent(out) :: lhf (
ka,
ia,
ja)
1052 real(RP),
intent(in) :: temp(
ka,
ia,
ja)
1060 lhf(k,i,j) = lhf0 + ( cl - ci ) * ( temp(k,i,j) - tem00 ) *
thermodyn_emask 1066 end subroutine atmos_thermodyn_templhf_3d
1070 subroutine atmos_thermodyn_entr_0d( &
1077 real(RP),
intent(out) :: entr
1078 real(RP),
intent(in) :: temp
1079 real(RP),
intent(in) :: pres
1080 real(RP),
intent(in) :: q(
qa)
1082 real(RP) :: lhv, lhf
1083 real(RP) :: qdry, Rtot
1084 real(RP) :: logT_T0, pres_dry, pres_vap
1095 qdry = qdry - q(iqw)
1097 rtot = rdry * qdry + rvap * q(
i_qv)
1099 logt_t0 =
log( temp / tem00 )
1102 pres_dry = max( pres * qdry * rdry / rtot, eps )
1103 pres_vap = max( pres * q(
i_qv) * rvap / rtot, eps )
1105 entr = qdry * cpdry * logt_t0 &
1106 - qdry * rdry *
log( pres_dry / pre00 ) &
1107 + q(
i_qv) * cpvap * logt_t0 &
1108 - q(
i_qv) * rvap *
log( pres_vap / psat0 ) &
1109 + q(
i_qv) * lhv / tem00
1115 if( iqw ==
i_qc ) sq = q(
i_qc) * cl * logt_t0
1117 if( iqw ==
i_qr ) sq = q(
i_qr) * cl * logt_t0
1119 if( iqw ==
i_qi ) sq = q(
i_qi) * ci * logt_t0 &
1120 - q(
i_qi) * lhf / tem00
1122 if( iqw ==
i_qs ) sq = q(
i_qs) * ci * logt_t0 &
1123 - q(
i_qs) * lhf / tem00
1125 if( iqw ==
i_qg ) sq = q(
i_qg) * ci * logt_t0 &
1126 - q(
i_qg) * lhf / tem00
1132 end subroutine atmos_thermodyn_entr_0d
1136 subroutine atmos_thermodyn_entr_2d( &
1143 real(RP),
intent(out) :: entr(
ia,
ja)
1144 real(RP),
intent(in) :: temp(
ia,
ja)
1145 real(RP),
intent(in) :: pres(
ia,
ja)
1146 real(RP),
intent(in) :: q (
ia,
ja,
qa)
1148 real(RP) :: lhv, lhf
1149 real(RP) :: qdry, Rtot
1150 real(RP) :: logT_T0, pres_dry, pres_vap
1153 integer :: i, j, iqw
1163 qdry = qdry - q(i,j,iqw)
1165 rtot = rdry * qdry + rvap * q(i,j,
i_qv)
1167 logt_t0 =
log( temp(i,j) / tem00 )
1169 pres_dry = max( pres(i,j) * qdry * rdry / rtot, eps )
1170 pres_vap = max( pres(i,j) * q(i,j,
i_qv) * rvap / rtot, eps )
1172 entr(i,j) = qdry * cpdry * logt_t0 &
1173 - qdry * rdry *
log( pres_dry / pre00 ) &
1174 + q(i,j,
i_qv) * cpvap * logt_t0 &
1175 - q(i,j,
i_qv) * rvap *
log( pres_vap / psat0 ) &
1176 + q(i,j,
i_qv) * lhv / tem00
1185 logt_t0 =
log( temp(i,j) / tem00 )
1190 if( iqw ==
i_qc ) sq = q(i,j,
i_qc) * cl * logt_t0
1191 if( iqw ==
i_qr ) sq = q(i,j,
i_qr) * cl * logt_t0
1192 if( iqw ==
i_qi ) sq = q(i,j,
i_qi) * ( ci * logt_t0 - lhf / tem00 )
1193 if( iqw ==
i_qs ) sq = q(i,j,
i_qs) * ( ci * logt_t0 - lhf / tem00 )
1194 if( iqw ==
i_qg ) sq = q(i,j,
i_qg) * ( ci * logt_t0 - lhf / tem00 )
1196 entr(i,j) = entr(i,j) + sq
1202 end subroutine atmos_thermodyn_entr_2d
1206 subroutine atmos_thermodyn_entr_3d( &
1213 real(RP),
intent(out) :: entr(
ka,
ia,
ja)
1214 real(RP),
intent(in) :: temp(
ka,
ia,
ja)
1215 real(RP),
intent(in) :: pres(
ka,
ia,
ja)
1216 real(RP),
intent(in) :: q (
ka,
ia,
ja,
qa)
1218 real(RP) :: lhv, lhf
1219 real(RP) :: qdry, Rtot
1220 real(RP) :: logT_T0, pres_dry, pres_vap
1223 integer :: k, i, j, iqw
1230 lhv = lhv0 + ( cpvap - cl ) * ( temp(k,i,j) - tem00 ) *
thermodyn_emask 1234 qdry = qdry - q(k,i,j,iqw)
1236 rtot = rdry * qdry + rvap * q(k,i,j,
i_qv)
1238 logt_t0 =
log( temp(k,i,j) / tem00 )
1240 pres_dry = max( pres(k,i,j) * qdry * rdry / rtot, eps )
1241 pres_vap = max( pres(k,i,j) * q(k,i,j,
i_qv) * rvap / rtot, eps )
1243 entr(k,i,j) = qdry * cpdry * logt_t0 &
1244 - qdry * rdry *
log( pres_dry / pre00 ) &
1245 + q(k,i,j,
i_qv) * cpvap * logt_t0 &
1246 - q(k,i,j,
i_qv) * rvap *
log( pres_vap / psat0 ) &
1247 + q(k,i,j,
i_qv) * lhv / tem00
1258 logt_t0 =
log( temp(k,i,j) / tem00 )
1263 if( iqw ==
i_qc ) sq = q(k,i,j,
i_qc) * cl * logt_t0
1264 if( iqw ==
i_qr ) sq = q(k,i,j,
i_qr) * cl * logt_t0
1265 if( iqw ==
i_qi ) sq = q(k,i,j,
i_qi) * ( ci * logt_t0 - lhf / tem00 )
1266 if( iqw ==
i_qs ) sq = q(k,i,j,
i_qs) * ( ci * logt_t0 - lhf / tem00 )
1267 if( iqw ==
i_qg ) sq = q(k,i,j,
i_qg) * ( ci * logt_t0 - lhf / tem00 )
1269 entr(k,i,j) = entr(k,i,j) + sq
1276 end subroutine atmos_thermodyn_entr_3d
1281 Ein, dens, qdry, q )
1284 real(RP),
intent(out) :: temp(
ka,
ia,
ja)
1285 real(RP),
intent(out) :: pres(
ka,
ia,
ja)
1286 real(RP),
intent(in) :: Ein (
ka,
ia,
ja)
1287 real(RP),
intent(in) :: dens(
ka,
ia,
ja)
1288 real(RP),
intent(in) :: qdry(
ka,
ia,
ja)
1289 real(RP),
intent(in) :: q (
ka,
ia,
ja,
qa)
1291 real(RP) :: cv, Rmoist
1293 integer :: i, j, k, iqw
1301 calc_cv(cv, qdry(k,i,j), q, k, i, j, iqw, cvdry,
aq_cv)
1302 calc_r(rmoist, q(k,i,j,
i_qv), qdry(k,i,j), rdry, rvap)
1304 temp(k,i,j) = ein(k,i,j) / cv
1306 pres(k,i,j) = dens(k,i,j) * rmoist * temp(k,i,j)
1318 dens, pott, qdry, q )
1321 real(RP),
intent(out) :: temp(
ka,
ia,
ja)
1322 real(RP),
intent(out) :: pres(
ka,
ia,
ja)
1323 real(RP),
intent(in) :: dens(
ka,
ia,
ja)
1324 real(RP),
intent(in) :: pott(
ka,
ia,
ja)
1325 real(RP),
intent(in) :: qdry(
ka,
ia,
ja)
1326 real(RP),
intent(in) :: q (
ka,
ia,
ja,
qa)
1328 real(RP) :: Rmoist, cp
1330 integer :: i, j, k, iqw
1338 calc_cp(cp, qdry(k,i,j), q, k, i, j, iqw, cpdry,
aq_cp)
1339 calc_r(rmoist, q(k,i,j,
i_qv), qdry(k,i,j), rdry, rvap)
1340 calc_pre(pres(k,i,j), dens(k,i,j), pott(k,i,j), rmoist, cp, pre00)
1342 temp(k,i,j) = pres(k,i,j) / ( dens(k,i,j) * rmoist )
real(rp), public const_cvdry
specific heat (dry air,constant volume) [J/kg/K]
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]
subroutine, public prc_mpistop
Abort MPI.
real(rp), parameter, public const_ci
specific heat (ice) [J/kg/K]
real(rp), dimension(:), allocatable, public aq_cp
CP for each hydrometeors [J/kg/K].
logical, public io_l
output log or not? (this process)
real(rp), parameter, public const_cl
specific heat (liquid water) [J/kg/K]
integer, public ke
end point of inner domain: z, local
real(rp), public thermodyn_emask
=0: SIMPLE, 1: EXACT
real(rp), parameter, public const_tem00
temperature reference (0C) [K]
subroutine atmos_thermodyn_qd_0d(qdry, q)
calc dry air mass (0D)
real(rp), public const_cvvap
specific heat (water vapor, constant volume) [J/kg/K]
real(rp), public const_lhf0
latent heat of fusion at 0C [J/kg]
real(rp), public const_rdry
specific gas constant (dry air) [J/kg/K]
real(rp), parameter, public const_lhs0
latent heat of sublimation at 0C [J/kg]
subroutine, public atmos_thermodyn_tempre(temp, pres, Ein, dens, qdry, q)
integer, public ia
of x whole cells (local, with HALO)
integer, public ka
of z whole cells (local, with HALO)
real(rp), parameter, public const_lhv0
latent heat of vaporizaion at 0C [J/kg]
real(rp), public const_pre00
pressure reference [Pa]
subroutine, public atmos_thermodyn_setup
Setup.
subroutine, public log(type, message)
real(rp), parameter, public const_rvap
specific gas constant (water vapor) [J/kg/K]
real(rp), dimension(:), allocatable, public aq_cv
CV for each hydrometeors [J/kg/K].
integer, public ks
start point of inner domain: z, local
real(rp), public const_eps
small number
module ATMOSPHERE / Thermodynamics
subroutine, public atmos_thermodyn_tempre2(temp, pres, dens, pott, qdry, q)
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 ja
of y whole cells (local, with HALO)