;+ ; ; @file_comments ; sets s_fichier to name of the vairmer file associated ; to the given date in vairmer format ( yymmdd ) ; ; @obsolete ; ; @param vdate {in} ; date vairmer ex:930124 ; ; @param dim {in} ; 'so' ou 'vo' par defaut so est choisi ; ; @param nomexp {in} ; nom de l'experience en trois lettres par defaut prefix ; ; @returns ; le nom du fichier vairmer (depuis iodir) ; ; @uses ; common ; ; @examples ; IDL> fic = ficdate(930124) ; ; @history ; Jerome Vialard (jv\@lodyc.jussieu.fr) ; 1/7/98 ; ; @version ; $Id$ ; ;- function ficdate, vdate, dim, nomexp ; compile_opt idl2, strictarrsubs, obsolete ; @common ;------------------------------------------------------------ case n_params() of 1: dim = 'SO' 2: dim=strupcase(dim) 3: begin prefix=nomexp dim=strupcase(dim) end endcase ;------------------------------------------------------------ ; constitution de l'adresse ou aller chercher le fichier ;-------------------------------------------------------------- ; date yymmdd = vdate ; sets month, year and day to the good value : rien = juldate(vdate) ; constitution de la date yymmdd case 1 of year lt 10: s_year ='0'+string(format='(i1)',year) year ge 10 and year lt 100:s_year= string(format='(i2)',year) year ge 100:BEGIN year = year-1900 if year LT 10 then s_year ='0'+string(format='(i1)',year) $ ELSE s_year =string(format='(i2)',year) end endcase if month lt 10 then s_month='0'+string(format='(i1)',month) $ else s_month= string(format='(i2)',month) if day lt 10 then s_day='0'+string(format='(i1)',day) $ else s_day= string(format='(i2)',day) ; case dim of 'SO': begin case 1 of (year eq 0) and (month eq 0) : s_fichier=iodir+prefix+'O.EX.SO' (year eq 0) and (month ne 0) and (day eq 0) : s_fichier=iodir+prefix+'O.SE.SO'+s_month (year ne 0) and (month eq 0) : s_fichier=iodir+prefix+'O.AN.SO'+s_year (year ne 0) and (day eq 0) : s_fichier=iodir+prefix+'O.MO.SO'+s_year+s_month else: s_fichier=iodir+prefix+'O..SO'+s_year+s_month+s_day endcase end 'VO': begin case 1 of (year eq 0) and (month eq 0) : s_fichier=iodir+prefix+'O.EX.VO' (year eq 0) and (month ne 0) and (day eq 0) : s_fichier=iodir+prefix+'O.SE.VO'+s_month (year ne 0) and (month eq 0) : s_fichier=iodir+prefix+'O.AN.VO'+s_year (year ne 0) and (day eq 0) : s_fichier=iodir+prefix+'O.MO.VO'+s_year+s_month else: s_fichier=iodir+prefix+'O..VO'+s_year+s_month+s_day endcase end else: return, report('le fichier doit etre VO ou SO') endcase ; ; print,' ' ; print,' adresse du fichier: ',fichier ;------------------------------------------------------------ return, s_fichier ;------------------------------------------------------------ end ;------------------------------------------------------------