NetCDF-Fortran  4.4.4
module_netcdf4_nf_interfaces.F90
Go to the documentation of this file.
2 
3 ! Explicit interfaces for Netcdf4 FORTRAN 2003 nf FORTRAN interface routines
4 
5 ! We exclude functions for netCDF4 that pass data of any type to/from void
6 ! pointers in C using a C_CHAR string array. We do provide external statements
7 ! for these routines
8 
9 ! Written by: Richard Weed, Ph.D.
10 ! Center for Advanced Vehicular Systems
11 ! Mississippi State University
12 ! rweed@cavs.msstate.edu
13 !
14 ! The author grants to the University Center for Atmospheric Research
15 ! (UCAR), Boulder, CO, USA the right to revise and extend the software
16 ! without restriction. However, the author retains all copyrights and
17 ! intellectual property rights explicitly stated in or implied by the
18 ! Apache license
19 
20 ! Version 1. April 2009 - Initial module based on netCDF 4.0.1 interfaces
21 ! A separate module is required to avoid a
22 ! module dependency problem
23 ! Version 2. April 2010 - Updated to Netcdf 4.1.1
24 ! Version 3. Aug. 2013 - Made nf_def_var_fill and nf_inq_var_fill external
25 ! to support new nf90_ non-integer fill characters
26 ! Added interface for new nf_rename_grp function
27 ! Changed interface type defs to USE netcdf_nf_data
28 ! Version 4. Jan. 2016 General code cleanup
29 
30 ! Most legacy programs don't need to use this module. However, I've created
31 ! it to support FORTRAN programmers who like to provide explicit interfaces
32 ! for all subroutines and functions in their codes. Therefore, this module is
33 ! is primarily for people writing new programs.
34 
35 ! Explicit interfaces to netCDF 4 specific FORTRAN functions
36 
37 !-------------------------------- nf_create_par -------------------------------
38 Interface
39  Function nf_create_par (path, cmode, comm, info, ncid) RESULT(status)
40 
41  Integer, Intent(IN) :: cmode, comm, info
42  Character(LEN=*), Intent(IN) :: path
43  Integer, Intent(OUT) :: ncid
44  Integer :: status
45 
46  End Function nf_create_par
47 End Interface
48 !-------------------------------- nf_open_par --------------------------------
49 Interface
50  Function nf_open_par (path, mode, comm, info, ncid) RESULT(status)
51 
52  Integer, Intent(IN) :: mode, comm, info
53  Character(LEN=*), Intent(IN) :: path
54  Integer, Intent(OUT) :: ncid
55  Integer :: status
56 
57  End Function nf_open_par
58 End Interface
59 !-------------------------------- nf_var_par_access -------------------------
60 Interface
61  Function nf_var_par_access( ncid, varid, iaccess) RESULT (status)
62 
63  Integer, Intent(IN) :: ncid, varid, iaccess
64  Integer :: status
65 
66  End Function nf_var_par_access
67 End Interface
68 !-------------------------------- nf_inq_ncid ---------------------------------
69 Interface
70  Function nf_inq_ncid( ncid, name, groupid) RESULT (status)
71 
72  Integer, Intent(IN) :: ncid
73  Character(LEN=*), Intent(IN) :: name
74  Integer, Intent(OUT) :: groupid
75  Integer :: status
76 
77  End Function nf_inq_ncid
78 End Interface
79 !-------------------------------- nf_inq_grps ---------------------------------
80 Interface
81  Function nf_inq_grps( ncid, numgrps, ncids) RESULT (status)
82 
83  Integer, Intent(IN) :: ncid
84  Integer, Intent(OUT) :: numgrps
85  Integer, Intent(INOUT) :: ncids(*)
86  Integer :: status
87 
88  End Function nf_inq_grps
89 End Interface
90 !-------------------------------- nf_inq_grpname ------------------------------
91 Interface
92  Function nf_inq_grpname( ncid, name) RESULT (status)
93 
94  Integer, Intent(IN) :: ncid
95  Character(LEN=*), Intent(OUT) :: name
96  Integer :: status
97 
98  End Function nf_inq_grpname
99 End Interface
100 !-------------------------------- nf_inq_grpname_full -------------------------
101 Interface
102  Function nf_inq_grpname_full( ncid, nlen, name) RESULT (status)
104  Integer, Intent(IN) :: ncid
105  Integer, Intent(OUT) :: nlen
106  Character(LEN=*), Intent(OUT) :: name
107  Integer :: status
108 
109  End Function nf_inq_grpname_full
110 End Interface
111 !-------------------------------- nf_inq_grpname_len -------------------------
112 Interface
113  Function nf_inq_grpname_len( ncid, nlen) RESULT (status)
115  Integer, Intent(IN) :: ncid
116  Integer, Intent(OUT) :: nlen
117  Integer :: status
118 
119  End Function nf_inq_grpname_len
120 End Interface
121 !-------------------------------- nf_inq_grp_parent ---------------------------
122 Interface
123  Function nf_inq_grp_parent( ncid,parent_ncid) RESULT (status)
125  Integer, Intent(IN) :: ncid
126  Integer, Intent(INOUT) :: parent_ncid
127  Integer :: status
128 
129  End Function nf_inq_grp_parent
130 End Interface
131 !-------------------------------- nf_inq_grp_full_ncid ------------------------
132 Interface
133  Function nf_inq_grp_full_ncid( ncid, grp_name, grp_ncid) RESULT (status)
135  Integer, Intent(IN) :: ncid
136  Character(LEN=*), Intent(IN) :: grp_name
137  Integer, Intent(INOUT) :: grp_ncid
138  Integer :: status
139 
140  End Function nf_inq_grp_full_ncid
141 End Interface
142 !-------------------------------- nf_inq_grp_ncid -----------------------------
143 Interface
144  Function nf_inq_grp_ncid( ncid, grp_name, parent_ncid) RESULT (status)
146  Integer, Intent(IN) :: ncid
147  Character(LEN=*), Intent(IN) :: grp_name
148  Integer, Intent(INOUT) :: parent_ncid
149  Integer :: status
150 
151  End Function nf_inq_grp_ncid
152 End Interface
153 !-------------------------------- nf_inq_varids -------------------------------
154 Interface
155  Function nf_inq_varids( ncid, nvars, varids) RESULT (status)
157  Integer, Intent(IN) :: ncid
158  Integer, Intent(OUT) :: nvars
159  Integer, Intent(INOUT) :: varids(*)
160  Integer :: status
161 
162  End Function nf_inq_varids
163 End Interface
164 !-------------------------------- nf_inq_dimids -------------------------------
165 Interface
166  Function nf_inq_dimids( ncid, ndims, dimids, include_parents) RESULT (status)
168  Integer, Intent(IN) :: ncid, include_parents
169  Integer, Intent(OUT) :: ndims
170  Integer, Intent(INOUT) :: dimids(*)
171  Integer :: status
172 
173  End Function nf_inq_dimids
174 End Interface
175 !-------------------------------- nf_inq_typeids ------------------------------
176 Interface
177  Function nf_inq_typeids( ncid, ntypes, typeids) RESULT (status)
179  Integer, Intent(IN) :: ncid
180  Integer, Intent(OUT) :: ntypes
181  Integer, Intent(INOUT) :: typeids(*)
182  Integer :: status
183 
184  End Function nf_inq_typeids
185 End Interface
186 !-------------------------------- nf_inq_typeid ------------------------------
187 Interface
188  Function nf_inq_typeid(ncid, name, typeid) RESULT (status)
190  Integer, Intent(IN) :: ncid
191  Character(LEN=*), Intent(IN) :: name
192  Integer, Intent(OUT) :: typeid
193  Integer :: status
194 
195  End Function nf_inq_typeid
196 End Interface
197 !-------------------------------- nf_def_grp ---------------------------------
198 Interface
199  Function nf_def_grp( parent_ncid, name, new_ncid) RESULT (status)
201  Integer, Intent(IN) :: parent_ncid
202  Character(LEN=*), Intent(IN) :: name
203  Integer, Intent(OUT) :: new_ncid
204  Integer :: status
205 
206  End Function nf_def_grp
207 End Interface
208 !-------------------------------- nf_rename_grp -------------------------------
209 Interface
210  Function nf_rename_grp( grpid, name) RESULT (status)
212 ! rename previously defined group
213 
215 
216  Implicit NONE
217 
218  Integer, Intent(IN) :: grpid
219  Character(LEN=*), Intent(IN) :: name
220  Integer :: status
221 
222  End Function nf_rename_grp
223 End Interface
224 !-------------------------------- nf_def_compound -----------------------------
225 Interface
226  Function nf_def_compound( ncid, isize, name, typeid) RESULT (status)
228  Integer, Intent(IN) :: ncid, isize
229  Character(LEN=*), Intent(IN) :: name
230  Integer, Intent(OUT) :: typeid
231  Integer :: status
232 
233  End Function nf_def_compound
234 End Interface
235 !-------------------------------- nf_insert_compound --------------------------
236 Interface
237  Function nf_insert_compound( ncid, xtype, name, offset, field_typeid) &
238  result(status)
239 
240  Integer, Intent(IN) :: ncid, xtype, field_typeid, offset
241  Character(LEN=*), Intent(IN) :: name
242  Integer :: status
243 
244  End Function nf_insert_compound
245 End Interface
246 !-------------------------------- nf_insert_array_compound --------------------
247 Interface
248  Function nf_insert_array_compound( ncid, xtype, name, offset, field_typeid, &
249  ndims, dim_sizes) RESULT (status)
251  Integer, Intent(IN) :: ncid, xtype, field_typeid, offset, ndims
252  Integer, Intent(INOUT) :: dim_sizes(*)
253  Character(LEN=*), Intent(IN) :: name
254  Integer :: status
255 
256  End Function nf_insert_array_compound
257 End Interface
258 !-------------------------------- nf_inq_type ---------------------------------
259 Interface
260  Function nf_inq_type( ncid, xtype, name, isize) RESULT (status)
262  Integer, Intent(IN) :: ncid, xtype
263  Character(LEN=*), Intent(IN) :: name
264  Integer, Intent(OUT) :: isize
265  Integer :: status
266 
267  End Function nf_inq_type
268 End Interface
269 !-------------------------------- nf_inq_compound -----------------------------
270 Interface
271  Function nf_inq_compound( ncid, xtype, name, isize, nfields) RESULT (status)
273  Integer, Intent(IN) :: ncid, xtype
274  Character(LEN=*), Intent(INOUT) :: name
275  Integer, Intent(INOUT) :: isize, nfields
276  Integer :: status
277 
278  End Function nf_inq_compound
279 End Interface
280 !-------------------------------- nf_inq_compound_name ------------------------
281 Interface
282  Function nf_inq_compound_name( ncid, xtype, name) RESULT (status)
284  Integer, Intent(IN) :: ncid, xtype
285  Character(LEN=*), Intent(OUT) :: name
286  Integer :: status
287 
288  End Function nf_inq_compound_name
289 End Interface
290 !-------------------------------- nf_inq_compound_size -------------------------
291 Interface
292  Function nf_inq_compound_size( ncid, xtype, isize) RESULT (status)
294  Integer, Intent(IN) :: ncid, xtype
295  Integer, Intent(INOUT) :: isize
296  Integer :: status
297 
298  End Function nf_inq_compound_size
299 End Interface
300 !-------------------------------- nf_inq_compound_nfields ----------------------
301 Interface
302  Function nf_inq_compound_nfields( ncid, xtype, nfields) RESULT (status)
304  Integer, Intent(IN) :: ncid, xtype
305  Integer, Intent(INOUT) :: nfields
306  Integer :: status
307 
308  End Function nf_inq_compound_nfields
309 End Interface
310 !-------------------------------- nf_inq_compound_field -----------------------
311 Interface
312  Function nf_inq_compound_field( ncid, xtype, fieldid, name, offset, &
313  field_typeid, ndims, dim_sizes) RESULT (status)
315  Integer, Intent(IN) :: ncid, xtype, fieldid
316  Character(LEN=*), Intent(OUT) :: name
317  Integer, Intent(OUT) :: offset, field_typeid, ndims
318  Integer, Intent(OUT) :: dim_sizes(*)
319  Integer :: status
320 
321  End Function nf_inq_compound_field
322 End Interface
323 !-------------------------------- nf_inq_compound_fieldname -------------------
324 Interface
325  Function nf_inq_compound_fieldname(ncid, xtype, fieldid, name) RESULT(status)
327  Integer, Intent(IN) :: ncid, xtype, fieldid
328  Character(LEN=*), Intent(OUT) :: name
329  Integer :: status
330 
331  End Function nf_inq_compound_fieldname
332 End Interface
333 !-------------------------------- nf_inq_compound_fieldindex ------------------
334 Interface
335  Function nf_inq_compound_fieldindex( ncid, xtype, name, fieldid) &
336  result(status)
337 
338  Integer, Intent(IN) :: ncid, xtype
339  Character(LEN=*), Intent(IN) :: name
340  Integer, Intent(OUT) :: fieldid
341  Integer :: status
342 
343  End Function nf_inq_compound_fieldindex
344 End Interface
345 !-------------------------------- nf_inq_compound_fieldoffset ----------------
346 Interface
347  Function nf_inq_compound_fieldoffset( ncid, xtype, fieldid, offset) &
348  result(status)
349 
350  Integer, Intent(IN) :: ncid, xtype, fieldid
351  Integer, Intent(OUT) :: offset
352  Integer :: status
353 
354  End Function nf_inq_compound_fieldoffset
355 End Interface
356 !-------------------------------- nf_inq_compound_fieldtype -------------------
357 Interface
358  Function nf_inq_compound_fieldtype( ncid, xtype, fieldid, field_typeid) &
359  result(status)
360 
361  Integer, Intent(IN) :: ncid, xtype, fieldid
362  Integer, Intent(OUT) :: field_typeid
363  Integer :: status
364 
365  End Function nf_inq_compound_fieldtype
366 End Interface
367 !-------------------------------- nf_inq_compound_fieldndims ------------------
368 Interface
369  Function nf_inq_compound_fieldndims( ncid, xtype, fieldid, ndims) &
370  result(status)
371 
372  Integer, Intent(IN) :: ncid, xtype, fieldid
373  Integer, Intent(OUT) :: ndims
374  Integer :: status
375 
376  End Function nf_inq_compound_fieldndims
377 End Interface
378 !-------------------------------- nf_inq_compound_fielddim_sizes --------------
379 Interface
380  Function nf_inq_compound_fielddim_sizes( ncid, xtype, fieldid, dim_sizes) &
381  result(status)
382 
383  Integer, Intent(IN) :: ncid, xtype, fieldid
384  Integer, Intent(INOUT) :: dim_sizes(*)
385  Integer :: status
386 
387  End Function nf_inq_compound_fielddim_sizes
388 End Interface
389 !-------------------------------- nf_def_vlen ---------------------------------
390 Interface
391  Function nf_def_vlen( ncid, name, base_typeid, xtype) RESULT (status)
393  Integer, Intent(IN) :: ncid, base_typeid
394  Character(LEN=*), Intent(IN) :: name
395  Integer, Intent(OUT) :: xtype
396  Integer :: status
397 
398  End Function nf_def_vlen
399 End Interface
400 !-------------------------------- nf_inq_vlen ---------------------------------
401 Interface
402  Function nf_inq_vlen( ncid, xtype, name, datum_size, base_type) RESULT(status)
404  Integer, Intent(IN) :: ncid, xtype
405  Character(LEN=*), Intent(OUT) :: name
406  Integer, Intent(OUT) :: datum_size, base_type
407  Integer :: status
408 
409  End Function nf_inq_vlen
410 End Interface
411 !-------------------------------- nf_inq_user_type ----------------------------
412 Interface
413  Function nf_inq_user_type( ncid, xtype, name, isize, base_type, nfields, &
414  iclass) RESULT (status)
416  Integer, Intent(IN) :: ncid, xtype
417  Character(LEN=*), Intent(INOUT) :: name
418  Integer, Intent(OUT) :: isize, nfields, base_type, iclass
419  Integer :: status
420 
421  End Function nf_inq_user_type
422 End Interface
423 !-------------------------------- nf_def_enum ---------------------------------
424 Interface
425  Function nf_def_enum( ncid, base_typeid, name, typeid) RESULT (status)
427  Integer, Intent(IN) :: ncid, base_typeid
428  Character(LEN=*), Intent(IN) :: name
429  Integer, Intent(OUT) :: typeid
430  Integer :: status
431 
432  End Function nf_def_enum
433 End Interface
434 !-------------------------------- nf_insert_enum -------------------------------
435 ! Commented out for now since we pass to/from a void pointer using
436 ! a C_CHAR string which will be non-compatible with different data
437 ! types being passed
438 !Interface
439 ! Function nf_insert_enum( ncid, xtype, name, value) RESULT (status)
440 
441 ! USE netcdf_nf_data
442 
443 ! Integer, Intent(IN) :: ncid, xtype
444 ! Character(LEN=*), Intent(IN) :: name
445 ! Character(KIND=C_CHAR), Intent(IN), TARGET :: value(*)
446 ! Integer :: status
447 
448 ! End Function nf_insert_enum
449 !End Interface
450 !-------------------------------- nf_inq_enum ---------------------------------
451 Interface
452  Function nf_inq_enum( ncid, xtype, name, base_nf_type, base_size, &
453  num_members) RESULT (status)
455 ! USE netcdf_nf_data
456 
457  Integer, Intent(IN) :: ncid, xtype
458  Character(LEN=*), Intent(INOUT) :: name
459  Integer, Intent(INOUT) :: base_nf_type, base_size, num_members
460  Integer :: status
461 
462  End Function nf_inq_enum
463 End Interface
464 !-------------------------------- nf_inq_enum_member --------------------------
465 ! Commented out for now since we pass to/from a void pointer using
466 ! a C_CHAR string which will be non-compatible with different data
467 ! types being passed
468 !Interface
469 ! Function nf_inq_enum_member( ncid, xtype, idx, name, value) RESULT (status)
470 
471 ! USE netcdf_nf_data
472 
473 ! Integer, Intent(IN) :: ncid, xtype, idx
474 ! Character(LEN=*), Intent(OUT) :: name
475 ! Character(KIND=C_CHAR), Intent(OUT) :: value(*)
476 ! Integer :: status
477 
478 ! End Function nf_inq_enum_member
479 !End Interface
480 !-------------------------------- nf_inq_enum_ident --------------------------
481 Interface
482  Function nf_inq_enum_ident( ncid, xtype, value, name) RESULT (status)
484  Integer, Intent(IN) :: ncid, xtype, value
485  Character(LEN=*), Intent(INOUT) :: name
486  Integer :: status
487 
488  End Function nf_inq_enum_ident
489 End Interface
490 !-------------------------------- nf_def_opaque -------------------------------
491 Interface
492  Function nf_def_opaque( ncid, isize, name, xtype) RESULT (status)
494  Integer, Intent(IN) :: ncid, isize
495  Character(LEN=*), Intent(IN) :: name
496  Integer, Intent(OUT) :: xtype
497  Integer :: status
498 
499  End Function nf_def_opaque
500 End Interface
501 !-------------------------------- nf_inq_opaque -------------------------------
502 Interface
503  Function nf_inq_opaque( ncid, xtype, name, isize) RESULT (status)
505  Integer, Intent(IN) :: ncid, xtype
506  Character(LEN=*), Intent(INOUT) :: name
507  Integer, Intent(OUT) :: isize
508  Integer :: status
509 
510  End Function nf_inq_opaque
511 End Interface
512 !-------------------------------- nf_def_var_chunking -------------------------
513 Interface
514  Function nf_def_var_chunking( ncid, varid, contiguous, chunksizes) &
515  result(status)
516 
517  Integer, Intent(IN) :: ncid, varid, contiguous
518  Integer, Intent(INOUT) :: chunksizes(*)
519  Integer :: status
520 
521  End Function nf_def_var_chunking
522 End Interface
523 !-------------------------------- nf_inq_var_chunking -------------------------
524 Interface
525  Function nf_inq_var_chunking( ncid, varid, contiguous, chunksizes) &
526  result(status)
527 
528  Integer, Intent(IN) :: ncid, varid
529  Integer, Intent(INOUT) :: contiguous
530  Integer, Intent(INOUT) :: chunksizes(*)
531  Integer :: status
532 
533  End Function nf_inq_var_chunking
534 End Interface
535 !-------------------------------- nf_def_var_deflate --------------------------
536 Interface
537  Function nf_def_var_deflate( ncid, varid, shuffle, deflate, deflate_level) &
538  result(status)
539 
540  Integer, Intent(IN) :: ncid, varid, shuffle, deflate, deflate_level
541  Integer :: status
542 
543  End Function nf_def_var_deflate
544 End Interface
545 !-------------------------------- nf_inq_var_deflate -------------------------
546 Interface
547  Function nf_inq_var_deflate( ncid, varid, shuffle, deflate, deflate_level) &
548  result(status)
549 
550  Integer, Intent(IN) :: ncid, varid
551  Integer, Intent(OUT) :: shuffle, deflate, deflate_level
552  Integer :: status
553 
554  End Function nf_inq_var_deflate
555 End Interface
556 !-------------------------------- nf_inq_var_szip -----------------------------
557 Interface
558  Function nf_inq_var_szip(ncid, varid, options_mask, pixels_per_block) RESULT(status)
560  Implicit NONE
561 
562  Integer, Intent(IN) :: ncid, varid
563  Integer, Intent(INOUT) :: options_mask, pixels_per_block
564  Integer :: status
565 
566  End Function nf_inq_var_szip
567 End Interface
568 !-------------------------------- nf_def_var_fletcher32 ------------------------
569 Interface
570  Function nf_def_var_fletcher32( ncid, varid, fletcher32) RESULT(status)
572  Integer, Intent(IN) :: ncid, varid, fletcher32
573  Integer :: status
574 
575  End Function nf_def_var_fletcher32
576 End Interface
577 !-------------------------------- nf_inq_var_fletcher32 ------------------------
578 Interface
579  Function nf_inq_var_fletcher32( ncid, varid, fletcher32) RESULT(status)
581  Integer, Intent(IN) :: ncid, varid
582  Integer, Intent(OUT) :: fletcher32
583  Integer :: status
584 
585  End Function nf_inq_var_fletcher32
586 End Interface
587 !-------------------------------- nf_def_var_fill -----------------------------
588 !Interface
589 ! Function nf_def_var_fill( ncid, varid, no_fill, fill_value) RESULT(status)
590 
591 ! Integer, Intent(IN) :: ncid, varid, no_fill
592 ! Integer, Intent(IN) :: fill_value
593 ! Integer :: status
594 
595 ! End Function nf_def_var_fill
596 !End Interface
597 !-------------------------------- nf_inq_var_fill -----------------------------
598 !Interface
599 ! Function nf_inq_var_fill( ncid, varid, no_fill, fill_value) RESULT(status)
600 
601 ! Integer, Intent(IN) :: ncid, varid
602 ! Integer, Intent(OUT) :: no_fill
603 ! Integer, Intent(INOUT) :: fill_value
604 ! Integer :: status
605 
606 ! End Function nf_inq_var_fill
607 !End Interface
608 !-------------------------------- nf_def_var_endian ---------------------------
609 Interface
610  Function nf_def_var_endian( ncid, varid, endiann) RESULT(status)
612  Integer, Intent(IN) :: ncid, varid, endiann
613  Integer :: status
614 
615  End Function nf_def_var_endian
616 End Interface
617 !-------------------------------- nf_inq_var_endian ---------------------------
618 Interface
619  Function nf_inq_var_endian( ncid, varid, endiann) RESULT(status)
621  Integer, Intent(IN) :: ncid, varid
622  Integer, Intent(OUT) :: endiann
623  Integer :: status
624 
625  End Function nf_inq_var_endian
626 End Interface
627 !--------------------------------- nf_put_att --------------------------------
628 ! Commented out because we use C_CHAR array to pass data of different
629 ! type to a C void pointer
630 !Interface
631 ! Function nf_put_att(ncid, varid, name, xtype, nlen, value) RESULT(status)
632 
633 ! USE netcdf_nf_data
634 
635 ! Integer, Intent(IN) :: ncid, varid, nlen, xtype
636 ! Character(LEN=*), Intent(IN) :: name
637 ! Character(KIND=C_CHAR), Intent(IN), TARGET :: value(*)
638 ! Integer :: status
639 
640 ! End Function nf_put_att
641 !--------------------------------- nf_get_att --------------------------------
642 ! Commented out because we use C_CHAR array to pass data of different
643 ! type to a C void pointer
644 !Interface
645 ! Function nf_get_att(ncid, varid, name, value) RESULT(status)
646 
647 ! USE netcdf_nf_data
648 
649 ! Implicit NONE
650 
651 ! Integer, Intent(IN) :: ncid, varid
652 ! Character(LEN=*), Intent(IN) :: name
653 ! Character(KIND=C_CHAR), Intent(INOUT) :: value(*)
654 ! Integer :: status
655 
656 ! End Function nf_get_att
657 !End Interface
658 !--------------------------------- nf_put_vlen_element ------------------------
659 ! Commented out because we use C_CHAR array to pass data of different
660 ! type to a C void pointer
661 !Interface
662 ! Function nf_put_vlen_element(ncid, xtype, vlen_element, nlen, value)&
663 ! RESULT(status)
664 
665 ! USE netcdf_nf_data
666 
667 ! Integer, Intent(IN) :: ncid, xtype, nlen
668 ! Character(LEN=*), Intent(INOUT), TARGET :: vlen_element
669 ! Character(KIND=C_CHAR), Intent(IN), TARGET :: value(*)
670 ! Integer :: status
671 
672 ! End Function nf_put_vlen_element
673 !End Interface
674 !--------------------------------- nf_get_vlen_element ------------------------
675 ! Commented out because we use C_CHAR array to pass data of different
676 ! type to a C void pointer
677 !Interface
678 ! Function nf_get_vlen_element(ncid, xtype, vlen_element, nlen, value) &
679 ! RESULT(status)
680 
681 ! USE netcdf_nf_data
682 
683 ! Implicit NONE
684 
685 ! Integer, Intent(IN) :: ncid, xtype
686 ! Integer, Intent(INOUT) :: nlen
687 ! Character(LEN=*), Intent(INOUT), TARGET :: vlen_element
688 ! Character(KIND=C_CHAR), Intent(INOUT) :: value(*)
689 ! Integer :: status
690 
691 ! End Function nf_get_vlen_element
692 !End Interface
693 !--------------------------------- nf_free_vlenn -------------------------------
694 ! Commented out because we use C_CHAR array to pass data of different
695 ! type to a C void pointer
696 !Interface
697 ! Function nf_free_vlen(vl) RESULT(status)
698 
699 ! Character(KIND=C_CHAR), Intent(IN), TARGET :: vl(*)
700 ! Integer :: status
701 
702 ! End Function nf_free_vlen
703 !End Interface
704 !--------------------------------- nf_put_var ---------------------------------
705 ! Commented out because we use C_CHAR array to pass data of different
706 ! type to a C void pointer
707 !Interface
708 ! Function nf_put_var(ncid, varid, values) RESULT(status)
709 
710 ! USE netcdf_nf_data
711 
712 ! Integer, Intent(IN) :: ncid, varid
713 ! Character(KIND=C_CHAR), Intent(IN), TARGET :: values(*)
714 ! Integer :: status
715 
716 ! End Function nf_put_var
717 !End Interface
718 !--------------------------------- nf_get_var ---------------------------------
719 ! Commented out because we use C_CHAR array to pass data of different
720 ! type to a C void pointer
721 !Interface
722 ! Function nf_get_var(ncid, varid, values) RESULT(status)
723 
724 ! USE netcdf_nf_data
725 
726 ! Integer, Intent(IN) :: ncid, varid
727 ! Character(KIND=C_CHAR), Intent(INOUT), :: values(*)
728 ! Integer :: status
729 
730 ! End Function nf_get_var
731 !End Interface
732 !--------------------------------- nf_put_var1_int64 --------------------------
733 Interface
734  Function nf_put_var1_int64(ncid, varid, ndex, ival) RESULT(status)
736  USE netcdf_nf_data, ONLY: ik8
737 
738  Integer, Intent(IN) :: ncid, varid
739  Integer, Intent(IN) :: ndex(*)
740  Integer(IK8), Intent(IN) :: ival
741  Integer :: status
742 
743  End Function nf_put_var1_int64
744 End Interface
745 !--------------------------------- nf_put_vara_int64 --------------------------
746 Interface
747  Function nf_put_vara_int64(ncid, varid, start, counts, ivals) RESULT(status)
749  USE netcdf_nf_data, ONLY: ik8
750 
751  Integer, Intent(IN) :: ncid, varid
752  Integer, Intent(IN) :: start(*), counts(*)
753  Integer(IK8), Intent(IN) :: ivals(*)
754  Integer :: status
755 
756  End Function nf_put_vara_int64
757 End Interface
758 !--------------------------------- nf_put_vars_int64 --------------------------
759 Interface
760  Function nf_put_vars_int64(ncid, varid, start, counts, strides, ivals) &
761  result(status)
762 
763  USE netcdf_nf_data, ONLY: ik8
765  Integer, Intent(IN) :: ncid, varid
766  Integer, Intent(IN) :: start(*), counts(*), strides(*)
767  Integer(IK8), Intent(IN) :: ivals(*)
768  Integer :: status
769 
770  End Function nf_put_vars_int64
771 End Interface
772 !--------------------------------- nf_put_varm_int64 -------------------------
773 Interface
774  Function nf_put_varm_int64(ncid, varid, start, counts, strides, maps, &
775  ivals) RESULT(status)
777  USE netcdf_nf_data, ONLY: ik8
778 
779  Integer, Intent(IN) :: ncid, varid
780  Integer, Intent(IN) :: start(*), counts(*), strides(*), maps(*)
781  Integer(IK8), Intent(IN) :: ivals(*)
782  Integer :: status
783 
784  End Function nf_put_varm_int64
785 End Interface
786 !--------------------------------- nf_put_var_int64 --------------------------
787 Interface
788  Function nf_put_var_int64(ncid, varid, ivals) RESULT(status)
790  USE netcdf_nf_data, ONLY: ik8
791 
792  Integer, Intent(IN) :: ncid, varid
793  Integer(IK8), Intent(IN) :: ivals(*)
794  Integer :: status
795 
796  End Function nf_put_var_int64
797 End Interface
798 !--------------------------------- nf_get_var1_int64 -------------------------
799 Interface
800  Function nf_get_var1_int64(ncid, varid, ndex, ival) RESULT(status)
802  USE netcdf_nf_data, ONLY: ik8
803 
804  Integer, Intent(IN) :: ncid, varid
805  Integer, Intent(IN) :: ndex(*)
806  Integer(IK8), Intent(OUT) :: ival
807  Integer :: status
808 
809  End Function nf_get_var1_int64
810 End Interface
811 !--------------------------------- nf_get_vara_int -------------------------
812 Interface
813  Function nf_get_vara_int64(ncid, varid, start, counts, ivals) RESULT(status)
815  USE netcdf_nf_data, ONLY: ik8
816 
817  Integer, Intent(IN) :: ncid, varid
818  Integer, Intent(IN) :: start(*), counts(*)
819  Integer(IK8), Intent(OUT) :: ivals(*)
820  Integer :: status
821 
822  End Function nf_get_vara_int64
823 End Interface
824 !--------------------------------- nf_get_vars_int64 --------------------------
825 Interface
826  Function nf_get_vars_int64(ncid, varid, start, counts, strides, ivals) &
827  result(status)
828 
829  USE netcdf_nf_data, ONLY: ik8
831  Integer, Intent(IN) :: ncid, varid
832  Integer, Intent(IN) :: start(*), counts(*), strides(*)
833  Integer(IK8), Intent(OUT) :: ivals(*)
834  Integer :: status
835 
836  End Function nf_get_vars_int64
837 End Interface
838 !--------------------------------- nf_get_varm_int64 -------------------------
839 Interface
840  Function nf_get_varm_int64(ncid, varid, start, counts, strides, maps, &
841  ivals) RESULT(status)
843  USE netcdf_nf_data, ONLY: ik8
844 
845  Integer, Intent(IN) :: ncid, varid
846  Integer, Intent(IN) :: start(*), counts(*), strides(*), maps(*)
847  Integer(IK8), Intent(OUT) :: ivals(*)
848  Integer :: status
849 
850  End Function nf_get_varm_int64
851 End Interface
852 !--------------------------------- nf_get_var_int64 --------------------------
853 Interface
854  Function nf_get_var_int64(ncid, varid, ivals) RESULT(status)
856  USE netcdf_nf_data, ONLY: ik8
857 
858  Integer, Intent(IN) :: ncid, varid
859  Integer(IK8), Intent(OUT) :: ivals(*)
860  Integer :: status
861 
862  End Function nf_get_var_int64
863 End Interface
864 !--------------------------------- nf_set_chunk_cache -------------------------
865 Interface
866  Function nf_set_chunk_cache(chunk_size, nelems, preemption) RESULT(status)
868  Integer, Intent(IN) :: chunk_size, nelems, preemption
869  Integer :: status
870 
871  End Function nf_set_chunk_cache
872 End Interface
873 !--------------------------------- nf_get_chunk_cache -------------------------
874 Interface
875  Function nf_get_chunk_cache(chunk_size, nelems, preemption) RESULT(status)
877  Integer, Intent(INOUT) :: chunk_size, nelems, preemption
878  Integer :: status
879 
880  End Function nf_get_chunk_cache
881 End Interface
882 !--------------------------------- nf_set_var_chunk_cache ---------------------
883 Interface
884  Function nf_set_var_chunk_cache(ncid, varid, chunk_size, nelems, preemption) RESULT(status)
886 ! USE netcdf_nf_data
887 
888  Implicit NONE
889 
890  Integer, Intent(IN) :: ncid, varid, chunk_size, nelems, preemption
891  Integer :: status
892 
893  End Function nf_set_var_chunk_cache
894 End Interface
895 !--------------------------------- nf_get_var_chunk_cache ---------------------
896 Interface
897  Function nf_get_var_chunk_cache(ncid, varid, chunk_size, nelems, preemption) RESULT(status)
899 ! get chunk cache size. Note this follows the fort-nc4 version which uses
900 ! uses nc_get_var_chunk_cache_ints to avoid size_t issues with fortran.
901 
902 ! USE netcdf_nf_data
903 
904  Implicit NONE
905 
906  Integer, Intent(IN) :: ncid, varid
907  Integer, Intent(INOUT) :: chunk_size, nelems, preemption
908  Integer :: status
909 
910  End Function nf_get_var_chunk_cache
911 End Interface
912 
913 ! Declare external values for functions that use C_CHAR strings to pass
914 ! data of different types
915 
916  Integer, External :: nf_insert_enum
917  Integer, External :: nf_inq_enum_member
918  Integer, External :: nf_put_att
919  Integer, External :: nf_get_att
920  Integer, External :: nf_put_vlen_element
921  Integer, External :: nf_get_vlen_element
922  Integer, External :: nf_free_vlen
923  Integer, External :: nf_free_vlens
924  Integer, External :: nf_free_string
925  Integer, External :: nf_put_var
926  Integer, External :: nf_get_var
927  Integer, External :: nf_def_var_fill
928  Integer, External :: nf_inq_var_fill
929 
930 End Module netcdf4_nf_interfaces

Return to the Main Unidata NetCDF page.
Generated on Fri Oct 27 2017 08:12:17 for NetCDF-Fortran. NetCDF is a Unidata library.