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

[netCDF #SCT-388171]: FW: Data extraction



Hi,

Yes, your understanding is correct, the output from ncdump has the last 
dimension (lon) varying most rapidly and the first dimension (time) varying 
most slowly.  The CDL notation that ncdump outputs, which is just a text 
representation of the binary data in a netCDF file, uses row-major order (last 
index varying fastest) like C and Java do rather than column major order (first 
index varying most rapidly) like Fortran and Ruby use.

The lat/lon coordinates and are also in the ncdump output:

$ ncdump precip.mon.ltm.nc  | head -200    
netcdf precip.mon.ltm {
dimensions:
        lon = 144 ;
        lat = 72 ;
        time = UNLIMITED ; // (12 currently)
variables:
        float lat(lat) ;
                lat:units = "degrees_north" ;
                lat:actual_range = 88.75f, -88.75f ;
                lat:long_name = "Latitude" ;
        float lon(lon) ;
                lon:units = "degrees_east" ;
                lon:long_name = "Longitude" ;
                lon:actual_range = 1.25f, 358.75f ;
        double time(time) ;
                time:units = "hours since 1-1-1 00:00:0.0" ;
                time:long_name = "Time" ;
                time:delta_t = "0000-01-00 00:00:00" ;
                time:actual_range = 0., 8016. ;
                time:avg_period = "0000-01-00 00:00:00" ;
                time:ltm_range = 17338824., 17530944. ;
        float precip(time, lat, lon) ;
                precip:long_name = "Average Monthly Rate of Precipitation" ;
                precip:valid_range = 0.f, 70.f ;
                precip:units = "mm/day" ;
                precip:add_offset = 0.f ;
                precip:scale_factor = 1.f ;
                precip:actual_range = 0.f, 21.89647f ;
                precip:missing_value = -9.96921e+36f ;
                precip:precision = 32767s ;
                precip:least_significant_digit = 2s ;
                precip:var_desc = "Precipitation" ;
                precip:dataset = "CPC Merged Analysis of Precipitation 
Enhanced" ;
                precip:level_desc = "Surface" ;
                precip:statistic = "Mean" ;
                precip:parent_stat = "Mean" ;

// global attributes:
                :Conventions = "COARDS" ;
                :title = "CPC Merged Analysis of Precipitation (excludes NCEP 
Reanalysis)" ;
                :history = "created 03/2002 by CASData version v207\n",
                        "" ;
                :platform = "Analyses" ;
                :source = "ftp ftp.cpc.ncep.noaa.gov precip/cmap/monthly" ;
                :documentation = "http://www.cdc.noaa.gov/cdc/data.cmap.html"; ;
data:

 lat = 88.75, 86.25, 83.75, 81.25, 78.75, 76.25, 73.75, 71.25, 68.75, 66.25, 
    63.75, 61.25, 58.75, 56.25, 53.75, 51.25, 48.75, 46.25, 43.75, 41.25, 
    38.75, 36.25, 33.75, 31.25, 28.75, 26.25, 23.75, 21.25, 18.75, 16.25, 
    13.75, 11.25, 8.75, 6.25, 3.75, 1.25, -1.25, -3.75, -6.25, -8.75, -11.25, 
    -13.75, -16.25, -18.75, -21.25, -23.75, -26.25, -28.75, -31.25, -33.75, 
    -36.25, -38.75, -41.25, -43.75, -46.25, -48.75, -51.25, -53.75, -56.25, 
    -58.75, -61.25, -63.75, -66.25, -68.75, -71.25, -73.75, -76.25, -78.75, 
    -81.25, -83.75, -86.25, -88.75 ;

 lon = 1.25, 3.75, 6.25, 8.75, 11.25, 13.75, 16.25, 18.75, 21.25, 23.75, 
    26.25, 28.75, 31.25, 33.75, 36.25, 38.75, 41.25, 43.75, 46.25, 48.75, 
    51.25, 53.75, 56.25, 58.75, 61.25, 63.75, 66.25, 68.75, 71.25, 73.75, 
    76.25, 78.75, 81.25, 83.75, 86.25, 88.75, 91.25, 93.75, 96.25, 98.75, 
    101.25, 103.75, 106.25, 108.75, 111.25, 113.75, 116.25, 118.75, 121.25, 
    123.75, 126.25, 128.75, 131.25, 133.75, 136.25, 138.75, 141.25, 143.75, 
    146.25, 148.75, 151.25, 153.75, 156.25, 158.75, 161.25, 163.75, 166.25, 
    168.75, 171.25, 173.75, 176.25, 178.75, 181.25, 183.75, 186.25, 188.75, 
    191.25, 193.75, 196.25, 198.75, 201.25, 203.75, 206.25, 208.75, 211.25, 
    213.75, 216.25, 218.75, 221.25, 223.75, 226.25, 228.75, 231.25, 233.75, 
    236.25, 238.75, 241.25, 243.75, 246.25, 248.75, 251.25, 253.75, 256.25, 
    258.75, 261.25, 263.75, 266.25, 268.75, 271.25, 273.75, 276.25, 278.75, 
    281.25, 283.75, 286.25, 288.75, 291.25, 293.75, 296.25, 298.75, 301.25, 
    303.75, 306.25, 308.75, 311.25, 313.75, 316.25, 318.75, 321.25, 323.75, 
    326.25, 328.75, 331.25, 333.75, 336.25, 338.75, 341.25, 343.75, 346.25, 
    348.75, 351.25, 353.75, 356.25, 358.75 ;

 time = 0, 744, 1416, 2160, 2880, 3624, 4344, 5088, 5832, 6552, 7296, 8016 ;

 precip =
  0.2890909, 0.2954545, 0.2918182, 0.29, 0.2886364, 0.2890909, 0.2886364, 
    0.2872727, 0.2890909, 0.2913636, 0.2895454, 0.2895454, 0.2913636, 
    0.2940909, 0.2954545, 0.2986363, 0.3, 0.3036364, 0.3072727, 0.3118182, 
    0.3168182, 0.3231818, 0.3368182, 0.3490909, 0.3586363, 0.3704545, 
    0.3854545, 0.4031818, 0.4236364, 0.4454545, 0.4695455, 0.4936364, 
    0.5186363, 0.5454546, 0.5722727, 0.6018182, 0.6277273, 0.6518182, 
  ...

--Russ

 
Russ Rew                                         UCAR Unidata Program
address@hidden                     http://www.unidata.ucar.edu



Ticket Details
===================
Ticket ID: SCT-388171
Department: Support netCDF
Priority: Normal
Status: Closed