示例#1
0
parser.add_argument("-fo", "--fileout",type=str, \
  help="Name of output Palm topography file.")
parser.add_argument("-D","--Dims", type=int, nargs=2,\
  help="Dimensions [N, E] of the raster tile.")
parser.add_argument("-O","--Orig", type=float, nargs=2, default=[0.,0.],\
  help="Global top left origin [N, E] of the raster tile. Default = [0, 0]")
parser.add_argument("-d","--dP", type=float, nargs=2,\
  help="Raster resolution [dn, de] in meters [m].")
parser.add_argument("-r","--rotation", type=float, default=0.,\
  help="Grid rotation in [rad]. Default = 0.")
parser.add_argument("-p", "--printOn", help="Print the resulting raster data.",\
  action="store_true", default=False)
parser.add_argument("-pp", "--printOnly", help="Only print the resulting data. Don't save.",\
  action="store_true", default=False)
args = parser.parse_args()
writeLog(parser, args, args.printOnly)
#==========================================================#

fileout = args.fileout
Rdims = args.Dims
ROrig = args.Orig
dP = args.dP
rotation = args.rotation
printOn = args.printOn
printOnly = args.printOnly

Rdict = dict()
R = np.zeros(Rdims)
Rdict['R'] = R
Rdict['GlobOrig'] = np.array(ROrig)
Rdict['dPx'] = np.array(dP)
示例#2
0
parser.add_argument("--labels", help="User specified labels.", action="store_true",\
    default=False)
parser.add_argument("--reuse", help="Reuse once specified variable selections.", action="store_true",\
    default=False)
parser.add_argument("-v", "--var", help="Variable Name in CSV-file", type=str, nargs='+',\
  default=['u','v','w'] )
parser.add_argument("-yl","--ylims", help="Y-axis limits: [min,max]. Default=[0,10]",\
  type=float,nargs=2,default=[0.,10.])
parser.add_argument("-fn","--figName", help="Name of the (temporary) figures. (default=tmp)",\
  type=str,default="tmp")
parser.add_argument("-fa","--fileAnim", help="Name of the animation file. (default=anim.gif)",\
  type=str,default="anim.gif")
parser.add_argument("-na", "--noAnim", help="Do not make an animation.",\
  action="store_true", default=False)
args = parser.parse_args()
writeLog(parser, args)
#==========================================================#

strKey = args.strKey
figName = args.figName
fileAnim = args.fileAnim
noAnimation = args.noAnim
ylims = args.ylims
varList = args.var

fileNos, fileList = filesFromList("*" + strKey + "*")

print(' The varList [-v, --var] option is over ridden at this point. ')
print(' Reading coordinate values from file {} ...'.format(fileList[0]))
coordList = ['arc_length', 'Points:0', 'Points:1', 'Points:2']
xv = extractFromCSV(fileList[0], coordList)