Ignore:
Timestamp:
Mar 20, 2014 4:38:49 PM (11 years ago)
Author:
raasch
Message:

REAL functions and a lot of REAL constants provided with KIND-attribute,
some small bugfixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SOURCE/microphysics.f90

    r1321 r1322  
    2020! Current revisions:
    2121! ------------------
    22 !
     22! REAL constants defined as wp-kind
    2323!
    2424! Former revisions:
     
    522522!
    523523!--             Weight averaged radius of cloud droplets:
    524                 rc = 0.5 * ( xc * dpirho_l )**( 1.0 / 3.0 )
     524                rc = 0.5 * ( xc * dpirho_l )**( 1.0 / 3.0_wp )
    525525
    526526                alpha_cc = ( a_1 + a_2 * nu_c ) / ( 1.0 + a_3 * nu_c )
     
    529529!
    530530!--             Mixing length (neglecting distance to ground and stratification)
    531                 l_mix = ( dx * dy * dzu(k) )**( 1.0 / 3.0 )
     531                l_mix = ( dx * dy * dzu(k) )**( 1.0 / 3.0_wp )
    532532!
    533533!--             Limit dissipation rate according to Seifert, Nuijens and
     
    536536!
    537537!--             Compute Taylor-microscale Reynolds number:
    538                 re_lambda = 6.0 / 11.0 * ( l_mix / c_const )**( 2.0 / 3.0 ) *  &
    539                             SQRT( 15.0 / kin_vis_air ) * epsilon**( 1.0 / 6.0 )
     538                re_lambda = 6.0 / 11.0 * ( l_mix / c_const )**( 2.0 / 3.0_wp ) *  &
     539                            SQRT( 15.0 / kin_vis_air ) * epsilon**( 1.0 / 6.0_wp )
    540540!
    541541!--             The factor of 1.0E4 is needed to convert the dissipation rate
     
    664664!
    665665!--          Weight averaged diameter of rain drops:
    666              dr = ( hyrho(k) * qr_1d(k) / nr_1d(k) * dpirho_l )**( 1.0 / 3.0 )
     666             dr = ( hyrho(k) * qr_1d(k) / nr_1d(k) * dpirho_l )**( 1.0 / 3.0_wp )
    667667!
    668668!--          Collisional breakup rate (Seifert, 2008):
     
    760760!
    761761!--          Weight averaged diameter of rain drops:
    762              dr = ( xr * dpirho_l )**( 1.0 / 3.0 )
     762             dr = ( xr * dpirho_l )**( 1.0 / 3.0_wp )
    763763!
    764764!--          Compute ventilation factor and intercept parameter
     
    772772!--             Slope parameter of gamma distribution (Seifert, 2008):
    773773                lambda_r = ( ( mu_r + 3.0 ) * ( mu_r + 2.0 ) *       &
    774                              ( mu_r + 1.0 ) )**( 1.0 / 3.0 ) / dr
     774                             ( mu_r + 1.0 ) )**( 1.0 / 3.0_wp ) / dr
    775775
    776776                mu_r_2   = mu_r + 2.0
     
    849849!
    850850!--    Sedimentation of cloud droplets (Heus et al., 2010):
    851        sed_qc_const = k_st * ( 3.0 / ( 4.0 * pi * rho_l ))**( 2.0 / 3.0 ) *   &
     851       sed_qc_const = k_st * ( 3.0 / ( 4.0 * pi * rho_l ))**( 2.0 / 3.0_wp ) *   &
    852852                     EXP( 5.0 * LOG( sigma_gc )**2 )
    853853
     
    856856       DO  k = nzt, nzb_s_inner(j,i)+1, -1
    857857          IF ( qc_1d(k) > eps_sb )  THEN
    858              sed_qc(k) = sed_qc_const * nc_1d(k)**( -2.0 / 3.0 ) * &
    859                         ( qc_1d(k) * hyrho(k) )**( 5.0 / 3.0 )
     858             sed_qc(k) = sed_qc_const * nc_1d(k)**( -2.0 / 3.0_wp ) * &
     859                        ( qc_1d(k) * hyrho(k) )**( 5.0 / 3.0_wp )
    860860          ELSE
    861861             sed_qc(k) = 0.0
     
    940940!
    941941!--          Weight averaged diameter of rain drops:
    942              dr = ( hyrho(k) * qr_1d(k) / nr_1d(k) * dpirho_l )**( 1.0 / 3.0 )
     942             dr = ( hyrho(k) * qr_1d(k) / nr_1d(k) * dpirho_l )**( 1.0 / 3.0_wp )
    943943!
    944944!--          Shape parameter of gamma distribution (Milbrandt and Yau, 2005;
     
    948948!--          Slope parameter of gamma distribution (Seifert, 2008):
    949949             lambda_r = ( ( mu_r + 3.0 ) * ( mu_r + 2.0 ) *          &
    950                         ( mu_r + 1.0 ) )**( 1.0 / 3.0 ) / dr
     950                        ( mu_r + 1.0 ) )**( 1.0 / 3.0_wp ) / dr
    951951
    952952             w_nr(k) = MAX( 0.1, MIN( 20.0, a_term - b_term * ( 1.0 +          &
Note: See TracChangeset for help on using the changeset viewer.