Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #46643

netcdF4 variables

Newsgroups comp.lang.python
Date 2013-05-31 20:30 -0700
Message-ID <de9d0c8d-d7cc-45a8-a53e-06efed145700@googlegroups.com> (permalink)
Subject netcdF4 variables
From Sudheer Joseph <sjo.india@gmail.com>

Show all headers | View raw


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', <netCDF4.Variable object at 0x254aad0>), (u'LAT', <netCDF4.Variable object at 0x254ab50>), (u'DEPTH1_1', <netCDF4.Variable object at 0x254abd0>), (u'TAX', <netCDF4.Variable object at 0x254ac50>), (u'DIF_FD1', <netCDF4.Variable object at 0x254acd0>), (u'DIF_FD2', <netCDF4.Variable object at 0x254ad50>), (u'DIF_FD3', <netCDF4.Variable object at 0x254add0>), (u'DIF_FD4', <netCDF4.Variable object at 0x254ae50>), (u'DIF_FD5', <netCDF4.Variable object at 0x254aed0>), (u'DEPTH', <netCDF4.Variable object at 0x254af50>), (u'DEPTH_bnds', <netCDF4.Variable object at 0x261b050>), (u'TIME', <netCDF4.Variable object at 0x261b0d0>), (u'TEMP_BIAS', <netCDF4.Variable object at 0x261b150>)])

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

netcdF4 variables Sudheer Joseph <sjo.india@gmail.com> - 2013-05-31 20:30 -0700
  Re: netcdF4 variables Andreas Perstinger <andipersti@gmail.com> - 2013-06-01 09:21 +0200
    Re: netcdF4 variables Sudheer Joseph <sjo.india@gmail.com> - 2013-06-01 04:54 -0700

csiph-web