45 Integer,
Intent(IN) :: cmode, comm, info
46 Character(LEN=*),
Intent(IN) :: path
47 Integer,
Intent(OUT) :: ncid
51 Integer(C_INT) :: ccmode, ccomm, cinfo, cncid, cstatus
52 Character(LEN=(LEN(path)+1)) :: cpath
63 If (cstatus == nc_noerr)
Then
70 Function nf_open_par (path, mode, comm, info, ncid) RESULT(status)
78 Integer,
Intent(IN) :: mode, comm, info
79 Character(LEN=*),
Intent(IN) :: path
80 Integer,
Intent(OUT) :: ncid
84 Integer(C_INT) :: cmode, ccomm, cinfo, cncid, cstatus
85 Character(LEN=(LEN(path)+1)) :: cpath
96 If (cstatus == nc_noerr)
Then
111 Integer,
Intent(IN) :: ncid, varid, iaccess
115 Integer(C_INT) :: cncid, cvarid, caccess, cstatus
135 Integer,
Intent(IN) :: ncid
136 Character(LEN=*),
Intent(IN) :: name
137 Integer,
Intent(OUT) :: groupid
141 Integer(C_INT) :: cncid, cgroupid, cstatus
142 Character(LEN=LEN(name)+1) :: cname
147 cname = repeat(
" ",len(cname))
150 cstatus =
nc_inq_ncid(cncid, cname(1:ie), cgroupid)
152 If (cstatus == nc_noerr)
Then
167 Integer,
Intent(IN) :: ncid
168 Integer,
Intent(INOUT) :: ncids(*)
169 Integer,
Intent(OUT) :: numgrps
173 Integer(C_INT) :: cncid, cnumgrps, cstatus, cstatus1
175 Integer(C_INT),
ALLOCATABLE :: cncids(:)
187 If (cnumgrps > 0)
Then
188 ALLOCATE(cncids(cnumgrps))
196 If (cstatus == nc_noerr)
Then
198 If (numgrps > 0)
Then
199 ncids(1:numgrps) = cncids(1:numgrps)
205 If (
ALLOCATED(cncids))
DEALLOCATE (cncids)
217 Integer,
Intent(IN) :: ncid
218 Character(LEN=*),
Intent(OUT) :: name
222 Integer(C_INT) :: cncid, cstatus
223 Character(LEN=NC_MAX_NAME) :: cname
228 name = repeat(
" ",len(name))
229 cname = repeat(
" ",len(cname))
233 If (cstatus == nc_noerr)
Then
248 Integer,
Intent(IN) :: ncid
249 Character(LEN=*),
Intent(OUT) :: name
250 Integer,
Intent(OUT) :: nlen
254 Integer(C_INT) :: cncid, cstatus
255 Integer(C_SIZE_T) :: clen
256 Character(LEN=LEN(name)+1) :: cname
261 name = repeat(
" ",len(name))
262 cname = repeat(
" ",len(cname))
266 If (cstatus == nc_noerr)
Then
282 Integer,
Intent(IN) :: ncid
283 Integer,
Intent(OUT) :: nlen
287 Integer(C_INT) :: cncid, cstatus
288 Integer(C_SIZE_T) :: clen
294 If (cstatus == nc_noerr)
Then
310 Integer,
Intent(IN) :: ncid
311 Integer,
Intent(INOUT) :: parent_ncid
315 Integer(C_INT) :: cncid, cparent_ncid, cstatus
321 If (cstatus == nc_noerr)
Then
322 parent_ncid = cparent_ncid
336 Integer,
Intent(IN) :: ncid
337 Character(LEN=*),
Intent(IN) :: grp_name
338 Integer,
Intent(INOUT) :: parent_ncid
342 Integer(C_INT) :: cncid, cstatus, cparent_ncid
343 Character(LEN=(LEN(grp_name)+1)) :: cgrp_name
346 cgrp_name = repeat(
" ",len(cgrp_name))
352 If (cstatus == nc_noerr)
Then
353 parent_ncid = cparent_ncid
367 Integer,
Intent(IN) :: ncid
368 Character(LEN=*),
Intent(INOUT) :: name
369 Integer,
Intent(INOUT) :: grp_ncid
373 Integer(C_INT) :: cncid, cstatus, cgrp_ncid
374 Character(LEN=(LEN(name)+1)) :: cgrp_name
378 cgrp_name = repeat(
" ",len(cgrp_name))
383 If (cstatus == nc_noerr)
Then
398 Integer,
Intent(IN) :: ncid
399 Integer,
Intent(OUT) :: nvars
400 Integer,
Intent(INOUT) :: varids(*)
404 Integer(C_INT) :: cncid, cnvars, cstatus
411 If (cstatus == nc_noerr)
Then
426 Integer,
Intent(IN) :: ncid, parent
427 Integer,
Intent(OUT) :: ndims
428 Integer,
Intent(INOUT) :: dimids(*)
432 Integer(C_INT) :: cncid, cndims, cparent, cstatus
439 If (cstatus == nc_noerr)
Then
454 Integer,
Intent(IN) :: ncid
455 Integer,
Intent(OUT) :: ntypes
456 Integer,
Intent(INOUT) :: typeids(*)
460 Integer(C_INT) :: cncid, cntypes, cstatus, cstatus1
462 Integer(C_INT),
ALLOCATABLE :: ctypeids(:)
470 If (cntypes > 0)
Then
471 ALLOCATE(ctypeids(cntypes))
473 ALLOCATE(ctypeids(1))
479 If (cstatus == nc_noerr)
Then
482 typeids(1:ntypes) = ctypeids(1:ntypes)
488 If(
ALLOCATED(ctypeids))
DEALLOCATE(ctypeids)
500 Integer,
Intent(IN) :: ncid
501 Character(LEN=*),
Intent(IN) :: name
502 Integer,
Intent(OUT) :: typeid
506 Integer(C_INT) :: cncid, ctypeid, cstatus
507 Character(LEN=LEN(name)+1) :: cname
512 cname = repeat(
" ",len(cname))
517 If (cstatus == nc_noerr)
Then
524 Function nf_def_grp( parent_ncid, name, new_ncid) RESULT (status)
532 Integer,
Intent(IN) :: parent_ncid
533 Character(LEN=*),
Intent(IN) :: name
534 Integer,
Intent(OUT) :: new_ncid
538 Integer(C_INT) :: cncid, cnew_ncid, cstatus
539 Character(LEN=(LEN(name)+1)) :: cname
543 cname = repeat(
" ",len(cname))
546 cstatus =
nc_def_grp(cncid, cname(1:ie), cnew_ncid)
548 If (cstatus == nc_noerr)
Then
563 Integer,
Intent(IN) :: grpid
564 Character(LEN=*),
Intent(IN) :: name
568 Integer(C_INT) :: cgrpid, cstatus
569 Character(LEN=(LEN(name)+1)) :: cname
573 cname = repeat(
" ",len(cname))
590 Integer,
Intent(IN) :: ncid, isize
591 Integer,
Intent(OUT) :: typeid
592 Character(LEN=*),
Intent(IN) :: name
596 Integer(C_INT) :: cncid, ctypeid, cstatus
597 Integer(C_SIZE_T) :: csize
598 Character(LEN=(LEN(name)+1)) :: cname
603 cname = repeat(
" ",len(cname))
608 If (cstatus == nc_noerr)
Then
625 Integer,
Intent(IN) :: ncid, xtype, field_typeid, offset
626 Character(LEN=*),
Intent(IN) :: name
630 Integer(C_INT) :: cncid, cxtype, ctypeid, cstatus
631 Integer(C_SIZE_T) :: coffset
632 Character(LEN=(LEN(name)+1)) :: cname
637 ctypeid = field_typeid
639 cname = repeat(
" ",len(cname))
650 ndims, dim_sizes) result(status)
658 Integer,
Intent(IN) :: ncid, xtype, field_typeid, offset, ndims
659 Character(LEN=*),
Intent(IN) :: name
660 Integer,
Intent(INOUT) :: dim_sizes(*)
664 Integer(C_INT) :: cncid, cxtype, ctypeid, cndims, cstatus
665 Integer(C_SIZE_T) :: coffset
666 Character(LEN=(LEN(name)+1)) :: cname
671 ctypeid = field_typeid
674 cname = repeat(
" ",len(cname))
678 coffset, ctypeid, cndims, dim_sizes)
692 Integer,
Intent(IN) :: ncid, xtype
693 Character(LEN=*),
Intent(IN) :: name
694 Integer,
Intent(OUT) :: isize
698 Integer(C_INT) :: cncid, cxtype, cstatus
699 Integer(C_SIZE_T) :: csize
700 Character(LEN=(LEN(name)+1)) :: cname
705 cname = repeat(
" ",len(cname))
708 cstatus =
nc_inq_type(cncid, cxtype, cname(1:ie), csize)
710 If (cstatus == nc_noerr)
Then
725 Integer,
Intent(IN) :: ncid, xtype
726 Character(LEN=*),
Intent(INOUT) :: name
727 Integer,
Intent(INOUT) :: isize, nfields
731 Integer(C_INT) :: cncid, cxtype, cstatus
732 Integer(C_SIZE_T) :: csize, cnfieldsp
733 Character(LEN=NC_MAX_NAME+1) :: cname
739 name = repeat(
" ", nlen)
740 cname = repeat(
" ", len(cname))
744 If (cstatus == nc_noerr)
Then
761 Integer,
Intent(IN) :: ncid, xtype
762 Character(LEN=*),
Intent(OUT) :: name
766 Integer(C_INT) :: cncid, cxtype, cstatus
767 Character(LEN=NC_MAX_NAME+1) :: cname
773 name = repeat(
" ",len(name))
774 cname = repeat(
" ",len(cname))
778 If (cstatus == nc_noerr)
Then
793 Integer,
Intent(IN) :: ncid, xtype
794 Integer,
Intent(INOUT) :: isize
798 Integer(C_INT) :: cncid, cxtype, cstatus
799 Integer(C_SIZE_T) :: csize
806 If (cstatus == nc_noerr)
Then
822 Integer,
Intent(IN) :: ncid, xtype
823 Integer,
Intent(INOUT) :: nfields
827 Integer(C_INT) :: cncid, cxtype, cstatus
828 Integer(C_SIZE_T) :: cnfields
835 If (cstatus == nc_noerr)
Then
844 field_typeid, ndims, dim_sizes) result(status)
852 Integer,
Intent(IN) :: ncid, xtype, fieldid
853 Character(LEN=*),
Intent(OUT) :: name
854 Integer,
Intent(OUT) :: offset, field_typeid, ndims
855 Integer,
Intent(OUT) :: dim_sizes(*)
859 Integer(C_INT) :: cncid, cxtype, cfieldid, cfield_typeid, &
860 cndims, cstatus, cstatus1
861 Integer(C_SIZE_T) :: coffset
862 Character(LEN=NC_MAX_NAME+1) :: cname
865 Integer(C_INT),
ALLOCATABLE :: cdim_sizes(:)
871 name = repeat(
" ",len(name))
872 cname = repeat(
" ",len(cname))
878 ALLOCATE(cdim_sizes(cndims))
880 ALLOCATE(cdim_sizes(1))
886 cfield_typeid, cndims, cdim_sizes)
887 If (cstatus == nc_noerr)
Then
890 field_typeid = cfield_typeid
893 dim_sizes(1:ndims) = cdim_sizes(1:ndims)
899 If (
ALLOCATED(cdim_sizes))
DEALLOCATE(cdim_sizes)
911 Integer,
Intent(IN) :: ncid, xtype, fieldid
912 Character(LEN=*),
Intent(OUT) :: name
916 Integer(C_INT) :: cncid, cxtype, cfieldid, cstatus
917 Character(LEN=NC_MAX_NAME+1) :: cname
922 cfieldid = fieldid - 1
924 name = repeat(
" ",len(name))
925 cname = repeat(
" ",len(cname))
929 If (cstatus == nc_noerr)
Then
945 Integer,
Intent(IN) :: ncid, xtype
946 Character(LEN=*),
Intent(IN) :: name
947 Integer,
Intent(OUT) :: fieldid
951 Integer(C_INT) :: cncid, cxtype, cfieldid, cstatus
952 Character(LEN=(LEN(name)+1)) :: cname
957 cname = repeat(
" ",len(cname))
962 If (cstatus == nc_noerr)
Then
963 fieldid = cfieldid + 1
979 Integer,
Intent(IN) :: ncid, xtype, fieldid
980 Integer,
Intent(OUT) :: offset
984 Integer(C_INT) :: cncid, cxtype, cfieldid, cstatus
985 Integer(C_SIZE_T) :: coffset
989 cfieldid = fieldid - 1
993 If (cstatus == nc_noerr)
Then
1010 Integer,
Intent(IN) :: ncid, xtype, fieldid
1011 Integer,
Intent(OUT) :: field_typeid
1015 Integer(C_INT) :: cncid, cxtype, cfieldid, cfield_typeid, cstatus
1019 cfieldid = fieldid -1
1023 If (cstatus == nc_noerr)
Then
1024 field_typeid = cfield_typeid
1039 Integer,
Intent(IN) :: ncid, xtype, fieldid
1040 Integer,
Intent(OUT) :: ndims
1044 Integer(C_INT) :: cncid, cxtype, cfieldid, cndims, cstatus
1048 cfieldid = fieldid -1
1052 If (cstatus == nc_noerr)
Then
1069 Integer,
Intent(IN) :: ncid, xtype, fieldid
1070 Integer,
Intent(INOUT) :: dim_sizes(*)
1074 Integer(C_INT) :: cncid, cxtype, cfieldid, cstatus
1078 cfieldid = fieldid - 1
1094 Integer,
Intent(IN) :: ncid, base_typeid
1095 Character(LEN=*),
Intent(IN) :: name
1096 Integer,
Intent(OUT) :: xtype
1100 Integer(C_INT) :: cncid, cxtype, cbase_typeid, cstatus
1101 Character(LEN=(LEN(name)+1)) :: cname
1106 cbase_typeid = base_typeid
1107 cname = repeat(
" ",len(cname))
1110 cstatus =
nc_def_vlen(cncid, cname(1:ie), cbase_typeid, cxtype)
1112 If (cstatus == nc_noerr)
Then
1120 Function nf_inq_vlen( ncid, xtype, name, datum_size, base_type) RESULT(status)
1128 Integer,
Intent(IN) :: ncid, xtype
1129 Character(LEN=*),
Intent(OUT) :: name
1130 Integer,
Intent(OUT) :: datum_size, base_type
1134 Integer(C_INT) :: cncid, cxtype, cbase_type, cstatus
1135 Integer(C_SIZE_T) :: cdatum_size
1136 Character(LEN=NC_MAX_NAME+1) :: cname
1142 name = repeat(
" ",len(name))
1143 cname = repeat(
" ",len(cname))
1145 cstatus =
nc_inq_vlen(cncid, cxtype, cname, cdatum_size, cbase_type)
1147 If (cstatus == nc_noerr)
Then
1149 datum_size = cdatum_size
1150 base_type = cbase_type
1158 iclass) result(status)
1167 Integer,
Intent(IN) :: ncid, xtype
1168 Character(LEN=*),
Intent(INOUT) :: name
1169 Integer,
Intent(OUT) :: isize, nfields, base_type, iclass
1173 Integer(C_INT) :: cncid, cxtype, cbase_type, cclass, cstatus
1174 Integer(C_SIZE_T) :: csize, cnfields
1175 Character(LEN=NC_MAX_NAME+1) :: cname
1181 name = repeat(
" ",len(name))
1182 cname = repeat(
" ",len(cname))
1185 cstatus =
nc_inq_user_type(cncid, cxtype, cname, csize, cbase_type, cnfields, &
1188 If (cstatus == nc_noerr)
Then
1193 base_type = cbase_type
1200 Function nf_def_enum( ncid, base_typeid, name, typeid) RESULT (status)
1208 Integer,
Intent(IN) :: ncid, base_typeid
1209 Character(LEN=*),
Intent(IN) :: name
1210 Integer,
Intent(OUT) :: typeid
1214 Integer(C_INT) :: cncid, cbase_typeid, ctypeid, cstatus
1215 Character(LEN=(LEN(name)+1)) :: cname
1219 cbase_typeid = base_typeid
1220 cname = repeat(
" ",len(cname))
1223 cstatus =
nc_def_enum(cncid, cbase_typeid, cname(1:ie), ctypeid)
1225 If (cstatus == nc_noerr)
Then
1245 Integer,
Intent(IN) :: ncid, xtype
1246 Character(LEN=*),
Intent(IN) :: name
1247 Character(KIND=C_CHAR),
Intent(IN),
TARGET :: value(*)
1251 Integer(C_INT) :: cncid, cxtype, cstatus
1252 Type(c_ptr
) :: cvalueptr
1253 Character(LEN=(LEN(name)+1)) :: cname
1258 cname = repeat(
" ",len(cname))
1261 cvalueptr = c_loc(value)
1270 num_members) result(status)
1278 Integer,
Intent(IN) :: ncid, xtype
1279 Character(LEN=*),
Intent(INOUT) :: name
1280 Integer,
Intent(INOUT) :: base_nf_type, base_size, num_members
1284 Integer(C_INT) :: cncid, cxtype, c_base_nf_type, cstatus
1285 Integer(C_SIZE_T) :: c_base_size, c_num_members
1286 Character(LEN=NC_MAX_NAME+1) :: cname
1292 name = repeat(
" ",len(name))
1293 cname = repeat(
" ",len(cname))
1295 cstatus =
nc_inq_enum(cncid, cxtype, cname, c_base_nf_type, c_base_size, &
1298 If (cstatus == nc_noerr)
Then
1300 base_nf_type = c_base_nf_type
1301 base_size = c_base_size
1302 num_members = c_num_members
1320 Integer,
Intent(IN) :: ncid, xtype, idx
1321 Character(LEN=*),
Intent(OUT) :: name
1322 Character(KIND=C_CHAR),
Intent(OUT) :: value(*)
1326 Integer(C_INT) :: cncid, cxtype, cidx, cstatus
1327 Character(LEN=NC_MAX_NAME+1) :: cname
1334 name = repeat(
" ",len(name))
1335 cname = repeat(
" ",len(cname))
1339 If (cstatus == nc_noerr)
Then
1355 Integer,
Intent(IN) :: ncid, xtype, value
1356 Character(LEN=*),
Intent(INOUT) :: name
1360 Integer(C_INT) :: cncid, cxtype, cstatus
1361 Integer(C_LONG_LONG) :: cvalue
1362 Character(LEN=NC_MAX_NAME+1) :: cname
1369 name = repeat(
" ",len(name))
1370 cname = repeat(
" ",len(cname))
1374 If (cstatus == nc_noerr)
Then
1390 Integer,
Intent(IN) :: ncid, isize
1391 Character(LEN=*),
Intent(IN) :: name
1392 Integer,
Intent(OUT) :: xtype
1396 Integer(C_INT) :: cncid, cxtype, cstatus
1397 Integer(C_SIZE_T) :: csize
1398 Character(LEN=(LEN(name)+1)) :: cname
1404 cname = repeat(
" ",len(cname))
1409 If (cstatus == nc_noerr)
Then
1425 Integer,
Intent(IN) :: ncid, xtype
1426 Character(LEN=*),
Intent(INOUT) :: name
1427 Integer,
Intent(OUT) :: isize
1431 Integer(C_INT) :: cncid, cxtype, cstatus
1432 Integer(C_SIZE_T) :: csize
1433 Character(LEN=NC_MAX_NAME+1) :: cname
1439 name = repeat(
" ",len(name))
1440 cname = repeat(
" ",len(cname))
1444 If (cstatus == nc_noerr)
Then
1462 Integer,
Intent(IN) :: ncid, varid, contiguous
1463 Integer,
Intent(INOUT) :: chunksizes(*)
1467 Integer(C_INT) :: cncid, cvarid, ccontiguous, cstat1, cstatus, &
1469 Type(c_ptr
) :: cchunksizeptr
1472 Integer(C_INT),
ALLOCATABLE,
TARGET :: cchunksizes(:)
1476 ccontiguous = contiguous
1481 cchunksizeptr = c_null_ptr
1483 If (cstat1 == nc_noerr)
Then
1485 ALLOCATE(cchunksizes(ndims))
1486 cchunksizes(1:ndims) = chunksizes(ndims:1:-1)
1487 cchunksizeptr = c_loc(cchunksizes)
1497 cchunksizeptr = c_null_ptr
1498 If (
ALLOCATED(cchunksizes))
DEALLOCATE(cchunksizes)
1510 Integer,
Intent(IN) :: ncid, varid
1511 Integer,
Intent(INOUT) :: contiguous
1512 Integer,
Intent(INOUT) :: chunksizes(*)
1516 Integer(C_INT) :: cncid, cvarid, ccontiguous, cstatus, cstat1, cndims
1519 Integer(C_INT),
ALLOCATABLE :: cchunksizes(:)
1529 If (cndims > 0)
Then
1530 ALLOCATE(cchunksizes(cndims))
1532 ALLOCATE(cchunksizes(1))
1540 If (cstatus == nc_noerr)
Then
1542 chunksizes(ndims:1:-1) = cchunksizes(1:ndims)
1544 contiguous = ccontiguous
1549 If (
ALLOCATED(cchunksizes))
DEALLOCATE(cchunksizes)
1562 Integer,
Intent(IN) :: ncid, varid, shuffle, deflate, deflate_level
1566 Integer(C_INT) :: cncid, cvarid, cshuffle, cdeflate, cdeflate_level, &
1573 cdeflate_level = deflate_level
1589 Integer,
Intent(IN) :: ncid, varid
1590 Integer,
Intent(OUT) :: shuffle, deflate, deflate_level
1594 Integer(C_INT) :: cncid, cvarid, cshuffle, cdeflate, cdeflate_level, &
1602 If (cstatus == nc_noerr)
Then
1605 deflate_level = cdeflate_level
1621 Integer,
Intent(IN) :: ncid, varid
1622 Integer,
Intent(INOUT) :: options_mask, pixels_per_block
1626 Integer(C_INT) :: cncid, cvarid, coptions_mask, cpixels_per_block, cstatus
1631 cstatus =
nc_inq_var_szip(cncid, cvarid, coptions_mask, cpixels_per_block)
1633 If (cstatus == nc_noerr)
Then
1634 options_mask = coptions_mask
1635 pixels_per_block = cpixels_per_block
1651 Integer,
Intent(IN) :: ncid, varid, fletcher32
1655 Integer(C_INT) :: cncid, cvarid, cfletcher32, cstatus
1659 cfletcher32 = fletcher32
1675 Integer,
Intent(IN) :: ncid, varid
1676 Integer,
Intent(OUT) :: fletcher32
1680 Integer(C_INT) :: cncid, cvarid, cfletcher32, cstatus
1687 If (cstatus == nc_noerr)
Then
1688 fletcher32 = cfletcher32
1703 Integer,
Intent(IN) :: ncid, varid, no_fill
1704 Character(KIND=C_CHAR),
Intent(IN),
TARGET :: fill_value(*)
1708 Integer(C_INT) :: cncid, cvarid, cno_fill, cstatus
1709 Type(c_ptr
) :: cfill_value_p
1715 cfill_value_p = c_loc(fill_value)
1731 Integer,
Intent(IN) :: ncid, varid
1732 Integer,
Intent(OUT) :: no_fill
1733 Character(KIND=C_CHAR),
Intent(INOUT) :: fill_value(*)
1737 Integer(C_INT) :: cncid, cvarid, cno_fill, cstatus
1744 If (cstatus == nc_noerr)
Then
1760 Integer,
Intent(IN) :: ncid, varid, endiann
1764 Integer(C_INT) :: cncid, cvarid, cendiann, cstatus
1784 Integer,
Intent(IN) :: ncid, varid
1785 Integer,
Intent(OUT) :: endiann
1789 Integer(C_INT) :: cncid, cvarid, cendiann, cstatus
1796 If (cstatus == nc_noerr)
Then
1804 Function nf_put_att(ncid, varid, name, xtype, nlen, value) RESULT(status)
1813 Integer,
Intent(IN) :: ncid, varid, nlen, xtype
1814 Character(LEN=*),
Intent(IN) :: name
1815 Character(KIND=C_CHAR),
Intent(IN),
TARGET :: value(*)
1819 Integer(C_INT) :: cncid, cvarid, cstatus, cxtype
1820 Integer(C_SIZE_T) :: cnlen
1821 Type(c_ptr
) :: cvalueptr
1822 Character(LEN=(LEN(name)+1)) :: cname
1829 cvalueptr = c_loc(value)
1830 cname = repeat(
" ",len(cname))
1833 cstatus =
nc_put_att(cncid, cvarid, cname(1:ie), cxtype, cnlen, cvalueptr)
1849 Integer,
Intent(IN) :: ncid, varid
1850 Character(LEN=*),
Intent(IN) :: name
1851 Character(KIND=C_CHAR),
Intent(INOUT) :: value(*)
1855 Integer(C_INT) :: cncid, cvarid, cstatus
1856 Character(LEN=(LEN(name)+1)) :: cname
1861 cname = repeat(
" ",len(cname))
1864 cstatus =
nc_get_att(cncid, cvarid, cname(1:ie), value)
1884 Integer,
Intent(IN) :: ncid, xtype, nlen
1885 Character(KIND=C_CHAR),
Intent(INOUT) :: vlen_element(*)
1886 Character(KIND=C_CHAR),
Intent(IN),
TARGET :: value(*)
1890 Integer(C_INT) :: cncid, cxtype, cstatus
1891 Integer(C_SIZE_T) :: cnlen
1892 Type(c_ptr
) :: cvalueptr
1897 cvalueptr = c_loc(value)
1919 Integer,
Intent(IN) :: ncid, xtype
1920 Integer,
Intent(INOUT) :: nlen
1921 Character(LEN=*),
Intent(INOUT),
TARGET :: vlen_element
1922 Character(KIND=C_CHAR),
Intent(INOUT) :: value(*)
1926 Integer(C_INT) :: cncid, cxtype, cstatus
1927 Integer(C_SIZE_T) :: cnlen
1935 If (cstatus == nc_noerr)
Then
1953 Character(KIND=C_CHAR),
Intent(IN),
TARGET :: vl(*)
1957 Integer(C_INT) :: cstatus
1978 Integer,
Intent(IN) :: ilen
1979 Character(KIND=C_CHAR),
Intent(IN),
TARGET :: vl(*)
1983 Integer(C_SIZE_T) :: clen
1984 Integer(C_INT) :: cstatus
2006 Integer,
Intent(IN) :: ilen
2007 Character(KIND=C_CHAR),
Intent(IN),
TARGET :: vl(*)
2011 Integer(C_SIZE_T) :: clen
2012 Integer(C_INT) :: cstatus
2036 Integer,
Intent(IN) :: ncid, varid
2037 Character(KIND=C_CHAR),
Intent(IN),
TARGET :: values(*)
2041 Integer(C_INT) :: cncid, cvarid, cstatus
2042 Type(c_ptr
) :: cvaluesptr
2047 cvaluesptr = c_loc(values)
2049 cstatus =
nc_put_var(cncid, cvarid, cvaluesptr)
2066 Integer,
Intent(IN) :: ncid, varid
2067 Character(KIND=C_CHAR),
Intent(INOUT) :: values(*)
2071 Integer(C_INT) :: cncid, cvarid, cstatus
2094 Integer,
Intent(IN) :: ncid, varid
2095 Integer,
Intent(IN) :: ndex(*)
2096 Integer(IK8),
Intent(IN) :: ival
2100 Integer(C_INT) :: cncid, cvarid, cndims, cstat1, cstatus
2101 Integer(C_LONG_LONG) :: cival
2102 Type(c_ptr
) :: cndexptr
2105 Integer(C_SIZE_T),
ALLOCATABLE,
TARGET :: cndex(:)
2113 cndexptr = c_null_ptr
2116 If (cstat1 == nc_noerr)
Then
2118 ALLOCATE(cndex(ndims))
2119 cndex(1:ndims) = ndex(ndims:1:-1) - 1
2120 cndexptr = c_loc(cndex)
2130 cndexptr = c_null_ptr
2131 If (
ALLOCATED(cndex))
DEALLOCATE(cndex)
2143 Integer,
Intent(IN) :: ncid, varid
2144 Integer,
Intent(IN) :: start(*), counts(*)
2145 Integer(IK8),
Intent(IN) :: ivals(*)
2149 Integer(C_INT) :: cncid, cvarid, cndims, cstat1, cstatus
2150 Type(c_ptr
) :: cstartptr, ccountsptr
2153 Integer(C_SIZE_T),
ALLOCATABLE,
TARGET :: cstart(:), ccounts(:)
2160 cstartptr = c_null_ptr
2161 ccountsptr = c_null_ptr
2164 If (cstat1 == nc_noerr)
Then
2166 ALLOCATE(cstart(ndims))
2167 ALLOCATE(ccounts(ndims))
2168 cstart(1:ndims) = start(ndims:1:-1) - 1
2169 ccounts(1:ndims) = counts(ndims:1:-1)
2170 cstartptr = c_loc(cstart)
2171 ccountsptr = c_loc(ccounts)
2181 cstartptr = c_null_ptr
2182 ccountsptr = c_null_ptr
2183 If (
ALLOCATED(ccounts))
DEALLOCATE(ccounts)
2184 If (
ALLOCATED(cstart))
DEALLOCATE(cstart)
2197 Integer,
Intent(IN) :: ncid, varid
2198 Integer,
Intent(IN) :: start(*), counts(*), strides(*)
2199 Integer(IK8),
Intent(IN) :: ivals(*)
2203 Integer(C_INT) :: cncid, cvarid, cndims, cstat1, cstatus
2204 Type(c_ptr
) :: cstartptr, ccountsptr, cstridesptr
2207 Integer(C_SIZE_T),
ALLOCATABLE,
TARGET :: cstart(:), ccounts(:)
2208 Integer(C_PTRDIFF_T),
ALLOCATABLE,
TARGET :: cstrides(:)
2215 cstartptr = c_null_ptr
2216 ccountsptr = c_null_ptr
2217 cstridesptr = c_null_ptr
2220 If (cstat1 == nc_noerr)
Then
2222 ALLOCATE(cstart(ndims))
2223 ALLOCATE(ccounts(ndims))
2224 ALLOCATE(cstrides(ndims))
2225 cstart(1:ndims) = start(ndims:1:-1) - 1
2226 ccounts(1:ndims) = counts(ndims:1:-1)
2227 cstrides(1:ndims) = strides(ndims:1:-1)
2228 cstartptr = c_loc(cstart)
2229 ccountsptr = c_loc(ccounts)
2230 cstridesptr = c_loc(cstrides)
2241 cstartptr = c_null_ptr
2242 ccountsptr = c_null_ptr
2243 cstridesptr = c_null_ptr
2244 If (
ALLOCATED(cstrides))
DEALLOCATE(cstrides)
2245 If (
ALLOCATED(ccounts))
DEALLOCATE(ccounts)
2246 If (
ALLOCATED(cstart))
DEALLOCATE(cstart)
2252 ivals) result(status)
2260 Integer,
Intent(IN) :: ncid, varid
2261 Integer,
Intent(IN) :: start(*), counts(*), strides(*), maps(*)
2262 Integer(IK8),
Intent(IN) :: ivals(*)
2266 Integer(C_INT) :: cncid, cvarid, cndims, cstat1, cstatus
2267 Type(c_ptr
) :: cstartptr, ccountsptr, cstridesptr, cmapsptr
2270 Integer(C_SIZE_T),
ALLOCATABLE,
TARGET :: cstart(:), ccounts(:)
2271 Integer(C_PTRDIFF_T),
ALLOCATABLE,
TARGET :: cstrides(:), cmaps(:)
2278 cstartptr = c_null_ptr
2279 ccountsptr = c_null_ptr
2280 cstridesptr = c_null_ptr
2281 cmapsptr = c_null_ptr
2284 If (cstat1 == nc_noerr)
Then
2286 ALLOCATE(cstart(ndims))
2287 ALLOCATE(ccounts(ndims))
2288 ALLOCATE(cstrides(ndims))
2289 ALLOCATE(cmaps(ndims))
2290 cstart(1:ndims) = start(ndims:1:-1) - 1
2291 ccounts(1:ndims) = counts(ndims:1:-1)
2292 cstrides(1:ndims) = strides(ndims:1:-1)
2293 cmaps(1:ndims) = maps(ndims:1:-1)
2294 cstartptr = c_loc(cstart)
2295 ccountsptr = c_loc(ccounts)
2296 cstridesptr = c_loc(cstrides)
2297 cmapsptr = c_loc(cmaps)
2302 cstridesptr, cmapsptr, ivals)
2308 cstartptr = c_null_ptr
2309 ccountsptr = c_null_ptr
2310 cstridesptr = c_null_ptr
2311 cmapsptr = c_null_ptr
2312 If (
ALLOCATED(cmaps))
DEALLOCATE(cmaps)
2313 If (
ALLOCATED(cstrides))
DEALLOCATE(cstrides)
2314 If (
ALLOCATED(ccounts))
DEALLOCATE(ccounts)
2315 If (
ALLOCATED(cstart))
DEALLOCATE(cstart)
2327 Integer,
Intent(IN) :: ncid, varid
2328 Integer(IK8),
Intent(IN) :: ivals(*)
2332 Integer(C_INT) :: cncid, cvarid, cstatus
2351 Integer,
Intent(IN) :: ncid, varid
2352 Integer,
Intent(IN) :: ndex(*)
2353 Integer(IK8),
Intent(OUT) :: ival
2357 Integer(C_INT) :: cncid, cvarid, cndims, cstat1, cstatus
2358 Integer(C_LONG_LONG) :: cival
2359 Type(c_ptr
) :: cndexptr
2362 Integer(C_SIZE_T),
ALLOCATABLE,
TARGET :: cndex(:)
2369 cndexptr = c_null_ptr
2372 If (cstat1 == nc_noerr)
Then
2374 ALLOCATE(cndex(ndims))
2375 cndex(1:ndims) = ndex(ndims:1:-1) - 1
2376 cndexptr = c_loc(cndex)
2387 cndexptr = c_null_ptr
2388 If (
ALLOCATED(cndex))
DEALLOCATE(cndex)
2400 Integer,
Intent(IN) :: ncid, varid
2401 Integer,
Intent(IN) :: start(*), counts(*)
2402 Integer(IK8),
Intent(OUT) :: ivals(*)
2406 Integer(C_INT) :: cncid, cvarid, cndims, cstat1, cstatus
2407 Type(c_ptr
) :: cstartptr, ccountsptr
2410 Integer(C_SIZE_T),
ALLOCATABLE,
TARGET :: cstart(:), ccounts(:)
2417 cstartptr = c_null_ptr
2418 ccountsptr = c_null_ptr
2421 If (cstat1 == nc_noerr)
Then
2423 ALLOCATE(cstart(ndims))
2424 ALLOCATE(ccounts(ndims))
2425 cstart(1:ndims) = start(ndims:1:-1) - 1
2426 ccounts(1:ndims) = counts(ndims:1:-1)
2427 cstartptr = c_loc(cstart)
2428 ccountsptr = c_loc(ccounts)
2438 cstartptr = c_null_ptr
2439 ccountsptr = c_null_ptr
2440 If (
ALLOCATED(ccounts))
DEALLOCATE(ccounts)
2441 If (
ALLOCATED(cstart))
DEALLOCATE(cstart)
2455 Integer,
Intent(IN) :: ncid, varid
2456 Integer,
Intent(IN) :: start(*), counts(*), strides(*)
2457 Integer(IK8),
Intent(OUT) :: ivals(*)
2461 Integer(C_INT) :: cncid, cvarid, cndims, cstat1, cstatus
2462 Type(c_ptr
) :: cstartptr, ccountsptr, cstridesptr
2465 Integer(C_SIZE_T),
ALLOCATABLE,
TARGET :: cstart(:), ccounts(:)
2466 Integer(C_PTRDIFF_T),
ALLOCATABLE,
TARGET :: cstrides(:)
2473 cstartptr = c_null_ptr
2474 ccountsptr = c_null_ptr
2475 cstridesptr = c_null_ptr
2478 If (cstat1 == nc_noerr)
Then
2480 ALLOCATE(cstart(ndims))
2481 ALLOCATE(ccounts(ndims))
2482 ALLOCATE(cstrides(ndims))
2483 cstart(1:ndims) = start(ndims:1:-1) - 1
2484 ccounts(1:ndims) = counts(ndims:1:-1)
2485 cstrides(1:ndims) = strides(ndims:1:-1)
2486 cstartptr = c_loc(cstart)
2487 ccountsptr = c_loc(ccounts)
2488 cstridesptr = c_loc(cstrides)
2498 cstartptr = c_null_ptr
2499 ccountsptr = c_null_ptr
2500 cstridesptr = c_null_ptr
2501 If (
ALLOCATED(cstrides))
DEALLOCATE(cstrides)
2502 If (
ALLOCATED(ccounts))
DEALLOCATE(ccounts)
2503 If (
ALLOCATED(cstart))
DEALLOCATE(cstart)
2508 ivals) result(status)
2516 Integer,
Intent(IN) :: ncid, varid
2517 Integer,
Intent(IN) :: start(*), counts(*), strides(*), maps(*)
2518 Integer(IK8),
Intent(OUT) :: ivals(*)
2522 Integer(C_INT) :: cncid, cvarid, cndims, cstat1, cstatus
2523 Type(c_ptr
) :: cstartptr, ccountsptr, cstridesptr, cmapsptr
2526 Integer(C_SIZE_T),
ALLOCATABLE,
TARGET :: cstart(:), ccounts(:)
2527 Integer(C_PTRDIFF_T),
ALLOCATABLE,
TARGET :: cstrides(:), cmaps(:)
2534 cstartptr = c_null_ptr
2535 ccountsptr = c_null_ptr
2536 cstridesptr = c_null_ptr
2537 cmapsptr = c_null_ptr
2540 If (cstat1 == nc_noerr)
Then
2542 ALLOCATE(cstart(ndims))
2543 ALLOCATE(ccounts(ndims))
2544 ALLOCATE(cstrides(ndims))
2545 ALLOCATE(cmaps(ndims))
2546 cstart(1:ndims) = start(ndims:1:-1) - 1
2547 ccounts(1:ndims) = counts(ndims:1:-1)
2548 cstrides(1:ndims) = strides(ndims:1:-1)
2549 cmaps(1:ndims) = maps(ndims:1:-1)
2550 cstartptr = c_loc(cstart)
2551 ccountsptr = c_loc(ccounts)
2552 cstridesptr = c_loc(cstrides)
2553 cmapsptr = c_loc(cmaps)
2558 cstridesptr, cmapsptr, ivals)
2564 cstartptr = c_null_ptr
2565 ccountsptr = c_null_ptr
2566 cstridesptr = c_null_ptr
2567 cmapsptr = c_null_ptr
2568 If (
ALLOCATED(cmaps))
DEALLOCATE(cmaps)
2569 If (
ALLOCATED(cstrides))
DEALLOCATE(cstrides)
2570 If (
ALLOCATED(ccounts))
DEALLOCATE(ccounts)
2571 If (
ALLOCATED(cstart))
DEALLOCATE(cstart)
2583 Integer,
Intent(IN) :: ncid, varid
2584 Integer(IK8),
Intent(OUT) :: ivals(*)
2588 Integer(C_INT) :: cncid, cvarid, cstatus
2609 Integer,
Intent(IN) :: chunk_size, nelems, preemption
2613 Integer(C_INT) :: cchunk_size, cnelems, cpreemption, cstatus
2615 cchunk_size = chunk_size
2617 cpreemption = preemption
2635 Integer,
Intent(INOUT) :: chunk_size, nelems, preemption
2639 Integer(C_INT) :: cchunk_size, cnelems, cpreemption, cstatus
2643 If (cstatus == nc_noerr)
Then
2644 chunk_size = cchunk_size
2646 preemption = cpreemption
2661 Integer,
Intent(IN) :: ncid, varid, chunk_size, nelems, preemption
2665 Integer(C_INT) :: cncid, cvarid, cchunk_size, cnelems, cpreemption, &
2670 cchunk_size = chunk_size
2672 cpreemption = preemption
2690 Integer,
Intent(IN) :: ncid, varid
2691 Integer,
Intent(INOUT) :: chunk_size, nelems, preemption
2695 Integer(C_INT) :: cncid, cvarid, cchunk_size, cnelems, cpreemption, &
2704 If (cstatus == nc_noerr)
Then
2705 chunk_size = cchunk_size
2707 preemption = cpreemption
integer function nf_free_string(ilen, vl)
integer function nf_inq_grp_ncid(ncid, grp_name, parent_ncid)
integer function nf_free_vlens(ilen, vl)
integer function nf_inq_compound_fieldoffset(ncid, xtype, fieldid, offset)
integer function nf_inq_ncid(ncid, name, groupid)
integer function nf_def_var_deflate(ncid, varid, shuffle, deflate, deflate_level)
integer function nf_inq_var_fill(ncid, varid, no_fill, fill_value)
integer function nf_inq_var_szip(ncid, varid, options_mask, pixels_per_block)
integer function nf_inq_grp_full_ncid(ncid, name, grp_ncid)
integer function nf_inq_compound_field(ncid, xtype, fieldid, name, offset, field_typeid, ndims, dim_sizes)
integer function nf_def_grp(parent_ncid, name, new_ncid)
integer function nf_inq_grpname_len(ncid, nlen)
integer function nf_put_var1_int64(ncid, varid, ndex, ival)
integer function nf_inq_compound_fieldndims(ncid, xtype, fieldid, ndims)
integer function nf_rename_grp(grpid, name)
integer function nf_get_varm_int64(ncid, varid, start, counts, strides, maps, ivals)
integer function nf_def_opaque(ncid, isize, name, xtype)
integer function nf_get_var1_int64(ncid, varid, ndex, ival)
integer function nf_insert_array_compound(ncid, xtype, name, offset, field_typeid, ndims, dim_sizes)
integer function nf_put_var_int64(ncid, varid, ivals)
integer function nf_inq_compound_fielddim_sizes(ncid, xtype, fieldid, dim_sizes)
integer function nf_inq_compound_fieldindex(ncid, xtype, name, fieldid)
integer function nf_inq_grpname(ncid, name)
integer function nf_inq_var_chunking(ncid, varid, contiguous, chunksizes)
integer function nf_inq_var_fletcher32(ncid, varid, fletcher32)
integer function nf_inq_compound_fieldtype(ncid, xtype, fieldid, field_typeid)
integer function nf_inq_grps(ncid, numgrps, ncids)
integer function nf_inq_compound(ncid, xtype, name, isize, nfields)
integer function nf_get_vlen_element(ncid, xtype, vlen_element, nlen, value)
integer function nf_inq_typeids(ncid, ntypes, typeids)
integer function nf_inq_compound_name(ncid, xtype, name)
integer function nf_inq_typeid(ncid, name, typeid)
integer function nf_inq_vlen(ncid, xtype, name, datum_size, base_type)
integer function nf_def_var_chunking(ncid, varid, contiguous, chunksizes)
integer function nf_inq_varids(ncid, nvars, varids)
integer function nf_inq_compound_size(ncid, xtype, isize)
integer function nf_inq_var_deflate(ncid, varid, shuffle, deflate, deflate_level)
integer function nf_inq_enum(ncid, xtype, name, base_nf_type, base_size, num_members)
integer function nf_def_var_fletcher32(ncid, varid, fletcher32)
integer function nf_def_var_endian(ncid, varid, endiann)
integer function nf_put_var(ncid, varid, values)
integer function nf_put_vara_int64(ncid, varid, start, counts, ivals)
character(len=nlen) function stripcnullchar(cstring, nlen)
integer function nf_put_vars_int64(ncid, varid, start, counts, strides, ivals)
integer function nf_get_vars_int64(ncid, varid, start, counts, strides, ivals)
integer function nf_free_vlen(vl)
integer function nf_def_enum(ncid, base_typeid, name, typeid)
integer function nf_inq_compound_fieldname(ncid, xtype, fieldid, name)
integer function nf_insert_enum(ncid, xtype, name, value)
integer function nf_inq_user_type(ncid, xtype, name, isize, base_type, nfields, iclass)
integer function nf_put_vlen_element(ncid, xtype, vlen_element, nlen, value)
integer function nf_get_var(ncid, varid, values)
integer(c_int) function nc_inq_varndims(ncid, varid, ndimsp)
integer function nf_put_varm_int64(ncid, varid, start, counts, strides, maps, ivals)
integer function nf_inq_type(ncid, xtype, name, isize)
integer function nf_set_chunk_cache(chunk_size, nelems, preemption)
integer function nf_get_vara_int64(ncid, varid, start, counts, ivals)
integer function nf_set_var_chunk_cache(ncid, varid, chunk_size, nelems, preemption)
integer function nf_inq_enum_ident(ncid, xtype, value, name)
character(len=(len(string)+1)) function addcnullchar(string, nlen)
integer function nf_inq_grpname_full(ncid, nlen, name)
integer function nf_create_par(path, cmode, comm, info, ncid)
integer function nf_var_par_access(ncid, varid, iaccess)
integer function nf_insert_compound(ncid, xtype, name, offset, field_typeid)
integer function nf_get_chunk_cache(chunk_size, nelems, preemption)
integer function nf_def_var_fill(ncid, varid, no_fill, fill_value)
integer function nf_inq_grp_parent(ncid, parent_ncid)
integer function nf_get_var_int64(ncid, varid, ivals)
integer function nf_get_att(ncid, varid, name, value)
integer function nf_open_par(path, mode, comm, info, ncid)
integer function nf_inq_compound_nfields(ncid, xtype, nfields)
integer function nf_def_compound(ncid, isize, name, typeid)
integer function nf_def_vlen(ncid, name, base_typeid, xtype)
integer function nf_get_var_chunk_cache(ncid, varid, chunk_size, nelems, preemption)
integer function nf_inq_dimids(ncid, ndims, dimids, parent)
integer function nf_inq_opaque(ncid, xtype, name, isize)
integer function nf_put_att(ncid, varid, name, xtype, nlen, value)
integer function nf_inq_var_endian(ncid, varid, endiann)
integer function nf_inq_enum_member(ncid, xtype, idx, name, value)