Changeset 219
- Timestamp:
- 01/09/09 10:27:04
- Files:
-
- raw2proc/trunk/raw2proc/hampton_config_20050812.py (added)
- raw2proc/trunk/raw2proc/hampton_config_20080930.py (added)
- raw2proc/trunk/raw2proc/proc_avp_ysi_6600_v1_CDL2.py (added)
- raw2proc/trunk/raw2proc/proc_avp_ysi_6600_v2_CDL2.py (modified) (4 diffs)
- raw2proc/trunk/raw2proc/procutil.py (modified) (3 diffs)
- raw2proc/trunk/raw2proc/raw2proc.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
raw2proc/trunk/raw2proc/proc_avp_ysi_6600_v2_CDL2.py
r218 r219 1 1 #!/usr/bin/env python 2 # Last modified: Time-stamp: <2009-01-0 7 17:54:32haines>2 # Last modified: Time-stamp: <2009-01-08 11:50:47 haines> 3 3 """ 4 4 how to parse data, and assert what data and info goes into … … 71 71 08/18/08 00:30:09 26.94 41.87 26.81 0.183 8.00 3.4 4.8 6.66 72 72 73 2. While each parameter is measured uniquely with time and depth such that, temp(t) and z(t) 74 match up with time, we want to grid depth every 1 cm and make each param as temp(t,z). 73 2. Use a ragged array to store each uniquely measured param at each 74 time and depth but not gridded, so this uses fixed profiler CDL 75 but modified to have raw data for each cast along each column. 76 For plotting, the data will need to be grid at specified depth bins. 75 77 76 78 Tony Whipple at IMS says 'The AVPs sample at one second intervals. … … 81 83 many observations fell within that bin.' 82 84 83 Do we interpolate or average samples in bin?84 85 85 """ 86 86 import numpy … … 108 108 # ensure signal end of profile after last profile by appending a blank line to data file 109 109 lines.append(' \r\n') 110 111 # ensure blank line between profile casts 112 for i, line in enumerate(lines): 113 if re.search(r"Profile Time", line, re.IGNORECASE): 114 if not re.search("^ \r\n", lines[i-1]): 115 lines.insert(i, " \r\n") 110 116 111 117 N = nprof raw2proc/trunk/raw2proc/procutil.py
r218 r219 1 1 #!/usr/bin/env python 2 # Last modified: Time-stamp: <200 8-12-17 16:49:11haines>2 # Last modified: Time-stamp: <2009-01-08 09:12:17 haines> 3 3 """Utilities to help data processing 4 4 … … 371 371 platform = pi['id'] 372 372 package = si['id'] 373 # input file 373 374 si['proc_filename'] = '%s_%s_%s.nc' % (platform, package, yyyy_mm) 374 375 ifn = os.path.join(si['proc_dir'], si['proc_filename']) 376 # output file 377 si['latest_filename'] = 'nccoos_%s_%s_latest.nc' % (platform, package) 378 ofn = os.path.join(si['latest_dir'], si['latest_filename']) 375 379 if os.path.exists(ifn): 380 print ' ... ... latest : %s ' % (ifn,) 376 381 # get dt from current month file 377 382 (es, units) = nc_get_time(ifn) 378 383 dt = [es2dt(e) for e in es] 379 384 last_dt = dt[-1] 385 else: 386 # no input then remove output if exists and exit 387 print " ... ... latest: NO latest file created" 388 if os.path.exists(ofn): 389 os.remove(ofn) 390 return 380 391 381 392 # determine which index of data is within the specified timeframe (last 2 days) … … 414 425 415 426 global_atts['start_date'] = dt[0].strftime('%Y-%m-%d %H:%M:%S') 416 si['latest_filename'] = 'nccoos_%s_%s_latest.nc' % (platform, package)417 ofn = os.path.join(si['latest_dir'], si['latest_filename'])418 427 d = (global_atts, var_atts, dim_inits, var_inits, var_data) 419 428 raw2proc/trunk/raw2proc/raw2proc.py
r218 r219 1 1 #!/usr/bin/env python 2 # Last modified: Time-stamp: <2009-01-0 7 17:12:01haines>2 # Last modified: Time-stamp: <2009-01-08 09:12:00 haines> 3 3 """Process raw data to monthly netCDF data files 4 4 … … 318 318 process(pi, si, raw_files, yyyy_mm) 319 319 else: 320 print ' ... ... \nNOTE: no raw files found for %s %s for %s\n' % (package, platform, yyyy_mm)320 print ' ... ... NOTE: no raw files found for %s %s for %s' % (package, platform, yyyy_mm) 321 321 322 322 # update latest data for SECOORA commons 323 323 if 'latest_dir' in si.keys(): 324 print ' ... ... latest : %s ' % si['latest_dir']324 # print ' ... ... latest : %s ' % si['latest_dir'] 325 325 proc2latest(pi, si, yyyy_mm) 326 326 # 327 327 else: 328 print ' ... ... ... \nNOTE: No active platforms\n'328 print ' ... ... NOTE: No active platforms' 329 329 330 330 def manual(platform, package, yyyy_mm):