source: trunk/SRC/Obsolete/ficdate.pro @ 118

Last change on this file since 118 was 118, checked in by pinsard, 18 years ago

add $ in Calendar, Grid, Interpolation, Obsolete and Postscript *.pro files, add svn:keywords Id to all these files, some improvements in header

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 3.3 KB
Line 
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; @examples
19; IDL> fic = ficdate(930124)
20;
21; @history Jerome Vialard  (jv\@lodyc.jussieu.fr)
22;1/7/98
23;
24; @version $Id$
25;
26;-
27;------------------------------------------------------------
28;------------------------------------------------------------
29;------------------------------------------------------------
30function ficdate, vdate, dim, nomexp
31;
32  compile_opt idl2, strictarrsubs, obsolete
33;
34@common
35;------------------------------------------------------------
36case n_params() of
37  1: dim = 'SO'
38  2: dim=strupcase(dim)
39  3: begin
40       prefix=nomexp
41       dim=strupcase(dim)
42     end
43endcase
44;------------------------------------------------------------
45;   constitution de l'adresse ou aller chercher le fichier
46;--------------------------------------------------------------
47; date yymmdd = vdate
48; sets month, year and day to the good value :
49   rien = juldate(vdate)
50; constitution de la date yymmdd
51   case 1 of
52     year lt 10:                s_year ='0'+string(format='(i1)',year)
53     year ge 10 and year lt 100:s_year=     string(format='(i2)',year)
54     year ge 100:BEGIN
55        year = year-1900
56        if year LT 10 then s_year ='0'+string(format='(i1)',year) $
57         ELSE s_year =string(format='(i2)',year)
58     end
59   endcase
60   if month lt 10 then s_month='0'+string(format='(i1)',month) $
61                  else s_month=    string(format='(i2)',month)
62   if day lt 10 then s_day='0'+string(format='(i1)',day) $
63                else s_day=    string(format='(i2)',day)
64;
65   case dim of
66     'SO': begin
67       case 1 of
68          (year eq 0) and (month eq 0) : s_fichier=iodir+prefix+'O.EX.SO'
69          (year eq 0) and (month ne 0) and (day eq 0) : s_fichier=iodir+prefix+'O.SE.SO'+s_month
70          (year ne 0) and (month eq 0) : s_fichier=iodir+prefix+'O.AN.SO'+s_year
71          (year ne 0) and (day eq 0) :   s_fichier=iodir+prefix+'O.MO.SO'+s_year+s_month
72          else: s_fichier=iodir+prefix+'O..SO'+s_year+s_month+s_day
73       endcase
74     end
75     'VO': begin
76       case 1 of
77          (year eq 0) and (month eq 0) : s_fichier=iodir+prefix+'O.EX.VO'
78          (year eq 0) and (month ne 0) and (day eq 0) : s_fichier=iodir+prefix+'O.SE.VO'+s_month
79          (year ne 0) and (month eq 0) : s_fichier=iodir+prefix+'O.AN.VO'+s_year
80          (year ne 0) and (day eq 0) : s_fichier=iodir+prefix+'O.MO.VO'+s_year+s_month
81          else: s_fichier=iodir+prefix+'O..VO'+s_year+s_month+s_day
82       endcase
83     end
84     else: return, report('le fichier doit etre VO ou SO')
85   endcase
86;
87;   print,' '
88;   print,' adresse du fichier: ',fichier
89;------------------------------------------------------------
90   return, s_fichier
91;------------------------------------------------------------
92end
93;------------------------------------------------------------
Note: See TracBrowser for help on using the repository browser.