Changeset 710 in lmdz_wrf
- Timestamp:
- Apr 20, 2016, 6:02:51 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/nc_var_tools.py
r709 r710 18237 18237 return ncs 18238 18238 18239 def varval_ind(var, ind): 18240 """ Function to provide a value from a variable providing a value for each index 18241 var= variable 18242 ind= list of indices for each dimension of the variable 18243 """ 18244 fname = 'varval_ind' 18245 if len(var.shape) != len(ind): 18246 print errormsg 18247 print ' ' + fname + ': different shape:', var.shape,'and indices:', ind, '!!' 18248 quit(-1) 18249 18250 varslice=[] 18251 for iv in ind: 18252 varslice.append(iv) 18253 18254 val = varval_ind[slice(varslice)] 18255 18256 return val 18257 18239 18258 def VarVal_FillValue(values, filen, varn): 18240 18259 """ Function to transform a given value from a given variable to _FillValue in a netCDF file
Note: See TracChangeset
for help on using the changeset viewer.