Changeset 1921 in lmdz_wrf
- Timestamp:
- Jul 4, 2018, 1:09:51 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/nc_var_tools.py
r1907 r1921 12698 12698 """ Operation to create a file with one variable with a given set of dimensions 12699 12699 values= [dimensions]|[varattributes]|[kind] 12700 [dimensions]: [dimn1]:[dsize1],...,[dimnN]:[dsizeN], ',' pairs of variable name [dimn] and [size] 12700 [dimensions]: [dimn1]:[dsize1],...,[dimnN]:[dsizeN], ',' pairs of variable 12701 name [dimn] and [size] 12701 12702 if [dsize] = 'None' (for UNLIMITED), give a third value with the real size 12702 [attributes]: [std_name]@[long_name]@[units], standard name, long name and units of the variable 12703 [kind]: type of variable (standard netCDF4/C-like values, 'c', 'i', 'f', 'f8',...) 12703 [varattributes]: [std_name]@[long_name]@[units], standard name, long name 12704 and units of the variable ('!' for spaces) 12705 [kind]: type of variable (standard netCDF4/C-like values, 'c', 'i', 'f', 12706 'f8',...) 12704 12707 ncfile= name of the file 12705 12708 varn= name of the variables … … 12714 12717 expectargs = '[dimensions]|[varattributes]|[kind]' 12715 12718 12716 check_arguments(fname,values,expectargs,'|')12719 gen.check_arguments(fname,values,expectargs,'|') 12717 12720 12718 12721 dimensions = values.split('|')[0].split(',') … … 12767 12770 quit(-1) 12768 12771 12769 sname = attributes.split('@')[0] 12770 lname = attributes.split('@')[1] 12771 u = attributes.split('@')[2] 12772 sname = attributes.split('@')[0].replace('!', ' ') 12773 lname = attributes.split('@')[1].replace('!', ' ') 12774 u = attributes.split('@')[2].replace('!', ' ') 12772 12775 12773 12776 newattr = basicvardef(newvar, sname, lname, u)
Note: See TracChangeset
for help on using the changeset viewer.