Boutdata/restart fix new nz#440
Conversation
…xt branch the z-directio nolonger has an additional not used point. Also renamed the function expand -> to resizeZ which is consistent with the naming of the orther functions modified: restart.py
tools/pylib/boutdata/restart.py
Outdated
|
|
||
| if not(mute): | ||
| print(" Resizing "+var) | ||
| print(" Resizing "+var + ' to (nx,nt,nz) = ({},{},{})'.format(newNx,newNy,newNz) ) |
There was a problem hiding this comment.
nx,ny,nz rather than nx,nt,nz
tools/pylib/boutdata/restart.py
Outdated
| return var, newData | ||
|
|
||
|
|
||
| #return var |
There was a problem hiding this comment.
I do not understand. Remove what?
There was a problem hiding this comment.
You can just delete the #return var rather than commenting it out :)
tools/pylib/boutdata/restart.py
Outdated
| mxg = 2 | ||
| myg = 2 | ||
| mxg = mxg | ||
| myg = myg |
There was a problem hiding this comment.
You can remove both of these lines
tools/pylib/boutdata/restart.py
Outdated
| raise ImportError("ERROR: os, sys or glob modules not available") | ||
|
|
||
| def split(nxpe, nype, path="data", output="./", informat="nc", outformat=None): | ||
| def split(nxpe, nype, path="data", output="./", informat="nc", outformat=None, mxg = 2, myg = 2): |
There was a problem hiding this comment.
No spaces around = in def lines:
mxg=2, myg=2):
|
|
||
|
|
||
| def expand(newz, path="data", output="./", informat="nc", outformat=None): | ||
| def resizeZ(newNz, path="data", output="./", informat="nc", outformat=None): |
There was a problem hiding this comment.
resizeZ is probably a better name than expand, but I'm worried this might break existing scripts. Anybody have strong feelings about this renaming?
There was a problem hiding this comment.
I suspect this is not used in an automatic script anywhere, and the name is much better
|
Might be a stupid question, but is this a complete/partial fix for #394? |
|
I guess it is only partial, as this only fixes the python part of the problem, and it seems like the it is still a problem in the IDL routines (https://github.com/JensMadsen/BOUT-dev/blob/bfdb3fd074ce89c9ece6594758aef9ebfd51cc18/tools/idllib/is_pow2.pro). |
fixing expand and resize to comply with new nz convention