NuSDaS Interface Reference Manual
Reads a two-dimensional array from NuSDaS dataset.
/* C */ int nusdas_read(type1, type2, type3, btime, memb, vtime1, plane1, elem, udata, utype, usize) int nusdas_read2(type1, type2, type3, btime, memb, vtime1, vtime2, plane1, plane2, elem, udata, utype, usize) ! Fortran SUBROUTINE NUSDAS_READ(type1, type2, type3, btime, memb, vtime1, & plane1, elem, udata, utype, usize, iostat) SUBROUTINE NUSDAS_READ2(type1, type2, type3, btime, memb, vtime1, vtime2, & plane1, plane2, elem, udata, utype, usize, iostat)
symbol | Fortran | C |
type1 ... elem | (see table above) | |
udata | (may be various type) | void * |
utype | (should be constant in header) | (should be macro in header) |
iostat | INTEGER, INTENT(OUT) | (not used) |
From type1 to elem, see section 'NuSDaS Data Identifier Dimensions'. The vtime1 value -1 can be used as wildcard: first record found in the dataset was returned.
udata
user data array, to which the requested data will be copied.
utype
see table of User Data Array Type.
usize
number of array elements allocated user data. It must equal to or be larger than that of dataset.
iostat
same meaning as return value in C interface.
> 0 | Succeeded. The value is number of array elements obtained. |
0 | Warning: requested data record not written yet in existing data file. |
-1 | Warning: requested data file not created yet. |
-2 | Warning: "requested data is not registered yet". |
-3 | Error: inconsistency between CNTL and DATA records. |
-4 | Error: insufficient size of user array. |
-5 | Error: conversion to specified data type is not supported. |
-6 | Error: malformed run-length encoded data. |
-7 | Error: malformed CNTL or INDX record. |
-10 to -99 | (see error code table) |
see also Error Code of NuSDaS library for return code from -10 to -99.
NUSDAS_READ and NUSDAS_READ2 reads a data record to user data array udata. If you are going to read data in a layer or timespan, use NUSDAS_READ2.