Changeset 2890
- Timestamp:
- Feb 7, 2023, 4:13:21 PM (22 months ago)
- Location:
- trunk/LMDZ.GENERIC/libf/phystd
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.GENERIC/libf/phystd/calc_rayleigh.F90
r2889 r2890 122 122 enddo 123 123 124 !!!!!!! methane rayleigh verification125 tauconsti(igas_CH4) = 24.*pi**3/(1E5/(1.380648813E-23*273.15))**2 * 4./9. * 1E24 * (1/( g *16.04*1.6726*1E-27)) * scalep126 !* (4.6662E-4+4.02E-6/0.55**2)**2 / 0.55**4127 128 write(*,*) 'methane rayleigh verification', 24.*pi**3/(1E5/(1.380648813E-23*273.15))**2 * 4./9. * 1E24 * (1/( g *16.04*1.6726*1E-27)) &129 * (4.6662E-4+4.02E-6/0.55**2)**2 / 0.55**4130 131 !!!!!!! methane rayleigh verification132 133 124 if(.not.typeknown)then 134 125 print*,'Rayleigh scattering is for a mixed gas atmosphere.' … … 214 205 print*,'sig_R = ',TAURAY(icantbewrong)*g*mugaz*1.67e-27*100, & 215 206 'cm^2 molecule^-1' 216 !!!!!!! methane rayleigh verification217 print*,'methane rayleigh verification : tau_R_CH4 = ',TAURAYVAR(icantbewrong)*1013.25218 !!!!!!! methane rayleigh verification219 207 ENDIF 220 208 -
trunk/LMDZ.GENERIC/libf/phystd/condensation_generic_mod.F90
r2725 r2890 57 57 INTEGER i, k , nn, iq 58 58 INTEGER,PARAMETER :: nitermax=5000 59 INTEGER,PARAMETER :: tau= 14400.59 INTEGER,PARAMETER :: tau=86400 ! tau is in seconds and must not be lower than the physical step time. 60 60 DOUBLE PRECISION,PARAMETER :: alpha=.1,qthreshold=1.d-8 61 61 ! JL13: if "careful, T<Tmin in psat water" appears often, you may want to stabilise the model by … … 73 73 74 74 DOUBLE PRECISION zx_q(ngrid) 75 DOUBLE PRECISION zy_q(ngrid) 75 76 LOGICAL,SAVE :: firstcall=.true. 76 77 !$OMP THREADPRIVATE(firstcall) … … 125 126 endif 126 127 zx_q(i) = pq(i,k,igcm_generic_vap)+pdq(i,k,igcm_generic_vap)*ptimestep 127 ! iterative process to stabilize the scheme when large water amounts JL12 128 zcond(i) = 0.0d0 129 Do nn=1,nitermax 130 call Psat_generic(zt(i),local_p,metallicity,psat_tmp,zqs_temp) 131 zqs(i)=zqs_temp 132 call Lcpdqsat_generic(zt(i),local_p,psat_tmp,zqs_temp,zdqs,dlnpsat_tmp) 133 zcond_iter = alpha*(zx_q(i)-zqs(i))/(1.d0+zdqs) 134 !zcond can be negative here 135 zx_q(i) = zx_q(i) - zcond_iter 136 zcond(i) = zcond(i) + zcond_iter 137 zt(i) = zt(i) + zcond_iter*Lcp 138 if (ABS(zcond_iter/alpha/zqs(i)).lt.qthreshold) exit 139 if (nn.eq.nitermax) print*,'itermax in largescale' 140 End do ! niter 141 zcond(i)=MAX(zcond(i),-(pq(i,k,igcm_generic_ice)+pdq(i,k,igcm_generic_ice)*ptimestep)) 128 129 call Psat_generic(zt(i),local_p,metallicity,psat_tmp,zqs_temp) 130 zy_q(i) = pq(i,k,igcm_generic_ice)+pdq(i,k,igcm_generic_ice)*ptimestep 131 132 if ((zx_q(i) .le. zqs_temp) .and. (zy_q(i) .eq. 0.)) then 133 ! if we are are not saturated and if there is no ice 134 ! then no change 135 136 zcond(i) = 0.0d0 137 138 else ! if we are saturated : we must evaporate 139 ! if there is ice : we must check if we can condensate 140 141 ! iterative process to stabilize the scheme when large water amounts JL12 142 zcond(i) = 0.0d0 143 Do nn=1,nitermax 144 call Psat_generic(zt(i),local_p,metallicity,psat_tmp,zqs_temp) 145 zqs(i)=zqs_temp 146 call Lcpdqsat_generic(zt(i),local_p,psat_tmp,zqs_temp,zdqs,dlnpsat_tmp) 147 zcond_iter = alpha*(zx_q(i)-zqs(i))/(1.d0+zdqs) 148 !zcond can be negative here 149 zx_q(i) = zx_q(i) - zcond_iter 150 zcond(i) = zcond(i) + zcond_iter 151 zt(i) = zt(i) + zcond_iter*Lcp 152 if (ABS(zcond_iter/alpha/zqs(i)).lt.qthreshold) exit 153 if (nn.eq.nitermax) print*,'itermax in largescale' 154 End do ! niter 155 156 ! if zcond(i) > 0, zcond(i) is the amount of vapor that we can condensate 157 ! because we are saturated. zcond(i) will not change below 158 ! if zcond(i) < 0, zcond(i) is the amount of ice that we can evaporate. 159 ! We can not evaporate more than the existing ice, 160 ! so the line below is to check how much we can evaporate. 161 ! If there is no ice available, zcond(i) will be 0. (first condidition of "if") 162 163 zcond(i)=MAX(zcond(i),-(pq(i,k,igcm_generic_ice)+pdq(i,k,igcm_generic_ice)*ptimestep)) 164 165 endif 142 166 143 167 if (zcond(i) .gt. 0.) then … … 159 183 if (qvap_deep >= 0.) then 160 184 !brings lower generic vapor ratio to a fixed value. 161 ! tau =3600. seems too fast185 ! tau is in seconds and must not be lower than the physical step time. 162 186 pdqvaplsc(1:ngrid,1,igcm_generic_vap) = (qvap_deep - pq(1:ngrid,1,igcm_generic_vap))/tau - pdq(1:ngrid,1,igcm_generic_vap) 163 187 endif -
trunk/LMDZ.GENERIC/libf/phystd/physiq_mod.F90
r2875 r2890 300 300 ! For Atmospheric Temperatures : (K/s) 301 301 real dtlscale(ngrid,nlayer) ! Largescale routine. 302 real dt lscale_generic(ngrid,nlayer)! condensation_generic routine.302 real dt_generic_condensation(ngrid,nlayer) ! condensation_generic routine. 303 303 real zdtc(ngrid,nlayer) ! Condense_co2 routine. 304 304 real zdtdif(ngrid,nlayer) ! Turbdiff/vdifc routines. … … 424 424 !$OMP THREADPRIVATE(metallicity) 425 425 426 real reffrad_generic_zeros_for_wrf(ngrid,nlayer) ! !!! this is temporary, it is only a list of zeros, it will be replaced when a generic aerosol will be implemented 427 426 428 logical clearsky ! For double radiative transfer call. By BC 427 429 … … 955 957 956 958 endif 957 end do ! do iq=1,nq loop on tracers959 end do ! do iq=1,nq loop on tracers 958 960 ! take into account generic condensable specie (GCS) effect on mean molecular weight 959 961 … … 1619 1621 if (generic_condensation) then 1620 1622 call condensation_generic(ngrid,nlayer,nq,ptimestep,pplev,pplay, & 1621 pt,pq,pdt,pdq,dt lscale_generic, &1623 pt,pq,pdt,pdq,dt_generic_condensation, & 1622 1624 dqvaplscale_generic,dqcldlscale_generic,rneb_generic) 1623 pdt(1:ngrid,1:nlayer) = pdt(1:ngrid,1:nlayer)+dt lscale_generic(1:ngrid,1:nlayer)1625 pdt(1:ngrid,1:nlayer) = pdt(1:ngrid,1:nlayer)+dt_generic_condensation(1:ngrid,1:nlayer) 1624 1626 pdq(1:ngrid,1:nlayer,1:nq) = pdq(1:ngrid,1:nlayer,1:nq)+dqvaplscale_generic(1:ngrid,1:nlayer,1:nq) 1625 1627 pdq(1:ngrid,1:nlayer,1:nq) = pdq(1:ngrid,1:nlayer,1:nq)+dqcldlscale_generic(1:ngrid,1:nlayer,1:nq) … … 1627 1629 if(enertest)then 1628 1630 do ig=1,ngrid 1629 genericconddE(ig) = cpp*SUM(mass(:,:)*dt lscale_generic(:,:))1631 genericconddE(ig) = cpp*SUM(mass(:,:)*dt_generic_condensation(:,:)) 1630 1632 enddo 1631 1633 1632 call planetwide_sumval(cpp*massarea(:,:)*dt lscale_generic(:,:)/totarea_planet,dEtot)1634 call planetwide_sumval(cpp*massarea(:,:)*dt_generic_condensation(:,:)/totarea_planet,dEtot) 1633 1635 1634 1636 if (is_master) print*,'In generic condensation atmospheric energy change =',dEtot,' W m-2' … … 2469 2471 2470 2472 call writediagfi(ngrid,"genericconddE","heat from generic condensation","W m-2",2,genericconddE) 2473 call writediagfi(ngrid,"dt_generic_condensation","heating from generic condensation","K s-1",3,dt_generic_condensation) 2471 2474 2472 2475 endif … … 2593 2596 comm_DTLSC(1:ngrid,1:nlayer)=dtlscale(1:ngrid,1:nlayer) 2594 2597 comm_RH(1:ngrid,1:nlayer)=RH(1:ngrid,1:nlayer) 2598 2599 else if ((tracer).and.(generic_condensation).and.(.not. water)) then 2600 2601 ! If you have set generic_condensation (and not water) and you have set several GCS 2602 ! then the outputs given to WRF will be only the ones for the last generic tracer 2603 ! (Because it is rewritten every tracer in the loop) 2604 ! WRF can take only one moist tracer 2605 2606 do iq=1,nq 2607 call generic_tracer_index(nq,iq,igcm_generic_vap,igcm_generic_ice,call_ice_vap_generic) 2608 2609 if (call_ice_vap_generic) then ! to call only one time the ice/vap pair of a tracer 2610 2611 reffrad_generic_zeros_for_wrf(:,:) = 1. 2612 2613 comm_CLOUDFRAC(1:ngrid,1:nlayer) = cloudfrac(1:ngrid,1:nlayer) 2614 comm_TOTCLOUDFRAC(1:ngrid) = totcloudfrac(1:ngrid) !?????? 2615 comm_SURFRAIN(1:ngrid) = zdqsrain_generic(1:ngrid,iq) 2616 comm_DQVAP(1:ngrid,1:nlayer) = pdq(1:ngrid,1:nlayer,igcm_generic_vap) 2617 comm_DQICE(1:ngrid,1:nlayer)=pdq(1:ngrid,1:nlayer,igcm_generic_ice) 2618 comm_H2OICE_REFF(1:ngrid,1:nlayer) = reffrad_generic_zeros_for_wrf(1:ngrid,1:nlayer) ! for now zeros ! 2619 !comm_H2OICE_REFF(1:ngrid,1:nlayer) = 0*zdtrain_generic(1:ngrid,1:nlayer) ! for now zeros ! 2620 comm_REEVAP(1:ngrid) = reevap_precip_generic(1:ngrid,iq) 2621 comm_DTRAIN(1:ngrid,1:nlayer) = zdtrain_generic(1:ngrid,1:nlayer) 2622 comm_DTLSC(1:ngrid,1:nlayer) = dt_generic_condensation(1:ngrid,1:nlayer) 2623 comm_RH(1:ngrid,1:nlayer) = RH_generic(1:ngrid,1:nlayer,iq) 2624 2625 endif 2626 end do ! do iq=1,nq loop on tracers 2627 2595 2628 else 2596 2629 comm_CLOUDFRAC(1:ngrid,1:nlayer)=0. … … 2604 2637 comm_DTLSC(1:ngrid,1:nlayer)=0. 2605 2638 comm_RH(1:ngrid,1:nlayer)=0. 2606 endif 2639 2640 endif ! if water, if generic_condensation, else 2641 2607 2642 comm_FLUXTOP_DN(1:ngrid)=fluxtop_dn(1:ngrid) 2608 2643 comm_FLUXABS_SW(1:ngrid)=fluxabs_sw(1:ngrid)
Note: See TracChangeset
for help on using the changeset viewer.