Changeset 1397 in lmdz_wrf for trunk/tools


Ignore:
Timestamp:
Dec 20, 2016, 5:41:09 PM (8 years ago)
Author:
lfita
Message:

Adding repeated counting distances in `linearint_3x3weights'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/generic_tools.py

    r1396 r1397  
    1093610936
    1093710937    wgt = np.where(dist <= maxdist, dist / inc, 0.)
    10938     #print 'Lluis weights _______', sortdist[0:4]
    10939     #for i in range(3):
    10940     #    print wgt[:,i]
     10938    if np.sum(wgt) > 1.000001:
     10939        wgt = np.where(dist <= maxdist, dist, 0.)
     10940        inc = np.sum(wgt)
     10941        wgt = np.where(wgt > 0., wgt/inc, 0.)
     10942        Nvals = np.sum(wgt > 0.)
     10943
     10944#    print 'Lluis weights _______', sortdist[0:4],'max:',maxdist,'sum:',np.sum(wgt)
     10945#    for i in range(3):
     10946#        print wgt[:,i]
    1094110947
    1094210948    return wgt, Nvals, distpos
Note: See TracChangeset for help on using the changeset viewer.