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

M3IOConvention



John,

In working with a Panoply user who recently had trouble with a dataset, I may 
have discovered a bug in NJ library’s handling of datasets using the M3IO 
Convention. It’s a question of what the convention actually requires and how 
NJ’s M3IOConvention class handles a possible exception.

The problem is that when M3IOConvention is constructing coordinate axes, it 
throws a NullPointerException in the makeZCoordAxis method at line 180 if the 
LAY dimension is not declared and at line 187 if there is no global attribute 
named VGLVLS. Absent this dimension or attribute, the file can’t be opened at 
all.

I see there are a couple commented lines at 79-80 indicating there’s some 
question as to whether to the VGLVLS attribute is required. But with the lack 
of exception catching at line 187, it effectively is required.

In any event, it would seem to me that that the makeZCoordAxis method should 
verify that LAY and VGLVLS do exist. If their presence is optional, then 
makeZCoordAxis should return without further effort constructing the axis. If 
they are required, then perhaps a more helpful exception message could be 
thrown?

BTWL I’m CC-ing Todd Plessel on this as I see his address in the source code 
for M3IOConvention and also see his name in the NJ support archive as answering 
related e-mail last year. I would assume he can state whether the LAY dimension 
is required of a valid M3IO dataset or simply optional.

rbs

--
Robert B. Schmunk
Webmaster / Senior Systems Programmer
NASA Goddard Institute for Space Studies
2880 Broadway, New York, NY 10025