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

Re: 960313: ncgen bug



>From: address@hidden (Christine C. Molling)
>Subject: ncgen bug
>Organization: University of Wisconsin
>Keywords: 199603132245.AA19860 netCDF ncgen

Hi Christine,

> I believe I have found a bug in ncgen (netCDF version 2.4).  I have installed
> this version on an SGI running IRIX V5.3 and on one running IRIX V6.1,
> and the following CDL fails to be handled properly under both OS's:
> 
> ...begin test.CDL...
> netcdf test2      {
> 
> dimensions:
>     longitude =  48;
>     latitude =   40;
>  // plev =        0;
>     time =       12;
>     time_3char = 36;
> 
> variables:
> 
>     float longitude(longitude), latitude(latitude), time(time);
>              longitude:units    = "degrees";
>              longitude:title    = "Longitude";
>              longitude:long_name= "LONGITUDE";
>              latitude:units     = "degrees";
>              latitude:title     = "Latitude";
>              latitude:long_name = "LATITUDE";
>              // no plev units
>              // no plev title
>              // no plev long_name
>              time:units         = "month";
>              time:title         = "Month";
>              time:long_name     = "MONTH";
> 
>     char  timelabel(time_3char);
> 
>     float clt(time,latitude,longitude);
>              clt:units              = "%";
>              clt:stat_name          = "Climatological Monthly Mean";
>              clt:missing_value       =  1.00000E+20;
>              clt:valid_min          =  1.85403E+00;
>              clt:valid_max          =  9.14546E+01;
>              clt:mean_val            =  4.50498E+01;
>              clt:mean_absval         =  4.50498E+01;
>              clt:warning_flag        =            0;
>              clt:missing_count       =            0;
>              clt:title              =
> "Total Cloud Cover";
>              clt:source             =
> "PMIP Pre-Industrial  10-Year Simulation with Computed SST's from the ccm1
> R15L12 model";
>              clt:notes              =
> "% of atmospheric column covered by clouds";
> 
>           // global attributes
>                :file_name   = "ccm1_0cal_clt_cm_map";
>                :model_name  = "ccm1 R15L12";
>                :experiment  = "Pre-Industrial Simulation with Computed SST's";
> 
> 
> data:
>     longitude =   0.0000,   7.5000,  15.0000,  22.5000,  30.0000,  37.5000,
>                  45.0000,  52.5000,  60.0000,  67.5000,  75.0000,  82.5000,
>                  90.0000,  97.5000, 105.0000, 112.5000, 120.0000, 127.5000,
>                 135.0000, 142.5000, 150.0000, 157.5000, 165.0000, 172.5000,
>                 180.0000, 187.5000, 195.0000, 202.5000, 210.0000, 217.5000,
>                 225.0000, 232.5000, 240.0000, 247.5000, 255.0000, 262.5000,
>                 270.0000, 277.5000, 285.0000, 292.5000, 300.0000, 307.5000,
>                 315.0000, 322.5000, 330.0000, 337.5000, 345.0000, 352.5000;
>      latitude =  86.5979,  82.1909,  77.7578,  73.3188,  68.8776,  64.4353,
>                  59.9924,  55.5492,  51.1057,  46.6620,  42.2183,  37.7744,
>                  33.3305,  28.8865,  24.4425,  19.9984,  15.5543,  11.1103,
>                   6.6662,   2.2220,  -2.2220,  -6.6662, -11.1103, -15.5543,
>                 -19.9984, -24.4425, -28.8865, -33.3305, -37.7744, -42.2183,
>                 -46.6620, -51.1057, -55.5492, -59.9924, -64.4353, -68.8776,
>                 -73.3188, -77.7578, -82.1909, -86.5979;
>          time =   1.0,   2.0,   3.0,   4.0,   5.0,   6.0,
>                   7.0,   8.0,   9.0,  10.0,  11.0,  12.0;
>     timelabel = "JAN", "FEB", "MAR", "APR", "MAY", "JUN",
>                 "JUL", "AUG", "SEP", "OCT", "NOV", "DEC";
> }
> ....end test.CDL.....
> 
> 
> Upon entering 'ncgen -b test.CDL' I get the error message
> 
> ncgen: test2.CDL line 69: too many values for this variable, 36 >= 36
> 
> The netcdf file is created, but the variable timelabel is empty. Even
> if I eliminate some characters (so that length < 36), I get the same
> error.  If I change the 'timelabel =' line to a single string
> 
>     timelabel = "JANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC";
> 
> ncgen works properly without returning error conditions.  This error
> in ncgen does not occur with ncgen V2.3.2

I am finally get a chance to look at this today.  It does look like a bug in
ncgen.  I'll try to get a fix into 2.4.1.

Thanks for reporting it!

--Russ

______________________________________________________________________________

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