MFIX  2016-1
mfix_netcdf_mod.f
Go to the documentation of this file.
1 module mfix_netcdf
2 
3 #ifdef NETCDF
4  include 'netcdf.inc'
5  USE netcdf ! ignore-depcomp
6 #else
8 
9  integer nf90_double
10  integer nf90_int
11  integer nf90_nowrite
12  integer nf90_clobber
13 
14  parameter(nf90_64bit_offset = 0)
15  parameter(nf90_double = 0)
16  parameter(nf90_int = 0)
17  parameter(nf90_nowrite = 0)
18  parameter(nf90_clobber = 0)
19 #endif
20 
21  ! Overloaded variable functions
24  end interface mfix_nf90_def_var ! MFIX_nf90_def_var
25 
27  module procedure mfix_nf90_put_var_text, &
30  module procedure mfix_nf90_put_var_1d_text, &
33  module procedure mfix_nf90_put_var_2d_text, &
36  module procedure mfix_nf90_put_var_3d_text, &
40  end interface mfix_nf90_put_var ! MFIX_nf90_put_var
41 
43  module procedure mfix_nf90_get_var_text, &
44  mfix_nf90_get_var_fourbyteint, & ! MFIX_nf90_get_var_EightByteInt, &
46  module procedure mfix_nf90_get_var_1d_text, &
49  module procedure mfix_nf90_get_var_2d_text, &
51  module procedure mfix_nf90_get_var_3d_text, &
54  module procedure mfix_nf90_get_var_4d_text
55  module procedure mfix_nf90_get_var_5d_text
56  module procedure mfix_nf90_get_var_6d_text
57  module procedure mfix_nf90_get_var_7d_text
58  end interface mfix_nf90_get_var ! MFIX_nf90_get_var
59 
60 contains
61  function mfix_nf90_def_var_scalar(ncid, name, xtype, varid)
62  integer, intent( in) :: ncid
63  character (len = *), intent( in) :: name
64  integer, intent( in) :: xtype
65  integer, intent(inout) :: varid
66  integer :: MFIX_nf90_def_var_Scalar
67 
68  ! Dummy - shouldn't get used
69  integer, dimension(1) :: dimids
70 
71 #ifdef NETCDF
72  mfix_nf90_def_var_scalar = nf90_def_var(ncid, name, xtype, varid)
73 #else
74  mfix_nf90_def_var_scalar = 1
75 #endif
76  end function mfix_nf90_def_var_scalar
77  ! -----
78  function mfix_nf90_def_var_onedim(ncid, name, xtype, dimids, varid)
79  integer, intent( in) :: ncid
80  character (len = *), intent( in) :: name
81  integer, intent( in) :: xtype
82  integer, intent( in) :: dimids
83  integer, intent(inout) :: varid
84  integer :: MFIX_nf90_def_var_oneDim
85 
86  integer, dimension(1) :: dimidsA
87  dimidsa(1) = dimids
88 #ifdef NETCDF
89  mfix_nf90_def_var_onedim = nf90_def_var(ncid, name, xtype, dimids, varid)
90 #else
91  mfix_nf90_def_var_onedim = 1
92 #endif
93  end function mfix_nf90_def_var_onedim
94  ! -----
95  function mfix_nf90_def_var_manydims(ncid, name, xtype, dimids, varid)
96  integer, intent( in) :: ncid
97  character (len = *), intent( in) :: name
98  integer, intent( in) :: xtype
99  integer, dimension(:), intent( in) :: dimids
100  integer, intent(inout) :: varid
101  integer :: MFIX_nf90_def_var_ManyDims
102 
103 #ifdef NETCDF
104  mfix_nf90_def_var_manydims = nf90_def_var(ncid, name, xtype, dimids, varid)
105 #else
106  mfix_nf90_def_var_manydims = 1
107 #endif
108  end function mfix_nf90_def_var_manydims
109 
110 
111  function mfix_nf90_put_var_text(ncid, varid, values, start, count, stride, map)
112  integer, intent( in) :: ncid, varid
113  character (len = *), intent( in) :: values
114  integer, dimension(:), optional, intent( in) :: start, count, stride, map
115  integer :: MFIX_nf90_put_var_text
116 
117 
118 #ifdef NETCDF
119  mfix_nf90_put_var_text = nf90_put_var(ncid, varid, values, start, count, stride, map)
120 #else
121  mfix_nf90_put_var_text = 1
122 #endif
123  end function mfix_nf90_put_var_text
124 
125  function mfix_nf90_get_var_text(ncid, varid, values, start, count, stride, map)
126  integer, intent( in) :: ncid, varid
127  character (len = *), intent(inout) :: values
128  integer, dimension(:), optional, intent( in) :: start, count, stride, map
129  integer :: MFIX_nf90_get_var_text
130 
131 
132 #ifdef NETCDF
133  mfix_nf90_get_var_text = nf90_get_var(ncid, varid, values, start, count, stride, map)
134 #else
135  mfix_nf90_get_var_text = 1
136 #endif
137  end function mfix_nf90_get_var_text
138 
139 
140  function mfix_nf90_put_var_1d_text(ncid, varid, values, start, count, stride, map)
141  integer, intent( in) :: ncid, varid
142  character (len = *), dimension(:), &
143  intent( in) :: values
144  integer, dimension(:), optional, intent( in) :: start, count, stride, map
145  integer :: MFIX_nf90_put_var_1D_text
146 
147  integer, parameter :: numDims = 1
148 
149 #ifdef NETCDF
150  mfix_nf90_put_var_1d_text = nf90_put_var(ncid, varid, values, start, count, stride, map)
151 #else
152  mfix_nf90_put_var_1d_text = 1
153 #endif
154 
155  end function mfix_nf90_put_var_1d_text
156 
157 
158  function mfix_nf90_put_var_2d_text(ncid, varid, values, start, count, stride, map)
159  integer, intent( in) :: ncid, varid
160  character (len = *), dimension(:, :), &
161  intent( in) :: values
162  integer, dimension(:), optional, intent( in) :: start, count, stride, map
163  integer :: MFIX_nf90_put_var_2D_text
164 
165  integer, parameter :: numDims = 2
166 
167 #ifdef NETCDF
168  mfix_nf90_put_var_2d_text = nf90_put_var(ncid, varid, values, start, count, stride, map)
169 #else
170  mfix_nf90_put_var_2d_text = 1
171 #endif
172 
173  end function mfix_nf90_put_var_2d_text
174 
175 
176  function mfix_nf90_put_var_3d_text(ncid, varid, values, start, count, stride, map)
177  integer, intent( in) :: ncid, varid
178  character (len = *), dimension(:, :, :), &
179  intent( in) :: values
180  integer, dimension(:), optional, intent( in) :: start, count, stride, map
181  integer :: MFIX_nf90_put_var_3D_text
182 
183  integer, parameter :: numDims = 3
184 #ifdef NETCDF
185  mfix_nf90_put_var_3d_text = nf90_put_var(ncid, varid, values, start, count, stride, map)
186 #else
187  mfix_nf90_put_var_3d_text = 1
188 #endif
189 
190  end function mfix_nf90_put_var_3d_text
191 
192 
193 
194  function mfix_nf90_get_var_1d_text(ncid, varid, values, start, count, stride, map)
195  integer, intent( in) :: ncid, varid
196  character (len = *), dimension(:), &
197  intent(inout) :: values
198  integer, dimension(:), optional, intent( in) :: start, count, stride, map
199  integer :: MFIX_nf90_get_var_1D_text
200 
201  integer, parameter :: numDims = 1
202 #ifdef NETCDF
203  mfix_nf90_get_var_1d_text = nf90_get_var(ncid, varid, values, start, count, stride, map)
204 #else
205  mfix_nf90_get_var_1d_text = 1
206 #endif
207  end function mfix_nf90_get_var_1d_text
208 
209 
210  function mfix_nf90_get_var_2d_text(ncid, varid, values, start, count, stride, map)
211  integer, intent( in) :: ncid, varid
212  character (len = *), dimension(:, :), &
213  intent(inout) :: values
214  integer, dimension(:), optional, intent( in) :: start, count, stride, map
215  integer :: MFIX_nf90_get_var_2D_text
216 
217  integer, parameter :: numDims = 2
218 #ifdef NETCDF
219  mfix_nf90_get_var_2d_text = nf90_get_var(ncid, varid, values, start, count, stride, map)
220 #else
221  mfix_nf90_get_var_2d_text = 1
222 #endif
223  end function mfix_nf90_get_var_2d_text
224 
225 
226  function mfix_nf90_get_var_3d_text(ncid, varid, values, start, count, stride, map)
227  integer, intent( in) :: ncid, varid
228  character (len = *), dimension(:, :, :), &
229  intent(inout) :: values
230  integer, dimension(:), optional, intent( in) :: start, count, stride, map
231  integer :: MFIX_nf90_get_var_3D_text
232 
233  integer, parameter :: numDims = 3
234 #ifdef NETCDF
235  mfix_nf90_get_var_3d_text = nf90_get_var(ncid, varid, values, start, count, stride, map)
236 #else
237  mfix_nf90_get_var_3d_text = 1
238 #endif
239  end function mfix_nf90_get_var_3d_text
240 
241 
242  function mfix_nf90_get_var_4d_text(ncid, varid, values, start, count, stride, map)
243  integer, intent( in) :: ncid, varid
244  character (len = *), dimension(:, :, :, :), &
245  intent(inout) :: values
246  integer, dimension(:), optional, intent( in) :: start, count, stride, map
247  integer :: MFIX_nf90_get_var_4D_text
248 
249  integer, parameter :: numDims = 4
250 #ifdef NETCDF
251  mfix_nf90_get_var_4d_text = nf90_get_var(ncid, varid, values, start, count, stride, map)
252 #else
253  mfix_nf90_get_var_4d_text = 1
254 #endif
255  end function mfix_nf90_get_var_4d_text
256 
257 
258  function mfix_nf90_get_var_5d_text(ncid, varid, values, start, count, stride, map)
259  integer, intent( in) :: ncid, varid
260  character (len = *), dimension(:, :, :, :, :), &
261  intent(inout) :: values
262  integer, dimension(:), optional, intent( in) :: start, count, stride, map
263  integer :: MFIX_nf90_get_var_5D_text
264 
265  integer, parameter :: numDims = 5
266 
267 #ifdef NETCDF
268  mfix_nf90_get_var_5d_text = nf90_get_var(ncid, varid, values, start, count, stride, map)
269 #else
270  mfix_nf90_get_var_5d_text = 1
271 #endif
272  end function mfix_nf90_get_var_5d_text
273 
274 
275  function mfix_nf90_get_var_6d_text(ncid, varid, values, start, count, stride, map)
276  integer, intent( in) :: ncid, varid
277  character (len = *), dimension(:, :, :, :, :, :), &
278  intent(inout) :: values
279  integer, dimension(:), optional, intent( in) :: start, count, stride, map
280  integer :: MFIX_nf90_get_var_6D_text
281 
282  integer, parameter :: numDims = 6
283 #ifdef NETCDF
284  mfix_nf90_get_var_6d_text = nf90_get_var(ncid, varid, values, start, count, stride, map)
285 #else
286  mfix_nf90_get_var_6d_text = 1
287 #endif
288  end function mfix_nf90_get_var_6d_text
289 
290 
291  function mfix_nf90_get_var_7d_text(ncid, varid, values, start, count, stride, map)
292  integer, intent( in) :: ncid, varid
293  character (len = *), dimension(:, :, :, :, :, :, :), &
294  intent(inout) :: values
295  integer, dimension(:), optional, intent( in) :: start, count, stride, map
296  integer :: MFIX_nf90_get_var_7D_text
297 
298  integer, parameter :: numDims = 7
299 #ifdef NETCDF
300  mfix_nf90_get_var_7d_text = nf90_get_var(ncid, varid, values, start, count, stride, map)
301 #else
302  mfix_nf90_get_var_7d_text = 1
303 #endif
304  end function mfix_nf90_get_var_7d_text
305 
306  function mfix_nf90_put_var_fourbyteint(ncid, varid, values, start)
307  integer, intent( in) :: ncid, varid
308  integer , intent( in) :: values
309  integer, dimension(:), optional, intent( in) :: start
310  integer :: MFIX_nf90_put_var_FourByteInt
311 
312 #ifdef NETCDF
313  mfix_nf90_put_var_fourbyteint = nf90_put_var(ncid, varid, values, start)
314 #else
315  mfix_nf90_put_var_fourbyteint = 1
316 #endif
317  end function mfix_nf90_put_var_fourbyteint
318 
319  function mfix_nf90_put_var_fourbytereal(ncid, varid, values, start)
320  integer, intent( in) :: ncid, varid
321  real , intent( in) :: values
322  integer, dimension(:), optional, intent( in) :: start
323  integer :: MFIX_nf90_put_var_FourByteReal
324 
325 
326 #ifdef NETCDF
327  mfix_nf90_put_var_fourbytereal = nf90_put_var(ncid, varid, values, start)
328 #else
329  mfix_nf90_put_var_fourbytereal = 1
330 #endif
331  end function mfix_nf90_put_var_fourbytereal
332 
333 
334  function mfix_nf90_put_var_eightbytereal(ncid, varid, values, start)
335  integer, intent( in) :: ncid, varid
336  double precision, intent( in) :: values
337  integer, dimension(:), optional, intent( in) :: start
338  integer :: MFIX_nf90_put_var_EightByteReal
339 
340 
341 #ifdef NETCDF
342  mfix_nf90_put_var_eightbytereal = nf90_put_var(ncid, varid, values, start)
343 #else
344  mfix_nf90_put_var_eightbytereal = 1
345 #endif
347 
348 
349 
350  function mfix_nf90_get_var_twobyteint(ncid, varid, values, start)
351  integer, intent( in) :: ncid, varid
352  integer , intent(inout) :: values
353  integer, dimension(:), optional, intent( in) :: start
354  integer :: MFIX_nf90_get_var_TwoByteInt
355 
356  integer :: counter
357 
358 
359 #ifdef NETCDF
360  mfix_nf90_get_var_twobyteint = nf90_get_var(ncid, varid, values, start)
361 #else
362  mfix_nf90_get_var_twobyteint = 1
363 #endif
364  end function mfix_nf90_get_var_twobyteint
365 
366 
367  function mfix_nf90_get_var_fourbyteint(ncid, varid, values, start)
368  integer, intent( in) :: ncid, varid
369  integer , intent(inout) :: values
370  integer, dimension(:), optional, intent( in) :: start
371  integer :: MFIX_nf90_get_var_FourByteInt
372 
373  integer :: counter
374  integer :: defaultInteger
375 
376 #ifdef NETCDF
377  mfix_nf90_get_var_fourbyteint = nf90_get_var(ncid, varid, values, start)
378 #else
379  mfix_nf90_get_var_fourbyteint = 1
380 #endif
381  end function mfix_nf90_get_var_fourbyteint
382 
383 
384  ! function MFIX_nf90_get_var_EightByteInt(ncid, varid, values, start)
385  ! integer, intent( in) :: ncid, varid
386  ! integer , intent(inout) :: values
387  ! integer, dimension(:), optional, intent( in) :: start
388  ! integer :: MFIX_nf90_get_var_EightByteInt
389  !
390  !
391 #ifdef NETCDF
392  ! MFIX_nf90_get_var_EightByteInt = nf90_get_var(ncid, varid, values, start)
393 #else
394  ! MFIX_nf90_get_var_EightByteInt = 1
395 #endif
396  ! end function MFIX_nf90_get_var_EightByteInt
397 
398 
399  function mfix_nf90_get_var_fourbytereal(ncid, varid, values, start)
400  integer, intent( in) :: ncid, varid
401  real , intent(inout) :: values
402  integer, dimension(:), optional, intent( in) :: start
403  integer :: MFIX_nf90_get_var_FourByteReal
404 
405 
406 #ifdef NETCDF
407  mfix_nf90_get_var_fourbytereal = nf90_get_var(ncid, varid, values, start)
408 #else
409  mfix_nf90_get_var_fourbytereal = 1
410 #endif
411  end function mfix_nf90_get_var_fourbytereal
412 
413 
414  function mfix_nf90_get_var_eightbytereal(ncid, varid, values, start)
415  integer, intent( in) :: ncid, varid
416  double precision, intent(inout) :: values
417  integer, dimension(:), optional, intent( in) :: start
418  integer :: MFIX_nf90_get_var_EightByteReal
419 
420 #ifdef NETCDF
421  mfix_nf90_get_var_eightbytereal = nf90_get_var(ncid, varid, values, start)
422 #else
423  mfix_nf90_get_var_eightbytereal = 1
424 #endif
426 
427 
428  function mfix_nf90_get_var_1d_twobyteint(ncid, varid, values, start, count, stride, map)
429  integer, intent( in) :: ncid, varid
430  integer , dimension(:), &
431  intent(inout) :: values
432  integer, dimension(:), optional, intent( in) :: start, count, stride, map
433  integer :: MFIX_nf90_get_var_1D_TwoByteInt
434 
435 #ifdef NETCDF
436  mfix_nf90_get_var_1d_twobyteint = nf90_get_var(ncid, varid, values, start, count, stride, map)
437 #else
438  mfix_nf90_get_var_1d_twobyteint = 1
439 #endif
440 
442 
443 
444  function mfix_nf90_get_var_2d_twobyteint(ncid, varid, values, start, count, stride, map)
445  integer, intent( in) :: ncid, varid
446  integer , dimension(:, :), &
447  intent(inout) :: values
448  integer, dimension(:), optional, intent( in) :: start, count, stride, map
449  integer :: MFIX_nf90_get_var_2D_TwoByteInt
450 
451 #ifdef NETCDF
452  mfix_nf90_get_var_2d_twobyteint = nf90_get_var(ncid, varid, values, start, count, stride, map)
453 #else
454  mfix_nf90_get_var_2d_twobyteint = 1
455 #endif
457 
458 
459  function mfix_nf90_get_var_3d_twobyteint(ncid, varid, values, start, count, stride, map)
460  integer, intent( in) :: ncid, varid
461  integer , dimension(:, :, :), &
462  intent(inout) :: values
463  integer, dimension(:), optional, intent( in) :: start, count, stride, map
464  integer :: MFIX_nf90_get_var_3D_TwoByteInt
465 
466 #ifdef NETCDF
467  mfix_nf90_get_var_3d_twobyteint = nf90_get_var(ncid, varid, values, start, count, stride, map)
468 #else
469  mfix_nf90_get_var_3d_twobyteint = 1
470 #endif
472 
473  function mfix_nf90_get_var_1d_fourbyteint(ncid, varid, values, start, count, stride, map)
474  integer, intent( in) :: ncid, varid
475  integer , dimension(:), &
476  intent(inout) :: values
477  integer, dimension(:), optional, intent( in) :: start, count, stride, map
478  integer :: MFIX_nf90_get_var_1D_FourByteInt
479 #ifdef NETCDF
480  mfix_nf90_get_var_1d_fourbyteint = nf90_get_var(ncid, varid, values, start, count, stride, map)
481 #else
482  mfix_nf90_get_var_1d_fourbyteint = 1
483 #endif
485 
486 
487  function mfix_nf90_get_var_2d_fourbyteint(ncid, varid, values, start, count, stride, map)
488  integer, intent( in) :: ncid, varid
489  integer , dimension(:, :), &
490  intent(inout) :: values
491  integer, dimension(:), optional, intent( in) :: start, count, stride, map
492  integer :: MFIX_nf90_get_var_2D_FourByteInt
493 
494 #ifdef NETCDF
495  mfix_nf90_get_var_2d_fourbyteint = nf90_get_var(ncid, varid, values, start, count, stride, map)
496 #else
497  mfix_nf90_get_var_2d_fourbyteint = 1
498 #endif
500 
501 
502  function mfix_nf90_get_var_3d_fourbyteint(ncid, varid, values, start, count, stride, map)
503  integer, intent( in) :: ncid, varid
504  integer , dimension(:, :, :), &
505  intent(inout) :: values
506  integer, dimension(:), optional, intent( in) :: start, count, stride, map
507  integer :: MFIX_nf90_get_var_3D_FourByteInt
508 #ifdef NETCDF
509  mfix_nf90_get_var_3d_fourbyteint = nf90_get_var(ncid, varid, values, start, count, stride, map)
510 #else
511  mfix_nf90_get_var_3d_fourbyteint = 1
512 #endif
514 
515 
516 
517  function mfix_nf90_get_var_1d_fourbytereal(ncid, varid, values, start, count, stride, map)
518  integer, intent( in) :: ncid, varid
519  real , dimension(:), &
520  intent(inout) :: values
521  integer, dimension(:), optional, intent( in) :: start, count, stride, map
522  integer :: MFIX_nf90_get_var_1D_FourByteReal
523 #ifdef NETCDF
524  mfix_nf90_get_var_1d_fourbytereal = nf90_get_var(ncid, varid, values, start, count, stride, map)
525 #else
526  mfix_nf90_get_var_1d_fourbytereal = 1
527 #endif
529 
530 
531  function mfix_nf90_get_var_2d_fourbytereal(ncid, varid, values, start, count, stride, map)
532  integer, intent( in) :: ncid, varid
533  real , dimension(:, :), &
534  intent(inout) :: values
535  integer, dimension(:), optional, intent( in) :: start, count, stride, map
536  integer :: MFIX_nf90_get_var_2D_FourByteReal
537 
538 #ifdef NETCDF
539  mfix_nf90_get_var_2d_fourbytereal = nf90_get_var(ncid, varid, values, start, count, stride, map)
540 #else
541  mfix_nf90_get_var_2d_fourbytereal = 1
542 #endif
544 
545 
546  function mfix_nf90_get_var_3d_fourbytereal(ncid, varid, values, start, count, stride, map)
547  integer, intent( in) :: ncid, varid
548  real , dimension(:, :, :), &
549  intent(inout) :: values
550  integer, dimension(:), optional, intent( in) :: start, count, stride, map
551  integer :: MFIX_nf90_get_var_3D_FourByteReal
552 #ifdef NETCDF
553  mfix_nf90_get_var_3d_fourbytereal = nf90_get_var(ncid, varid, values, start, count, stride, map)
554 #else
555  mfix_nf90_get_var_3d_fourbytereal = 1
556 #endif
558 
559  function mfix_nf90_get_var_1d_eightbytereal(ncid, varid, values, start, count, stride, map)
560  integer, intent( in) :: ncid, varid
561  double precision, dimension(:), &
562  intent(inout) :: values
563  integer, dimension(:), optional, intent( in) :: start, count, stride, map
564  integer :: MFIX_nf90_get_var_1D_EightByteReal
565 
566 #ifdef NETCDF
567  mfix_nf90_get_var_1d_eightbytereal = nf90_get_var(ncid, varid, values, start, count, stride, map)
568 #else
569  mfix_nf90_get_var_1d_eightbytereal = 1
570 #endif
572 
573 
574  function mfix_nf90_get_var_2d_eightbytereal(ncid, varid, values, start, count, stride, map)
575  integer, intent( in) :: ncid, varid
576  double precision, dimension(:, :), &
577  intent(inout) :: values
578  integer, dimension(:), optional, intent( in) :: start, count, stride, map
579  integer :: MFIX_nf90_get_var_2D_EightByteReal
580 
581 #ifdef NETCDF
582  mfix_nf90_get_var_2d_eightbytereal = nf90_get_var(ncid, varid, values, start, count, stride, map)
583 #else
584  mfix_nf90_get_var_2d_eightbytereal = 1
585 #endif
587 
588 
589  function mfix_nf90_get_var_3d_eightbytereal(ncid, varid, values, start, count, stride, map)
590  integer, intent( in) :: ncid, varid
591  double precision, dimension(:, :, :), &
592  intent(inout) :: values
593  integer, dimension(:), optional, intent( in) :: start, count, stride, map
594  integer :: MFIX_nf90_get_var_3D_EightByteReal
595 
596 #ifdef NETCDF
597  mfix_nf90_get_var_3d_eightbytereal = nf90_get_var(ncid, varid, values, start, count, stride, map)
598 #else
599  mfix_nf90_get_var_3d_eightbytereal = 1
600 #endif
602 
603  function mfix_nf90_inquire_dimension(ncid, dimid, name, len)
604  integer, intent( in) :: ncid, dimid
605  character (len = *), optional, intent(inout) :: name
606  integer, optional, intent(inout) :: len
607  integer :: MFIX_nf90_inquire_dimension
608 
609 #ifdef NETCDF
610  mfix_nf90_inquire_dimension = nf90_inquire_dimension(ncid, dimid, name, len)
611 #else
612  mfix_nf90_inquire_dimension = 1
613 #endif
614  end function mfix_nf90_inquire_dimension
615 
616  function mfix_nf90_put_var_1d_fourbyteint(ncid, varid, values, start, count, stride, map)
617  integer, intent( in) :: ncid, varid
618  integer , dimension(:), &
619  intent( in) :: values
620  integer, dimension(:), optional, intent( in) :: start, count, stride, map
621  integer :: MFIX_nf90_put_var_1D_FourByteInt
622 
623 #ifdef NETCDF
624  mfix_nf90_put_var_1d_fourbyteint = nf90_put_var(ncid, varid, values, start, count, stride, map)
625 #else
626  mfix_nf90_put_var_1d_fourbyteint = 1
627 #endif
629 
630 
631  function mfix_nf90_put_var_2d_fourbyteint(ncid, varid, values, start, count, stride, map)
632  integer, intent( in) :: ncid, varid
633  integer , dimension(:, :), &
634  intent( in) :: values
635  integer, dimension(:), optional, intent( in) :: start, count, stride, map
636  integer :: MFIX_nf90_put_var_2D_FourByteInt
637 
638 #ifdef NETCDF
639  mfix_nf90_put_var_2d_fourbyteint = nf90_put_var(ncid, varid, values, start, count, stride, map)
640 #else
641  mfix_nf90_put_var_2d_fourbyteint = 1
642 #endif
644 
645 
646  function mfix_nf90_put_var_3d_fourbyteint(ncid, varid, values, start, count, stride, map)
647  integer, intent( in) :: ncid, varid
648  integer , dimension(:, :, :), &
649  intent( in) :: values
650  integer, dimension(:), optional, intent( in) :: start, count, stride, map
651  integer :: MFIX_nf90_put_var_3D_FourByteInt
652 #ifdef NETCDF
653  mfix_nf90_put_var_3d_fourbyteint = nf90_put_var(ncid, varid, values, start, count, stride, map)
654 #else
655  mfix_nf90_put_var_3d_fourbyteint = 1
656 #endif
658 
659  function mfix_nf90_put_var_4d_fourbyteint(ncid, varid, values, start, count, stride, map)
660  integer, intent( in) :: ncid, varid
661  integer , dimension(:, :, : , :), &
662  intent( in) :: values
663  integer, dimension(:), optional, intent( in) :: start, count, stride, map
664  integer :: MFIX_nf90_put_var_4D_FourByteInt
665 #ifdef NETCDF
666  mfix_nf90_put_var_4d_fourbyteint = nf90_put_var(ncid, varid, values, start, count, stride, map)
667 #else
668  mfix_nf90_put_var_4d_fourbyteint = 1
669 #endif
671 
672  function mfix_nf90_put_var_1d_fourbytereal(ncid, varid, values, start, count, stride, map)
673  integer, intent( in) :: ncid, varid
674  real , dimension(:), &
675  intent( in) :: values
676  integer, dimension(:), optional, intent( in) :: start, count, stride, map
677  integer :: MFIX_nf90_put_var_1D_FourByteReal
678 
679 #ifdef NETCDF
680  mfix_nf90_put_var_1d_fourbytereal = nf90_put_var(ncid, varid, values, start, count, stride, map)
681 #else
682  mfix_nf90_put_var_1d_fourbytereal = 1
683 #endif
685 
686 
687  function mfix_nf90_put_var_2d_fourbytereal(ncid, varid, values, start, count, stride, map)
688  integer, intent( in) :: ncid, varid
689  real , dimension(:, :), &
690  intent( in) :: values
691  integer, dimension(:), optional, intent( in) :: start, count, stride, map
692  integer :: MFIX_nf90_put_var_2D_FourByteReal
693 
694 #ifdef NETCDF
695  mfix_nf90_put_var_2d_fourbytereal = nf90_put_var(ncid, varid, values, start, count, stride, map)
696 #else
697  mfix_nf90_put_var_2d_fourbytereal = 1
698 #endif
700 
701 
702  function mfix_nf90_put_var_3d_fourbytereal(ncid, varid, values, start, count, stride, map)
703  integer, intent( in) :: ncid, varid
704  real , dimension(:, :, :), &
705  intent( in) :: values
706  integer, dimension(:), optional, intent( in) :: start, count, stride, map
707  integer :: MFIX_nf90_put_var_3D_FourByteReal
708 #ifdef NETCDF
709  mfix_nf90_put_var_3d_fourbytereal = nf90_put_var(ncid, varid, values, start, count, stride, map)
710 #else
711  mfix_nf90_put_var_3d_fourbytereal = 1
712 #endif
714 
715 
716  function mfix_nf90_put_var_1d_eightbytereal(ncid, varid, values, start, count, stride, map)
717  integer, intent( in) :: ncid, varid
718  double precision, dimension(:), &
719  intent( in) :: values
720  integer, dimension(:), optional, intent( in) :: start, count, stride, map
721  integer :: MFIX_nf90_put_var_1D_EightByteReal
722 
723 #ifdef NETCDF
724  mfix_nf90_put_var_1d_eightbytereal = nf90_put_var(ncid, varid, values, start, count, stride, map)
725 #else
726  mfix_nf90_put_var_1d_eightbytereal = 1
727 #endif
729 
730 
731  function mfix_nf90_put_var_2d_eightbytereal(ncid, varid, values, start, count, stride, map)
732  integer, intent( in) :: ncid, varid
733  double precision, dimension(:, :), &
734  intent( in) :: values
735  integer, dimension(:), optional, intent( in) :: start, count, stride, map
736  integer :: MFIX_nf90_put_var_2D_EightByteReal
737 #ifdef NETCDF
738  mfix_nf90_put_var_2d_eightbytereal = nf90_put_var(ncid, varid, values, start, count, stride, map)
739 #else
740  mfix_nf90_put_var_2d_eightbytereal = 1
741 #endif
743 
744 
745  function mfix_nf90_put_var_3d_eightbytereal(ncid, varid, values, start, count, stride, map)
746  integer, intent( in) :: ncid, varid
747  double precision, dimension(:, :, :), &
748  intent( in) :: values
749  integer, dimension(:), optional, intent( in) :: start, count, stride, map
750  integer :: MFIX_nf90_put_var_3D_EightByteReal
751 #ifdef NETCDF
752  mfix_nf90_put_var_3d_eightbytereal = nf90_put_var(ncid, varid, values, start, count, stride, map)
753 #else
754  mfix_nf90_put_var_3d_eightbytereal = 1
755 #endif
757 
758 
759  function mfix_nf90_put_var_4d_eightbytereal(ncid, varid, values, start, count, stride, map)
760  integer, intent( in) :: ncid, varid
761  double precision, dimension(:, :, : , :), &
762  intent( in) :: values
763  integer, dimension(:), optional, intent( in) :: start, count, stride, map
764  integer :: MFIX_nf90_put_var_4D_EightByteReal
765 #ifdef NETCDF
766  mfix_nf90_put_var_4d_eightbytereal = nf90_put_var(ncid, varid, values, start, count, stride, map)
767 #else
768  mfix_nf90_put_var_4d_eightbytereal = 1
769 #endif
771 
772  function mfix_usingnetcdf()
773  logical :: MFIX_usingNETCDF
774 #ifdef NETCDF
775  mfix_usingnetcdf = .true.
776 #else
777  mfix_usingnetcdf = .false.
778 #endif
779  end function mfix_usingnetcdf
780 
781 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
782  ! check_netcdf !
783  !
784  subroutine mfix_check_netcdf( status )
785  implicit none
786  integer, intent ( in) :: status
787 
788 #ifdef NETCDF
789  if (status /= nf90_noerr) then
790  write (*,*) ' ******************************************'
791  write (*,*) trim(nf90_strerror(status))
792  write (*,*) ' ******************************************'
793  end if
794 #endif
795  end subroutine mfix_check_netcdf
796 
797 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
798 
799  function mfix_nf90_create(path, cmode, ncid, initialsize, chunksize)
800  character (len = *), intent(in ) :: path
801  integer, intent(in ) :: cmode
802  integer, intent(inout) :: ncid
803  integer, optional, intent(in ) :: initialsize
804  integer, optional, intent(inout) :: chunksize
805  integer :: MFIX_nf90_create
806 
807  integer :: fileSize
808 
809 #ifdef NETCDF
810  mfix_nf90_create = nf90_create(path, cmode, ncid, initialsize, chunksize)
811 #else
812  mfix_nf90_create = 0
813 #endif
814  return
815  end function mfix_nf90_create
816 
817 
818  function mfix_nf90_def_dim(ncid, name, len, dimid)
819  integer, intent( in) :: ncid
820  character (len = *), intent( in) :: name
821  integer, intent( in) :: len
822  integer, intent(inout) :: dimid
823  integer :: MFIX_nf90_def_dim
824 
825 #ifdef NETCDF
826  mfix_nf90_def_dim = nf90_def_dim(ncid, name, len, dimid)
827 #else
828  mfix_nf90_def_dim = 1
829 #endif
830  end function mfix_nf90_def_dim
831 
832 
833  function mfix_nf90_enddef(ncid, h_minfree, v_align, v_minfree, r_align)
834  integer, intent( in) :: ncid
835  integer, optional, intent( in) :: h_minfree, v_align, v_minfree, r_align
836  integer :: MFIX_nf90_enddef
837 
838 #ifdef NETCDF
839  mfix_nf90_enddef = nf90_enddef(ncid, h_minfree, v_align, v_minfree, r_align)
840 #else
841  mfix_nf90_enddef = 1
842 #endif
843  end function mfix_nf90_enddef
844 
845 
846  function mfix_nf90_open(path, mode, ncid, chunksize)
847  character (len = *), intent(in ) :: path
848  integer, intent(in ) :: mode
849  integer, intent(inout) :: ncid
850  integer, optional, intent(inout) :: chunksize
851  integer :: MFIX_nf90_open
852 #ifdef NETCDF
853  mfix_nf90_open = nf90_open(path, mode, ncid, chunksize)
854 #else
855  mfix_nf90_open = 1
856 #endif
857  end function mfix_nf90_open
858 
859 
860  function mfix_nf90_inquire(ncid, nDimensions, nVariables, nAttributes, unlimitedDimId, formatNum)
861  integer, intent( in) :: ncid
862  integer, optional, intent(inout) :: nDimensions, nVariables, nAttributes, unlimitedDimId, formatNum
863  integer :: MFIX_nf90_inquire
864 
865  integer :: nDims, nVars, nGAtts, unlimDimId, frmt
866 
867 #ifdef NETCDF
868  mfix_nf90_inquire = nf90_inquire(ncid, ndimensions, nvariables, nattributes, unlimiteddimid, formatnum)
869 #else
870  mfix_nf90_inquire = 1
871 #endif
872  end function mfix_nf90_inquire
873 
874 
875  function mfix_nf90_inq_dimid(ncid, name, dimid)
876  integer, intent( in) :: ncid
877  character (len = *), intent( in) :: name
878  integer, intent(inout) :: dimid
879  integer :: MFIX_nf90_inq_dimid
880 
881 #ifdef NETCDF
882  mfix_nf90_inq_dimid = nf90_inq_dimid(ncid, name, dimid)
883 #else
884  mfix_nf90_inq_dimid = 1
885 #endif
886  end function mfix_nf90_inq_dimid
887 
888  function mfix_nf90_inq_varid(ncid, name, varid)
889  integer, intent( in) :: ncid
890  character (len = *), intent( in) :: name
891  integer, intent(inout) :: varid
892  integer :: MFIX_nf90_inq_varid
893 
894 #ifdef NETCDF
895  mfix_nf90_inq_varid = nf90_inq_varid(ncid, name, varid)
896 #else
897  mfix_nf90_inq_varid = 1
898 #endif
899  end function mfix_nf90_inq_varid
900 
901  function mfix_nf90_close(ncid)
902  integer, intent( in) :: ncid
903  integer :: MFIX_nf90_close
904 
905 #ifdef NETCDF
906  mfix_nf90_close = nf90_close(ncid)
907 #else
908  mfix_nf90_close = 1
909 #endif
910  end function mfix_nf90_close
911 
912  subroutine mfix_ncvinq(ncid,varid,varnam,vartyp,nvdims,vdims,nvatts,rcode)
913  implicit none
914 
915  integer :: ncid , varid , vartyp , nvdims , nvatts , rcode
916  integer :: vdims(*)
917  character(len=*) varnam
918 
919 #ifdef NETCDF
920  call ncvinq(ncid,varid,varnam,vartyp,nvdims,vdims,nvatts,rcode)
921 #endif
922  return
923  end subroutine mfix_ncvinq
924 
925 
926 end module mfix_netcdf
integer function mfix_nf90_put_var_2d_fourbytereal(ncid, varid, values, start, count, stride, map)
integer function mfix_nf90_def_dim(ncid, name, len, dimid)
integer function mfix_nf90_get_var_2d_fourbyteint(ncid, varid, values, start, count, stride, map)
integer function mfix_nf90_create(path, cmode, ncid, initialsize, chunksize)
integer function mfix_nf90_put_var_1d_fourbyteint(ncid, varid, values, start, count, stride, map)
subroutine mfix_check_netcdf(status)
integer function mfix_nf90_put_var_eightbytereal(ncid, varid, values, start)
integer function mfix_nf90_get_var_6d_text(ncid, varid, values, start, count, stride, map)
integer function mfix_nf90_get_var_text(ncid, varid, values, start, count, stride, map)
integer function mfix_nf90_get_var_3d_eightbytereal(ncid, varid, values, start, count, stride, map)
subroutine mfix_ncvinq(ncid, varid, varnam, vartyp, nvdims, vdims, nvatts, rcode)
integer function mfix_nf90_get_var_1d_eightbytereal(ncid, varid, values, start, count, stride, map)
integer function mfix_nf90_put_var_4d_fourbyteint(ncid, varid, values, start, count, stride, map)
integer nf90_clobber
integer function mfix_nf90_close(ncid)
integer function mfix_nf90_get_var_1d_fourbytereal(ncid, varid, values, start, count, stride, map)
integer function mfix_nf90_put_var_2d_eightbytereal(ncid, varid, values, start, count, stride, map)
integer function mfix_nf90_def_var_scalar(ncid, name, xtype, varid)
integer nf90_64bit_offset
integer function mfix_nf90_put_var_1d_fourbytereal(ncid, varid, values, start, count, stride, map)
integer nf90_nowrite
integer function mfix_nf90_put_var_1d_text(ncid, varid, values, start, count, stride, map)
integer function mfix_nf90_get_var_fourbyteint(ncid, varid, values, start)
integer function mfix_nf90_put_var_2d_text(ncid, varid, values, start, count, stride, map)
integer function mfix_nf90_get_var_2d_fourbytereal(ncid, varid, values, start, count, stride, map)
integer function mfix_nf90_get_var_eightbytereal(ncid, varid, values, start)
integer function mfix_nf90_inquire_dimension(ncid, dimid, name, len)
integer function mfix_nf90_put_var_3d_eightbytereal(ncid, varid, values, start, count, stride, map)
integer function mfix_nf90_get_var_3d_text(ncid, varid, values, start, count, stride, map)
integer function mfix_nf90_get_var_4d_text(ncid, varid, values, start, count, stride, map)
integer function mfix_nf90_put_var_fourbyteint(ncid, varid, values, start)
integer function mfix_nf90_put_var_1d_eightbytereal(ncid, varid, values, start, count, stride, map)
integer function mfix_nf90_get_var_2d_twobyteint(ncid, varid, values, start, count, stride, map)
integer function mfix_nf90_get_var_3d_fourbyteint(ncid, varid, values, start, count, stride, map)
integer function mfix_nf90_get_var_2d_text(ncid, varid, values, start, count, stride, map)
integer function mfix_nf90_get_var_5d_text(ncid, varid, values, start, count, stride, map)
integer function mfix_nf90_get_var_2d_eightbytereal(ncid, varid, values, start, count, stride, map)
integer function mfix_nf90_get_var_3d_fourbytereal(ncid, varid, values, start, count, stride, map)
integer function mfix_nf90_put_var_fourbytereal(ncid, varid, values, start)
integer function mfix_nf90_put_var_3d_fourbytereal(ncid, varid, values, start, count, stride, map)
integer function mfix_nf90_get_var_1d_text(ncid, varid, values, start, count, stride, map)
integer function mfix_nf90_get_var_twobyteint(ncid, varid, values, start)
integer function mfix_nf90_get_var_7d_text(ncid, varid, values, start, count, stride, map)
integer function mfix_nf90_put_var_3d_fourbyteint(ncid, varid, values, start, count, stride, map)
integer function mfix_nf90_get_var_1d_twobyteint(ncid, varid, values, start, count, stride, map)
integer function mfix_nf90_get_var_fourbytereal(ncid, varid, values, start)
integer function mfix_nf90_def_var_manydims(ncid, name, xtype, dimids, varid)
integer function mfix_nf90_get_var_1d_fourbyteint(ncid, varid, values, start, count, stride, map)
logical function mfix_usingnetcdf()
integer function mfix_nf90_inq_dimid(ncid, name, dimid)
integer function mfix_nf90_get_var_3d_twobyteint(ncid, varid, values, start, count, stride, map)
integer function mfix_nf90_enddef(ncid, h_minfree, v_align, v_minfree, r_align)
integer function mfix_nf90_put_var_4d_eightbytereal(ncid, varid, values, start, count, stride, map)
integer function mfix_nf90_put_var_3d_text(ncid, varid, values, start, count, stride, map)
integer nf90_int
integer function mfix_nf90_put_var_2d_fourbyteint(ncid, varid, values, start, count, stride, map)
integer function mfix_nf90_inquire(ncid, nDimensions, nVariables, nAttributes, unlimitedDimId, formatNum)
integer nf90_double
integer function mfix_nf90_inq_varid(ncid, name, varid)
integer function mfix_nf90_put_var_text(ncid, varid, values, start, count, stride, map)
integer function mfix_nf90_def_var_onedim(ncid, name, xtype, dimids, varid)
integer function mfix_nf90_open(path, mode, ncid, chunksize)