Changeset 2948 for LMDZ5/trunk/libf/phylmd/StratAer
- Timestamp:
- Jul 13, 2017, 9:15:00 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ5/trunk/libf/phylmd/StratAer/miecalc_aer.F90
r2704 r2948 60 60 COMPLEX nn 61 61 REAL Q_ext, Q_abs, Q_sca, g, omega !--parameters for radius r 62 REAL x !--size parameter62 REAL x, x_old !--size parameter 63 63 REAL r, r_lower, r_upper !--radius 64 64 REAL sigma_sca, sigma_ext, sigma_abs … … 70 70 INTEGER bin, Nbin, it 71 71 PARAMETER (Nbin=10) 72 72 LOGICAL smallx 73 73 74 74 !---wavelengths STREAMER … … 347 347 r_lower=exp(log(rmin)+FLOAT(bin-1)/FLOAT(Nbin)*(log(rmax)-log(rmin))) 348 348 r_upper=exp(log(rmin)+FLOAT(bin)/FLOAT(Nbin)*(log(rmax)-log(rmin))) 349 deltar=r_upper-r_lower 350 349 351 r=sqrt(r_lower*r_upper) 350 352 x=2.*RPI*r/lambda_int(Nwv) 351 deltar=r_upper-r_lower 353 354 !we impose a minimum value for x and extrapolate quantities for small x values 355 smallx = .FALSE. 356 IF (x.LT.0.001) THEN 357 smallx = .TRUE. 358 x_old = x 359 x = 0.001 360 ENDIF 352 361 353 362 number=Ntot*deltar/(rmax-rmin) !dN/dr constant over tracer bin … … 373 382 ENDIF 374 383 375 Nstart=Nmax+10 384 Nstart=Nmax+100 376 385 377 386 !-----------loop for nu1z1, nu1z2 … … 417 426 Q_sca=0.0 418 427 g=0.0 428 419 429 DO n=Nmax-1,1,-1 420 430 nnn=FLOAT(n) … … 426 436 (2.*nnn+1.)/nnn/(nnn+1.) * REAL(a(n)*CONJG(b(n))) 427 437 ENDDO 438 428 439 Q_ext=2./x**2 * Q_ext 429 440 Q_sca=2./x**2 * Q_sca 441 !--extrapolation in case of small x values 442 IF (smallx) THEN 443 Q_ext = x_old/x * Q_ext 444 Q_sca = x_old/x * Q_sca 445 ENDIF 446 430 447 Q_abs=Q_ext-Q_sca 448 431 449 IF (AIMAG(m).EQ.0.0) Q_abs=0.0 432 450 omega=Q_sca/Q_ext 451 452 ! g is wrong in the smallx case (but that does not matter as long as we ignore LW scattering) 433 453 g=g*4./x**2/Q_sca 434 454
Note: See TracChangeset
for help on using the changeset viewer.