Skip to content

Boutdata/restart fix new nz#440

Merged
bendudson merged 6 commits intoboutproject:v4.0.0-RCfrom
JensMadsen:boutdata/restart_fix_new_nz
Jan 25, 2017
Merged

Boutdata/restart fix new nz#440
bendudson merged 6 commits intoboutproject:v4.0.0-RCfrom
JensMadsen:boutdata/restart_fix_new_nz

Conversation

@JensMadsen
Copy link
Contributor

fixing expand and resize to comply with new nz convention

…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
@JensMadsen JensMadsen changed the base branch from master to v4.0.0-RC January 20, 2017 12:00

if not(mute):
print(" Resizing "+var)
print(" Resizing "+var + ' to (nx,nt,nz) = ({},{},{})'.format(newNx,newNy,newNz) )
Copy link
Member

@loeiten loeiten Jan 20, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nx,ny,nz rather than nx,nt,nz

return var, newData


#return var
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reomve?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not understand. Remove what?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#return var

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can just delete the #return var rather than commenting it out :)

mxg = 2
myg = 2
mxg = mxg
myg = myg
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can remove both of these lines

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):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

resizeZ is probably a better name than expand, but I'm worried this might break existing scripts. Anybody have strong feelings about this renaming?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suspect this is not used in an automatic script anywhere, and the name is much better

@ZedThree
Copy link
Member

Might be a stupid question, but is this a complete/partial fix for #394?

@loeiten
Copy link
Member

loeiten commented Jan 23, 2017

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).

@bendudson bendudson merged commit e2c604a into boutproject:v4.0.0-RC Jan 25, 2017
@JensMadsen JensMadsen deleted the boutdata/restart_fix_new_nz branch January 30, 2017 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants