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

20030709: netCDF Windows - Windows 98 - netcdf file interpretation (cont.)



>From: Paula Jacqueline Arcari <address@hidden>
>Organization: UCAR/Unidata
>Keywords: 200307080207.h6827YOp024177 netCDF

Hi Paula,

>Thanks for getting back to me so quick.

No worries.

>My supervisor actually converted the files. He used an ncdump procedure in
>PCGrads with default options, he says.

ncdump lists out values.  It looks like your kb.cdl output is actually
the output from ncdump.

>I have attached the original coded
>data file I downloaded from the NCEP reanalysis website, and the converted
>file on word which my supervisor did.  I hope these help.

What I see is:

KB.nc  - netCDF data file
kb.cdl - apparently the ncdump output of KB.nc

Back to your original question:

>Every 2 lines, or every 4 readings, coorespond to one
>month of mean temperature readings for each of the 4 gridpoints.   I
>have been trying for some weeks now to find out in what order the
>coordinates are read in the conversion, as I need to know for sure
>which set are maritime so I can exclude them from my analysis.

You can use the '-b lang' of ncdump to show the ordering of the data.
Here is an example using your KB.nc file:

% ncdump -b c KB.nc | less

netcdf KB {
dimensions:
        lon = 2 ;
        lat = 2 ;
        time = UNLIMITED ; // (121 currently)
variables:
        float lat(lat) ;
                lat:units = "degrees_north" ;
                lat:actual_range = 0.f, -2.5f ;
                lat:long_name = "Latitude" ;
        float lon(lon) ;
                lon:units = "degrees_east" ;
                lon:long_name = "Longitude" ;
                lon:actual_range = 110.f, 112.5f ;
        double time(time) ;
                time:units = "hours since 1-1-1 00:00:0.0" ;
                time:long_name = "Time" ;
                time:actual_range = 17452776., 17540448. ;
                time:delta_t = "0000-01-00 00:00:00" ;
                time:avg_period = "0000-01-00 00:00:00" ;
        float air(time, lat, lon) ;
                air:long_name = "Monthly Mean Air Temperature" ;
                air:valid_range = -2000.f, 2000.f ;
                air:actual_range = 21.57287f, 27.57968f ;
                air:units = "degC" ;
                air:add_offset = 0.f ;
                air:scale_factor = 1.f ;
                air:missing_value = -9.96921e+36f ;
                air:precision = 1s ;
                air:least_significant_digit = 0s ;
                air:var_desc = "Air Temperature\n",
    "A" ;
                air:dataset = "CDC Derived NCEP Reanalysis Products\n",
    "AC" ;
                air:level_desc = "Surface\n",
    "0" ;
                air:statistic = "Mean\n",
    "M" ;
                air:parent_stat = "Individual Obs\n",
    "I" ;

 ...

data:

 lat = 0, -2.5 ;

 lon = 110, 112.5 ;

 time = 17452776, 17453520, 17454216, 17454960, 17455680, 17456424, 17457144, 
    17457888, 17458632, 17459352, 17460096, 17460816, 17461560, 17462304, 
    17462976, 17463720, 17464440, 17465184, 17465904, 17466648, 17467392, 
    17468112, 17468856, 17469576, 17470320, 17471064, 17471736, 17472480, 
    17473200, 17473944, 17474664, 17475408, 17476152, 17476872, 17477616, 
    17478336, 17479080, 17479824, 17480496, 17481240, 17481960, 17482704, 
    17483424, 17484168, 17484912, 17485632, 17486376, 17487096, 17487840, 
    17488584, 17489280, 17490024, 17490744, 17491488, 17492208, 17492952, 
    17493696, 17494416, 17495160, 17495880, 17496624, 17497368, 17498040, 
    17498784, 17499504, 17500248, 17500968, 17501712, 17502456, 17503176, 
    17503920, 17504640, 17505384, 17506128, 17506800, 17507544, 17508264, 
    17509008, 17509728, 17510472, 17511216, 17511936, 17512680, 17513400, 
    17514144, 17514888, 17515560, 17516304, 17517024, 17517768, 17518488, 
    17519232, 17519976, 17520696, 17521440, 17522160, 17522904, 17523648, 
    17524344, 17525088, 17525808, 17526552, 17527272, 17528016, 17528760, 
    17529480, 17530224, 17530944, 17531688, 17532432, 17533104, 17533848, 
    17534568, 17535312, 17536032, 17536776, 17537520, 17538240, 17538984, 
    17539704, 17540448 ;

 air =
  // air(0,0, 0-1)
    24.84484, 22.62001,
  // air(0,1, 0-1)
    25.99323, 25.05775,
  // air(1,0, 0-1)
    25.16449, 22.93242,

The listing for 'air', combined with its definition:

 float air(time, lat, lon) ;

shows the ordering of the data.  For this I asked ncdump to output using
the C convention for array storage: the right most index varies fastest
followed by the next most right index, etc.

So, the data in this ncdump listing is:

air( 17452776,    0, 110   ) = 24.84484
air( 17452776, 0   , 112.5 ) = 22.62001
air( 17452776, -2.5, 110   ) = 25.99323
air( 17452776, -2.5, 112.5 ) = 25.05775

etc.

The default 'lang' for ncdump listings is 'c'.

I think that this answers your original queyr.  Please let me know if I
am missing something.

Cheers,

Tom