Changeset 2602 in lmdz_wrf for trunk/tools
- Timestamp:
- Jun 12, 2019, 8:50:50 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/generic_tools.py
r2601 r2602 16813 16813 16814 16814 distsum = np.sum(dists) 16815 wghts = dists/distsum 16816 16817 distsum = np.sum(1./dists) 16818 wghts = 1./dists/distsum 16815 if np.all(dists >= 1.e-6): 16816 wghts = dists/distsum 16817 16818 distsum = np.sum(1./dists) 16819 wghts = 1./dists/distsum 16820 else: 16821 wghts = np.zeros((4), dtype=np.float) 16822 mindist = np.min(dists) 16823 for iv in range(4): 16824 if dists[iv] == mindist: 16825 wghts[iv] = 1. 16826 break 16819 16827 16820 16828 plon = np.sum(lons*wghts)
Note: See TracChangeset
for help on using the changeset viewer.