33 Function nf_create(path, cmode, ncid) RESULT (status)
38 USE netcdf_nc_interfaces
42 Character(LEN=*),
Intent(IN) :: path
43 Integer,
Intent(IN) :: cmode
44 Integer,
Intent(OUT) :: ncid
48 Integer(KIND=C_INT) :: ccmode, cncid, cstatus
49 Character(LEN=(LEN(path)+1)) :: cpath
62 cstatus =
nc_create(cpath(1:ie+1), ccmode, cncid)
64 If (cstatus == nc_noerr)
Then 69 End Function nf_create
71 Function nf__create(path, cmode, initialsz, chunksizehintp, ncid) &
78 USE netcdf_nc_interfaces
82 Character(LEN=*),
Intent(IN) :: path
83 Integer,
Intent(IN) :: cmode, initialsz, chunksizehintp
84 Integer,
Intent(OUT) :: ncid
88 Integer(KIND=C_INT) :: ccmode, cncid, cstatus
89 Integer(KIND=C_SIZE_T) :: cinit, cchunk
90 Character(LEN=(LEN(path)+1)) :: cpath
94 cchunk = chunksizehintp
105 cstatus =
nc__create(cpath(1:ie+1), ccmode, cinit, cchunk, cncid)
107 If (cstatus == nc_noerr)
Then 112 End Function nf__create
114 Function nf__create_mp(path, cmode, initialsz, basepe, chunksizehintp, ncid) &
121 USE netcdf_nc_interfaces
125 Character(LEN=*),
Intent(IN) :: path
126 Integer,
Intent(IN) :: cmode, initialsz, chunksizehintp, basepe
127 Integer,
Intent(OUT) :: ncid
131 Integer(KIND=C_INT) :: ccmode, cncid, cstatus
132 Integer(KIND=C_INT),
TARGET :: cbasepe
133 Integer(KIND=C_SIZE_T) :: cinit, cchunk
134 Type(c_ptr) :: cbasepeptr
135 Character(LEN=(LEN(path)+1)) :: cpath
139 cchunk = chunksizehintp
143 cbasepeptr = c_loc(cbasepe)
152 cstatus =
nc__create_mp(cpath(1:ie+1), ccmode, cinit, cbasepeptr, &
155 If (cstatus == nc_noerr)
Then 160 End Function nf__create_mp
162 Function nf_open(path, mode, ncid) RESULT (status)
166 USE netcdf_nc_interfaces
170 Character(LEN=*),
Intent(IN) :: path
171 Integer,
Intent(IN) :: mode
172 Integer,
Intent(INOUT) :: ncid
176 Integer(KIND=C_INT) :: cmode, cncid, cstatus
177 Character(LEN=(LEN(path)+1)) :: cpath
190 cstatus =
nc_open(cpath(1:ie+1), cmode, cncid)
192 If (cstatus == nc_noerr)
Then 199 Function nf__open(path, mode, chunksizehintp, ncid) RESULT (status)
204 USE netcdf_nc_interfaces
208 Character(LEN=*),
Intent(IN) :: path
209 Integer,
Intent(IN) :: mode, chunksizehintp
210 Integer,
Intent(INOUT) :: ncid
214 Integer(KIND=C_INT) :: cmode, cncid, cstatus
215 Integer(KIND=C_SIZE_T) :: cchunk
216 Character(LEN=(LEN(path)+1)) :: cpath
220 cchunk = chunksizehintp
230 cstatus =
nc__open(cpath(1:ie+1), cmode, cchunk, cncid)
232 If (cstatus == nc_noerr)
Then 237 End Function nf__open
239 Function nf__open_mp(path, mode, basepe, chunksizehintp, ncid) RESULT (status)
245 USE netcdf_nc_interfaces
249 Character(LEN=*),
Intent(IN) :: path
250 Integer,
Intent(IN) :: mode, chunksizehintp, basepe
251 Integer,
Intent(INOUT) :: ncid
255 Integer(KIND=C_INT) :: cmode, cncid, cstatus
256 Integer(KIND=C_INT),
TARGET :: cbasepe
257 Integer(KIND=C_SIZE_T) :: cchunk
258 Type(c_ptr) :: cbasepeptr
259 Character(LEN=(LEN(path)+1)) :: cpath
263 cchunk = chunksizehintp
266 cbasepeptr = c_loc(cbasepe)
275 cstatus =
nc__open_mp(cpath(1:ie+1), cmode, cbasepeptr, cchunk, &
278 If (cstatus == nc_noerr)
Then 283 End Function nf__open_mp
285 Function nf_inq_path(ncid, pathlen, path) RESULT(status)
289 USE netcdf_nc_interfaces
293 Integer,
Intent(IN) :: ncid
294 Integer,
Intent(INOUT) :: pathlen
295 Character(LEN=*),
Intent(INOUT) :: path
299 Integer(C_INT) :: cncid, cstatus
300 Integer(C_SIZE_T) :: cpathlen
301 Character(LEN=LEN(path)+1) :: tmppath
304 path = repeat(
" ", len(path))
305 tmppath = repeat(
" ", len(tmppath))
309 If (cstatus == nc_noerr)
Then 311 If (pathlen > len(path)) pathlen = len(path)
316 End Function nf_inq_path
318 Function nf_set_fill(ncid, fillmode, old_mode) RESULT(status)
322 USE netcdf_nc_interfaces
326 Integer,
Intent(IN) :: ncid, fillmode
327 Integer,
Intent(OUT) :: old_mode
331 Integer(KIND=C_INT) :: cncid, cfill, coldmode, cstatus
339 If (cstatus == nc_noerr)
Then 344 End Function nf_set_fill
346 Function nf_set_default_format(newform, old_format) RESULT(status)
351 USE netcdf_nc_interfaces
355 Integer,
Intent(IN) :: newform
356 Integer,
Intent(OUT) :: old_format
360 Integer(KIND=C_INT) :: cnew, cold, cstatus
366 If (cstatus == nc_noerr)
Then 371 End Function nf_set_default_format
373 Function nf_redef(ncid) RESULT(status)
377 USE netcdf_nc_interfaces
381 Integer,
Intent(IN) :: ncid
385 Integer(KIND=C_INT) :: cncid, cstatus
393 End Function nf_redef
395 Function nf_enddef(ncid) RESULT(status)
399 USE netcdf_nc_interfaces
403 Integer,
Intent(IN) :: ncid
407 Integer(KIND=C_INT) :: cncid, cstatus
415 End Function nf_enddef
417 Function nf__enddef(ncid, h_minfree, v_align, v_minfree, r_align) &
423 USE netcdf_nc_interfaces
427 Integer,
Intent(IN) :: ncid, h_minfree, v_align, v_minfree, r_align
431 Integer(KIND=C_INT) :: cncid, cstatus
432 Integer(KIND=C_SIZE_T) :: chminfree, cvalign, cvminfree, cralign
435 chminfree = h_minfree
437 cvminfree = v_minfree
440 cstatus =
nc__enddef(cncid, chminfree, cvalign, cvminfree, cralign)
444 End Function nf__enddef
446 Function nf_sync(ncid) RESULT(status)
450 USE netcdf_nc_interfaces
454 Integer,
Intent(IN) :: ncid
458 Integer(KIND=C_INT) :: cncid, cstatus
468 Function nf_abort(ncid) RESULT(status)
472 USE netcdf_nc_interfaces
476 Integer,
Intent(IN) :: ncid
480 Integer(KIND=C_INT) :: cncid, cstatus
488 End Function nf_abort
490 Function nf_close(ncid) RESULT(status)
494 USE netcdf_nc_interfaces
498 Integer,
Intent(IN) :: ncid
502 Integer(KIND=C_INT) :: cncid, cstatus
510 End Function nf_close
512 Function nf_delete(path) RESULT(status)
516 USE netcdf_nc_interfaces
520 Character(LEN=*),
Intent(IN) :: path
524 Integer(KIND=C_INT) :: cstatus
525 Character(LEN=(LEN(path)+1)) :: cpath
534 End Function nf_delete
536 Function nf_delete_mp(path, pe) RESULT(status)
541 USE netcdf_nc_interfaces
545 Character(LEN=*),
Intent(IN) :: path
546 Integer,
Intent(IN) :: pe
550 Integer(KIND=C_INT) :: cstatus, cpe
551 Character(LEN=(LEN(path)+1)) :: cpath
562 End Function nf_delete_mp
564 Function nf_set_base_pe(ncid, pe) RESULT(status)
568 Use netcdf_nc_interfaces
572 Integer,
Intent(IN) :: ncid, pe
576 Integer(KIND=C_INT) :: cncid, cpe, cstatus
585 End Function nf_set_base_pe
587 Function nf_inq_base_pe(ncid, pe) RESULT(status)
591 Use netcdf_nc_interfaces
595 Integer,
Intent(IN) :: ncid
596 Integer,
Intent(OUT) :: pe
600 Integer(KIND=C_INT) :: cncid, cpe, cstatus
606 If (cstatus == nc_noerr)
Then 610 End Function nf_inq_base_pe
module procedure interfaces for utility routines