- Timestamp:
- Apr 7, 2015, 11:57:39 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/nc_var_tools.py
r387 r392 13749 13749 values= [dimensions]|[varattributes]|[kind] 13750 13750 [dimensions]: [dimn1]:[dsize1],...,[dimnN]:[dsizeN], ',' pairs of variable name [dimn] and [size] 13751 if [dsize] = 'None' , give a third value with the real size13751 if [dsize] = 'None' (for UNLIMITED), give a third value with the real size 13752 13752 [attributes]: [std_name]@[long_name]@[units], standard name, long name and units of the variable 13753 13753 [kind]: type of variable (standard netCDF4/C-like values, 'c', 'i', 'f', 'f8',...) … … 13802 13802 newvar = onc.createVariable(varn, 'c', tuple(dnames)) 13803 13803 # newvar[:] = np.zeros(tuple(dsize), dtype=np.float) 13804 if kind == 'f 4':13804 if kind == 'f' or kind == 'f4': 13805 13805 newvar = onc.createVariable(varn, 'f4', tuple(dnames)) 13806 13806 newvar[:] = np.zeros(tuple(dsize), dtype=np.float) … … 13889 13889 newvar = onc.createVariable(varn, 'c', tuple(dnames)) 13890 13890 # newvar[:] = np.zeros(tuple(dsize), dtype=np.float) 13891 if kind == 'f 4':13891 if kind == 'f' or kind == 'f4': 13892 13892 newvar = onc.createVariable(varn, 'f4', tuple(dnames)) 13893 13893 newvar[:] = np.zeros(tuple(dsize), dtype=np.float)
Note: See TracChangeset
for help on using the changeset viewer.