This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Jon, There is a C example that creates a ragged array in ncdump/tst_vlen_data.c. When you run "make check" it gets compiled and run to create a file tst_vlen_data.nc that is equivalent to the CDL file ref_tst_vlen_data.cdl (these are all in the ncdump directory. The CDL is very simple: netcdf tst_vlen_data { types: float(*) row_of_floats ; dimensions: m = 5 ; variables: row_of_floats ragged_array(m) ; row_of_floats ragged_array:_FillValue = {-999} ; data: ragged_array = {10, 11, 12, 13, 14}, {20, 21, 22, 23}, {30, 31, 32}, {40, 41}, _ ; } representing a ragged array with 5 rows of length 5, 4, 3, 2, and 1, with the last element being a fill value. Sorry, but there is no Fortran example yet. --Russ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: CLD-454258 Department: Support netCDF Priority: Normal Status: Closed