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.control.cyclone;
030    
031    import java.util.ArrayList;
032    
033    /**
034     * Created by IntelliJ IDEA. User: yuanho Date: Feb 25, 2009 Time: 2:23:27 PM To
035     * change this template use File | Settings | File Templates.
036     */
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            /**
189             * Class RingData _more_
190             * 
191             * 
192             * @author IDV Development Team
193             * @version $Revision$
194             */
195            public class RingData {
196    
197                    /** _more_ */
198                    float dist;
199    
200                    /** _more_ */
201                    float angle;
202    
203                    /** _more_ */
204                    float temp;
205    
206                    /**
207                     * _more_
208                     */
209                    RingData() {
210                    }
211    
212                    /**
213                     * _more_
214                     * 
215                     * @param dist
216                     *            _more_
217                     * @param angle
218                     *            _more_
219                     * @param temp
220                     *            _more_
221                     */
222                    RingData(float dist, float angle, float temp) {
223                            this.dist = dist;
224                            this.angle = angle;
225                            this.temp = temp;
226                    }
227    
228                    ;
229    
230            }
231    
232            /**
233             * Class DataGrid _more_
234             * 
235             * 
236             * @author IDV Development Team
237             * @version $Revision$
238             */
239            public class DataGrid {
240    
241                    /** _more_ */
242                    float[][] temp = new float[500][500];
243    
244                    /** _more_ */
245                    float[][] lat = new float[500][500];
246    
247                    /** _more_ */
248                    float[][] lon = new float[500][500];
249    
250                    /** _more_ */
251                    int numx;
252    
253                    /** _more_ */
254                    int numy;
255    
256                    /**
257                     * _more_
258                     */
259                    DataGrid() {
260                    }
261    
262                    /**
263                     * _more_
264                     * 
265                     * @param temp
266                     *            _more_
267                     * @param lon
268                     *            _more_
269                     * @param lat
270                     *            _more_
271                     * @param numx
272                     *            _more_
273                     * @param numy
274                     *            _more_
275                     */
276                    DataGrid(float[][] temp, float[][] lon, float[][] lat, int numx,
277                                    int numy) {
278                            this.temp = temp;
279                            this.lat = lat;
280                            this.lon = lon;
281                            this.numx = numx;
282                            this.numy = numy;
283                    }
284            }
285    
286            ;
287    
288            /**
289             * Class IRData _more_
290             * 
291             * 
292             * @author IDV Development Team
293             * @version $Revision$
294             */
295            public class IRData {
296    
297                    /** _more_ */
298                    int date;
299    
300                    /** _more_ */
301                    int time;
302    
303                    /** _more_ */
304                    float TrawO;
305    
306                    /** _more_ */
307                    float Traw;
308    
309                    /** _more_ */
310                    float Tfinal;
311    
312                    /** _more_ */
313                    float Tfinal3;
314    
315                    /** _more_ */
316                    float CI;
317    
318                    /** _more_ */
319                    float eyet;
320    
321                    /** _more_ */
322                    float warmt;
323    
324                    /** _more_ */
325                    float cloudt;
326    
327                    /** _more_ */
328                    float cloudt2;
329    
330                    /** _more_ */
331                    float cwcloudt;
332    
333                    /** _more_ */
334                    float latitude;
335    
336                    /** _more_ */
337                    float longitude;
338    
339                    /** _more_ */
340                    float warmlatitude;
341    
342                    /** _more_ */
343                    float warmlongitude;
344    
345                    /** _more_ */
346                    float eyecdosize;
347    
348                    /** _more_ */
349                    float eyestdv;
350    
351                    /** _more_ */
352                    float cloudsymave;
353    
354                    /** _more_ */
355                    int sattype;
356    
357                    /** _more_ */
358                    int eyescene;
359    
360                    /** _more_ */
361                    int cloudscene;
362    
363                    /** _more_ */
364                    int eyesceneold;
365    
366                    /** _more_ */
367                    int cloudsceneold;
368    
369                    /** _more_ */
370                    int rule9;
371    
372                    /** _more_ */
373                    int rule8;
374    
375                    /** _more_ */
376                    int land;
377    
378                    /** _more_ */
379                    int eyefft;
380    
381                    /** _more_ */
382                    int cloudfft;
383    
384                    /** _more_ */
385                    int cwring;
386    
387                    /** _more_ */
388                    int ringcb;
389    
390                    /** _more_ */
391                    int ringcbval;
392    
393                    /** _more_ */
394                    int ringcbvalmax;
395    
396                    /** _more_ */
397                    float ringcblatmax;
398    
399                    /** _more_ */
400                    float ringcblonmax;
401    
402                    /** _more_ */
403                    float CIadjp;
404                    /* float sst; */
405                    /* float TIEraw; */
406                    /* float TIEavg; */
407                    /* int TIEflag; */
408    
409                    /** _more_ */
410                    int autopos;
411    
412                    /** _more_ */
413                    int LBflag;
414    
415                    /** _more_ */
416                    int rapiddiss;
417    
418                    /** _more_ */
419                    float rmw;
420    
421                    /** _more_ */
422                    char[] comment = new char[50];
423    
424                    /**
425                     * _more_
426                     */
427                    IRData() {
428                    }
429    
430                    /**
431                     * _more_
432                     * 
433                     * @param date
434                     *            _more_
435                     * @param time
436                     *            _more_
437                     * @param TrawO
438                     *            _more_
439                     * @param Traw
440                     *            _more_
441                     * @param Tfinal
442                     *            _more_
443                     * @param Tfinal3
444                     *            _more_
445                     * @param CI
446                     *            _more_
447                     * @param eyet
448                     *            _more_
449                     * @param warmt
450                     *            _more_
451                     * @param cloudt
452                     *            _more_
453                     * @param cloudt2
454                     *            _more_
455                     * @param cwcloudt
456                     *            _more_
457                     * @param latitude
458                     *            _more_
459                     * @param longitude
460                     *            _more_
461                     * @param warmlatitude
462                     *            _more_
463                     * @param warmlongitude
464                     *            _more_
465                     * @param eyecdosize
466                     *            _more_
467                     * @param eyestdv
468                     *            _more_
469                     * @param cloudsymave
470                     *            _more_
471                     * @param sattype
472                     *            _more_
473                     * @param eyescene
474                     *            _more_
475                     * @param cloudscene
476                     *            _more_
477                     * @param eyesceneold
478                     *            _more_
479                     * @param cloudsceneold
480                     *            _more_
481                     * @param rule9
482                     *            _more_
483                     * @param rule8
484                     *            _more_
485                     * @param land
486                     *            _more_
487                     * @param eyefft
488                     *            _more_
489                     * @param cloudfft
490                     *            _more_
491                     * @param cwring
492                     *            _more_
493                     * @param ringcb
494                     *            _more_
495                     * @param ringcbval
496                     *            _more_
497                     * @param ringcbvalmax
498                     *            _more_
499                     * @param ringcblatmax
500                     *            _more_
501                     * @param ringcblonmax
502                     *            _more_
503                     * @param CIadjp
504                     *            _more_
505                     * @param autopos
506                     *            _more_
507                     * @param LBflag
508                     *            _more_
509                     * @param rapiddiss
510                     *            _more_
511                     * @param rmw
512                     *            _more_
513                     * @param comment
514                     *            _more_
515                     */
516                    IRData(int date, int time, float TrawO, float Traw, float Tfinal,
517                                    float Tfinal3, float CI, float eyet, float warmt, float cloudt,
518                                    float cloudt2, float cwcloudt, float latitude, float longitude,
519                                    float warmlatitude, float warmlongitude, float eyecdosize,
520                                    float eyestdv, float cloudsymave, int sattype, int eyescene,
521                                    int cloudscene, int eyesceneold, int cloudsceneold, int rule9,
522                                    int rule8, int land, int eyefft, int cloudfft, int cwring,
523                                    int ringcb, int ringcbval, int ringcbvalmax,
524                                    float ringcblatmax, float ringcblonmax, float CIadjp,
525                                    int autopos, int LBflag, int rapiddiss, float rmw,
526                                    char[] comment) {
527    
528                            this.date = date;
529                            this.time = time;
530                            this.TrawO = TrawO;
531                            this.Traw = Traw;
532                            this.Tfinal = Tfinal;
533                            this.Tfinal3 = Tfinal3;
534                            this.CI = CI;
535                            this.eyet = eyet;
536                            this.warmt = warmt;
537                            this.cloudt = cloudt;
538                            this.cloudt2 = cloudt2;
539                            this.cwcloudt = cwcloudt;
540                            this.latitude = latitude;
541                            this.longitude = longitude;
542                            this.warmlatitude = warmlatitude;
543                            this.warmlongitude = warmlongitude;
544                            this.eyecdosize = eyecdosize;
545                            this.eyestdv = eyestdv;
546                            this.cloudsymave = cloudsymave;
547                            this.sattype = sattype;
548                            this.eyescene = eyescene;
549                            this.cloudscene = cloudscene;
550                            this.eyesceneold = eyesceneold;
551                            this.cloudsceneold = cloudsceneold;
552                            this.rule9 = rule9;
553                            this.rule8 = rule8;
554                            this.land = land;
555                            this.eyefft = eyefft;
556                            this.cloudfft = cloudfft;
557                            this.cwring = cwring;
558                            this.ringcb = ringcb;
559                            this.ringcbval = ringcbval;
560                            this.ringcbvalmax = ringcbvalmax;
561                            this.ringcblatmax = ringcblatmax;
562                            this.ringcblonmax = ringcblonmax;
563                            this.CIadjp = CIadjp;
564                            /* float sst; */
565                            /* float TIEraw; */
566                            /* float TIEavg; */
567                            /* int TIEflag; */
568                            this.autopos = autopos;
569                            this.LBflag = LBflag;
570                            this.rapiddiss = rapiddiss;
571                            this.rmw = rmw;
572                            this.comment = comment;
573                    }
574            }
575    
576    }