[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[IDV #NDX-797833]: Parse Variables



Hi Annie:

You need to use the javadoc for ucar.nc2.Variable:

http://www.unidata.ucar.edu/software/thredds/v4.3/netcdf-java/v4.3/javadoc/index.html

John

> Greetings support crew,
> 
> I'm trying to parse each variable in a NetCDF file.  For example, if I
> print out each variable in ncFile using:
> 
> for (Variable var : ncFile.getVariables()){
> System.out.println(var);
> }
> 
> One of the variables that prints will look something like this.
> 
> float lat(lat=180);
> :units = "degrees_north";
> :long_name = "Latitude";
> :actual_range = 89.5f, -89.5f; // float
> :standard_name = "latitude";
> :axis = "Y";
> :coordinate_defines = "center";
> 
> I'm totally stumped on how to isolate each of those list components in the
> variable.  Because 'var' is neither an array or structure, I don't know how
> to isolate any given line within var.  Is there a method I'm missing that
> could help with this?
> 
> Please let me know if you need any other information!  I appreciate any
> insights you can give.
> 
> Best,
> Annie
> 
> --
> ------------------------------------------------------------------------------------------
> Ann Bryant Burgess, PhD
> 
> Postdoctoral Fellow
> Computer Science Department
> University of Southern California
> Viterbi School of Engineering
> Los Angeles, CA
> 
> Alaska Science Center/USGS
> Anchorage, AK
> 
> Cell:  (585) 738-7549
> Office:  (907) 786-7059
> Fax:  (907) 786-7150
> E-mail: address@hidden
> Office Address: 4210 University Dr., Anchorage, AK 99508-4626
> -------------------------------------------------------------------------------------------
> 
> 

Ticket Details
===================
Ticket ID: NDX-797833
Department: Support netCDF Java
Priority: Critical
Status: Closed


NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.