예제 #1
0
if cycle_hour[-2:] == '00':
  ymd = int(cycle_hour)-3
  three_hour = str(ymd)[:-2] + '21'
elif cycle_hour[-2:] == '01':
  ymd = int(cycle_hour)-3
  three_hour = str(ymd)[:-2] + '22'
elif cycle_hour[-2:] == '02':
  ymd = int(cycle_hour)-3
  three_hour = str(ymd)[:-2] + '23'
else:
  three_hour = int(cycle_hour)-3
  three_hour = str(three_hour).zfill(2)

## Download the METAR data
print 'Loading Mesonet Data...'
DataDict = mred( '201105242000.mdf' )
TendDict = mred( '201105242000.mdf' )
## Lists/Dictionaries for plotting functions
syntax = []
plotvar = {}
uservars = []
print 'Plot Variables:\n  PFUNC = \n  WIND = \ntype "exit" to exit\ntype "run" or "r" to run'

while True:
  while True:
    vars = raw_input('==> ')
    if vars.upper() == 'R' or vars.upper() == 'RUN' or vars.upper() == 'EXIT':
      break
    else:
      syntax.append( vars.upper() )
      plt.close()
예제 #2
0
#if cycle_hour[-2:] == '00':
#  ymd = int(cycle_hour)-3
#  three_hour = str(ymd)[:-2] + '21'
#elif cycle_hour[-2:] == '01':
#  ymd = int(cycle_hour)-3
#  three_hour = str(ymd)[:-2] + '22'
#elif cycle_hour[-2:] == '02':
#  ymd = int(cycle_hour)-3
#  three_hour = str(ymd)[:-2] + '23'
#else:
#  three_hour = int(cycle_hour)-3
#  three_hour = str(three_hour).zfill(2)

## Download the METAR data
print 'Loading Mesonet Data...'
DataDict = mred( 'http://mesonet.org/data/public/mesonet/mdf/' + year + '/' + month + '/' + day + '/' + datestring + '.mdf' )
TendDict = mred( '201105242000.mdf' )
## Lists/Dictionaries for plotting functions
syntax = []
plotvar = {}
uservars = []
print 'Plot Variables:\n  PFUNC = \n  WIND = \ntype "exit" to exit\ntype "run" or "r" to run'

while True:
  while True:
    vars = raw_input('==> ')
    if vars.upper() == 'R' or vars.upper() == 'RUN' or vars.upper() == 'EXIT':
      break
    else:
      syntax.append( vars.upper() )
      plt.close()