source: trunk/CONFIG/ORCA2_LIM/IDL_scripts/getname.pro @ 2150

Last change on this file since 2150 was 2150, checked in by flavoni, 10 years ago

commit idl tools for post-processing, for ORCA2_LIM configuration, see ticket #724

File size: 565 bytes
Line 
1function getname,dir,exp,freq,suff,date
2 
3 file_list = file_search (dir+'/'+exp+'_*_*_'+freq+'_'+suff+'.nc', count = nb_file )
4 
5 file_list = file_basename( file_list )
6
7 filename = ''
8 i = 0
9
10 while  i lt nb_file  and filename eq '' do begin
11 
12    split_name = STRSPLIT(file_list[i],'_',/EXTRACT )
13    date1 = long(split_name[1])
14    date2 = long(split_name[2])
15
16
17    if date1 - date le 0 and  date - date2 le 0 then filename = dir+'/'+file_list[i]
18    i = i + 1
19   
20 endwhile
21
22 if filename eq '' then print,'filename does NOT FOUND'
23
24 return,filename
25
26end
Note: See TracBrowser for help on using the repository browser.