Changeset 1993 for trunk/LMDZ.GENERIC/libf/phystd/largescale.F90
- Timestamp:
- Aug 29, 2018, 4:41:34 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.GENERIC/libf/phystd/largescale.F90
r1830 r1993 5 5 use ioipsl_getin_p_mod, only: getin_p 6 6 use watercommon_h, only : RLVTT, RCPD, RVTMP2, & 7 T_h2O_ice_clouds,T_h2O_ice_liq,Psat_water DP,Lcpdqsat_waterDP7 T_h2O_ice_clouds,T_h2O_ice_liq,Psat_water,Lcpdqsat_water 8 8 USE tracer_h 9 9 IMPLICIT none … … 50 50 ! JL13: if "careful, T<Tmin in psat water" appears often, you may want to stabilise the model by 51 51 ! decreasing alpha and increasing nitermax accordingly 52 DOUBLE PRECISION z t(ngrid), zq(ngrid)52 DOUBLE PRECISION zq(ngrid) 53 53 DOUBLE PRECISION zcond(ngrid),zcond_iter 54 54 DOUBLE PRECISION zdelq(ngrid) 55 DOUBLE PRECISION zqs(ngrid) , zdqs(ngrid)56 DOUBLE PRECISION local_p,psat_tmp,dlnpsat_tmp,Lcp55 DOUBLE PRECISION zqs(ngrid) 56 real zt(ngrid),local_p,psat_tmp,dlnpsat_tmp,Lcp,zqs_temp,zdqs 57 57 58 58 ! evaporation calculations … … 106 106 ! zt(i)=15. ! check too low temperatures 107 107 endif 108 call Psat_waterDP(zt(i),local_p,psat_tmp,zqs(i)) 108 call Psat_water(zt(i),local_p,psat_tmp,zqs_temp) 109 zqs(i)=zqs_temp 109 110 110 111 zdelq(i) = MAX(MIN(ratqs * zq(i),1.-zq(i)),1.d-12) … … 127 128 zcond(i) = 0.0d0 128 129 Do nn=1,nitermax 129 call Psat_waterDP(zt(i),local_p,psat_tmp,zqs(i)) 130 call Lcpdqsat_waterDP(zt(i),local_p,psat_tmp,zqs(i),zdqs(i),dlnpsat_tmp) 131 zcond_iter = alpha*(zx_q(i)-zqs(i))/(1.d0+zdqs(i)) 130 call Psat_water(zt(i),local_p,psat_tmp,zqs_temp) 131 zqs(i)=zqs_temp 132 call Lcpdqsat_water(zt(i),local_p,psat_tmp,zqs_temp,zdqs,dlnpsat_tmp) 133 zcond_iter = alpha*(zx_q(i)-zqs(i))/(1.d0+zdqs) 132 134 !zcond can be negative here 133 135 zx_q(i) = zx_q(i) - zcond_iter … … 150 152 zcond(i) = 0.0d0 151 153 Do nn=1,nitermax 152 call Lcpdqsat_water DP(zt(i),local_p,psat_tmp,zqs(i),zdqs(i),dlnpsat_tmp)153 zcond_iter = MAX(0.0d0,alpha*(zx_q(i)-zqs(i))/(1.d0+zdqs (i)))154 call Lcpdqsat_water(zt(i),local_p,psat_tmp,zqs(i),zdqs,dlnpsat_tmp) 155 zcond_iter = MAX(0.0d0,alpha*(zx_q(i)-zqs(i))/(1.d0+zdqs)) 154 156 !zcond always postive! cannot evaporate clouds! 155 157 !this is why we must reevaporate before largescale … … 159 161 ! if (ABS(zcond_iter/alpha).lt.qthreshold) exit 160 162 zt(i) = zt(i) + zcond_iter*Lcp*rneb(i,k) 161 call Psat_waterDP(zt(i),local_p,psat_tmp,zqs(i)) 163 call Psat_water(zt(i),local_p,psat_tmp,zqs_temp) 164 zqs(i)=zqs_temp 162 165 if (nn.eq.nitermax) print*,'itermax in largescale' 163 166 End do ! niter … … 172 175 pdqvaplsc(1:ngrid,k) = dqevap(1:ngrid,k) - zcond(1:ngrid) 173 176 pdqliqlsc(1:ngrid,k) = - pdqvaplsc(1:ngrid,k) 174 pdtlsc(1:ngrid,k) = pdqliqlsc(1:ngrid,k)* real(Lcp)177 pdtlsc(1:ngrid,k) = pdqliqlsc(1:ngrid,k)*Lcp 175 178 176 179 Enddo ! k= nlayer, 1, -1
Note: See TracChangeset
for help on using the changeset viewer.