Exemplo n.º 1
0
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)
    print 'got PH'
    TH = WRF_timeseries.get_full_vert(wrf_dir+station+'.d02.TH',model_start)[1]
    print 'got TH'
    VV = WRF_timeseries.get_full_vert(wrf_dir+station+'.d02.VV',model_start)[1]
    print 'got VV'
    UU = WRF_timeseries.get_full_vert(wrf_dir+station+'.d02.UU',model_start)[1]
    print 'got UU'
    QV = WRF_timeseries.get_full_vert(wrf_dir+station+'.d02.QV',model_start)[1]
    QV = QV*1000 #convert from kg/kg to g/kg
    print 'got QV'
    
    # Since pcolormesh doesn't like datetime on the xaxis I need to get a 
    # little creative making my own tick labels
        
    # Assign x-axis variables
Exemplo n.º 2
0
        pass

    # Get observed timeseries data
    obs = MesoWest_timeseries.get_mesowest_ts(station, start_date_early,
                                              end_date)
    obs_dates = obs['datetimes']
    obs_spd = obs['wind speed']
    obs_dir = obs['wind direction']
    obs_temp = obs['temperature']
    # calculate the U and V components from wind speed
    obs_u, obs_v = wind_calcs.wind_spddir_to_uv(obs_spd, obs_dir)

    # Get the WRF timeseries data
    wrf_dir = '/uufs/chpc.utah.edu/common/home/horel-group4/model/bblaylock/WRF3.7_lake299_ember/WRFV3/test/em_real/'
    wrf_name = 'lake299'
    wrf_temp = WRF_timeseries.get_ts_data(wrf_dir + station + '.d02.TS',
                                          't') - 273.15
    wrf_u = WRF_timeseries.get_ts_data(wrf_dir + station + '.d02.TS', 'u')
    wrf_v = WRF_timeseries.get_ts_data(wrf_dir + station + '.d02.TS', 'v')
    wrf_time = WRF_timeseries.get_ts_data(wrf_dir + station + '.d02.TS',
                                          'ts_hour')
    # calculate the wind speed and direction from u and v
    wrf_spd = wind_calcs.wind_uv_to_spd(wrf_u, wrf_v)
    wrf_dir = wind_calcs.wind_uv_to_dir(wrf_u, wrf_v)
    # convert wrf_time to datetime
    wrf_dates = np.array([])
    for i in wrf_time:
        wrf_dates = np.append(wrf_dates, start_date + timedelta(hours=i))

    # Get the WRF timeseries data for a second series
    wrf_dir2 = '/uufs/chpc.utah.edu/common/home/horel-group4/model/bblaylock/WRF3.7_lake303_ember/WRFV3/test/em_real/'
    wrf_name2 = 'lake303'
Exemplo n.º 3
0
     print "skipped"
     pass
 
 # Get observed timeseries data
 obs = MesoWest_timeseries.get_mesowest_ts(station,start_date_early,end_date)
 obs_dates = obs['datetimes']
 obs_spd = obs['wind speed']
 obs_dir = obs['wind direction']
 obs_temp = obs['temperature']
 # calculate the U and V components from wind speed
 obs_u, obs_v = wind_calcs.wind_spddir_to_uv(obs_spd,obs_dir)
 
 # Get the WRF timeseries data
 wrf_dir = '/uufs/chpc.utah.edu/common/home/horel-group4/model/bblaylock/WRF3.7_lake299_ember/WRFV3/test/em_real/'
 wrf_name='lake299'
 wrf_temp = WRF_timeseries.get_ts_data(wrf_dir+station+'.d02.TS','t')-273.15
 wrf_u = WRF_timeseries.get_ts_data(wrf_dir+station+'.d02.TS','u')
 wrf_v = WRF_timeseries.get_ts_data(wrf_dir+station+'.d02.TS','v')
 wrf_time = WRF_timeseries.get_ts_data(wrf_dir+station+'.d02.TS','ts_hour')
 # calculate the wind speed and direction from u and v
 wrf_spd = wind_calcs.wind_uv_to_spd(wrf_u,wrf_v)
 wrf_dir = wind_calcs.wind_uv_to_dir(wrf_u,wrf_v)
 # convert wrf_time to datetime
 wrf_dates = np.array([])
 for i in wrf_time:
     wrf_dates = np.append(wrf_dates,start_date+timedelta(hours=i))
     
     
 # Get the WRF timeseries data for a second series
 wrf_dir2 = '/uufs/chpc.utah.edu/common/home/horel-group4/model/bblaylock/WRF3.7_lake303_ember/WRFV3/test/em_real/'
 wrf_name2='lake303'