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_3d
96 end interface atmos_thermodyn_pott
98 interface atmos_thermodyn_temp_pres
99 module procedure atmos_thermodyn_temp_pres_0d
100 module procedure atmos_thermodyn_temp_pres_3d
101 end interface atmos_thermodyn_temp_pres
103 interface atmos_thermodyn_temp_pres_e
104 module procedure atmos_thermodyn_temp_pres_e_0d
105 module procedure atmos_thermodyn_temp_pres_e_3d
106 end interface atmos_thermodyn_temp_pres_e
108 interface atmos_thermodyn_templhv
109 module procedure atmos_thermodyn_templhv_0d
110 module procedure atmos_thermodyn_templhv_2d
111 module procedure atmos_thermodyn_templhv_3d
112 end interface atmos_thermodyn_templhv
114 interface atmos_thermodyn_templhs
115 module procedure atmos_thermodyn_templhs_0d
116 module procedure atmos_thermodyn_templhs_2d
117 module procedure atmos_thermodyn_templhs_3d
118 end interface atmos_thermodyn_templhs
120 interface atmos_thermodyn_templhf
121 module procedure atmos_thermodyn_templhf_0d
122 module procedure atmos_thermodyn_templhf_2d
123 module procedure atmos_thermodyn_templhf_3d
124 end interface atmos_thermodyn_templhf
126 interface atmos_thermodyn_entr
127 module procedure atmos_thermodyn_entr_0d
128 module procedure atmos_thermodyn_entr_2d
129 module procedure atmos_thermodyn_entr_3d
130 end interface atmos_thermodyn_entr
141 real(RP),
public,
allocatable ::
aq_cp(:)
142 real(RP),
public,
allocatable ::
aq_cv(:)
172 if(
io_l )
write(
io_fid_log,*)
'++++++ Module[THERMODYN] / Categ[ATMOS SHARE] / Origin[SCALElib]' 177 if ( thermodyn_type ==
'EXACT' )
then 196 elseif( thermodyn_type ==
'SIMPLE' )
then 227 real(RP),
intent(out) :: qdry
228 real(RP),
intent(in) :: q(
qa)
245 subroutine atmos_thermodyn_qd_3d( &
250 real(RP),
intent(out) :: qdry(
ka,
ia,
ja)
251 real(RP),
intent(in) :: q (
ka,
ia,
ja,
qa)
253 integer :: k, i, j, iqw
265 calc_qdry( qdry(k,i,j), q, k, i, j, iqw )
272 end subroutine atmos_thermodyn_qd_3d
276 subroutine atmos_thermodyn_cp_0d( &
282 real(RP),
intent(out) :: CPtot
283 real(RP),
intent(in) :: q(
qa)
284 real(RP),
intent(in) :: qdry
292 cptot = cptot + q(iqw) *
aq_cp(iqw)
297 end subroutine atmos_thermodyn_cp_0d
301 subroutine atmos_thermodyn_cp_3d( &
307 real(RP),
intent(out) :: CPtot(
ka,
ia,
ja)
308 real(RP),
intent(in) :: q (
ka,
ia,
ja,
qa)
309 real(RP),
intent(in) :: qdry (
ka,
ia,
ja)
311 integer :: k, i, j, iqw
324 calc_cp(cptot(k,i,j), qdry(k,i,j), q, k, i, j, iqw, cpdry,
aq_cp)
331 end subroutine atmos_thermodyn_cp_3d
335 subroutine atmos_thermodyn_cv_0d( &
341 real(RP),
intent(out) :: CVtot
342 real(RP),
intent(in) :: q(
qa)
343 real(RP),
intent(in) :: qdry
351 cvtot = cvtot + q(iqw) *
aq_cv(iqw)
356 end subroutine atmos_thermodyn_cv_0d
360 subroutine atmos_thermodyn_cv_3d( &
366 real(RP),
intent(out) :: CVtot(
ka,
ia,
ja)
367 real(RP),
intent(in) :: q (
ka,
ia,
ja,
qa)
368 real(RP),
intent(in) :: qdry (
ka,
ia,
ja)
370 integer :: k, i, j, iqw
383 calc_cv(cvtot(k,i,j), qdry(k,i,j), q, k, i, j, iqw, cvdry,
aq_cv)
390 end subroutine atmos_thermodyn_cv_3d
393 subroutine atmos_thermodyn_pott_0d( &
400 real(RP),
intent(out) :: pott
401 real(RP),
intent(in) :: temp
402 real(RP),
intent(in) :: pres
403 real(RP),
intent(in) :: q(
qa)
406 real(RP) :: Rtot, CVtot, RovCP
419 cvtot = cvtot + q(iqw) *
aq_cv(iqw)
421 cvtot = cvdry * qdry + cvtot
422 rtot = rdry * qdry + rvap * q(
i_qv)
425 rovcp = rtot / ( cvtot + rtot )
427 pott = temp * ( pre00 / pres )**rovcp
430 end subroutine atmos_thermodyn_pott_0d
433 subroutine atmos_thermodyn_pott_3d( &
440 real(RP),
intent(out) :: pott(
ka,
ia,
ja)
441 real(RP),
intent(in) :: temp(
ka,
ia,
ja)
442 real(RP),
intent(in) :: pres(
ka,
ia,
ja)
443 real(RP),
intent(in) :: q (
ka,
ia,
ja,
qa)
446 real(RP) :: Rtot, CVtot, RovCP
448 integer :: k, i, j, iqw
461 qdry = qdry - q(k,i,j,iqw)
462 cvtot = cvtot + q(k,i,j,iqw) *
aq_cv(iqw)
464 cvtot = cvdry * qdry + cvtot
465 rtot = rdry * qdry + rvap * q(k,i,j,
i_qv)
468 rovcp = rtot / ( cvtot + rtot )
470 pott(k,i,j) = temp(k,i,j) * ( pre00 / pres(k,i,j) )**rovcp
476 end subroutine atmos_thermodyn_pott_3d
480 subroutine atmos_thermodyn_rhoe_0d( &
486 real(RP),
intent(out) :: rhoe
487 real(RP),
intent(in) :: rhot
488 real(RP),
intent(in) :: q(
qa)
492 real(RP) :: Rtot, CVtot, CPovCV
505 cvtot = cvtot + q(iqw) *
aq_cv(iqw)
507 cvtot = cvdry * qdry + cvtot
508 rtot = rdry * qdry + rvap * q(
i_qv)
511 cpovcv = ( cvtot + rtot ) / cvtot
513 pres = pre00 * ( rhot * rtot / pre00 )**cpovcv
515 rhoe = pres / rtot * cvtot
518 end subroutine atmos_thermodyn_rhoe_0d
522 subroutine atmos_thermodyn_rhoe_3d( &
528 real(RP),
intent(out) :: rhoe(
ka,
ia,
ja)
529 real(RP),
intent(in) :: rhot(
ka,
ia,
ja)
530 real(RP),
intent(in) :: q (
ka,
ia,
ja,
qa)
534 real(RP) :: Rtot, CVtot, CPovCV
536 integer :: k, i, j, iqw
550 qdry = qdry - q(k,i,j,iqw)
551 cvtot = cvtot + q(k,i,j,iqw) *
aq_cv(iqw)
553 cvtot = cvdry * qdry + cvtot
554 rtot = rdry * qdry + rvap * q(k,i,j,
i_qv)
558 cpovcv = ( cvtot + rtot ) / cvtot
560 pres = pre00 * ( rhot(k,i,j) * rtot / pre00 )**cpovcv
562 rhoe(k,i,j) = pres / rtot * cvtot
568 end subroutine atmos_thermodyn_rhoe_3d
572 subroutine atmos_thermodyn_rhot_0d( &
578 real(RP),
intent(out) :: rhot
579 real(RP),
intent(in) :: rhoe
580 real(RP),
intent(in) :: q(
qa)
584 real(RP) :: Rtot, CVtot, RovCP
597 cvtot = cvtot + q(iqw) *
aq_cv(iqw)
599 cvtot = cvdry * qdry + cvtot
600 rtot = rdry * qdry + rvap * q(
i_qv)
603 rovcp = rtot / ( cvtot + rtot )
605 pres = rhoe * rtot / cvtot
607 rhot = rhoe / cvtot * ( pre00 / pres )**rovcp
610 end subroutine atmos_thermodyn_rhot_0d
614 subroutine atmos_thermodyn_rhot_3d( &
620 real(RP),
intent(out) :: rhot(
ka,
ia,
ja)
621 real(RP),
intent(in) :: rhoe(
ka,
ia,
ja)
622 real(RP),
intent(in) :: q (
ka,
ia,
ja,
qa)
626 real(RP) :: Rtot, CVtot, RovCP
628 integer :: k, i, j, iqw
643 qdry = qdry - q(k,i,j,iqw)
644 cvtot = cvtot + q(k,i,j,iqw) *
aq_cv(iqw)
646 cvtot = cvdry * qdry + cvtot
647 rtot = rdry * qdry + rvap * q(k,i,j,
i_qv)
650 rovcp = rtot / ( cvtot + rtot )
652 pres = rhoe(k,i,j) * rtot / cvtot
654 rhot(k,i,j) = rhoe(k,i,j) / cvtot * ( pre00 / pres )**rovcp
660 end subroutine atmos_thermodyn_rhot_3d
664 subroutine atmos_thermodyn_temp_pres_0d( &
672 real(RP),
intent(out) :: temp
673 real(RP),
intent(out) :: pres
674 real(RP),
intent(in) :: dens
675 real(RP),
intent(in) :: rhot
676 real(RP),
intent(in) :: q(
qa)
679 real(RP) :: Rtot, CVtot, CPovCV
692 cvtot = cvtot + q(iqw) *
aq_cv(iqw)
694 cvtot = cvdry * qdry + cvtot
695 rtot = rdry * qdry + rvap * q(
i_qv)
698 cpovcv = ( cvtot + rtot ) / cvtot
700 pres = pre00 * ( rhot * rtot / pre00 )**cpovcv
701 temp = pres / ( dens * rtot )
704 end subroutine atmos_thermodyn_temp_pres_0d
708 subroutine atmos_thermodyn_temp_pres_3d( &
716 real(RP),
intent(out) :: temp(
ka,
ia,
ja)
717 real(RP),
intent(out) :: pres(
ka,
ia,
ja)
718 real(RP),
intent(in) :: dens(
ka,
ia,
ja)
719 real(RP),
intent(in) :: rhot(
ka,
ia,
ja)
720 real(RP),
intent(in) :: q (
ka,
ia,
ja,
qa)
723 real(RP) :: Rtot, CVtot, CPovCV
725 integer :: k, i, j, iqw
739 qdry = qdry - q(k,i,j,iqw)
740 cvtot = cvtot + q(k,i,j,iqw) *
aq_cv(iqw)
742 cvtot = cvdry * qdry + cvtot
743 rtot = rdry * qdry + rvap * q(k,i,j,
i_qv)
746 cpovcv = ( cvtot + rtot ) / cvtot
748 pres(k,i,j) = pre00 * ( rhot(k,i,j) * rtot / pre00 )**cpovcv
749 temp(k,i,j) = pres(k,i,j) / ( dens(k,i,j) * rtot )
755 end subroutine atmos_thermodyn_temp_pres_3d
759 subroutine atmos_thermodyn_temp_pres_e_0d( &
767 real(RP),
intent(out) :: temp
768 real(RP),
intent(out) :: pres
769 real(RP),
intent(in) :: dens
770 real(RP),
intent(in) :: rhoe
771 real(RP),
intent(in) :: q(
qa)
774 real(RP) :: Rtot, CVtot
787 cvtot = cvtot + q(iqw) *
aq_cv(iqw)
789 cvtot = cvdry * qdry + cvtot
790 rtot = rdry * qdry + rvap * q(
i_qv)
793 temp = rhoe / ( dens * cvtot )
794 pres = dens * rtot * temp
797 end subroutine atmos_thermodyn_temp_pres_e_0d
801 subroutine atmos_thermodyn_temp_pres_e_3d( &
809 real(RP),
intent(out) :: temp(
ka,
ia,
ja)
810 real(RP),
intent(out) :: pres(
ka,
ia,
ja)
811 real(RP),
intent(in) :: dens(
ka,
ia,
ja)
812 real(RP),
intent(in) :: rhoe(
ka,
ia,
ja)
813 real(RP),
intent(in) :: q (
ka,
ia,
ja,
qa)
816 real(RP) :: Rtot, CVtot
818 integer :: k, i, j, iqw
832 qdry = qdry - q(k,i,j,iqw)
833 cvtot = cvtot + q(k,i,j,iqw) *
aq_cv(iqw)
835 cvtot = cvdry * qdry + cvtot
836 rtot = rdry * qdry + rvap * q(k,i,j,
i_qv)
839 temp(k,i,j) = rhoe(k,i,j) / ( dens(k,i,j) * cvtot )
840 pres(k,i,j) = dens(k,i,j) * rtot * temp(k,i,j)
846 end subroutine atmos_thermodyn_temp_pres_e_3d
849 subroutine atmos_thermodyn_templhv_0d( &
854 real(RP),
intent(out) :: lhv
855 real(RP),
intent(in) :: temp
861 end subroutine atmos_thermodyn_templhv_0d
864 subroutine atmos_thermodyn_templhv_2d( &
869 real(RP),
intent(out) :: lhv (
ia,
ja)
870 real(RP),
intent(in) :: temp(
ia,
ja)
877 lhv(i,j) = lhv0 + ( cpvap - cl ) * ( temp(i,j) - tem00 ) *
thermodyn_emask 882 end subroutine atmos_thermodyn_templhv_2d
885 subroutine atmos_thermodyn_templhv_3d( &
890 real(RP),
intent(out) :: lhv (
ka,
ia,
ja)
891 real(RP),
intent(in) :: temp(
ka,
ia,
ja)
899 lhv(k,i,j) = lhv0 + ( cpvap - cl ) * ( temp(k,i,j) - tem00 ) *
thermodyn_emask 905 end subroutine atmos_thermodyn_templhv_3d
908 subroutine atmos_thermodyn_templhs_0d( &
913 real(RP),
intent(out) :: lhs
914 real(RP),
intent(in) :: temp
920 end subroutine atmos_thermodyn_templhs_0d
923 subroutine atmos_thermodyn_templhs_2d( &
928 real(RP),
intent(out) :: lhs (
ia,
ja)
929 real(RP),
intent(in) :: temp(
ia,
ja)
936 lhs(i,j) = lhs0 + ( cpvap - ci ) * ( temp(i,j) - tem00 ) *
thermodyn_emask 941 end subroutine atmos_thermodyn_templhs_2d
944 subroutine atmos_thermodyn_templhs_3d( &
949 real(RP),
intent(out) :: lhs (
ka,
ia,
ja)
950 real(RP),
intent(in) :: temp(
ka,
ia,
ja)
958 lhs(k,i,j) = lhs0 + ( cpvap - ci ) * ( temp(k,i,j) - tem00 ) *
thermodyn_emask 964 end subroutine atmos_thermodyn_templhs_3d
967 subroutine atmos_thermodyn_templhf_0d( &
972 real(RP),
intent(out) :: lhf
973 real(RP),
intent(in) :: temp
979 end subroutine atmos_thermodyn_templhf_0d
982 subroutine atmos_thermodyn_templhf_2d( &
987 real(RP),
intent(out) :: lhf (
ia,
ja)
988 real(RP),
intent(in) :: temp(
ia,
ja)
995 lhf(i,j) = lhf0 + ( cl - ci ) * ( temp(i,j) - tem00 ) *
thermodyn_emask 1000 end subroutine atmos_thermodyn_templhf_2d
1003 subroutine atmos_thermodyn_templhf_3d( &
1008 real(RP),
intent(out) :: lhf (
ka,
ia,
ja)
1009 real(RP),
intent(in) :: temp(
ka,
ia,
ja)
1017 lhf(k,i,j) = lhf0 + ( cl - ci ) * ( temp(k,i,j) - tem00 ) *
thermodyn_emask 1023 end subroutine atmos_thermodyn_templhf_3d
1027 subroutine atmos_thermodyn_entr_0d( &
1034 real(RP),
intent(out) :: entr
1035 real(RP),
intent(in) :: temp
1036 real(RP),
intent(in) :: pres
1037 real(RP),
intent(in) :: q(
qa)
1039 real(RP) :: lhv, lhf
1040 real(RP) :: qdry, Rtot
1041 real(RP) :: logT_T0, pres_dry, pres_vap
1052 qdry = qdry - q(iqw)
1054 rtot = rdry * qdry + rvap * q(
i_qv)
1056 logt_t0 =
log( temp / tem00 )
1059 pres_dry = max( pres * qdry * rdry / rtot, eps )
1060 pres_vap = max( pres * q(
i_qv) * rvap / rtot, eps )
1062 entr = qdry * cpdry * logt_t0 &
1063 - qdry * rdry *
log( pres_dry / pre00 ) &
1064 + q(
i_qv) * cpvap * logt_t0 &
1065 - q(
i_qv) * rvap *
log( pres_vap / psat0 ) &
1066 + q(
i_qv) * lhv / tem00
1072 if( iqw ==
i_qc ) sq = q(
i_qc) * cl * logt_t0
1074 if( iqw ==
i_qr ) sq = q(
i_qr) * cl * logt_t0
1076 if( iqw ==
i_qi ) sq = q(
i_qi) * ci * logt_t0 &
1077 - q(
i_qi) * lhf / tem00
1079 if( iqw ==
i_qs ) sq = q(
i_qs) * ci * logt_t0 &
1080 - q(
i_qs) * lhf / tem00
1082 if( iqw ==
i_qg ) sq = q(
i_qg) * ci * logt_t0 &
1083 - q(
i_qg) * lhf / tem00
1089 end subroutine atmos_thermodyn_entr_0d
1093 subroutine atmos_thermodyn_entr_2d( &
1100 real(RP),
intent(out) :: entr(
ia,
ja)
1101 real(RP),
intent(in) :: temp(
ia,
ja)
1102 real(RP),
intent(in) :: pres(
ia,
ja)
1103 real(RP),
intent(in) :: q (
ia,
ja,
qa)
1105 real(RP) :: lhv, lhf
1106 real(RP) :: qdry, Rtot
1107 real(RP) :: logT_T0, pres_dry, pres_vap
1110 integer :: i, j, iqw
1120 qdry = qdry - q(i,j,iqw)
1122 rtot = rdry * qdry + rvap * q(i,j,
i_qv)
1124 logt_t0 =
log( temp(i,j) / tem00 )
1126 pres_dry = max( pres(i,j) * qdry * rdry / rtot, eps )
1127 pres_vap = max( pres(i,j) * q(i,j,
i_qv) * rvap / rtot, eps )
1129 entr(i,j) = qdry * cpdry * logt_t0 &
1130 - qdry * rdry *
log( pres_dry / pre00 ) &
1131 + q(i,j,
i_qv) * cpvap * logt_t0 &
1132 - q(i,j,
i_qv) * rvap *
log( pres_vap / psat0 ) &
1133 + q(i,j,
i_qv) * lhv / tem00
1142 logt_t0 =
log( temp(i,j) / tem00 )
1147 if( iqw ==
i_qc ) sq = q(i,j,
i_qc) * cl * logt_t0
1148 if( iqw ==
i_qr ) sq = q(i,j,
i_qr) * cl * logt_t0
1149 if( iqw ==
i_qi ) sq = q(i,j,
i_qi) * ( ci * logt_t0 - lhf / tem00 )
1150 if( iqw ==
i_qs ) sq = q(i,j,
i_qs) * ( ci * logt_t0 - lhf / tem00 )
1151 if( iqw ==
i_qg ) sq = q(i,j,
i_qg) * ( ci * logt_t0 - lhf / tem00 )
1153 entr(i,j) = entr(i,j) + sq
1159 end subroutine atmos_thermodyn_entr_2d
1163 subroutine atmos_thermodyn_entr_3d( &
1170 real(RP),
intent(out) :: entr(
ka,
ia,
ja)
1171 real(RP),
intent(in) :: temp(
ka,
ia,
ja)
1172 real(RP),
intent(in) :: pres(
ka,
ia,
ja)
1173 real(RP),
intent(in) :: q (
ka,
ia,
ja,
qa)
1175 real(RP) :: lhv, lhf
1176 real(RP) :: qdry, Rtot
1177 real(RP) :: logT_T0, pres_dry, pres_vap
1180 integer :: k, i, j, iqw
1187 lhv = lhv0 + ( cpvap - cl ) * ( temp(k,i,j) - tem00 ) *
thermodyn_emask 1191 qdry = qdry - q(k,i,j,iqw)
1193 rtot = rdry * qdry + rvap * q(k,i,j,
i_qv)
1195 logt_t0 =
log( temp(k,i,j) / tem00 )
1197 pres_dry = max( pres(k,i,j) * qdry * rdry / rtot, eps )
1198 pres_vap = max( pres(k,i,j) * q(k,i,j,
i_qv) * rvap / rtot, eps )
1200 entr(k,i,j) = qdry * cpdry * logt_t0 &
1201 - qdry * rdry *
log( pres_dry / pre00 ) &
1202 + q(k,i,j,
i_qv) * cpvap * logt_t0 &
1203 - q(k,i,j,
i_qv) * rvap *
log( pres_vap / psat0 ) &
1204 + q(k,i,j,
i_qv) * lhv / tem00
1215 logt_t0 =
log( temp(k,i,j) / tem00 )
1220 if( iqw ==
i_qc ) sq = q(k,i,j,
i_qc) * cl * logt_t0
1221 if( iqw ==
i_qr ) sq = q(k,i,j,
i_qr) * cl * logt_t0
1222 if( iqw ==
i_qi ) sq = q(k,i,j,
i_qi) * ( ci * logt_t0 - lhf / tem00 )
1223 if( iqw ==
i_qs ) sq = q(k,i,j,
i_qs) * ( ci * logt_t0 - lhf / tem00 )
1224 if( iqw ==
i_qg ) sq = q(k,i,j,
i_qg) * ( ci * logt_t0 - lhf / tem00 )
1226 entr(k,i,j) = entr(k,i,j) + sq
1233 end subroutine atmos_thermodyn_entr_3d
1238 Ein, dens, qdry, q )
1241 real(RP),
intent(out) :: temp(
ka,
ia,
ja)
1242 real(RP),
intent(out) :: pres(
ka,
ia,
ja)
1243 real(RP),
intent(in) :: Ein (
ka,
ia,
ja)
1244 real(RP),
intent(in) :: dens(
ka,
ia,
ja)
1245 real(RP),
intent(in) :: qdry(
ka,
ia,
ja)
1246 real(RP),
intent(in) :: q (
ka,
ia,
ja,
qa)
1248 real(RP) :: cv, Rmoist
1250 integer :: i, j, k, iqw
1258 calc_cv(cv, qdry(k,i,j), q, k, i, j, iqw, cvdry,
aq_cv)
1259 calc_r(rmoist, q(k,i,j,
i_qv), qdry(k,i,j), rdry, rvap)
1261 temp(k,i,j) = ein(k,i,j) / cv
1263 pres(k,i,j) = dens(k,i,j) * rmoist * temp(k,i,j)
1275 dens, pott, qdry, q )
1278 real(RP),
intent(out) :: temp(
ka,
ia,
ja)
1279 real(RP),
intent(out) :: pres(
ka,
ia,
ja)
1280 real(RP),
intent(in) :: dens(
ka,
ia,
ja)
1281 real(RP),
intent(in) :: pott(
ka,
ia,
ja)
1282 real(RP),
intent(in) :: qdry(
ka,
ia,
ja)
1283 real(RP),
intent(in) :: q (
ka,
ia,
ja,
qa)
1285 real(RP) :: Rmoist, cp
1287 integer :: i, j, k, iqw
1295 calc_cp(cp, qdry(k,i,j), q, k, i, j, iqw, cpdry,
aq_cp)
1296 calc_r(rmoist, q(k,i,j,
i_qv), qdry(k,i,j), rdry, rvap)
1297 calc_pre(pres(k,i,j), dens(k,i,j), pott(k,i,j), rmoist, cp, pre00)
1299 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)