[Thread Prev][Thread Next][Index]

[ferret_users] Query about string function



Dear Developers

Is there any function to check variable name is exist  or not in Netcdf file ?

Assume 100 netcdf file are there in directory, each file contains 3 variables say

Var_foo_1
Var_foo_2
Var_foo_3

and you just want to list them using loop for that syntax would be something like below


let ii=0
repeat/range=1:100 ( let ii=`ii+1`; use file_`ii`; list/file=dummy Var_foo_1,Var_foo_2,Var_foo_3)

if suppose 95 file contains all 3 variable and 96th file contains only 2 variables then obviously you will receive error msg saying variable does not exist, in order to skip such files some provision is needed otherwise loop will not continue. please let me know if such string functions are available in ferret or any other alternate solution.


Akshay Hegde,
National Institute of Oceanography,
Dona Paula, Panjim, Goa
 

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

Privacy Policy | Disclaimer | Accessibility Statement