Changeset 2634 for LMDZ5/trunk/libf/phylmd
- Timestamp:
- Sep 24, 2016, 7:14:59 PM (8 years ago)
- Location:
- LMDZ5/trunk/libf/phylmd
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ5/trunk/libf/phylmd/aeropt_2bands.F90
r2593 r2634 12 12 USE phys_local_var_mod, only: absvisaer 13 13 USE pres2lev_mod 14 15 14 16 15 ! Yves Balkanski le 12 avril 2006 … … 128 127 REAL :: zrho 129 128 REAL :: fac 130 REAL :: zdp1(klon,klev) 131 REAL, PARAMETER :: gravit = 9.80616 ! m2/s 129 REAL :: zdh(klon,klev) 132 130 INTEGER, ALLOCATABLE, DIMENSION(:) :: aerosol_name 133 131 INTEGER :: nb_aer 134 REAL, DIMENSION(klon,klev,naero_tot) :: mass_temp135 !RAF136 REAL, DIMENSION(klon,klev,naero_tot) :: mass_temp_pi137 132 138 133 ! … … 587 582 END IF ! firstcall 588 583 589 590 584 DO k=1, klev 591 585 DO i=1, klon 592 zrho=pplay(i,k)/t_seri(i,k)/RD ! kg/m3 593 mass_temp(i,k,:) = m_allaer(i,k,:) / zrho / 1.e+9 594 mass_temp_pi(i,k,:) = m_allaer_pi(i,k,:) / zrho / 1.e+9 595 zdp1(i,k)=pdel(i,k)/(gravit*delt) ! air mass auxiliary variable --> zdp1 [kg/(m^2 *s)] 586 zrho=pplay(i,k)/t_seri(i,k)/RD ! kg/m3 587 zdh(i,k)=pdel(i,k)/(RG*zrho) ! m 596 588 ENDDO 597 589 ENDDO … … 645 637 ! compute optical_thickness_at_gridpoint_per_species 646 638 647 648 649 639 !CDIR ON_ADB(fact_RH) 650 640 !CDIR SHORTLOOP … … 660 650 IF (rh(i,k).GT.85.) RH_num(i,k)=10 661 651 IF (rh(i,k).GT.90.) RH_num(i,k)=11 662 663 652 DELTA(i,k)=(rh(i,k)-RH_tab(RH_num(i,k)))*fact_RH(RH_num(i,k)) 664 653 ENDDO … … 718 707 used_aer(id)=.TRUE. 719 708 720 721 709 IF (soluble) THEN 722 710 … … 739 727 !CDIR ON_ADB(C1_ASSSM_b2) 740 728 !CDIR ON_ADB(C2_ASSSM_b2) 729 741 730 DO i=1, KLON 731 742 732 H=rh(i,k)/100 743 tmp_var=m ass_temp(i,k,spsol)*1000.*zdp1(i,k)*delt*fac744 tmp_var_pi=m ass_temp_pi(i,k,spsol)*1000.*zdp1(i,k)*delt*fac733 tmp_var=m_allaer(i,k,spsol)/1.e6*zdh(i,k)*fac 734 tmp_var_pi=m_allaer_pi(i,k,spsol)/1.e6*zdh(i,k)*fac 745 735 746 736 ! band 1 … … 784 774 !CDIR ON_ADB(C1_CSSSM_b2) 785 775 !CDIR ON_ADB(C2_CSSSM_b2) 776 786 777 DO i=1, KLON 778 787 779 H=rh(i,k)/100 788 tmp_var=m ass_temp(i,k,spsol)*1000.*zdp1(i,k)*delt*fac789 tmp_var_pi=m ass_temp_pi(i,k,spsol)*1000.*zdp1(i,k)*delt*fac780 tmp_var=m_allaer(i,k,spsol)/1.e6*zdh(i,k)*fac 781 tmp_var_pi=m_allaer_pi(i,k,spsol)/1.e6*zdh(i,k)*fac 790 782 ! band 1 791 783 tau_ae2b_int=A1_CSSSM_b1(k)+A2_CSSSM_b1(k)*H+A3_CSSSM_b1(k)/(H-1.05) … … 828 820 !CDIR ON_ADB(C1_SSSSM_b2) 829 821 !CDIR ON_ADB(C2_SSSSM_b2) 822 830 823 DO i=1, KLON 824 831 825 H=rh(i,k)/100 832 tmp_var=m ass_temp(i,k,spsol)*1000.*zdp1(i,k)*delt*fac833 tmp_var_pi=m ass_temp_pi(i,k,spsol)*1000.*zdp1(i,k)*delt*fac826 tmp_var=m_allaer(i,k,spsol)/1.e6*zdh(i,k)*fac 827 tmp_var_pi=m_allaer_pi(i,k,spsol)/1.e6*zdh(i,k)*fac 834 828 835 829 ! band 1 … … 864 858 DO k=1, KLEV 865 859 DO i=1, KLON 866 tmp_var=m ass_temp(i,k,spsol)*1000.*zdp1(i,k)*delt*fac867 tmp_var_pi=m ass_temp_pi(i,k,spsol)*1000.*zdp1(i,k)*delt*fac860 tmp_var=m_allaer(i,k,spsol)/1.e6*zdh(i,k)*fac 861 tmp_var_pi=m_allaer_pi(i,k,spsol)/1.e6*zdh(i,k)*fac 868 862 !CDIR UNROLL=nbands 869 863 DO inu=1,nbands … … 899 893 DO k=1, KLEV 900 894 DO i=1, KLON 901 tmp_var=m ass_temp(i,k,naero_soluble+ spinsol)*1000.*zdp1(i,k)*delt*fac902 tmp_var_pi=m ass_temp_pi(i,k,naero_soluble+spinsol)*1000.*zdp1(i,k)*delt*fac895 tmp_var=m_allaer(i,k,naero_soluble+spinsol)/1.e6*zdh(i,k)*fac 896 tmp_var_pi=m_allaer_pi(i,k,naero_soluble+spinsol)/1.e6*zdh(i,k)*fac 903 897 !CDIR UNROLL=nbands 904 898 DO inu=1,nbands … … 931 925 932 926 DO inu=1, nbands 933 DO mrfspecies=1,naero_grp 927 928 !!DO mrfspecies=1,naero_grp 929 DO mrfspecies=2,3 !--only deal with total and natural aerosols 930 934 931 IF (mrfspecies .EQ. 2) THEN ! = total aerosol AER 932 935 933 DO k=1, KLEV 936 934 DO i=1, KLON … … 1026 1024 1027 1025 ELSEIF (mrfspecies .EQ. 4) THEN ! = BC 1026 1028 1027 DO k=1, KLEV 1029 1028 DO i=1, KLON … … 1128 1127 ENDDO 1129 1128 1130 inu=1 ! visible wav aband1129 inu=1 ! visible waveband 1131 1130 mrfspecies=2 ! total aerosol AER 1132 1131 DO i=1, KLON -
LMDZ5/trunk/libf/phylmd/aeropt_5wv.F90
r2550 r2634 13 13 USE phys_local_var_mod, only: od550aer,od865aer,ec550aer,od550lt1aer 14 14 USE pres2lev_mod 15 16 15 17 16 ! … … 66 65 ! Output arguments: 67 66 ! 68 REAL, DIMENSION(klon), INTENT(out) :: ai ! POLDER aerosol index 67 REAL, DIMENSION(klon), INTENT(out) :: ai ! POLDER aerosol index 69 68 REAL, DIMENSION(klon,nwave,naero_tot), INTENT(out) :: tausum 70 69 REAL, DIMENSION(klon,klev,nwave,naero_tot), INTENT(out) :: tau 71 72 73 70 ! 74 71 ! Local … … 134 131 REAL :: cg_ae5wv_int ! Intermediate asymmetry parameter aerosol 135 132 REAL, PARAMETER :: RH_MAX=95. 136 REAL :: taue670( KLON) ! epaisseur optique aerosol absorption 550 nm137 REAL :: taue865( KLON) ! epaisseur optique aerosol extinction 865 nm133 REAL :: taue670(klon) ! epaisseur optique aerosol absorption 550 nm 134 REAL :: taue865(klon) ! epaisseur optique aerosol extinction 865 nm 138 135 REAL :: fac 139 REAL :: zdp1(klon,klev)140 REAL, PARAMETER :: gravit = 9.80616 ! m2/s141 136 INTEGER, ALLOCATABLE, DIMENSION(:) :: aerosol_name 142 137 INTEGER :: nb_aer 143 138 144 REAL :: tau3d( KLON,KLEV), piz3d(KLON,KLEV), cg3d(KLON,KLEV)145 REAL :: abs3d( KLON,KLEV) ! epaisseur optique d'absorption146 REAL :: dh( KLON,KLEV)139 REAL :: tau3d(klon,klev), piz3d(klon,klev), cg3d(klon,klev) 140 REAL :: abs3d(klon,klev) ! epaisseur optique d'absorption 141 REAL :: dh(klon,klev) 147 142 148 143 REAL :: alpha_aers_5wv(nbre_RH,las,naero_soluble) ! ext. coeff. Soluble comp. units *** m2/g … … 155 150 ! 1- BC soluble; 2- POM soluble; 3- SO4 acc.; 4- SO4 coarse; 5 seasalt super-C; 6 seasalt coarse; 7 seasalt acc. 156 151 REAL :: piz_aeri_5wv(las,naero_insoluble) ! Insoluble comp. 1- Dust: 2- BC; 3- POM 157 158 REAL, DIMENSION(klon,klev,naero_tot) :: mass_temp159 160 152 ! 161 153 ! Proprietes optiques 162 154 ! 163 REAL :: radry = 287.054164 REAL :: tau_tmp ! dry air mass constant165 155 REAL :: fact_RH(nbre_RH) 166 156 LOGICAL :: used_tau(naero_spc) … … 303 293 !********************************************************************* 304 294 ! 305 !306 !307 !308 !309 295 ! 310 296 ! From here on we look at the optical parameters at 5 wavelengths: … … 478 464 0.737,0.750,0.765,0.775,0.787,0.803/ 479 465 ! 480 481 466 DATA cg_aeri_5wv/& 482 467 ! dust insoluble … … 616 601 END IF ! firstcall 617 602 618 619 603 ! Initialisations 620 ai(:) =0.621 tausum(:,:,:) 622 604 tau(:,:,:,:) =0. 605 tausum(:,:,:)= 0. 606 ai(:)=0.0 623 607 624 608 DO k=1, klev 625 609 DO i=1, klon 626 zrho=pplay(i,k)/t_seri(i,k)/RD ! kg/m3 627 dh(i,k)=pdel(i,k)/(gravit*zrho) 628 mass_temp(i,k,:) = m_allaer(i,k,:) / zrho / 1.e+9 629 zdp1(i,k)=pdel(i,k)/(gravit*delt) ! air mass auxiliary variable --> zdp1 [kg/(m^2 *s)] 630 610 zrho=pplay(i,k)/t_seri(i,k)/RD ! kg/m3 611 dh(i,k)=pdel(i,k)/(RG*zrho) ! m 631 612 ENDDO 632 613 ENDDO 633 634 614 635 615 IF (flag_aerosol .EQ. 1) THEN … … 680 660 ! compute optical_thickness_at_gridpoint_per_species 681 661 682 683 662 ! 684 663 ! Calculations that need to be done since we are not in the subroutines INCA 685 664 ! 686 665 687 !CDIR ON_ADB(RH_tab)688 !CDIR ON_ADB(fact_RH)689 !CDIR NOVECTOR690 666 DO n=1,nbre_RH-1 691 667 fact_RH(n)=1./(RH_tab(n+1)-RH_tab(n)) 692 668 ENDDO 693 669 694 DO k=1, KLEV 695 !CDIR ON_ADB(RH_tab) 696 !CDIR ON_ADB(fact_RH) 697 DO i=1, KLON 670 DO k=1, klev 671 DO i=1, klon 698 672 rh(i,k)=MIN(RHcl(i,k)*100.,RH_MAX) 699 673 RH_num(i,k) = INT( rh(i,k)/10. + 1.) 674 !--test olivier pour pas de reindicage 675 ! RH_num(i,k) =1 700 676 IF (rh(i,k).GT.85.) RH_num(i,k)=10 701 677 IF (rh(i,k).GT.90.) RH_num(i,k)=11 … … 704 680 ENDDO 705 681 706 !CDIR SHORTLOOP707 682 used_tau(:)=.FALSE. 708 683 … … 765 740 DO la=1,las 766 741 742 !--only 550 and 865 nm are used 743 IF (la.NE.la550.AND.la.NE.la865) CYCLE 744 767 745 IF (soluble) THEN 768 746 769 IF ((la.EQ.2).AND.(spss.NE.0)) THEN !la=2 corresponds to 550 nm747 IF ((la.EQ.2).AND.(spss.NE.0)) THEN !la=2 corresponds to 550 nm 770 748 IF (spss.EQ.1) THEN !accumulation mode 771 DO k=1, KLEV 772 !CDIR ON_ADB(A1_ASSSM) 773 !CDIR ON_ADB(A2_ASSSM) 774 !CDIR ON_ADB(A3_ASSSM) 775 DO i=1, KLON 776 H=rh(i,k)/100 749 DO k=1, klev 750 DO i=1, klon 751 H=rh(i,k)/100. 777 752 tau_ae5wv_int=A1_ASSSM(k)+A2_ASSSM(k)*H+A3_ASSSM(k)/(H-1.05) 778 tau(i,k,la,aerindex) = mass_temp(i,k,aerindex)*1000.*zdp1(i,k) & 779 *tau_ae5wv_int*delt*fac 753 tau(i,k,la,aerindex) = m_allaer(i,k,aerindex)/1.e6*dh(i,k)*tau_ae5wv_int*fac 780 754 tausum(i,la,aerindex)=tausum(i,la,aerindex)+tau(i,k,la,aerindex) 781 755 ENDDO … … 784 758 785 759 IF (spss.EQ.2) THEN !coarse mode 786 DO k=1, KLEV 787 !CDIR ON_ADB(A1_CSSSM) 788 !CDIR ON_ADB(A2_CSSSM) 789 !CDIR ON_ADB(A3_CSSSM) 790 DO i=1, KLON 791 H=rh(i,k)/100 760 DO k=1, klev 761 DO i=1, klon 762 H=rh(i,k)/100. 792 763 tau_ae5wv_int=A1_CSSSM(k)+A2_CSSSM(k)*H+A3_CSSSM(k)/(H-1.05) 793 tau(i,k,la,aerindex) = mass_temp(i,k,aerindex)*1000.*zdp1(i,k) & 794 *tau_ae5wv_int*delt*fac 795 tausum(i,la,aerindex) = tausum(i,la,aerindex)+tau(i,k,la,aerindex) 796 ENDDO 797 ENDDO 798 ENDIF 799 800 IF (spss.EQ.3) THEN !super coarse mode 801 DO k=1, KLEV 802 !CDIR ON_ADB(A1_SSSSM) 803 !CDIR ON_ADB(A2_SSSSM) 804 !CDIR ON_ADB(A3_SSSSM) 805 DO i=1, KLON 806 H=rh(i,k)/100 807 tau_ae5wv_int=A1_SSSSM(k)+A2_SSSSM(k)*H+A3_SSSSM(k)/(H-1.05) 808 tau(i,k,la,aerindex) = mass_temp(i,k,aerindex)*1000.*zdp1(i,k) & 809 *tau_ae5wv_int*delt*fac 764 tau(i,k,la,aerindex) = m_allaer(i,k,aerindex)/1.e6*dh(i,k)*tau_ae5wv_int*fac 810 765 tausum(i,la,aerindex)=tausum(i,la,aerindex)+tau(i,k,la,aerindex) 811 766 ENDDO … … 813 768 ENDIF 814 769 770 IF (spss.EQ.3) THEN !super coarse mode 771 DO k=1, klev 772 DO i=1, klon 773 H=rh(i,k)/100. 774 tau_ae5wv_int=A1_SSSSM(k)+A2_SSSSM(k)*H+A3_SSSSM(k)/(H-1.05) 775 tau(i,k,la,aerindex) = m_allaer(i,k,aerindex)/1.e6*dh(i,k)*tau_ae5wv_int*fac 776 tausum(i,la,aerindex)=tausum(i,la,aerindex)+tau(i,k,la,aerindex) 777 ENDDO 778 ENDDO 779 ENDIF 780 815 781 ELSE 816 DO k=1, KLEV 817 !CDIR ON_ADB(alpha_aers_5wv) 818 DO i=1, KLON 782 DO k=1, klev 783 DO i=1, klon 819 784 tau_ae5wv_int = alpha_aers_5wv(RH_num(i,k),la,spsol)+DELTA(i,k)* & 820 785 (alpha_aers_5wv(RH_num(i,k)+1,la,spsol) - & 821 786 alpha_aers_5wv(RH_num(i,k),la,spsol)) 822 823 tau(i,k,la,aerindex) = mass_temp(i,k,aerindex)*1000.*zdp1(i,k) & 824 *tau_ae5wv_int*delt*fac 787 tau(i,k,la,aerindex) = m_allaer(i,k,aerindex)/1.e6*dh(i,k)*tau_ae5wv_int*fac 825 788 tausum(i,la,aerindex)=tausum(i,la,aerindex)+tau(i,k,la,aerindex) 826 789 ENDDO … … 829 792 830 793 ELSE ! For insoluble aerosol 831 DO k=1, KLEV 832 !CDIR ON_ADB(alpha_aeri_5wv) 833 DO i=1, KLON794 795 DO k=1, klev 796 DO i=1, klon 834 797 tau_ae5wv_int = alpha_aeri_5wv(la,spinsol) 835 tau(i,k,la,aerindex) = mass_temp(i,k,aerindex)*1000.*zdp1(i,k)* & 836 tau_ae5wv_int*delt*fac 837 tausum(i,la,aerindex)= tausum(i,la,aerindex)+tau(i,k,la,aerindex) 798 tau(i,k,la,aerindex) = m_allaer(i,k,aerindex)/1.e6*dh(i,k)*tau_ae5wv_int*fac 799 tausum(i,la,aerindex)=tausum(i,la,aerindex)+tau(i,k,la,aerindex) 838 800 ENDDO 839 801 ENDDO 802 840 803 ENDIF 804 841 805 ENDDO ! boucle sur les longueurs d'onde 842 806 ENDDO ! Boucle sur les masses de traceurs … … 845 809 IF (.NOT.used_tau(m)) tau(:,:,:,m)=0. 846 810 ENDDO 847 ! 848 ! 849 ! taue670(:) = SUM(tausum(:,la670,:),dim=2) 850 ! taue865(:) = SUM(tausum(:,la865,:),dim=2) 851 ! 852 ! DO i=1, klon 853 ! ai(i)=-LOG(MAX(taue670(i),0.0001)/ & 854 ! MAX(taue865(i),0.0001))/LOG(670./865.) 855 ! ENDDO 856 857 DO i=1, klon 858 od550aer(i)=0. 859 DO m=1,naero_spc 860 od550aer(i)=od550aer(i)+tausum(i,2,m) 861 ENDDO 862 ENDDO 863 864 DO i=1, klon 865 od865aer(i)=0. 866 DO m=1,naero_spc 867 od865aer(i)=od865aer(i)+tausum(i,5,m) 868 ENDDO 869 ENDDO 870 871 DO i=1, klon 872 DO k=1, KLEV 873 ec550aer(i,k)=0. 874 DO m=1,naero_spc 875 ec550aer(i,k)=ec550aer(i,k)+tau(i,k,2,m)/dh(i,k) 876 ENDDO 877 ENDDO 878 ENDDO 811 812 !--AOD calculations for diagnostics 813 od550aer(:)=SUM(tausum(:,la550,:),dim=2) 814 od865aer(:)=SUM(tausum(:,la865,:),dim=2) 815 816 !--extinction coefficient for diagnostic 817 ec550aer(:,:)=SUM(tau(:,:,la550,:),dim=3)/dh(:,:) 879 818 880 od550lt1aer(:)=tausum(:,2,id_ASSO4M_phy)+tausum(:,2,id_ASBCM_phy)+tausum(:,2,id_AIBCM_phy)+ & 881 tausum(:,2,id_ASPOMM_phy)+tausum(:,2,id_AIPOMM_phy)+tausum(:,2,id_ASSSM_phy)+ & 882 0.03*tausum(:,2,id_CSSSM_phy)+0.4*tausum(:,2,id_CIDUSTM_phy) 819 !--acc mode AOD calculation for diagnostic 820 od550lt1aer(:)=tausum(:,la550,id_ASSO4M_phy)+tausum(:,la550,id_ASBCM_phy)+tausum(:,la550,id_AIBCM_phy)+ & 821 tausum(:,la550,id_ASPOMM_phy)+tausum(:,la550,id_AIPOMM_phy)+tausum(:,la550,id_ASSSM_phy)+ & 822 0.03*tausum(:,la550,id_CSSSM_phy)+0.4*tausum(:,la550,id_CIDUSTM_phy) 883 823 884 824 DEALLOCATE(aerosol_name) -
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.