Changeset 392 in lmdz_wrf for trunk


Ignore:
Timestamp:
Apr 7, 2015, 11:57:39 AM (10 years ago)
Author:
lfita
Message:

Adding new types on 'create_file', 'create_variable'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/nc_var_tools.py

    r387 r392  
    1374913749      values= [dimensions]|[varattributes]|[kind]
    1375013750        [dimensions]: [dimn1]:[dsize1],...,[dimnN]:[dsizeN], ',' pairs of variable name [dimn] and [size]
    13751           if [dsize] = 'None', give a third value with the real size
     13751          if [dsize] = 'None' (for UNLIMITED), give a third value with the real size
    1375213752        [attributes]: [std_name]@[long_name]@[units], standard name, long name and units of the variable
    1375313753        [kind]: type of variable (standard netCDF4/C-like values, 'c', 'i', 'f', 'f8',...)
     
    1380213802        newvar = onc.createVariable(varn, 'c', tuple(dnames))
    1380313803#        newvar[:] = np.zeros(tuple(dsize), dtype=np.float)
    13804     if kind == 'f4':
     13804    if kind == 'f' or kind == 'f4':
    1380513805        newvar = onc.createVariable(varn, 'f4', tuple(dnames))
    1380613806        newvar[:] = np.zeros(tuple(dsize), dtype=np.float)
     
    1388913889        newvar = onc.createVariable(varn, 'c', tuple(dnames))
    1389013890#        newvar[:] = np.zeros(tuple(dsize), dtype=np.float)
    13891     if kind == 'f4':
     13891    if kind == 'f' or kind == 'f4':
    1389213892        newvar = onc.createVariable(varn, 'f4', tuple(dnames))
    1389313893        newvar[:] = np.zeros(tuple(dsize), dtype=np.float)
Note: See TracChangeset for help on using the changeset viewer.