Changeset 2634 for LMDZ5/trunk/libf/phylmd/rrtm
- Timestamp:
- Sep 24, 2016, 7:14:59 PM (8 years ago)
- Location:
- LMDZ5/trunk/libf/phylmd/rrtm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ5/trunk/libf/phylmd/rrtm/aeropt_5wv_rrtm.F90
r2550 r2634 94 94 REAL :: od670aer(klon) ! epaisseur optique aerosol extinction 670 nm 95 95 REAL :: fac 96 REAL :: zdp1(klon,klev)97 96 INTEGER, ALLOCATABLE, DIMENSION(:) :: aerosol_name 98 97 INTEGER :: nb_aer, itau 99 98 LOGICAL :: ok_itau 100 99 101 REAL :: dh(KLON,KLEV)100 REAL :: zdh(klon,klev) 102 101 103 102 ! Soluble components 1- BC soluble; 2- POM soluble; 3- SO4 acc.; 4- SO4 coarse; 5 seasalt super-coarse; 6 seasalt coarse; 7 seasalt acc. … … 106 105 REAL :: alpha_aeri_5wv(las,naero_insoluble) ! Ext. coeff. ** m2/g 107 106 108 REAL, DIMENSION(klon,klev,naero_tot) :: mass_temp109 110 107 ! 111 108 ! Proprietes optiques 112 109 ! 113 110 REAL :: fact_RH(nbre_RH) 114 LOGICAL :: used_tau(naero_tot)115 111 INTEGER :: n 116 112 … … 209 205 ai(:) = 0. 210 206 tausum(:,:,:) = 0. 207 tau(:,:,:,:)=0. 211 208 212 209 DO k=1, klev 213 210 DO i=1, klon 214 211 zrho=pplay(i,k)/t_seri(i,k)/RD ! kg/m3 215 dh(i,k)=pdel(i,k)/(RG*zrho) 216 !CDIR UNROLL=naero_spc 217 mass_temp(i,k,:) = m_allaer(i,k,:) / zrho / 1.e+9 218 zdp1(i,k)=pdel(i,k)/(RG*delt) ! air mass auxiliary variable --> zdp1 [kg/(m^2 *s)] 212 zdh(i,k)=pdel(i,k)/(RG*zrho) ! m 219 213 ENDDO 220 214 ENDDO … … 270 264 ! 271 265 272 !CDIR ON_ADB(RH_tab)273 !CDIR ON_ADB(fact_RH)274 !CDIR NOVECTOR275 266 DO n=1,nbre_RH-1 276 267 fact_RH(n)=1./(RH_tab(n+1)-RH_tab(n)) 277 268 ENDDO 278 269 279 DO k=1, KLEV 280 !CDIR ON_ADB(RH_tab) 281 !CDIR ON_ADB(fact_RH) 282 DO i=1, KLON 270 DO k=1, klev 271 DO i=1, klon 283 272 rh(i,k)=MIN(RHcl(i,k)*100.,RH_MAX) 284 273 RH_num(i,k) = INT( rh(i,k)/10. + 1.) … … 289 278 ENDDO 290 279 291 !CDIR SHORTLOOP292 used_tau(:)=.FALSE.293 294 280 DO m=1,nb_aer ! tau is only computed for each mass 295 281 fac=1.0 … … 330 316 ENDIF 331 317 332 IF (soluble) then333 used_tau(spsol)=.TRUE.334 ELSE335 used_tau(naero_soluble+spinsol)=.TRUE.336 ENDIF337 338 318 aerindex=aerosol_name(m) 339 319 340 320 DO la=1,las 341 321 322 !--only 550, 670 and 865 nm are used 323 IF (la.NE.la550.AND.la.NE.la670.AND.la.NE.la865) CYCLE 324 342 325 IF (soluble) THEN ! For soluble aerosol 343 326 344 DO k=1, KLEV345 DO i=1, KLON327 DO k=1, klev 328 DO i=1, klon 346 329 tau_ae5wv_int = alpha_aers_5wv(RH_num(i,k),la,spsol)+DELTA(i,k)* & 347 330 (alpha_aers_5wv(RH_num(i,k)+1,la,spsol) - & 348 331 alpha_aers_5wv(RH_num(i,k),la,spsol)) 349 tau(i,k,la,aerindex) = mass_temp(i,k,aerindex)*1000.*zdp1(i,k)* & 350 tau_ae5wv_int*delt*fac 332 tau(i,k,la,aerindex) = m_allaer(i,k,aerindex)/1.e6*zdh(i,k)*tau_ae5wv_int*fac 351 333 tausum(i,la,aerindex)=tausum(i,la,aerindex)+tau(i,k,la,aerindex) 352 334 ENDDO … … 355 337 ELSE ! For insoluble aerosol 356 338 357 DO k=1, KLEV358 DO i=1, KLON339 DO k=1, klev 340 DO i=1, klon 359 341 tau_ae5wv_int = alpha_aeri_5wv(la,spinsol) 360 tau(i,k,la,aerindex) = mass_temp(i,k,aerindex)*1000.*zdp1(i,k)* & 361 tau_ae5wv_int*delt*fac 342 tau(i,k,la,aerindex) = m_allaer(i,k,aerindex)/1.e6*zdh(i,k)*tau_ae5wv_int*fac 362 343 tausum(i,la,aerindex)= tausum(i,la,aerindex)+tau(i,k,la,aerindex) 363 344 ENDDO … … 369 350 ENDDO ! Boucle sur les masses de traceurs 370 351 371 DO m=1,naero_tot 372 IF (.NOT.used_tau(m)) tau(:,:,:,m)=0. 373 ENDDO 374 375 DO i=1, klon 376 od550aer(i)=0. 377 DO m=1,naero_tot 378 od550aer(i)=od550aer(i)+tausum(i,la550,m) 379 END DO 380 END DO 381 382 DO i=1, klon 383 od670aer(i)=0. 384 DO m=1,naero_tot 385 od670aer(i)=od670aer(i)+tausum(i,la670,m) 386 END DO 387 END DO 388 389 DO i=1, klon 390 od865aer(i)=0. 391 DO m=1,naero_tot 392 od865aer(i)=od865aer(i)+tausum(i,la865,m) 393 END DO 394 END DO 395 396 DO i=1, klon 397 DO k=1, KLEV 398 ec550aer(i,k)=0. 399 DO m=1,naero_tot 400 ec550aer(i,k)=ec550aer(i,k)+tau(i,k,la550,m)/dh(i,k) 401 END DO 402 END DO 403 END DO 404 405 DO i=1, klon 406 ai(i)=-LOG(MAX(od670aer(i),1.e-8)/MAX(od865aer(i),1.e-8))/LOG(670./865.) 407 ENDDO 352 !--AOD calculations for diagnostics 353 od550aer(:)=SUM(tausum(:,la550,:),dim=2) 354 od670aer(:)=SUM(tausum(:,la670,:),dim=2) 355 od865aer(:)=SUM(tausum(:,la865,:),dim=2) 356 357 !--extinction coefficient for diagnostic 358 ec550aer(:,:)=SUM(tau(:,:,la550,:),dim=3)/zdh(:,:) 359 360 !--aerosol index 361 ai(:)=-LOG(MAX(od670aer(:),1.e-8)/MAX(od865aer(:),1.e-8))/LOG(670./865.) 408 362 409 363 od550lt1aer(:)=tausum(:,la550,id_ASSO4M_phy)+tausum(:,la550,id_ASBCM_phy) +tausum(:,la550,id_AIBCM_phy)+ & -
LMDZ5/trunk/libf/phylmd/rrtm/aeropt_6bands_rrtm.F90
r2311 r2634 36 36 ! 37 37 ! Output arguments: 38 ! 1= total aerosols39 ! 2= natural aerosols38 ! 2= total aerosols 39 ! 1= natural aerosols 40 40 ! 41 41 REAL, DIMENSION(klon,klev,2,nbands_sw_rrtm), INTENT(out) :: tau_allaer ! epaisseur optique aerosol … … 66 66 REAL :: Fact_RH(nbre_RH) 67 67 REAL :: fac 68 REAL :: zd p1(klon,klev)68 REAL :: zdh(klon,klev) 69 69 INTEGER, ALLOCATABLE, DIMENSION(:) :: aerosol_name 70 70 INTEGER :: nb_aer 71 71 72 REAL, DIMENSION(klon,klev,naero_tot) :: mass_temp73 REAL, DIMENSION(klon,klev,naero_tot) :: mass_temp_pi74 72 REAL, DIMENSION(klon,klev,naero_tot,nbands_sw_rrtm) :: tau_ae 75 73 REAL, DIMENSION(klon,klev,naero_tot,nbands_sw_rrtm) :: tau_ae_pi 76 74 REAL, DIMENSION(klon,klev,naero_tot,nbands_sw_rrtm) :: piz_ae 77 75 REAL, DIMENSION(klon,klev,naero_tot,nbands_sw_rrtm) :: cg_ae 78 79 80 76 ! 81 77 ! Proprietes optiques … … 89 85 90 86 INTEGER :: id 91 LOGICAL :: used_aer(naero_tot)92 87 REAL :: tmp_var, tmp_var_pi 93 88 … … 277 272 spsol = 0 278 273 spinsol = 0 274 279 275 IF (NSW.NE.nbands_sw_rrtm) THEN 280 276 print *,'Erreur NSW doit etre egal a 6 pour cette routine' … … 282 278 ENDIF 283 279 284 DO k=1, klev 285 DO i=1, klon 286 !CDIR UNROLL=naero_tot 287 mass_temp(i,k,:) = m_allaer(i,k,:) / zrho(i,k) / 1.e+9 !--kg/kg 288 !CDIR UNROLL=naero_tot 289 mass_temp_pi(i,k,:) = m_allaer_pi(i,k,:) / zrho(i,k) / 1.e+9 290 zdp1(i,k)=pdel(i,k)/(RG*delt) ! air mass auxiliary variable --> zdp1 [kg/(m^2 *s)] 291 ENDDO 292 ENDDO 280 zdh(:,:)=pdel(:,:)/(RG*zrho(:,:)) ! m 293 281 294 282 IF (flag_aerosol .EQ. 1) THEN … … 339 327 ! compute optical_thickness_at_gridpoint_per_species 340 328 341 !!CDIR ON_ADB(RH_tab)342 !CDIR ON_ADB(fact_RH)343 !CDIR SHORTLOOP344 329 DO n=1,nbre_RH-1 345 330 fact_RH(n)=1./(RH_tab(n+1)-RH_tab(n)) 346 331 ENDDO 347 332 348 DO k=1, KLEV 349 !CDIR ON_ADB(fact_RH) 350 DO i=1, KLON 333 DO k=1, klev 334 DO i=1, klon 351 335 rh(i,k)=MIN(RHcl(i,k)*100.,RH_MAX) 352 336 RH_num(i,k) = INT(rh(i,k)/10. + 1.) … … 357 341 ENDDO 358 342 359 used_aer(:)=.FALSE. 343 tau_ae(:,:,:,:)=0. 344 tau_ae_pi(:,:,:,:)=0. 345 piz_ae(:,:,:,:)=0. 346 cg_ae(:,:,:,:)=0. 360 347 361 348 DO m=1,nb_aer ! tau is only computed for each mass … … 398 385 399 386 id=aerosol_name(m) 400 used_aer(id)=.TRUE.401 387 402 388 IF (soluble) THEN 403 389 404 DO k=1, KLEV405 DO i=1, KLON406 tmp_var=m ass_temp(i,k,spsol)*1000.*zdp1(i,k)*delt*fac407 tmp_var_pi=m ass_temp_pi(i,k,spsol)*1000.*zdp1(i,k)*delt*fac390 DO k=1, klev 391 DO i=1, klon 392 tmp_var=m_allaer(i,k,spsol)/1.e6*zdh(i,k)*fac 393 tmp_var_pi=m_allaer_pi(i,k,spsol)/1.e6*zdh(i,k)*fac 408 394 409 395 DO inu=1,NSW … … 432 418 ELSE ! For all aerosol insoluble components 433 419 434 DO k=1, KLEV435 DO i=1, KLON436 tmp_var=m ass_temp(i,k,naero_soluble+ spinsol)*1000.*zdp1(i,k)*delt*fac437 tmp_var_pi=m ass_temp_pi(i,k,naero_soluble+spinsol)*1000.*zdp1(i,k)*delt*fac420 DO k=1, klev 421 DO i=1, klon 422 tmp_var=m_allaer(i,k,naero_soluble+spinsol)/1.e6*zdh(i,k)*fac 423 tmp_var_pi=m_allaer_pi(i,k,naero_soluble+spinsol)/1.e6*zdh(i,k)*fac 438 424 439 425 DO inu=1,NSW … … 454 440 ENDDO ! nb_aer 455 441 456 DO m=1,naero_tot457 IF (.NOT. used_aer(m)) THEN458 tau_ae(:,:,m,:)=0.459 tau_ae_pi(:,:,m,:)=0.460 piz_ae(:,:,m,:)=0.461 cg_ae(:,:,m,:)=0.462 ENDIF463 ENDDO464 465 442 DO inu=1, NSW 466 DO k=1, KLEV467 DO i=1, KLON443 DO k=1, klev 444 DO i=1, klon 468 445 !--anthropogenic aerosol 469 446 tau_allaer(i,k,2,inu)=tau_ae(i,k,id_ASSO4M_phy,inu)+tau_ae(i,k,id_CSSO4M_phy,inu)+ & … … 536 513 ENDDO 537 514 538 !-- ???????539 inu= 1540 DO i=1, KLON541 absvisaer(i)=SUM((1-piz_allaer(i,:, :,inu))*tau_allaer(i,:,:,inu))542 END DO515 !--waveband 2 and all aerosol 516 inu=2 517 DO i=1, klon 518 absvisaer(i)=SUM((1-piz_allaer(i,:,2,inu))*tau_allaer(i,:,2,inu)) 519 ENDDO 543 520 544 521 DEALLOCATE(aerosol_name)
Note: See TracChangeset
for help on using the changeset viewer.