Changeset 219 in lmdz_wrf


Ignore:
Timestamp:
Jan 14, 2015, 6:02:03 PM (10 years ago)
Author:
lfita
Message:

Adding 'fname' in 'ivars' function

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/nc_var_tools.py

    r218 r219  
    13451345def ivars(ncfile):
    13461346  """Give all the variable names of a file
     1347    ncfile= netCDFfile name from which all variables will be given
    13471348  """
     1349  fname = 'ivars'
     1350
    13481351  if not os.path.isfile(ncfile):
    13491352    print errormsg
    1350     print '    ivars: File "' + ncfile + '" does not exist !!'
     1353    print '    ' + fname + ': File "' + ncfile + '" does not exist !!'
    13511354    print errormsg
    13521355    quit(-1)   
    13531356
    1354   ncf = NetCDFFile(ncfile,'a')
     1357  ncf = NetCDFFile(ncfile,'r')
    13551358  ncvars = ncf.variables
    13561359  allvars=''
Note: See TracChangeset for help on using the changeset viewer.