Changeset 875 for trunk/LMDZ.GENERIC
- Timestamp:
- Feb 11, 2013, 11:06:56 AM (12 years ago)
- Location:
- trunk/LMDZ.GENERIC
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.GENERIC/README
r873 r875 896 896 - Cosmetic changes in optcv (mostly spaces and line breaks) 897 897 ... so that comparisons with optci are easy e.g. through vimdiff 898 899 == 11/02/2013 == JL 900 - Updated moist convection scheme to handle situations with a large water vapor content 901 - Added a keyword to enable ocean runoff in callphys.def (activerunoff) 902 903 904 -
trunk/LMDZ.GENERIC/libf/phystd/hydrol.F90
r863 r875 3 3 albedo0,albedo,mu0,pdtsurf,pdtsurf_hyd,hice) 4 4 5 use ioipsl_getincom 5 6 use watercommon_h, only: T_h2O_ice_liq, RLFTT, rhowater, mx_eau_sol 6 7 USE surfdat_h … … 55 56 parameter (oceantime=10*24*3600) 56 57 57 logical oceanbulkavg ! relax ocean temperatures to a GLOBAL mean value?58 logical activerunoff ! enable simple runoff scheme?59 logical oceanalbvary ! ocean albedo varies with the diurnal cycle?58 logical,save :: oceanbulkavg ! relax ocean temperatures to a GLOBAL mean value? 59 logical,save :: activerunoff ! enable simple runoff scheme? 60 logical,save :: oceanalbvary ! ocean albedo varies with the diurnal cycle? 60 61 61 62 ! Arguments … … 97 98 data firstcall /.true./ 98 99 99 oceanbulkavg=.false.100 activerunoff=.false.101 oceanalbvary=.false.102 100 103 101 if(firstcall)then 104 102 103 oceanbulkavg=.false. 104 oceanalbvary=.false. 105 write(*,*)"Activate runnoff into oceans?" 106 activerunoff=.false. 107 call getin("activerunoff",activerunoff) 108 write(*,*)" activerunoff = ",activerunoff 109 110 111 105 112 ALLOCATE(runoff(ngrid)) 106 113 -
trunk/LMDZ.GENERIC/libf/phystd/largescale.F90
r863 r875 50 50 EXTERNAL CBRT 51 51 INTEGER i, k , nn 52 INTEGER,PARAMETER :: nitermax=1000 53 REAL,PARAMETER :: alpha=.5,qthreshold=1.e-6 52 INTEGER,PARAMETER :: nitermax=2000 53 REAL,PARAMETER :: alpha=.5,qthreshold=1.e-6 54 ! JL13: if "careful, T<Tmin in psat water" appears often, you may want to stabilise the model by 55 ! decreasing alpha and increasing nitermax accordingly 54 56 REAL zt(ngrid), zq(ngrid) 55 57 REAL zcond(ngrid),zcond_iter 56 58 REAL zdelq(ngrid) 57 59 REAL zqs(ngrid), zdqs(ngrid) 58 REAL psat_tmp 60 REAL psat_tmp,dlnpsat_tmp 59 61 60 62 ! evaporation calculations … … 115 117 Do nn=1,nitermax 116 118 call Psat_water(zt(i),pplay(i,k),psat_tmp,zqs(i)) 117 call Lcpdqsat_water(zt(i),pplay(i,k),psat_tmp,zqs(i),zdqs(i) )119 call Lcpdqsat_water(zt(i),pplay(i,k),psat_tmp,zqs(i),zdqs(i),dlnpsat_tmp) 118 120 zcond_iter = alpha*(zx_q(i)-zqs(i))/(1.+zdqs(i)) 119 121 !zcond can be negative here … … 131 133 zcond(i) = 0.0 132 134 Do nn=1,nitermax 133 call Lcpdqsat_water(zt(i),pplay(i,k),psat_tmp,zqs(i),zdqs(i) )135 call Lcpdqsat_water(zt(i),pplay(i,k),psat_tmp,zqs(i),zdqs(i),dlnpsat_tmp) 134 136 zcond_iter = MAX(0.0,alpha*(zx_q(i)-zqs(i))/(1.+zdqs(i))) 135 137 !zcond always postive! cannot evaporate clouds! -
trunk/LMDZ.GENERIC/libf/phystd/moistadj.F90
r787 r875 1 1 subroutine moistadj(ngrid, nq, pt, pq, pdq, pplev, pplay, pdtmana, pdqmana, ptimestep, rneb) 2 2 3 use watercommon_h, only: T_h2O_ice_liq, RLVTT, RCPD, Psat_water, Lcpdqsat_water3 use watercommon_h, only: T_h2O_ice_liq, RLVTT, RCPD, RCPV, Psat_water, Lcpdqsat_water 4 4 USE tracer_h 5 5 … … 59 59 REAL cp_delta_t(nlayermx) 60 60 REAL v_cptj(nlayermx), v_cptjk1, v_ssig 61 REAL v_cptt(ngrid,nlayermx), v_p, v_t, zpsat62 REAL zqs(ngrid,nlayermx), zdqs(ngrid,nlayermx) 61 REAL v_cptt(ngrid,nlayermx), v_p, v_t, v_zqs,v_cptt2,v_pratio,v_dlnpsat 62 REAL zqs(ngrid,nlayermx), zdqs(ngrid,nlayermx),zpsat(ngrid,nlayermx),zdlnpsat(ngrid,nlayermx) 63 63 REAL zq1(ngrid), zq2(ngrid) 64 64 REAL gamcpdz(ngrid,2:nlayermx) … … 122 122 v_p = pplay(i,k) 123 123 124 call Psat_water(v_t,v_p,zpsat ,zqs(i,k))125 call Lcpdqsat_water(v_t,v_p,zpsat ,zqs(i,k),zdqs(i,k))124 call Psat_water(v_t,v_p,zpsat(i,k),zqs(i,k)) 125 call Lcpdqsat_water(v_t,v_p,zpsat(i,k),zqs(i,k),zdqs(i,k),zdlnpsat(i,k)) 126 126 ENDDO 127 127 ENDDO … … 132 132 zdp = pplev(i,k)-pplev(i,k+1) 133 133 zdpm = pplev(i,k-1)-pplev(i,k) 134 gamcpdz(i,k) = ( ( R/RCPD /(zdpm+zdp) * (v_cptt(i,k-1)*zdpm + v_cptt(i,k)*zdp) & 135 + RLVTT /(zdpm+zdp) * (zqs(i,k-1)*zdpm + zqs(i,k)*zdp) ) & 136 * (pplay(i,k-1)-pplay(i,k)) / pplev(i,k) ) & 137 / (1.0+ (zdqs(i,k-1)*zdpm + zdqs(i,k)*zdp)/(zdpm+zdp) ) 134 ! gamcpdz(i,k) = ( ( R/RCPD /(zdpm+zdp) * (v_cptt(i,k-1)*zdpm + v_cptt(i,k)*zdp) & 135 ! + RLVTT /(zdpm+zdp) * (zqs(i,k-1)*zdpm + zqs(i,k)*zdp) ) & 136 ! * (pplay(i,k-1)-pplay(i,k)) / pplev(i,k) ) & 137 ! / (1.0+ (zdqs(i,k-1)*zdpm + zdqs(i,k)*zdp)/(zdpm+zdp) ) 138 ! general case where water is not a trace gas (JL13) 139 v_zqs = (zqs(i,k-1)*zdpm + zqs(i,k)*zdp)/(zdpm+zdp) 140 v_cptt2 = (v_cptt(i,k-1)*zdpm + v_cptt(i,k)*zdp)/(zdpm+zdp) 141 v_pratio = ((1./(1.+zpsat(i,k-1)/pplay(i,k-1)))*zdpm + (1./(1.+zpsat(i,k)/pplay(i,k)))*zdp)/(zdpm+zdp) 142 v_dlnpsat = (zdlnpsat(i,k-1)*zdpm + zdlnpsat(i,k)*zdp)/(zdpm+zdp) 143 gamcpdz(i,k) = v_pratio*( (R/RCPD*v_cptt2*(1.- v_zqs) + RLVTT*v_zqs) * (pplay(i,k-1)-pplay(i,k))/pplev(i,k) ) & 144 / ((1.- v_zqs) + v_zqs * RCPV/RCPD + v_zqs * v_pratio * v_dlnpsat) 138 145 ENDDO 139 146 ENDDO … … 200 207 v_p = pplay(i,k) 201 208 202 call Psat_water(v_t,v_p,zpsat ,zqs(i,k))203 call Lcpdqsat_water(v_t,v_p,zpsat ,zqs(i,k),zdqs(i,k))209 call Psat_water(v_t,v_p,zpsat(i,k),zqs(i,k)) 210 call Lcpdqsat_water(v_t,v_p,zpsat(i,k),zqs(i,k),zdqs(i,k),zdlnpsat(i,k)) 204 211 205 212 … … 226 233 zdpm = pplev(i,k-1) - pplev(i,k) 227 234 zdp = pplev(i,k) - pplev(i,k+1) 228 gamcpdz(i,k) = ( ( R/RCPD /(zdpm+zdp) * (v_cptt(i,k-1)*zdpm + v_cptt(i,k)*zdp) & 229 + RLVTT /(zdpm+zdp) * (zqs(i,k-1)*zdpm + zqs(i,k)*zdp) ) & 230 * (pplay(i,k-1)-pplay(i,k)) / pplev(i,k) ) & 231 / (1.0+ (zdqs(i,k-1)*zdpm + zdqs(i,k)*zdp)/(zdpm+zdp) ) 235 ! gamcpdz(i,k) = ( ( R/RCPD /(zdpm+zdp) * (v_cptt(i,k-1)*zdpm + v_cptt(i,k)*zdp) & 236 ! + RLVTT /(zdpm+zdp) * (zqs(i,k-1)*zdpm + zqs(i,k)*zdp) ) & 237 ! * (pplay(i,k-1)-pplay(i,k)) / pplev(i,k) ) & 238 ! / (1.0+ (zdqs(i,k-1)*zdpm + zdqs(i,k)*zdp)/(zdpm+zdp) ) 239 ! general case where water is not a trace gas (JL13) 240 v_zqs = (zqs(i,k-1)*zdpm + zqs(i,k)*zdp)/(zdpm+zdp) 241 v_cptt2 = (v_cptt(i,k-1)*zdpm + v_cptt(i,k)*zdp)/(zdpm+zdp) 242 v_pratio = ((1./(1.+zpsat(i,k-1)/pplay(i,k-1)))*zdpm + (1./(1.+zpsat(i,k)/pplay(i,k)))*zdp)/(zdpm+zdp) 243 v_dlnpsat = (zdlnpsat(i,k-1)*zdpm + zdlnpsat(i,k)*zdp)/(zdpm+zdp) 244 gamcpdz(i,k) = v_pratio*( (R/RCPD*v_cptt2*(1.- v_zqs) + RLVTT*v_zqs) * (pplay(i,k-1)-pplay(i,k))/pplev(i,k) ) & 245 / ((1.- v_zqs) + v_zqs * RCPV/RCPD + v_zqs * v_pratio * v_dlnpsat) 232 246 ENDDO 233 247 -
trunk/LMDZ.GENERIC/libf/phystd/su_watercycle.F90
r728 r875 1 1 subroutine su_watercycle 2 2 3 ! to use 'getin'4 use ioipsl_getincom5 3 use watercommon_h 6 4 implicit none … … 28 26 RV = 1000.*8.314/mH2O ! caution! R is R/mugaz already! 29 27 30 RCPV = 4. *RV ! could be more precise... 31 !RCPV = 5/2 *8.31*1000/mH2O ! BC modif here: doesn't appear to be correct 28 RCPV = 1.88e3 ! specific heat capacity of water vapor at 350K 32 29 33 30 RVTMP2 = RCPV/RCPD-1. ! not currently used... -
trunk/LMDZ.GENERIC/libf/phystd/watercommon_h.F90
r786 r875 77 77 78 78 !================================================================== 79 subroutine Lcpdqsat_water(T,p,psat,qsat,dqsat )79 subroutine Lcpdqsat_water(T,p,psat,qsat,dqsat,dlnpsat) 80 80 81 81 implicit none … … 84 84 ! Purpose 85 85 ! ------- 86 ! Compute L/cp*d (q_sat)/d T86 ! Compute dqsat=L/cp*d (q_sat)/d T and dlnpsat=L/cp d(ln Psat)/d T 87 87 ! for a given temperature (K)! 88 88 ! Based on the Tetens formula from L.Li physical parametrization manual … … 98 98 99 99 ! output 100 real dqsat 100 real dqsat,dlnpsat 101 101 102 102 ! JL12 variables for tetens formula … … 125 125 126 126 dqsat=RLVTT/RCPD*qsat*(p/(p-(1.-epsi)*psat))*dummy 127 dlnpsat=RLVTT/RCPD*dummy 127 128 return 128 129 end subroutine Lcpdqsat_water
Note: See TracChangeset
for help on using the changeset viewer.