SCALE-RM
scale_file_h.F90
Go to the documentation of this file.
1 !-------------------------------------------------------------------------------
10 #include "scalelib.h"
12  use scale_precision, only: &
13  dp
14  implicit none
15 
16 #include "scale_file_const.h"
17 
18  !--- character length
19  integer, public, parameter :: file_hshort = file_hshort
20  integer, public, parameter :: file_hmid = file_hmid
21  integer, public, parameter :: file_hlong = file_hlong
22 
23  !--- data type
24  integer, public, parameter :: file_real4 = file_real4
25  integer, public, parameter :: file_real8 = file_real8
26  integer, public, parameter :: file_integer2 = file_integer2
27  integer, public, parameter :: file_integer4 = file_integer4
28  integer, public, parameter :: file_integer8 = file_integer8
29  integer, public, parameter :: file_text = file_text
30 
31  !--- action type
32  integer, public, parameter :: file_fread = file_fread
33  integer, public, parameter :: file_fwrite = file_fwrite
34  integer, public, parameter :: file_fappend = file_fappend
35 
36  !--- return codes
37  integer, public, parameter :: file_error_code = error_code
38  integer, public, parameter :: file_success_code = success_code
39  integer, public, parameter :: file_already_closed_code = already_closed_code
40  integer, public, parameter :: file_already_existed_code = already_existed_code
41 
42  !--- max
43  integer, public, parameter :: file_file_max = file_max
44  integer, public, parameter :: file_var_max = var_max
45  integer, public, parameter :: file_rank_max = rank_max
46 
47  !--- missing value
48 #define DBL(v) v
49  real(dp), public, parameter :: file_rmiss = dbl(rmiss)_dp
50 
51  !--- struct for data infomation
52  type, public :: datainfo
53  character(len=FILE_HSHORT) :: varname
54  character(len=FILE_HMID) :: description
55  character(len=FILE_HSHORT) :: units
56  character(len=FILE_HMID) :: standard_name
57  integer :: datatype
58  integer :: rank
59  character(len=FILE_HSHORT) :: dim_name(rank_max)
60  integer :: dim_size(rank_max)
61  integer :: step
62  real(dp) :: time_start
63  real(dp) :: time_end
64  character(len=FILE_HMID) :: time_units
65  character(len=FILE_HSHORT) :: calendar
66  integer :: natts
67  character(len=FILE_HSHORT) :: att_name(att_max)
68  integer :: att_type(att_max)
69  integer :: att_len (att_max)
70  integer :: fid
71  endtype datainfo
72 
73  integer, public, parameter :: file_preclist(0:3) = (/ 4, 8, 4, 8 /)
74 
75  character(len=FILE_HSHORT), public :: file_dtypelist(0:4)
76 
77  data file_dtypelist / "REAL4", "REAL8", "INTEGER2", "INTEGER4", "INTEGER8" /
78 
79 end module scale_file_h
scale_file_h::file_real4
integer, parameter, public file_real4
Definition: scale_file_h.F90:24
scale_file_h::file_integer8
integer, parameter, public file_integer8
Definition: scale_file_h.F90:28
scale_file_h::file_hlong
integer, parameter, public file_hlong
Definition: scale_file_h.F90:21
scale_file_h::file_already_closed_code
integer, parameter, public file_already_closed_code
Definition: scale_file_h.F90:39
scale_precision
module PRECISION
Definition: scale_precision.F90:14
scale_file_h::file_integer2
integer, parameter, public file_integer2
Definition: scale_file_h.F90:26
scale_file_h::file_dtypelist
character(len=file_hshort), dimension(0:4), public file_dtypelist
Definition: scale_file_h.F90:75
scale_file_h::file_hmid
integer, parameter, public file_hmid
Definition: scale_file_h.F90:20
scale_file_h::file_rmiss
real(dp), parameter, public file_rmiss
Definition: scale_file_h.F90:49
scale_file_h::file_preclist
integer, dimension(0:3), parameter, public file_preclist
Definition: scale_file_h.F90:73
scale_file_h::file_hshort
integer, parameter, public file_hshort
Definition: scale_file_h.F90:19
scale_file_h::file_rank_max
integer, parameter, public file_rank_max
Definition: scale_file_h.F90:45
scale_file_h::file_already_existed_code
integer, parameter, public file_already_existed_code
Definition: scale_file_h.F90:40
scale_file_h::file_text
integer, parameter, public file_text
Definition: scale_file_h.F90:29
scale_precision::dp
integer, parameter, public dp
Definition: scale_precision.F90:32
scale_file_h
module file_h
Definition: scale_file_h.F90:11
scale_file_h::file_fappend
integer, parameter, public file_fappend
Definition: scale_file_h.F90:34
scale_file_h::file_error_code
integer, parameter, public file_error_code
Definition: scale_file_h.F90:37
scale_file_h::file_fread
integer, parameter, public file_fread
Definition: scale_file_h.F90:32
scale_file_h::file_success_code
integer, parameter, public file_success_code
Definition: scale_file_h.F90:38
scale_file_h::file_var_max
integer, parameter, public file_var_max
Definition: scale_file_h.F90:44
scale_file_h::file_integer4
integer, parameter, public file_integer4
Definition: scale_file_h.F90:27
scale_file_h::datainfo
Definition: scale_file_h.F90:52
scale_file_h::file_file_max
integer, parameter, public file_file_max
Definition: scale_file_h.F90:43
scale_file_h::file_real8
integer, parameter, public file_real8
Definition: scale_file_h.F90:25
scale_file_h::file_fwrite
integer, parameter, public file_fwrite
Definition: scale_file_h.F90:33