MONC
scienceconstants.F90
Go to the documentation of this file.
1 
6  use state_mod, only : model_state_type
7  implicit none
8 
9 #ifndef TEST_MODE
10  private
11 #endif
12 
13  real(kind=DEFAULT_PRECISION) :: smallp=1.0e-14, von_karman_constant, z0, z0th, alphah, betam, betah, &
16 
17  real(kind=DEFAULT_PRECISION) :: seconds_in_a_day=86400.0
21 contains
22 
25  subroutine initialise_science_constants(current_state)
26  type(model_state_type), target, intent(inout) :: current_state
27 
28  von_karman_constant=options_get_real(current_state%options_database, "von_karman_constant")
29  z0=options_get_real(current_state%options_database, "z0")
30  z0th=options_get_real(current_state%options_database, "z0th")
31  alphah=options_get_real(current_state%options_database, "alphah")
32  betam=options_get_real(current_state%options_database, "betam")
33  betah=options_get_real(current_state%options_database, "betah")
34  gammam=options_get_real(current_state%options_database, "gammam")
35  gammah=options_get_real(current_state%options_database, "gammah")
36  pi=options_get_real(current_state%options_database, "pi")
37  cp=options_get_real(current_state%options_database, "cp")
38  rlvap=options_get_real(current_state%options_database, "rlvap")
39  r=options_get_real(current_state%options_database, "r")
40  g=options_get_real(current_state%options_database, "G")
41  convective_limit=options_get_real(current_state%options_database, "convective_limit")
42  ratio_mol_wts=options_get_real(current_state%options_database, "ratio_mol_wts")
43  rlargep=options_get_real(current_state%options_database, "rlargep")
44 
46  r_over_cp=r/cp
47  end subroutine initialise_science_constants
48 end module science_constants_mod
real(kind=default_precision), public betah
real(kind=default_precision), public z0th
real(kind=default_precision), public gammah
real(kind=default_precision), public gammam
real(kind=default_precision), public rlargep
real(kind=default_precision), public r_over_cp
real(kind=default_precision), public cp
character(len=string_length) function, public options_get_string(options_database, key, index)
Retrieves a string value from the database that matches the provided key.
integer, parameter, public default_precision
MPI communication type which we use for the prognostic and calculation data.
Definition: datadefn.F90:17
real(kind=default_precision), public smallp
real(kind=default_precision), public g
Contains common definitions for the data and datatypes used by MONC.
Definition: datadefn.F90:2
The ModelState which represents the current state of a run.
Definition: state.F90:39
real(kind=default_precision) surface_vapour_mixing_ratio
real(kind=default_precision), public z0
subroutine, public initialise_science_constants(current_state)
Initialises the scientific constants to read in any values that are overridden in the configuration...
real(kind=default_precision), public von_karman_constant
real(kind=default_precision), public pi
Scientific constant values used throughout simulations. Each has a default value and this can be over...
real(kind=default_precision), public seconds_in_a_day
real(kind=default_precision), public convective_limit
real(kind=default_precision), public ratio_mol_wts
real(kind=default_precision) function, public options_get_real(options_database, key, index)
Retrieves a real value from the database that matches the provided key.
real(kind=default_precision), public alphah
Manages the options database. Contains administration functions and deduce runtime options from the c...
real(kind=default_precision), public betam
real(kind=default_precision), public r
real(kind=default_precision), public rlvap
real(kind=default_precision), public rlvap_over_cp
The model state which represents the current state of a run.
Definition: state.F90:2