diff --git a/tj2016/tj2016_precip.F90 b/tj2016/tj2016_precip.F90 index 5587486e..f497ea63 100644 --- a/tj2016/tj2016_precip.F90 +++ b/tj2016/tj2016_precip.F90 @@ -40,7 +40,7 @@ subroutine tj2016_precip_run(ncol, pver, gravit, rairv, real(kind_phys), intent(in) :: pmid(:,:) ! mid-point pressure (Pa) real(kind_phys), intent(in) :: pdel(:,:) ! layer thickness (Pa) - real(kind_phys), intent(inout) :: T(:,:) ! air temperature (K) + real(kind_phys), intent(in) :: T(:,:) ! air temperature (K) real(kind_phys), intent(inout) :: qv(:,:) ! specific humidity Q (kg/kg) real(kind_phys), intent(out) :: relhum(:,:) ! relative humidity @@ -62,7 +62,7 @@ subroutine tj2016_precip_run(ncol, pver, gravit, rairv, ! Variables for condensation, precipitation, and temperature real(kind_phys) :: qsat ! saturation value for Q (kg/kg) real(kind_phys) :: tmp, tmp_t, tmp_q - real(kind_phys) :: stateT(ncol, pver) ! air temperature (K) _before_ run + real(kind_phys) :: localT(ncol, pver) ! air temperature (K) _before_ run ! Loop variables integer :: i, k @@ -89,7 +89,7 @@ subroutine tj2016_precip_run(ncol, pver, gravit, rairv, !========================================================================= ! Large-Scale Condensation and Precipitation without cloud stage !========================================================================= - stateT = T + localT = T do k = 1, pver do i = 1, ncol qsat = epsilo*e0/pmid(i,k)*exp(-latvap/rh2o*((1._kind_phys/T(i,k))-1._kind_phys/T0)) ! saturation value for Q @@ -99,17 +99,16 @@ subroutine tj2016_precip_run(ncol, pver, gravit, rairv, tmp_t = latvap/cpairv(i,k)*tmp ! dT/dt tendency from large-scale condensation tmp_q = -tmp ! dqv/dt tendency from large-scale condensation precl(i) = precl(i) + tmp*pdel(i,k)/(gravit*rhoh2o) ! large-scale precipitation rate (m/s) - T(i,k) = T(i,k) + tmp_t*dtime ! update T (temperature) + localT(i,k) = localT(i,k) + tmp_t*dtime ! update T (temperature) qv(i,k) = qv(i,k) + tmp_q*dtime ! update qv (specific humidity) ! recompute qsat with updated T - qsat = epsilo*e0/pmid(i,k)*exp(-latvap/rh2o*((1._kind_phys/T(i,k))-1._kind_phys/T0)) ! saturation value for Q + qsat = epsilo*e0/pmid(i,k)*exp(-latvap/rh2o*((1._kind_phys/localT(i,k))-1._kind_phys/T0)) ! saturation value for Q end if relhum(i,k) = qv(i,k) / qsat * 100._kind_phys ! in percent - tendency_of_air_enthalpy(i,k) = (T(i,k) - stateT(i,k)) / dtime * cpairv(i,k) + tendency_of_air_enthalpy(i,k) = (localT(i,k) - T(i,k)) / dtime * cpairv(i,k) end do end do - end subroutine tj2016_precip_run end module TJ2016_precip diff --git a/tj2016/tj2016_precip.meta b/tj2016/tj2016_precip.meta index 2dcbef69..a4cd7705 100644 --- a/tj2016/tj2016_precip.meta +++ b/tj2016/tj2016_precip.meta @@ -94,7 +94,7 @@ units = K type = real | kind = kind_phys dimensions = (horizontal_loop_extent, vertical_layer_dimension) - intent = inout + intent = in [ qv ] standard_name = water_vapor_mixing_ratio_wrt_moist_air_and_condensed_water units = kg kg-1