Changeset 5220 for LMDZ6


Ignore:
Timestamp:
Sep 23, 2024, 2:38:51 PM (10 hours ago)
Author:
abarral
Message:

Correct errors induced in r5218 r5219

Location:
LMDZ6/branches/Amaury_dev/libf
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/branches/Amaury_dev/libf/misc/slatec_xer.f90

    r5218 r5220  
    11! Contains "legacy" xer* functions required by some other very old external code
    22
    3 MODULE lmdz_xer
     3MODULE slatec_xer
    44  IMPLICIT NONE; PRIVATE
    55  PUBLIC xermsg
     
    11211121
    11221122
    1123 END MODULE lmdz_xer
     1123END MODULE slatec_xer
  • LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/traccoag_mod.F90

    r5219 r5220  
    8282    INTEGER :: injdur_sai          ! injection duration for SAI case [days]
    8383    INTEGER :: yr, is_bissext
    84     REAL                                   :: samoment2, samoment3! 2nd and 3rd order moments of size distribution
     84    REAL :: samoment2, samoment3! 2nd and 3rd order moments of size distribution
    8585
    8686    IF (is_mpi_root .AND. flag_verbose_strataer) THEN
     
    355355    sulfmmr_mode(:, :, :) = 0.0
    356356    nd_mode(:, :, :) = 0.0
    357 reff_sulfate(:,:)=0.0
     357    reff_sulfate(:, :) = 0.0
     358
    358359    DO i = 1, klon
    359360      DO j = 1, klev
    360         samoment2=0.0
    361            samoment3=0.0DO it = 1, nbtr_bin
     361        samoment2 = 0.0
     362        samoment3 = 0.0
     363        DO it = 1, nbtr_bin
    362364          !surf_PM25_sulf(i)=surf_PM25_sulf(i)+tr_seri(i,1,it+nbtr_sulgas)*m_part(i,1,it) &
    363365          !assume that particles consist of ammonium sulfate at the surface (132g/mol)
     
    383385                    * 4. * RPI * (mdw(it) * f_r_wetB(i, j, it) / 2.)**2. &       ! [WET SA of part it in m2]
    384386                    * 1.e-2                                              ! conversion from m2/m3 to cm2/cm3A!    samoment2 : 2nd order moment of WET sulfate aerosols (m2/m3)
    385                  samoment2 = samoment2 + nd_mode(i,j,it) &     ! [DRY part/m3A (in bin it)]
    386                       &  *( mdw(it)*f_r_wetB(i,j,it)/2. )**2.                     ! [WET SA of part it in m2]
    387 !    samoment3 : 3nd order moment of WET sulfate aerosols (cm2/cm3)
    388                  samoment3 = samoment3 + nd_mode(i,j,it) &     ! [DRY part/m3A (in bin it)]
    389                       &  *( mdw(it)*f_r_wetB(i,j,it)/2. )**3.                     ! [WET SA of part it in m2]
     387            samoment2 = samoment2 + nd_mode(i, j, it) &     ! [DRY part/m3A (in bin it)]
     388                    & * (mdw(it) * f_r_wetB(i, j, it) / 2.)**2.                     ! [WET SA of part it in m2]
     389            !    samoment3 : 3nd order moment of WET sulfate aerosols (cm2/cm3)
     390            samoment3 = samoment3 + nd_mode(i, j, it) &     ! [DRY part/m3A (in bin it)]
     391                    & * (mdw(it) * f_r_wetB(i, j, it) / 2.)**3.                     ! [WET SA of part it in m2]
    390392          ELSE
    391393            !     SAD_sulfate: SAD WET sulfate aerosols (cm2/cm3)
     
    393395                    * 4. * RPI * (mdw(it) * f_r_wet(i, j) / 2.)**2. &           ! [WET SA of part it in m2]
    394396                    * 1.e-2                                              ! conversion from m2/m3 to cm2/cm3A
    395 !    samoment2 : 2nd order moment of WET sulfate aerosols (m2/m3)
    396                  samoment2 = samoment2 + nd_mode(i,j,it) &     ! [DRY part/m3A (in bin it)]
    397                       &  *( mdw(it)*f_r_wet(i,j)/2. )**2.                          ! [WET SA of part it in m2]
    398 !    samoment3 : 3nd order moment of WET sulfate aerosols (cm2/cm3)
    399                  samoment3 = samoment3 + nd_mode(i,j,it) &     ! [DRY part/m3A (in bin it)]
    400                       &  *( mdw(it)*f_r_wet(i,j)/2. )**3.                          ! [WET SA of part it in m2]          ENDIF
    401         ENDDO!     reff_sulfate: effective radius of WET sulfate aerosols (cm)
    402            reff_sulfate(i,j) = (samoment3 / samoment2) &
    403                 & *1.e2                                              ! conversion from m to cm
    404       ENDDO
    405     ENDDO
     397            !    samoment2 : 2nd order moment of WET sulfate aerosols (m2/m3)
     398            samoment2 = samoment2 + nd_mode(i, j, it) &     ! [DRY part/m3A (in bin it)]
     399                    & * (mdw(it) * f_r_wet(i, j) / 2.)**2.                          ! [WET SA of part it in m2]
     400            !    samoment3 : 3nd order moment of WET sulfate aerosols (cm2/cm3)
     401            samoment3 = samoment3 + nd_mode(i, j, it) &     ! [DRY part/m3A (in bin it)]
     402                    & * (mdw(it) * f_r_wet(i, j) / 2.)**3.                          ! [WET SA of part it in m2]
     403
     404          END IF
     405        END DO!     reff_sulfate: effective radius of WET sulfate aerosols (cm)
     406        reff_sulfate(i, j) = (samoment3 / samoment2) &
     407                & * 1.e2                                              ! conversion from m to cm
     408      END DO
     409    END DO
    406410  END SUBROUTINE traccoag
    407411
Note: See TracChangeset for help on using the changeset viewer.