[Thread Prev][Thread Next][Index]

Re: [ferret_users] Re: How to get number of variables from nc file



You can use the attribute ..nvars attributes.
let num = ..nvars
The variable 'num' will store the number of variables (9 in your case) in the netCDF file opened. More details can be foundhere.


On Mon, Jun 3, 2019 at 12:29 PM Satyesh Ghetiya <satyeshghetiya@xxxxxxxxx> wrote:
Sorry for the typing mistake, corrected question:

Suppose I have an .nc file with 9 variables in it ( say v1, v2, v3 . . . . v9 ).

How to getnumberof variables from any such .nc file (without counting manually from .nc) ? ( I want a command which gives 9 as answer in above example)

Sincerely ,
G Satyesh ,
India

On Mon, Jun 3, 2019 at 12:27 PM Satyesh Ghetiya <satyeshghetiya@xxxxxxxxx> wrote:
Dear all,,

Suppose I have an .nc file with 9 variables in it (say v1, v2, v3 . . . . v9).<


--
G Satyesh



--
Lijo Abraham Joseph
Research Scholar,
Indian National Centre for Ocean Information Services (INCOIS),
Hyderabad

[Thread Prev][Thread Next][Index]