FV3 Bundle
ncdc_data.F90
Go to the documentation of this file.
1 module ncdc_data
3 
10  dim_counters, &
12 
15  use ncdc_cli_process, only: ncdc_usage
16 
19 
20  use netcdf, only: nf90_open, nf90_close, nf90_inquire, &
21  nf90_inquire_dimension, nf90_inquire_variable, nf90_get_var, &
22  nf90_put_var, nf90_inq_dimid, &
23  nf90_nowrite, nf90_byte, nf90_short, nf90_int, nf90_float, &
24  nf90_double, nf90_char, nf90_fill_char, nf90_max_name
25 
26  implicit none
27 
28  contains
29  subroutine nc_diag_cat_data_pass
30  integer(i_long) :: cur_dim_id, cur_dim_len
31  integer(i_long) :: cur_out_var_id, cur_out_var_ndims, cur_out_var_counter
32  integer(i_long) :: cur_out_dim_ind, cur_out_var_ind
33  integer(i_long) :: max_cur_pos
34  integer(i_long), dimension(:), allocatable :: cur_out_dim_ids, cur_dim_ids
35  integer(i_long), dimension(:), allocatable :: cur_out_dim_sizes
36  integer(i_long), dimension(:), allocatable :: cur_dim_sizes
37 
38  integer(i_long) :: tmp_dim_index
39  integer(i_long) :: input_ndims
40  integer(i_long) :: input_nvars
41  integer(i_long) :: input_nattrs
42 
43  character(len=NF90_MAX_NAME) :: tmp_var_name
44  integer(i_long) :: tmp_var_type, tmp_var_ndims
45  integer(i_long), dimension(:), allocatable :: tmp_var_dimids
46  character(len=NF90_MAX_NAME) , allocatable :: tmp_var_dim_names(:)
47 
48  integer(i_long), dimension(:), allocatable :: tmp_input_varids
49 
50  character(1) ,dimension(:,:), allocatable :: tmp_string_buffer
51  character(1),dimension(:,:,:),allocatable :: string_2d_buffer
52 
53  integer(i_long) :: arg_index, var_index, i
54 
55  character(len=NF90_MAX_NAME) , allocatable :: tmp_in_dim_names(:)
56 
57  character(len=1000) :: err_string
58 
59  character(:), allocatable :: input_file_cut
60 
61  if (.NOT. allocated(var_names)) then
62  call ncdc_warning("No variables found to concatenate.")
63  return
64  end if
65 
66  call ncdc_info("Reading in data from all files...")
67 
68 #ifdef DEBUG
69  print *, " !!! BEGINNING DATA PASS!!"
70 #endif
71 
73 
74  do arg_index = 1, input_count
75 #ifdef DEBUG
76  print *, " !!! INPUT FILE STAGE"
77 #endif
78  call get_command_argument(2 + arg_index, input_file)
79 
80  input_file_cut = trim(input_file)
81 
82  if (len(input_file_cut) <= 0) then
83  call ncdc_usage("Invalid input file name - likely blank!")
84  end if
85 
86  if (input_file_cut == output_file) then
87  ! No warning here - we've already shown it in metadata.
88  call ncdc_info(" -> Skipping " // input_file_cut // " since it is the output file...")
89  else
90 #ifndef QUIET
91  call ncdc_info(" -> Opening " // input_file_cut // " for reading...")
92 #endif
93  call ncdc_check(nf90_open(input_file, nf90_nowrite, ncid_input, &
94  cache_size = 2147483647))
95 
96  ! Get top level info about the file!
97  call ncdc_check(nf90_inquire(ncid_input, ndimensions = input_ndims, &
98  nvariables = input_nvars, nattributes = input_nattrs))
99 
100  ! Dimensions
101  allocate(tmp_in_dim_names(input_ndims))
102  do tmp_dim_index = 1, input_ndims
103  call ncdc_check(nf90_inquire_dimension(ncid_input, tmp_dim_index, &
104  tmp_in_dim_names(tmp_dim_index)))
105  end do
106 
107  ! Variables
108 #ifdef DEBUG
109  write (*, "(A, I0)") "Number of variables: ", input_nvars
110 #endif
111 
112  allocate(tmp_input_varids(input_nvars))
113 
114  ! Loop through each variable!
115  do var_index = 1, input_nvars
116  ! Grab number of dimensions and attributes first
117  call ncdc_check(nf90_inquire_variable(ncid_input, var_index, name = tmp_var_name, ndims = tmp_var_ndims))
118 
119 #ifdef DEBUG
120  print *, "** PROCESSING VARIABLE: " // trim(tmp_var_name)
121 #endif
122 
123  ! Allocate temporary variable dimids storage!
124  allocate(tmp_var_dimids(tmp_var_ndims))
125  allocate(tmp_var_dim_names(tmp_var_ndims))
126  allocate(cur_dim_ids(tmp_var_ndims))
127  allocate(cur_dim_sizes(tmp_var_ndims))
128  allocate(cur_out_dim_ids(tmp_var_ndims))
129  allocate(cur_out_dim_sizes(tmp_var_ndims))
130 
131 #ifdef DEBUG
132  print *, "** (ALLOC DONE)"
133 #endif
134 
135  ! Grab the actual dimension IDs and attributes
136  call ncdc_check(nf90_inquire_variable(ncid_input, var_index, dimids = tmp_var_dimids, &
137  xtype = tmp_var_type))
138 
139 #ifdef DEBUG
140  write (*, "(A, I0, A, I0)") " => Variable #", var_index, ": " // &
141  trim(tmp_var_name)
142  write (*, "(A)", advance = "NO") " => Dimension IDs: "
143 
144  do i = 1, tmp_var_ndims
145  if (i /= 1) write (*, "(A)", advance = "NO") ", "
146  write (*, "(I0)", advance = "NO") tmp_var_dimids(i)
147  end do
148 
149  write (*, "(A)") ""
150 
151  write (*, "(A)", advance = "NO") " => Dimensions: "
152 #endif
153 
154  do i = 1, tmp_var_ndims
155 #ifdef DEBUG
156  if (i /= 1) write (*, "(A)", advance = "NO") ", "
157 #endif
158  call ncdc_check(nf90_inquire_dimension(ncid_input, tmp_var_dimids(i), tmp_var_dim_names(i), cur_dim_sizes(i)))
159 #ifdef DEBUG
160  write (*, "(A)", advance = "NO") trim(tmp_var_dim_names(i))
161 #endif
162  cur_out_dim_ind = nc_diag_cat_lookup_dim(tmp_var_dim_names(i))
163  cur_out_dim_ids(i) = dim_output_ids(cur_out_dim_ind)
164  cur_out_dim_sizes(i) = dim_sizes(cur_out_dim_ind)
165  end do
166 
167 #ifdef DEBUG
168  write (*, "(A)") ""
169 #endif
170 
171  ! Now, let's lookup everything and translate the result to our file.
172  cur_out_var_ind = nc_diag_cat_lookup_var(tmp_var_name)
173  cur_out_var_id = var_output_ids(cur_out_var_ind)
174  cur_out_var_ndims = var_dim_names(cur_out_var_ind)%num_names
175  cur_out_var_counter = var_counters(cur_out_var_ind)
176 
177 #ifdef DEBUG
178  print *, " (starting var write)"
179 #endif
180 
181 
182  ! Check for one-time only vars...
183  if (((.NOT. any(cur_out_dim_sizes == -1)) .AND. (cur_out_var_counter == 0)) &
184  .OR. (any(cur_out_dim_sizes == -1))) then
185 
186  if ((cur_out_var_ndims == 1) .OR. &
187  ((cur_out_var_ndims == 2) .AND. (tmp_var_type == nf90_char))) then
188  if (tmp_var_type == nf90_byte) then
189  call ncdc_check(nf90_get_var(ncid_input, var_index, &
190  data_blobs(cur_out_var_ind)%byte_buffer &
191  (data_blobs(cur_out_var_ind)%cur_pos : &
192  data_blobs(cur_out_var_ind)%cur_pos + cur_dim_sizes(1) - 1), &
193  start = (/ 1 /), &
194  count = (/ cur_dim_sizes(1) /) ))
195  else if (tmp_var_type == nf90_short) then
196  call ncdc_check(nf90_get_var(ncid_input, var_index, &
197  data_blobs(cur_out_var_ind)%short_buffer &
198  (data_blobs(cur_out_var_ind)%cur_pos : &
199  data_blobs(cur_out_var_ind)%cur_pos + cur_dim_sizes(1) - 1), &
200  start = (/ 1 /), &
201  count = (/ cur_dim_sizes(1) /) ))
202  else if (tmp_var_type == nf90_int) then
203  call ncdc_check(nf90_get_var(ncid_input, var_index, &
204  data_blobs(cur_out_var_ind)%long_buffer &
205  (data_blobs(cur_out_var_ind)%cur_pos : &
206  data_blobs(cur_out_var_ind)%cur_pos + cur_dim_sizes(1) - 1), &
207  start = (/ 1 /), &
208  count = (/ cur_dim_sizes(1) /) ))
209  else if (tmp_var_type == nf90_float) then
210  call ncdc_check(nf90_get_var(ncid_input, var_index, &
211  data_blobs(cur_out_var_ind)%rsingle_buffer &
212  (data_blobs(cur_out_var_ind)%cur_pos : &
213  data_blobs(cur_out_var_ind)%cur_pos + cur_dim_sizes(1) - 1), &
214  start = (/ 1 /), &
215  count = (/ cur_dim_sizes(1) /) ))
216  else if (tmp_var_type == nf90_double) then
217  call ncdc_check(nf90_get_var(ncid_input, var_index, &
218  data_blobs(cur_out_var_ind)%rdouble_buffer &
219  (data_blobs(cur_out_var_ind)%cur_pos : &
220  data_blobs(cur_out_var_ind)%cur_pos + cur_dim_sizes(1) - 1), &
221  start = (/ 1 /), &
222  count = (/ cur_dim_sizes(1) /) ))
223  else if (tmp_var_type == nf90_char) then
224  ! Strangely enough, NetCDF doesn't support storing strings to
225  ! an array splice. Even with defined bounds, the strings is not
226  ! stored properly, especially when the variable's dimensions
227  ! are smaller than the actual target's dimensions. The smaller
228  ! strings are stored contiguously within the array, going outside
229  ! the given bounds.
230  !
231  ! For example, given [ '1234', '5678' ], placing it into a 5x2 array
232  ! yields [ '12345', '678**' ] instead of [ '1234 ', '5678 ' ].
233 
234  allocate(tmp_string_buffer(cur_dim_sizes(1), cur_dim_sizes(2)))
235  tmp_string_buffer = nf90_fill_char
236 
237  call ncdc_check(nf90_get_var(ncid_input, var_index, tmp_string_buffer, &
238  start = (/ 1, 1 /), &
239  count = (/ cur_dim_sizes(1), cur_dim_sizes(2) /) ))
240 
241  data_blobs(cur_out_var_ind)%string_buffer &
242  (1 : cur_dim_sizes(1), &
243  data_blobs(cur_out_var_ind)%cur_pos : &
244  data_blobs(cur_out_var_ind)%cur_pos + cur_dim_sizes(2) - 1) = &
245  tmp_string_buffer
246 
247  deallocate(tmp_string_buffer)
248  else
249  write (err_string, "(A, I0, A)") &
250  "Invalid type detected during write." // &
251  char(10) // " " // &
252  "(Variable '" // trim(tmp_var_name) // "' has an type of ", &
253  tmp_var_type, "," // &
254  char(10) // " " // &
255  "which is invalid!)"
256  call ncdc_error(trim(err_string))
257  end if
258  else if ((cur_out_var_ndims == 2) .OR. &
259  ((cur_out_var_ndims == 3) .AND. (tmp_var_type == nf90_char))) then
260 
261  if (tmp_var_type == nf90_byte) then
262  call ncdc_check(nf90_get_var(ncid_input, var_index, &
263  data_blobs(cur_out_var_ind)%byte_2d_buffer &
264  (1 : cur_dim_sizes(1), &
265  data_blobs(cur_out_var_ind)%cur_pos : &
266  data_blobs(cur_out_var_ind)%cur_pos + cur_dim_sizes(2) - 1)))
267  else if (tmp_var_type == nf90_short) then
268  call ncdc_check(nf90_get_var(ncid_input, var_index, &
269  data_blobs(cur_out_var_ind)%short_2d_buffer &
270  (1 : cur_dim_sizes(1), &
271  data_blobs(cur_out_var_ind)%cur_pos : &
272  data_blobs(cur_out_var_ind)%cur_pos + cur_dim_sizes(2) - 1)))
273  else if (tmp_var_type == nf90_int) then
274  call ncdc_check(nf90_get_var(ncid_input, var_index, &
275  data_blobs(cur_out_var_ind)%long_2d_buffer &
276  (1 : cur_dim_sizes(1), &
277  data_blobs(cur_out_var_ind)%cur_pos : &
278  data_blobs(cur_out_var_ind)%cur_pos + cur_dim_sizes(2) - 1)))
279 #ifdef DEBUG
280  print *, "Storage place: ", dim_counters(nc_diag_cat_lookup_dim(tmp_var_dim_names(2)))
281 #endif
282  else if (tmp_var_type == nf90_float) then
283  call ncdc_check(nf90_get_var(ncid_input, var_index, &
284  data_blobs(cur_out_var_ind)%rsingle_2d_buffer &
285  (1 : cur_dim_sizes(1), &
286  data_blobs(cur_out_var_ind)%cur_pos : &
287  data_blobs(cur_out_var_ind)%cur_pos + cur_dim_sizes(2) - 1), &
288  start = (/ 1, 1 /), &
289  count = (/ cur_dim_sizes(1), cur_dim_sizes(2) /) ))
290  else if (tmp_var_type == nf90_double) then
291  call ncdc_check(nf90_get_var(ncid_input, var_index, &
292  data_blobs(cur_out_var_ind)%rdouble_2d_buffer &
293  (1 : cur_dim_sizes(1), &
294  data_blobs(cur_out_var_ind)%cur_pos : &
295  data_blobs(cur_out_var_ind)%cur_pos + cur_dim_sizes(2) - 1), &
296  start = (/ 1, 1 /), &
297  count = (/ cur_dim_sizes(1), cur_dim_sizes(2) /) ))
298  else if (tmp_var_type == nf90_char) then
299  ! Use string buffer variable - same issue as before with 1D strings!
300  allocate(string_2d_buffer(cur_dim_sizes(1), cur_dim_sizes(2), cur_dim_sizes(3)))
301  string_2d_buffer = nf90_fill_char
302  call ncdc_check(nf90_get_var(ncid_input, var_index, string_2d_buffer, &
303  start = (/ 1, 1, 1 /), &
304  count = (/ cur_dim_sizes(1), cur_dim_sizes(2), cur_dim_sizes(3) /) ))
305  print *, "CUR_POS COUNTER:", data_blobs(cur_out_var_ind)%cur_pos
306  data_blobs(cur_out_var_ind)%string_2d_buffer &
307  (1 : cur_dim_sizes(1), 1 : cur_dim_sizes(2), &
308  data_blobs(cur_out_var_ind)%cur_pos : &
309  data_blobs(cur_out_var_ind)%cur_pos + cur_dim_sizes(3) - 1) &
310  = string_2d_buffer(:,:,:)
311  deallocate(string_2d_buffer)
312  else
313  write (err_string, "(A, I0, A)") &
314  "Invalid type detected during write." // &
315  char(10) // " " // &
316  "(Variable '" // trim(tmp_var_name) // "' has an type of ", &
317  tmp_var_type, "," // &
318  char(10) // " " // &
319  "which is invalid!)"
320  call ncdc_error(trim(err_string))
321  end if
322  end if
323 
324  if (any(cur_out_dim_sizes == -1)) &
325  data_blobs(cur_out_var_ind)%cur_pos = &
326  data_blobs(cur_out_var_ind)%cur_pos + cur_dim_sizes(cur_out_var_ndims)
327 
328  var_counters(cur_out_var_ind) = &
329  var_counters(cur_out_var_ind) + 1
330  end if
331 
332 #ifdef DEBUG
333  print *, " (end var write / start dealloc)"
334 #endif
335 
336  ! Deallocate
337  deallocate(tmp_var_dimids)
338  deallocate(tmp_var_dim_names)
339  deallocate(cur_dim_ids)
340  deallocate(cur_dim_sizes)
341  deallocate(cur_out_dim_ids)
342  deallocate(cur_out_dim_sizes)
343 
344 #ifdef DEBUG
345  print *, " (end dealloc)"
346 #endif
347  end do
348 
349  ! For variables that we didn't cover - check for those,
350  ! and update to the latest nobs position. That way, we
351  ! can leave blanks for variables that didn't exist!
352  ! Basically, we can just set all cur_pos to nobs.
353  ! Latest nobs is max(all var cur_pos).
354  ! Therefore, for every var, var%cur_pos = max(all var cur_pos).
355  if (var_arr_total > 0) then
356  max_cur_pos = -9999
357  do var_index = 1, var_arr_total
358  if (data_blobs(var_index)%cur_pos > max_cur_pos) &
359  max_cur_pos = data_blobs(var_index)%cur_pos
360  end do
361 
362  if (max_cur_pos > 0) then
363  do var_index = 1, var_arr_total
364  data_blobs(var_index)%cur_pos = max_cur_pos
365  end do
366  end if
367  end if
368 
369  ! Update any unlimited counters
370  if (any(dim_sizes == -1)) then
371  do i = 1, dim_arr_total
372  ! Check for -1 - unlimited indicator
373  if ((dim_sizes(i) == -1) .AND. (any(tmp_in_dim_names == dim_names(i)))) then
374  ! We got one! But... we need to find this dimension in the file.
375  ! First, lookup dimension name to get dimension ID.
376 #ifdef DEBUG
377  print *, "Unlimited dimension name: ", trim(dim_names(i))
378 #endif
379  call ncdc_check(nf90_inq_dimid(ncid_input, dim_names(i), cur_dim_id))
380 
381  ! Then, grab the current unlimited dimension length!
382  call ncdc_check(nf90_inquire_dimension(ncid_input, cur_dim_id, len = cur_dim_len))
383 
384  ! Add the length to the counter!
385  dim_counters(i) = dim_counters(i) + cur_dim_len
386  end if
387  end do
388  end if
389 
390  call ncdc_check(nf90_close(ncid_input))
391 
392  !deallocate(unlim_dims)
393  !deallocate(tmp_input_dimids)
394  deallocate(tmp_input_varids)
395  deallocate(tmp_in_dim_names)
396  end if
397  end do
398  end subroutine nc_diag_cat_data_pass
399 
400  subroutine nc_diag_cat_data_commit
401  integer(i_long) :: var_index
402 
403 #ifndef QUIET
404  call ncdc_info("Doing final data commit...")
405 #endif
406 
407  do var_index = 1, var_arr_total
408 #ifndef QUIET
409  call ncdc_info(" => Writing variable " // trim(var_names(var_index)) // "...")
410 #endif
411  if ((var_dim_names(var_index)%num_names == 1) .OR. &
412  ((var_dim_names(var_index)%num_names == 2) .AND. (var_types(var_index) == nf90_char)) ) then
413  if (var_types(var_index) == nf90_byte) &
414  call ncdc_check(nf90_put_var(ncid_output, var_output_ids(var_index), &
415  data_blobs(var_index)%byte_buffer, &
416  start = (/ 1 /), &
417  count = (/ data_blobs(var_index)%alloc_size(1) /) ))
418  if (var_types(var_index) == nf90_short) &
419  call ncdc_check(nf90_put_var(ncid_output, var_output_ids(var_index), &
420  data_blobs(var_index)%short_buffer, &
421  start = (/ 1 /), &
422  count = (/ data_blobs(var_index)%alloc_size(1) /) ))
423  if (var_types(var_index) == nf90_int) &
424  call ncdc_check(nf90_put_var(ncid_output, var_output_ids(var_index), &
425  data_blobs(var_index)%long_buffer, &
426  start = (/ 1 /), &
427  count = (/ data_blobs(var_index)%alloc_size(1) /) ))
428  if (var_types(var_index) == nf90_float) &
429  call ncdc_check(nf90_put_var(ncid_output, var_output_ids(var_index), &
430  data_blobs(var_index)%rsingle_buffer, &
431  start = (/ 1 /), &
432  count = (/ data_blobs(var_index)%alloc_size(1) /) ))
433 
434  if (var_types(var_index) == nf90_double) &
435  call ncdc_check(nf90_put_var(ncid_output, var_output_ids(var_index), &
436  data_blobs(var_index)%rdouble_buffer, &
437  start = (/ 1 /), &
438  count = (/ data_blobs(var_index)%alloc_size(1) /) ))
439  if (var_types(var_index) == nf90_char) &
440  call ncdc_check(nf90_put_var(ncid_output, var_output_ids(var_index), &
441  data_blobs(var_index)%string_buffer, &
442  start = (/ 1, 1 /), &
443  count = (/ data_blobs(var_index)%alloc_size(1), &
444  data_blobs(var_index)%alloc_size(2) /) ))
445  else if ((var_dim_names(var_index)%num_names == 2) .OR. &
446  ((var_dim_names(var_index)%num_names == 3) .AND. (var_types(var_index) == nf90_char)) ) then
447  if (var_types(var_index) == nf90_byte) &
448  call ncdc_check(nf90_put_var(ncid_output, var_output_ids(var_index), &
449  data_blobs(var_index)%byte_2d_buffer, &
450  start = (/ 1, 1 /), &
451  count = (/ data_blobs(var_index)%alloc_size(1), &
452  data_blobs(var_index)%alloc_size(2) /) ))
453  if (var_types(var_index) == nf90_short) &
454  call ncdc_check(nf90_put_var(ncid_output, var_output_ids(var_index), &
455  data_blobs(var_index)%short_2d_buffer, &
456  start = (/ 1, 1 /), &
457  count = (/ data_blobs(var_index)%alloc_size(1), &
458  data_blobs(var_index)%alloc_size(2) /) ))
459  if (var_types(var_index) == nf90_int) &
460  call ncdc_check(nf90_put_var(ncid_output, var_output_ids(var_index), &
461  data_blobs(var_index)%long_2d_buffer, &
462  start = (/ 1, 1 /), &
463  count = (/ data_blobs(var_index)%alloc_size(1), &
464  data_blobs(var_index)%alloc_size(2) /) ))
465  if (var_types(var_index) == nf90_float) &
466  call ncdc_check(nf90_put_var(ncid_output, var_output_ids(var_index), &
467  data_blobs(var_index)%rsingle_2d_buffer, &
468  start = (/ 1, 1 /), &
469  count = (/ data_blobs(var_index)%alloc_size(1), &
470  data_blobs(var_index)%alloc_size(2) /) ))
471  if (var_types(var_index) == nf90_double) &
472  call ncdc_check(nf90_put_var(ncid_output, var_output_ids(var_index), &
473  data_blobs(var_index)%rdouble_2d_buffer, &
474  start = (/ 1, 1 /), &
475  count = (/ data_blobs(var_index)%alloc_size(1), &
476  data_blobs(var_index)%alloc_size(2) /) ))
477  if (var_types(var_index) == nf90_char) &
478  call ncdc_check(nf90_put_var(ncid_output, var_output_ids(var_index), &
479  data_blobs(var_index)%string_2d_buffer, &
480  start = (/ 1, 1, 1 /), &
481  count = (/ data_blobs(var_index)%alloc_size(1), &
482  data_blobs(var_index)%alloc_size(2), &
483  data_blobs(var_index)%alloc_size(3) /) ))
484  end if
485  end do
486  end subroutine nc_diag_cat_data_commit
487 end module ncdc_data
integer(i_long) var_arr_total
Definition: ncdc_state.F90:43
integer(i_long), dimension(:), allocatable dim_output_ids
Definition: ncdc_state.F90:19
integer, parameter, public i_byte
Definition: ncd_kinds.F90:45
character(len=10000000) output_file
Definition: ncdc_state.F90:11
integer(i_long), dimension(:), allocatable var_types
Definition: ncdc_state.F90:36
integer, parameter, public i_long
Definition: ncd_kinds.F90:47
character(len=100), dimension(:), allocatable dim_names
Definition: ncdc_state.F90:17
integer(i_long) cli_arg_count
Definition: ncdc_state.F90:12
character(len=10000000) prgm_name
Definition: ncdc_state.F90:11
subroutine ncdc_usage(err)
integer(i_long) function nc_diag_cat_lookup_dim(dim_name)
Definition: ncdc_dims.F90:14
character(len=100), dimension(:), allocatable var_names
Definition: ncdc_state.F90:35
integer(i_long) ncid_output
Definition: ncdc_state.F90:14
integer(i_long), dimension(:), allocatable dim_counters
Definition: ncdc_state.F90:20
subroutine ncdc_error(err)
Definition: ncdc_climsg.F90:29
integer(i_long) ncid_input
Definition: ncdc_state.F90:14
subroutine ncdc_info(ifo)
Definition: ncdc_climsg.F90:72
subroutine ncdc_warning(warn)
Definition: ncdc_climsg.F90:58
integer(i_long) input_count
Definition: ncdc_state.F90:12
subroutine ncdc_check(status)
Definition: ncdc_climsg.F90:21
integer(i_long), dimension(:), allocatable var_counters
Definition: ncdc_state.F90:39
integer(i_long) function nc_diag_cat_lookup_var(var_name)
Definition: ncdc_vars.F90:18
integer, parameter, public i_short
Definition: ncd_kinds.F90:46
type(nc_diag_cat_dim_names), dimension(:), allocatable var_dim_names
Definition: ncdc_state.F90:37
subroutine nc_diag_cat_data_commit
Definition: ncdc_data.F90:401
integer(i_long), dimension(:), allocatable var_output_ids
Definition: ncdc_state.F90:38
integer(i_long) dim_arr_total
Definition: ncdc_state.F90:24
integer, parameter, public r_double
Definition: ncd_kinds.F90:80
type(data_blob), dimension(:), allocatable data_blobs
Definition: ncdc_state.F90:48
integer, parameter, public r_single
Definition: ncd_kinds.F90:79
subroutine nc_diag_cat_data_pass
Definition: ncdc_data.F90:30
integer(i_long), dimension(:), allocatable dim_sizes
Definition: ncdc_state.F90:18
character(len=10000000) input_file
Definition: ncdc_state.F90:11