001 /*
002 * This file is part of McIDAS-V
003 *
004 * Copyright 2007-2013
005 * Space Science and Engineering Center (SSEC)
006 * University of Wisconsin - Madison
007 * 1225 W. Dayton Street, Madison, WI 53706, USA
008 * https://www.ssec.wisc.edu/mcidas
009 *
010 * All Rights Reserved
011 *
012 * McIDAS-V is built on Unidata's IDV and SSEC's VisAD libraries, and
013 * some McIDAS-V source code is based on IDV and VisAD source code.
014 *
015 * McIDAS-V is free software; you can redistribute it and/or modify
016 * it under the terms of the GNU Lesser Public License as published by
017 * the Free Software Foundation; either version 3 of the License, or
018 * (at your option) any later version.
019 *
020 * McIDAS-V is distributed in the hope that it will be useful,
021 * but WITHOUT ANY WARRANTY; without even the implied warranty of
022 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
023 * GNU Lesser Public License for more details.
024 *
025 * You should have received a copy of the GNU Lesser Public License
026 * along with this program. If not, see http://www.gnu.org/licenses.
027 */
028
029 package edu.wisc.ssec.mcidasv.data.cyclone;
030
031 import java.util.ArrayList;
032 import java.util.List;
033
034 /**
035 * Created by IntelliJ IDEA. User: yuanho Date: Feb 25, 2009 Time: 2:23:27 PM To
036 * change this template use File | Settings | File Templates.
037 */
038 public class StormAODTInfo {
039
040 /* various constants */
041
042 /** _more_ */
043 static public int kstart_v72 = 24; /*
044 * inner cloud region analysis radius
045 * (km)
046 */
047
048 /** _more_ */
049 static public int kend_v72 = 136; /* outer cloud region analysis radius (km) */
050
051 /** _more_ */
052 static public int kenda_v72 = 190; /*
053 * automated cursor position analysis
054 * radius (km)
055 */
056
057 /** _more_ */
058 static public int keyerM_v72 = 24; /*
059 * outer eye region search radius (km) -
060 * Manual position
061 */
062
063 /** _more_ */
064 static public int keyerA_v72 = 75; /*
065 * outer eye region search radius (km) -
066 * Auto position
067 */
068
069 /** _more_ */
070 static public int kres_v72 = 4; /* width of the cloud region analysis rings */
071
072 /** _more_ */
073 static public int arfd_v72; /* the FILE id for the image in question */
074
075 /* global variables */
076 /*
077 * char eyetype_v72[7][20]={
078 * "EYE","PINHOLE EYE","LARGE EYE","LARGE RAGGED","RAGGED","OBSCURED","NONE"
079 * };
080 */
081
082 /** _more_ */
083 static public String eyetype_v72[] = { "EYE", "PINHOLE EYE", "LARGE EYE",
084 "NONE" };
085
086 /** _more_ */
087 static public String cloudtype_v72[] = { "UNIFORM CDO", "EMBEDDED CENTER",
088 "IRREGULAR CDO", "CURVED BAND", "SHEAR", "EYE" };
089
090 /** _more_ */
091 static public String cbasin_v72[] = { "ATLANTIC", "PACIFIC " };
092
093 /** _more_ */
094 static public String cmon_v72[] = { "JAN", "FEB", "MAR", "APR", "MAY",
095 "JUN", "JUL", "AUG", "SEP", "OCT", "NOV", "DEC" };
096 /* T#-Pressure/Wind relationships (Atlantic and Pacific) */
097 /* increased from 73 to 83 to allow for >8.0 storms */
098
099 /** _more_ */
100 static public double tno_v72[] = { -9999., -8888., 1.0, 1.1, 1.2, 1.3, 1.4,
101 1.5, 1.6, 1.7, 1.8, 1.9, 2.0, 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7,
102 2.8, 2.9, 3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9, 4.0,
103 4.1, 4.2, 4.3, 4.4, 4.5, 4.6, 4.7, 4.8, 4.9, 5.0, 5.1, 5.2, 5.3,
104 5.4, 5.5, 5.6, 5.7, 5.8, 5.9, 6.0, 6.1, 6.2, 6.3, 6.4, 6.5, 6.6,
105 6.7, 6.8, 6.9, 7.0, 7.1, 7.2, 7.3, 7.4, 7.5, 7.6, 7.7, 7.8, 7.9,
106 8.0, 8.1, 8.2, 8.3, 8.4, 8.5, 8.6, 8.7, 8.8, 8.9, 9.0 };
107
108 /** _more_ */
109 static public double pres_v72[][] = {
110 /* Atlantic pressure relationship values */
111 { -9999.0, -8888.0, 1014.0, 1013.6, 1013.2, 1012.8, 1012.4, 1012.0,
112 1011.4, 1010.8, 1010.2, 1009.6, 1009.0, 1008.2, 1007.4,
113 1006.6, 1005.8, 1005.0, 1004.0, 1003.0, 1002.0, 1001.0,
114 1000.0, 998.8, 997.6, 996.4, 995.2, 994.0, 992.6, 991.2,
115 989.8, 988.4, 987.0, 985.4, 983.8, 982.2, 980.6, 979.0,
116 977.2, 975.4, 973.6, 971.8, 970.0, 968.0, 966.0, 964.0,
117 962.0, 960.0, 957.6, 955.2, 952.8, 950.4, 948.0, 945.4,
118 942.8, 940.2, 937.6, 935.0, 932.2, 929.4, 926.6, 923.8,
119 921.0, 918.0, 915.0, 912.0, 909.0, 906.0, 902.8, 899.6,
120 896.4, 893.2, 890.0, 886.6, 883.2, 879.8, 876.4, 873.0,
121 869.4, 865.8, 862.2, 858.6, 855.0 },
122 /* Pacific pressure relationship values */
123 { -9999.0, -8888.0, 1005.0, 1004.6, 1004.2, 1003.8, 1003.4, 1003.0,
124 1002.4, 1001.8, 1001.2, 1000.6, 1000.0, 999.4, 998.8,
125 998.2, 997.6, 997.0, 995.8, 994.6, 993.4, 992.2, 991.0,
126 989.6, 988.2, 986.8, 985.4, 984.0, 982.4, 980.8, 979.2,
127 977.6, 976.0, 974.0, 972.0, 970.0, 968.0, 966.0, 963.6,
128 961.2, 958.8, 956.4, 954.0, 951.4, 948.8, 946.2, 943.6,
129 941.0, 938.2, 935.4, 932.6, 929.8, 927.0, 924.4, 921.8,
130 919.2, 916.6, 914.0, 910.8, 907.6, 904.4, 901.2, 898.0,
131 894.2, 890.4, 886.6, 882.8, 879.0, 874.8, 870.6, 866.4,
132 862.2, 858.0, 853.4, 848.8, 844.2, 839.6, 835.0, 830.0,
133 825.0, 820.0, 815.0, 810.0 } };
134
135 /* Atlantic/Pacific pressure relationship values */
136
137 /** _more_ */
138 static public double wind_v72[] = { -9999.0, -8888.0, 25.0, 25.0, 25.0,
139 25.0, 25.0, 25.0, 26.0, 27.0, 28.0, 29.0, 30.0, 31.0, 32.0, 33.0,
140 34.0, 35.0, 37.0, 39.0, 41.0, 43.0, 45.0, 47.0, 49.0, 51.0, 53.0,
141 55.0, 57.0, 59.0, 61.0, 63.0, 65.0, 67.4, 69.8, 72.2, 74.6, 77.0,
142 79.6, 82.2, 84.8, 87.4, 90.0, 92.4, 94.8, 97.2, 99.6, 102.0, 104.6,
143 107.2, 109.8, 112.4, 115.0, 117.4, 119.8, 122.2, 124.6, 127.0,
144 129.6, 132.2, 134.8, 137.4, 140.0, 143.0, 146.0, 149.0, 152.0,
145 155.0, 158.0, 161.0, 164.0, 167.0, 170.0, 173.0, 176.0, 179.0,
146 182.0, 185.0, 188.0, 191.0, 194.0, 197.0, 200.0 };
147 /* BD curve break points */
148
149 /** _more_ */
150 static public double ebd_v72[] = { 30.0, 9.0, -30.0, -42.0, -54.0, -64.0,
151 -70.0, -76.0, -80.0, -84.0, -100.0 };
152
153 /* AODT library global variables */
154
155 /** _more_ */
156 boolean odt_v72, olist_v72, oautomode_v72, override_v72;
157
158 /** _more_ */
159 boolean ostartstr_v72, oland_v72, osearch_v72;
160
161 /** _more_ */
162 float[][] spiralband_v72 = new float[2][37];
163
164 /** _more_ */
165 float fcstlat_v72, fcstlon_v72;
166
167 /** _more_ */
168 double fcsttime_v72, starttime_v72, endtime_v72;
169
170 /** _more_ */
171 String hfile_v72, fixfile_v72;
172
173 /** _more_ */
174 String diagnostics_v72;
175
176 /** _more_ */
177 IRData odthistoryfirst_v72;
178
179 /** _more_ */
180 IRData odtcurrent_v72;
181
182 /** _more_ */
183 public ArrayList<RingData> tcircfirst_v72;
184
185 /** _more_ */
186 // DataGrid areadata_v72;
187
188 public StormAODTInfo() {
189 }
190
191 public static class ImgCoeffs {
192 String sat_id;
193 int sat_num;
194 int chan;
195 int det;
196 float scal_m;
197 float scal_b;
198 float side;
199 float conv_n;
200 float conv_a;
201 float conv_b;
202 float conv_g;
203
204 public ImgCoeffs(List<String> toks) {
205 sat_id = toks.get(0);
206 sat_num = Integer.parseInt(toks.get(1));
207 chan = Integer.parseInt(toks.get(2));
208 det = Integer.parseInt(toks.get(3));
209 scal_m = Float.parseFloat(toks.get(4));
210 scal_b = Float.parseFloat(toks.get(5));
211 side = Float.parseFloat(toks.get(6));
212 conv_n = Float.parseFloat(toks.get(7));
213 conv_a = Float.parseFloat(toks.get(8));
214 conv_b = Float.parseFloat(toks.get(9));
215 conv_g = Float.parseFloat(toks.get(10));
216
217 }
218
219 public String getSat_id() {
220 return sat_id;
221 }
222
223 }
224
225 /**
226 * Class RingData _more_
227 *
228 *
229 * @author IDV Development Team
230 * @version $Revision$
231 */
232 public static class RingData {
233
234 /** _more_ */
235 float dist;
236
237 /** _more_ */
238 float angle;
239
240 /** _more_ */
241 float temp;
242
243 /**
244 * _more_
245 */
246 RingData() {
247 }
248
249 /**
250 * _more_
251 *
252 * @param dist
253 * _more_
254 * @param angle
255 * _more_
256 * @param temp
257 * _more_
258 */
259 RingData(float dist, float angle, float temp) {
260 this.dist = dist;
261 this.angle = angle;
262 this.temp = temp;
263 }
264
265 }
266
267 /**
268 * Class DataGrid _more_
269 *
270 *
271 * @author IDV Development Team
272 * @version $Revision$
273 */
274
275 public static class DataGrid {
276 float[][] temp;
277
278 /** _more_ */
279 float[][] lat;
280
281 /** _more_ */
282 float[][] lon;
283
284 /** _more_ */
285 int numx;
286
287 /** _more_ */
288 int numy;
289
290 public DataGrid(float[][] temp, float[][] lon, float[][] lat, int numx,
291 int numy) {
292 this.temp = temp;
293 this.lat = lat;
294 this.lon = lon;
295 this.numx = numx;
296 this.numy = numy;
297 }
298
299 public float[][] getlons() {
300 return lon;
301 }
302
303 public float[][] getlats() {
304 return lat;
305 }
306
307 };
308
309 /**
310 * Class IRData _more_
311 *
312 *
313 * @author IDV Development Team
314 * @version $Revision$
315 */
316 public static class IRData {
317
318 int domain;
319
320 /** _more_ */
321 double date;
322
323 /** _more_ */
324 // int time;
325
326 /** _more_ */
327 float TrawO;
328
329 /** _more_ */
330 float Traw;
331
332 /** _more_ */
333 float Tfinal;
334
335 /** _more_ */
336 float Tfinal3;
337
338 /** _more_ */
339 float CI;
340
341 /** _more_ */
342 float eyet;
343
344 /** _more_ */
345 float warmt;
346
347 /** _more_ */
348 float cloudt;
349
350 /** _more_ */
351 float cloudt2;
352
353 /** _more_ */
354 float cwcloudt;
355
356 /** _more_ */
357 float latitude;
358
359 /** _more_ */
360 float longitude;
361
362 /** _more_ */
363 float warmlatitude;
364
365 /** _more_ */
366 float warmlongitude;
367
368 /** _more_ */
369 float eyecdosize;
370
371 /** _more_ */
372 float eyestdv;
373
374 /** _more_ */
375 float cloudsymave;
376
377 /** _more_ */
378 int sattype;
379
380 /** _more_ */
381 int eyescene;
382
383 /** _more_ */
384 int cloudscene;
385
386 /** _more_ */
387 int eyesceneold;
388
389 /** _more_ */
390 int cloudsceneold;
391
392 /** _more_ */
393 int rule9;
394
395 /** _more_ */
396 int rule8;
397
398 /** _more_ */
399 int land;
400
401 /** _more_ */
402 int eyefft;
403
404 /** _more_ */
405 int cloudfft;
406
407 /** _more_ */
408 int cwring;
409
410 /** _more_ */
411 int ringcb;
412
413 /** _more_ */
414 int ringcbval;
415
416 /** _more_ */
417 int ringcbvalmax;
418
419 /** _more_ */
420 float ringcblatmax;
421
422 /** _more_ */
423 float ringcblonmax;
424
425 /** _more_ */
426 float CIadjp;
427 /* float sst; */
428 /* float TIEraw; */
429 /* float TIEavg; */
430 /* int TIEflag; */
431
432 /** _more_ */
433 int autopos;
434
435 /** _more_ */
436 int LBflag;
437
438 /** _more_ */
439 int rapiddiss;
440
441 /** _more_ */
442 float rmw;
443
444 /** _more_ */
445 char[] comment = new char[50];
446
447 /**
448 * _more_
449 */
450 IRData() {
451 }
452
453 /**
454 * _more_
455 *
456 * @param date
457 * _more_
458 * @param TrawO
459 * _more_
460 * @param Traw
461 * _more_
462 * @param Tfinal
463 * _more_
464 * @param Tfinal3
465 * _more_
466 * @param CI
467 * _more_
468 * @param eyet
469 * _more_
470 * @param warmt
471 * _more_
472 * @param cloudt
473 * _more_
474 * @param cloudt2
475 * _more_
476 * @param cwcloudt
477 * _more_
478 * @param latitude
479 * _more_
480 * @param longitude
481 * _more_
482 * @param warmlatitude
483 * _more_
484 * @param warmlongitude
485 * _more_
486 * @param eyecdosize
487 * _more_
488 * @param eyestdv
489 * _more_
490 * @param cloudsymave
491 * _more_
492 * @param sattype
493 * _more_
494 * @param eyescene
495 * _more_
496 * @param cloudscene
497 * _more_
498 * @param eyesceneold
499 * _more_
500 * @param cloudsceneold
501 * _more_
502 * @param rule9
503 * _more_
504 * @param rule8
505 * _more_
506 * @param land
507 * _more_
508 * @param eyefft
509 * _more_
510 * @param cloudfft
511 * _more_
512 * @param cwring
513 * _more_
514 * @param ringcb
515 * _more_
516 * @param ringcbval
517 * _more_
518 * @param ringcbvalmax
519 * _more_
520 * @param ringcblatmax
521 * _more_
522 * @param ringcblonmax
523 * _more_
524 * @param CIadjp
525 * _more_
526 * @param autopos
527 * _more_
528 * @param LBflag
529 * _more_
530 * @param rapiddiss
531 * _more_
532 * @param rmw
533 * _more_
534 * @param comment
535 * _more_
536 */
537 IRData(double date, float TrawO, float Traw, float Tfinal,
538 float Tfinal3, float CI, float eyet, float warmt, float cloudt,
539 float cloudt2, float cwcloudt, float latitude, float longitude,
540 float warmlatitude, float warmlongitude, float eyecdosize,
541 float eyestdv, float cloudsymave, int sattype, int eyescene,
542 int cloudscene, int eyesceneold, int cloudsceneold, int rule9,
543 int rule8, int land, int eyefft, int cloudfft, int cwring,
544 int ringcb, int ringcbval, int ringcbvalmax,
545 float ringcblatmax, float ringcblonmax, float CIadjp,
546 int autopos, int LBflag, int rapiddiss, float rmw,
547 char[] comment) {
548
549 this.date = date;
550
551 this.TrawO = TrawO;
552 this.Traw = Traw;
553 this.Tfinal = Tfinal;
554 this.Tfinal3 = Tfinal3;
555 this.CI = CI;
556 this.eyet = eyet;
557 this.warmt = warmt;
558 this.cloudt = cloudt;
559 this.cloudt2 = cloudt2;
560 this.cwcloudt = cwcloudt;
561 this.latitude = latitude;
562 this.longitude = longitude;
563 this.warmlatitude = warmlatitude;
564 this.warmlongitude = warmlongitude;
565 this.eyecdosize = eyecdosize;
566 this.eyestdv = eyestdv;
567 this.cloudsymave = cloudsymave;
568 this.sattype = sattype;
569 this.eyescene = eyescene;
570 this.cloudscene = cloudscene;
571 this.eyesceneold = eyesceneold;
572 this.cloudsceneold = cloudsceneold;
573 this.rule9 = rule9;
574 this.rule8 = rule8;
575 this.land = land;
576 this.eyefft = eyefft;
577 this.cloudfft = cloudfft;
578 this.cwring = cwring;
579 this.ringcb = ringcb;
580 this.ringcbval = ringcbval;
581 this.ringcbvalmax = ringcbvalmax;
582 this.ringcblatmax = ringcblatmax;
583 this.ringcblonmax = ringcblonmax;
584 this.CIadjp = CIadjp;
585 /* float sst; */
586 /* float TIEraw; */
587 /* float TIEavg; */
588 /* int TIEflag; */
589 this.autopos = autopos;
590 this.LBflag = LBflag;
591 this.rapiddiss = rapiddiss;
592 this.rmw = rmw;
593 this.comment = comment;
594 }
595 }
596
597 }