22 use musica_assert,
onlY : assert, almost_equal
23 use musica_config,
only : config_t
24 use musica_constants,
only : dk => musica_dk
27 type(config_t) :: config
29 call config%from_file(
"species_config.json" )
32 call assert( 925498072, species%name( ) .eq.
"foo" )
34 call assert( 297444708, species%volume__m3( 100.0_dk ) &
35 .eq. 100.0_dk / 814.0_dk )
37 call assert( 180314351, &
38 almost_equal( species%shortwave_refractive_index( 1 ), &
39 cmplx( 0.2_dk, 12.3_dk, kind = dk ) ) )
40 call assert( 712754854, &
41 almost_equal( species%shortwave_refractive_index( 3 ), &
42 cmplx( 1.0_dk, 3.2_dk, kind = dk ) ) )
43 call assert( 825073199, &
44 almost_equal( species%shortwave_refractive_index( 4 ), &
45 cmplx( 4.0_dk, 4.8_dk, kind = dk ) ) )
46 call assert( 654916295, &
47 almost_equal( species%longwave_refractive_index( 1 ), &
48 cmplx( 4.2_dk, 3.2_dk, kind = dk ) ) )
49 call assert( 149709890, &
50 almost_equal( species%longwave_refractive_index( 3 ), &
51 cmplx( -3.6_dk, 6.5_dk, kind = dk ) ) )
52 call assert( 879552985, &
53 almost_equal( species%longwave_refractive_index( 6 ), &
54 cmplx( 12.3_dk, 102.4_dk, kind = dk ) ) )
The species_t type and related functions.
program test_species
Test module for the species_t type and related functions.
subroutine test_species_t()
Tests for the species_t type.