NetCDF-Fortran  4.4.4
module_netcdf_nc_interfaces.f90
Go to the documentation of this file.
2 
3 ! Fortran interfaces to netCDF C functions using FORTRAN 2003 C
4 ! Interoperability features. These interfaces are for the base
5 ! netCDF C routines in the libsrc directory
6 
7 ! Written by: Richard Weed, Ph.D.
8 ! Center for Advanced Vehicular Systems
9 ! Mississippi State University
10 ! rweed@cavs.msstate.edu
11 
12 
13 ! License (and other Lawyer Language)
14 
15 ! This software is released under the Apache 2.0 Open Source License. The
16 ! full text of the License can be viewed at :
17 !
18 ! http:www.apache.org/licenses/LICENSE-2.0.html
19 !
20 ! The author grants to the University Corporation for Atmospheric Research
21 ! (UCAR), Boulder, CO, USA the right to revise and extend the software
22 ! without restriction. However, the author retains all copyrights and
23 ! intellectual property rights explicitly stated in or implied by the
24 ! Apache license
25 
26 ! Version 1.: Sept. 2005 - Initial Cray X1 version
27 ! Version 2.: May 2006 - Updated to support g95
28 ! Version 3.: June 2006 - Updated to include netCDF 4 functions
29 ! Version 4.: April 2009 - Updated to match netCDF 4.0.1 release
30 ! Version 5.: April 2010 - Updated to match netCDF 4.1.1 release
31 ! Version 6.: April 2013 - Added nc_inq_path support for fortran 4.4 beta
32 ! Version 7.: Jan. 2016 - General code cleanup. Changed addCNullChar
33 ! to return length of string plus added C_NULL_CHAR.
34 ! Added support for nc_open_mem
35 !
36 
37  USE netcdf_nc_data
38 
39  Implicit NONE
40 
42 
43  Interface addcnullchar
44  module procedure addcnullchar
45  End Interface
46 
47  Interface stripcnullchar
48  module procedure stripcnullchar
49  End Interface
50 
58 
59 !! Also note that each interface has an explicit USE ISO_C_BINDING. A better
60 !! solution is to use the F2003 IMPORT statement (I originally had it this way)
61 !! However its best to leave the interfaces as is for now because there might
62 !! be a few compilers out there that support most of the C-interop facility but
63 !! for some reason haven't implemented IMPORT yet.
64 
65 !---------------------------------- nc_strerror -------------------------------
66 Interface
67  Function nc_strerror(ncerr) bind(C)
68 
69  USE iso_c_binding, ONLY: c_int, c_ptr
70 
71  Integer(C_INT), VALUE :: ncerr
72 
73  Type(c_ptr) :: nc_strerror
74 
75  End Function nc_strerror
76 End Interface
77 !---------------------------------- nc_inq_libvers ----------------------------
78 Interface
79  Function nc_inq_libvers() bind(C)
80 
81  USE iso_c_binding, ONLY: c_ptr
82 
83  Type(c_ptr) :: nc_inq_libvers
84 
85  End Function nc_inq_libvers
86 End Interface
87 !---------------------------------- nc_create ---------------------------------
88 Interface
89  Function nc_create(path, cmode, ncidp) bind(C)
90 
91  USE iso_c_binding, ONLY: c_char, c_int
92 
93  Character(KIND=C_CHAR), Intent(IN) :: path(*)
94  Integer(C_INT), VALUE :: cmode
95  Integer(C_INT), Intent(OUT) :: ncidp
96 
97  Integer(C_INT) :: nc_create
98 
99  End Function nc_create
100 End Interface
101 !---------------------------------- nc__create --------------------------------
102 Interface
103  Function nc__create(path, cmode, initialsz, chunksizehintp, ncidp) bind(C)
105  USE iso_c_binding, ONLY: c_char, c_int, c_size_t
106 
107  Character(KIND=C_CHAR), Intent(IN) :: path(*)
108  Integer(C_INT), VALUE :: cmode
109  Integer(C_SIZE_T), VALUE :: initialsz
110  Integer(C_SIZE_T), Intent(IN) :: chunksizehintp
111  Integer(C_INT), Intent(OUT) :: ncidp
112 
113  Integer(C_INT) :: nc__create
114 
115  End Function nc__create
116 End Interface
117 !---------------------------------- nc__create_mp -----------------------------
118 Interface
119  Function nc__create_mp(path, cmode, initialsz, basepe, chunksizehintp, ncidp) &
120  bind(c)
122  USE iso_c_binding, ONLY: c_char, c_int, c_size_t, c_ptr
123 
124  Character(KIND=C_CHAR), Intent(IN) :: path(*)
125  Integer(C_INT), VALUE :: cmode
126  Integer(C_SIZE_T), VALUE :: initialsz
127  Integer(C_SIZE_T), Intent(IN) :: chunksizehintp
128  Type(c_ptr), VALUE :: basepe
129  Integer(C_INT), Intent(OUT) :: ncidp
130 
131  Integer(C_INT) :: nc__create_mp
132 
133  End Function nc__create_mp
134 End Interface
135 !---------------------------------- nc_open -----------------------------------
136 Interface
137  Function nc_open(path, mode, ncidp) bind(C)
139  USE iso_c_binding, ONLY: c_char, c_int
140 
141  Character(KIND=C_CHAR), Intent(IN) :: path(*)
142  Integer(C_INT), VALUE :: mode
143  Integer(C_INT), Intent(OUT) :: ncidp
144 
145  Integer(C_INT) :: nc_open
146 
147  End Function nc_open
148 End Interface
149 !---------------------------------- nc__open ----------------------------------
150 Interface
151  Function nc__open(path, mode, chunksizehintp, ncidp) bind(C)
153  USE iso_c_binding, ONLY: c_char, c_int, c_size_t
154 
155  Character(KIND=C_CHAR), Intent(IN) :: path(*)
156  Integer(C_INT), VALUE :: mode
157  Integer(C_SIZE_T), Intent(IN) :: chunksizehintp
158  Integer(C_INT), Intent(OUT) :: ncidp
159 
160  Integer(C_INT) :: nc__open
161 
162  End Function nc__open
163 End Interface
164 !---------------------------------- nc__open_mp -------------------------------
165 Interface
166  Function nc__open_mp(path, mode, basepe, chunksizehintp, ncidp) bind(C)
168  USE iso_c_binding, ONLY: c_char, c_int, c_size_t, c_ptr
169 
170  Character(KIND=C_CHAR), Intent(IN) :: path(*)
171  Integer(C_INT), VALUE :: mode
172  Integer(C_SIZE_T), Intent(IN) :: chunksizehintp
173  Integer(C_INT), Intent(OUT) :: ncidp
174  Type(c_ptr), VALUE :: basepe
175 
176  Integer(C_INT) :: nc__open_mp
177 
178  End Function nc__open_mp
179 End Interface
180 !---------------------------------- nc_open_mem -------------------------------
181 Interface
182  Function nc_open_mem(path, mode, size, memory, ncid) bind(C)
184  USE iso_c_binding, ONLY: c_char, c_int, c_size_t, c_ptr
185 
186  Character(KIND=C_CHAR), Intent(IN) :: path(*)
187  Integer(C_INT), VALUE :: mode
188  Integer(C_SIZE_T), VALUE :: size
189  Type(c_ptr), VALUE :: memory
190  Integer(C_INT), Intent(OUT) :: ncid
191 
192  Integer(C_INT) :: nc_open_mem
193 
194  End Function nc_open_mem
195 End Interface
196 !---------------------------------- nc_inq_path -----------------------------
197 Interface
198  Function nc_inq_path(ncid, pathlen, path) bind(C)
200  USE iso_c_binding, ONLY: c_int, c_size_t, c_char
201 
202  Integer(C_INT), VALUE :: ncid
203  Integer(C_SIZE_T), Intent(INOUT) :: pathlen
204  Character(KIND=C_CHAR), Intent(INOUT) :: path(*)
205 
206  Integer(C_INT) :: nc_inq_path
207 
208  End Function nc_inq_path
209 End Interface
210 !---------------------------------- nc_set_fill -------------------------------
211 Interface
212  Function nc_set_fill(ncid, fillmode, old_modep) bind(C)
214  USE iso_c_binding, ONLY: c_int
215 
216  Integer(C_INT), VALUE :: ncid
217  Integer(C_INT), VALUE :: fillmode
218  Integer(C_INT), Intent(OUT) :: old_modep
219 
220  Integer(C_INT) :: nc_set_fill
221 
222  End Function nc_set_fill
223 End Interface
224 !---------------------------------- nc_redef ----------------------------------
225 Interface
226  Function nc_redef(ncid) bind(C)
228  USE iso_c_binding, ONLY: c_int
229 
230  Integer(C_INT), VALUE :: ncid
231 
232  Integer(C_INT) :: nc_redef
233 
234  End Function nc_redef
235 End Interface
236 !---------------------------------- nc_enddef ---------------------------------
237 Interface
238  Function nc_enddef(ncid) bind(C)
240  USE iso_c_binding, ONLY: c_int
241 
242  Integer(C_INT), VALUE :: ncid
243 
244  Integer(C_INT) :: nc_enddef
245 
246  End Function nc_enddef
247 End Interface
248 !---------------------------------- nc__enddef --------------------------------
249 Interface
250  Function nc__enddef(ncid, h_minfree, v_align, v_minfree, r_align) bind(C)
252  USE iso_c_binding, ONLY: c_int, c_size_t
253 
254  Integer(C_INT), VALUE :: ncid
255  Integer(C_SIZE_T), VALUE :: h_minfree, v_align, v_minfree, r_align
256 
257  Integer(C_INT) :: nc__enddef
258 
259  End Function nc__enddef
260 End Interface
261 !---------------------------------- nc_sync -----------------------------------
262 Interface
263  Function nc_sync(ncid) bind(C)
265  USE iso_c_binding, ONLY: c_int
266 
267  Integer(C_INT), VALUE :: ncid
268 
269  Integer(C_INT) :: nc_sync
270 
271  End Function nc_sync
272 End Interface
273 !---------------------------------- nc_abort ----------------------------------
274 Interface
275  Function nc_abort(ncid) bind(C)
277  USE iso_c_binding, ONLY: c_int
278 
279  Integer(C_INT), VALUE :: ncid
280 
281  Integer(C_INT) :: nc_abort
282 
283  End Function nc_abort
284 End Interface
285 !---------------------------------- nc_close ----------------------------------
286 Interface
287  Function nc_close(ncid) bind(C)
289  USE iso_c_binding, ONLY: c_int
290 
291  Integer(C_INT), VALUE :: ncid
292 
293  Integer(C_INT) :: nc_close
294 
295  End Function nc_close
296 End Interface
297 !---------------------------------- nc_delete --------------------------------
298 Interface
299  Function nc_delete(path) bind(C)
301  USE iso_c_binding, ONLY: c_int, c_char
302 
303  Character(KIND=C_CHAR), Intent(IN) :: path(*)
304 
305  Integer(C_INT) :: nc_delete
306 
307  End Function nc_delete
308 End Interface
309 !---------------------------------- nc_delete_mp -----------------------------
310 Interface
311  Function nc_delete_mp(path, pe) bind(C)
313  USE iso_c_binding, ONLY: c_int, c_char
314 
315  Character(KIND=C_CHAR), Intent(IN) :: path(*)
316  Integer(C_INT), VALUE :: pe
317 
318  Integer(C_INT) :: nc_delete_mp
319 
320  End Function nc_delete_mp
321 End Interface
322 !---------------------------------- nc_set_base_pe ----------------------------
323 Interface
324  Function nc_set_base_pe(ncid, pe) bind(C)
326  USE iso_c_binding, ONLY: c_int
327 
328  Integer(C_INT), VALUE :: ncid, pe
329 
330  Integer(C_INT) :: nc_set_base_pe
331 
332  End Function nc_set_base_pe
333 End Interface
334 !---------------------------------- nc_inq_base_pe ----------------------------
335 Interface
336  Function nc_inq_base_pe(ncid, pe) bind(C)
338  USE iso_c_binding, ONLY: c_int
339 
340  Integer(C_INT), VALUE :: ncid
341  Integer(C_INT), Intent(OUT) :: pe
342 
343  Integer(C_INT) :: nc_inq_base_pe
344 
345  End Function nc_inq_base_pe
346 End Interface
347 !---------------------------------- nc_inq ------------------------------------
348 Interface
349  Function nc_inq(ncid, ndimsp, nvarsp, ngattsp, unlimdimidp) bind(C)
351  USE iso_c_binding, ONLY: c_int
352 
353  Integer(C_INT), VALUE :: ncid
354  Integer(C_INT), Intent(OUT) :: ndimsp, nvarsp, ngattsp, unlimdimidp
355 
356  Integer(C_INT) :: nc_inq
357 
358  End Function nc_inq
359 End Interface
360 !---------------------------------- nc_inq_ndims ------------------------------
361 Interface
362  Function nc_inq_ndims(ncid, ndimsp) bind(C)
364  USE iso_c_binding, ONLY: c_int
365 
366  Integer(C_INT), VALUE :: ncid
367  Integer(C_INT), Intent(OUT) :: ndimsp
368 
369  Integer(C_INT) :: nc_inq_ndims
370 
371  End Function nc_inq_ndims
372 End Interface
373 !---------------------------------- nc_inq_nvars ------------------------------
374 Interface
375  Function nc_inq_nvars(ncid, nvarsp) bind(C)
377  USE iso_c_binding, ONLY: c_int
378 
379  Integer(C_INT), VALUE :: ncid
380  Integer(C_INT), Intent(OUT) :: nvarsp
381 
382  Integer(C_INT) :: nc_inq_nvars
383 
384  End Function nc_inq_nvars
385 End Interface
386 !---------------------------------- nc_inq_natts ------------------------------
387 Interface
388  Function nc_inq_natts(ncid, ngattsp) bind(C)
390  USE iso_c_binding, ONLY: c_int
391 
392  Integer(C_INT), VALUE :: ncid
393  Integer(C_INT), Intent(OUT) :: ngattsp
394 
395  Integer(C_INT) :: nc_inq_natts
396 
397  End Function nc_inq_natts
398 End Interface
399 !---------------------------------- nc_inq_unlimdim ---------------------------
400 Interface
401  Function nc_inq_unlimdim(ncid, unlimdimidp) bind(C)
403  USE iso_c_binding, ONLY: c_int
404 
405  Integer(C_INT), VALUE :: ncid
406  Integer(C_INT), Intent(OUT) :: unlimdimidp
407 
408  Integer(C_INT) :: nc_inq_unlimdim
409 
410  End Function nc_inq_unlimdim
411 End Interface
412 !---------------------------------- nc_inq_format -----------------------------
413 Interface
414  Function nc_inq_format(ncid, formatp) bind(C)
416  USE iso_c_binding, ONLY: c_int
417 
418  Integer(C_INT), VALUE :: ncid
419  Integer(C_INT), Intent(OUT) :: formatp
420 
421  Integer(C_INT) :: nc_inq_format
422 
423  End Function nc_inq_format
424 End Interface
425 !---------------------------------- nc_def_dim --------------------------------
426 Interface
427  Function nc_def_dim(ncid, name, nlen, idp) bind(C)
429  USE iso_c_binding, ONLY: c_int, c_size_t, c_char
430 
431  Integer(C_INT), VALUE :: ncid
432  Character(KIND=C_CHAR), Intent(IN) :: name(*)
433  Integer(C_SIZE_T), VALUE :: nlen
434  Integer(C_INT), Intent(INOUT) :: idp
435 
436  Integer(C_INT) :: nc_def_dim
437 
438  End Function nc_def_dim
439 End Interface
440 !---------------------------------- nc_inq_dimid ------------------------------
441 Interface
442  Function nc_inq_dimid(ncid, name, idp) bind(C)
444  USE iso_c_binding, ONLY: c_int, c_char
445 
446  Integer(C_INT), VALUE :: ncid
447  Character(KIND=C_CHAR), Intent(IN) :: name(*)
448  Integer(C_INT), Intent(INOUT) :: idp
449 
450  Integer(C_INT) :: nc_inq_dimid
451 
452  End Function nc_inq_dimid
453 End Interface
454 !---------------------------------- nc_inq_dim --------------------------------
455 Interface
456  Function nc_inq_dim(ncid, dimid, name, lenp) bind(C)
458  USE iso_c_binding, ONLY: c_int, c_size_t, c_char
459 
460  Integer(C_INT), VALUE :: ncid
461  Integer(C_INT), VALUE :: dimid
462  Character(KIND=C_CHAR), Intent(INOUT) :: name(*)
463  Integer(C_SIZE_T), Intent(OUT) :: lenp
464 
465  Integer(C_INT) :: nc_inq_dim
466 
467  End Function nc_inq_dim
468 End Interface
469 !---------------------------------- nc_inq_dimname ----------------------------
470 Interface
471  Function nc_inq_dimname(ncid, dimid, name) bind(C)
473  USE iso_c_binding, ONLY: c_int, c_char
474 
475  Integer(C_INT), VALUE :: ncid
476  Integer(C_INT), VALUE :: dimid
477  Character(KIND=C_CHAR), Intent(INOUT) :: name(*)
478 
479  Integer(C_INT) :: nc_inq_dimname
480 
481  End Function nc_inq_dimname
482 End Interface
483 !---------------------------------- nc_inq_dimlen -----------------------------
484 Interface
485  Function nc_inq_dimlen(ncid, dimid, lenp) bind(C)
487  USE iso_c_binding, ONLY: c_int, c_size_t
488 
489  Integer(C_INT), VALUE :: ncid
490  Integer(C_INT), VALUE :: dimid
491  Integer(C_SIZE_T), Intent(OUT) :: lenp
492 
493  Integer(C_INT) :: nc_inq_dimlen
494 
495  End Function nc_inq_dimlen
496 End Interface
497 !---------------------------------- nc_rename_dim -----------------------------
498 Interface
499  Function nc_rename_dim(ncid, dimid, name) bind(C)
501  USE iso_c_binding, ONLY: c_int, c_char
502 
503  Integer(C_INT), VALUE :: ncid
504  Integer(C_INT), VALUE :: dimid
505  Character(KIND=C_CHAR), Intent(IN) :: name(*)
506 
507  Integer(C_INT) :: nc_rename_dim
508 
509  End Function nc_rename_dim
510 End Interface
511 !---------------------------------- nc_def_var --------------------------------
512 Interface
513  Function nc_def_var(ncid, name, xtype, ndims, dimidsp, varidp) bind(C)
515  USE iso_c_binding, ONLY: c_int, c_char
516 
517  Integer(C_INT), VALUE :: ncid
518  Character(KIND=C_CHAR), Intent(IN) :: name(*)
519  Integer(C_INT), VALUE :: xtype
520  Integer(C_INT), VALUE :: ndims
521  Integer(C_INT), Intent(IN) :: dimidsp(*)
522  Integer(C_INT), Intent(OUT) :: varidp
523 
524  Integer(C_INT) :: nc_def_var
525 
526  End Function nc_def_var
527 End Interface
528 !---------------------------------- nc_inq_var --------------------------------
529 Interface
530  Function nc_inq_var(ncid, varid, name, xtypep, ndimsp, dimidsp, nattsp) &
531  bind(c)
533  USE iso_c_binding, ONLY: c_int, c_char
534 
535  Integer(C_INT), VALUE :: ncid, varid
536  Character(KIND=C_CHAR), Intent(OUT) :: name(*)
537  Integer(C_INT), Intent(OUT) :: xtypep
538  Integer(C_INT), Intent(OUT) :: ndimsp
539  Integer(C_INT), Intent(OUT) :: dimidsp(*)
540  Integer(C_INT), Intent(OUT) :: nattsp
541 
542  Integer(C_INT) :: nc_inq_var
543 
544  End Function nc_inq_var
545 End Interface
546 !---------------------------------- nc_inq_varid ------------------------------
547 Interface
548  Function nc_inq_varid(ncid, name, varidp) bind(C)
550  USE iso_c_binding, ONLY: c_int, c_char
551 
552  Integer(C_INT), VALUE :: ncid
553  Character(KIND=C_CHAR), Intent(IN) :: name(*)
554  Integer(C_INT), Intent(OUT) :: varidp
555 
556  Integer(C_INT) :: nc_inq_varid
557 
558  End Function nc_inq_varid
559 End Interface
560 !---------------------------------- nc_inq_varname ----------------------------
561 Interface
562  Function nc_inq_varname(ncid, varid, name) bind(C)
564  USE iso_c_binding, ONLY: c_int, c_char
565 
566  Integer(C_INT), VALUE :: ncid, varid
567  Character(KIND=C_CHAR), Intent(OUT) :: name(*)
568 
569  Integer(C_INT) :: nc_inq_varname
570 
571  End Function nc_inq_varname
572 End Interface
573 !---------------------------------- nc_inq_vartype ----------------------------
574 Interface
575  Function nc_inq_vartype(ncid, varid, xtypep) bind(C)
577  USE iso_c_binding, ONLY: c_int
578 
579  Integer(C_INT), VALUE :: ncid, varid
580  Integer(C_INT), Intent(OUT) :: xtypep
581 
582  Integer(C_INT) :: nc_inq_vartype
583 
584  End Function nc_inq_vartype
585 End Interface
586 !---------------------------------- nc_inq_varndims ---------------------------
587 Interface
588  Function nc_inq_varndims(ncid, varid, ndimsp) bind(C)
590  USE iso_c_binding, ONLY: c_int
591 
592  Integer(C_INT), VALUE :: ncid, varid
593  Integer(C_INT), Intent(OUT) :: ndimsp
594 
595  Integer(C_INT) :: nc_inq_varndims
596 
597  End Function nc_inq_varndims
598 End Interface
599 !---------------------------------- nc_inq_vardimid ---------------------------
600 Interface
601  Function nc_inq_vardimid(ncid, varid, dimidsp) bind(C)
603  USE iso_c_binding, ONLY: c_int
604 
605  Integer(C_INT), VALUE :: ncid, varid
606  Integer(C_INT), Intent(OUT) :: dimidsp(*)
607 
608  Integer(C_INT) :: nc_inq_vardimid
609 
610  End Function nc_inq_vardimid
611 End Interface
612 !---------------------------------- nc_inq_varnatts ---------------------------
613 Interface
614  Function nc_inq_varnatts(ncid, varid, nattsp) bind(C)
616  USE iso_c_binding, ONLY: c_int
617 
618  Integer(C_INT), VALUE :: ncid, varid
619  Integer(C_INT), Intent(OUT) :: nattsp
620 
621  Integer(C_INT) :: nc_inq_varnatts
622 
623  End Function nc_inq_varnatts
624 End Interface
625 !---------------------------------- nc_rename_var -----------------------------
626 Interface
627  Function nc_rename_var(ncid, varid, name) bind(C)
629  USE iso_c_binding, ONLY: c_int, c_char
630 
631  Integer(C_INT), VALUE :: ncid, varid
632  Character(KIND=C_CHAR), Intent(IN) :: name(*)
633 
634  Integer(C_INT) :: nc_rename_var
635 
636  End Function nc_rename_var
637 End Interface
638 !---------------------------------- nc_put_var_text ---------------------------
639 Interface
640  Function nc_put_var_text(ncid, varid, op) bind(C)
642  USE iso_c_binding, ONLY: c_int, c_char
643 
644  Integer(C_INT), VALUE :: ncid, varid
645  Character(KIND=C_CHAR), Intent(IN) :: op(*)
646 
647  Integer(C_INT) :: nc_put_var_text
648 
649  End Function nc_put_var_text
650 End Interface
651 !---------------------------------- nc_get_var_text ---------------------------
652 Interface
653  Function nc_get_var_text(ncid, varid, ip) bind(C)
655  USE iso_c_binding, ONLY: c_int, c_char
656 
657  Integer(C_INT), VALUE :: ncid, varid
658  Character(KIND=C_CHAR), Intent(INOUT) :: ip(*)
659 
660  Integer(C_INT) :: nc_get_var_text
661 
662  End Function nc_get_var_text
663 End Interface
664 !---------------------------------- nc_put_var_uchar --------------------------
665 Interface
666  Function nc_put_var_uchar(ncid, varid, op) bind(C)
668  USE iso_c_binding, ONLY: c_int
669  USE netcdf_nc_data, ONLY: cint1
670 
671  Integer(C_INT), VALUE :: ncid, varid
672  Integer(CINT1), Intent(IN) :: op(*)
673 
674  Integer(C_INT) :: nc_put_var_uchar
675 
676  End Function nc_put_var_uchar
677 End Interface
678 !---------------------------------- nc_get_var_uchar --------------------------
679 Interface
680  Function nc_get_var_uchar(ncid, varid, ip) bind(C)
682  USE iso_c_binding, ONLY: c_int
683  USE netcdf_nc_data, ONLY: cint1
684 
685  Integer(C_INT), VALUE :: ncid, varid
686  Integer(CINT1), Intent(OUT) :: ip(*)
687 
688  Integer(C_INT) :: nc_get_var_uchar
689 
690  End Function nc_get_var_uchar
691 End Interface
692 !---------------------------------- nc_put_var_schar --------------------------
693 Interface
694  Function nc_put_var_schar(ncid, varid, op) bind(C)
696  USE iso_c_binding, ONLY: c_int
697  USE netcdf_nc_data, ONLY: cint1
698 
699  Integer(C_INT), VALUE :: ncid, varid
700  Integer(CINT1), Intent(IN) :: op(*)
701 
702  Integer(C_INT) :: nc_put_var_schar
703 
704  End Function nc_put_var_schar
705 End Interface
706 !---------------------------------- nc_get_var_schar --------------------------
707 Interface
708  Function nc_get_var_schar(ncid, varid, ip) bind(C)
710  USE iso_c_binding, ONLY: c_int
711  USE netcdf_nc_data, ONLY: cint1
712 
713  Integer(C_INT), VALUE :: ncid, varid
714  Integer(CINT1), Intent(OUT) :: ip(*)
715 
716  Integer(C_INT) :: nc_get_var_schar
717 
718  End Function nc_get_var_schar
719 End Interface
720 !---------------------------------- nc_put_var_short --------------------------
721 Interface
722  Function nc_put_var_short(ncid, varid, op) bind(C)
724  USE iso_c_binding, ONLY: c_int
725  USE netcdf_nc_data, ONLY: cint2
726 
727  Integer(C_INT), VALUE :: ncid, varid
728  Integer(CINT2), Intent(IN) :: op(*)
729 
730  Integer(C_INT) :: nc_put_var_short
731 
732  End Function nc_put_var_short
733 End Interface
734 !---------------------------------- nc_get_var_short --------------------------
735 Interface
736  Function nc_get_var_short(ncid, varid, ip) bind(C)
738  USE iso_c_binding, ONLY: c_int
739  USE netcdf_nc_data, ONLY: cint2
740 
741  Integer(C_INT), VALUE :: ncid, varid
742  Integer(CINT2), Intent(OUT) :: ip(*)
743 
744  Integer(C_INT) :: nc_get_var_short
745 
746  End Function nc_get_var_short
747 End Interface
748 !---------------------------------- nc_put_var_int ----------------------------
749 Interface
750  Function nc_put_var_int(ncid, varid, op) bind(C)
752  USE iso_c_binding, ONLY: c_int
753  USE netcdf_nc_data, ONLY: cint
754 
755  Integer(C_INT), VALUE :: ncid, varid
756  Integer(CINT), Intent(IN) :: op(*)
757 
758  Integer(C_INT) :: nc_put_var_int
759 
760  End Function nc_put_var_int
761 End Interface
762 !---------------------------------- nc_get_var_int ----------------------------
763 Interface
764  Function nc_get_var_int(ncid, varid, ip) bind(C)
766  USE iso_c_binding, ONLY: c_int
767  USE netcdf_nc_data, ONLY: cint
768 
769  Integer(C_INT), VALUE :: ncid, varid
770  Integer(CINT), Intent(OUT) :: ip(*)
771 
772  Integer(C_INT) :: nc_get_var_int
773 
774  End Function nc_get_var_int
775 End Interface
776 !---------------------------------- nc_put_var_long ----------------------------
777 Interface
778  Function nc_put_var_long(ncid, varid, op) bind(C)
780  USE iso_c_binding, ONLY: c_int, c_long
781 
782  Integer(C_INT), VALUE :: ncid, varid
783  Integer(C_LONG), Intent(IN) :: op(*)
784 
785  Integer(C_INT) :: nc_put_var_long
786 
787  End Function nc_put_var_long
788 End Interface
789 !---------------------------------- nc_get_var_long ---------------------------
790 Interface
791  Function nc_get_var_long(ncid, varid, ip) bind(C)
793  USE iso_c_binding, ONLY: c_int, c_long
794 
795  Integer(C_INT), VALUE :: ncid, varid
796  Integer(C_LONG), Intent(OUT) :: ip(*)
797 
798  Integer(C_INT) :: nc_get_var_long
799 
800  End Function nc_get_var_long
801 End Interface
802 !---------------------------------- nc_put_var_float --------------------------
803 Interface
804  Function nc_put_var_float(ncid, varid, op) bind(C)
806  USE iso_c_binding, ONLY: c_int, c_float
807 
808  Integer(C_INT), VALUE :: ncid, varid
809  Real(C_FLOAT), Intent(IN) :: op(*)
810 
811  Integer(C_INT) :: nc_put_var_float
812 
813  End Function nc_put_var_float
814 End Interface
815 !---------------------------------- nc_get_var_float --------------------------
816 Interface
817  Function nc_get_var_float(ncid, varid, ip) bind(C)
819  USE iso_c_binding, ONLY: c_int, c_float
820 
821  Implicit NONE
822 
823  Integer(C_INT), VALUE :: ncid, varid
824  Real(C_FLOAT), Intent(OUT) :: ip(*)
825 
826  Integer(C_INT) :: nc_get_var_float
827 
828  End Function nc_get_var_float
829 End Interface
830 !---------------------------------- nc_put_var_double -------------------------
831 Interface
832  Function nc_put_var_double(ncid, varid, op) bind(C)
834  USE iso_c_binding, ONLY: c_int, c_double
835 
836  Integer(C_INT), VALUE :: ncid, varid
837  Real(C_DOUBLE), Intent(IN) :: op(*)
838 
839  Integer(C_INT) :: nc_put_var_double
840 
841  End Function nc_put_var_double
842 End Interface
843 !---------------------------------- nc_get_var_double -------------------------
844 Interface
845  Function nc_get_var_double(ncid, varid, ip) bind(C)
847  USE iso_c_binding, ONLY: c_int, c_double
848 
849  Integer(C_INT), VALUE :: ncid, varid
850  Real(C_DOUBLE), Intent(OUT) :: ip(*)
851 
852  Integer(C_INT) :: nc_get_var_double
853 
854  End Function nc_get_var_double
855 End Interface
856 !---------------------------------- nc_put_var1_text --------------------------
857 Interface
858  Function nc_put_var1_text(ncid, varid, indexp, op) bind(C)
860  USE iso_c_binding, ONLY: c_int, c_ptr, c_char
861 
862  Integer(C_INT), VALUE :: ncid, varid
863  Type(c_ptr), VALUE :: indexp
864  Character(LEN=C_CHAR), Intent(IN) :: op
865 
866  Integer(C_INT) :: nc_put_var1_text
867 
868  End Function nc_put_var1_text
869 End Interface
870 !---------------------------------- nc_get_var1_test --------------------------
871 Interface
872  Function nc_get_var1_text(ncid, varid, indexp, ip) bind(C)
874  USE iso_c_binding, ONLY: c_int, c_ptr, c_char
875 
876  Integer(C_INT), VALUE :: ncid, varid
877  Type(c_ptr), VALUE :: indexp
878  Character(KIND=C_CHAR), Intent(OUT) :: ip
879 
880  Integer(C_INT) :: nc_get_var1_text
881 
882  End Function nc_get_var1_text
883 End Interface
884 !---------------------------------- nc_put_var1_uchar -------------------------
885 Interface
886  Function nc_put_var1_uchar(ncid, varid, indexp, op) bind(C)
888  USE iso_c_binding, ONLY: c_int, c_ptr
889  USE netcdf_nc_data, ONLY: cint1
890 
891  Integer(C_INT), VALUE :: ncid, varid
892  Type(c_ptr), VALUE :: indexp
893  Integer(CINT1), Intent(IN) :: op
894 
895  Integer(C_INT) :: nc_put_var1_uchar
896 
897  End Function nc_put_var1_uchar
898 End Interface
899 !---------------------------------- nc_get_var1_uchar -------------------------
900 Interface
901  Function nc_get_var1_uchar(ncid, varid, indexp, ip) bind(C)
903  USE iso_c_binding, ONLY: c_int, c_ptr
904  USE netcdf_nc_data, ONLY: cint1
905 
906  Integer(C_INT), VALUE :: ncid, varid
907  Type(c_ptr), VALUE :: indexp
908  Integer(CINT1), Intent(OUT) :: ip
909 
910  Integer(C_INT) :: nc_get_var1_uchar
911 
912  End Function nc_get_var1_uchar
913 End Interface
914 !---------------------------------- nc_put_var1_schar -------------------------
915 Interface
916  Function nc_put_var1_schar(ncid, varid, indexp, op) bind(C)
918  USE iso_c_binding, ONLY: c_int, c_ptr
919  USE netcdf_nc_data, ONLY: cint1
920 
921  Integer(C_INT), VALUE :: ncid, varid
922  Type(c_ptr), VALUE :: indexp
923  Integer(CINT1), Intent(IN) :: op
924 
925  Integer(C_INT) :: nc_put_var1_schar
926 
927  End Function nc_put_var1_schar
928 End Interface
929 !---------------------------------- nc_get_var1_schar -------------------------
930 Interface
931  Function nc_get_var1_schar(ncid, varid, indexp, ip) bind(C)
933  USE iso_c_binding, ONLY: c_int, c_ptr
934  USE netcdf_nc_data, ONLY: cint1
935 
936  Integer(C_INT), VALUE :: ncid, varid
937  Type(c_ptr), VALUE :: indexp
938  Integer(CINT1), Intent(OUT) :: ip
939 
940  Integer(C_INT) :: nc_get_var1_schar
941 
942  End Function nc_get_var1_schar
943 End Interface
944 !---------------------------------- nc_put_var1_short -------------------------
945 Interface
946  Function nc_put_var1_short(ncid, varid, indexp, op) bind(C)
948  USE iso_c_binding, ONLY: c_int, c_ptr
949  USE netcdf_nc_data, ONLY: cint2
950 
951  Integer(C_INT), VALUE :: ncid, varid
952  Type(c_ptr), VALUE :: indexp
953  Integer(CINT2), Intent(IN) :: op
954 
955  Integer(C_INT) :: nc_put_var1_short
956 
957  End Function nc_put_var1_short
958 End Interface
959 !---------------------------------- nc_get_var1_short -------------------------
960 Interface
961  Function nc_get_var1_short(ncid, varid, indexp, ip) bind(C)
963  USE iso_c_binding, ONLY: c_int, c_ptr
964  USE netcdf_nc_data, ONLY: cint2
965 
966  Integer(C_INT), VALUE :: ncid, varid
967  Type(c_ptr), VALUE :: indexp
968  Integer(CINT2), Intent(OUT) :: ip
969 
970  Integer(C_INT) :: nc_get_var1_short
971 
972  End Function nc_get_var1_short
973 End Interface
974 !---------------------------------- nc_put_var1_int ---------------------------
975 Interface
976  Function nc_put_var1_int(ncid, varid, indexp, op) bind(C)
978  USE iso_c_binding, ONLY: c_int, c_ptr
979 
980  Integer(C_INT), VALUE :: ncid, varid
981  Type(c_ptr), VALUE :: indexp
982  Integer(C_INT), Intent(IN) :: op
983 
984  Integer(C_INT) :: nc_put_var1_int
985 
986  End Function nc_put_var1_int
987 End Interface
988 !---------------------------------- nc_get_var1_int ---------------------------
989 Interface
990  Function nc_get_var1_int(ncid, varid, indexp, ip) bind(C)
992  USE iso_c_binding, ONLY: c_int, c_ptr
993 
994  Integer(C_INT), VALUE :: ncid, varid
995  Type(c_ptr), VALUE :: indexp
996  Integer(C_INT), Intent(OUT) :: ip
997 
998  Integer(C_INT) :: nc_get_var1_int
999 
1000  End Function nc_get_var1_int
1001 End Interface
1002 !---------------------------------- nc_put_var1_long --------------------------
1003 Interface
1004  Function nc_put_var1_long(ncid, varid, indexp, op) bind(C)
1006  USE iso_c_binding, ONLY: c_int, c_long, c_ptr
1007 
1008  Integer(C_INT), VALUE :: ncid, varid
1009  Type(c_ptr), VALUE :: indexp
1010  Integer(C_LONG), Intent(IN) :: op
1011 
1012  Integer(C_INT) :: nc_put_var1_long
1013 
1014  End Function nc_put_var1_long
1015 End Interface
1016 !---------------------------------- nc_get_var1_long --------------------------
1017 Interface
1018  Function nc_get_var1_long(ncid, varid, indexp, ip) bind(C)
1020  USE iso_c_binding, ONLY: c_int, c_long, c_ptr
1021 
1022  Integer(C_INT), VALUE :: ncid, varid
1023  Type(c_ptr), VALUE :: indexp
1024  Integer(C_LONG), Intent(OUT) :: ip
1025 
1026  Integer(C_INT) :: nc_get_var1_long
1027 
1028  End Function nc_get_var1_long
1029 End Interface
1030 !---------------------------------- nc_put_var1_float -------------------------
1031 Interface
1032  Function nc_put_var1_float(ncid, varid, indexp, op) bind(C)
1034  USE iso_c_binding, ONLY: c_int, c_float, c_ptr
1035 
1036  Integer(C_INT), VALUE :: ncid, varid
1037  Type(c_ptr), VALUE :: indexp
1038  Real(C_FLOAT), Intent(IN) :: op
1039 
1040  Integer(C_INT) :: nc_put_var1_float
1041 
1042  End Function nc_put_var1_float
1043 End Interface
1044 !---------------------------------- nc_get_var1_float -------------------------
1045 Interface
1046  Function nc_get_var1_float(ncid, varid, indexp, ip) bind(C)
1048  USE iso_c_binding, ONLY: c_int, c_float, c_ptr
1049 
1050  Integer(C_INT), VALUE :: ncid, varid
1051  Type(c_ptr), VALUE :: indexp
1052  Real(C_FLOAT), Intent(OUT) :: ip
1053 
1054  Integer(C_INT) :: nc_get_var1_float
1055 
1056  End Function nc_get_var1_float
1057 End Interface
1058 !---------------------------------- nc_put_var1_double ------------------------
1059 Interface
1060  Function nc_put_var1_double(ncid, varid, indexp, op) bind(C)
1062  USE iso_c_binding, ONLY: c_int, c_double, c_ptr
1063 
1064  Integer(C_INT), VALUE :: ncid, varid
1065  Type(c_ptr), VALUE :: indexp
1066  Real(C_DOUBLE), Intent(IN) :: op
1067 
1068  Integer(C_INT) :: nc_put_var1_double
1069 
1070  End Function nc_put_var1_double
1071 End Interface
1072 !---------------------------------- nc_get_var1_double ------------------------
1073 Interface
1074  Function nc_get_var1_double(ncid, varid, indexp, ip) bind(C)
1076  USE iso_c_binding, ONLY: c_int, c_double, c_ptr
1077 
1078  Integer(C_INT), VALUE :: ncid, varid
1079  Type(c_ptr), VALUE :: indexp
1080  Real(C_DOUBLE), Intent(OUT) :: ip
1081 
1082  Integer(C_INT) :: nc_get_var1_double
1083 
1084  End Function nc_get_var1_double
1085 End Interface
1086 !---------------------------------- nc_put_var1 ------------------------------
1087 Interface
1088  Function nc_put_var1(ncid, varid, indexp, op) bind(C)
1090  USE iso_c_binding, ONLY: c_int, c_ptr
1091 
1092  Integer(C_INT), VALUE :: ncid, varid
1093 ! Type(C_PTR) :: indexp
1094  Type(c_ptr), VALUE :: indexp
1095  Type(c_ptr), VALUE :: op
1096 
1097  Integer(C_INT) :: nc_put_var1
1098 
1099  End Function nc_put_var1
1100 End Interface
1101 !---------------------------------- nc_get_var1 ------------------------------
1102 Interface
1103  Function nc_get_var1(ncid, varid, indexp, op) bind(C)
1105  USE iso_c_binding, ONLY: c_int, c_ptr, c_char
1106 
1107  Integer(C_INT), VALUE :: ncid, varid
1108  Type(c_ptr), VALUE :: indexp
1109  Character(KIND=C_CHAR), Intent(INOUT) :: op(*) ! op is actually void * in C
1110 
1111  Integer(C_INT) :: nc_get_var1
1112 
1113  End Function nc_get_var1
1114 End Interface
1115 !---------------------------------- nc_put_vara_text --------------------------
1116 Interface
1117  Function nc_put_vara_text(ncid, varid, startp, countp, op) bind(C)
1119  USE iso_c_binding, ONLY: c_int, c_ptr, c_char
1120 
1121  Integer(C_INT), VALUE :: ncid, varid
1122  Type(c_ptr), VALUE :: startp, countp
1123  Character(KIND=C_CHAR), Intent(IN) :: op(*)
1124 
1125  Integer(C_INT) :: nc_put_vara_text
1126 
1127  End Function nc_put_vara_text
1128 End Interface
1129 !---------------------------------- nc_get_vara_text --------------------------
1130 Interface
1131  Function nc_get_vara_text(ncid, varid, startp, countp, ip) bind(C)
1133  USE iso_c_binding, ONLY: c_int, c_ptr, c_char
1134 
1135  Integer(C_INT), VALUE :: ncid, varid
1136  Type(c_ptr), VALUE :: startp, countp
1137  Character(KIND=C_CHAR), Intent(OUT) :: ip(*)
1138 
1139  Integer(C_INT) :: nc_get_vara_text
1140 
1141  End Function nc_get_vara_text
1142 End Interface
1143 !---------------------------------- nc_put_vara_uchar -------------------------
1144 Interface
1145  Function nc_put_vara_uchar(ncid, varid, startp, countp, op) bind(C)
1147  USE iso_c_binding, ONLY: c_int, c_ptr
1148  USE netcdf_nc_data, ONLY: cint1
1149 
1150  Integer(C_INT), VALUE :: ncid, varid
1151  Type(c_ptr), VALUE :: startp, countp
1152  Integer(CINT1), Intent(IN) :: op(*)
1153 
1154  Integer(C_INT) :: nc_put_vara_uchar
1155 
1156  End Function nc_put_vara_uchar
1157 End Interface
1158 !---------------------------------- nc_get_vara_uchar -------------------------
1159 Interface
1160  Function nc_get_vara_uchar(ncid, varid, startp, countp, ip) bind(C)
1162  USE iso_c_binding, ONLY: c_int, c_ptr
1163  USE netcdf_nc_data, ONLY: cint1
1164 
1165  Integer(C_INT), VALUE :: ncid, varid
1166  Type(c_ptr), VALUE :: startp, countp
1167  Integer(CINT1), Intent(OUT) :: ip(*)
1168 
1169  Integer(C_INT) :: nc_get_vara_uchar
1170 
1171  End Function nc_get_vara_uchar
1172 End Interface
1173 !---------------------------------- nc_put_vara_schar -------------------------
1174 Interface
1175  Function nc_put_vara_schar(ncid, varid, startp, countp, op) bind(C)
1177  USE iso_c_binding, ONLY: c_int, c_ptr
1178  USE netcdf_nc_data, ONLY: cint1
1179 
1180  Integer(C_INT), VALUE :: ncid, varid
1181  Type(c_ptr), VALUE :: startp, countp
1182  Integer(CINT1), Intent(IN) :: op(*)
1183 
1184  Integer(C_INT) :: nc_put_vara_schar
1185 
1186  End Function nc_put_vara_schar
1187 End Interface
1188 !---------------------------------- nc_get_vara_schar -------------------------
1189 Interface
1190  Function nc_get_vara_schar(ncid, varid, startp, countp, ip) bind(C)
1192  USE iso_c_binding, ONLY: c_int, c_ptr
1193  USE netcdf_nc_data, ONLY: cint1
1194 
1195  Integer(C_INT), VALUE :: ncid, varid
1196  Type(c_ptr), VALUE :: startp, countp
1197  Integer(CINT1), Intent(OUT) :: ip(*)
1198 
1199  Integer(C_INT) :: nc_get_vara_schar
1200 
1201  End Function nc_get_vara_schar
1202 End Interface
1203 !---------------------------------- nc_put_vara_short -------------------------
1204 Interface
1205  Function nc_put_vara_short(ncid, varid, startp, countp, op) bind(C)
1207  USE iso_c_binding, ONLY: c_int, c_ptr
1208  USE netcdf_nc_data, ONLY: cint2
1209 
1210  Integer(C_INT), VALUE :: ncid, varid
1211  Type(c_ptr), VALUE :: startp, countp
1212  Integer(CINT2), Intent(IN) :: op(*)
1213 
1214  Integer(C_INT) :: nc_put_vara_short
1215 
1216  End Function nc_put_vara_short
1217 End Interface
1218 !---------------------------------- nc_get_vara_short -------------------------
1219 Interface
1220  Function nc_get_vara_short(ncid, varid, startp, countp, ip) bind(C)
1222  USE iso_c_binding, ONLY: c_int, c_ptr
1223  USE netcdf_nc_data, ONLY: cint2
1224 
1225  Integer(C_INT), VALUE :: ncid, varid
1226  Type(c_ptr), VALUE :: startp, countp
1227  Integer(CINT2), Intent(OUT) :: ip(*)
1228 
1229  Integer(C_INT) :: nc_get_vara_short
1230 
1231  End Function nc_get_vara_short
1232 End Interface
1233 !--------------------------------- nc_put_vara_int ----------------------------
1234 Interface
1235  Function nc_put_vara_int(ncid, varid, startp, countp, op) bind(C)
1237  USE iso_c_binding, ONLY: c_int, c_ptr
1238  USE netcdf_nc_data, ONLY: cint
1239 
1240  Integer(C_INT), VALUE :: ncid, varid
1241  Type(c_ptr), VALUE :: startp, countp
1242  Integer(CINT), Intent(IN) :: op(*)
1243 
1244  Integer(C_INT) :: nc_put_vara_int
1245 
1246  End Function nc_put_vara_int
1247 End Interface
1248 !--------------------------------- nc_get_vara_int ----------------------------
1249 Interface
1250  Function nc_get_vara_int(ncid, varid, startp, countp, ip) bind(C)
1252  USE iso_c_binding, ONLY: c_int, c_ptr
1253  USE netcdf_nc_data, ONLY: cint
1254 
1255  Integer(C_INT), VALUE :: ncid, varid
1256  Type(c_ptr), VALUE :: startp, countp
1257  Integer(CINT), Intent(OUT) :: ip(*)
1258 
1259  Integer(C_INT) :: nc_get_vara_int
1260 
1261  End Function nc_get_vara_int
1262 End Interface
1263 !--------------------------------- nc_put_vara_long ---------------------------
1264 Interface
1265  Function nc_put_vara_long(ncid, varid, startp, countp, op) bind(C)
1267  USE iso_c_binding, ONLY: c_int, c_long, c_ptr
1268 
1269  Integer(C_INT), VALUE :: ncid, varid
1270  Type(c_ptr), VALUE :: startp, countp
1271  Integer(C_LONG), Intent(IN) :: op(*)
1272 
1273  Integer(C_INT) :: nc_put_vara_long
1274 
1275  End Function nc_put_vara_long
1276 End Interface
1277 !--------------------------------- nc_get_vara_long ---------------------------
1278 Interface
1279  Function nc_get_vara_long(ncid, varid, startp, countp, ip) bind(C)
1281  USE iso_c_binding, ONLY: c_int, c_long, c_ptr
1282 
1283  Integer(C_INT), VALUE :: ncid, varid
1284  Type(c_ptr), VALUE :: startp, countp
1285  Integer(C_LONG), Intent(OUT) :: ip(*)
1286 
1287  Integer(C_INT) :: nc_get_vara_long
1288 
1289  End Function nc_get_vara_long
1290 End Interface
1291 !--------------------------------- nc_put_vara_float --------------------------
1292 Interface
1293  Function nc_put_vara_float(ncid, varid, startp, countp, op) bind(C)
1295  USE iso_c_binding, ONLY: c_int, c_float, c_ptr
1296 
1297  Integer(C_INT), VALUE :: ncid, varid
1298  Type(c_ptr), VALUE :: startp, countp
1299  Real(C_FLOAT), Intent(IN) :: op(*)
1300 
1301  Integer(C_INT) :: nc_put_vara_float
1302 
1303  End Function nc_put_vara_float
1304 End Interface
1305 !--------------------------------- nc_get_vara_float --------------------------
1306 Interface
1307  Function nc_get_vara_float(ncid, varid, startp, countp, ip) bind(C)
1309  USE iso_c_binding, ONLY: c_int, c_float, c_ptr
1310 
1311  Integer(C_INT), VALUE :: ncid, varid
1312  Type(c_ptr), VALUE :: startp, countp
1313  Real(C_FLOAT), Intent(OUT) :: ip(*)
1314 
1315  Integer(C_INT) :: nc_get_vara_float
1316 
1317  End Function nc_get_vara_float
1318 End Interface
1319 !--------------------------------- nc_put_vara_double -------------------------
1320 Interface
1321  Function nc_put_vara_double(ncid, varid, startp, countp, op) bind(C)
1323  USE iso_c_binding, ONLY: c_int, c_double, c_ptr
1324 
1325  Integer(C_INT), VALUE :: ncid, varid
1326  Type(c_ptr), VALUE :: startp, countp
1327  Real(C_DOUBLE), Intent(IN) :: op(*)
1328 
1329  Integer(C_INT) :: nc_put_vara_double
1330 
1331  End Function nc_put_vara_double
1332 End Interface
1333 !--------------------------------- nc_get_vara_double -------------------------
1334 Interface
1335  Function nc_get_vara_double(ncid, varid, startp, countp, ip) bind(C)
1337  USE iso_c_binding, ONLY: c_int, c_double, c_ptr
1338 
1339  Integer(C_INT), VALUE :: ncid, varid
1340  Type(c_ptr), VALUE :: startp, countp
1341  Real(C_DOUBLE), Intent(OUT) :: ip(*)
1342 
1343  Integer(C_INT) :: nc_get_vara_double
1344 
1345  End Function nc_get_vara_double
1346 End Interface
1347 !---------------------------------- nc_put_vara -------------------------------
1348 Interface
1349  Function nc_put_vara(ncid, varid, startp, countp, op) bind(C)
1351  USE iso_c_binding, ONLY: c_int, c_ptr
1352 
1353  Integer(C_INT), VALUE :: ncid, varid
1354  Type(c_ptr), VALUE :: startp, countp
1355  Type(c_ptr), VALUE :: op
1356 
1357  Integer(C_INT) :: nc_put_vara
1358 
1359  End Function nc_put_vara
1360 End Interface
1361 !---------------------------------- nc_get_vara -------------------------------
1362 Interface
1363  Function nc_get_vara(ncid, varid, startp, countp, ip) bind(C)
1365  USE iso_c_binding, ONLY: c_int, c_ptr, c_char
1366 
1367  Integer(C_INT), VALUE :: ncid, varid
1368  Type(c_ptr), VALUE :: startp, countp
1369  Character(KIND=C_CHAR), Intent(INOUT) :: ip(*)
1370 
1371  Integer(C_INT) :: nc_get_vara
1372 
1373  End Function nc_get_vara
1374 End Interface
1375 !--------------------------------- nc_put_vars_text ---------------------------
1376 Interface
1377  Function nc_put_vars_text(ncid, varid, startp, countp, stridep, op) bind(C)
1379  USE iso_c_binding, ONLY: c_int, c_ptr, c_char
1380 
1381  Integer(C_INT), VALUE :: ncid, varid
1382  Type(c_ptr), VALUE :: startp, countp, stridep
1383  Character(KIND=C_CHAR), Intent(IN) :: op(*)
1384 
1385  Integer(C_INT) :: nc_put_vars_text
1386 
1387  End Function nc_put_vars_text
1388 End Interface
1389 !--------------------------------- nc_get_vars_text ---------------------------
1390 Interface
1391  Function nc_get_vars_text(ncid, varid, startp, countp, stridep, ip) bind(C)
1393  USE iso_c_binding, ONLY: c_int, c_ptr, c_char
1394 
1395  Integer(C_INT), VALUE :: ncid, varid
1396  Type(c_ptr), VALUE :: startp, countp, stridep
1397  Character(KIND=C_CHAR), Intent(OUT) :: ip(*)
1398 
1399  Integer(C_INT) :: nc_get_vars_text
1400 
1401  End Function nc_get_vars_text
1402 End Interface
1403 !--------------------------------- nc_put_vars_uchar --------------------------
1404 Interface
1405  Function nc_put_vars_uchar(ncid, varid, startp, countp, stridep, op) bind(C)
1407  USE iso_c_binding, ONLY: c_int, c_ptr
1408  USE netcdf_nc_data, ONLY: cint1
1409 
1410  Integer(C_INT), VALUE :: ncid, varid
1411  Type(c_ptr), VALUE :: startp, countp, stridep
1412  Integer(CINT1), Intent(IN) :: op(*)
1413 
1414  Integer(C_INT) :: nc_put_vars_uchar
1415 
1416  End Function nc_put_vars_uchar
1417 End Interface
1418 !--------------------------------- nc_get_vars_uchar --------------------------
1419 Interface
1420  Function nc_get_vars_uchar(ncid, varid, startp, countp, stridep, ip) bind(C)
1422  USE iso_c_binding, ONLY: c_int, c_ptr
1423  USE netcdf_nc_data, ONLY: cint1
1424 
1425  Integer(C_INT), VALUE :: ncid, varid
1426  Type(c_ptr), VALUE :: startp, countp, stridep
1427  Integer(CINT1), Intent(OUT) :: ip(*)
1428 
1429  Integer(C_INT) :: nc_get_vars_uchar
1430 
1431  End Function nc_get_vars_uchar
1432 End Interface
1433 !--------------------------------- nc_put_vars_schar --------------------------
1434 Interface
1435  Function nc_put_vars_schar(ncid, varid, startp, countp, stridep, op) bind(C)
1437  USE iso_c_binding, ONLY: c_int, c_ptr
1438  USE netcdf_nc_data, ONLY: cint1
1439 
1440  Integer(C_INT), VALUE :: ncid, varid
1441  Type(c_ptr), VALUE :: startp, countp, stridep
1442  Integer(CINT1), Intent(IN) :: op(*)
1443 
1444  Integer(C_INT) :: nc_put_vars_schar
1445 
1446  End Function nc_put_vars_schar
1447 End Interface
1448 !--------------------------------- nc_get_vars_schar --------------------------
1449 Interface
1450  Function nc_get_vars_schar(ncid, varid, startp, countp, stridep, ip) bind(C)
1452  USE iso_c_binding, ONLY: c_int, c_ptr
1453  USE netcdf_nc_data, ONLY: cint1
1454 
1455  Integer(C_INT), VALUE :: ncid, varid
1456  Type(c_ptr), VALUE :: startp, countp, stridep
1457  Integer(CINT1), Intent(OUT) :: ip(*)
1458 
1459  Integer(C_INT) :: nc_get_vars_schar
1460 
1461  End Function nc_get_vars_schar
1462 End Interface
1463 !--------------------------------- nc_put_vars_short --------------------------
1464 Interface
1465  Function nc_put_vars_short(ncid, varid, startp, countp, stridep, op) bind(C)
1467  USE iso_c_binding, ONLY: c_int, c_ptr
1468  USE netcdf_nc_data, ONLY: cint2
1469 
1470  Integer(C_INT), VALUE :: ncid, varid
1471  Type(c_ptr), VALUE :: startp, countp, stridep
1472  Integer(CINT2), Intent(IN) :: op(*)
1473 
1474  Integer(C_INT) :: nc_put_vars_short
1475 
1476  End Function nc_put_vars_short
1477 End Interface
1478 !--------------------------------- nc_get_vars_short --------------------------
1479 Interface
1480  Function nc_get_vars_short(ncid, varid, startp, countp, stridep, ip) bind(C)
1482  USE iso_c_binding, ONLY: c_int, c_ptr
1483  USE netcdf_nc_data, ONLY: cint2
1484 
1485  Integer(C_INT), VALUE :: ncid, varid
1486  Type(c_ptr), VALUE :: startp, countp, stridep
1487  Integer(CINT2), Intent(OUT) :: ip(*)
1488 
1489  Integer(C_INT) :: nc_get_vars_short
1490 
1491  End Function nc_get_vars_short
1492 End Interface
1493 !--------------------------------- nc_put_vars_int ----------------------------
1494 Interface
1495  Function nc_put_vars_int(ncid, varid, startp, countp, stridep, op) bind(C)
1497  USE iso_c_binding, ONLY: c_int, c_ptr
1498  USE netcdf_nc_data, ONLY: cint
1499 
1500  Integer(C_INT), VALUE :: ncid, varid
1501  Type(c_ptr), VALUE :: startp, countp, stridep
1502  Integer(CINT), Intent(IN) :: op(*)
1503 
1504  Integer(C_INT) :: nc_put_vars_int
1505 
1506  End Function nc_put_vars_int
1507 End Interface
1508 !--------------------------------- nc_get_vars_int ----------------------------
1509 Interface
1510  Function nc_get_vars_int(ncid, varid, startp, countp, stridep, ip) bind(C)
1512  USE iso_c_binding, ONLY: c_int, c_ptr
1513  USE netcdf_nc_data, ONLY: cint
1514 
1515  Integer(C_INT), VALUE :: ncid, varid
1516  Type(c_ptr), VALUE :: startp, countp, stridep
1517  Integer(CINT), Intent(OUT) :: ip(*)
1518 
1519  Integer(C_INT) :: nc_get_vars_int
1520 
1521  End Function nc_get_vars_int
1522 End Interface
1523 !--------------------------------- nc_put_vars_long ---------------------------
1524 Interface
1525  Function nc_put_vars_long(ncid, varid, startp, countp, stridep, op) bind(C)
1527  USE iso_c_binding, ONLY: c_int, c_long, c_ptr
1528 
1529  Integer(C_INT), VALUE :: ncid, varid
1530  Type(c_ptr), VALUE :: startp, countp, stridep
1531  Integer(C_LONG), Intent(IN) :: op(*)
1532 
1533  Integer(C_INT) :: nc_put_vars_long
1534 
1535  End Function nc_put_vars_long
1536 End Interface
1537 !--------------------------------- nc_get_vars_long ---------------------------
1538 Interface
1539  Function nc_get_vars_long(ncid, varid, startp, countp, stridep, ip) bind(C)
1541  USE iso_c_binding, ONLY: c_int, c_long, c_ptr
1542 
1543  Integer(C_INT), VALUE :: ncid, varid
1544  Type(c_ptr), VALUE :: startp, countp, stridep
1545  Integer(C_LONG), Intent(OUT) :: ip(*)
1546 
1547  Integer(C_INT) :: nc_get_vars_long
1548 
1549  End Function nc_get_vars_long
1550 End Interface
1551 !--------------------------------- nc_put_vars_float --------------------------
1552 Interface
1553  Function nc_put_vars_float(ncid, varid, startp, countp, stridep, op) bind(C)
1555  USE iso_c_binding, ONLY: c_int, c_float, c_ptr
1556 
1557  Integer(C_INT), VALUE :: ncid, varid
1558  Type(c_ptr), VALUE :: startp, countp, stridep
1559  Real(C_FLOAT), Intent(IN) :: op(*)
1560 
1561  Integer(C_INT) :: nc_put_vars_float
1562 
1563  End Function nc_put_vars_float
1564 End Interface
1565 !--------------------------------- nc_get_vars_float --------------------------
1566 Interface
1567  Function nc_get_vars_float(ncid, varid, startp, countp, stridep, ip) bind(C)
1569  USE iso_c_binding, ONLY: c_int, c_float, c_ptr
1570 
1571  Integer(C_INT), VALUE :: ncid, varid
1572  Type(c_ptr), VALUE :: startp, countp, stridep
1573  Real(C_FLOAT), Intent(OUT) :: ip(*)
1574 
1575  Integer(C_INT) :: nc_get_vars_float
1576 
1577  End Function nc_get_vars_float
1578 End Interface
1579 !--------------------------------- nc_put_vars_double -------------------------
1580 Interface
1581  Function nc_put_vars_double(ncid, varid, startp, countp, stridep, op) bind(C)
1583  USE iso_c_binding, ONLY: c_int, c_double, c_ptr
1584 
1585  Integer(C_INT), VALUE :: ncid, varid
1586  Type(c_ptr), VALUE :: startp, countp, stridep
1587  Real(C_DOUBLE), Intent(IN) :: op(*)
1588 
1589  Integer(C_INT) :: nc_put_vars_double
1590 
1591  End Function nc_put_vars_double
1592 End Interface
1593 !--------------------------------- nc_get_vars_double -------------------------
1594 Interface
1595  Function nc_get_vars_double(ncid, varid, startp, countp, stridep, ip) bind(C)
1597  USE iso_c_binding, ONLY: c_int, c_double, c_ptr
1598 
1599  Integer(C_INT), VALUE :: ncid, varid
1600  Type(c_ptr), VALUE :: startp, countp, stridep
1601  Real(C_DOUBLE), Intent(OUT) :: ip(*)
1602 
1603  Integer(C_INT) :: nc_get_vars_double
1604 
1605  End Function nc_get_vars_double
1606 End Interface
1607 !--------------------------------- nc_put_vars --------------------------------
1608 Interface
1609  Function nc_put_vars(ncid, varid, startp, countp, stridep, op) bind(C)
1611  USE iso_c_binding, ONLY: c_int, c_ptr
1612 
1613  Integer(C_INT), VALUE :: ncid, varid
1614  Type(c_ptr), VALUE :: startp, countp, stridep
1615  Type(c_ptr), VALUE :: op
1616 
1617  Integer(C_INT) :: nc_put_vars
1618 
1619  End Function nc_put_vars
1620 End Interface
1621 !--------------------------------- nc_get_vars ---------------------------
1622 Interface
1623  Function nc_get_vars(ncid, varid, startp, countp, stridep, ip) bind(C)
1625  USE iso_c_binding, ONLY: c_int, c_ptr, c_char
1626 
1627  Integer(C_INT), VALUE :: ncid, varid
1628  Type(c_ptr), VALUE :: startp, countp, stridep
1629  Character(KIND=C_CHAR), Intent(INOUT) :: ip(*)
1630 
1631  Integer(C_INT) :: nc_get_vars
1632 
1633  End Function nc_get_vars
1634 End Interface
1635 !--------------------------------- nc_put_varm_text ---------------------------
1636 Interface
1637 ! array of characters
1638  Function nc_put_varm_text(ncid, varid, startp, countp, stridep, imapp,op) &
1639  bind(c)
1641  USE iso_c_binding, ONLY: c_int, c_ptr, c_char
1642 
1643  Integer(C_INT), VALUE :: ncid, varid
1644  Type(c_ptr), VALUE :: startp, countp, stridep, imapp
1645  Character(KIND=C_CHAR), Intent(IN) :: op(*)
1646 
1647  Integer(C_INT) :: nc_put_varm_text
1648 
1649  End Function nc_put_varm_text
1650 End Interface
1651 !--------------------------------- nc_get_varm_text ---------------------------
1652 Interface
1653  Function nc_get_varm_text(ncid, varid, startp, countp, stridep, imapp,ip) &
1654  bind(c)
1656  USE iso_c_binding, ONLY: c_int, c_ptr, c_char
1657 
1658  Integer(C_INT), VALUE :: ncid, varid
1659  Type(c_ptr), VALUE :: startp, countp, stridep, imapp
1660  Character(KIND=C_CHAR), Intent(OUT) :: ip(*)
1661 
1662  Integer(C_INT) :: nc_get_varm_text
1663 
1664  End Function nc_get_varm_text
1665 End Interface
1666 !--------------------------------- nc_put_varm_uchar --------------------------
1667 Interface
1668  Function nc_put_varm_uchar(ncid, varid, startp, countp, stridep, imapp, op) &
1669  bind(c)
1671  USE iso_c_binding, ONLY: c_int, c_ptr
1672  USE netcdf_nc_data, ONLY: cint1
1673 
1674  Integer(C_INT), VALUE :: ncid, varid
1675  Type(c_ptr), VALUE :: startp, countp, stridep, imapp
1676  Integer(CINT1), Intent(IN) :: op(*)
1677 
1678  Integer(C_INT) :: nc_put_varm_uchar
1679 
1680  End Function nc_put_varm_uchar
1681 End Interface
1682 !--------------------------------- nc_get_varm_uchar --------------------------
1683 Interface
1684  Function nc_get_varm_uchar(ncid, varid, startp, countp, stridep, imapp, ip) &
1685  bind(c)
1687  USE iso_c_binding, ONLY: c_int, c_ptr
1688  USE netcdf_nc_data, ONLY: cint1
1689 
1690  Integer(C_INT), VALUE :: ncid, varid
1691  Type(c_ptr), VALUE :: startp, countp, stridep, imapp
1692  Integer(CINT1), Intent(OUT) :: ip(*)
1693 
1694  Integer(C_INT) :: nc_get_varm_uchar
1695 
1696  End Function nc_get_varm_uchar
1697 End Interface
1698 !--------------------------------- nc_put_varm_schar --------------------------
1699 Interface
1700  Function nc_put_varm_schar(ncid, varid, startp, countp, stridep, imapp, op) &
1701  bind(c)
1703  USE iso_c_binding, ONLY: c_int, c_ptr
1704  USE netcdf_nc_data, ONLY: cint1
1705 
1706  Integer(C_INT), VALUE :: ncid, varid
1707  Type(c_ptr), VALUE :: startp, countp, stridep, imapp
1708  Integer(CINT1), Intent(IN) :: op(*)
1709 
1710  Integer(C_INT) :: nc_put_varm_schar
1711 
1712  End Function nc_put_varm_schar
1713 End Interface
1714 !--------------------------------- nc_get_varm_schar --------------------------
1715 Interface
1716  Function nc_get_varm_schar(ncid, varid, startp, countp, stridep, imapp, ip) &
1717  bind(c)
1719  USE iso_c_binding, ONLY: c_int, c_ptr
1720  USE netcdf_nc_data, ONLY: cint1
1721 
1722  Integer(C_INT), VALUE :: ncid, varid
1723  Type(c_ptr), VALUE :: startp, countp, stridep, imapp
1724  Integer(CINT1), Intent(OUT) :: ip(*)
1725 
1726  Integer(C_INT) :: nc_get_varm_schar
1727 
1728  End Function nc_get_varm_schar
1729 End Interface
1730 !--------------------------------- nc_put_varm_short --------------------------
1731 Interface
1732  Function nc_put_varm_short(ncid, varid, startp, countp, stridep, imapp, op) &
1733  bind(c)
1735  USE iso_c_binding, ONLY: c_int, c_ptr
1736  USE netcdf_nc_data, ONLY: cint2
1737 
1738  Integer(C_INT), VALUE :: ncid, varid
1739  Type(c_ptr), VALUE :: startp, countp, stridep, imapp
1740  Integer(CINT2), Intent(IN) :: op(*)
1741 
1742  Integer(C_INT) :: nc_put_varm_short
1743 
1744  End Function nc_put_varm_short
1745 End Interface
1746 !--------------------------------- nc_get_varm_short --------------------------
1747 Interface
1748  Function nc_get_varm_short(ncid, varid, startp, countp, stridep, imapp, ip) &
1749  bind(c)
1751  USE iso_c_binding, ONLY: c_int, c_ptr
1752  USE netcdf_nc_data, ONLY: cint2
1753 
1754  Integer(C_INT), VALUE :: ncid, varid
1755  Type(c_ptr), VALUE :: startp, countp, stridep, imapp
1756  Integer(CINT2), Intent(OUT) :: ip(*)
1757 
1758  Integer(C_INT) :: nc_get_varm_short
1759 
1760  End Function nc_get_varm_short
1761 End Interface
1762 !--------------------------------- nc_put_varm_int ----------------------------
1763 Interface
1764  Function nc_put_varm_int(ncid, varid, startp, countp, stridep, imapp, op) &
1765  bind(c)
1767  USE iso_c_binding, ONLY: c_int, c_ptr
1768  USE netcdf_nc_data, ONLY: cint
1769 
1770  Integer(C_INT), VALUE :: ncid, varid
1771  Type(c_ptr), VALUE :: startp, countp, stridep, imapp
1772  Integer(CINT), Intent(IN) :: op(*)
1773 
1774  Integer(C_INT) :: nc_put_varm_int
1775 
1776  End Function nc_put_varm_int
1777 End Interface
1778 !--------------------------------- nc_get_varm_int ----------------------------
1779 Interface
1780  Function nc_get_varm_int(ncid, varid, startp, countp, stridep, imapp, ip) &
1781  bind(c)
1783  USE iso_c_binding, ONLY: c_int, c_ptr
1784  USE netcdf_nc_data, ONLY: cint
1785 
1786  Integer(C_INT), VALUE :: ncid, varid
1787  Type(c_ptr), VALUE :: startp, countp, stridep, imapp
1788  Integer(CINT), Intent(OUT) :: ip(*)
1789 
1790  Integer(C_INT) :: nc_get_varm_int
1791 
1792  End Function nc_get_varm_int
1793 End Interface
1794 !--------------------------------- nc_put_varm_long ---------------------------
1795 Interface
1796  Function nc_put_varm_long(ncid, varid, startp, countp, stridep, imapp, op) &
1797  bind(c)
1799  USE iso_c_binding, ONLY: c_int, c_long, c_ptr
1800 
1801  Integer(C_INT), VALUE :: ncid, varid
1802  Type(c_ptr), VALUE :: startp, countp, stridep, imapp
1803  Integer(C_LONG), Intent(IN) :: op(*)
1804 
1805  Integer(C_INT) :: nc_put_varm_long
1806 
1807  End Function nc_put_varm_long
1808 End Interface
1809 !--------------------------------- nc_get_varm_long ---------------------------
1810 Interface
1811  Function nc_get_varm_long(ncid, varid, startp, countp, stridep, imapp, ip) &
1812  bind(c)
1814  USE iso_c_binding, ONLY: c_int, c_long, c_ptr
1815 
1816  Integer(C_INT), VALUE :: ncid, varid
1817  Type(c_ptr), VALUE :: startp, countp, stridep, imapp
1818  Integer(C_LONG), Intent(OUT) :: ip(*)
1819 
1820  Integer(C_INT) :: nc_get_varm_long
1821 
1822  End Function nc_get_varm_long
1823 End Interface
1824 !--------------------------------- nc_put_varm_float --------------------------
1825 Interface
1826  Function nc_put_varm_float(ncid, varid, startp, countp, stridep, imapp, op) &
1827  bind(c)
1829  USE iso_c_binding, ONLY: c_int, c_float, c_ptr
1830 
1831  Integer(C_INT), VALUE :: ncid, varid
1832  Type(c_ptr), VALUE :: startp, countp, stridep, imapp
1833  Real(C_FLOAT), Intent(IN) :: op(*)
1834 
1835  Integer(C_INT) :: nc_put_varm_float
1836 
1837  End Function nc_put_varm_float
1838 End Interface
1839 !--------------------------------- nc_get_varm_float --------------------------
1840 Interface
1841  Function nc_get_varm_float(ncid, varid, startp, countp, stridep, imapp, ip) &
1842  bind(c)
1844  USE iso_c_binding, ONLY: c_int, c_float, c_ptr
1845 
1846  Integer(C_INT), VALUE :: ncid, varid
1847  Type(c_ptr), VALUE :: startp, countp, stridep, imapp
1848  Real(C_FLOAT), Intent(OUT) :: ip(*)
1849 
1850  Integer(C_INT) :: nc_get_varm_float
1851 
1852  End Function nc_get_varm_float
1853 End Interface
1854 !--------------------------------- nc_put_varm_double -------------------------
1855 Interface
1856  Function nc_put_varm_double(ncid, varid, startp, countp, stridep,imapp, op) &
1857  bind(c)
1859  USE iso_c_binding, ONLY: c_int, c_double, c_ptr
1860 
1861  Integer(C_INT), VALUE :: ncid, varid
1862  Type(c_ptr), VALUE :: startp, countp, stridep, imapp
1863  Real(C_DOUBLE), Intent(IN) :: op(*)
1864 
1865  Integer(C_INT) :: nc_put_varm_double
1866 
1867  End Function nc_put_varm_double
1868 End Interface
1869 !--------------------------------- nc_get_varm_double -------------------------
1870 Interface
1871  Function nc_get_varm_double(ncid, varid, startp, countp, stridep,imapp, ip) &
1872  bind(c)
1874  USE iso_c_binding, ONLY: c_int, c_double, c_ptr
1875 
1876  Integer(C_INT), VALUE :: ncid, varid
1877  Type(c_ptr), VALUE :: startp, countp, stridep, imapp
1878  Real(C_DOUBLE), Intent(OUT) :: ip(*)
1879 
1880  Integer(C_INT) :: nc_get_varm_double
1881 
1882  End Function nc_get_varm_double
1883 End Interface
1884 !--------------------------------- nc_inq_att --------------------------------
1885 Interface
1886  Function nc_inq_att(ncid, varid, name, xtypep, lenp) bind(C)
1888  USE iso_c_binding, ONLY: c_int, c_size_t, c_char
1889 
1890  Integer(C_INT), VALUE :: ncid, varid
1891  Character(KIND=C_CHAR), Intent(IN) :: name(*)
1892  Integer(C_INT), Intent(OUT) :: xtypep
1893  Integer(C_SIZE_T), Intent(OUT) :: lenp
1894 
1895  Integer(C_INT) :: nc_inq_att
1896 
1897  End Function nc_inq_att
1898 End Interface
1899 !--------------------------------- nc_inq_attid ------------------------------
1900 Interface
1901  Function nc_inq_attid(ncid, varid, name, attnump) bind(C)
1903  USE iso_c_binding, ONLY: c_int, c_char
1904 
1905  Integer(C_INT), VALUE :: ncid, varid
1906  Character(KIND=C_CHAR), Intent(IN) :: name(*)
1907  Integer(C_INT), Intent(OUT) :: attnump
1908 
1909  Integer(C_INT) :: nc_inq_attid
1910 
1911  End Function nc_inq_attid
1912 End Interface
1913 !--------------------------------- nc_inq_atttype ----------------------------
1914 Interface
1915  Function nc_inq_atttype(ncid, varid, name, xtypep) bind(C)
1917  USE iso_c_binding, ONLY: c_int, c_char
1918 
1919  Integer(C_INT), VALUE :: ncid, varid
1920  Character(KIND=C_CHAR), Intent(IN) :: name(*)
1921  Integer(C_INT), Intent(OUT) :: xtypep
1922 
1923  Integer(C_INT) :: nc_inq_atttype
1924 
1925  End Function nc_inq_atttype
1926 End Interface
1927 !--------------------------------- nc_inq_attlen -----------------------------
1928 Interface
1929  Function nc_inq_attlen(ncid, varid, name, lenp) bind(C)
1931  USE iso_c_binding, ONLY: c_int, c_size_t, c_char
1932 
1933  Integer(C_INT), VALUE :: ncid, varid
1934  Character(KIND=C_CHAR), Intent(IN) :: name(*)
1935  Integer(C_SIZE_T), Intent(OUT) :: lenp
1936 
1937  Integer(C_INT) :: nc_inq_attlen
1938 
1939  End Function nc_inq_attlen
1940 End Interface
1941 !--------------------------------- nc_inq_attname ----------------------------
1942 Interface
1943  Function nc_inq_attname(ncid, varid, attnum, name) bind(C)
1945  USE iso_c_binding, ONLY: c_int, c_char
1946 
1947  Integer(C_INT), VALUE :: ncid, varid, attnum
1948  Character(KIND=C_CHAR), Intent(INOUT) :: name(*)
1949 
1950  Integer(C_INT) :: nc_inq_attname
1951 
1952  End Function nc_inq_attname
1953 End Interface
1954 !--------------------------------- nc_copy_att -------------------------------
1955 Interface
1956  Function nc_copy_att(ncid_in, varid_in, name, ncid_out, varid_out ) bind(C)
1958  USE iso_c_binding, ONLY: c_int, c_char
1959 
1960  Integer(C_INT), VALUE :: ncid_in, varid_in, varid_out, &
1961  ncid_out
1962  Character(KIND=C_CHAR), Intent(IN) :: name(*)
1963 
1964  Integer(C_INT) :: nc_copy_att
1965 
1966  End Function nc_copy_att
1967 End Interface
1968 !--------------------------------- nc_rename_att -----------------------------
1969 Interface
1970  Function nc_rename_att(ncid, varid, name, newname) bind(C)
1972  USE iso_c_binding, ONLY: c_int, c_char
1973 
1974  Integer(C_INT), VALUE :: ncid, varid
1975  Character(KIND=C_CHAR), Intent(IN) :: name(*), newname(*)
1976 
1977  Integer(C_INT) :: nc_rename_att
1978 
1979  End Function nc_rename_att
1980 End Interface
1981 !--------------------------------- nc_del_att --------------------------------
1982 Interface
1983  Function nc_del_att(ncid, varid, name) bind(C)
1985  USE iso_c_binding, ONLY: c_int, c_char
1986 
1987  Integer(C_INT), VALUE :: ncid, varid
1988  Character(KIND=C_CHAR), Intent(IN) :: name(*)
1989 
1990  Integer(C_INT) :: nc_del_att
1991 
1992  End Function nc_del_att
1993 End Interface
1994 !--------------------------------- nc_put_att_text ---------------------------
1995 Interface
1996  Function nc_put_att_text(ncid, varid, name, nlen, op) bind(C)
1998  USE iso_c_binding, ONLY: c_int, c_size_t, c_char
1999 
2000  Integer(C_INT), VALUE :: ncid, varid
2001  Integer(C_SIZE_T), VALUE :: nlen
2002  Character(KIND=C_CHAR), Intent(IN) :: name(*)
2003  Character(KIND=C_CHAR), Intent(IN) :: op(*)
2004 
2005  Integer(C_INT) :: nc_put_att_text
2006 
2007  End Function nc_put_att_text
2008 End Interface
2009 !--------------------------------- nc_get_att_text ---------------------------
2010 Interface
2011  Function nc_get_att_text(ncid, varid, name, ip) bind(C)
2013  USE iso_c_binding, ONLY: c_int, c_char
2014 
2015  Integer(C_INT), VALUE :: ncid, varid
2016  Character(KIND=C_CHAR), Intent(IN) :: name(*)
2017  Character(KIND=C_CHAR), Intent(OUT) :: ip(*)
2018 
2019  Integer(C_INT ) :: nc_get_att_text
2020 
2021  End Function nc_get_att_text
2022 End Interface
2023 !--------------------------------- nc_put_att_uchar --------------------------
2024 Interface
2025  Function nc_put_att_uchar(ncid, varid, name, xtype, nlen, op) bind(C)
2027  USE iso_c_binding, ONLY: c_int, c_size_t, c_char
2028  USE netcdf_nc_data, ONLY: cint1
2029 
2030  Integer(C_INT), VALUE :: ncid, varid
2031  Integer(C_SIZE_T), VALUE :: nlen
2032  Integer(C_INT), VALUE :: xtype
2033  Character(KIND=C_CHAR), Intent(IN) :: name(*)
2034  Integer(CINT1), Intent(IN) :: op(*)
2035 
2036  Integer(C_INT) :: nc_put_att_uchar
2037 
2038  End Function nc_put_att_uchar
2039 End Interface
2040 !--------------------------------- nc_get_att_uchar --------------------------
2041 Interface
2042  Function nc_get_att_uchar(ncid, varid, name, ip) bind(C)
2044  USE iso_c_binding, ONLY: c_int, c_char
2045  USE netcdf_nc_data, ONLY: cint1
2046 
2047  Integer(C_INT), VALUE :: ncid, varid
2048  Character(KIND=C_CHAR), Intent(IN) :: name(*)
2049  Integer(CINT1), Intent(OUT) :: ip(*)
2050 
2051  Integer(C_INT) :: nc_get_att_uchar
2052 
2053  End Function nc_get_att_uchar
2054 End Interface
2055 !--------------------------------- nc_put_att_schar --------------------------
2056 Interface
2057  Function nc_put_att_schar(ncid, varid, name, xtype, nlen, op) bind(C)
2059  USE iso_c_binding, ONLY: c_int, c_size_t, c_char
2060  USE netcdf_nc_data, ONLY: cint1
2061 
2062  Integer(C_INT), VALUE :: ncid, varid
2063  Integer(C_SIZE_T), VALUE :: nlen
2064  Integer(C_INT), VALUE :: xtype
2065  Character(KIND=C_CHAR), Intent(IN) :: name(*)
2066  Integer(CINT1), Intent(IN) :: op(*)
2067 
2068  Integer(C_INT) :: nc_put_att_schar
2069 
2070  End Function nc_put_att_schar
2071 End Interface
2072 !--------------------------------- nc_get_att_schar --------------------------
2073 Interface
2074  Function nc_get_att_schar(ncid, varid, name, ip) bind(C)
2076  USE iso_c_binding, ONLY: c_int, c_char
2077  USE netcdf_nc_data, ONLY: cint1
2078 
2079  Integer(C_INT), VALUE :: ncid, varid
2080  Character(KIND=C_CHAR), Intent(IN) :: name(*)
2081  Integer(CINT1), Intent(OUT) :: ip(*)
2082 
2083  Integer(C_INT) :: nc_get_att_schar
2084 
2085  End Function nc_get_att_schar
2086 End Interface
2087 !--------------------------------- nc_put_att_short --------------------------
2088 Interface
2089  Function nc_put_att_short(ncid, varid, name, xtype, nlen, op) bind(C)
2091  USE iso_c_binding, ONLY: c_int, c_size_t, c_char
2092  USE netcdf_nc_data, ONLY: cint2
2093 
2094  Integer(C_INT), VALUE :: ncid, varid
2095  Integer(C_SIZE_T), VALUE :: nlen
2096  Integer(C_INT), VALUE :: xtype
2097  Character(KIND=C_CHAR), Intent(IN) :: name(*)
2098  Integer(CINT2), Intent(IN) :: op(*)
2099 
2100  Integer(C_INT) :: nc_put_att_short
2101 
2102  End Function nc_put_att_short
2103 End Interface
2104 !--------------------------------- nc_get_att_short --------------------------
2105 Interface
2106  Function nc_get_att_short(ncid, varid, name, ip) bind(C)
2108  USE iso_c_binding, ONLY: c_int, c_char
2109  USE netcdf_nc_data, ONLY: cint2
2110 
2111  Integer(C_INT), VALUE :: ncid, varid
2112  Character(KIND=C_CHAR), Intent(IN) :: name(*)
2113  Integer(CINT2), Intent(OUT) :: ip(*)
2114 
2115  Integer(C_INT) :: nc_get_att_short
2116 
2117  End Function nc_get_att_short
2118 End Interface
2119 !--------------------------------- nc_put_att_int --------------------------
2120 Interface
2121  Function nc_put_att_int(ncid, varid, name, xtype, nlen, op) bind(C)
2123  USE iso_c_binding, ONLY: c_int, c_size_t, c_char
2124 
2125  Integer(C_INT), VALUE :: ncid, varid
2126  Integer(C_SIZE_T), VALUE :: nlen
2127  Integer(C_INT), VALUE :: xtype
2128  Character(KIND=C_CHAR), Intent(IN) :: name(*)
2129  Integer(C_INT), Intent(IN) :: op(*)
2130 
2131  Integer(C_INT) :: nc_put_att_int
2132 
2133  End Function nc_put_att_int
2134 End Interface
2135 !--------------------------------- nc_get_att_int -----------------------------
2136 Interface
2137  Function nc_get_att_int(ncid, varid, name, ip) bind(C)
2139  USE iso_c_binding, ONLY: c_int, c_char
2140 
2141  Integer(C_INT), VALUE :: ncid, varid
2142  Character(KIND=C_CHAR), Intent(IN) :: name(*)
2143  Integer(C_INT), Intent(OUT) :: ip(*)
2144 
2145  Integer(C_INT) :: nc_get_att_int
2146 
2147  End Function nc_get_att_int
2148 End Interface
2149 !--------------------------------- nc_put_att_long --------------------------
2150 Interface
2151  Function nc_put_att_long(ncid, varid, name, xtype, nlen, op) bind(C)
2153  USE iso_c_binding, ONLY: c_int, c_size_t, c_long, c_char
2154 
2155  Integer(C_INT), VALUE :: ncid, varid
2156  Integer(C_SIZE_T), VALUE :: nlen
2157  Integer(C_INT), VALUE :: xtype
2158  Character(KIND=C_CHAR), Intent(IN) :: name(*)
2159  Integer(C_LONG), Intent(IN) :: op(*)
2160 
2161  Integer(C_INT) :: nc_put_att_long
2162 
2163  End Function nc_put_att_long
2164 End Interface
2165 !--------------------------------- nc_get_att_long --------------------------
2166 Interface
2167  Function nc_get_att_long(ncid, varid, name, ip) bind(C)
2169  USE iso_c_binding, ONLY: c_int, c_long, c_char
2170 
2171  Integer(C_INT), VALUE :: ncid, varid
2172  Character(KIND=C_CHAR), Intent(IN) :: name(*)
2173  Integer(C_LONG), Intent(OUT) :: ip(*)
2174 
2175  Integer(C_INT) :: nc_get_att_long
2176 
2177  End Function nc_get_att_long
2178 End Interface
2179 !--------------------------------- nc_put_att_float --------------------------
2180 Interface
2181  Function nc_put_att_float(ncid, varid, name, xtype, nlen, op) bind(C)
2183  USE iso_c_binding, ONLY: c_int, c_size_t, c_float, c_char
2184 
2185  Integer(C_INT), VALUE :: ncid, varid
2186  Integer(C_SIZE_T), VALUE :: nlen
2187  Integer(C_INT), VALUE :: xtype
2188  Character(KIND=C_CHAR), Intent(IN) :: name(*)
2189  Real(C_FLOAT), Intent(IN) :: op(*)
2190 
2191  Integer(C_INT) :: nc_put_att_float
2192 
2193  End Function nc_put_att_float
2194 End Interface
2195 !--------------------------------- nc_get_att_float --------------------------
2196 Interface
2197  Function nc_get_att_float(ncid, varid, name, ip) bind(C)
2199  USE iso_c_binding, ONLY: c_int, c_float, c_char
2200 
2201  Integer(C_INT), VALUE :: ncid, varid
2202  Character(KIND=C_CHAR), Intent(IN) :: name(*)
2203  Real(C_FLOAT), Intent(OUT) :: ip(*)
2204 
2205  Integer(C_INT) :: nc_get_att_float
2206 
2207  End Function nc_get_att_float
2208 End Interface
2209 !--------------------------------- nc_put_att_double -------------------------
2210 Interface
2211  Function nc_put_att_double(ncid, varid, name, xtype, nlen, op) bind(C)
2213  USE iso_c_binding, ONLY: c_int, c_size_t, c_double, c_char
2214 
2215  Integer(C_INT), VALUE :: ncid, varid
2216  Integer(C_SIZE_T), VALUE :: nlen
2217  Integer(C_INT), VALUE :: xtype
2218  Character(KIND=C_CHAR), Intent(IN) :: name(*)
2219  Real(C_DOUBLE), Intent(IN) :: op(*)
2220 
2221  Integer(C_INT) :: nc_put_att_double
2222 
2223  End Function nc_put_att_double
2224 End Interface
2225 !------------------------------- nc_get_att_double -------------------------
2226 Interface
2227  Function nc_get_att_double(ncid, varid, name, ip) bind(C)
2229  USE iso_c_binding, ONLY: c_int, c_double, c_char
2230 
2231  Integer(C_INT), VALUE :: ncid, varid
2232  Character(KIND=C_CHAR), Intent(IN) :: name(*)
2233  Real(C_DOUBLE), Intent(OUT) :: ip(*)
2234 
2235  Integer(C_INT) :: nc_get_att_double
2236 
2237  End Function nc_get_att_double
2238 End Interface
2239 !------------------------------- nc_copy_var --------------------------------
2240 Interface
2241  Function nc_copy_var(ncid_in, varid, ncid_out) bind(C)
2243  USE iso_c_binding, ONLY: c_int
2244 
2245  Integer(C_INT), VALUE :: ncid_in, varid, ncid_out
2246 
2247  Integer(C_INT) :: nc_copy_var
2248 
2249  End Function nc_copy_var
2250 End Interface
2251 !------------------------------- nc_set_default_format -----------------------
2252 Interface
2253  Function nc_set_default_format(newform, old_format) bind(C)
2255  USE iso_c_binding, ONLY: c_int
2256 
2257  Integer(C_INT), VALUE :: newform
2258  Integer(C_INT), Intent(OUT) :: old_format
2259 
2260  Integer(C_INT) :: nc_set_default_format
2261 
2262  End Function nc_set_default_format
2263 End Interface
2264 !---------------------------- Start of module procedures ---------------------
2265 CONTAINS
2266 
2267 ! Utilities to support C interface routines
2268 
2269 !----------------------------------- addCNullChar -----------------------------
2270  Function addcnullchar(string, nlen) Result(cstring)
2272 ! Add a C_NULL_CHAR to a string to create a C compatible
2273 ! string. Assumes target variable will be of length
2274 ! LEN(string)+1. Trailing blanks will be stripped
2275 ! from string and length of trimmed string will
2276 ! be returned in nlen.
2277 
2278 ! USE ISO_C_BINDING
2279 
2280  Implicit NONE
2281 
2282  Character(LEN=*), Intent(IN) :: string
2283  Integer, Intent(INOUT) :: nlen
2284 
2285  Character(LEN=(LEN(string)+1)) :: cstring
2286 
2287  Integer :: inull
2288 
2289 
2290 ! first check to see if we already have a C NULL char attached
2291 ! to string and strip trailing blanks. We will use it if its present
2292 ! otherwise we add one. The length of the trimmed string plus the
2293 ! C_NULL_CHAR is returned in nlen
2294 
2295  nlen = len_trim(string)
2296  inull = scan(string, c_null_char)
2297 
2298  cstring = repeat(" ", len(cstring)) ! init to blanks
2299 
2300  If (inull > 0) Then ! string has a NULL char
2301  nlen = inull
2302  cstring = string(1:nlen)
2303 
2304  Else ! append null char to trimmed string
2305 
2306  cstring = string(1:nlen)//c_null_char
2307  nlen = nlen + 1
2308  Endif
2309 
2310  End Function addcnullchar
2311 !----------------------------------- stripCNullChar ----------------------------
2312  Function stripcnullchar(cstring, nlen) Result(string)
2314 ! Check cstring for a C NULL char, strip it off and
2315 ! return regular string. Limit length of cstring loaded
2316 ! into string to nlen
2317 
2318 ! USE ISO_C_BINDING, ONLY: C_NULL_CHAR
2319 
2320  Implicit NONE
2321 
2322  Character(LEN=*), Intent(IN) :: cstring
2323  Integer, Intent(IN) :: nlen
2324 
2325  Character(LEN=nlen) :: string
2326 
2327  Integer :: ie, inull
2328 
2329  ie = len_trim(cstring)
2330  inull = scan(cstring, c_null_char)
2331 
2332  If (inull > 1) ie=inull-1
2333  ie = max(1, min(ie,nlen)) ! limit ie to 1 or nlen
2334 
2335  string = repeat(" ", nlen)
2336  string(1:ie) = cstring(1:ie)
2337 
2338  End Function stripcnullchar
2339 
2340 !----------------------------End of Module netcdf_c_interfaces ----------------
2341 End Module netcdf_nc_interfaces
integer, parameter cint2
integer, parameter cint
module procedure interfaces for utility routines
Begin explicit interfaces for base nc_ functions.
integer, parameter cint1

Return to the Main Unidata NetCDF page.
Generated on Tue Jul 17 2018 12:21:03 for NetCDF-Fortran. NetCDF is a Unidata library.