Changeset 1921 in lmdz_wrf


Ignore:
Timestamp:
Jul 4, 2018, 1:09:51 AM (7 years ago)
Author:
lfita
Message:

updating `file_creation'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/nc_var_tools.py

    r1907 r1921  
    1269812698    """ Operation to create a file with one variable with a given set of dimensions
    1269912699      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]
    1270112702          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',...)
    1270412707      ncfile= name of the file
    1270512708      varn= name of the variables
     
    1271412717    expectargs = '[dimensions]|[varattributes]|[kind]'
    1271512718 
    12716     check_arguments(fname,values,expectargs,'|')
     12719    gen.check_arguments(fname,values,expectargs,'|')
    1271712720
    1271812721    dimensions = values.split('|')[0].split(',')
     
    1276712770        quit(-1)
    1276812771
    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('!', ' ')
    1277212775   
    1277312776    newattr = basicvardef(newvar, sname, lname, u)
Note: See TracChangeset for help on using the changeset viewer.