You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When reading boundary data, the points file isn't always read correctly and thus it stops at an assertion. The function that reads the points file has this comment:
"""Detects y and z (1-D arrays) from a list of points on a
structured grid. Makes no assumptions about the point
ordering
but it does make assumptions on the ordering. In this function, the user can specify the number of points in the two directions and the code assumes certain order by doing
If the user doesn't pass the number of points-- or rather, the points are in fact scrambled and the reshape above is not desirable-- it assumes one of the dimensions is varying faster in an ordered manner:
The issue is that it assumes that the slow-varying dimension is ordered. The number of points in the slow-varying dimension, obtained with, for example, NY = np.nonzero(zlist > zlist[0])[0][0] only gives the correct number of points in that dimension when zlist is equal to np.sort(zlist). The re-ordering index obtained by reading points need to be carried forward and used when reading the actual files U, T,`k', etc.
The text was updated successfully, but these errors were encountered:
@rthedin, I'm guessing this issue has never been fixed — did you ever come up with a fix/workaround? Desiree has been using some of this code, I think, so this may be relevant again.
I don't think I ever came up with a fix. I'm not sure what my workaround was at the time of the original posting. I don't think this used to happen very frequently.
When reading boundary data, the
points
file isn't always read correctly and thus it stops at an assertion. The function that reads thepoints
file has this comment:windtools/windtools/SOWFA6/constant/boundaryData.py
Lines 147 to 149 in f18bbc1
but it does make assumptions on the ordering. In this function, the user can specify the number of points in the two directions and the code assumes certain order by doing
windtools/windtools/SOWFA6/constant/boundaryData.py
Line 158 in f18bbc1
If the user doesn't pass the number of points-- or rather, the points are in fact scrambled and the
reshape
above is not desirable-- it assumes one of the dimensions is varying faster in an ordered manner:windtools/windtools/SOWFA6/constant/boundaryData.py
Lines 159 to 161 in f18bbc1
or,
windtools/windtools/SOWFA6/constant/boundaryData.py
Lines 166 to 168 in f18bbc1
The issue is that it assumes that the slow-varying dimension is ordered. The number of points in the slow-varying dimension, obtained with, for example,
NY = np.nonzero(zlist > zlist[0])[0][0]
only gives the correct number of points in that dimension whenzlist
is equal tonp.sort(zlist)
. The re-ordering index obtained by readingpoints
need to be carried forward and used when reading the actual filesU
,T
,`k', etc.The text was updated successfully, but these errors were encountered: