You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am modifying the read_array function inside nco.py as below:
def read_array(self, infile, var_names):
file_handle = self.read_cdf(infile)
for var_name in var_names:
try:
# return the data array for each variable
result[var_name] = file_handle.variables[var_name][:]
except KeyError:
print("Cannot find variable: {0}".format(var_name))
raise KeyError
return result
so we don't have to call returnArray=[] one by one.
I remember the native nco commands extract multiple variables such as: ncks -v latitudes,longitudes
can support extracting multiple variables from netcdf file.
If this kind of actual feature is already existed, feel free to address how should I use/call it, in case I missed it.
The text was updated successfully, but these errors were encountered:
I am modifying the read_array function inside nco.py as below:
The usage for my case would be:
so we don't have to call returnArray=[] one by one.
I remember the native nco commands extract multiple variables such as:
ncks -v latitudes,longitudes
can support extracting multiple variables from netcdf file.
If this kind of actual feature is already existed, feel free to address how should I use/call it, in case I missed it.
The text was updated successfully, but these errors were encountered: