Difference between revisions of "Physical constants"

From Geos-chem
Jump to: navigation, search
(Created page with "Placeholder for information about physical constants used in GEOS-Chem.")
 
Line 1: Line 1:
Placeholder for information about physical constants used in GEOS-Chem.
+
= Global Physical Constants in GEOS-Chem =
 +
 
 +
In GEOS-Chem v10-01 and prior versions, physical parameters (e.g. pi) were defined in multiple locations within GEOS-Chem. In some cases, the parameters were defined with different values or precisions. In an effort to improve accuracy, consistency, and transparency within GEOS-Chem, the GEOS-Chem Support Team is working towards implementing usage of a single set of global parameters everywhere. Updates made per version, starting with v11-01f, are described on this wiki page.
 +
 
 +
== For Developers ==
 +
 
 +
For v11-01e and prior versions, global constants are stored in <tt>/Headers/CMN_GCTM_mod.F</tt>. For v11-01f and later versions, global constants are stored in <tt>/Headers/physconstants.F</tt>. A complete list of parameters in both files are in the next section of this wiki page.
 +
 
 +
We encourage developers to take advantage of the physical parameters available by including the following use statements in routines or modules:
 +
*v11-01e and prior versions: '''USE CMN_GCTM_MOD'''
 +
*v11-01f and later versions: '''USE PHYSCONSTANTS'''
 +
 
 +
== Physical Constants Available ==
 +
 
 +
