[mpas-developers] updates to mpas_constants.F
Michael Duda
duda at ucar.edu
Wed Mar 27 11:48:11 MDT 2013
Hi, Folks.
As part of a merge of changes from the atmos_physics branch to the
trunk, I'd like to update the shared module mpas_constants.F to include
the gas constant for water vapor plus a derived parameter equal to
Rv/Rd. Additionally, a couple of constants that were previously defined
explicitly are now defined in terms of other constants; specifically:
old code:
real (kind=RKIND), parameter :: cv = 716. ! cp - rgas
real (kind=RKIND), parameter :: cvpm = -.71385842 ! -cv/cp
new code:
real (kind=RKIND), parameter :: cv = cp - rgas
real (kind=RKIND), parameter :: cvpm = -cv/cp
Finally, I've added some comments describing the constants. Attached is
the mpas_constants.F that I'm proposing to commit to the trunk. I
realize there's a potential debate here as to whether we shouldn't have
a core-specific constants module, but for now, I'd like to avoid that
and make a small update to what currently exists.
Unless there are any objections or suggestions for improvement, I'll
plan to commit the new mpas_constants.F tomorrow.
Thanks,
Michael
-------------- next part --------------
module mpas_constants
use mpas_kind_types
real (kind=RKIND), parameter :: pii = 3.141592653589793 ! Pi
real (kind=RKIND), parameter :: a = 6371229.0 ! spherical Earth radius [m]
real (kind=RKIND), parameter :: omega = 7.29212e-5 ! angular rotation rate of the Earth [s-1]
real (kind=RKIND), parameter :: gravity = 9.80616 ! acceleration due to gravity [m s-2]
real (kind=RKIND), parameter :: rgas = 287.0 ! gas constant for dry air [J kg-1 K-1]
real (kind=RKIND), parameter :: rv = 461.6 ! gas constant for water vapor [J kg-1 K-1]
real (kind=RKIND), parameter :: rvord = rv/rgas !
real (kind=RKIND), parameter :: cp = 1003.0 ! specific heat of dry air at constant pressure [J kg-1 K-1]
real (kind=RKIND), parameter :: cv = cp - rgas ! specific heat of dry air at constant volume [J kg-1 K-1]
real (kind=RKIND), parameter :: cvpm = -cv/cp !
real (kind=RKIND), parameter :: prandtl = 1.0 ! Prandtl number
contains
subroutine dummy()
end subroutine dummy
end module mpas_constants
More information about the mpas-developers
mailing list