1 #include "nfconfig.inc"
47 Integer,
Intent(IN) :: ncid, varid
48 Integer,
Intent(IN) :: start(*), counts(*), strides(*), maps(*)
49 Character(LEN=*),
Intent(IN) :: text
53 Integer(C_INT) :: cncid, cvarid, cndims, cstat1, cstatus
54 Type(c_ptr
) :: cstartptr, ccountsptr, cstridesptr, cmapsptr
57 Integer(C_SIZE_T),
ALLOCATABLE,
TARGET :: cstart(:), ccounts(:)
58 Integer(C_PTRDIFF_T),
ALLOCATABLE,
TARGET :: cstrides(:), cmaps(:)
65 cstartptr = c_null_ptr
66 ccountsptr = c_null_ptr
67 cstridesptr = c_null_ptr
71 If (cstat1 == nc_noerr)
Then
73 ALLOCATE(cstart(1:ndims))
74 ALLOCATE(ccounts(1:ndims))
75 ALLOCATE(cstrides(1:ndims))
76 ALLOCATE(cmaps(1:ndims))
77 cstart(1:ndims) = start(ndims:1:-1) - 1
78 ccounts(1:ndims) = counts(ndims:1:-1)
79 cstrides(1:ndims) = strides(ndims:1:-1)
80 cmaps(1:ndims) = maps(ndims:1:-1)
81 cstartptr = c_loc(cstart)
82 ccountsptr = c_loc(ccounts)
83 cstridesptr = c_loc(cstrides)
84 cmapsptr = c_loc(cmaps)
89 cstridesptr, cmapsptr, text)
95 cstartptr = c_null_ptr
96 ccountsptr = c_null_ptr
97 cstridesptr = c_null_ptr
99 If (
ALLOCATED(cmaps))
DEALLOCATE(cmaps)
100 If (
ALLOCATED(cstrides))
DEALLOCATE(cstrides)
101 If (
ALLOCATED(ccounts))
DEALLOCATE(ccounts)
102 If (
ALLOCATED(cstart))
DEALLOCATE(cstart)
115 Integer,
Intent(IN) :: ncid, varid
116 Integer,
Intent(IN) :: start(*), counts(*), strides(*), maps(*)
117 Character(LEN=1),
Intent(IN) :: text(*)
121 Integer(C_INT) :: cncid, cvarid, cndims, cstat1, cstatus
122 Type(c_ptr
) :: cstartptr, ccountsptr, cstridesptr, cmapsptr
125 Integer(C_SIZE_T),
ALLOCATABLE,
TARGET :: cstart(:), ccounts(:)
126 Integer(C_PTRDIFF_T),
ALLOCATABLE,
TARGET :: cstrides(:), cmaps(:)
133 cstartptr = c_null_ptr
134 ccountsptr = c_null_ptr
135 cstridesptr = c_null_ptr
136 cmapsptr = c_null_ptr
139 If (cstat1 == nc_noerr)
Then
141 ALLOCATE(cstart(1:ndims))
142 ALLOCATE(ccounts(1:ndims))
143 ALLOCATE(cstrides(1:ndims))
144 ALLOCATE(cmaps(1:ndims))
145 cstart(1:ndims) = start(ndims:1:-1) - 1
146 ccounts(1:ndims) = counts(ndims:1:-1)
147 cstrides(1:ndims) = strides(ndims:1:-1)
148 cmaps(1:ndims) = maps(ndims:1:-1)
149 cstartptr = c_loc(cstart)
150 ccountsptr = c_loc(ccounts)
151 cstridesptr = c_loc(cstrides)
152 cmapsptr = c_loc(cmaps)
157 cstridesptr, cmapsptr, text)
163 cstartptr = c_null_ptr
164 ccountsptr = c_null_ptr
165 cstridesptr = c_null_ptr
166 cmapsptr = c_null_ptr
167 If (
ALLOCATED(cmaps))
DEALLOCATE(cmaps)
168 If (
ALLOCATED(cstrides))
DEALLOCATE(cstrides)
169 If (
ALLOCATED(ccounts))
DEALLOCATE(ccounts)
170 If (
ALLOCATED(cstart))
DEALLOCATE(cstart)
175 i1vals) result(status)
183 Integer,
Intent(IN) :: ncid, varid
184 Integer,
Intent(IN) :: start(*), counts(*), strides(*), maps(*)
185 Integer(NFINT1),
Intent(IN) :: i1vals(*)
189 Integer(C_INT) :: cncid, cvarid, cndims, cstat1, cstatus
190 Type(c_ptr
) :: cstartptr, ccountsptr, cstridesptr, cmapsptr
193 Integer(C_SIZE_T),
ALLOCATABLE,
TARGET :: cstart(:), ccounts(:)
194 Integer(C_PTRDIFF_T),
ALLOCATABLE,
TARGET :: cstrides(:), cmaps(:)
196 If (c_signed_char < 0)
Then
206 cstartptr = c_null_ptr
207 ccountsptr = c_null_ptr
208 cstridesptr = c_null_ptr
209 cmapsptr = c_null_ptr
212 If (cstat1 == nc_noerr)
Then
214 ALLOCATE(cstart(1:ndims))
215 ALLOCATE(ccounts(1:ndims))
216 ALLOCATE(cstrides(1:ndims))
217 ALLOCATE(cmaps(1:ndims))
218 cstart(1:ndims) = start(ndims:1:-1) - 1
219 ccounts(1:ndims) = counts(ndims:1:-1)
220 cstrides(1:ndims) = strides(ndims:1:-1)
221 cmaps(1:ndims) = maps(ndims:1:-1)
222 cstartptr = c_loc(cstart)
223 ccountsptr = c_loc(ccounts)
224 cstridesptr = c_loc(cstrides)
225 cmapsptr = c_loc(cmaps)
229 #if NF_INT1_IS_C_SIGNED_CHAR
231 cstridesptr, cmapsptr, i1vals)
232 #elif NF_INT1_IS_C_SHORT
234 cstridesptr, cmapsptr, i1vals)
235 #elif NF_INT1_IS_C_INT
237 cstridesptr, cmapsptr, i1vals)
238 #elif NF_INT1_IS_C_LONG
240 cstridesptr, cmapsptr, i1vals)
247 cstartptr = c_null_ptr
248 ccountsptr = c_null_ptr
249 cstridesptr = c_null_ptr
250 cmapsptr = c_null_ptr
251 If (
ALLOCATED(cmaps))
DEALLOCATE(cmaps)
252 If (
ALLOCATED(cstrides))
DEALLOCATE(cstrides)
253 If (
ALLOCATED(ccounts))
DEALLOCATE(ccounts)
254 If (
ALLOCATED(cstart))
DEALLOCATE(cstart)
259 i2vals) result(status)
267 Integer,
Intent(IN) :: ncid, varid
268 Integer,
Intent(IN) :: start(*), counts(*), strides(*), maps(*)
269 Integer(NFINT2),
Intent(IN) :: i2vals(*)
273 Integer(C_INT) :: cncid, cvarid, cndims, cstat1, cstatus
274 Type(c_ptr
) :: cstartptr, ccountsptr, cstridesptr, cmapsptr
277 Integer(C_SIZE_T),
ALLOCATABLE,
TARGET :: cstart(:), ccounts(:)
278 Integer(C_PTRDIFF_T),
ALLOCATABLE,
TARGET :: cstrides(:), cmaps(:)
280 If (c_short < 0)
Then
290 cstartptr = c_null_ptr
291 ccountsptr = c_null_ptr
292 cstridesptr = c_null_ptr
293 cmapsptr = c_null_ptr
296 If (cstat1 == nc_noerr)
Then
298 ALLOCATE(cstart(1:ndims))
299 ALLOCATE(ccounts(1:ndims))
300 ALLOCATE(cstrides(1:ndims))
301 ALLOCATE(cmaps(1:ndims))
302 cstart(1:ndims) = start(ndims:1:-1) - 1
303 ccounts(1:ndims) = counts(ndims:1:-1)
304 cstrides(1:ndims) = strides(ndims:1:-1)
305 cmaps(1:ndims) = maps(ndims:1:-1)
306 cstartptr = c_loc(cstart)
307 ccountsptr = c_loc(ccounts)
308 cstridesptr = c_loc(cstrides)
309 cmapsptr = c_loc(cmaps)
313 #if NF_INT2_IS_C_SHORT
315 cstridesptr, cmapsptr, i2vals)
316 #elif NF_INT2_IS_C_INT
318 cstridesptr, cmapsptr, i2vals)
319 #elif NF_INT2_IS_C_LONG
321 cstridesptr, cmapsptr, i2vals)
328 cstartptr = c_null_ptr
329 ccountsptr = c_null_ptr
330 cstridesptr = c_null_ptr
331 cmapsptr = c_null_ptr
332 If (
ALLOCATED(cmaps))
DEALLOCATE(cmaps)
333 If (
ALLOCATED(cstrides))
DEALLOCATE(cstrides)
334 If (
ALLOCATED(ccounts))
DEALLOCATE(ccounts)
335 If (
ALLOCATED(cstart))
DEALLOCATE(cstart)
340 ivals) result(status)
348 Integer,
Intent(IN) :: ncid, varid
349 Integer,
Intent(IN) :: start(*), counts(*), strides(*), maps(*)
350 Integer(NFINT),
Intent(IN) :: ivals(*)
354 Integer(C_INT) :: cncid, cvarid, cndims, cstat1, cstatus
355 Type(c_ptr
) :: cstartptr, ccountsptr, cstridesptr, cmapsptr
358 Integer(C_SIZE_T),
ALLOCATABLE,
TARGET :: cstart(:), ccounts(:)
359 Integer(C_PTRDIFF_T),
ALLOCATABLE,
TARGET :: cstrides(:), cmaps(:)
366 cstartptr = c_null_ptr
367 ccountsptr = c_null_ptr
368 cstridesptr = c_null_ptr
369 cmapsptr = c_null_ptr
372 If (cstat1 == nc_noerr)
Then
374 ALLOCATE(cstart(1:ndims))
375 ALLOCATE(ccounts(1:ndims))
376 ALLOCATE(cstrides(1:ndims))
377 ALLOCATE(cmaps(1:ndims))
378 cstart(1:ndims) = start(ndims:1:-1) - 1
379 ccounts(1:ndims) = counts(ndims:1:-1)
380 cstrides(1:ndims) = strides(ndims:1:-1)
381 cmaps(1:ndims) = maps(ndims:1:-1)
382 cstartptr = c_loc(cstart)
383 ccountsptr = c_loc(ccounts)
384 cstridesptr = c_loc(cstrides)
385 cmapsptr = c_loc(cmaps)
391 cstridesptr, cmapsptr, ivals)
392 #elif NF_INT_IS_C_LONG
394 cstridesptr, cmapsptr, ivals)
401 cstartptr = c_null_ptr
402 ccountsptr = c_null_ptr
403 cstridesptr = c_null_ptr
404 cmapsptr = c_null_ptr
405 If (
ALLOCATED(cmaps))
DEALLOCATE(cmaps)
406 If (
ALLOCATED(cstrides))
DEALLOCATE(cstrides)
407 If (
ALLOCATED(ccounts))
DEALLOCATE(ccounts)
408 If (
ALLOCATED(cstart))
DEALLOCATE(cstart)
413 rvals) result(status)
421 Integer,
Intent(IN) :: ncid, varid
422 Integer,
Intent(IN) :: start(*), counts(*), strides(*), maps(*)
423 Real(NFREAL),
Intent(IN) :: rvals(*)
427 Integer(C_INT) :: cncid, cvarid, cndims, cstat1, cstatus
428 Type(c_ptr
) :: cstartptr, ccountsptr, cstridesptr, cmapsptr
431 Integer(C_SIZE_T),
ALLOCATABLE,
TARGET :: cstart(:), ccounts(:)
432 Integer(C_PTRDIFF_T),
ALLOCATABLE,
TARGET :: cstrides(:), cmaps(:)
439 cstartptr = c_null_ptr
440 ccountsptr = c_null_ptr
441 cstridesptr = c_null_ptr
442 cmapsptr = c_null_ptr
445 If (cstat1 == nc_noerr)
Then
447 ALLOCATE(cstart(1:ndims))
448 ALLOCATE(ccounts(1:ndims))
449 ALLOCATE(cstrides(1:ndims))
450 ALLOCATE(cmaps(1:ndims))
451 cstart(1:ndims) = start(ndims:1:-1) - 1
452 ccounts(1:ndims) = counts(ndims:1:-1)
453 cstrides(1:ndims) = strides(ndims:1:-1)
454 cmaps(1:ndims) = maps(ndims:1:-1)
455 cstartptr = c_loc(cstart)
456 ccountsptr = c_loc(ccounts)
457 cstridesptr = c_loc(cstrides)
458 cmapsptr = c_loc(cmaps)
462 #if NF_REAL_IS_C_DOUBLE
464 cstridesptr, cmapsptr, rvals)
467 cstridesptr, cmapsptr, rvals)
474 cstartptr = c_null_ptr
475 ccountsptr = c_null_ptr
476 cstridesptr = c_null_ptr
477 cmapsptr = c_null_ptr
478 If (
ALLOCATED(cmaps))
DEALLOCATE(cmaps)
479 If (
ALLOCATED(cstrides))
DEALLOCATE(cstrides)
480 If (
ALLOCATED(ccounts))
DEALLOCATE(ccounts)
481 If (
ALLOCATED(cstart))
DEALLOCATE(cstart)
486 dvals) result(status)
494 Integer,
Intent(IN) :: ncid, varid
495 Integer,
Intent(IN) :: start(*), counts(*), strides(*), maps(*)
496 Real(RK8),
Intent(IN) :: dvals(*)
500 Integer(C_INT) :: cncid, cvarid, cndims, cstat1, cstatus
501 Type(c_ptr
) :: cstartptr, ccountsptr, cstridesptr, cmapsptr
504 Integer(C_SIZE_T),
ALLOCATABLE,
TARGET :: cstart(:), ccounts(:)
505 Integer(C_PTRDIFF_T),
ALLOCATABLE,
TARGET :: cstrides(:), cmaps(:)
512 cstartptr = c_null_ptr
513 ccountsptr = c_null_ptr
514 cstridesptr = c_null_ptr
515 cmapsptr = c_null_ptr
518 If (cstat1 == nc_noerr)
Then
520 ALLOCATE(cstart(1:ndims))
521 ALLOCATE(ccounts(1:ndims))
522 ALLOCATE(cstrides(1:ndims))
523 ALLOCATE(cmaps(1:ndims))
524 cstart(1:ndims) = start(ndims:1:-1) - 1
525 ccounts(1:ndims) = counts(ndims:1:-1)
526 cstrides(1:ndims) = strides(ndims:1:-1)
527 cmaps(1:ndims) = maps(ndims:1:-1)
528 cstartptr = c_loc(cstart)
529 ccountsptr = c_loc(ccounts)
530 cstridesptr = c_loc(cstrides)
531 cmapsptr = c_loc(cmaps)
536 cstridesptr, cmapsptr, dvals)
542 cstartptr = c_null_ptr
543 ccountsptr = c_null_ptr
544 cstridesptr = c_null_ptr
545 cmapsptr = c_null_ptr
546 If (
ALLOCATED(cmaps))
DEALLOCATE(cmaps)
547 If (
ALLOCATED(cstrides))
DEALLOCATE(cstrides)
548 If (
ALLOCATED(ccounts))
DEALLOCATE(ccounts)
549 If (
ALLOCATED(cstart))
DEALLOCATE(cstart)
562 Integer,
Intent(IN) :: ncid, varid
563 Integer,
Intent(IN) :: start(*), counts(*), strides(*), maps(*)
564 Character(LEN=*),
Intent(OUT) :: text
568 Integer(C_INT) :: cncid, cvarid, cndims, cstat1, cstatus
569 Type(c_ptr
) :: cstartptr, ccountsptr, cstridesptr, cmapsptr
572 Integer(C_SIZE_T),
ALLOCATABLE,
TARGET :: cstart(:), ccounts(:)
573 Integer(C_PTRDIFF_T),
ALLOCATABLE,
TARGET :: cstrides(:), cmaps(:)
577 text = repeat(
" ",len(text))
581 cstartptr = c_null_ptr
582 ccountsptr = c_null_ptr
583 cstridesptr = c_null_ptr
584 cmapsptr = c_null_ptr
587 If (cstat1 == nc_noerr)
Then
589 ALLOCATE(cstart(1:ndims))
590 ALLOCATE(ccounts(1:ndims))
591 ALLOCATE(cstrides(1:ndims))
592 ALLOCATE(cmaps(1:ndims))
593 cstart(1:ndims) = start(ndims:1:-1) - 1
594 ccounts(1:ndims) = counts(ndims:1:-1)
595 cstrides(1:ndims) = strides(ndims:1:-1)
596 cmaps(1:ndims) = maps(ndims:1:-1)
597 cstartptr = c_loc(cstart)
598 ccountsptr = c_loc(ccounts)
599 cstridesptr = c_loc(cstrides)
600 cmapsptr = c_loc(cmaps)
605 cstridesptr, cmapsptr, text)
611 cstartptr = c_null_ptr
612 ccountsptr = c_null_ptr
613 cstridesptr = c_null_ptr
614 cmapsptr = c_null_ptr
615 If (
ALLOCATED(cmaps))
DEALLOCATE(cmaps)
616 If (
ALLOCATED(cstrides))
DEALLOCATE(cstrides)
617 If (
ALLOCATED(ccounts))
DEALLOCATE(ccounts)
618 If (
ALLOCATED(cstart))
DEALLOCATE(cstart)
631 Integer,
Intent(IN) :: ncid, varid
632 Integer,
Intent(IN) :: start(*), counts(*), strides(*), maps(*)
633 Character(LEN=1),
Intent(OUT) :: text(*)
637 Integer(C_INT) :: cncid, cvarid, cndims, cstat1, cstatus
638 Type(c_ptr
) :: cstartptr, ccountsptr, cstridesptr, cmapsptr
641 Integer(C_SIZE_T),
ALLOCATABLE,
TARGET :: cstart(:), ccounts(:)
642 Integer(C_PTRDIFF_T),
ALLOCATABLE,
TARGET :: cstrides(:), cmaps(:)
649 cstartptr = c_null_ptr
650 ccountsptr = c_null_ptr
651 cstridesptr = c_null_ptr
652 cmapsptr = c_null_ptr
655 If (cstat1 == nc_noerr)
Then
657 ALLOCATE(cstart(1:ndims))
658 ALLOCATE(ccounts(1:ndims))
659 ALLOCATE(cstrides(1:ndims))
660 ALLOCATE(cmaps(1:ndims))
661 cstart(1:ndims) = start(ndims:1:-1) - 1
662 ccounts(1:ndims) = counts(ndims:1:-1)
663 cstrides(1:ndims) = strides(ndims:1:-1)
664 cmaps(1:ndims) = maps(ndims:1:-1)
665 cstartptr = c_loc(cstart)
666 ccountsptr = c_loc(ccounts)
667 cstridesptr = c_loc(cstrides)
668 cmapsptr = c_loc(cmaps)
673 cstridesptr, cmapsptr, text)
679 cstartptr = c_null_ptr
680 ccountsptr = c_null_ptr
681 cstridesptr = c_null_ptr
682 cmapsptr = c_null_ptr
683 If (
ALLOCATED(cmaps))
DEALLOCATE(cmaps)
684 If (
ALLOCATED(cstrides))
DEALLOCATE(cstrides)
685 If (
ALLOCATED(ccounts))
DEALLOCATE(ccounts)
686 If (
ALLOCATED(cstart))
DEALLOCATE(cstart)
691 i1vals) result(status)
699 Integer,
Intent(IN) :: ncid, varid
700 Integer,
Intent(IN) :: start(*), counts(*), strides(*), maps(*)
701 Integer(NFINT1),
Intent(OUT) :: i1vals(*)
705 Integer(C_INT) :: cncid, cvarid, cndims, cstat1, cstatus
706 Type(c_ptr
) :: cstartptr, ccountsptr, cstridesptr, cmapsptr
709 Integer(C_SIZE_T),
ALLOCATABLE,
TARGET :: cstart(:), ccounts(:)
710 Integer(C_PTRDIFF_T),
ALLOCATABLE,
TARGET :: cstrides(:), cmaps(:)
712 If (c_signed_char < 0)
Then
722 cstartptr = c_null_ptr
723 ccountsptr = c_null_ptr
724 cstridesptr = c_null_ptr
725 cmapsptr = c_null_ptr
728 If (cstat1 == nc_noerr)
Then
730 ALLOCATE(cstart(1:ndims))
731 ALLOCATE(ccounts(1:ndims))
732 ALLOCATE(cstrides(1:ndims))
733 ALLOCATE(cmaps(1:ndims))
734 cstart(1:ndims) = start(ndims:1:-1) - 1
735 ccounts(1:ndims) = counts(ndims:1:-1)
736 cstrides(1:ndims) = strides(ndims:1:-1)
737 cmaps(1:ndims) = maps(ndims:1:-1)
738 cstartptr = c_loc(cstart)
739 ccountsptr = c_loc(ccounts)
740 cstridesptr = c_loc(cstrides)
741 cmapsptr = c_loc(cmaps)
745 #if NF_INT1_IS_C_SIGNED_CHAR
747 cstridesptr, cmapsptr, i1vals)
748 #elif NF_INT1_IS_C_SHORT
750 cstridesptr, cmapsptr, i1vals)
751 #elif NF_INT1_IS_C_INT
753 cstridesptr, cmapsptr, i1vals)
754 #elif NF_INT1_IS_C_LONG
756 cstridesptr, cmapsptr, i1vals)
763 cstartptr = c_null_ptr
764 ccountsptr = c_null_ptr
765 cstridesptr = c_null_ptr
766 cmapsptr = c_null_ptr
767 If (
ALLOCATED(cmaps))
DEALLOCATE(cmaps)
768 If (
ALLOCATED(cstrides))
DEALLOCATE(cstrides)
769 If (
ALLOCATED(ccounts))
DEALLOCATE(ccounts)
770 If (
ALLOCATED(cstart))
DEALLOCATE(cstart)
775 i2vals) result(status)
783 Integer,
Intent(IN) :: ncid, varid
784 Integer,
Intent(IN) :: start(*), counts(*), strides(*), maps(*)
785 Integer(NFINT2),
Intent(OUT) :: i2vals(*)
789 Integer(C_INT) :: cncid, cvarid, cndims, cstat1, cstatus
790 Type(c_ptr
) :: cstartptr, ccountsptr, cstridesptr, cmapsptr
793 Integer(C_SIZE_T),
ALLOCATABLE,
TARGET :: cstart(:), ccounts(:)
794 Integer(C_PTRDIFF_T),
ALLOCATABLE,
TARGET :: cstrides(:), cmaps(:)
796 If (c_short < 0)
Then
806 cstartptr = c_null_ptr
807 ccountsptr = c_null_ptr
808 cstridesptr = c_null_ptr
809 cmapsptr = c_null_ptr
812 If (cstat1 == nc_noerr)
Then
814 ALLOCATE(cstart(1:ndims))
815 ALLOCATE(ccounts(1:ndims))
816 ALLOCATE(cstrides(1:ndims))
817 ALLOCATE(cmaps(1:ndims))
818 cstart(1:ndims) = start(ndims:1:-1) - 1
819 ccounts(1:ndims) = counts(ndims:1:-1)
820 cstrides(1:ndims) = strides(ndims:1:-1)
821 cmaps(1:ndims) = maps(ndims:1:-1)
822 cstartptr = c_loc(cstart)
823 ccountsptr = c_loc(ccounts)
824 cstridesptr = c_loc(cstrides)
825 cmapsptr = c_loc(cmaps)
829 #if NF_INT2_IS_C_SHORT
831 cstridesptr, cmapsptr, i2vals)
832 #elif NF_INT2_IS_C_INT
834 cstridesptr, cmapsptr, i2vals)
835 #elif NF_INT2_IS_C_LONG
837 cstridesptr, cmapsptr, i2vals)
844 cstartptr = c_null_ptr
845 ccountsptr = c_null_ptr
846 cstridesptr = c_null_ptr
847 cmapsptr = c_null_ptr
848 If (
ALLOCATED(cmaps))
DEALLOCATE(cmaps)
849 If (
ALLOCATED(cstrides))
DEALLOCATE(cstrides)
850 If (
ALLOCATED(ccounts))
DEALLOCATE(ccounts)
851 If (
ALLOCATED(cstart))
DEALLOCATE(cstart)
856 ivals) result(status)
864 Integer,
Intent(IN) :: ncid, varid
865 Integer,
Intent(IN) :: start(*), counts(*), strides(*), maps(*)
866 Integer(NFINT),
Intent(OUT) :: ivals(*)
870 Integer(C_INT) :: cncid, cvarid, cndims, cstat1, cstatus
871 Type(c_ptr
) :: cstartptr, ccountsptr, cstridesptr, cmapsptr
874 Integer(C_SIZE_T),
ALLOCATABLE,
TARGET :: cstart(:), ccounts(:)
875 Integer(C_PTRDIFF_T),
ALLOCATABLE,
TARGET :: cstrides(:), cmaps(:)
882 cstartptr = c_null_ptr
883 ccountsptr = c_null_ptr
884 cstridesptr = c_null_ptr
885 cmapsptr = c_null_ptr
888 If (cstat1 == nc_noerr)
Then
890 ALLOCATE(cstart(1:ndims))
891 ALLOCATE(ccounts(1:ndims))
892 ALLOCATE(cstrides(1:ndims))
893 ALLOCATE(cmaps(1:ndims))
894 cstart(1:ndims) = start(ndims:1:-1) - 1
895 ccounts(1:ndims) = counts(ndims:1:-1)
896 cstrides(1:ndims) = strides(ndims:1:-1)
897 cmaps(1:ndims) = maps(ndims:1:-1)
898 cstartptr = c_loc(cstart)
899 ccountsptr = c_loc(ccounts)
900 cstridesptr = c_loc(cstrides)
901 cmapsptr = c_loc(cmaps)
907 cstridesptr, cmapsptr, ivals)
908 #elif NF_INT_IS_C_LONG
910 cstridesptr, cmapsptr, ivals)
917 cstartptr = c_null_ptr
918 ccountsptr = c_null_ptr
919 cstridesptr = c_null_ptr
920 cmapsptr = c_null_ptr
921 If (
ALLOCATED(cmaps))
DEALLOCATE(cmaps)
922 If (
ALLOCATED(cstrides))
DEALLOCATE(cstrides)
923 If (
ALLOCATED(ccounts))
DEALLOCATE(ccounts)
924 If (
ALLOCATED(cstart))
DEALLOCATE(cstart)
929 rvals) result(status)
937 Integer,
Intent(IN) :: ncid, varid
938 Integer,
Intent(IN) :: start(*), counts(*), strides(*), maps(*)
939 Real(NFREAL),
Intent(OUT) :: rvals(*)
943 Integer(C_INT) :: cncid, cvarid, cndims, cstat1, cstatus
944 Type(c_ptr
) :: cstartptr, ccountsptr, cstridesptr, cmapsptr
947 Integer(C_SIZE_T),
ALLOCATABLE,
TARGET :: cstart(:), ccounts(:)
948 Integer(C_PTRDIFF_T),
ALLOCATABLE,
TARGET :: cstrides(:), cmaps(:)
955 cstartptr = c_null_ptr
956 ccountsptr = c_null_ptr
957 cstridesptr = c_null_ptr
958 cmapsptr = c_null_ptr
961 If (cstat1 == nc_noerr)
Then
963 ALLOCATE(cstart(1:ndims))
964 ALLOCATE(ccounts(1:ndims))
965 ALLOCATE(cstrides(1:ndims))
966 ALLOCATE(cmaps(1:ndims))
967 cstart(1:ndims) = start(ndims:1:-1) - 1
968 ccounts(1:ndims) = counts(ndims:1:-1)
969 cstrides(1:ndims) = strides(ndims:1:-1)
970 cmaps(1:ndims) = maps(ndims:1:-1)
971 cstartptr = c_loc(cstart)
972 ccountsptr = c_loc(ccounts)
973 cstridesptr = c_loc(cstrides)
974 cmapsptr = c_loc(cmaps)
978 #if NF_REAL_IS_C_DOUBLE
980 cstridesptr, cmapsptr, rvals)
983 cstridesptr, cmapsptr, rvals)
990 cstartptr = c_null_ptr
991 ccountsptr = c_null_ptr
992 cstridesptr = c_null_ptr
993 cmapsptr = c_null_ptr
994 If (
ALLOCATED(cmaps))
DEALLOCATE(cmaps)
995 If (
ALLOCATED(cstrides))
DEALLOCATE(cstrides)
996 If (
ALLOCATED(ccounts))
DEALLOCATE(ccounts)
997 If (
ALLOCATED(cstart))
DEALLOCATE(cstart)
1002 dvals) result(status)
1010 Integer,
Intent(IN) :: ncid, varid
1011 Integer,
Intent(IN) :: start(*), counts(*), strides(*), maps(*)
1012 Real(RK8),
Intent(OUT) :: dvals(*)
1016 Integer(C_INT) :: cncid, cvarid, cndims, cstat1, cstatus
1017 Type(c_ptr
) :: cstartptr, ccountsptr, cstridesptr, cmapsptr
1020 Integer(C_SIZE_T),
ALLOCATABLE,
TARGET :: cstart(:), ccounts(:)
1021 Integer(C_PTRDIFF_T),
ALLOCATABLE,
TARGET :: cstrides(:), cmaps(:)
1028 cstartptr = c_null_ptr
1029 ccountsptr = c_null_ptr
1030 cstridesptr = c_null_ptr
1031 cmapsptr = c_null_ptr
1034 If (cstat1 == nc_noerr)
Then
1036 ALLOCATE(cstart(1:ndims))
1037 ALLOCATE(ccounts(1:ndims))
1038 ALLOCATE(cstrides(1:ndims))
1039 ALLOCATE(cmaps(1:ndims))
1040 cstart(1:ndims) = start(ndims:1:-1) - 1
1041 ccounts(1:ndims) = counts(ndims:1:-1)
1042 cstrides(1:ndims) = strides(ndims:1:-1)
1043 cmaps(1:ndims) = maps(ndims:1:-1)
1044 cstartptr = c_loc(cstart)
1045 ccountsptr = c_loc(ccounts)
1046 cstridesptr = c_loc(cstrides)
1047 cmapsptr = c_loc(cmaps)
1052 cstridesptr, cmapsptr, dvals)
1058 cstartptr = c_null_ptr
1059 ccountsptr = c_null_ptr
1060 cstridesptr = c_null_ptr
1061 cmapsptr = c_null_ptr
1062 If (
ALLOCATED(cmaps))
DEALLOCATE(cmaps)
1063 If (
ALLOCATED(cstrides))
DEALLOCATE(cstrides)
1064 If (
ALLOCATED(ccounts))
DEALLOCATE(ccounts)
1065 If (
ALLOCATED(cstart))
DEALLOCATE(cstart)
integer function nf_put_varm_text(ncid, varid, start, counts, strides, maps, text)
integer function nf_get_varm_text_a(ncid, varid, start, counts, strides, maps, text)
integer function nf_put_varm_int2(ncid, varid, start, counts, strides, maps, i2vals)
integer function nf_put_varm_text_a(ncid, varid, start, counts, strides, maps, text)
integer function nf_get_varm_int1(ncid, varid, start, counts, strides, maps, i1vals)
integer function nf_get_varm_text(ncid, varid, start, counts, strides, maps, text)
integer function nf_get_varm_real(ncid, varid, start, counts, strides, maps, rvals)
integer function nf_put_varm_int1(ncid, varid, start, counts, strides, maps, i1vals)
integer function nf_get_varm_int(ncid, varid, start, counts, strides, maps, ivals)
integer function nf_put_varm_double(ncid, varid, start, counts, strides, maps, dvals)
integer function nf_get_varm_int2(ncid, varid, start, counts, strides, maps, i2vals)
integer function nf_put_varm_real(ncid, varid, start, counts, strides, maps, rvals)
integer function nf_put_varm_int(ncid, varid, start, counts, strides, maps, ivals)
integer function nf_get_varm_double(ncid, varid, start, counts, strides, maps, dvals)