Changeset 5082 for LMDZ6/branches/Amaury_dev/libf/phylmd/Dust
- Timestamp:
- Jul 19, 2024, 5:41:58 PM (13 months ago)
- Location:
- LMDZ6/branches/Amaury_dev/libf/phylmd/Dust
- Files:
-
- 23 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/aeropt_spl.F
r4593 r5082 130 130 rh=MIN(RHcl(i,k)*100.,RH_MAX) 131 131 RH_num = INT( rh/10. + 1.) 132 IF (rh .gt.85.) RH_num=10133 IF (rh .gt.90.) RH_num=11132 IF (rh>85.) RH_num=10 133 IF (rh>90.) RH_num=11 134 134 c IF (rh.gt.40.) THEN 135 135 c RH_num=5 ! Added by NHL temporarily -
LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/checknanqfi.F90
r2630 r5082 21 21 ENDIF 22 22 ENDDO 23 IF (jbad .GT.0) THEN23 IF (jbad>0) THEN 24 24 WRITE(*,*)comment 25 25 DO i = 1, jbad -
LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/coarsemission.F
r4593 r5082 197 197 198 198 DO i=1,klon 199 if (maskd(i) .gt.0) then199 if (maskd(i)>0) then 200 200 IF(id_fine>0) source_tr(i,id_fine)= 201 201 . scale_param_dustacc(iregion_dust(i))* -
LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/dustemission_mod.F90
r3806 r5082 482 482 ! 1440 = 15 days 483 483 ! 480 = 5 days 484 if (MOD(counter,1440) .eq.0) THEN484 if (MOD(counter,1440)== 0) THEN 485 485 !if (MOD(counter,480).eq. 0) THEN 486 486 do k = 1,klon … … 760 760 dp=dp*exp(dstep) 761 761 sizeclass(i)=dp 762 if(dp .ge.dmax+eps)goto 30762 if(dp>=dmax+eps)goto 30 763 763 newstep(i)=dstep 764 764 ! WRITE(18,*)i,sizeclass(i) … … 769 769 print*,' soil size classes used ',ncl,' / ',nclass 770 770 print*,' soil size min: ',sizeclass(1),' soil size max: ',sizeclass(ncl) 771 if(ncl .gt.nclass)stop771 if(ncl>nclass)stop 772 772 773 773 ! Threshold velocity: … … 780 780 cc=sqrt(1+ddust*(sizeclass(i)**(-2.5))) 781 781 xk=sqrt(abs(rop*gravity*sizeclass(i)/roa)) 782 if (bb .lt.10.) then782 if (bb<10.) then 783 783 dd=sqrt(1.928*(bb**0.092)-1.) 784 784 uth(i)=0.129*xk*cc/dd … … 817 817 nsi=((j-1)*3)+2 818 818 npi=((j-1)*3)+3 819 IF (solspe(ns,nd) .EQ.0.)THEN819 IF (solspe(ns,nd)==0.)THEN 820 820 su_loc=0. 821 821 ELSE … … 833 833 END DO 834 834 DO i=1,ncl 835 IF (subsoildist(i) .gt.0..and.stotale.gt.0.)THEN835 IF (subsoildist(i)>0..and.stotale>0.)THEN 836 836 srel(ns,i)=subsoildist(i)/stotale 837 837 … … 854 854 do k=1,ntyp 855 855 ! print*,'IKKK ',i,klon,k,ntyp 856 if (zos(i,k) .eq.0..or.z01(i,k).eq.0.) then856 if (zos(i,k)==0..or.z01(i,k)==0.) then 857 857 ! if (zos(i,k)<=0..or.z01(i,k)<=0.) then 858 858 ! if (zos(i,k)<0..or.z01(i,k)<0.) then … … 873 873 ! drag partition between zo1 and zo2 874 874 ! feff: total efficient fraction 875 if(D(i,k) .eq.0.)then875 if(D(i,k)==0.)then 876 876 feff(i,k)=cc 877 877 ! print*,'IKKK C ',i,klon,k,ntyp … … 882 882 ! print*,'IKKK D ',i,klon,k,ntyp 883 883 endif 884 if (feff(i,k) .lt.0.)feff(i,k)=0.885 if (feffdbg(i,k) .lt.0.)feffdbg(i,k)=0.886 if (feff(i,k) .gt.1.)feff(i,k)=1.887 if (feffdbg(i,k) .gt.1.)feffdbg(i,k)=1.884 if (feff(i,k)<0.)feff(i,k)=0. 885 if (feffdbg(i,k)<0.)feffdbg(i,k)=0. 886 if (feff(i,k)>1.)feff(i,k)=1. 887 if (feffdbg(i,k)>1.)feffdbg(i,k)=1. 888 888 ! print*,'IKKK E ',i,klon,k,ntyp 889 889 endif … … 891 891 enddo 892 892 ! JE20150120<< 893 if (flag_feff .eq.0) then893 if (flag_feff == 0) then 894 894 print *,'JE_dbg FORCED deactivated feff' 895 895 do i=1,klon … … 1208 1208 - 0.5*log(auxreal/(2.*pi))+1./(12.*auxreal) & 1209 1209 -1./(360.*(auxreal**3.))+1./(1260.*(auxreal**5.))) 1210 IF(nwb .gt.1)THEN1210 IF(nwb>1)THEN 1211 1211 wind10ms(kwb)=kwb*2.*U10mMOD/nwb 1212 1212 !original … … 1220 1220 probu(kwb)=pdfu*2.*U10mMOD/nwb 1221 1221 pdfcum=pdfcum+probu(kwb) 1222 IF(probu(kwb) .le.1.e-2)GOTO 701222 IF(probu(kwb)<=1.e-2)GOTO 70 1223 1223 ELSE 1224 1224 wind10ms(kwb)=U10mMOD … … 1235 1235 ! nat=int(sol(i,n)) 1236 1236 ! print *,i,n 1237 IF(sol(i,n) .gt.1..and.sol(i,n).lt.15.) nat=int(sol(i,n))1237 IF(sol(i,n)>1..and.sol(i,n)<15.) nat=int(sol(i,n)) 1238 1238 !JE20140526<< 1239 1239 ! print *,'JE: WARNING: nat=0 forced to nat=99!! and doing nothing' 1240 IF(sol(i,n) .lt.0.5) THEN1240 IF(sol(i,n)<0.5) THEN 1241 1241 nat=99 1242 1242 GOTO 80 … … 1247 1247 !IF(n.eq.1.and.nat.eq.99)GOTO 80 1248 1248 ! if(n.eq.1) print*,'nat1=',nat,'sol1=',sol(i,n) 1249 IF(n .eq.1.and.nat.eq.99)GOTO 801249 IF(n==1.and.nat==99)GOTO 80 1250 1250 1251 1251 ENDIF … … 1261 1261 cpcent=P(i,n) 1262 1262 ustarsalt=0. 1263 IF(ceff .le.0..or.z0salt.eq.0.)GOTO 801264 IF(cerod .eq.0.or.cpcent.eq.0.)GOTO 801263 IF(ceff<=0..or.z0salt==0.)GOTO 80 1264 IF(cerod==0.or.cpcent==0.)GOTO 80 1265 1265 ! in cm: utmin, umin, z10m, z0salt, ustarns 1266 1266 ! in meters: modwm … … 1273 1273 1274 1274 1275 IF(ustarsalt .lt.umin/ceff)GOTO 801275 IF(ustarsalt<umin/ceff)GOTO 80 1276 1276 ! print*,'ustarsalt = ',ustarsalt 1277 1277 !---------------------------------------- … … 1281 1281 do ni=1,kfin 1282 1282 fdp1=1.-(uth2(ni)/(ceff*ustarsalt)) 1283 if (fdp1 .le.0..or.srel2(nat,ni).eq.0.) then1283 if (fdp1<=0..or.srel2(nat,ni)==0.) then 1284 1284 ad1=0. 1285 1285 ad2=0. … … 1297 1297 t2=0. 1298 1298 t3=0. 1299 if(ec .ge.e1)t1=1.1300 if(ec .ge.e2)t2=1.1301 if(ec .ge.e3)t3=1.1302 if(dfec3 .ne.0.)then1299 if(ec>=e1)t1=1. 1300 if(ec>=e2)t2=1. 1301 if(ec>=e3)t3=1. 1302 if(dfec3/=0.)then 1303 1303 p1=t1*dfec1/dfec3 1304 1304 p2=t2*(1.-p1)*dfec2/dfec3 … … 1409 1409 srel2(nat,kfin)=srel(nat,i)*istep 1410 1410 enddo 1411 if(kfin .ge.nclass)then1411 if(kfin>=nclass)then 1412 1412 print*,'$$$$ Tables dimension problem:',kfin,'>',nclass 1413 1413 endif … … 1440 1440 ihalf=int((ismax+ismin)/2.) 1441 1441 do k2=1,1000000 1442 if(ds .gt.siz(ihalf))then1442 if(ds>siz(ihalf))then 1443 1443 ismin=ihalf 1444 1444 else … … 1447 1447 ihalf=int((ismax+ismin)/2.) 1448 1448 idiff=ismax-ismin 1449 if(idiff .le.1)then1449 if(idiff<=1)then 1450 1450 iout=ismin 1451 1451 goto 52 … … 1453 1453 enddo 1454 1454 52 continue 1455 if(iout .eq.0)then1455 if(iout==0)then 1456 1456 print*,'$$$$ Tables dimension problem: ',iout 1457 1457 endif … … 1519 1519 diffmol1(nb)=dmn1*(1.+dmn2+dmn3) 1520 1520 diffmol2(nb)=bolz*temp*Cc/(3.*pi*muair*binsHRcm(nb)) 1521 IF(idiffusi .EQ.1)diffmole(nb)=diffmol1(nb)1522 IF(idiffusi .EQ.2)diffmole(nb)=diffmol2(nb)1521 IF(idiffusi==1)diffmole(nb)=diffmol1(nb) 1522 IF(idiffusi==2)diffmole(nb)=diffmol2(nb) 1523 1523 schmidtnumb(nb)=nuair/diffmole(nb) 1524 1524 St=setvel(nb)*ustarbin*ustarbin/(gravity*nuair) 1525 1525 rb=1./(ustarbin*((schmidtnumb(nb))**(-2./3.)+10.**(-3./St))) 1526 1526 !c wesely (primarily designed for gases) 1527 IF(idrydep .EQ.1)THEN1527 IF(idrydep==1)THEN 1528 1528 vdout(nb)=1./(ra+rb+ra*rb*setvel(nb))+setvel(nb) 1529 1529 END IF 1530 1530 !c venkatram and pleim (more adaptated to particles but numerically unstable) 1531 IF(idrydep .EQ.2)THEN1531 IF(idrydep==2)THEN 1532 1532 rexp=exp(-(ra+rb)*setvel(nb)) 1533 1533 vdout(nb)=setvel(nb)/(1.-rexp) -
LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/finemission.F
r4593 r5082 65 65 66 66 DO i=1,klon 67 IF (iregion_ind(i) .GT.0) THEN67 IF (iregion_ind(i)>0) THEN 68 68 IF(id_fine>0) source_tr(i,id_fine)=source_tr(i,id_fine)+ 69 69 . (scale_param_ff(iregion_ind(i))*lmt_bcff(i)+ !g/m2/s … … 81 81 . *1.e4*1.e3 82 82 ENDIF 83 IF (iregion_bb(i) .GT.0) THEN83 IF (iregion_bb(i)>0) THEN 84 84 IF(id_fine>0) source_tr(i,id_fine)=source_tr(i,id_fine)+ 85 85 . (scale_param_bb(iregion_bb(i))*lmt_bcbb_l(i)+ !g/m2/s … … 132 132 zzdz=zalt(i,kmaxbc+1)-zalt(i,kminbc) 133 133 c 134 IF (iregion_bb(i) .GT.0) THEN134 IF (iregion_bb(i) >0) THEN 135 135 IF(id_fine>0) tr_seri(i,k,id_fine)=tr_seri(i,k,id_fine)+ 136 136 . (scale_param_bb(iregion_bb(i))*lmt_bcbb_h(i)+ -
LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/inscav_spl.F
r4593 r5082 58 58 c 59 59 cnhl IF (it.EQ.2.OR.it.EQ.3) THEN !--aerosol ! AS IT WAS FIRST 60 IF (it .EQ.2.OR.it.EQ.3.OR.it.EQ.4) THEN !--aerosol60 IF (it==2.OR.it==3.OR.it==4) THEN !--aerosol 61 61 frac=frac_aer 62 62 ELSE !--gas … … 64 64 ENDIF 65 65 c 66 IF (it .EQ.1) THEN66 IF (it==1) THEN 67 67 DO k=1, klev 68 68 DO i=1, klon … … 75 75 ENDDO 76 76 ENDDO 77 ELSEIF (it .EQ.2) THEN77 ELSEIF (it==2) THEN 78 78 DO k=1, klev 79 79 DO i=1, klon … … 81 81 ENDDO 82 82 ENDDO 83 ELSEIF (it .EQ.3) THEN83 ELSEIF (it==3) THEN 84 84 DO k=1, klev 85 85 DO i=1, klon … … 87 87 ENDDO 88 88 ENDDO 89 ELSEIF (it .EQ.4) THEN89 ELSEIF (it==4) THEN 90 90 DO k=1, klev 91 91 DO i=1, klon … … 119 119 c--reevaporation 120 120 beta=flxr_aux(i,k)-flxr_aux(i,k+1)+flxs_aux(i,k)-flxs_aux(i,k+1) 121 IF (beta .LT.0.) beta=beta/(flxr_aux(i,k+1)+flxs_aux(i,k+1))122 IF (flxr_aux(i,k)+flxs_aux(i,k) .EQ.0) THEN !--reevaporation totale121 IF (beta<0.) beta=beta/(flxr_aux(i,k+1)+flxs_aux(i,k+1)) 122 IF (flxr_aux(i,k)+flxs_aux(i,k)==0) THEN !--reevaporation totale 123 123 beta=MIN(MAX(0.0,-beta),1.0) 124 124 ELSE !--reevaporation non totale pour aerosols -
LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/lsc_scav_orig.F90
r2630 r5082 177 177 ENDDO 178 178 179 IF (it .gt.1) THEN ! aerosol179 IF (it>1) THEN ! aerosol 180 180 frac_ev=frac_aer 181 181 ELSE ! gas … … 183 183 ENDIF 184 184 185 IF(it .gt.1) then ! aerosol185 IF(it>1) then ! aerosol 186 186 DO k=1, klev 187 187 DO i=1, klon … … 203 203 ! incloud scavenging 204 204 ! if(inscav_fisrt) then 205 if (iflag_lscav .eq.4) then205 if (iflag_lscav == 4) then 206 206 beta=beta_fisrt(i,k)*rneb(i,k) 207 207 else … … 219 219 220 220 ! below-cloud impaction 221 IF(it .eq.1) then221 IF(it==1) then 222 222 d_tr_bcscav(i,k,it)=0. 223 223 ELSE … … 236 236 deltaP(i,k)=max(deltaP(i,k),0.) 237 237 238 if(flxr(i,k+1)+flxs(i,k+1) .gt.1.e-16) then238 if(flxr(i,k+1)+flxs(i,k+1)>1.e-16) then 239 239 beta_ev(i,k)=deltaP(i,k)/(flxr(i,k+1)+flxs(i,k+1)) 240 240 else … … 246 246 !jyg 247 247 248 if(abs(1-(1-frac_ev)*beta_ev(i,k)) .gt.1.e-16) then248 if(abs(1-(1-frac_ev)*beta_ev(i,k))>1.e-16) then 249 249 ! remove tracers from precipitation owing to release by evaporation in his_dh 250 250 ! dxev=frac_ev*beta_ev(i,k)*his_dh(i) *pdtime/(zrho(i,k)*zdz(i,k)) & -
LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/lsc_scav_spl.F90
r3786 r5082 188 188 189 189 !JE<< 190 IF (it .eq.id_prec) THEN ! gas190 IF (it==id_prec) THEN ! gas 191 191 frac_ev=frac_gas 192 192 ELSE !aerosol … … 194 194 ENDIF 195 195 196 IF (it .eq.id_prec) THEN ! gas196 IF (it==id_prec) THEN ! gas 197 197 DO k=1, klev 198 198 DO i=1, klon … … 214 214 ! incloud scavenging 215 215 ! if(inscav_fisrt) then 216 if (iflag_lscav .eq.4) then216 if (iflag_lscav == 4) then 217 217 beta=beta_fisrt(i,k)*rneb(i,k) 218 218 else … … 230 230 231 231 ! below-cloud impaction 232 IF(it .eq.id_prec) then232 IF(it==id_prec) then 233 233 d_tr_bcscav(i,k,it)=0. 234 234 ELSE … … 247 247 deltaP(i,k)=max(deltaP(i,k),0.) 248 248 249 if(flxr(i,k+1)+flxs(i,k+1) .gt.1.e-16) then249 if(flxr(i,k+1)+flxs(i,k+1)>1.e-16) then 250 250 beta_ev(i,k)=deltaP(i,k)/(flxr(i,k+1)+flxs(i,k+1)) 251 251 else … … 257 257 !jyg 258 258 259 if(abs(1-(1-frac_ev)*beta_ev(i,k)) .gt.1.e-16) then259 if(abs(1-(1-frac_ev)*beta_ev(i,k))>1.e-16) then 260 260 ! remove tracers from precipitation owing to release by evaporation in his_dh 261 261 ! dxev=frac_ev*beta_ev(i,k)*his_dh(i) *pdtime/(zrho(i,k)*zdz(i,k)) & -
LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/minmaxqfi2.F
r4593 r5082 25 25 zqmax=zq(ijmax,lmax) 26 26 27 if(zqmin .lt.qmin.or.zqmax.gt.qmax)27 if(zqmin<qmin.or.zqmax>qmax) 28 28 s write(*,9999) comment, 29 29 s ijmin,lmin,zqmin,ijmax,lmax,zqmax -
LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/minmaxsource.F
r4593 r5082 26 26 zqmax=zq(ijmax,lmax) 27 27 28 if(zqmin .lt.qmin.or.zqmax.gt.qmax)28 if(zqmin<qmin.or.zqmax>qmax) 29 29 s write(*,9999) comment, 30 30 s ijmin,lmin,zqmin,ijmax,lmax,zqmax -
LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/neutral.F
r4593 r5082 44 44 do i=1,klon 45 45 46 if (u10_mps(i) .lt.0.) u10_mps(i) = 0.046 if (u10_mps(i) < 0.) u10_mps(i) = 0.0 47 47 48 if (obklen_m(i) .lt. 0.) then48 if (obklen_m(i) < 0.) then 49 49 phi = (1. - 160./obklen_m(i))**(-0.25) 50 50 phi_inv = 1./phi … … 56 56 f3 = atan(dum1) 57 57 psi = 2.*log(f1) + log(f2) - 2.*f3 + pi/2. 58 else if (obklen_m(i) .gt.0.) then58 else if (obklen_m(i) > 0.) then 59 59 psi = -50. / obklen_m(i) 60 60 end if … … 62 62 u10n_mps(i) = u10_mps(i) + (ustar_mps(i) * psi /von_karman ) 63 63 c u10n set to 0. if -1 < obklen < 20 64 if ((obklen_m(i) .gt.-1.).and.(obklen_m(i).lt.20.)) then64 if ((obklen_m(i)>-1.).and.(obklen_m(i)<20.)) then 65 65 u10n_mps(i) = 0. 66 66 endif 67 if (u10n_mps(i) .lt.0.) u10n_mps(i) = 0.067 if (u10n_mps(i) < 0.) u10n_mps(i) = 0.0 68 68 69 69 enddo -
LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/nightingale.F
r4593 r5082 59 59 c equal to value at 30 deg C. 60 60 61 IF (ftsol(i,is_oce) .LE.303.15) THEN61 IF (ftsol(i,is_oce) <= 303.15) THEN 62 62 t1 = ftsol(i,is_oce) 63 63 ELSE … … 77 77 . * lmt_dmsconc(i)/1.0e12 * schmidt_corr * RNAVO 78 78 c 79 IF (lmt_dmsconc(i) .LE.1.e-20) lmt_dms(i)=0.079 IF (lmt_dmsconc(i)<=1.e-20) lmt_dms(i)=0.0 80 80 c 81 81 ENDDO -
LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/phys_output_write_spl_mod.F90
r5075 r5082 680 680 CALL histwrite_phy(o_tauy, zx_tmp_fi2d) 681 681 682 IF (landice_opt .GE.1 ) THEN682 IF (landice_opt >= 1 ) THEN 683 683 CALL histwrite_phy(o_snowsrf, snow_o) 684 684 CALL histwrite_phy(o_qsnow, qsnow) … … 769 769 CALL histwrite_phy(o_uq, uq) 770 770 CALL histwrite_phy(o_vq, vq) 771 IF (iflag_con .GE.3) THEN ! sb771 IF (iflag_con>=3) THEN ! sb 772 772 CALL histwrite_phy(o_cape, cape) 773 773 CALL histwrite_phy(o_pbase, ema_pcb) … … 865 865 DO k=1, nlevSTD 866 866 bb2=clevSTD(k) 867 IF (bb2 .EQ."850".OR.bb2.EQ."700".OR. &868 bb2 .EQ."500".OR.bb2.EQ."200".OR. &869 bb2 .EQ."100".OR. &870 bb2 .EQ."50".OR.bb2.EQ."10") THEN867 IF (bb2=="850".OR.bb2=="700".OR. & 868 bb2=="500".OR.bb2=="200".OR. & 869 bb2=="100".OR. & 870 bb2=="50".OR.bb2=="10") THEN 871 871 ll=ll+1 872 872 CALL histwrite_phy(o_uSTDlevs(ll),ulevSTD(:,k)) … … 882 882 IF (vars_defined) THEN 883 883 DO i=1, klon 884 IF (pctsrf(i,is_oce) .GT.epsfra.OR. &885 pctsrf(i,is_sic) .GT.epsfra) THEN884 IF (pctsrf(i,is_oce)>epsfra.OR. & 885 pctsrf(i,is_sic)>epsfra) THEN 886 886 zx_tmp_fi2d(i) = (ftsol(i, is_oce) * pctsrf(i,is_oce)+ & 887 887 ftsol(i, is_sic) * pctsrf(i,is_sic))/ & … … 895 895 896 896 ! Couplage convection-couche limite 897 IF (iflag_con .GE.3) THEN897 IF (iflag_con>=3) THEN 898 898 IF (iflag_coupl>=1) THEN 899 899 CALL histwrite_phy(o_ale_bl, ale_bl) … … 902 902 ENDIF !(iflag_con.GE.3) 903 903 ! Wakes 904 IF (iflag_con .EQ.3) THEN904 IF (iflag_con==3) THEN 905 905 IF (iflag_wake>=1) THEN 906 906 CALL histwrite_phy(o_ale_wk, ale_wake) … … 924 924 CALL histwrite_phy(o_fqd, fqd) 925 925 ENDIF !(iflag_con.EQ.3) 926 IF (iflag_con .EQ.3.OR.iflag_con.EQ.30) THEN926 IF (iflag_con==3.OR.iflag_con==30) THEN 927 927 ! sortie RomP convection descente insaturee iflag_con=30 928 928 ! etendue a iflag_con=3 (jyg) … … 953 953 CALL histwrite_phy(o_slab_qflux, slab_wfbils) 954 954 !CALL histwrite_phy(o_slab_bils, slab_bils) 955 IF (nslay .EQ.1) THEN955 IF (nslay==1) THEN 956 956 zx_tmp_fi2d(:)=tslab(:,1) 957 957 CALL histwrite_phy(o_tslab, zx_tmp_fi2d) … … 1013 1013 !--OLIVIER 1014 1014 !This is warranted by treating INCA aerosols as offline aerosols 1015 IF (flag_aerosol .GT.0) THEN1015 IF (flag_aerosol>0) THEN 1016 1016 CALL histwrite_phy(o_od550aer, od550aer) 1017 1017 CALL histwrite_phy(o_od865aer, od865aer) … … 1037 1037 !--STRAT AER 1038 1038 ENDIF 1039 IF (flag_aerosol .GT.0.OR.flag_aerosol_strat>=1) THEN1039 IF (flag_aerosol>0.OR.flag_aerosol_strat>=1) THEN 1040 1040 ! DO naero = 1, naero_spc 1041 1041 !--correction mini bug OB … … 1083 1083 CALL histwrite_phy(o_solswai, solswai_aero) 1084 1084 ENDIF 1085 IF (flag_aerosol .GT.0.AND.ok_cdnc) THEN1085 IF (flag_aerosol>0.AND.ok_cdnc) THEN 1086 1086 CALL histwrite_phy(o_scdnc, scdnc) 1087 1087 CALL histwrite_phy(o_cldncl, cldncl) … … 1215 1215 ENDIF 1216 1216 CALL histwrite_phy(o_dtcon, zx_tmp_fi3d) 1217 IF (iflag_thermals .eq.0)THEN1217 IF (iflag_thermals==0)THEN 1218 1218 IF (vars_defined) THEN 1219 1219 zx_tmp_fi3d(1:klon,1:klev)=d_t_con(1:klon,1:klev)/pdtphys + & … … 1221 1221 ENDIF 1222 1222 CALL histwrite_phy(o_tntc, zx_tmp_fi3d) 1223 ELSEIF (iflag_thermals .ge.1.and.iflag_wake.EQ.1)THEN1223 ELSEIF (iflag_thermals>=1.and.iflag_wake==1)THEN 1224 1224 IF (vars_defined) THEN 1225 1225 zx_tmp_fi3d(1:klon,1:klev)=d_t_con(1:klon,1:klev)/pdtphys + & … … 1236 1236 CALL histwrite_phy(o_dqcon, zx_tmp_fi3d) 1237 1237 1238 IF (iflag_thermals .EQ.0) THEN1238 IF (iflag_thermals==0) THEN 1239 1239 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_q_con(1:klon,1:klev)/pdtphys 1240 1240 CALL histwrite_phy(o_tnhusc, zx_tmp_fi3d) 1241 ELSEIF (iflag_thermals .GE.1.AND.iflag_wake.EQ.1) THEN1241 ELSEIF (iflag_thermals>=1.AND.iflag_wake==1) THEN 1242 1242 IF (vars_defined) THEN 1243 1243 zx_tmp_fi3d(1:klon,1:klev)=d_q_con(1:klon,1:klev)/pdtphys + & … … 1449 1449 CALL histwrite_phy(o_ref_liq, ref_liq) 1450 1450 CALL histwrite_phy(o_ref_ice, ref_ice) 1451 IF (RCO2_per .NE.RCO2_act.OR.RCH4_per.NE.RCH4_act.OR. &1452 RN2O_per .NE.RN2O_act.OR.RCFC11_per.NE.RCFC11_act.OR. &1453 RCFC12_per .NE.RCFC12_act) THEN1451 IF (RCO2_per/=RCO2_act.OR.RCH4_per/=RCH4_act.OR. & 1452 RN2O_per/=RN2O_act.OR.RCFC11_per/=RCFC11_act.OR. & 1453 RCFC12_per/=RCFC12_act) THEN 1454 1454 IF (vars_defined) zx_tmp_fi2d(1 : klon) = swupp ( 1 : klon, klevp1 ) 1455 1455 CALL histwrite_phy(o_rsut4co2, zx_tmp_fi2d) … … 1575 1575 DO k=1, nlevSTD 1576 1576 DO i=1, klon 1577 IF (O3STD(i,k) .NE.missing_val) THEN1577 IF (O3STD(i,k)/=missing_val) THEN 1578 1578 zx_tmp_fi3d_STD(i,k) = O3STD(i,k) * 1.e+9 1579 1579 ELSE … … 1588 1588 DO k=1, nlevSTD 1589 1589 DO i=1, klon 1590 IF (O3daySTD(i,k) .NE.missing_val) THEN1590 IF (O3daySTD(i,k)/=missing_val) THEN 1591 1591 zx_tmp_fi3d_STD(i,k) = O3daySTD(i,k) * 1.e+9 1592 1592 ELSE -
LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/phytracr_spl_mod.F90
r5075 r5082 94 94 LOGICAL , parameter :: edgar = .true. 95 95 INTEGER , parameter :: flag_dms=4 96 INTEGER *4nbjour96 INTEGER(kind=4) nbjour 97 97 98 98 ! -
LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/precuremission.F
r4593 r5082 105 105 106 106 DO i=1, klon 107 IF (iregion_ind(i) .GT.0) THEN107 IF (iregion_ind(i)>0) THEN 108 108 IF(id_prec>0) source_tr(i,id_prec)=source_tr(i,id_prec) 109 109 . + fracso2emis … … 137 137 . *1.e4/RNAVO*masse_ammsulfate*1.e3 ! mgS/m2/s 138 138 ENDIF 139 IF (iregion_bb(i) .GT.0) THEN139 IF (iregion_bb(i)>0) THEN 140 140 IF(id_prec>0) source_tr(i,id_prec)= 141 141 . source_tr(i,id_prec) + fracso2emis … … 213 213 DO i = 1, klon 214 214 zaltmid(i,k)=zalt(i,k)+zdz(i,k)/2. 215 IF (zalt(i,k+1) .LT.lmt_altvolc_cont(i)) kkk_cont(i)=k+1216 IF (zalt(i,k+1) .LT.lmt_altvolc_expl(i)) kkk_expl(i)=k+1215 IF (zalt(i,k+1)<lmt_altvolc_cont(i)) kkk_cont(i)=k+1 216 IF (zalt(i,k+1)<lmt_altvolc_expl(i)) kkk_expl(i)=k+1 217 217 ENDDO 218 218 ENDDO … … 234 234 DO i = 1, klon 235 235 c 236 IF (iregion_bb(i) .GT.0) THEN236 IF (iregion_bb(i)>0) THEN 237 237 IF(id_prec>0) tr_seri(i,k,id_prec)= 238 238 . tr_seri(i,k,id_prec) + fracso2emis … … 245 245 . *masse_ammsulfate/RNAVO/zdz(i,k)/100.*pdtphys !g/cm3 246 246 ENDIF 247 IF (iregion_ind(i) .GT.0) THEN247 IF (iregion_ind(i)>0) THEN 248 248 IF(id_prec>0) tr_seri(i,k,id_prec)= 249 249 . tr_seri(i,k,id_prec) + (fracso2emis -
LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/read_newemissions.F
r4593 r5082 204 204 print *,'READ_EMISSION: test_vent & test_day = ',test_vent, 205 205 + test_day 206 IF (test_vent .EQ.0) THEN !--on lit toutes les 6 h206 IF (test_vent==0) THEN !--on lit toutes les 6 h 207 207 CALL SCOPY(klon, u10m_ec2, 1, u10m_ec1, 1) 208 208 CALL SCOPY(klon, v10m_ec2, 1, v10m_ec1, 1) … … 246 246 jH_vent=jH_vent+pdtphys/(24.*3600.) 247 247 test_vent=test_vent+1 248 IF (jH_vent .GT.(vent_resol)/24.) THEN248 IF (jH_vent>(vent_resol)/24.) THEN 249 249 test_vent=0 250 250 jH_vent=jH_init … … 258 258 DO i=1, klon 259 259 c 260 IF (cly(i) .LT.9990..AND.wth(i).LT.9990.) THEN260 IF (cly(i)<9990..AND.wth(i)<9990.) THEN 261 261 zprecipinsoil(i)=zprecipinsoil(i) + 262 262 . (pmflxr(i,1)+pmflxs(i,1)+prfl(i,1)+psfl(i,1))*pdtphys … … 277 277 icount=0 278 278 DO i=1, klon 279 IF (cly(i) .GE.9990..OR.wth(i).GE.9990..OR.280 . t_seri(i,1) .LE.273.15.OR.zprecipinsoil(i).GT.1.e-8) THEN279 IF (cly(i)>=9990..OR.wth(i)>=9990..OR. 280 . t_seri(i,1)<=273.15.OR.zprecipinsoil(i)>1.e-8) THEN 281 281 dust_ec(i)=0.0 ! commented out for test dustemtest 282 282 ! print *,'Dust emissions surpressed at grid = ',i … … 330 330 c 331 331 332 IF (test_day .EQ.0) THEN332 IF (test_day==0) THEN 333 333 print *,'Computing SULFATE emissions for day : ',iday,julien, 334 334 . step_vent … … 362 362 jH_day=jH_day+pdtphys/(24.*3600.) 363 363 test_day=test_day+1 364 IF (jH_day .GT.(day_resol)/24.) THEN364 IF (jH_day>(day_resol)/24.) THEN 365 365 print *,'LAST TIME STEP OF DAY ',julien 366 366 test_day=0 -
LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/satellite_out_spla.F90
r2630 r5082 170 170 lon_cen=(ATAN(TAN(tempo)*COS(incli))-duree_orb*tempo)*RADEG 171 171 demi_larg=demi_larg_eq/COS(rlat(i)*DTOR) 172 IF (ABS(SIN(rlat(i)*DTOR)/SIN(incli)) .GE.1.0) demi_larg=200.0173 IF (rlat(i) .GE.lat_fin.AND.rlat(i).LE.lat_debut) THEN174 IF (demi_larg .GE. 180.) THEN172 IF (ABS(SIN(rlat(i)*DTOR)/SIN(incli))>=1.0) demi_larg=200.0 173 IF (rlat(i)>=lat_fin.AND.rlat(i)<=lat_debut) THEN 174 IF (demi_larg>= 180.) THEN 175 175 masque(i)=1 176 176 ELSE … … 178 178 lon_east = MOD(lon0+lon_cen+demi_larg, 360.) 179 179 zlon = MOD(rlon(i)+360., 360.) 180 IF (lon_west .LE.lon_east) THEN181 IF (zlon .GE.lon_west.AND.zlon.LE.lon_east) masque(i)=1180 IF (lon_west<=lon_east) THEN 181 IF (zlon>=lon_west.AND.zlon<=lon_east) masque(i)=1 182 182 ELSE 183 IF (zlon .GE.lon_west.OR.zlon.LE.lon_east) masque(i)=1183 IF (zlon>=lon_west.OR.zlon<=lon_east) masque(i)=1 184 184 ENDIF 185 185 ENDIF -
LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/sediment_mod.F
r4593 r5082 106 106 temp=t_seri(i,k)-RTT 107 107 c 108 IF (temp .LT.0.) THEN108 IF (temp<0.) THEN 109 109 air_visco(i,k)=(1.718+0.0049*temp-1.2e-5*temp*temp)*1.e-4 110 110 ELSE … … 127 127 rh=MIN(RHcl(i,k)*100.,RH_MAX) 128 128 RH_num = INT( rh/10. + 1.) 129 IF (rh .gt.85.) RH_num=10130 IF (rh .gt.90.) RH_num=11129 IF (rh>85.) RH_num=10 130 IF (rh>90.) RH_num=11 131 131 DELTA=(rh-RH_tab(RH_num))/(RH_tab(RH_num+1)-RH_tab(RH_num)) 132 132 c … … 149 149 c---------check for v_sed*dt<zdz 150 150 c 151 IF (v_sed*time_step .GT.zdz(i,k)) THEN151 IF (v_sed*time_step>zdz(i,k)) THEN 152 152 v_sed=zdz(i,k)/time_step 153 153 ENDIF … … 216 216 c---------check for v_sed*dt<zdz 217 217 c 218 IF (v_sed*time_step .GT.zdz(i,k)) THEN218 IF (v_sed*time_step>zdz(i,k)) THEN 219 219 v_sed=zdz(i,k)/time_step 220 220 ENDIF … … 285 285 286 286 287 IF (v_sed*time_step .GT.zdz(i,k)) THEN287 IF (v_sed*time_step>zdz(i,k)) THEN 288 288 v_sed=zdz(i,k)/time_step 289 289 ENDIF -
LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/splaeropt_5wv_rrtm.F90
r4163 r5082 94 94 modname='splaeropt_5wv_rrtm' 95 95 96 IF (naero .GT.naero_tot) THEN96 IF (naero>naero_tot) THEN 97 97 CALL abort_physic(modname,'Too many aerosol types',1) 98 98 ENDIF … … 106 106 rh(i,k)=MIN(RHcl(i,k)*100.,RH_MAX) 107 107 RH_num(i,k) = INT( rh(i,k)/10. + 1.) 108 IF (rh(i,k) .GT.85.) RH_num(i,k)=10109 IF (rh(i,k) .GT.90.) RH_num(i,k)=11108 IF (rh(i,k)>85.) RH_num(i,k)=10 109 IF (rh(i,k)>90.) RH_num(i,k)=11 110 110 delta(i,k)=(rh(i,k)-RH_tab(RH_num(i,k)))*fact_RH(RH_num(i,k)) 111 111 ENDDO … … 128 128 129 129 !--only 550 and 865 nm are used 130 IF (la .NE.la550.AND.la.NE.la865) CYCLE130 IF (la/=la550.AND.la/=la865) CYCLE 131 131 132 132 IF (soluble) THEN !--soluble aerosol with RH dependence -
LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/splaeropt_6bands_rrtm.F90
r4163 r5082 143 143 modname='splaeropt_6bands_rrt' 144 144 145 IF (NSW .NE.nbands_sw_rrtm) THEN145 IF (NSW/=nbands_sw_rrtm) THEN 146 146 CALL abort_physic(modname,'Erreur NSW doit etre egal a 6 pour cette routine',1) 147 147 ENDIF … … 155 155 rh(i,k)=MIN(RHcl(i,k)*100.,RH_MAX) 156 156 RH_num(i,k) = INT(rh(i,k)/10. + 1.) 157 IF (rh(i,k) .GT.85.) RH_num(i,k)=10158 IF (rh(i,k) .GT.90.) RH_num(i,k)=11157 IF (rh(i,k)>85.) RH_num(i,k)=10 158 IF (rh(i,k)>90.) RH_num(i,k)=11 159 159 delta(i,k)=(rh(i,k)-RH_tab(RH_num(i,k)))*fact_RH(RH_num(i,k)) 160 160 ENDDO … … 236 236 piz_allaer(:,:,2,:)=SUM(tau_ae(:,:,1:naero,:)*piz_ae(:,:,1:naero,:),dim=3)/tau_allaer(:,:,2,:) 237 237 piz_allaer(:,:,2,:)=MIN(MAX(piz_allaer(:,:,2,:),0.01),1.0) 238 WHERE (tau_allaer(:,:,2,:) .LE.tau_min) piz_allaer(:,:,2,:)=1.0238 WHERE (tau_allaer(:,:,2,:)<=tau_min) piz_allaer(:,:,2,:)=1.0 239 239 240 240 cg_allaer(:,:,2,:)=SUM(tau_ae(:,:,1:naero,:)*piz_ae(:,:,1:naero,:)*cg_ae(:,:,1:naero,:),dim=3)/ & -
LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/splaeropt_lw_rrtm.F90
r4071 r5082 45 45 modname='splaeropt_lw_rrtm' 46 46 ! 47 IF (NLW .NE.nbands_lw_rrtm) THEN47 IF (NLW/=nbands_lw_rrtm) THEN 48 48 CALL abort_physic(modname,'Erreur NLW doit etre egal a 16 pour cette routine',1) 49 49 ENDIF -
LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/tiedqneg.F
r4593 r5082 29 29 nb_neg = 0 30 30 DO i = 1,klon 31 IF (q(i,l)+d_q(i,l) .LT.qmin) THEN31 IF (q(i,l)+d_q(i,l)<qmin) THEN 32 32 nb_neg = nb_neg + 1 33 33 d_q(i,l-1) = d_q(i,l-1) + (q(i,l)+d_q(i,l)-qmin) … … 44 44 nb_neg = 0 45 45 DO i = 1,klon 46 IF (q(i,l)+d_q(i,l) .LT.qmin) THEN46 IF (q(i,l)+d_q(i,l)<qmin) THEN 47 47 nb_neg = nb_neg + 1 48 48 d_q(i,l+1) = d_q(i,l+1) + (q(i,l)+d_q(i,l)-qmin) … … 58 58 l = klev 59 59 DO i = 1,klon 60 IF (q(i,l)+d_q(i,l) .LT.qmin) THEN60 IF (q(i,l)+d_q(i,l)<qmin) THEN 61 61 d_q(i,l) = qmin - q(i,l) 62 62 ENDIF -
LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/trconvect.F
r4593 r5082 70 70 DO k = 1, klev 71 71 DO i = 1, klon 72 IF (d_tr(i,k,it) .LT.0.) THEN72 IF (d_tr(i,k,it)<0.) THEN 73 73 tr_seri(i,k,it)=tr_seri(i,k,it)+d_tr(i,k,it) 74 74 ELSE … … 88 88 DO k = 1, klev 89 89 DO i = 1, klon 90 IF (d_tr(i,k,it) .GE.0.) THEN90 IF (d_tr(i,k,it)>=0.) THEN 91 91 dtrconv(i,it)=dtrconv(i,it)+(1.-xconv(it))*d_tr(i,k,it) 92 92 . /RNAVO*masse(it)*1.e3*1.e6*zdz(i,k)/pdtphys
Note: See TracChangeset
for help on using the changeset viewer.