Changeset 756 in lmdz_wrf


Ignore:
Timestamp:
May 4, 2016, 12:32:37 PM (9 years ago)
Author:
lfita
Message:

Adding `generic_tools'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/diagnostics.py

    r654 r756  
    1212import re
    1313import nc_var_tools as ncvar
     14import generic_tools as gen
    1415import datetime as dtime
    1516
     
    872873    else:
    873874        depvars = diags[idiag].split('|')[1].split('@')
    874         if ncvar.searchInlist(depvars, 'WRFgeop'): WRFgeop_compute = True
    875         if ncvar.searchInlist(depvars, 'WRFp'): WRFp_compute = True
    876         if ncvar.searchInlist(depvars, 'WRFt'): WRFt_compute = True
    877         if ncvar.searchInlist(depvars, 'WRFrh'): WRFrh_compute = True
    878         if ncvar.searchInlist(depvars, 'WRFght'): WRFght_compute = True
    879         if ncvar.searchInlist(depvars, 'WRFdens'): WRFdens_compute = True
    880         if ncvar.searchInlist(depvars, 'WRFpos'): WRFpos_compute = True
    881         if ncvar.searchInlist(depvars, 'WRFtime'): WRFtime_compute = True
     875        if gen.searchInlist(depvars, 'WRFgeop'): WRFgeop_compute = True
     876        if gen.searchInlist(depvars, 'WRFp'): WRFp_compute = True
     877        if gen.searchInlist(depvars, 'WRFt'): WRFt_compute = True
     878        if gen.searchInlist(depvars, 'WRFrh'): WRFrh_compute = True
     879        if gen.searchInlist(depvars, 'WRFght'): WRFght_compute = True
     880        if gen.searchInlist(depvars, 'WRFdens'): WRFdens_compute = True
     881        if gen.searchInlist(depvars, 'WRFpos'): WRFpos_compute = True
     882        if gen.searchInlist(depvars, 'WRFtime'): WRFtime_compute = True
    882883
    883884if WRFgeop_compute:
     
    10131014        for depv in depvars:
    10141015            if not ncobj.variables.has_key(depv) and not                             \
    1015               ncvar.searchInlist(NONcheckingvars, depv) and                          \
    1016               not ncvar.searchInlist(methods, depv):
     1016              gen.searchInlist(NONcheckingvars, depv) and                            \
     1017              not gen.searchInlist(methods, depv):
    10171018                print errormsg
    10181019                print '  ' + main + ": file '" + opts.ncfile +                       \
     
    10221023        depvars = diags[idiag].split('|')[1]
    10231024        if not ncobj.variables.has_key(depvars) and not                              \
    1024           ncvar.searchInlist(NONcheckingvars, depvars) and                           \
    1025           not ncvar.searchInlist(methods, depvars):
    1026             print errormsg, 'Lluis',methods
     1025          gen.searchInlist(NONcheckingvars, depvars) and                             \
     1026          not gen.searchInlist(methods, depvars):
     1027            print errormsg
    10271028            print '  ' + main + ": file '" + opts.ncfile +                           \
    10281029              "' does not have variable '" + depvars + "' !!"
Note: See TracChangeset for help on using the changeset viewer.