NCCOOS Trac Projects: Top | Web | Platforms | Processing | Viz | Sprints | Sandbox | (Wind)

Changeset 525

Show
Ignore:
Timestamp:
01/31/14 15:03:18
Author:
cbc
Message:

Point Billy Mitchell plots at level2. Revert to northward directional labeling.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • proc2plot/trunk/proc2plot/billymitchell_sodar_plot.py

    r463 r525  
    3939    ################################ 
    4040 
    41     ncFile1='/seacoos/data/nccoos/level1/billymitchell/sodar1/billymitchell_sfas_'+prev_month.strftime('%Y_%m')+'.nc' 
    42     ncFile2='/seacoos/data/nccoos/level1/billymitchell/sodar1/billymitchell_sfas_'+this_month.strftime('%Y_%m')+'.nc' 
     41    ncFile1='/seacoos/data/nccoos/level2/billymitchell/sodar1/billymitchell_sfas_'+prev_month.strftime('%Y_%m')+'.nc' 
     42    ncFile2='/seacoos/data/nccoos/level2/billymitchell/sodar1/billymitchell_sfas_'+this_month.strftime('%Y_%m')+'.nc' 
    4343 
    4444    have_ncFile1 = os.path.exists(ncFile1) 
     
    6868    units = nc.var('time').units 
    6969    dt = [procutil.es2dt(e) for e in es] 
    70     # set timezone info to UTC (since data from level1 should be in UTC!!) 
     70    # set timezone info to UTC (since data from level2 should be in UTC!!) 
    7171    dt = [e.replace(tzinfo=dateutil.tz.tzutc()) for e in dt] 
    7272    # return new datetime based on computer local 
     
    390390    ################################ 
    391391 
    392     ncFile1='/seacoos/data/nccoos/level1/billymitchell/sodar1/billymitchell_sfas_'+prev_month.strftime('%Y_%m')+'.nc' 
    393     ncFile2='/seacoos/data/nccoos/level1/billymitchell/sodar1/billymitchell_sfas_'+this_month.strftime('%Y_%m')+'.nc' 
     392    ncFile1='/seacoos/data/nccoos/level2/billymitchell/sodar1/billymitchell_sfas_'+prev_month.strftime('%Y_%m')+'.nc' 
     393    ncFile2='/seacoos/data/nccoos/level2/billymitchell/sodar1/billymitchell_sfas_'+this_month.strftime('%Y_%m')+'.nc' 
    394394 
    395395    have_ncFile1 = os.path.exists(ncFile1) 
     
    419419    units = nc.var('time').units 
    420420    dt = [procutil.es2dt(e) for e in es] 
    421     # set timezone info to UTC (since data from level1 should be in UTC!!) 
     421    # set timezone info to UTC (since data from level2 should be in UTC!!) 
    422422    dt = [e.replace(tzinfo=dateutil.tz.tzutc()) for e in dt] 
    423423    # return new datetime based on computer local 
     
    547547    ################################ 
    548548 
    549     ncFile1='/seacoos/data/nccoos/level1/billymitchell/sodar1/billymitchell_sfas_'+prev_month.strftime('%Y_%m')+'.nc' 
    550     ncFile2='/seacoos/data/nccoos/level1/billymitchell/sodar1/billymitchell_sfas_'+this_month.strftime('%Y_%m')+'.nc' 
     549    ncFile1='/seacoos/data/nccoos/level2/billymitchell/sodar1/billymitchell_sfas_'+prev_month.strftime('%Y_%m')+'.nc' 
     550    ncFile2='/seacoos/data/nccoos/level2/billymitchell/sodar1/billymitchell_sfas_'+this_month.strftime('%Y_%m')+'.nc' 
    551551 
    552552    have_ncFile1 = os.path.exists(ncFile1) 
     
    576576    units = nc.var('time').units 
    577577    dt = [procutil.es2dt(e) for e in es] 
    578     # set timezone info to UTC (since data from level1 should be in UTC!!) 
     578    # set timezone info to UTC (since data from level2 should be in UTC!!) 
    579579    dt = [e.replace(tzinfo=dateutil.tz.tzutc()) for e in dt] 
    580580    # return new datetime based on computer local 
  • proc2plot/trunk/proc2plot/jpier_met1_plot.py

    r455 r525  
    11#!/usr/bin/env /opt/env/haines/dataproc/bin/python 
    2 # Last modified:  Time-stamp: <2009-09-14 11:17:11 haines> 
     2# Last modified:  Time-stamp: <2012-05-14 15:27:38 haines> 
    33"""jpier_met_plot1""" 
    44 
     
    258258savefig('/home/haines/rayleigh/img/jpier_met_last30days.png') 
    259259 
    260 ####################################### 
    261 # Last 7 days 
    262 ####################################### 
    263  
    264 print ' ... Last 7 days' 
    265 ax = axs[0] 
    266 ax.set_xlim(date2num(dt[-1])-7, date2num(dt[-1])) 
    267 ax.xaxis.set_major_locator( DayLocator(range(0,32,1)) ) 
    268 ax.xaxis.set_minor_locator( HourLocator(range(0,25,6)) ) 
    269 ax.set_xticklabels([]) 
    270 ax.set_xlabel('JPIER Met -- Last 7 days from ' + last_dt_str) 
    271  
    272 ax = axs[1] 
    273 ax.set_xlim(date2num(dt[-1])-7, date2num(dt[-1])) 
    274 ax.xaxis.set_major_locator( DayLocator(range(2,32,1)) ) 
    275 ax.xaxis.set_minor_locator( HourLocator(range(0,25,6)) ) 
    276 ax.set_xticklabels([]) 
    277  
    278 ax = axs[2] 
    279 ax.set_xlim(date2num(dt[-1])-7, date2num(dt[-1])) 
    280 ax.xaxis.set_major_locator( DayLocator(range(2,32,1)) ) 
    281 ax.xaxis.set_minor_locator( HourLocator(range(0,25,6)) ) 
    282 ax.set_xticklabels([]) 
    283  
    284 ax = axs[3] 
    285 ax.set_xlim(date2num(dt[-1])-7, date2num(dt[-1])) 
    286 ax.xaxis.set_major_locator( DayLocator(range(2,32,1)) ) 
    287 ax.xaxis.set_minor_locator( HourLocator(range(0,25,6)) ) 
    288 ax.xaxis.set_major_formatter( DateFormatter('%m/%d') ) 
    289 ax.set_xlabel('JPIER Met -- Last 7 days from ' + last_dt_str) 
    290  
    291 savefig('/home/haines/rayleigh/img/jpier_met_last07days.png') 
    292  
    293 ####################################### 
    294 # Last 1 day (24hrs) 
    295 ####################################### 
    296  
    297 print ' ... Last 1 days' 
    298  
    299 ax = axs[0] 
    300 ax.set_xlim(date2num(dt[-1])-1, date2num(dt[-1])) 
    301 ax.xaxis.set_major_locator( HourLocator(range(0,25,1)) ) 
    302 ax.xaxis.set_minor_locator( MinuteLocator(range(0,61,30)) ) 
    303 ax.set_xticklabels([]) 
    304 ax.set_xlabel('JPIER Met -- Last 24 hours from ' + last_dt_str) 
    305  
    306 ax = axs[1] 
    307 ax.set_xlim(date2num(dt[-1])-1, date2num(dt[-1])) 
    308 ax.xaxis.set_major_locator( HourLocator(range(0,25,1)) ) 
    309 ax.xaxis.set_minor_locator( MinuteLocator(range(0,61,30)) ) 
    310 ax.set_xticklabels([]) 
    311  
    312 ax = axs[2] 
    313 ax.set_xlim(date2num(dt[-1])-1, date2num(dt[-1])) 
    314 ax.xaxis.set_major_locator( HourLocator(range(0,25,1)) ) 
    315 ax.xaxis.set_minor_locator( MinuteLocator(range(0,61,30)) ) 
    316 ax.set_xticklabels([]) 
    317  
    318 ax = axs[3] 
    319 ax.set_xlim(date2num(dt[-1])-1, date2num(dt[-1])) 
    320 ax.xaxis.set_major_locator( HourLocator(range(0,25,1)) ) 
    321 ax.xaxis.set_minor_locator( MinuteLocator(range(0,61,30)) ) 
    322 ax.xaxis.set_major_formatter( DateFormatter('%H') ) 
    323 ax.set_xlabel('JPIER Met -- Last 24 hours from ' + last_dt_str) 
    324  
    325 savefig('/home/haines/rayleigh/img/jpier_met_last01days.png') 
    326  
    327  
     260 
     261 
     262    ####################################### 
     263    # Last 30 days 
     264    ####################################### 
     265    if plot_type=='latest': 
     266        print ' ... Last 30 days' 
     267        for idx, ax in enumerate(axs): 
     268            ax.set_xlim(date2num(dt[-1])-30, date2num(dt[-1])) 
     269            ax.xaxis.set_major_locator( DayLocator(range(2,32,2)) ) 
     270            ax.xaxis.set_minor_locator( HourLocator(range(0,25,12)) ) 
     271            ax.set_xticklabels([]) 
     272            if idx==0: 
     273                ax.set_xlabel('JPIER Met -- Last 30 days from ' + last_dt_str) 
     274            elif idx==len(axs)-1: 
     275                ax.xaxis.set_major_formatter( DateFormatter('%m/%d') ) 
     276                ax.set_xlabel('JPIER Met -- Last 30 days from ' + last_dt_str) 
     277 
     278        savefig('/home/haines/rayleigh/img/jpier_met_last30days.png') 
     279 
     280 
     281    ####################################### 
     282    # Last 7 days 
     283    ####################################### 
     284    if plot_type=='latest': 
     285        print ' ... Last 7 days' 
     286        for idx, ax in enumerate(axs): 
     287            ax.set_xlim(date2num(dt[-1])-7, date2num(dt[-1])) 
     288            ax.xaxis.set_major_locator( DayLocator(range(0,32,1)) ) 
     289            ax.xaxis.set_minor_locator( HourLocator(range(0,25,6)) ) 
     290            ax.set_xticklabels([]) 
     291            if idx==0: 
     292                ax.set_xlabel('JPIER Met -- Last 7 days from ' + last_dt_str) 
     293            elif idx==len(axs)-1: 
     294                ax.xaxis.set_major_formatter( DateFormatter('%m/%d') ) 
     295                ax.set_xlabel('JPIER Met -- Last 7 days from ' + last_dt_str) 
     296                 
     297        savefig('/home/haines/rayleigh/img/jpier_met_last07days.png') 
     298 
     299 
     300    ####################################### 
     301    # Last 1 day (24hrs) 
     302    ####################################### 
     303    if plot_type=='latest': 
     304        print ' ... Last 1 days' 
     305 
     306        for idx, ax in enumerate(axs): 
     307            ax.set_xlim(date2num(dt[-1])-1, date2num(dt[-1])) 
     308            ax.xaxis.set_major_locator( HourLocator(range(0,25,1)) ) 
     309            ax.xaxis.set_minor_locator( MinuteLocator(range(0,61,30)) ) 
     310            ax.set_xticklabels([]) 
     311            if idx==0: 
     312                ax.set_xlabel('JPIER Met -- Last 24 hours from ' + last_dt_str) 
     313            elif idx==len(axs)-1: 
     314                ax.xaxis.set_major_formatter( DateFormatter('%H') ) 
     315                ax.set_xlabel('JPIER Met -- Last 24 hours from ' + last_dt_str) 
     316 
     317        savefig('/home/haines/rayleigh/img/jpier_met_last01days.png') 
     318 
     319 
     320 
     321 
     322 
  • proc2plot/trunk/proc2plot/proc2plot.py

    r455 r525  
    11#!/usr/bin/env python 
    2 # Last modified:  Time-stamp: <2011-02-25 14:25:26 haines> 
     2# Last modified:  Time-stamp: <2012-05-11 16:55:13 haines> 
    33"""Create plots from monthly netCDF data files 
    44 
  • proc2plot/trunk/proc2plot/spin/spin_crow_all_plot_month.py

    r455 r525  
    11#!/usr/bin/env /opt/env/haines/dataproc/bin/python 
    2 # Last modified:  Time-stamp: <2011-02-25 14:29:22 haines> 
     2# Last modified:  Time-stamp: <2013-12-05 10:52:31 haines> 
    33"""crow_all_plot_month""" 
    44 
     
    2121proc_dir = '/seacoos/data/nccoos/level1/crow/wq/' 
    2222# fns = glob.glob((os.path.join(proc_dir, '*.nc'))) 
    23 fns = glob.glob((os.path.join(proc_dir, '*2011_0?*.nc'))) 
     23fns = glob.glob((os.path.join(proc_dir, '*2013_0?*.nc'))) 
    2424fns.sort() 
    2525