NetCDF-Fortran  4.4.3
netcdf4_func.f90
1  !
2  ! NetCDF-4 extra routines:
3  !
4  ! -----------
5  function nf90_create_par(path, cmode, comm, info, ncid, cache_size, &
6  cache_nelems, cache_preemption)
7  character (len = *), intent(in) :: path
8  integer, intent(in) :: cmode
9  integer, intent(in) :: comm
10  integer, intent(in) :: info
11  integer, intent(out) :: ncid
12  integer, optional, intent(in) :: cache_size, cache_nelems
13  real, optional, intent(in) :: cache_preemption
14  integer :: size_in, nelems_in, preemption_in
15  integer :: size_out, nelems_out, preemption_out, ret
16  integer :: nf90_create_par
17 
18  ! If the user specified chuck cache parameters, use them. But user
19  ! may have specified one, two, or three settings. Leave the others
20  ! unchanged.
21  if (present(cache_size) .or. present(cache_nelems) .or. &
22  present(cache_preemption)) then
23  ret = nf_get_chunk_cache(size_in, nelems_in, preemption_in)
24  if (ret .ne. nf90_noerr) then
25  nf90_create_par = ret
26  return
27  end if
28  if (present(cache_size)) then
29  size_out = cache_size
30  else
31  size_out = size_in
32  end if
33  if (present(cache_nelems)) then
34  nelems_out = cache_nelems
35  else
36  nelems_out = nelems_in
37  end if
38  if (present(cache_preemption)) then
39  preemption_out = cache_preemption
40  else
41  preemption_out = preemption_in
42  end if
43  nf90_create_par = nf_set_chunk_cache(size_out, nelems_out, preemption_out)
44  if (nf90_create_par .ne. nf90_noerr) return
45  end if
46 
47  nf90_create_par = nf_create_par(path, cmode, comm, info, ncid)
48  end function nf90_create_par
49  ! -----------
50  function nf90_open_par(path, cmode, comm, info, ncid, cache_size, &
51  cache_nelems, cache_preemption)
52  character (len = *), intent(in) :: path
53  integer, intent(in) :: cmode
54  integer, intent(in) :: comm
55  integer, intent(in) :: info
56  integer, intent(out) :: ncid
57  integer, optional, intent(in) :: cache_size, cache_nelems
58  real, optional, intent(in) :: cache_preemption
59  integer :: size_in, nelems_in, preemption_in
60  integer :: size_out, nelems_out, preemption_out, ret
61  integer :: nf90_open_par
62 
63  ! If the user specified chuck cache parameters, use them. But user
64  ! may have specified one, two, or three settings. Leave the others
65  ! unchanged.
66  if (present(cache_size) .or. present(cache_nelems) .or. &
67  present(cache_preemption)) then
68  ret = nf_get_chunk_cache(size_in, nelems_in, preemption_in)
69  if (ret .ne. nf90_noerr) then
70  nf90_open_par = ret
71  return
72  end if
73  if (present(cache_size)) then
74  size_out = cache_size
75  else
76  size_out = size_in
77  end if
78  if (present(cache_nelems)) then
79  nelems_out = cache_nelems
80  else
81  nelems_out = nelems_in
82  end if
83  if (present(cache_preemption)) then
84  preemption_out = cache_preemption
85  else
86  preemption_out = preemption_in
87  end if
88  nf90_open_par = nf_set_chunk_cache(size_out, nelems_out, preemption_out)
89  if (nf90_open_par .ne. nf90_noerr) return
90  end if
91 
92  nf90_open_par = nf_open_par(path, cmode, comm, info, ncid)
93  end function nf90_open_par
94  ! -----------
95  function nf90_var_par_access(ncid, varid, access)
96  integer, intent(in) :: ncid
97  integer, intent(in) :: varid
98  integer, intent(in) :: access
99  integer :: nf90_var_par_access
100 
101  nf90_var_par_access = nf_var_par_access(ncid, varid, access)
102  end function nf90_var_par_access
103  ! -----------
104  function nf90_inq_ncid(ncid, name, grp_ncid)
105  integer, intent(in) :: ncid
106  character (len = *), intent(in) :: name
107  integer, intent(out) :: grp_ncid
108  integer :: nf90_inq_ncid
109 
110  nf90_inq_ncid = nf_inq_ncid(ncid, name, grp_ncid)
111  end function nf90_inq_ncid
112  ! -----------
113  function nf90_inq_grps(ncid, numgrps, ncids)
114  integer, intent(in) :: ncid
115  integer, intent(out) :: numgrps
116  integer, dimension(:), intent(out) :: ncids
117  integer :: nf90_inq_grps
118 
119  nf90_inq_grps = nf_inq_grps(ncid, numgrps, ncids)
120  end function nf90_inq_grps
121  ! -----------
122  function nf90_inq_grpname_len(ncid, len)
123  integer, intent(in) :: ncid
124  integer, intent(out) :: len
125  integer :: nf90_inq_grpname_len
126 
127  nf90_inq_grpname_len = nf_inq_grpname_len(ncid, len)
128  end function nf90_inq_grpname_len
129  ! -----------
130  function nf90_inq_grp_ncid(ncid, name, grpid)
131  integer, intent(in) :: ncid
132  character (len = *), intent(in) :: name
133  integer, intent(out) :: grpid
134  integer :: nf90_inq_grp_ncid
135 
136  nf90_inq_grp_ncid = nf_inq_grp_ncid(ncid, name, grpid)
137  end function nf90_inq_grp_ncid
138  ! -----------
139  function nf90_inq_grp_full_ncid(ncid, full_name, grpid)
140  integer, intent(in) :: ncid
141  character (len = *), intent(in) :: full_name
142  integer, intent(out) :: grpid
143  integer :: nf90_inq_grp_full_ncid
144 
145  nf90_inq_grp_full_ncid = nf_inq_grp_full_ncid(ncid, full_name, grpid)
146  end function nf90_inq_grp_full_ncid
147  ! -----------
148  function nf90_inq_grp_parent(ncid, parent_ncid)
149  integer, intent(in) :: ncid
150  integer, intent(out) :: parent_ncid
151  integer :: nf90_inq_grp_parent
152 
153  nf90_inq_grp_parent = nf_inq_grp_parent(ncid, parent_ncid)
154  end function nf90_inq_grp_parent
155  ! -----------
156  function nf90_inq_grpname(ncid, name)
157  integer, intent(in) :: ncid
158  character (len = *), intent(out) :: name
159  integer :: nf90_inq_grpname
160 
161  nf90_inq_grpname = nf_inq_grpname(ncid, name)
162  end function nf90_inq_grpname
163  ! -----------
164  function nf90_inq_grpname_full(ncid, len, name)
165  integer, intent(in) :: ncid
166  integer, intent(out) :: len
167  character (len = *), intent(out) :: name
168  integer :: nf90_inq_grpname_full
169 
170  nf90_inq_grpname_full = nf_inq_grpname_full(ncid, len, name)
171  end function nf90_inq_grpname_full
172  ! -----------
173  function nf90_inq_varids(ncid, nvars, varids)
174  integer, intent(in) :: ncid
175  integer, intent(out) :: nvars
176  integer, dimension(:), intent(out) :: varids
177  integer :: nf90_inq_varids
178 
179  nf90_inq_varids = nf_inq_varids(ncid, nvars, varids)
180  end function nf90_inq_varids
181  ! -----------
182  function nf90_inq_dimids(ncid, ndims, dimids, include_parents)
183  integer, intent(in) :: ncid
184  integer, intent(out) :: ndims
185  integer, dimension(:), intent(out) :: dimids
186  integer, intent(out) :: include_parents
187  integer :: nf90_inq_dimids
188 
189  nf90_inq_dimids = nf_inq_dimids(ncid, ndims, dimids, include_parents)
190  end function nf90_inq_dimids
191  ! -----------
192  function nf90_inq_typeids(ncid, ntypes, typeids)
193  integer, intent(in) :: ncid
194  integer, optional, intent(out) :: ntypes
195  integer, dimension(:), optional, intent(out) :: typeids
196  integer :: nf90_inq_typeids
197 
198  nf90_inq_typeids = nf_inq_typeids(ncid, ntypes, typeids)
199 
200  end function nf90_inq_typeids
201  ! -----------
202  function nf90_inq_typeid(ncid, name, typeid)
203  integer, intent(in) :: ncid
204  character (len = *), intent(in) :: name
205  integer, optional, intent(out) :: typeid
206  integer :: nf90_inq_typeid
207 
208  nf90_inq_typeid = nf_inq_typeid(ncid, name, typeid)
209 
210  end function nf90_inq_typeid
211  ! -----------
212  function nf90_def_grp(parent_ncid, name, new_ncid)
213  integer, intent(in) :: parent_ncid
214  character (len = *), intent(in) :: name
215  integer, intent(out) :: new_ncid
216  integer :: nf90_def_grp
217 
218  nf90_def_grp = nf_def_grp(parent_ncid, name, new_ncid)
219  end function nf90_def_grp
220  ! -----------
221  function nf90_rename_grp(grpid, name)
222  integer, intent(in) :: grpid
223  character (len = *), intent(in) :: name
224  integer :: nf90_rename_grp
225 
226  nf90_rename_grp = nf_rename_grp(grpid, name)
227  end function nf90_rename_grp
228  ! -----------
229  function nf90_def_compound(ncid, size, name, typeid)
230  integer, intent(in) :: ncid
231  integer, intent(in) :: size
232  character (len = *), intent(in) :: name
233  integer, intent(out) :: typeid
234  integer :: nf90_def_compound
235 
236  nf90_def_compound = nf_def_compound(ncid, size, name, typeid)
237  end function nf90_def_compound
238  ! -----------
239  function nf90_insert_compound(ncid, xtype, name, offset, field_typeid)
240  integer, intent(in) :: ncid
241  integer, intent(in) :: xtype
242  character (len = *), intent(in) :: name
243  integer, intent(in) :: offset
244  integer, intent(in) :: field_typeid
245  integer :: nf90_insert_compound
246 
247  nf90_insert_compound = nf_insert_compound(ncid, xtype, name, offset, field_typeid)
248  end function nf90_insert_compound
249  ! -----------
250  function nf90_insert_array_compound(ncid, xtype, name, offset, field_typeid, &
251  ndims, dim_sizes)
252  integer, intent(in) :: ncid
253  integer, intent(in) :: xtype
254  character (len = *), intent(in) :: name
255  integer, intent(in) :: offset
256  integer, intent(in) :: field_typeid
257  integer, intent(in) :: ndims
258  integer, intent(in) :: dim_sizes
259  integer :: nf90_insert_array_compound
260 
261  nf90_insert_array_compound = nf_insert_array_compound(ncid, xtype, name, &
262  offset, field_typeid, ndims, dim_sizes)
263  end function nf90_insert_array_compound
264  ! -----------
265  function nf90_inq_type(ncid, xtype, name, size)
266  integer, intent(in) :: ncid
267  integer, intent(in) :: xtype
268  character (len = *), intent(out) :: name
269  integer, intent(out) :: size
270  integer :: nf90_inq_type
271 
272  nf90_inq_type = nf_inq_type(ncid, xtype, name, size)
273  end function nf90_inq_type
274  ! -----------
275  function nf90_inq_compound(ncid, xtype, name, size, nfields)
276  integer, intent(in) :: ncid
277  integer, intent(in) :: xtype
278  character (len = *), intent(out) :: name
279  integer, intent(out) :: size
280  integer, intent(out) :: nfields
281  integer :: nf90_inq_compound
282 
283  nf90_inq_compound = nf_inq_compound(ncid, xtype, name, size, nfields)
284  end function nf90_inq_compound
285  ! -----------
286  function nf90_inq_compound_name(ncid, xtype, name)
287  integer, intent(in) :: ncid
288  integer, intent(in) :: xtype
289  character (len = *), intent(out) :: name
290  integer :: nf90_inq_compound_name
291 
292  nf90_inq_compound_name = nf_inq_compound_name(ncid, xtype, name)
293  end function nf90_inq_compound_name
294  ! -----------
295  function nf90_inq_compound_size(ncid, xtype, size)
296  integer, intent(in) :: ncid
297  integer, intent(in) :: xtype
298  integer, intent(out) :: size
299  integer :: nf90_inq_compound_size
300 
301  nf90_inq_compound_size = nf_inq_compound_size(ncid, xtype, size)
302  end function nf90_inq_compound_size
303  ! -----------
304  function nf90_inq_compound_nfields(ncid, xtype, nfields)
305  integer, intent(in) :: ncid
306  integer, intent(in) :: xtype
307  integer, intent(out) :: nfields
308  integer :: nf90_inq_compound_nfields
309 
310  nf90_inq_compound_nfields = nf_inq_compound_nfields(ncid, xtype, nfields)
311  end function nf90_inq_compound_nfields
312  ! -----------
313  function nf90_inq_compound_field(ncid, xtype, fieldid, name, offset, &
314  field_typeid, ndims, dim_sizes)
315  integer, intent(in) :: ncid
316  integer, intent(in) :: xtype
317  integer, intent(in) :: fieldid
318  character (len = *), intent(out) :: name
319  integer, intent(out) :: offset
320  integer, intent(out) :: field_typeid
321  integer, intent(out) :: ndims
322  integer, intent(out) :: dim_sizes
323  integer :: nf90_inq_compound_field
324 
325  nf90_inq_compound_field = nf_inq_compound_field(ncid, xtype, fieldid, name, offset, &
326  field_typeid, ndims, dim_sizes)
327  end function nf90_inq_compound_field
328  ! -----------
329  function nf90_inq_compound_fieldname(ncid, xtype, fieldid, name)
330  integer, intent(in) :: ncid
331  integer, intent(in) :: xtype
332  integer, intent(in) :: fieldid
333  character (len = *), intent(out) :: name
334  integer :: nf90_inq_compound_fieldname
335 
336  nf90_inq_compound_fieldname = nf_inq_compound_fieldname(ncid, xtype, fieldid, name)
337  end function nf90_inq_compound_fieldname
338  ! -----------
339  function nf90_inq_compound_fieldindex(ncid, xtype, name, fieldid)
340  integer, intent(in) :: ncid
341  integer, intent(in) :: xtype
342  character (len = *), intent(in) :: name
343  integer, intent(out) :: fieldid
344  integer :: nf90_inq_compound_fieldindex
345 
346  nf90_inq_compound_fieldindex = nf_inq_compound_fieldindex(ncid, xtype, name, fieldid)
347  end function nf90_inq_compound_fieldindex
348  ! -----------
349  function nf90_inq_compound_fieldoffset(ncid, xtype, fieldid, offset)
350  integer, intent(in) :: ncid
351  integer, intent(in) :: xtype
352  integer, intent(in) :: fieldid
353  integer, intent(out) :: offset
354  integer :: nf90_inq_compound_fieldoffset
355 
356  nf90_inq_compound_fieldoffset = nf_inq_compound_fieldoffset(ncid, xtype, fieldid, offset)
357  end function nf90_inq_compound_fieldoffset
358  ! -----------
359  function nf90_inq_compound_fieldtype(ncid, xtype, fieldid, field_typeid)
360  integer, intent(in) :: ncid
361  integer, intent(in) :: xtype
362  integer, intent(in) :: fieldid
363  integer, intent(out) :: field_typeid
364  integer :: nf90_inq_compound_fieldtype
365 
366  nf90_inq_compound_fieldtype = nf_inq_compound_fieldtype(ncid, xtype, fieldid, field_typeid)
367  end function nf90_inq_compound_fieldtype
368  ! -----------
369  function nf90_inq_compound_fieldndims(ncid, xtype, fieldid, ndims)
370  integer, intent(in) :: ncid
371  integer, intent(in) :: xtype
372  integer, intent(in) :: fieldid
373  integer, intent(out) :: ndims
374  integer :: nf90_inq_compound_fieldndims
375 
376  nf90_inq_compound_fieldndims = nf_inq_compound_fieldndims(ncid, xtype, fieldid, ndims)
377  end function nf90_inq_compound_fieldndims
378  ! -----------
379  function nf90_inq_cmp_fielddim_sizes(ncid, xtype, fieldid, dim_sizes)
380  integer, intent(in) :: ncid
381  integer, intent(in) :: xtype
382  integer, intent(in) :: fieldid
383  integer, intent(out) :: dim_sizes
384  integer :: nf90_inq_cmp_fielddim_sizes
385 
386  nf90_inq_cmp_fielddim_sizes = nf_inq_compound_fielddim_sizes(ncid, xtype, fieldid, dim_sizes)
387  end function nf90_inq_cmp_fielddim_sizes
388  ! -----------
389  function nf90_def_vlen(ncid, name, base_typeid, xtypeid)
390  integer, intent(in) :: ncid
391  character (len = *), intent(in) :: name
392  integer, intent(in) :: base_typeid
393  integer, intent(out) :: xtypeid
394  integer :: nf90_def_vlen
395 
396  nf90_def_vlen = nf_def_vlen(ncid, name, base_typeid, xtypeid)
397  end function nf90_def_vlen
398  ! -----------
399  function nf90_inq_vlen(ncid, xtype, name, datum_size, base_nc_type)
400  integer, intent(in) :: ncid
401  integer, intent(in) :: xtype
402  character (len = *), intent(out) :: name
403  integer, intent(out) :: datum_size
404  integer, intent(out) :: base_nc_type
405  integer :: nf90_inq_vlen
406 
407  nf90_inq_vlen = nf_inq_vlen(ncid, xtype, name, datum_size, base_nc_type)
408  end function nf90_inq_vlen
409  ! -----------
410  function nf90_free_vlen(vl)
411  character (len = *), intent(in) :: vl
412  integer :: nf90_free_vlen
413 
414  nf90_free_vlen = nf_free_vlen(vl)
415  end function nf90_free_vlen
416 ! ! -----------
417  function nf90_def_enum(ncid, base_typeid, name, typeid)
418  integer, intent(in) :: ncid
419  integer, intent(in) :: base_typeid
420  character (len = *), intent(in) :: name
421  integer, intent(out) :: typeid
422  integer :: nf90_def_enum
423 
424  nf90_def_enum = nf_def_enum(ncid, base_typeid, name, typeid)
425  end function nf90_def_enum
426 ! ! -----------
427  function nf90_inq_user_type(ncid, xtype, name, size, base_typeid, nfields, class)
428  integer, intent(in) :: ncid
429  integer, intent(in) :: xtype
430  character (len = *), intent(out) :: name
431  integer, intent(out) :: size
432  integer, intent(out) :: base_typeid
433  integer, intent(out) :: nfields
434  integer, intent(out) :: class
435  integer :: nf90_inq_user_type
436 
437  nf90_inq_user_type = nf_inq_user_type(ncid, xtype, name, size, base_typeid, nfields, class)
438  end function nf90_inq_user_type
439  ! -----------
440  function nf90_insert_enum(ncid, xtype, name, value)
441  integer, intent(in) :: ncid
442  integer, intent(in) :: xtype
443  character (len = *), intent(in) :: name
444  integer, intent(in) :: value
445  integer :: nf90_insert_enum
446 
447  nf90_insert_enum = nf_insert_enum(ncid, xtype, name, value)
448  end function nf90_insert_enum
449  ! -----------
450  function nf90_inq_enum(ncid, xtype, name, base_nc_type, base_size, num_members)
451  integer, intent(in) :: ncid
452  integer, intent(in) :: xtype
453  character (len = *), intent(out) :: name
454  integer, intent(out) :: base_nc_type
455  integer, intent(out) :: base_size
456  integer, intent(out) :: num_members
457  integer :: nf90_inq_enum
458 
459  nf90_inq_enum = nf_inq_enum(ncid, xtype, name, base_nc_type, base_size, num_members)
460  end function nf90_inq_enum
461  ! -----------
462  function nf90_inq_enum_member(ncid, xtype, idx, name, value)
463  integer, intent(in) :: ncid
464  integer, intent(in) :: xtype
465  integer, intent(in) :: idx
466  character (len = *), intent(out) :: name
467  integer, intent(in) :: value
468  integer :: nf90_inq_enum_member
469 
470  nf90_inq_enum_member = nf_inq_enum_member(ncid, xtype, idx, name, value)
471  end function nf90_inq_enum_member
472  ! -----------
473  function nf90_inq_enum_ident(ncid, xtype, value, idx)
474  integer, intent(in) :: ncid
475  integer, intent(in) :: xtype
476  integer, intent(in) :: value
477  integer, intent(out) :: idx
478  integer :: nf90_inq_enum_ident
479 
480  nf90_inq_enum_ident = nf_inq_enum_ident(ncid, xtype, value, idx)
481  end function nf90_inq_enum_ident
482  ! -----------
483  function nf90_def_opaque(ncid, size, name, xtype)
484  integer, intent(in) :: ncid
485  integer, intent(in) :: size
486  character (len = *), intent(in) :: name
487  integer, intent(out) :: xtype
488  integer :: nf90_def_opaque
489 
490  nf90_def_opaque = nf_def_opaque(ncid, size, name, xtype)
491  end function nf90_def_opaque
492  ! -----------
493  function nf90_inq_opaque(ncid, xtype, name, size)
494  integer, intent(in) :: ncid
495  integer, intent(in) :: xtype
496  character (len = *), intent(out) :: name
497  integer, intent(out) :: size
498  integer :: nf90_inq_opaque
499 
500  nf90_inq_opaque = nf_inq_opaque(ncid, xtype, name, size)
501  end function nf90_inq_opaque
502  ! -----------
503  function nf90_def_var_chunking(ncid, varid, contiguous, chunksizes)
504  integer, intent(in) :: ncid
505  integer, intent(in) :: varid
506  integer, intent(in) :: contiguous
507  integer, dimension(:), intent(in) :: chunksizes
508  integer :: nf90_def_var_chunking
509 
510  nf90_def_var_chunking = nf_def_var_chunking(ncid, varid, contiguous, chunksizes)
511  end function nf90_def_var_chunking
512  ! -----------
513  function nf90_def_var_deflate(ncid, varid, shuffle, deflate, deflate_level)
514  integer, intent(in) :: ncid
515  integer, intent(in) :: varid
516  integer, intent(in) :: shuffle
517  integer, intent(in) :: deflate
518  integer, intent(in) :: deflate_level
519  integer :: nf90_def_var_deflate
520 
521  nf90_def_var_deflate = nf_def_var_deflate(ncid, varid, shuffle, deflate, deflate_level)
522  end function nf90_def_var_deflate
523  ! -----------
524  function nf90_def_var_fletcher32(ncid, varid, fletcher32)
525  integer, intent(in) :: ncid
526  integer, intent(in) :: varid
527  integer, intent(in) :: fletcher32
528  integer :: nf90_def_var_fletcher32
529 
530  nf90_def_var_fletcher32 = nf_def_var_fletcher32(ncid, varid, fletcher32)
531  end function nf90_def_var_fletcher32
532  ! -----------
533  function nf90_inq_var_chunking(ncid, varid, contiguous, chunksizes)
534  integer, intent(in) :: ncid
535  integer, intent(in) :: varid
536  integer, intent(out) :: contiguous
537  integer, dimension(:), intent(out) :: chunksizes
538  integer :: nf90_inq_var_chunking
539 
540  nf90_inq_var_chunking = nf_inq_var_chunking(ncid, varid, contiguous, chunksizes)
541  end function nf90_inq_var_chunking
542  ! -----------
543  function nf90_inq_var_deflate(ncid, varid, shuffle, deflate, deflate_level)
544  integer, intent(in) :: ncid
545  integer, intent(in) :: varid
546  integer, intent(out) :: shuffle
547  integer, intent(out) :: deflate
548  integer, intent(out) :: deflate_level
549  integer :: nf90_inq_var_deflate
550 
551  nf90_inq_var_deflate = nf_inq_var_deflate(ncid, varid, shuffle, deflate, deflate_level)
552  end function nf90_inq_var_deflate
553  ! -----------
554  function nf90_inq_var_fletcher32(ncid, varid, fletcher32)
555  integer, intent(in) :: ncid
556  integer, intent(in) :: varid
557  integer, intent(out) :: fletcher32
558  integer :: nf90_inq_var_fletcher32
559 
560  nf90_inq_var_fletcher32 = nf_inq_var_fletcher32(ncid, varid, fletcher32)
561  end function nf90_inq_var_fletcher32
562  ! -----------
563  function nf90_def_var_endian(ncid, varid, endian)
564  integer, intent(in) :: ncid
565  integer, intent(in) :: varid
566  integer, intent(in) :: endian
567  integer :: nf90_def_var_endian
568 
569  nf90_def_var_endian = nf_def_var_endian(ncid, varid, endian)
570  end function nf90_def_var_endian
571  ! -----------
572  function nf90_inq_var_endian(ncid, varid, endian)
573  integer, intent(in) :: ncid
574  integer, intent(in) :: varid
575  integer, intent(out) :: endian
576  integer :: nf90_inq_var_endian
577 
578  nf90_inq_var_endian = nf_inq_var_endian(ncid, varid, endian)
579  end function nf90_inq_var_endian
580  ! -----------
581 ! function nf90_def_var_fill(ncid, varid, no_fill, fill)
582 ! integer, intent(in) :: ncid
583 ! integer, intent(in) :: varid
584 ! integer, intent(in) :: no_fill
585 ! integer, intent(in) :: fill
586 ! integer :: nf90_def_var_fill
587 
588 ! nf90_def_var_fill = nf_def_var_fill(ncid, varid, no_fill, fill)
589 ! end function nf90_def_var_fill
590  ! -----------
591 ! function nf90_inq_var_fill(ncid, varid, no_fill, fill)
592 ! integer, intent(in) :: ncid
593 ! integer, intent(in) :: varid
594 ! integer, intent(out) :: no_fill
595 ! integer, intent(out) :: fill
596 ! integer :: nf90_inq_var_fill
597 
598 ! nf90_inq_var_fill = nf_inq_var_fill(ncid, varid, no_fill, fill)
599 ! end function nf90_inq_var_fill
600 
601  function nf90_def_var_fill_onebyteint(ncid, varid, no_fill, fill)
602  integer, intent(in) :: ncid
603  integer, intent(in) :: varid
604  integer, intent(in) :: no_fill
605  integer(kind=OneByteInt), intent(in) :: fill
606  integer :: nf90_def_var_fill_onebyteint
607 
608  nf90_def_var_fill_onebyteint = nf_def_var_fill(ncid, varid, no_fill, fill)
609  end function nf90_def_var_fill_onebyteint
610  ! -----------
611  function nf90_def_var_fill_twobyteint(ncid, varid, no_fill, fill)
612  integer, intent(in) :: ncid
613  integer, intent(in) :: varid
614  integer, intent(in) :: no_fill
615  integer(kind=TwoByteInt), intent(in) :: fill
616  integer :: nf90_def_var_fill_twobyteint
617 
618  nf90_def_var_fill_twobyteint = nf_def_var_fill(ncid, varid, no_fill, fill)
619  end function nf90_def_var_fill_twobyteint
620  ! -----------
621  function nf90_def_var_fill_fourbyteint(ncid, varid, no_fill, fill)
622  integer, intent(in) :: ncid
623  integer, intent(in) :: varid
624  integer, intent(in) :: no_fill
625  integer(kind=FourByteInt), intent(in) :: fill
626  integer :: nf90_def_var_fill_fourbyteint
627 
628  nf90_def_var_fill_fourbyteint = nf_def_var_fill(ncid, varid, no_fill, fill)
629  end function nf90_def_var_fill_fourbyteint
630  ! -----------
631  function nf90_def_var_fill_eightbyteint(ncid, varid, no_fill, fill)
632  integer, intent(in) :: ncid
633  integer, intent(in) :: varid
634  integer, intent(in) :: no_fill
635  integer(kind=EightByteInt), intent(in) :: fill
636  integer :: nf90_def_var_fill_eightbyteint
637 
638  nf90_def_var_fill_eightbyteint = nf_def_var_fill(ncid, varid, no_fill, fill)
639  end function nf90_def_var_fill_eightbyteint
640  ! -----------
641  function nf90_def_var_fill_fourbytereal(ncid, varid, no_fill, fill)
642  integer, intent(in) :: ncid
643  integer, intent(in) :: varid
644  integer, intent(in) :: no_fill
645  real(kind=FourByteReal), intent(in) :: fill
646  integer :: nf90_def_var_fill_fourbytereal
647 
648  nf90_def_var_fill_fourbytereal = nf_def_var_fill(ncid, varid, no_fill, fill)
649  end function nf90_def_var_fill_fourbytereal
650  ! -----------
651  function nf90_def_var_fill_eightbytereal(ncid, varid, no_fill, fill)
652  integer, intent(in) :: ncid
653  integer, intent(in) :: varid
654  integer, intent(in) :: no_fill
655  real(kind=EightByteReal), intent(in) :: fill
656  integer :: nf90_def_var_fill_eightbytereal
657 
658  nf90_def_var_fill_eightbytereal = nf_def_var_fill(ncid, varid, no_fill, fill)
659  end function nf90_def_var_fill_eightbytereal
660  ! -----------
661  function nf90_inq_var_fill_onebyteint(ncid, varid, no_fill, fill)
662  integer, intent(in) :: ncid
663  integer, intent(in) :: varid
664  integer, intent(inout) :: no_fill
665  integer(kind=OneByteInt), intent(inout) :: fill
666  integer :: nf90_inq_var_fill_onebyteint
667 
668  nf90_inq_var_fill_onebyteint = nf_inq_var_fill(ncid, varid, no_fill, fill)
669  end function nf90_inq_var_fill_onebyteint
670  ! -----------
671  function nf90_inq_var_fill_twobyteint(ncid, varid, no_fill, fill)
672  integer, intent(in) :: ncid
673  integer, intent(in) :: varid
674  integer, intent(inout) :: no_fill
675  integer(kind=TwoByteInt), intent(inout) :: fill
676  integer :: nf90_inq_var_fill_twobyteint
677 
678  nf90_inq_var_fill_twobyteint = nf_inq_var_fill(ncid, varid, no_fill, fill)
679  end function nf90_inq_var_fill_twobyteint
680  ! -----------
681  function nf90_inq_var_fill_fourbyteint(ncid, varid, no_fill, fill)
682  integer, intent(in) :: ncid
683  integer, intent(in) :: varid
684  integer, intent(inout) :: no_fill
685  integer(kind=FourByteInt), intent(inout) :: fill
686  integer :: nf90_inq_var_fill_fourbyteint
687 
688  nf90_inq_var_fill_fourbyteint = nf_inq_var_fill(ncid, varid, no_fill, fill)
689  end function nf90_inq_var_fill_fourbyteint
690  ! -----------
691  function nf90_inq_var_fill_eightbyteint(ncid, varid, no_fill, fill)
692  integer, intent(in) :: ncid
693  integer, intent(in) :: varid
694  integer, intent(inout) :: no_fill
695  integer(kind=EightByteInt), intent(inout) :: fill
696  integer :: nf90_inq_var_fill_eightbyteint
697 
698  nf90_inq_var_fill_eightbyteint = nf_inq_var_fill(ncid, varid, no_fill, fill)
699  end function nf90_inq_var_fill_eightbyteint
700  ! -----------
701  function nf90_inq_var_fill_fourbytereal(ncid, varid, no_fill, fill)
702  integer, intent(in) :: ncid
703  integer, intent(in) :: varid
704  integer, intent(inout) :: no_fill
705  real(kind=FourByteReal), intent(inout) :: fill
706  integer :: nf90_inq_var_fill_fourbytereal
707 
708  nf90_inq_var_fill_fourbytereal = nf_inq_var_fill(ncid, varid, no_fill, fill)
709  end function nf90_inq_var_fill_fourbytereal
710  ! -----------
711  function nf90_inq_var_fill_eightbytereal(ncid, varid, no_fill, fill)
712  integer, intent(in) :: ncid
713  integer, intent(in) :: varid
714  integer, intent(inout) :: no_fill
715  real(kind=EightByteReal), intent(inout) :: fill
716  integer :: nf90_inq_var_fill_eightbytereal
717 
718  nf90_inq_var_fill_eightbytereal = nf_inq_var_fill(ncid, varid, no_fill, fill)
719  end function nf90_inq_var_fill_eightbytereal
720  ! -----------
721  function nf90_put_att_any(ncid, varid, name, typeid, length, values)
722  integer, intent( in) :: ncid, varid
723  character(len = *), intent( in) :: name
724  integer, intent( in) :: typeid, length
725  character(len = *), intent( in) :: values
726  integer :: nf90_put_att_any
727 
728  nf90_put_att_any = nf_put_att(ncid, varid, name, typeid, length, values)
729  end function nf90_put_att_any
730  ! -----------
731  function nf90_get_att_any(ncid, varid, name, length, values)
732  integer, intent( in) :: ncid, varid
733  character(len = *), intent( in) :: name
734  integer, intent( in) :: length
735  character(len = *), intent( in) :: values
736  integer :: nf90_get_att_any
737 
738  nf90_get_att_any = nf_get_att(ncid, varid, name, values)
739  end function nf90_get_att_any
740  ! -----------
741  function nf90_put_var_any(ncid, varid, values, start, count, stride, map)
742  integer, intent( in) :: ncid, varid
743  character (len = *), intent( in) :: values
744  integer, dimension(:), optional, intent( in) :: start, count, stride, map
745  integer :: nf90_put_var_any
746 
747  integer, dimension(nf90_max_var_dims) :: localstart, localcount, localstride
748 
749  ! Set local arguments to default values
750  localstart(:) = 1
751  localcount(1) = len_trim(values); localcount(2:) = 1
752  localstride(:) = 1
753 
754  if(present(start)) localstart(:size(start) ) = start(:)
755  if(present(count)) localcount(:size(count) ) = count(:)
756  if(present(stride)) localstride(:size(stride)) = stride(:)
757 
758  nf90_put_var_any = nf_put_vars(ncid, varid, localstart, localcount, localstride, values)
759  end function nf90_put_var_any
760  ! -----------
761  function nf90_get_var_any(ncid, varid, values, start, count, stride, map)
762  integer, intent( in) :: ncid, varid
763  character (len = *), intent(out) :: values
764  integer, dimension(:), optional, intent( in) :: start, count, stride, map
765  integer :: nf90_get_var_any
766 
767  integer, dimension(nf90_max_var_dims) :: textdimids
768  integer, dimension(nf90_max_var_dims) :: localstart, localcount, localstride
769  integer :: stringlength
770 
771  ! Set local arguments to default values
772  localstart(:) = 1
773  localcount(1) = len(values); localcount(2:) = 1
774  localstride(:) = 1
775 
776  if(present(start)) localstart(:size(start) ) = start(:)
777  if(present(count)) localcount(:size(count) ) = count(:)
778  if(present(stride)) localstride(:size(stride)) = stride(:)
779 
780  nf90_get_var_any = nf_get_vars(ncid, varid, localstart, localcount, localstride, values)
781  end function nf90_get_var_any

Return to the Main Unidata NetCDF page.
Generated on Tue Mar 1 2016 12:16:22 for NetCDF-Fortran. NetCDF is a Unidata library.