Variables | |
| list | data_types = ['AMDA_STA','AMDA_EARTH'] |
| list | local_dir = interface_fetch_timeserie.info[data_type] |
| tuple | log_name = os.path.join('logs','fetch_amda_speedinsitu_' + '%04d'%(module_common.utc_today.year) + '%02d'%(module_common.utc_today.month) + '%02d'%(module_common.utc_today.day)) |
| tuple | log_id = open(log_name,'a') |
| tuple | sftp = module_toolbox_file.init_sftp(interface_fetch_timeserie.info[data_type]['website'],interface_fetch_timeserie.info[data_type]['user'],port = interface_fetch_timeserie.info[data_type]['port']) |
| 1. More... | |
| tuple | remote_files = interface_fetch_timeserie.get_remote_db_amda(data_type,sftp) |
| list | remote_urls = [ os.path.join(interface_fetch_timeserie.info[data_type]['src'],ifile) for ifile in remote_files ] |
| tuple | output = open(os.path.join(local_dir,'file_url'),'w') |
| 2. More... | |
| tuple | current_dir = os.getcwd() |
| 3. More... | |
| list | obs = interface_fetch_timeserie.info[data_type] |
| list | instr = interface_fetch_timeserie.info[data_type] |
| list | ext = interface_fetch_timeserie.info[data_type] |
| tuple | origin = os.path.basename(ifile) |
| tuple | date = interface_fetch_timeserie.get_date_amda(origin) |
| string | newname = obs+'_' |
| tuple fetchtimeserie.fetch_amda_speedinsitu.current_dir = os.getcwd() |
3.
Create user-friendly symbolic names In local_dir: ln -sf x obs_instr_date.ext
| list fetchtimeserie.fetch_amda_speedinsitu.data_types = ['AMDA_STA','AMDA_EARTH'] |
| tuple fetchtimeserie.fetch_amda_speedinsitu.date = interface_fetch_timeserie.get_date_amda(origin) |
| list fetchtimeserie.fetch_amda_speedinsitu.ext = interface_fetch_timeserie.info[data_type] |
| list fetchtimeserie.fetch_amda_speedinsitu.instr = interface_fetch_timeserie.info[data_type] |
| list fetchtimeserie.fetch_amda_speedinsitu.local_dir = interface_fetch_timeserie.info[data_type] |
| tuple fetchtimeserie.fetch_amda_speedinsitu.log_id = open(log_name,'a') |
| tuple fetchtimeserie.fetch_amda_speedinsitu.log_name = os.path.join('logs','fetch_amda_speedinsitu_' + '%04d'%(module_common.utc_today.year) + '%02d'%(module_common.utc_today.month) + '%02d'%(module_common.utc_today.day)) |
| list fetchtimeserie.fetch_amda_speedinsitu.obs = interface_fetch_timeserie.info[data_type] |
| tuple fetchtimeserie.fetch_amda_speedinsitu.origin = os.path.basename(ifile) |
| tuple fetchtimeserie.fetch_amda_speedinsitu.output = open(os.path.join(local_dir,'file_url'),'w') |
2.
Download all files Download web based files in local folder if not already downloaded. Input:
| tuple fetchtimeserie.fetch_amda_speedinsitu.remote_files = interface_fetch_timeserie.get_remote_db_amda(data_type,sftp) |
| list fetchtimeserie.fetch_amda_speedinsitu.remote_urls = [ os.path.join(interface_fetch_timeserie.info[data_type]['src'],ifile) for ifile in remote_files ] |
| tuple fetchtimeserie.fetch_amda_speedinsitu.sftp = module_toolbox_file.init_sftp(interface_fetch_timeserie.info[data_type]['website'],interface_fetch_timeserie.info[data_type]['user'],port = interface_fetch_timeserie.info[data_type]['port']) |
1.
Open SFTP session and list all files
1.8.5