Changeset 377 in lmdz_wrf


Ignore:
Timestamp:
Mar 20, 2015, 1:03:39 PM (10 years ago)
Author:
lfita
Message:

Adding non-checking for statistical variable names on that variables with already a statistical section in the name

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/nc_var_tools.py

    r372 r377  
    184184    stats=['min','max','mean','stdv', 'sum']
    185185
     186# Variables with a statistical section on their name...
     187    NOstatsvars = ['zmaxth', 'zmax_th', 'lmax_th', 'lmaxth']
     188
    186189    ifst = False
    187     for st in stats:
    188         if varName.find(st) > -1:
    189             print '    '+ fname + ": varibale '" + varName + "' with a statistical "+\
    190               " surname: '",st,"' !!"
    191             Lst = len(st)
    192             LvarName = len(varName)
    193             varn = varName[0:LvarName - Lst]
    194             ifst = True
    195             break
     190    if not searchInlist(NOstatsvars, varName.lower()):
     191        for st in stats:
     192            if varName.find(st) > -1:
     193                print '    '+ fname + ": varibale '" + varName + "' with a " +       \
     194                  "statistical surname: '",st,"' !!"
     195                Lst = len(st)
     196                LvarName = len(varName)
     197                varn = varName[0:LvarName - Lst]
     198                ifst = True
     199                break
    196200    if not ifst:
    197201        varn = varName
Note: See TracChangeset for help on using the changeset viewer.