pro iug_load_mu_iono_pwr_txt, parameter = parameter, $
downloadonly = downloadonly, $
trange = trange, $
verbose = verbose
if (not keyword_set(verbose)) then verbose=2
parameter_all = strsplit('pwr1 pwr2 pwr3 pwr4',' ', /extract)
if(not keyword_set(parameter)) then parameter='all'
parameters = thm_check_valid_name(parameter, parameter_all, /ignore_case, /include_all)
print, parameters
h=0L
site_time=0
jj=0L
for ii=0L,n_elements(parameters)-1 do begin
if ~size(fns,/type) then begin
file_names = file_dailynames(file_format='YYYY/YYYYMMDD',trange=trange,times=times,/unique)+'_'+parameters[ii]+'.txt'
source = file_retrieve(/struct)
source.verbose=verbose
source.local_data_dir = root_data_dir() + 'iugonet/rish/misc/sgk/mu/ionosphere/pwr/text/'
source.remote_data_dir = 'http://www.rish.kyoto-u.ac.jp/mu/isdata/data/pwr/text/'
local_paths=file_retrieve(file_names,_extra=source, /last_version)
local_paths_all = ~(~size(local_paths_all,/type)) ? $
[local_paths_all, local_paths] : local_paths
if ~(~size(local_paths_all,/type)) then local_paths=local_paths_all
endif else file_names=fns
if (not keyword_set(downloadonly)) then downloadonly=0
if (downloadonly eq 0) then begin
s=''
for h=0L,n_elements(local_paths)-1 do begin
file= local_paths[h]
if file_test(/regular,file) then dprint,'Loading the ionosphere data estimated from the incoherent scatter observation of the MU radar: ',file $
else begin
dprint,'The ionosphere data estimated from the incoherent scatter observation of the MU radar ',file,' not found. Skipping'
continue
endelse
openr,lun,file,/get_lun
readf,lun,s
temp = strsplit(s,",",/extract)
az = temp[0]
ze = temp[1]
readf,lun,s
height = float(strsplit(s,',',/extract))
while(not eof(lun)) do begin
readf,lun,s
data=strsplit(s,' ',/extract)
year = strmid(data[0],0,4)
month = strmid(data[0],5,2)
day = strmid(data[0],8,2)
time = data[1]
stime = time_double(year+'-'+month+'-'+day+'/'+time)
year = strmid(data[3],0,4)
month = strmid(data[3],5,2)
day = strmid(data[3],8,2)
time = data[4]
etime = time_double(year+'-'+month+'-'+day+'/'+time)
mu_time = (stime+etime)/2.0D - time_double('1970-1-1/09:00:00')
pwr = fltarr(1,n_elements(height))
pwr[0,*]= float(data[5:n_elements(height)-1+5])
for j=0L,n_elements(height)-1 do begin
a = float(pwr[0,j])
wbad = where(a eq 999.0 ,nbad)
if nbad gt 0 then a[wbad] = !values.f_nan
pwr[0,j] =a
endfor
append_array, site_time, mu_time
append_array, pwr_app, pwr
endwhile
free_lun,lun
endfor
acknowledgstring = 'If you acquire the middle and upper atmospher (MU) radar data, ' $
+ 'we ask that you acknowledge us in your use of the data. This may be done by ' $
+ 'including text such as the MU data provided by Research Institute ' $
+ 'for Sustainable Humanosphere of Kyoto University. We would also' $
+ 'appreciate receiving a copy of the relevant publications.The distribution of ' $
+ 'ionogram data has been partly supported by the IUGONET (Inter-university Upper ' $
+ 'atmosphere Global Observation NETwork) project (http://www.iugonet.org/) funded '$
+ 'by the Ministry of Education, Culture, Sports, Science and Technology (MEXT), Japan.'
if size(pwr_app,/type) eq 4 then begin
dlimit=create_struct('data_att',create_struct('acknowledgment',acknowledgstring,'PI_NAME', 'Y. Yamamoto'))
store_data,'iug_mu_iono_'+parameters[ii],data={x:site_time, y:pwr_app,v:height},dlimit=dlimit
options,'iug_mu_iono_'+parameters[ii],ytitle='MU-iono!CHeight!C[km]',ztitle= parameters[ii]+'!C[dB]'
options,'iug_mu_iono_'+parameters[ii],spec=1
tdegap, 'iug_mu_iono_'+parameters[ii],dt=3600,/overwrite
endif
site_time=0
pwr_app=0
endif
jj=n_elements(local_paths)
endfor
new_vars=tnames('iug_mu_iono_pwr*')
if new_vars[0] ne '' then begin
print,'******************************
print, 'Data loading is successful!!'
print,'******************************
endif
print, '****************************************************************
print, 'Acknowledgement'
print, '****************************************************************
print, 'If you acquire the middle and upper atmosphere (MU) radar data, '
print, 'we ask that you acknowledge us in your use of the data. '
print, 'This may be done by including text such as MU data provided '
print, 'by Research Institute for Sustainable Humanosphere of Kyoto University. '
print, 'We would also appreciate receiving a copy of the relevant publications. '
print, 'The distribution of ionogram data has been partly supported by the IUGONET '
print, '(Inter-university Upper atmosphere Global Observation NETwork) project '
print, '(http://www.iugonet.org/) funded by the Ministry of Education, Culture, '
print, 'Sports, Science and Technology (MEXT), Japan.'
end