Commit d73734df32d41041afe6aefb01469d2ce5da7499
1 parent
59cce539
Exists in
master
and in
111 other branches
add DDBASE Remote to update (copy xml descriptions)
Showing
3 changed files
with
12 additions
and
258 deletions
Show diff stats
php/old_amda/param_info.pro deleted
@@ -1,255 +0,0 @@ | @@ -1,255 +0,0 @@ | ||
1 | -; $Id: param_info.pro,v 1.4 2009/03/30 15:45:33 budnik Exp $ | ||
2 | -; | ||
3 | -;+ | ||
4 | -; NAME: | ||
5 | -; PARAM_INFO | ||
6 | -; | ||
7 | -; PURPOSE: | ||
8 | -; gets CDAWEB parameter Info | ||
9 | -; to create AMDA parameter automatically | ||
10 | -; | ||
11 | -; | ||
12 | -; CALLING SEQUENCE: | ||
13 | -; | ||
14 | -; PARAM_INFO, CDF_name, ParID | ||
15 | -; | ||
16 | -; INPUTS: | ||
17 | -; CDF_name: CDF file name (master CDF or data CDF) | ||
18 | -; ParID : variable name in CDF notation | ||
19 | -; | ||
20 | -; KEYWORD PARAMETERS: | ||
21 | -; | ||
22 | -; | ||
23 | -; OUTPUTS: | ||
24 | -; string "paramID%....." | ||
25 | -; | ||
26 | -; MODIFICATION HISTORY: | ||
27 | -; Written by: Elena Budnik | ||
28 | -; September, 2007 | ||
29 | -;- | ||
30 | - | ||
31 | - pro Param_Info, CDF_name, ParID | ||
32 | - | ||
33 | - NODATA = "%-9999" | ||
34 | - | ||
35 | -;------------------- List of Param Attributes used for AMDA ---------------- | ||
36 | - | ||
37 | - AttributesGlobal = ["Source_name", "Descriptor", "Data_type", "Instrument_type"] | ||
38 | - AttributesCommon = ["FIELDNAM", "DISPLAY_TYPE", "UNITS", "FILLVAL", "Frame", "VALIDMIN","VALIDMAX", "SI_conversion"] | ||
39 | - | ||
40 | -; ALSO EXIST "DICT_KEY", "CATDESC", "AVG_TYPE" | ||
41 | - AttributeScalar = ["LABLAXIS"] | ||
42 | - AttributeVector = ["LABL_PTR_1"] | ||
43 | - | ||
44 | - if (file_test(CDF_name) eq 0) then begin | ||
45 | - print, NODATA | ||
46 | - return | ||
47 | - endif | ||
48 | - | ||
49 | - Output = "paramID%" + strjoin(strsplit(ParID,"%&.><",/EXTRACT),"_"); | ||
50 | - cdfID = cdf_open(CDF_name) | ||
51 | - | ||
52 | -;---------------- Get Global Attributes ---------------------- | ||
53 | - On_IoError, NoGlobalAttr | ||
54 | - for i = 0, n_elements(AttributesGlobal) - 1 do begin | ||
55 | - if (cdf_attexists(cdfid, AttributesGlobal[i])) then cdf_attget, cdfid, AttributesGlobal[i], 0, attvalue $ | ||
56 | - else cdf_attget, cdfid, strupcase(AttributesGlobal[i]), 0, attvalue | ||
57 | - Output += "&&"+strupcase(AttributesGlobal[i])+"%" + strcompress(string(attvalue)) | ||
58 | - continue; | ||
59 | - NoGlobalAttr: Output += "&&"+strupcase(AttributesGlobal[i]) + NODATA | ||
60 | - endfor | ||
61 | - | ||
62 | - On_IoError, NULL | ||
63 | -;--------------- Get parameter Number ----------------------- | ||
64 | - | ||
65 | - par_num = cdf_varnum(cdfid, ParID, IsZVar); | ||
66 | - | ||
67 | -;----------- Attributes & Dims for R-vars ----------------------------- | ||
68 | - if (IsZVar eq 0) then begin ; r-variable | ||
69 | - glob = cdf_inquire(cdfid) | ||
70 | - info = cdf_varinq(cdfid, par_num) | ||
71 | - outDim = "" | ||
72 | - | ||
73 | - if (glob.ndims eq 0) then dim = 1 else begin | ||
74 | - numDim = where(info.dimvar eq 1, ndim) | ||
75 | - if (ndim GT 0) then dim = glob.dim[numDim] else dim = 1 | ||
76 | - endelse | ||
77 | - if (n_elements(dim) eq 1) then outDim = string(dim,format='(i3.3)') else $ | ||
78 | - for j = 0, n_elements(dim)-1 do outDim +=string(dim[j],format='(i3.3)')+"," | ||
79 | - | ||
80 | -;---------- CDF data types to DD | ||
81 | - | ||
82 | - case info.datatype of | ||
83 | - "CDF_CHAR": datatype = 0; DD_CHAR | ||
84 | - | ||
85 | - "CDF_BYTE": datatype = 5; | ||
86 | - "CDF_INT1": datatype = 5; | ||
87 | - | ||
88 | - "CDF_INT2": datatype = 4; DD_SHORT | ||
89 | - "CDF_UCHAR": datatype = 4; | ||
90 | - "CDF_UINT1": datatype = 4; | ||
91 | - | ||
92 | - "CDF_INT4": datatype = 1; DD_INT | ||
93 | - "CDF_UINT2": datatype = 1; | ||
94 | - | ||
95 | - "CDF_FLOAT": datatype = 2; DD_FLOAT | ||
96 | - "CDF_REAL4": datatype = 2; | ||
97 | - | ||
98 | - "CDF_DOUBLE": datatype = 3; DD_DOUBLE | ||
99 | - "CDF_REAL8": datatype = 3; | ||
100 | - "CDF_UINT4": datatype = 3; | ||
101 | - end | ||
102 | - | ||
103 | - Output += "&&DATATYPE%" + strcompress(string(datatype)) + "&&DIMENSION%" + outDim | ||
104 | - On_IoError, NoAttr | ||
105 | - | ||
106 | - for i = 0, N_elements(AttributesCommon)-1 do begin | ||
107 | - if (cdf_attexists(cdfid, AttributesCommon[i])) then begin | ||
108 | - cdf_attget, cdfid, AttributesCommon[i], par_num, attvalue | ||
109 | - Output += "&&"+strupcase(AttributesCommon[i])+"%" + strcompress(string(attvalue)) | ||
110 | - endif else Output += "&&"+strupcase(AttributesCommon[i])+NODATA | ||
111 | - continue | ||
112 | - NoAttr : Output += "&&"+strupcase(AttributesCommon[i])+NODATA | ||
113 | - endfor | ||
114 | - | ||
115 | - if (n_elements(dim) eq 1 AND dim[0] eq 1) then begin | ||
116 | - On_IoError, NoAttr1 | ||
117 | - cdf_attget, cdfid, AttributeScalar[0], par_num, attvalue | ||
118 | - Output += "&&"+AttributeScalar[0]+"%" + strcompress(string(attvalue)) | ||
119 | - GOTO, CONT | ||
120 | - NoAttr1: Output += "&&"+AttributeScalar[0]+NODATA | ||
121 | - endif else begin | ||
122 | - On_IoError, NoAttr2 | ||
123 | - cdf_attget, cdfid, "LABL_PTR_1", par_num, attvalue | ||
124 | - var_num = cdf_varnum(cdfid, attvalue, IsZvar) | ||
125 | - temp=strarr(dim) | ||
126 | - if (IsZVar) then cdf_varget, cdfid, var_num, temp, /STRING, /ZVariable $ | ||
127 | - else cdf_varget, cdfid, var_num, temp, /STRING | ||
128 | - labelOutput = "" | ||
129 | -; Crazy stuff - don't understand how to treat | ||
130 | - t_sort = temp(sort(reform(temp,N_elements(temp)))) | ||
131 | - t_temp = t_sort(uniq(t_sort)) | ||
132 | - for j = 0, N_elements(t_temp) - 1 do labelOutput += string(t_temp[j])+"$" | ||
133 | - Output += "&&LABLAXIS%" + strcompress(labelOutput) | ||
134 | - GOTO, CONT | ||
135 | - NoAttr2: On_IoError, NoAttr3 | ||
136 | - cdf_attget, cdfid, "DEPEND_1", par_num, attvalue | ||
137 | - var_num = cdf_varnum(cdfid, attvalue, IsZvar) | ||
138 | - cdf_attget, cdfid, "LABL_PTR_1", var_num, attvalue | ||
139 | - var_num = cdf_varnum(cdfid, attvalue, IsZvar) | ||
140 | - temp=strarr(dim) | ||
141 | - if (IsZVar) then cdf_varget,cdfid, var_num, temp, /STRING, /ZVARIABLE $ | ||
142 | - else cdf_varget,cdfid, var_num, temp, /STRING | ||
143 | - labelOutput = "" | ||
144 | - t_temp = temp(uniq(temp)) | ||
145 | - for j = 0, N_elements(t_temp)-1 do labelOutput += string(t_temp[j])+"$" | ||
146 | - Output += "&&LABLAXIS%" + strcompress(labelOutput) | ||
147 | - GOTO, CONT | ||
148 | - | ||
149 | - NoAttr3: Output += "&&LABLAXIS"+NODATA | ||
150 | - endelse | ||
151 | - CONT: On_IoError, NoAttr4 | ||
152 | - if (cdf_attexists(cdfid, "VIRTUAL")) then begin | ||
153 | - cdf_attget, cdfid, "VIRTUAL", par_num, attvalue | ||
154 | - if (attvalue eq "TRUE") then begin | ||
155 | - cdf_attget, cdfid, "COMPONENT_0", par_num, attvalue | ||
156 | - Output += "&&VIRTUAL%" + attvalue | ||
157 | - endif | ||
158 | - endif | ||
159 | - NoAttr4: On_IoError, NULL | ||
160 | - | ||
161 | - endif else begin ; z-Variable | ||
162 | - | ||
163 | -;----------- Attributes & Dims for Z-vars ----------------------------- | ||
164 | - | ||
165 | - info = cdf_varinq(cdfid, par_num, /Z) | ||
166 | - if (n_elements(info.dimvar) GT 1) then begin | ||
167 | - print, NODATA | ||
168 | - return | ||
169 | - endif | ||
170 | - | ||
171 | - if (info.dimvar eq 0) then dim = 1 else dim = info.dim | ||
172 | -;---------- CDF data types to DD | ||
173 | - | ||
174 | - case info.datatype of | ||
175 | - "CDF_CHAR": datatype = 0; DD_CHAR | ||
176 | - | ||
177 | - "CDF_BYTE": datatype = 5; | ||
178 | - "CDF_INT1": datatype = 5; | ||
179 | - | ||
180 | - "CDF_INT2": datatype = 4; DD_SHORT | ||
181 | - "CDF_UCHAR": datatype = 4; | ||
182 | - "CDF_UINT1": datatype = 4; | ||
183 | - | ||
184 | - "CDF_INT4": datatype = 1; DD_INT | ||
185 | - "CDF_UINT2": datatype = 1; | ||
186 | - | ||
187 | - "CDF_FLOAT": datatype = 2; DD_FLOAT | ||
188 | - "CDF_REAL4": datatype = 2; | ||
189 | - | ||
190 | - "CDF_DOUBLE": datatype = 3; DD_DOUBLE | ||
191 | - "CDF_REAL8": datatype = 3; | ||
192 | - "CDF_UINT4": datatype = 3; | ||
193 | - end | ||
194 | - Output += "&&DATATYPE%" + strcompress(string(datatype))+"&&DIMENSION%"+string(dim,format='(i3.3)') | ||
195 | - On_IoError, NoAttrZ | ||
196 | - | ||
197 | - for i = 0, N_elements(AttributesCommon)-1 do begin | ||
198 | - if (cdf_attexists(cdfid, AttributesCommon[i])) then begin | ||
199 | - cdf_attget, cdfid, AttributesCommon[i], par_num, attvalue, /ZVARIABLE | ||
200 | - Output += "&&"+strupcase(AttributesCommon[i])+"%" + strcompress(string(attvalue)) | ||
201 | - endif else Output += "&&"+strupcase(AttributesCommon[i])+NODATA | ||
202 | - continue | ||
203 | - NoAttrZ: Output += "&&"+strupcase(AttributesCommon[i])+NODATA | ||
204 | - endfor | ||
205 | - | ||
206 | - if (dim eq 1) then begin | ||
207 | - On_IoError, NoAttrZ1 | ||
208 | - cdf_attget, cdfid, AttributeScalar[0], par_num, attvalue, /ZVARIABLE | ||
209 | - Output += "&&"+AttributeScalar[0]+"%" + strcompress(string(attvalue)) | ||
210 | - GOTO, CONT1 | ||
211 | - NoAttrZ1: Output += "&&"+AttributeScalar[0]+NODATA | ||
212 | - endif else begin | ||
213 | - On_IoError, NoAttrZ2 | ||
214 | - cdf_attget, cdfid, "LABL_PTR_1", par_num, attvalue, /ZVARIABLE | ||
215 | - var_num = cdf_varnum(cdfid, attvalue, IsZvar) | ||
216 | - temp=strarr(dim) | ||
217 | - if (IsZVar) then cdf_varget,cdfid, var_num, temp, /STRING, /ZVARIABLE $ | ||
218 | - else cdf_varget,cdfid, var_num, temp, /STRING | ||
219 | - labelOutput = "" | ||
220 | - t_temp = temp(uniq(temp)) | ||
221 | - for j = 0, N_elements(t_temp)-1 do labelOutput += string(t_temp[j])+"$" | ||
222 | - Output += "&&LABLAXIS%" + strcompress(labelOutput) | ||
223 | - GOTO, CONT1 | ||
224 | - NoAttrZ2: | ||
225 | - On_IoError, NoAttrZ3 | ||
226 | - cdf_attget, cdfid, "DEPEND_1", par_num, attvalue, /ZVARIABLE | ||
227 | - var_num = cdf_varnum(cdfid, attvalue, IsZvar) | ||
228 | - cdf_attget, cdfid, "LABL_PTR_1", var_num, attvalue, /ZVARIABLE | ||
229 | - var_num = cdf_varnum(cdfid, attvalue, IsZvar) | ||
230 | - temp=strarr(dim) | ||
231 | - if (IsZVar) then cdf_varget,cdfid, var_num, temp, /STRING, /ZVARIABLE $ | ||
232 | - else cdf_varget,cdfid, var_num, temp, /STRING | ||
233 | - labelOutput = "" | ||
234 | - t_temp = temp(uniq(temp)) | ||
235 | - for j = 0, N_elements(t_temp)-1 do labelOutput += string(t_temp[j])+"$" | ||
236 | - Output += "&&LABLAXIS%" + strcompress(labelOutput) | ||
237 | - GOTO, CONT1 | ||
238 | - | ||
239 | - NoAttrZ3: Output += "&&LABLAXIS"+NODATA | ||
240 | - endelse | ||
241 | - CONT1: On_IoError, NoAttrZ4 | ||
242 | - if (cdf_attexists(cdfid, "VIRTUAL",/ZVARIABLE)) then begin | ||
243 | - cdf_attget, cdfid, "VIRTUAL", par_num, attvalue, /ZVARIABLE | ||
244 | - if (attvalue eq "TRUE") then begin | ||
245 | - cdf_attget, cdfid, "COMPONENT_0", par_num, attvalue, /ZVARIABLE | ||
246 | - Output += "&&VIRTUAL%" + attvalue | ||
247 | - endif | ||
248 | - endif | ||
249 | - NoAttrZ4: On_IoError, NULL | ||
250 | - endelse | ||
251 | - cdf_close,cdfID | ||
252 | - print, output | ||
253 | - | ||
254 | - return | ||
255 | - end |
update_amda/makeRemote
@@ -19,4 +19,8 @@ | @@ -19,4 +19,8 @@ | ||
19 | 19 | ||
20 | # make template args | 20 | # make template args |
21 | php $AMDA_IHM/php/RemoteDataCenter/makeArgs.php | 21 | php $AMDA_IHM/php/RemoteDataCenter/makeArgs.php |
22 | - | ||
23 | \ No newline at end of file | 22 | \ No newline at end of file |
23 | + | ||
24 | + # copy "DDBASE" Remote Params descriptions | ||
25 | + if [ -d $AMDA_IHM/generic_data/RemoteData/PARAMS ]; then | ||
26 | + cp $AMDA_IHM/generic_data/RemoteData/PARAMS/* $AMDA_IHM/generic_data/newKernelDDBase/ | ||
27 | + fi |
update_amda/updateAmda
@@ -70,9 +70,9 @@ | @@ -70,9 +70,9 @@ | ||
70 | $UPDATEDIR/cleanNewMetaLight | 70 | $UPDATEDIR/cleanNewMetaLight |
71 | echo "clean in NEWMETA : done" | 71 | echo "clean in NEWMETA : done" |
72 | 72 | ||
73 | - echo "cleaning in AMDA_IHM/generic_data AMDA_Kernel/config..." | 73 | + echo "cleaning in AMDA_IHM/generic_data ..." |
74 | $UPDATEDIR/cleanExistingInstallation | 74 | $UPDATEDIR/cleanExistingInstallation |
75 | - echo "clean in AMDA_IHM/generic_data AMDA_Kernel/config : done" | 75 | + echo "clean in AMDA_IHM/generic_data : done" |
76 | 76 | ||
77 | echo "making Amda From Spase..." | 77 | echo "making Amda From Spase..." |
78 | if [ $SYNCHRO ] | 78 | if [ $SYNCHRO ] |
@@ -94,6 +94,11 @@ | @@ -94,6 +94,11 @@ | ||
94 | echo "making Orbits..." | 94 | echo "making Orbits..." |
95 | $UPDATEDIR/makeOrbits | 95 | $UPDATEDIR/makeOrbits |
96 | echo "make Orbits : done" | 96 | echo "make Orbits : done" |
97 | + | ||
98 | + echo "copy DDBASE Remote Params descriptions" | ||
99 | + if [ -d $AMDA_IHM/generic_data/RemoteData/PARAMS ]; then | ||
100 | + cp $AMDA_IHM/generic_data/RemoteData/PARAMS/* $AMDA_IHM/generic_data/newKernelDDBase/ | ||
101 | + fi | ||
97 | fi | 102 | fi |
98 | # Update StartStop only | 103 | # Update StartStop only |
99 | if [ $UPDATE ] | 104 | if [ $UPDATE ] |