[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 found here.


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 get number of 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). 

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

Sincerely,
G Satyesh,
India.



--
G Satyesh



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

[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement