Re: netcdF4 variables
Thank you very much it works for me. with best regards, Sudheer On Saturday, June 1, 2013 12:51:01 PM UTC+5:30, Andreas Perstinger wrote: > On 01.06.2013 05:30, Sudheer Joseph wrote: > > > some hing like a list > > > xx=nc,variables[:] > > > should get me all variable names with out other surrounding stuff?? > > > > > > In [4]: ncf.variables > > > Out[4]: OrderedDict([(u'LON', ), > > [SNIP] > > > > It looks like "variables" is an OrderedDict. Thus > > > > >>> ncf.variables.keys() > > > > should return a view (or list, depending on your python version) of all > > keys, i.e. all variable names. > > > > Bye, Andreas -- http://mail.python.org/mailman/listinfo/python-list
Re: netcdF4 variables
On 01.06.2013 05:30, Sudheer Joseph wrote: some hing like a list xx=nc,variables[:] should get me all variable names with out other surrounding stuff?? In [4]: ncf.variables Out[4]: OrderedDict([(u'LON', ), [SNIP] It looks like "variables" is an OrderedDict. Thus >>> ncf.variables.keys() should return a view (or list, depending on your python version) of all keys, i.e. all variable names. Bye, Andreas -- http://mail.python.org/mailman/listinfo/python-list
netcdF4 variables
Dear members, I have been using python NetcdF for some time. I understand that we can get variables from a netcdf one by one by using temp=ncf.variable['temp'][:] but is there a way to get a list of variables with out the rest of the stuff as seen below? some hing like a list xx=nc,variables[:] should get me all variable names with out other surrounding stuff?? with best regards. Sudheer In [4]: ncf.variables Out[4]: OrderedDict([(u'LON', ), (u'LAT', ), (u'DEPTH1_1', ), (u'TAX', ), (u'DIF_FD1', ), (u'DIF_FD2', ), (u'DIF_FD3', ), (u'DIF_FD4', ), (u'DIF_FD5', ), (u'DEPTH', ), (u'DEPTH_bnds', ), (u'TIME', ), (u'TEMP_BIAS', )]) -- http://mail.python.org/mailman/listinfo/python-list