! First include the set of model-wide compiler flags 
#include "tm5.inc"

module physconstants
  !
  ! Reference:
  !
  ! Brasseur, G.P., J.J. Orlando, and G.S. Tyndall, 1999, Atmospheric
  !         Chemistry and Global Change, Oxford Univ Press, New York.
  !
  !
  implicit none
  !
  ! pi
  real, parameter                  ::  pi = 3.141592653589793  ! none
  ! Earth radius (average)
  real, parameter                  ::  Earth_rad = 6370000.  ! m
  ! Earth surface area
  real, parameter                  ::  Earth_area = 5.10e14  ! m^2
  ! Earth surface area of continents
  real, parameter                  ::  Earth_areac = 1.49e14 ! m^2
  ! standard surface gravity
  real, parameter                  ::  grav = 9.80665        ! m/s^2
  ! Bolzman constant
  real, parameter                  ::  kbolz = 1.38066e-23   ! J/K
  ! Avogado number
  real, parameter                  ::  Navog = 6.022137e23   ! molecules/mol
  ! Universal gas constant
  real, parameter                  ::  Rgas  = kbolz*Navog   ! (=8.3143) J/mol/K
  ! standard surface pressure
  real, parameter                  ::  ps_standard = 101325. ! Pa
  ! Specific heat of dry air at constant pressure
  real, parameter                  ::  cp_air = 1004.        ! J/K/kg
  ! Specific heat of dry air at constant volume
  real, parameter                  ::  cv_air = 717.         ! J/K/kg
  ! density of pure water at 0 deg C
  real, parameter                  ::  rol   = 1000.         ! kg/m^3
  ! density of ice water at 0 deg C
  real, parameter                  ::  roi   = 917.          ! kg/m^3
  ! von Karman constant
  real, parameter                  ::  vkarman = 0.4         ! none
  ! Latent Heat of vaporization at 0 C
  real, parameter                  ::  Lvap = 2.5e6          ! J/kg

  ! Calculation of kgm2tomoleccm2_no2 (Used to be done in binas.f90) JDM
  !                          mlc/mol
  ! kgm2tomoleccm2_no2 = --------------- = (molec/cm2) / (kg/m2)
  !                       kg/mol cm2/m2 
  real, parameter        ::  xm_no2   =  46.0e-3    ! kg/mol
  real, parameter        ::  kgm2tomoleccm2_no2 = Navog/(xm_no2*1.0e4)

  ! Conversion from pressure difference (Pa = kg m-1 s-2) to 10^15 molecules of air per cm^2
  ! mass of air (note: g/mol instead of kg/mol)
  real, parameter        ::  xmair = 28.94         ! g/mol
  ! conversion factor from mixing ratio, pressure drop (in Pa) to columns (in 10^15 molec cm^-2)
  real, parameter        ::  pdiff2moleccm2 = 1.0e-15 * 0.1 * Navog / ( grav * xmair )

end module physconstants
