Ejemplo n.º 1
0
import matplotlib.pyplot as plt
import matplotlib.dates
from matplotlib.dates import DateFormatter, YearLocator, MonthLocator, DayLocator, HourLocator
import os

def epoch_to_datetime(i):
    return datetime.fromtimestamp(i), datetime.fromtimestamp(i).strftime('%H')

def datetime_to_str(x):
    return x.strftime("%H")


timer1 = datetime.now()
model_start = datetime(2015,6,17,0)
wrf_dir = '/uufs/chpc.utah.edu/common/home/horel-group4/model/bblaylock/WRF3.7_lake303_ember/WRFV3/test/em_real/'    
STN_NAME, STN_ID, LAT, LON = read_tslist.read_tslist(wrf_dir+"tslist")

FIGDIR = '/uufs/chpc.utah.edu/common/home/u0553130/public_html/MS/timeheight/'
if not os.path.exists(FIGDIR):
    os.makedirs(FIGDIR)

for s in np.arange(0,len(STN_ID)):
    station = STN_ID[s]
    st_name = STN_NAME[s]
    print 'working on',station    
    plt.cla()
    plt.clf()
    plt.close()
    
    # Open the geopotential height file
    dates, PH = WRF_timeseries.get_full_vert(wrf_dir+station+'.d02.PH',model_start)
Ejemplo n.º 2
0
from functions import wind_calcs, MesoWest_timeseries, WRF_timeseries, read_tslist, WRF_timeseries
from datetime import datetime, timedelta
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.dates import DateFormatter, YearLocator, MonthLocator, DayLocator, HourLocator

timer1 = datetime.now()

start_date_early = datetime(2015, 6, 17, 0)
start_date = datetime(2015, 6, 17, 0)
end_date = datetime(2015, 6, 19, 7)

FIGDIR = '/uufs/chpc.utah.edu/common/home/u0553130/public_html/MS/timeseries/early/303/'
# Get list of TS station id
tslist = '/uufs/chpc.utah.edu/common/home/horel-group4/model/bblaylock/WRF3.7_lake303_ember/WRFV3/test/em_real/tslist'
ts = read_tslist.read_tslist(tslist)
station_IDs = ts[1]
station_names = ts[0]
station = 'UKBKB'

for i in np.arange(14, len(station_IDs)):
    plt.cla()
    plt.clf()
    plt.close()

    station = station_IDs[i]
    print "Working on", station
    station_name = station_names[i]
    if station == 'USDR1' or station == 'QHV':
        print "skipped"
        pass
Ejemplo n.º 3
0
from functions import wind_calcs, MesoWest_timeseries, WRF_timeseries, read_tslist, WRF_timeseries
from datetime import datetime, timedelta
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.dates import DateFormatter, YearLocator, MonthLocator, DayLocator, HourLocator

timer1 = datetime.now()

start_date_early = datetime(2015,6,17,0)
start_date = datetime(2015,6,17,0)
end_date = datetime(2015,6,19,7)

FIGDIR = '/uufs/chpc.utah.edu/common/home/u0553130/public_html/MS/timeseries/early/303/'
# Get list of TS station id
tslist = '/uufs/chpc.utah.edu/common/home/horel-group4/model/bblaylock/WRF3.7_lake303_ember/WRFV3/test/em_real/tslist'
ts = read_tslist.read_tslist(tslist)
station_IDs = ts[1]
station_names = ts[0]
station = 'UKBKB'


for i in np.arange(14,len(station_IDs)):    
    plt.cla()
    plt.clf()
    plt.close()

    station = station_IDs[i]    
    print "Working on", station
    station_name = station_names[i]
    if station =='USDR1' or station =='QHV':
        print "skipped"