Ignore:
Timestamp:
Jul 24, 2024, 2:54:37 PM (4 months ago)
Author:
abarral
Message:

rename modules properly lmdz_*
move ismin, ismax, minmax into new lmdz_libmath.f90
(lint) uppercase fortran keywords

Location:
LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/miecalc_aer.F90

    r5112 r5116  
    2121  USE dimphy
    2222  USE lmdz_yomcst  , ONLY: RG, RPI
    23   USE lmdz_phys_para, only: gather, scatter, bcast
     23  USE lmdz_phys_para, ONLY: gather, scatter, bcast
    2424  USE lmdz_grid_phy, ONLY: klon_glo
    2525  USE lmdz_phys_mpi_data, ONLY:  is_mpi_root
  • LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/strataer_emiss_mod.F90

    r5112 r5116  
    5050          ALLOCATE(m_aer_emiss_vol(nErupt, nAerErupt))
    5151          m_aer_emiss_vol = 0. ; m_sulf_emiss_vol = 0.
    52           IF (ok_qemiss) then
     52          IF (ok_qemiss) THEN
    5353            ALLOCATE(m_H2O_emiss_vol(nErupt))
    5454            ALLOCATE(m_H2O_emiss_vol_daily(nErupt))
     
    8888      IF (flag_emit==1) THEN
    8989        CALL getin_p('m_sulf_emiss_vol', m_sulf_emiss_vol)
    90         if (ok_qemiss) then
     90        if (ok_qemiss) THEN
    9191          CALL getin_p('m_H2O_emiss_vol', m_H2O_emiss_vol)
    9292        endif
     
    154154    !============= Print params =============
    155155    IF (is_master) THEN
    156       IF (nErupt > 0) then
     156      IF (nErupt > 0) THEN
    157157        if (flag_emit == 1 .OR. flag_emit == 4) THEN
    158158          WRITE(lunout, *) 'IN STRATAER nErupt: ', nErupt
     
    172172            WRITE(lunout, *) 'IN STRATAEREMISS : m_sulf_emiss_vol', m_sulf_emiss_vol
    173173            WRITE(lunout, *) 'IN STRATAER : m_aer_emiss_vol', m_aer_emiss_vol
    174             IF (ok_qemiss) then
     174            IF (ok_qemiss) THEN
    175175              WRITE(lunout, *) 'IN STRATAEREMISS : m_H2O_emiss_vol', m_H2O_emiss_vol
    176176            ENDIF
  • LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/stratemit.F90

    r5112 r5116  
    9595          CALL STRATDISTRIB(altLMDz,altemiss,sigma_alt,f_lay_emiss)
    9696         
    97           IF (flag_emit==3) then
     97          IF (flag_emit==3) THEN
    9898             theta=(sin(theta_max/180.*RPI)-sin(theta_min/180.*RPI))/ &
    9999   (sin(xlat_max_sai/180.*RPI)-sin(xlat_min_sai/180.*RPI))
  • LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/sulfate_aer_mod.F90

    r5113 r5116  
    9393!      ***   H2SO4-H2O curved surface - Kelvin effect factor ***
    9494!            wet radius (m) (RRSI(IK) in [cm])
    95              if (f_r_wetB(ilon,ilev,IK) > 1.0) then
     95             if (f_r_wetB(ilon,ilev,IK) > 1.0) THEN
    9696               radwet = 1.e-2*RRSI(IK)*f_r_wetB(ilon,ilev,IK)
    9797             else
    98 !              H2SO4-H2O flat surface, only on the first timestep
     98!              H2SO4-H2O flat surface, ONLY on the first timestep
    9999               radwet = 1.e-2*RRSI(IK)*f_r_wet(ilon,ilev)
    100100             endif
     
    787787
    788788
    789     end function psh2so4
     789    END FUNCTION psh2so4
    790790!-----------------------------------------------------------------------
    791791    real function ndsh2so4(T) result(ndsh2so4_out)
     
    794794      IMPLICIT NONE
    795795      real, intent(in) :: T
    796       real :: presat
     796      REAL :: presat
    797797
    798798!     Boltzmann constant ( 1.38065e-23 J/K = m2⋅kg/(s2⋅K) )
     
    806806
    807807
    808      end function ndsh2so4
     808     END FUNCTION ndsh2so4
    809809!-----------------------------------------------------------------------
    810810     real function psh2o(T) result(psh2o_out)
     
    814814      real, intent(in) :: T
    815815
    816       if(T>229.) then
     816      IF(T>229.) THEN
    817817!        Preining et al., 1981 (from Kulmala et al., 1998)
    818818!        saturation vapor pressure (N/m2 = 1 Pa = 1 kg/(m·s2))
     
    833833     
    834834
    835      end function psh2o
     835     END FUNCTION psh2o
    836836!-----------------------------------------------------------------------
    837837     real function density(T,so4mfrac) result(density_out)
     
    867867        c6=-7.458060e-4, &
    868868        c7= 2.581390e-4
    869       real :: a,b,c,so4m2,so4m3,so4m4,so4m5,so4m6
     869      REAL :: a,b,c,so4m2,so4m3,so4m4,so4m5,so4m6
    870870     
    871871      so4m2=so4mfrac*so4mfrac
     
    884884
    885885
    886      end function density
     886     END FUNCTION density
    887887!-----------------------------------------------------------------------
    888888     real function surftension(T,so4frac) result(surftension_out)
     
    893893      IMPLICIT NONE
    894894      real,intent(in) :: T, so4frac
    895       real :: a,b,so4mfrac,so4m2,so4m3,so4m4,so4m5,so4sig
     895      REAL :: a,b,so4mfrac,so4m2,so4m3,so4m4,so4m5,so4sig
    896896      real, parameter :: &
    897897       a1= 0.11864, &
     
    924924
    925925
    926      end function surftension
     926     END FUNCTION surftension
    927927!-----------------------------------------------------------------------
    928928     real function wph2so4(pph2o,T) result(wph2so4_out)
     
    944944      real, intent(in) :: pph2o, T
    945945     
    946       real :: aw, rh, y1, y2, sulfmolal
     946      REAL :: aw, rh, y1, y2, sulfmolal
    947947 
    948948!       psh2o(T): equilibrium H2O pressure over pure liquid water (Pa)
     
    955955!       composition
    956956!       calculation of h2so4 molality
    957             if(aw <= 0.05 .and. aw > 0.) then
     957            IF(aw <= 0.05 .and. aw > 0.) THEN
    958958               y1=12.372089320*aw**(-0.16125516114) &
    959959    -30.490657554*aw -2.1133114241
    960960               y2=13.455394705*aw**(-0.19213122550) &
    961961    -34.285174607*aw -1.7620073078
    962             else if(aw <= 0.85 .and. aw > 0.05) then
     962            else IF(aw <= 0.85 .and. aw > 0.05) THEN
    963963               y1=11.820654354*aw**(-0.20786404244) &
    964964    -4.8073063730*aw -5.1727540348
     
    999999
    10001000
    1001      end function wph2so4
     1001     END FUNCTION wph2so4
    10021002!-----------------------------------------------------------------------
    10031003     real function solh2so4(T,xa) result(solh2so4_out)
     
    10071007      real, intent(in) :: T, xa       ! T(K)  xa(H2SO4 mass fraction)
    10081008     
    1009       real :: xw, a12,b12, cacta, presat
     1009      REAL :: xw, a12,b12, cacta, presat
    10101010     
    10111011      xw=1.0-xa
     
    10211021
    10221022
    1023      end function solh2so4
     1023     END FUNCTION solh2so4
    10241024!-----------------------------------------------------------------------     
    10251025     real function rpmvh2so4(T,ws) result(rpmvh2so4_out)
     
    10351035   -0.2315332,1.60074E-03,-2.5827835E-06/)
    10361036     
    1037       real :: w
     1037      REAL :: w
    10381038
    10391039        w=ws*0.01
     
    10441044       
    10451045
    1046      end function rpmvh2so4
     1046     END FUNCTION rpmvh2so4
    10471047!-----------------------------------------------------------------------
    10481048     real function rmvh2o(T) result(rmvh2o_out)
     
    10581058       
    10591059
    1060      end function rmvh2o
     1060     END FUNCTION rmvh2o
    10611061
    10621062END MODULE sulfate_aer_mod
  • LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/traccoag_mod.F90

    r5112 r5116  
    2020    USE lmdz_grid_phy
    2121    USE lmdz_phys_mpi_data, ONLY: is_mpi_root
    22     USE lmdz_phys_para, only: gather, scatter
     22    USE lmdz_phys_para, ONLY: gather, scatter
    2323    USE phys_cal_mod, ONLY: year_len, year_cur, mth_cur, day_cur, hour
    2424    USE sulfate_aer_mod
Note: See TracChangeset for help on using the changeset viewer.