I see the following in dap.py:

# Grab the lat, lon, and time variable names.
# We assume the variable order is (time, lat, lon)
dataset_dimensions = dataset.dimensions
time = dataset_dimensions[0]
lat = dataset_dimensions[1]
lon = dataset_dimensions[2]


However, I've also seen
(https://earthdata.nasa.gov/files/cf-conventions_v1.4.pdf ) that the
convention for the dimensions is:

date or time (T) / height (Z) / latitude (Y) / longitude (X)

test_dap.py fails because the file that is in the test case has a
single valued altitude dimension in the second position while the test
is expecting to find 89 latitudes.


Should I patch dap.py to:

time = dataset_dimensions[0]
height = dataset_dimensions[1]
lat = dataset_dimensions[2]
lon = dataset_dimensions[3]


Would it be better still to make a small dictionary of common terms
{(time, 0), ('height',1), ('altitude',1), ...} and try to interrogate
the dimensions by name and then fall back to the ordering convention
if the names aren't found?


Michael A. Anderson

Reply via email to