source: trunk/MESOSCALE/PLOT/PYTHON/pywrf.example.r39/misc/constants.py @ 183

Last change on this file since 183 was 183, checked in by aslmd, 14 years ago

MESOSCALE: PYTHON: added pywrf r39 to act as a reference for futher developments

File size: 1.3 KB
Line 
1'''
2Physical and other constants in one place to achieve consistency across my
3scripts.
4'''
5
6import numpy as n
7
8# International Standard Atmosphere -> ISA -> isa_
9isa_levels = 7
10# m
11isa_lower_boundaries = n.array([0, 11, 20, 32, 47, 51, 71]) * 1e3
12# NB 86km (geometric) corresponds to 84.852km (geopotential)
13# I have not derived the above so I am not sure what formula for the height
14# dependecy of g -> TODO verify
15isa_upper_boundaries = n.array([11, 20, 32, 47, 51, 71, 84.852]) * 1e3
16# Pa = N m^-2 = kg m s^-2 m^-2 = kg m^-1 s^-2
17isa_sea_level_pressure = 101325
18# K
19isa_sea_level_temperature = 288.15
20# K/m
21isa_temperature_gradient = n.array([-6.5, 0, 1, 2.8, 0, -2.8, -2]) * 1e-3
22
23
24# m^3 kg^-1 s^-2 and plus minus 0.001
25gravitational_constant = 6.6742e-11
26# m s^-2
27gravitational_acceleration = 9.80665
28
29# air
30# common g mol-1 here kg mol-1
31nitrogen_molecular_weight          = 28.01 * 1e-3
32oxygen_molecular_weight            = 32 * 1e-3
33carbon_dioxide_molecular_weight    = 44.01 * 1e-3
34water_molecular_weight             = 18.02 * 1e-3
35air_molecular_weight               = 28.97 * 1e-3
36# J kg^-1 K^-1 (approximate)
37dry_air_gas_constant = 287
38# J K^-1 mol^-1
39universal_gas_constant = 8.3143
40# J Kg^-1 K^-1
41air_specific_heat_constant_pressure = 1004
42air_specific_heat_constant_volume = 717
Note: See TracBrowser for help on using the repository browser.