9 use netcdf,
only: nf90_byte, nf90_short, nf90_int, nf90_float, &
10 nf90_double, nf90_char
18 character(len=*),
intent(in) :: var_name
19 integer(i_long) :: i, ind
34 character(len=*),
intent(in) :: var_name
35 integer(i_long) ,
intent(in) :: var_type
36 integer(i_long) ,
intent(in) :: var_ndims
37 character(len=*),
intent(in) :: var_dims(:)
39 integer(i_long) :: var_index, i
40 character(len=1000) :: err_string
46 if (var_index == -1)
then 48 print *,
"NEW VAR! Var = " // trim(var_name)
73 write (*,
"(A)", advance=
"NO")
"DEBUG DUMP:" 76 if (i /= 1)
write (*,
"(A)", advance=
"NO")
", " 77 write (*,
"(A)", advance=
"NO")
var_names(i)
96 "(Type of variable '" // var_name //
"' changed from " // &
104 write (err_string,
"(A, I0, A, I0, A)") &
105 "Variable ndims changed!" // &
107 "(Variable '" // var_name //
"' changed ndims from ", &
118 call ncdc_error(
"Variable dimensions changed!" // &
120 "(Variable '" // var_name //
"' changed dimension from " // &
124 trim(var_dims(i)) // &
131 var_dim_names(var_index)%dim_names(1:var_ndims) = var_dims(1:var_ndims)
146 character(len=11) :: nc_str
150 if (
var_type == nf90_byte) nc_str =
"NF90_BYTE" 151 if (
var_type == nf90_short) nc_str =
"NF90_SHORT" 152 if (
var_type == nf90_int) nc_str =
"NF90_INT (LONG)" 153 if (
var_type == nf90_float) nc_str =
"NF90_FLOAT" 154 if (
var_type == nf90_double) nc_str =
"NF90_DOUBLE" 155 if (
var_type == nf90_char) nc_str =
"NF90_CHAR" integer(i_long) var_arr_total
integer(i_long), dimension(:), allocatable var_types
integer, parameter, public i_long
integer(i_long) function nc_diag_cat_lookup_dim(dim_name)
character(len=100), dimension(:), allocatable var_names
subroutine ncdc_error(err)
integer(i_long) var_arr_size
subroutine nc_diag_cat_metadata_add_var(var_name, var_type, var_ndims, var_dims)
integer(i_long), dimension(:), allocatable var_counters
integer(i_long) function nc_diag_cat_lookup_var(var_name)
logical, dimension(:), allocatable var_hasunlim
integer(i_long), parameter var_start_size
type(nc_diag_cat_dim_names), dimension(:), allocatable var_dim_names
integer(i_long), dimension(:), allocatable var_output_ids
character(len=11) function nc_diag_cat_metadata_type_to_str(var_type)