Changeset 2828 in lmdz_wrf for trunk/tools


Ignore:
Timestamp:
Apr 29, 2020, 3:39:07 PM (5 years ago)
Author:
lfita
Message:

Adding use only of coincident variables

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/nc_var_tools.py

    r2826 r2828  
    86708670    file1 = ncfile.split(',')[0]
    86718671    file2 = ncfile.split(',')[1]
    8672     if varname == 'all':
     8672    if varname == 'all' or varname == 'all:all':
    86738673        var1 = 'all'
    86748674        var2 = 'all'
     
    87308730                print '        ',i, ':', varns1[i], varns2[i]
    87318731            print '    excess of variables for file1:', varns1[N2vars:N1vars]
    8732         if N1vars > N2vars:
     8732        if N1vars < N2vars:
    87338733            print '      Vars provided: file1 file2 _______'
    87348734            for i in range(N1vars):
    87358735                print '        ',i, ':', varns1[i], varns2[i]
    87368736            print '    excess of variables for file2:', varns2[N1vars:N2vars]
    8737         quit(-1)
     8737            svarns1 = set(varns1)
     8738            svarns2 = set(varns2)
     8739
     8740        coincvarns = list(svarns1 & svarns2)
     8741        print 'Using only:', coincvarns
     8742        varns1 = coincvarns + []
     8743        varns2 = coincvarns + []
    87388744 
    87398745    for iv in range(N1vars):
Note: See TracChangeset for help on using the changeset viewer.