source: trunk/SRC/ToBeReviewed/PLOTS/DIVERS/restoreatt.pro @ 226

Last change on this file since 226 was 226, checked in by pinsard, 17 years ago

corrections of some misspellings in some *.pro

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 1.9 KB
RevLine 
[2]1;------------------------------------------------------------
2;------------------------------------------------------------
3;------------------------------------------------------------
4;+
5;
[142]6; @file_comments
[226]7; Allows to reattribute global variables associated with a field
[163]8; when we give a structure created by saveatt.pro by example.
[2]9;
[226]10; @categories
[142]11; Utilities
[2]12;
[142]13; @param STRUCT {in}{required}
[226]14; a structure like the one who read litchamp.
[142]15;        See IDL> xhelp,'litchamp'
[2]16;
[142]17; @uses
18; common.pro
[2]19;
[142]20; @restrictions
[226]21; Change the value if global variables attribute of a field: vargrid,
[142]22; varname, varunit, vardate, varexp , valmask and time.
[2]23;
[142]24; @history
[157]25; Sebastien Masson (smasson\@lodyc.jussieu.fr)
[142]26;                       15/6/1999
[2]27;
[142]28; @version
29; $Id$
30;
[2]31;-
32;------------------------------------------------------------
33;------------------------------------------------------------
34;------------------------------------------------------------
35PRO restoreatt, struct
[114]36;
37  compile_opt idl2, strictarrsubs
38;
[2]39@common
40;------------------------------------------------------------
41   nomelements = tag_names(struct)
42   for i = 0, n_tags(struct)-1 do begin
43      case strlowcase(strmid(nomelements[i], 0, 1)) of
44         'g':vargrid = strupcase(struct.(i))
45         'n':varname = struct.(i)
46         'u':varunit = struct.(i)
47         'e':varexp = struct.(i)
48         'm':valmask = struct.(i)
[226]49         'd':BEGIN
50            if size(struct.(i),/type) EQ 7 THEN BEGIN
[2]51               vardate = struct.(i)
52            ENDIF ELSE BEGIN
53               vardate =  'time series'
54               time = struct.(i)
55            ENDELSE
56         end
[226]57         ELSE:BEGIN
[2]58            ras = report('Le nom '+nomelements[i]+' ne correspont a aucun element reconnu de la structure. !C cf. IDL> xhelp, ''litchamp''')
59         end
60      endcase
61   endfor
62;------------------------------------------------------------
63   return
64end
Note: See TracBrowser for help on using the repository browser.