MONC
test_scienceconstants.F90
Go to the documentation of this file.
1 ! Tests the logging_mod utility functions
3  use fruit, only : assert_equals, assert_not_equals, assert_true
10 
11  use state_mod, only : model_state_type
12  implicit none
13 
14 contains
15 
16  ! Test constants
17  subroutine test_science_constants
18 
19  type(model_state_type) :: state
20  call load_model_configuration(state%options_database)
22 
23 
24  call assert_equals(rlvap_over_cp,rlvap/cp, "Test rlvap_over is what is expected")
25  call assert_equals(r_over_cp,r/cp, "Test rlvap_over is what is expected")
26  end subroutine test_science_constants
27 
28 
30 
31 
32 
33  ! Driver for maths_mod utility tests
35  use fruit, only : init_fruit, run_test_case, fruit_summary
37 
38  implicit none
39 
40  call init_fruit
41  call run_test_case(test_science_constants, "Test the initialization of science constants")
42  call fruit_summary
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
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
program test_science_constants_driver
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
subroutine load_model_configuration(state, options_database)
Loads the configuration into the options database, either from a file or checkpoint.
Definition: monc.F90:115
Main core entry point to the rest of the model, this is called by the program main.
Definition: monc.F90:2
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), public alphah
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