1 | ;------------------------------------------------------------ |
---|
2 | ;------------------------------------------------------------ |
---|
3 | ;------------------------------------------------------------ |
---|
4 | ;+ |
---|
5 | ; @file_comments sets s_fichier to name of the vairmer file associated |
---|
6 | ; to the given date in vairmer format ( yymmdd ) |
---|
7 | ; |
---|
8 | ; @obsolete |
---|
9 | ; |
---|
10 | ; @param vdate {in} date vairmer ex:930124 |
---|
11 | ; @param dim {in} 'so' ou 'vo' par defaut so est choisi |
---|
12 | ; @param nomexp {in} nom de l'experience en trois lettres par defaut prefix |
---|
13 | ; |
---|
14 | ; @returns le nom du fichier vairmer (depuis iodir) |
---|
15 | ; |
---|
16 | ; @uses common.pro |
---|
17 | ; |
---|
18 | ; @example |
---|
19 | ; IDL> fic = ficdate(930124) |
---|
20 | ; |
---|
21 | ; @history Jerome Vialard (jv\@lodyc.jussieu.fr) |
---|
22 | ;1/7/98 |
---|
23 | ;- |
---|
24 | ;------------------------------------------------------------ |
---|
25 | ;------------------------------------------------------------ |
---|
26 | ;------------------------------------------------------------ |
---|
27 | function ficdate, vdate, dim, nomexp |
---|
28 | @common |
---|
29 | ;------------------------------------------------------------ |
---|
30 | case n_params() of |
---|
31 | 1: dim = 'SO' |
---|
32 | 2: dim=strupcase(dim) |
---|
33 | 3: begin |
---|
34 | prefix=nomexp |
---|
35 | dim=strupcase(dim) |
---|
36 | end |
---|
37 | endcase |
---|
38 | ;------------------------------------------------------------ |
---|
39 | ; constitution de l'adresse ou aller chercher le fichier |
---|
40 | ;-------------------------------------------------------------- |
---|
41 | ; date yymmdd = vdate |
---|
42 | ; sets month, year and day to the good value : |
---|
43 | rien = juldate(vdate) |
---|
44 | ; constitution de la date yymmdd |
---|
45 | case 1 of |
---|
46 | year lt 10: s_year ='0'+string(format='(i1)',year) |
---|
47 | year ge 10 and year lt 100:s_year= string(format='(i2)',year) |
---|
48 | year ge 100:BEGIN |
---|
49 | year = year-1900 |
---|
50 | if year LT 10 then s_year ='0'+string(format='(i1)',year) $ |
---|
51 | ELSE s_year =string(format='(i2)',year) |
---|
52 | end |
---|
53 | endcase |
---|
54 | if month lt 10 then s_month='0'+string(format='(i1)',month) $ |
---|
55 | else s_month= string(format='(i2)',month) |
---|
56 | if day lt 10 then s_day='0'+string(format='(i1)',day) $ |
---|
57 | else s_day= string(format='(i2)',day) |
---|
58 | ; |
---|
59 | case dim of |
---|
60 | 'SO': begin |
---|
61 | case 1 of |
---|
62 | (year eq 0) and (month eq 0) : s_fichier=iodir+prefix+'O.EX.SO' |
---|
63 | (year eq 0) and (month ne 0) and (day eq 0) : s_fichier=iodir+prefix+'O.SE.SO'+s_month |
---|
64 | (year ne 0) and (month eq 0) : s_fichier=iodir+prefix+'O.AN.SO'+s_year |
---|
65 | (year ne 0) and (day eq 0) : s_fichier=iodir+prefix+'O.MO.SO'+s_year+s_month |
---|
66 | else: s_fichier=iodir+prefix+'O..SO'+s_year+s_month+s_day |
---|
67 | endcase |
---|
68 | end |
---|
69 | 'VO': begin |
---|
70 | case 1 of |
---|
71 | (year eq 0) and (month eq 0) : s_fichier=iodir+prefix+'O.EX.VO' |
---|
72 | (year eq 0) and (month ne 0) and (day eq 0) : s_fichier=iodir+prefix+'O.SE.VO'+s_month |
---|
73 | (year ne 0) and (month eq 0) : s_fichier=iodir+prefix+'O.AN.VO'+s_year |
---|
74 | (year ne 0) and (day eq 0) : s_fichier=iodir+prefix+'O.MO.VO'+s_year+s_month |
---|
75 | else: s_fichier=iodir+prefix+'O..VO'+s_year+s_month+s_day |
---|
76 | endcase |
---|
77 | end |
---|
78 | else: return, report('le fichier doit etre VO ou SO') |
---|
79 | endcase |
---|
80 | ; |
---|
81 | ; print,' ' |
---|
82 | ; print,' adresse du fichier: ',fichier |
---|
83 | ;------------------------------------------------------------ |
---|
84 | return, s_fichier |
---|
85 | ;------------------------------------------------------------ |
---|
86 | end |
---|
87 | ;------------------------------------------------------------ |
---|