<span style="color:orange">'''''This update will be validated with [[GEOS-Chem_v11-01_benchmark_history#v11-01f|1-month benchmark simulation v11-01f]]</span>
 +
 
 +
In v11-01f, we made the following changes:
 +
*Changed the name of the global physical parameter file from <tt>/Headers/CMN_GCTM_mod.F</tt> to <tt>/Headers/physconstants.F</tt>
 +
*Updated all files in <tt>GeosCore</tt> to use physical parameters in <tt>/Headers/physconstants.F</tt>
 +
*Added Boltzmann's constant and standard atmosphere to <tt>/Headers/physconstants.F</tt>
 +
*Adjusted physical parameter values in HEMCO to use values matching those in <tt>/Headers/physconstants.F</tt>
 +
*Adjusted molar gas constant value in <tt>/GeosUtil/henry_mod.F</tt> to match value in <tt>/Headers/physconstants.F</tt>
 +
*Adjusted values of some global physical parameters to match [http://physics.nist.gov/cuu/Constants/bibliography.html NIST, 2014] values
 +
 
 +
Prior and updated values of global physical constants in <tt>/Headers/physconstants.F</tt> are listed in the table below. All values use flexible precision and are therefore double-precision unless compiling with single-precision enabled. Parameters in v11-01f that are different than in previous versions, either due to different values or because they were previously not included, are in bold.
 +
 
 +
{| border=1 cellspacing=0 cellpadding=5
 +
|-bgcolor="#CCCCCC"
 +
!width="300px"|Parameter
 +
!width="150px"|Description
 +
!width="150px"|Units
 +
!width="150px"|Prior to v11-01f
 +
!width="150px"|v11-01f
 +
!width="200px"|Source
 +
 
 +
|-valign="top"
 +
|Avogadro's Number
 +
|AVO
 +
|particles/mol
 +
|6.022e+23
 +
|'''6.022140857e+23'''
 +
|NIST, 2014
 +
 
 +
|-valign="top"
 +
|Acceleration due to gravity at earth's surface
 +
|g0
 +
|m/s<sup>2</sup>
 +
|9.8
 +
|'''9.80665'''
 +
|NIST, 2014
 +
 
 +
|-valign="top"
 +
|Pi
 +
|PI
 +
|unitless
 +
|3.14159265358979323
 +
|3.14159265358979323
 +
|legacy
 +
 
 +
|-valign="top"
 +
|Molar gas constant
 +
|RSTARG
 +
|J/K/mol
 +
|8.31450
 +
|'''8.3144598'''
 +
|NIST, 2014
 +
 
 +
|-valign="top"
 +
|Standard atmosphere
 +
|ATM
 +
|Pa
 +
|Not Included
 +
|101325
 +
|NIST, 2014
 +
 
 +
|-valign="top"
 +
|Boltzmann's constant
 +
|BOLTZ
 +
|J/K
 +
|Not Included
 +
|'''1.38064852e-23'''
 +
|NIST, 2014
 +
 
 +
|-valign="top"
 +
|Von Karman's constant
 +
|VON_KARMAN
 +
|Unitless
 +
|0.4
 +
|0.4
 +
|legacy
 +
 
 +
|-valign="top"
 +
|Radius of earth
 +
|Re
 +
|m
 +
|6.375e+6
 +
|6.375e+6
 +
|legacy
 +
 
 +
|-valign="top"
 +
|Dry air gas constant
 +
|Rd
 +
|J/K/kg
 +
|287.0
 +
|287.0
 +
|legacy
 +
 
 +
|-valign="top"
 +
|Water vapor gas constant
 +
|Rv
 +
|J/K/kg
 +
|Not Included
 +
|'''461.0'''
 +
|legacy (<tt>comode_loop_mod.F</tt>)
 +
 
 +
|-valign="top"
 +
|Molecular weight of dry air
 +
|AIRMW
 +
|g/mol
 +
|28.97
 +
|28.97
 +
|legacy
 +
 
 +
|-valign="top"
 +
|Molecular weight of water
 +
|H2OMW
 +
|g/mol
 +
|18.016
 +
|18.016
 +
|legacy
 +
 
 +
|-valign="top"
 +
|Scale height of the atmosphere
 +
|SCALE_HEIGHT
 +
|m
 +
|7600
 +
|7600
 +
|legacy
 +
 
 +
|-valign="top"
 +
|Molecules dry air per kg dry air
 +
|XNUMOLAIR
 +
|molecules/kg
 +
|AVO / 28.9644e-3
 +
|'''AVO / AIRMW'''
 +
|N/A
 +
 
 +
|-valign="top"
 +
|100 divided by acceleration due to gravity
 +
|g0_100
 +
|s<sup>2/m
 +
|100. / g0
 +
|100. / g0
 +
|legacy
 +
 
 +
|-valign="top"
 +
|Pi divided by 180
 +
|PI_180
 +
|unitless
 +
|PI / 180.
 +
|PI / 180.
 +
|legacy
 +
 
 +
|-valign="top"
 +
|Dry air gas constant divided by the acceleration due to gravity
 +
|Rdg0
 +
|J s<sup>/K/kg/m
 +
|Rd / g0
 +
|Rd / g0
 +
|legacy
 +
 
 +
|}
 +
 
 +
'''Important Notes:'''
 +
*Physical parameters are still hard-coded in several places within HEMCO. Using a single set of global physical parameters in HEMCO will be in a future HEMCO version update.
 +
*Values for pi and the radius of the earth are also defined in <tt>/GeosUtil/regrid_a2a_mod.F90</tt> and values for the molar gas constant and standard atmosphere are also defined in <tt>/GeosUtil/henry_mod.F</tt>. These definitions remain so that the HEMCO standalone software has access to them. In the current version of HEMCO, the HEMCO standalone does not download <tt>/Headers/physconstants.F</tt> and therefore does not have access to global parameters defined in that file. This design may change in a future version.
 +
 
 +
--[[User:Lizzie Lundgren|Lizzie Lundgren]] ([[User talk:Lizzie Lundgren|talk]]) 20:44, 12 January 2016 (UTC)

Revision as of 20:44, 12 January 2016

Global Physical Constants in GEOS-Chem

In GEOS-Chem v10-01 and prior versions, physical parameters (e.g. pi) were defined in multiple locations within GEOS-Chem. In some cases, the parameters were defined with different values or precisions. In an effort to improve accuracy, consistency, and transparency within GEOS-Chem, the GEOS-Chem Support Team is working towards implementing usage of a single set of global parameters everywhere. Updates made per version, starting with v11-01f, are described on this wiki page.

For Developers

For v11-01e and prior versions, global constants are stored in /Headers/CMN_GCTM_mod.F. For v11-01f and later versions, global constants are stored in /Headers/physconstants.F. A complete list of parameters in both files are in the next section of this wiki page.

We encourage developers to take advantage of the physical parameters available by including the following use statements in routines or modules:

  • v11-01e and prior versions: USE CMN_GCTM_MOD
  • v11-01f and later versions: USE PHYSCONSTANTS

Physical Constants Available

This update will be validated with 1-month benchmark simulation v11-01f

In v11-01f, we made the following changes:

  • Changed the name of the global physical parameter file from /Headers/CMN_GCTM_mod.F to /Headers/physconstants.F
  • Updated all files in GeosCore to use physical parameters in /Headers/physconstants.F
  • Added Boltzmann's constant and standard atmosphere to /Headers/physconstants.F
  • Adjusted physical parameter values in HEMCO to use values matching those in /Headers/physconstants.F
  • Adjusted molar gas constant value in /GeosUtil/henry_mod.F to match value in /Headers/physconstants.F
  • Adjusted values of some global physical parameters to match NIST, 2014 values

Prior and updated values of global physical constants in /Headers/physconstants.F are listed in the table below. All values use flexible precision and are therefore double-precision unless compiling with single-precision enabled. Parameters in v11-01f that are different than in previous versions, either due to different values or because they were previously not included, are in bold.

Parameter Description Units Prior to v11-01f v11-01f Source
Avogadro's Number AVO particles/mol 6.022e+23 6.022140857e+23 NIST, 2014
Acceleration due to gravity at earth's surface g0 m/s2 9.8 9.80665 NIST, 2014
Pi PI unitless 3.14159265358979323 3.14159265358979323 legacy
Molar gas constant RSTARG J/K/mol 8.31450 8.3144598 NIST, 2014
Standard atmosphere ATM Pa Not Included 101325 NIST, 2014
Boltzmann's constant BOLTZ J/K Not Included 1.38064852e-23 NIST, 2014
Von Karman's constant VON_KARMAN Unitless 0.4 0.4 legacy
Radius of earth Re m 6.375e+6 6.375e+6 legacy
Dry air gas constant Rd J/K/kg 287.0 287.0 legacy
Water vapor gas constant Rv J/K/kg Not Included 461.0 legacy (comode_loop_mod.F)
Molecular weight of dry air AIRMW g/mol 28.97 28.97 legacy
Molecular weight of water H2OMW g/mol 18.016 18.016 legacy
Scale height of the atmosphere SCALE_HEIGHT m 7600 7600 legacy
Molecules dry air per kg dry air XNUMOLAIR molecules/kg AVO / 28.9644e-3 AVO / AIRMW N/A
100 divided by acceleration due to gravity g0_100 s2/m 100. / g0 100. / g0 legacy
Pi divided by 180 PI_180 unitless PI / 180. PI / 180. legacy
Dry air gas constant divided by the acceleration due to gravity Rdg0 J s/K/kg/m Rd / g0 Rd / g0 legacy

Important Notes:

  • Physical parameters are still hard-coded in several places within HEMCO. Using a single set of global physical parameters in HEMCO will be in a future HEMCO version update.
  • Values for pi and the radius of the earth are also defined in /GeosUtil/regrid_a2a_mod.F90 and values for the molar gas constant and standard atmosphere are also defined in /GeosUtil/henry_mod.F. These definitions remain so that the HEMCO standalone software has access to them. In the current version of HEMCO, the HEMCO standalone does not download /Headers/physconstants.F and therefore does not have access to global parameters defined in that file. This design may change in a future version.

--Lizzie Lundgren (talk) 20:44, 12 January 2016 (UTC)