SCALE-RM
gtool_file_h.f90
Go to the documentation of this file.
1 !-------------------------------------------------------------------------------
13 !-------------------------------------------------------------------------------
15  !-----------------------------------------------------------------------------
16  !
17  !++ Used modules
18  !
19  !-----------------------------------------------------------------------------
20  use dc_types, only: &
21  dp
22  !-----------------------------------------------------------------------------
23  implicit none
24  private
25  !-----------------------------------------------------------------------------
26  !
27  !++ Public procedures
28  !
29  !-----------------------------------------------------------------------------
30  !
31  !++ included parameters
32  !
33  !-----------------------------------------------------------------------------
34  !
35  !++ Public parameters & variables
36  !
37  !--- character length
38  integer, public, parameter :: file_hshort = 32
39  integer, public, parameter :: file_hmid = 128
40  integer, public, parameter :: file_hlong = 1024
41 
42  !--- data type
43  integer, public, parameter :: file_real4 = 0
44  integer, public, parameter :: file_real8 = 1
45  integer, public, parameter :: file_integer2 = 2
46  integer, public, parameter :: file_integer4 = 3
47  integer, public, parameter :: file_integer8 = 4
48 
49  !--- action type
50  integer, public, parameter :: file_fread = 0
51  integer, public, parameter :: file_fwrite = 1
52  integer, public, parameter :: file_fappend = 2
53 
54  !--- return codes
55  integer, public, parameter :: error_code = -1
56  integer, public, parameter :: success_code = 0
57  integer, public, parameter :: already_closed_code = 1
58  integer, public, parameter :: already_existed_code = 2
59 
60  integer, public, parameter :: max_rank = 10
61 
62  !--- struct for data infomation
63  type, public :: datainfo
64  character(len=File_HSHORT) :: varname
65  character(len=File_HMID) :: description
66  character(len=File_HSHORT) :: units
67  integer :: datatype
68  integer :: rank
69  character(len=File_HSHORT) :: dim_name(max_rank)
70  integer :: dim_size(max_rank)
71  integer :: step
72  real(DP) :: time_start
73  real(DP) :: time_end
74  character(len=File_HMID) :: time_units
75  integer :: fid
76  endtype datainfo
77 
78  integer, public, parameter :: file_preclist(0:3) = (/ 4, 8, 4, 8 /)
79 
80 end module gtool_file_h
81 !-------------------------------------------------------------------------------
integer, parameter, public file_fwrite
integer, parameter, public file_hlong
integer, parameter, public file_fappend
integer, parameter, public already_existed_code
integer, parameter, public file_hmid
integer, parameter, public file_integer2
integer, parameter, public success_code
integer, parameter, public max_rank
integer, parameter, public dp
Definition: dc_types.f90:27
integer, parameter, public already_closed_code
integer, parameter, public file_integer4
integer, parameter, public file_fread
integer, dimension(0:3), parameter, public file_preclist
integer, parameter, public file_real4
integer, parameter, public file_integer8
module FILE I/O HEADER
integer, parameter, public file_hshort
integer, parameter, public error_code
integer, parameter, public file_real8