pro make_cnes_lis, aj1, aj2
datapath=getenv("NAS_RPWS")
print, datapath
openw, unit0, getenv('ROOT_RPWS')+"/pro/script_file", /get_lun
printf, unit0, "u rpwsCnes KrOnOs04"
printf, unit0, "prompt"
printf, unit0, "ascii"
for aj=aj1, aj2 do begin
year=aj/1000L
ddday=aj-1000L*year
dir=make_dir_tab(year, ddday, year, ddday)
openr, unit1, datapath+*dir[0]+'/lis/'+strtrim(string(aj), 2)+'.lis', /get_lun
openw, unit2, "lis", /get_lun
a=''
while not eof(unit1) do begin
readf, unit1, a
if strmid(a, 0, 1) ne "K" then begin
print, "error in format"
endif
a="P"+strmid(a, 1, strlen(a)-1)
printf, unit2, a
endwhile
close, unit1
close, unit2
free_lun, unit1
free_lun, unit2
printf, unit0, "put lis"
printf,unit0, "rename lis "+strtrim(string(aj), 2)+'.lis'
endfor
printf, unit0, "bye"
close, unit0
free_lun, unit0
end