|
list | scraft = sys.argv[1] |
|
list | hmodel = sys.argv[2] |
|
list | cmodel = sys.argv[3] |
|
list | reftime = sys.argv[4] |
|
list | magtype = sys.argv[5] |
|
list | mode = sys.argv[6] |
|
tuple | today = datetime.datetime.today() |
|
tuple | log_name = os.path.join('logs','recap_' + '%04d'%(today.year) + '%02d'%(today.month) + '%02d'%(today.day)) |
|
tuple | log_id = open(log_name,'a') |
|
string | read_mode = 'fp' |
|
tuple | recap_basename = scraft.upper() |
|
tuple | recap_path = os.path.join('dir.output','RECAP',recap_basename + '.recap') |
|
tuple | ifile = open(recap_path,'r') |
|
tuple | line = ifile.readline() |
|
tuple | ndate = int(len(data)/3) |
|
list | recap_list = [Recap() for i in range(0,ndate)] |
|
tuple | recap = Recap() |
|
tuple | output_dir = module_io.output_dirname(mode,hmodel,cmodel,reftime) |
|
list | recap_list_new = [] |
|
tuple | basename = os.path.basename(ifile) |
|
tuple | date = module_io.unformat_basename(filename,'date') |
|
| add_this_date = True |
|
tuple | time = module_timespace.Time() |
|
tuple | densitymaps_min = module_connectivity.build_density(fp_dict['ssw']) |
|
tuple | densitymaps_max = module_connectivity.build_density(fp_dict['fsw']) |
|
list | densitymaps = [densitymaps_min,densitymaps_max] |
|
list | connectivity_points = [] |
|
Add the most probable connectivity points to a recap file.
Add 2 points in SSW/FSS or 1 point in Measured mode.
If file exists, append the last points to the file if they are more recent.
If file does not exist, create it and add the new sorted point list.
- Author
- M. Indurain
- Date
- 01 Jan 2019