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.
Good afternoon, Given that pr is indexed by (time, lat, lon), `pr` will vary the slowest along the time axis and fastest along the lon axis. So, I would expect the data to correspond with (time,-88.92773,0), (time,-88.927773,1.40625), etc. That is making some assumptions about the file, however. You can double check this by passing the `-fc` option to ncdump, e.g. `./ncdump -fc [filename]`. This will generate a C language file with full index annotations for each variable; you should be able to inspect the output and confirm which values correspond to which indices, which should then inform the layout of the data in the cdl file. I hope this helps, -Ward > Hello: > > I downloaded some netcdf data and used ncdump to export to cdl text format. > However, I am not sure how the data is arranged in order for me to utilize > it. Can you please point me to a site that describes the data layout? > > For instance, given the header lines below (between asterisked lines below), > how is the data arranged? Is it by latitude and then longitude or by > longitude and then by latitude? So if the first few latitude and longitude > values are as follows: > > lat = -88.92773, -87.5387, -86.14147, -84.74239, -83.3426, -81.94247, > -80.54214, -79.14171, -77.7412, -76.34063, -74.94003, -73.53939, > > lon = 0, 1.40625, 2.8125, 4.21875, 5.625, 7.03125, 8.4375, 9.84375, 11.25, > 12.65625, 14.0625, 15.46875, 16.875, 18.28125, 19.6875, 21.09375, 22.5, > > Are the first two data points for the variable pr values corresponding to the > following latitude, longitude pairs: (-88.92773, 0) and (-88.92773, 1.40625)? > Or do they rather correspond to (-88.92773, 0) and (-87,5387, 0). > > I would appreciate guidance on how the data is structured. > > Thanks and best regards. > Edward > address@hidden<mailto:address@hidden> > 254-968-9440 > > > **************** > netcdf sresa1b_ncar_ccsm3-example { > dimensions: > lat = 128 ; > lon = 256 ; > bnds = 2 ; > plev = 17 ; > time = UNLIMITED ; // (1 currently) > variables: > float area(lat, lon) ; > area:long_name = "Surface area" ; > area:units = "meter2" ; > float lat(lat) ; > lat:long_name = "latitude" ; > lat:units = "degrees_north" ; > lat:axis = "Y" ; > lat:standard_name = "latitude" ; > lat:bounds = "lat_bnds" ; > double lat_bnds(lat, bnds) ; > float lon(lon) ; > lon:long_name = "longitude" ; > lon:units = "degrees_east" ; > lon:axis = "X" ; > lon:standard_name = "longitude" ; > lon:bounds = "lon_bnds" ; > double lon_bnds(lon, bnds) ; > int msk_rgn(lat, lon) ; > msk_rgn:long_name = "Mask region" ; > msk_rgn:units = "bool" ; > double plev(plev) ; > plev:long_name = "pressure" ; > plev:units = "Pa" ; > plev:standard_name = "air_pressure" ; > plev:positive = "down" ; > plev:axis = "Z" ; > float pr(time, lat, lon) ; > pr:comment = "Created using NCL code CCSM_atmm_2cf.ncl on\n", > " machine eagle163s" ; > pr:missing_value = 1.e+020f ; > pr:_FillValue = 1.e+020f ; > pr:cell_methods = "time: mean (interval: 1 month)" ; > pr:history = "(PRECC+PRECL)*r[h2o]" ; > pr:original_units = "m-1 s-1" ; > pr:original_name = "PRECC, PRECL" ; > pr:standard_name = "precipitation_flux" ; > pr:units = "kg m-2 s-1" ; > pr:long_name = "precipitation_flux" ; > pr:cell_method = "time: mean" ; > float tas(time, lat, lon) ; > tas:comment = "Created using NCL code CCSM_atmm_2cf.ncl on\n", > " machine eagle163s" ; > tas:missing_value = 1.e+020f ; > tas:_FillValue = 1.e+020f ; > tas:cell_methods = "time: mean (interval: 1 month)" ; > tas:history = "Added height coordinate" ; > tas:coordinates = "height" ; > tas:original_units = "K" ; > tas:original_name = "TREFHT" ; > tas:standard_name = "air_temperature" ; > tas:units = "K" ; > tas:long_name = "air_temperature" ; > tas:cell_method = "time: mean" ; > double time(time) ; > time:calendar = "noleap" ; > time:standard_name = "time" ; > time:axis = "T" ; > time:units = "days since 0000-1-1" ; > time:bounds = "time_bnds" ; > time:long_name = "time" ; > double time_bnds(time, bnds) ; > float ua(time, plev, lat, lon) ; > ua:comment = "Created using NCL code CCSM_atmm_2cf.ncl on\n", > " machine eagle163s" ; > ua:missing_value = 1.e+020f ; > ua:cell_methods = "time: mean (interval: 1 month)" ; > ua:long_name = "eastward_wind" ; > ua:history = "Interpolated U with NCL \'vinth2p_ecmwf\'" ; > ua:units = "m s-1" ; > ua:original_units = "m s-1" ; > ua:original_name = "U" ; > ua:standard_name = "eastward_wind" ; > ua:_FillValue = 1.e+020f ; > > > ****************** > > > > [Title: Tarleton State University]Edward Osei, Ph.D. > Assistant Professor, Department of Agricultural and Consumer Sciences > Tarleton State University, Member of The Texas A&M University System > 1333 W. Washington St. | Stephenville, TX 76402 > 254-968-9440 |www.tarleton.edu/agservices<http://www.tarleton.edu/agservices>/ > > > > Ticket Details =================== Ticket ID: FRM-971199 Department: Support netCDF Priority: Normal Status: Closed