NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.

To learn about what's going on, see About the Archive Site.

[netcdf-java] Create a Variable from CSV data

Hello....

I´m trying to create a NetCDF Variable from CSV data.  As an example, here
is the data I have in the CSV file:

person,year,income,age,sex
1,2001,1300,27,1
1,2002,1600,28,1
1,2003,2000,29,1
2,2001,2000,38,2
2,2002,2300,39,2
2,2003,2400,40,2

After reading the data I have 'person' and 'year' stored in a hash and the
following NetCDF Array:

[[[1300.0 27.0 1.0]
  [1600.0 28.0 1.0]
  [2000.0 29.0 1.0]]

 [[2000.0 38.0 2.0]
  [2300.0 39.0 2.0]
  [2400.0 40.0 2.0]]]

Can I create a Variable from this data without having to write it all to a
NetCDF file?  I didn´t see a Variable constructor for this.  Am I completly
off?

Thanks

-- 
Rodrigo Botafogo
  • 2016 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdf-java archives: