SWDatabase
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros Pages
Namespaces | Variables
fetch_discover_velocity.py File Reference

Namespaces

 fetchtimeserie.fetch_discover_velocity
 
 fetch_discover_velocity
 Download and reformat DISCOVER Velocity files from fetch type DISCOVER_VELOCITY.
 
 fetch_nso_date
 Download and reformat magnetic carrington maps from fetch type NSO_DATE.
 

Variables

string fetchtimeserie.fetch_discover_velocity.help_message
 
tuple fetchtimeserie.fetch_discover_velocity.date_begin = module_common.utc_today-datetime.timedelta(days=10)
 
 fetchtimeserie.fetch_discover_velocity.last_data = False
 
 fetchtimeserie.fetch_discover_velocity.download = True
 
int fetchtimeserie.fetch_discover_velocity.verbose = 0
 
string fetchtimeserie.fetch_discover_velocity.fetch_type = 'DISCOVER_VELOCITY'
 
list fetchtimeserie.fetch_discover_velocity.local_dir = interface_fetch_timeserie.fetch_info[fetch_type]
 
list fetchtimeserie.fetch_discover_velocity.table_name = interface_fetch_timeserie.fetch_info[fetch_type]
 
tuple fetchtimeserie.fetch_discover_velocity.log_name = os.path.join('logs','fetch_timeserie_discover_velocity_' + '%04d'%(module_common.utc_today.year) + '%02d'%(module_common.utc_today.month) + '%02d'%(module_common.utc_today.day))
 
tuple fetchtimeserie.fetch_discover_velocity.log_id = open(log_name,'a')
 
tuple fetchtimeserie.fetch_discover_velocity.itime = module_timespace.Time()
 
tuple fetchtimeserie.fetch_discover_velocity.logs = database_timeserie.init_db(database_timeserie.database_path,1)
 
string fetchtimeserie.fetch_discover_velocity.message = '... Connecting to ngdc.noaa.gov website...'
 
tuple fetchtimeserie.fetch_discover_velocity.server = interface_fetch_timeserie.connect_remote_server(fetch_type)
 
tuple fetchtimeserie.fetch_discover_velocity.all_remote_files = interface_fetch_timeserie.read_remote_server(fetch_type,server,date_min = date_begin)
 
list fetchtimeserie.fetch_discover_velocity.pattern = interface_fetch_timeserie.fetch_info[fetch_type]
 
tuple fetchtimeserie.fetch_discover_velocity.metafile = interface_fetch_timeserie.MetaFile()
 
list fetchtimeserie.fetch_discover_velocity.remote_files_fm1 = [ all_remote_files[-1] ]
 
tuple fetchtimeserie.fetch_discover_velocity.to_be_downloaded = interface_fetch_timeserie.vn2vnp1(remote_files_fm1,fetch_type,-1)
 
list fetchtimeserie.fetch_discover_velocity.downloaded_files = []
 
list fetchtimeserie.fetch_discover_velocity.remote_files_f0 = []
 
tuple fetchtimeserie.fetch_discover_velocity.metafile_f0 = interface_fetch_timeserie.MetaFile()
 
tuple fetchtimeserie.fetch_discover_velocity.to_be_f1_fetched = interface_fetch_timeserie.vn2vnp1(remote_files_f0,fetch_type,0)
 
list fetchtimeserie.fetch_discover_velocity.f1_fetched_files = []
 
list fetchtimeserie.fetch_discover_velocity.remote_files_f1 = []
 
tuple fetchtimeserie.fetch_discover_velocity.metafile_f1 = interface_fetch_timeserie.MetaFile()
 
tuple fetchtimeserie.fetch_discover_velocity.name_f1 = interface_fetch_timeserie.set_name_np1(fetch_type,metafile_f0.name,0)
 
tuple fetchtimeserie.fetch_discover_velocity.to_be_f2_fetched = interface_fetch_timeserie.vn2vnp1(remote_files_f1,fetch_type,1)
 
list fetchtimeserie.fetch_discover_velocity.f2_fetched_paths = []
 
 fetchtimeserie.fetch_discover_velocity.path_f1 = metafile.path
 
 fetchtimeserie.fetch_discover_velocity.file_f1 = metafile.name
 
tuple fetchtimeserie.fetch_discover_velocity.file_f2 = interface_fetch_timeserie.set_name_np1(fetch_type,file_f1,1)
 
tuple fetchtimeserie.fetch_discover_velocity.path_f2 = os.path.join(local_dir,file_f2)
 
list fetchtimeserie.fetch_discover_velocity.f2_fetched_files = []
 
 fetchtimeserie.fetch_discover_velocity.file_vx = metafile.name
 
tuple fetchtimeserie.fetch_discover_velocity.flevel = interface_fetch_timeserie.find_fetch_level(fetch_type,file_vx)
 
tuple fetchtimeserie.fetch_discover_velocity.date_in = interface_fetch_timeserie.get_datetime(fetch_type,flevel,file_vx)
 
tuple fetchtimeserie.fetch_discover_velocity.date_beg = datetime.datetime(date_in.year,date_in.month,date_in.day,0)
 
tuple fetchtimeserie.fetch_discover_velocity.date_end = datetime.datetime(date_in.year,date_in.month,date_in.day,23,59,59)
 
tuple fetchtimeserie.fetch_discover_velocity.result = database_timeserie.find_element([table_name],conn,cur,filename = file_vx)
 
tuple fetchtimeserie.fetch_discover_velocity.row_id