Ignore:
Timestamp:
Oct 30, 2018 6:08:55 PM (3 years ago)
Author:
kanani
Message:

from branch resler@3462: add MRT shaping function (radiation_model_mod), use basic constants (biometeorology_mod), adjust precision to wp (biometeorology_pt_mod)

File:
1 edited

Legend:

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

    r3448 r3464  
    2727! -----------------
    2828! $Id$
     29! From branch resler@3462, pavelkrc:
     30! make use of basic_constants_and_equations_mod
     31!
     32! 3448 2018-10-29 18:14:31Z kanani
    2933! Initial revision
    3034!
     
    6064
    6165    USE basic_constants_and_equations_mod,                                     &
    62        ONLY:  magnus
     66       ONLY:  degc_to_k, magnus, sigma_sb
    6367
    6468    USE biometeorology_ipt_mod
     
    113117    REAL ( wp )    ::  biom_output_height  !< height output is calculated in m
    114118    REAL ( wp )    ::  time_biom_results   !< the time, the last set of biom results have been calculated for
    115     REAL ( wp ), PARAMETER ::  cels_offs = 273.15_wp  !< Kelvin-Celsius offset (K)
    116     REAL ( wp ), PARAMETER ::  sigma_sb  = 5.67037321E-8_wp  !< Stefan-Boltzmann constant
    117119    REAL ( wp ), PARAMETER ::  human_absorb = 0.7_wp  !< SW absorbtivity of a human body (Fanger 1972)
    118120    REAL ( wp ), PARAMETER ::  human_emiss = 0.97_wp  !< LW emissivity of a human body after (Fanger 1972)
     
    313315                       biom_mrt_av(:) = biom_mrt_av(:) + &
    314316                          ((human_absorb*mrtinsw(:) + human_emiss*mrtinlw(:))  &
    315                           / (human_emiss*sigma_sb)) ** .25_wp - cels_offs
     317                          / (human_emiss*sigma_sb)) ** .25_wp - degc_to_k
    316318                    ELSE
    317319                       biom_mrt_av(:) = biom_mrt_av(:) + &
    318320                          (human_emiss * mrtinlw(:) / sigma_sb) ** .25_wp      &
    319                           - cels_offs
     321                          - degc_to_k
    320322                    ENDIF
    321323                 ENDIF
     
    10461048
    10471049!-- Compute mean radiant temperature
    1048     tmrt = ( nrfd / (human_emiss * sigma_sb) )**0.25_wp - cels_offs
     1050    tmrt = ( nrfd / (human_emiss * sigma_sb) )**0.25_wp - degc_to_k
    10491051
    10501052 END SUBROUTINE calculate_tmrt_6_directions
     
    11221124
    11231125    sw_side = sw_in * 0.125_wp  ! distribute half of upper sw_in to the 4 sides
    1124     lw_air = ( sigma_sb * 0.95_wp * ( ta + cels_offs )**4 )
     1126    lw_air = ( sigma_sb * 0.95_wp * ( ta + degc_to_k )**4 )
    11251127
    11261128!-- Compute mean radiation flux density absorbed by rotational symetric human
     
    11331135
    11341136!-- Compute mean radiant temperature
    1135     tmrt = ( nrfd / (human_emiss * sigma_sb) )**0.25_wp - cels_offs
     1137    tmrt = ( nrfd / (human_emiss * sigma_sb) )**0.25_wp - degc_to_k
    11361138
    11371139 END SUBROUTINE calculate_tmrt_2_directions
     
    12211223    IF ( average_input ) THEN
    12221224!--    Calculate ta from Tp assuming dry adiabatic laps rate
    1223        ta = pt_av(k, j, i) - ( 0.0098_wp * dz(1) * (  k + .5_wp ) ) - cels_offs
     1225       ta = pt_av(k, j, i) - ( 0.0098_wp * dz(1) * (  k + .5_wp ) ) - degc_to_k
    12241226
    12251227       vp = 0.034_wp
     
    12331235    ELSE
    12341236!-- Calculate ta from Tp assuming dry adiabatic laps rate
    1235        ta = pt(k, j, i) - ( 0.0098_wp * dz(1) * (  k + .5_wp ) ) - cels_offs
     1237       ta = pt(k, j, i) - ( 0.0098_wp * dz(1) * (  k + .5_wp ) ) - degc_to_k
    12361238
    12371239       vp = q(k, j, i)
     
    12491251!-- The magnus formula is limited to temperatures up to 333.15 K to
    12501252!   avoid negative values of vp_sat
    1251     vp_sat = 0.01_wp * magnus( MIN( ta + cels_offs, 333.15_wp ) )
     1253    vp_sat = 0.01_wp * magnus( MIN( ta + degc_to_k, 333.15_wp ) )
    12521254    vp  = vp * pair / ( vp + 0.622_wp )
    12531255    IF ( vp > vp_sat ) vp = vp_sat
Note: See TracChangeset for help on using the changeset viewer.