Changeset 478
- Timestamp:
- 02/09/12 10:34:02
- Files:
-
- raw2proc/trunk/raw2proc/b1_config_20111112.py (added)
- raw2proc/trunk/raw2proc/b2_config_20111005.py (added)
- raw2proc/trunk/raw2proc/billymitchell_config_20110914.py (modified) (1 diff)
- raw2proc/trunk/raw2proc/billymitchell_config_20111029.py (added)
- raw2proc/trunk/raw2proc/proc_cr1000_met.py (added)
- raw2proc/trunk/raw2proc/proc_cr1000_wind.py (added)
- raw2proc/trunk/raw2proc/proc_jpier_ascii_met.py (modified) (2 diffs)
- raw2proc/trunk/raw2proc/procutil.py (modified) (1 diff)
- raw2proc/trunk/raw2proc/raw2proc.py (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
raw2proc/trunk/raw2proc/billymitchell_config_20110914.py
r467 r478 7 7 'institution' : 'nccoos', 8 8 'config_start_date' : '2011-09-14 00:00:00', 9 'config_end_date' : None, # None or yyyy-mm-dd HH:MM:SS9 'config_end_date' : '2011-10-29 00:00:00', # None or yyyy-mm-dd HH:MM:SS 10 10 'packages' : ('sfas',), 11 11 } raw2proc/trunk/raw2proc/proc_jpier_ascii_met.py
r320 r478 1 1 #!/usr/bin/env python 2 # Last modified: Time-stamp: <20 09-12-15 08:40:54haines>2 # Last modified: Time-stamp: <2011-11-22 13:54:28 haines> 3 3 """ 4 4 how to parse data, and assert what data and info goes into … … 133 133 'metadata_url' : 'http://nccoos.org', 134 134 'references' : 'http://nccoos.org', 135 'contact' : ' Jesse Cleary (jcleary@email.unc.edu)',135 'contact' : 'Sara Haines (haines@email.unc.edu)', 136 136 # 137 137 'source' : 'TWS Met station observation', raw2proc/trunk/raw2proc/procutil.py
r448 r478 1 1 #!/usr/bin/env python 2 # Last modified: Time-stamp: <201 0-12-15 09:32:53haines>2 # Last modified: Time-stamp: <2011-12-16 15:18:49 haines> 3 3 """Utilities to help data processing 4 4 raw2proc/trunk/raw2proc/raw2proc.py
r454 r478 1 1 #!/usr/bin/env python 2 # Last modified: Time-stamp: <2011- 02-17 10:57:48 haines>2 # Last modified: Time-stamp: <2011-12-16 17:05:08 haines> 3 3 """Process raw data to monthly netCDF data files 4 4 … … 185 185 # "ind" var from filt_datetime() - what level of granularity was used 186 186 if granularity == 4: 187 # change dt_start to before monthly filename filt_datetime() date 187 # change dt_start to before monthly filename filt_datetime() date 188 # for filenames with just YYYY_MM or YYYYMM add or substract 30 days to 189 # see if it falls within config range. It won't hurt to add names to files 190 # parsed. 188 191 dt_start = si['proc_start_dt']-timedelta(days=31) 189 192 # print dt_start … … 209 212 elif pi['config_end_date'] == None: 210 213 config_end_dt = now_dt 211 214 215 # # check if raw_files are monthly (granularity == 4) 216 # for idx, fn in enumerate(raw_files): 217 # (fndt, granularity) = filt_datetime(os.path.basename(fn), gran=True) 218 # # "ind" var from filt_datetime() - what level of granularity was used 219 # if granularity == 4: 220 # if fndt < config_start_dt: 221 # dts[idx] = fndt + timedelta(days=31) 222 # if fndt > config_end_dt: 223 # dts[idx] = fndt - timedelta(days=31) 224 212 225 new_list = [raw_files[i] for i in range(len(raw_files)) \ 213 226 if config_start_dt <= dts[i] <= config_end_dt] … … 368 381 ofn = os.path.join(si['proc_dir'], si['proc_filename']) 369 382 (raw_files, raw_dts) = find_raw(si, yyyy_mm) 383 print raw_files 384 print raw_dts 370 385 raw_files = which_raw(pi, raw_files, raw_dts) 371 # print raw_files 386 print raw_files 387 print raw_dts 372 388 # remove any previous netcdf file (platform_package_yyyy_mm.nc) 373 389 if index==0 and os.path.exists(ofn):