Changeset 2808 in lmdz_wrf


Ignore:
Timestamp:
Apr 6, 2020, 3:44:48 PM (5 years ago)
Author:
lfita
Message:

Fixing `interp_curve' indices referred to the center of the 3x3 box, thus adding 'ij3x3 = [-1, 0, 1]'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/nc_var_tools.py

    r2805 r2808  
    2248922489    curvevar = np.zeros(tuple(dimref+[Ncurv]), dtype=np.float)
    2249022490
     22491    ij3x3 = [-1, 0, 1]
     22492
    2249122493    for icv in range(Ncurv):
    2249222494        # Getting all `useful' weights
     
    2249722499
    2249822500        for isp in range(Nwgt[icv]):
    22499             dictslice[ydn] = iy + int(ijcurv[icv,0,isp])
    22500             dictslice[xdn] = ix + int(ijcurv[icv,1,isp])
     22501            dictslice[ydn] = iy + ij3x3[int(ijcurv[icv,0,isp])]
     22502            dictslice[xdn] = ix + ij3x3[int(ijcurv[icv,1,isp])]
    2250122503            varslice, dimvarvals = SliceVarDict(ov, dictslice)
    2250222504            iwgt = sortedwgt[isp]
Note: See TracChangeset for help on using the changeset viewer.