def maketopoh_subset(nplots): pts = [7,10,11,12,1010] xpts = [586475.7664,584743.5377,572116.0213,580391.0424,589808.0244] ypts = [1483303.757,1484475.693,1485888.437,1486712.609,1481951.479] for pt in range(len(pts)): name = str(pts[pt]) dirname = 'fortDEM_' + name dirname2 = 'fort_uniform' + name dirname2 = os.path.join('UniformGrids',dirname2) x1 = xpts[pt] - 5000. x2 = xpts[pt] + 5000. y1 = ypts[pt] - 5000. y2 = ypts[pt] + 5000. mx = int((x2-x1)/100.) + 2 my = int((y2-y1)/100.) + 2 #nplots = [44] # cf.convertfortdir('topotype',nplots=nplots,outputname='fort.h.',\ # components=1,outdir=dirname,fortdir='_output',topotype=3,xll=x1,\ # yll=y1,cellsize=100.0,ncols=mx,nrows=my) # cf.convertfortdir('topotype',nplots=nplots,outputname='fort.b.',\ # components='topo',outdir=dirname,fortdir='_output',topotype=3,xll=x1,\ # yll=y1,cellsize=100.0,ncols=mx,nrows=my) cf.convertfortdir('fortuniform',nplots=nplots,outputname='fort.q',\ components='all',outdir=dirname2,fortdir='_output',xlower=x1,\ xupper=x2,ylower=y1,yupper=y2,mx=mx,my=my)
def maketopoh_subset(nplots): x1 = 6.145e5 - 200. x2 = 6.194e5 y1 = 4.899e6 - 260. y2 = 4.907e6 + 1300.0 mx = int(x2 - x1) + 2 my = int(y2 - y1) + 2 #nplots = [44] cf.convertfortdir('topotype',nplots=nplots,outputname='fort.h.',\ components=1,outdir='forth_sisters',fortdir='_output',topotype=3,xll=x1,yll=y1,cellsize=1.0,ncols=mx,nrows=my)
def maketopoall_subset(nplots): x1=6.145e5 - 200. x2=6.194e5 y1=4.899e6 -260. -500. y2=4.907e6 + 1300.0 mx = int(x2-x1) + 2 my = int(y2-y1) + 2 #nplots = [44] cf.convertfortdir('fortuniform',nplots=nplots,outputname='fort.q',\ components='all',outdir='fortuniform_sisters',fortdir='_output',xlower=x1,\ xupper=x2,ylower=y1,yupper=y2,mx=mx,my=my) """
def makeinit(comp): """ x1=6.145e5 - 200. x2=6.194e5 y1=4.899e6 -260. -500. y2=4.907e6 + 1300.0 mx = int(x2-x1) + 2 my = int(y2-y1) + 2 #nplots = [44] """ outputname = 'topo_' + str(comp) + '.' cf.convertfortdir('topotype',nplots=[80],outputname=outputname,\ components=comp,outdir='sisters_subdomain_init',fortdir='fortuniform_sisters') """
def maketopoq(): cf.convertfortdir('topotype',120,outputname='fort.quniform.',\ components='all',outdir='fortquniform',fortdir='_output',topotype='gdal')
def maketopoeta(): cf.convertfortdir('topotype',outputname='fort.eta.',\ components=7,outdir='forth',topotype=2)
def maketopoh(): cf.convertfortdir('topotype',outputname='fort.h.',\ components=1,outdir='forth',topotype=2)
def maketopob(): cf.convertfortdir('topotype',120,outputname='fort.topo.',\ components='topo',outdir='forttopo',fortdir='_output',topotype='gdal')
def makeuniform(): cf.convertfortdir('fortuniform',[0],outputname='fort.q',\ components='all',outdir='fortuniform',fortdir='_output')
def makerefined(): cf.convertfortdir('fortrefined',[0],outputname='fort.q',\ components='all',outdir='fortrefined',fortdir='_output')
def makescatter(): cf.convertfortdir('scattered',range(71),outputname='fort.xyq',\ components='all',outdir='fortconverted',fortdir='_output')