physical_constants.f90 Source File


This file depends on

sourcefile~~physical_constants.f90~~EfferentGraph sourcefile~physical_constants.f90 physical_constants.f90 sourcefile~params.f90 params.f90 sourcefile~physical_constants.f90->sourcefile~params.f90

Files dependent on this one

sourcefile~~physical_constants.f90~~AfferentGraph sourcefile~physical_constants.f90 physical_constants.f90 sourcefile~implicit.f90 implicit.f90 sourcefile~implicit.f90->sourcefile~physical_constants.f90 sourcefile~geometry.f90 geometry.f90 sourcefile~implicit.f90->sourcefile~geometry.f90 sourcefile~horizontal_diffusion.f90 horizontal_diffusion.f90 sourcefile~implicit.f90->sourcefile~horizontal_diffusion.f90 sourcefile~forcing.f90 forcing.f90 sourcefile~forcing.f90->sourcefile~physical_constants.f90 sourcefile~sea_model.f90 sea_model.f90 sourcefile~forcing.f90->sourcefile~sea_model.f90 sourcefile~boundaries.f90 boundaries.f90 sourcefile~forcing.f90->sourcefile~boundaries.f90 sourcefile~longwave_radiation.f90 longwave_radiation.f90 sourcefile~forcing.f90->sourcefile~longwave_radiation.f90 sourcefile~surface_fluxes.f90 surface_fluxes.f90 sourcefile~forcing.f90->sourcefile~surface_fluxes.f90 sourcefile~spectral.f90 spectral.f90 sourcefile~forcing.f90->sourcefile~spectral.f90 sourcefile~forcing.f90->sourcefile~horizontal_diffusion.f90 sourcefile~shortwave_radiation.f90 shortwave_radiation.f90 sourcefile~forcing.f90->sourcefile~shortwave_radiation.f90 sourcefile~land_model.f90 land_model.f90 sourcefile~forcing.f90->sourcefile~land_model.f90 sourcefile~input_output.f90 input_output.f90 sourcefile~input_output.f90->sourcefile~physical_constants.f90 sourcefile~input_output.f90->sourcefile~geometry.f90 sourcefile~input_output.f90->sourcefile~spectral.f90 sourcefile~large_scale_condensation.f90 large_scale_condensation.f90 sourcefile~large_scale_condensation.f90->sourcefile~physical_constants.f90 sourcefile~large_scale_condensation.f90->sourcefile~geometry.f90 sourcefile~sea_model.f90->sourcefile~physical_constants.f90 sourcefile~sea_model.f90->sourcefile~input_output.f90 sourcefile~sea_model.f90->sourcefile~boundaries.f90 sourcefile~sea_model.f90->sourcefile~geometry.f90 sourcefile~prognostics.f90 prognostics.f90 sourcefile~prognostics.f90->sourcefile~physical_constants.f90 sourcefile~prognostics.f90->sourcefile~input_output.f90 sourcefile~prognostics.f90->sourcefile~boundaries.f90 sourcefile~prognostics.f90->sourcefile~geometry.f90 sourcefile~prognostics.f90->sourcefile~spectral.f90 sourcefile~diagnostics.f90 diagnostics.f90 sourcefile~prognostics.f90->sourcefile~diagnostics.f90 sourcefile~boundaries.f90->sourcefile~physical_constants.f90 sourcefile~boundaries.f90->sourcefile~input_output.f90 sourcefile~boundaries.f90->sourcefile~spectral.f90 sourcefile~geometry.f90->sourcefile~physical_constants.f90 sourcefile~longwave_radiation.f90->sourcefile~physical_constants.f90 sourcefile~longwave_radiation.f90->sourcefile~geometry.f90 sourcefile~surface_fluxes.f90->sourcefile~physical_constants.f90 sourcefile~surface_fluxes.f90->sourcefile~geometry.f90 sourcefile~surface_fluxes.f90->sourcefile~land_model.f90 sourcefile~tendencies.f90 tendencies.f90 sourcefile~tendencies.f90->sourcefile~physical_constants.f90 sourcefile~tendencies.f90->sourcefile~implicit.f90 sourcefile~tendencies.f90->sourcefile~prognostics.f90 sourcefile~tendencies.f90->sourcefile~geometry.f90 sourcefile~tendencies.f90->sourcefile~spectral.f90 sourcefile~physics.f90 physics.f90 sourcefile~tendencies.f90->sourcefile~physics.f90 sourcefile~geopotential.f90 geopotential.f90 sourcefile~tendencies.f90->sourcefile~geopotential.f90 sourcefile~spectral.f90->sourcefile~physical_constants.f90 sourcefile~spectral.f90->sourcefile~geometry.f90 sourcefile~legendre.f90 legendre.f90 sourcefile~spectral.f90->sourcefile~legendre.f90 sourcefile~fourier.f90 fourier.f90 sourcefile~spectral.f90->sourcefile~fourier.f90 sourcefile~legendre.f90->sourcefile~physical_constants.f90 sourcefile~legendre.f90->sourcefile~geometry.f90 sourcefile~sppt.f90 sppt.f90 sourcefile~sppt.f90->sourcefile~physical_constants.f90 sourcefile~sppt.f90->sourcefile~spectral.f90 sourcefile~horizontal_diffusion.f90->sourcefile~physical_constants.f90 sourcefile~horizontal_diffusion.f90->sourcefile~geometry.f90 sourcefile~convection.f90 convection.f90 sourcefile~convection.f90->sourcefile~physical_constants.f90 sourcefile~convection.f90->sourcefile~geometry.f90 sourcefile~physics.f90->sourcefile~physical_constants.f90 sourcefile~physics.f90->sourcefile~large_scale_condensation.f90 sourcefile~physics.f90->sourcefile~sea_model.f90 sourcefile~physics.f90->sourcefile~boundaries.f90 sourcefile~physics.f90->sourcefile~geometry.f90 sourcefile~physics.f90->sourcefile~longwave_radiation.f90 sourcefile~physics.f90->sourcefile~surface_fluxes.f90 sourcefile~physics.f90->sourcefile~spectral.f90 sourcefile~physics.f90->sourcefile~sppt.f90 sourcefile~physics.f90->sourcefile~convection.f90 sourcefile~vertical_diffusion.f90 vertical_diffusion.f90 sourcefile~physics.f90->sourcefile~vertical_diffusion.f90 sourcefile~physics.f90->sourcefile~shortwave_radiation.f90 sourcefile~physics.f90->sourcefile~land_model.f90 sourcefile~vertical_diffusion.f90->sourcefile~physical_constants.f90 sourcefile~vertical_diffusion.f90->sourcefile~geometry.f90 sourcefile~geopotential.f90->sourcefile~physical_constants.f90 sourcefile~geopotential.f90->sourcefile~geometry.f90 sourcefile~speedy.f90 speedy.f90 sourcefile~speedy.f90->sourcefile~forcing.f90 sourcefile~speedy.f90->sourcefile~input_output.f90 sourcefile~speedy.f90->sourcefile~prognostics.f90 sourcefile~speedy.f90->sourcefile~shortwave_radiation.f90 sourcefile~coupler.f90 coupler.f90 sourcefile~speedy.f90->sourcefile~coupler.f90 sourcefile~speedy.f90->sourcefile~diagnostics.f90 sourcefile~initialization.f90 initialization.f90 sourcefile~speedy.f90->sourcefile~initialization.f90 sourcefile~time_stepping.f90 time_stepping.f90 sourcefile~speedy.f90->sourcefile~time_stepping.f90 sourcefile~shortwave_radiation.f90->sourcefile~geometry.f90 sourcefile~coupler.f90->sourcefile~sea_model.f90 sourcefile~coupler.f90->sourcefile~land_model.f90 sourcefile~diagnostics.f90->sourcefile~spectral.f90 sourcefile~land_model.f90->sourcefile~input_output.f90 sourcefile~land_model.f90->sourcefile~boundaries.f90 sourcefile~fourier.f90->sourcefile~geometry.f90 sourcefile~initialization.f90->sourcefile~forcing.f90 sourcefile~initialization.f90->sourcefile~input_output.f90 sourcefile~initialization.f90->sourcefile~sea_model.f90 sourcefile~initialization.f90->sourcefile~prognostics.f90 sourcefile~initialization.f90->sourcefile~boundaries.f90 sourcefile~initialization.f90->sourcefile~geometry.f90 sourcefile~initialization.f90->sourcefile~spectral.f90 sourcefile~initialization.f90->sourcefile~horizontal_diffusion.f90 sourcefile~initialization.f90->sourcefile~physics.f90 sourcefile~initialization.f90->sourcefile~geopotential.f90 sourcefile~initialization.f90->sourcefile~coupler.f90 sourcefile~initialization.f90->sourcefile~time_stepping.f90 sourcefile~time_stepping.f90->sourcefile~implicit.f90 sourcefile~time_stepping.f90->sourcefile~prognostics.f90 sourcefile~time_stepping.f90->sourcefile~tendencies.f90 sourcefile~time_stepping.f90->sourcefile~spectral.f90 sourcefile~time_stepping.f90->sourcefile~horizontal_diffusion.f90

Contents


Source Code

!> author: Sam Hatfield, Fred Kucharski, Franco Molteni
!  date: 04/07/2019
!  For storing and initializing physical constants.
module physical_constants
    use params

    implicit none

    private
    public rearth, omega, grav
    public p0, cp, akap, rgas, alhc, alhs, sbc
    public sigl, sigh, grdsig, grdscp, wvi

    ! Physical constants for dynamics
    real, parameter :: rearth = 6.371e+6    !! Radius of Earth (m)
    real, parameter :: omega  = 7.292e-05   !! Rotation rate of Earth (rad/s)
    real, parameter :: grav   = 9.81        !! Gravitational acceleration (m/s/s)

    ! Physical constants for thermodynamics
    real, parameter :: p0   = 1.e+5   !! Reference pressure (Pa)
    real, parameter :: cp   = 1004.0  !! Specific heat at constant pressure (J/K/kg)
    real, parameter :: akap = 2.0/7.0 !! 1 - 1/gamma where gamma is the heat capacity ratio of a
                                      !! perfect diatomic gas (7/5)
    real, parameter :: rgas = akap*cp !! Gas constant per unit mass for dry air (J/K/kg)
    real, parameter :: alhc = 2501.0  !! Latent heat of condensation, in J/g for consistency with
                                      !! specific humidity in g/Kg
    real, parameter :: alhs = 2801.0  !! Latent heat of sublimation
    real, parameter :: sbc  = 5.67e-8 !! Stefan-Boltzmann constant

    !   Functions of sigma and latitude (initial. in INPHYS)
    real, dimension(kx)   :: sigl   !! Logarithm of full-level sigma
    real, dimension(0:kx) :: sigh   !! Half-level sigma
    real, dimension(kx)   :: grdsig !! g/(d_sigma p0) : to convert fluxes of u,v,q into d(u,v,q)/dt
    real, dimension(kx)   :: grdscp !! g/(d_sigma p0 c_p): to convert energy fluxes into dT/dt
    real, dimension(kx,2) :: wvi    !! Weights for vertical interpolation
end module