ETS  \$Id: Doxyfile 2162 2020-02-26 14:16:09Z g2dpc $
 All Classes Files Functions Variables Pages
mod_itm.f90
Go to the documentation of this file.
1 module mod_itm
2 
3  use itm_types
4 
5  implicit none
6 
7  interface exists_entry
9  end interface
10 
11  real(r8), parameter :: itm_double = -9.0e40_r8
12  integer(itm_i4), parameter :: itm_integer = -999999999
13 
14  contains
15 
16 !----------------------------------------------------------------------------
17  function exists_entry_real(v) result(v_exists)
18 !----------------------------------------------------------------------------
19 ! tests whether real data base entry v exists
20 !----------------------------------------------------------------------------
21 
22  real(r8), intent(in) :: v
23  logical :: v_exists
24 
25  if (v > (1._r8 - epsilon(v)) * itm_double) then
26  v_exists = .true.
27  else
28  v_exists = .false.
29  end if
30 
31  end function exists_entry_real
32 
33 !----------------------------------------------------------------------------
34  function exists_entry_integer(v) result(v_exists)
35 !----------------------------------------------------------------------------
36 ! tests whether integer data base entry v exists
37 !----------------------------------------------------------------------------
38 
39  integer(itm_i4), intent(in) :: v
40  logical :: v_exists
41 
42  if (v /= itm_integer) then
43  v_exists = .true.
44  else
45  v_exists = .false.
46  end if
47 
48  end function exists_entry_integer
49 
50 end module mod_itm
logical function exists_entry_real(v)
Definition: mod_itm.f90:17
logical function exists_entry_integer(v)
Definition: mod_itm.f90:34
Definition: mod_itm.f90:7