source:
trunk/NEMOGCM/CONFIG/ORCA2_LIM/IDL_scripts/getname.pro
@
2528
Last change on this file since 2528 was 2528, checked in by rblod, 14 years ago | |
---|---|
|
|
File size: 565 bytes |
Line | |
---|---|
1 | function 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 | |
26 | end |
Note: See TracBrowser
for help on using the repository browser.