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  real(DP), public, parameter :: file_rmiss = rmiss
49 
50  !--- struct for data infomation
51  type, public :: datainfo
52  character(len=FILE_HSHORT) :: varname
53  character(len=FILE_HMID) :: description
54  character(len=FILE_HSHORT) :: units
55  character(len=FILE_HMID) :: standard_name
56  integer :: datatype
57  integer :: rank
58  character(len=FILE_HSHORT) :: dim_name(rank_max)
59  integer :: dim_size(rank_max)
60  integer :: step
61  real(DP) :: time_start
62  real(DP) :: time_end
63  character(len=FILE_HMID) :: time_units
64  character(len=FILE_HSHORT) :: calendar
65  integer :: natts
66  character(len=FILE_HSHORT) :: att_name(att_max)
67  integer :: att_type(att_max)
68  integer :: att_len (att_max)
69  integer :: fid
70  endtype datainfo
71 
72  integer, public, parameter :: file_preclist(0:3) = (/ 4, 8, 4, 8 /)
73 
74  character(len=FILE_HSHORT), public :: file_dtypelist(0:4)
75 
76  data file_dtypelist / "REAL4", "REAL8", "INTEGER2", "INTEGER4", "INTEGER8" /
77 
78 end module scale_file_h
integer, parameter, public file_rank_max
integer, parameter, public file_integer2
integer, parameter, public file_success_code
integer, parameter, public file_fappend
integer, parameter, public file_real4
integer, parameter, public file_error_code
integer, parameter, public file_hlong
integer, parameter, public file_hmid
integer, parameter, public file_real8
integer, parameter, public file_file_max
integer, parameter, public file_fread
character(len=file_hshort), dimension(0:4), public file_dtypelist
integer, parameter, public file_hshort
integer, parameter, public file_already_closed_code
integer, parameter, public file_var_max
real(dp), parameter, public file_rmiss
integer, parameter, public file_already_existed_code
integer, parameter, public file_text
integer, parameter, public file_integer4
module PRECISION
integer, parameter, public file_integer8
integer, parameter, public file_fwrite
integer, parameter, public dp
integer, dimension(0:3), parameter, public file_preclist
module file_h