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