NOAA-PMEL/PyFerret

Get limits of variables

Opened this issue · 0 comments

It would be very convenient to get all limits of variables from a dataset from a single call. I had described this request in the #43 issue already. Finally the suggestion to use '..varnames' was enough to get list of variables but not to get limits of variables.

So I would like to reactivate my initial suggestion to get available variables and their indice limits (and perhaps more) as a python dictionnary from a function call like:

aDict = pyferret.listVariables()     

This method could return a dictionnary as follows:

{'levitus_climatology.cdf': {
                           'vars': ['TEMP', 'SALT'],
                           'dims': [{'I': [1, 360], 'J': [1, 180], 'K': [1, 31], 'L': None, 'M': None, 'N': None},
                                       {'I': [1, 360],  'J': [1, 180], 'K': [1, 31], 'L': None, 'M': None, 'N': None}],
                             },
 'monthly_navy_winds.cdf': {
                           'vars': ['UWND', 'VWND'],
                           'dims': [{'I': [1, 144], 'J': [1, 73], 'K': None, 'L': [1, 132], 'M': None, 'N': None},
                                       {'I': [1, 144], 'J': [1, 73], 'K': None, 'L': [1, 132], 'M': None, 'N': None}],
                            }
}