diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/EnsembleFcstGridContours/500mb_avg_hght.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/EnsembleFcstGridContours/500mb_avg_hght.attr index d9c7da093e..532393285e 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/EnsembleFcstGridContours/500mb_avg_hght.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/EnsembleFcstGridContours/500mb_avg_hght.attr @@ -12,6 +12,7 @@ FINT=500;505;510;515;520 FLINE=0;18;17;16;15;14 HILO= HLSYM= +CLRBAR= WIND=18/1/1 TITLE=5/-1/~ @ AVERAGE HEIGHT COLORS=3 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/EnsembleFcstGridContours/500mb_avg_tmpc.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/EnsembleFcstGridContours/500mb_avg_tmpc.attr index 70b1b5ef1d..2ed1b545e6 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/EnsembleFcstGridContours/500mb_avg_tmpc.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/EnsembleFcstGridContours/500mb_avg_tmpc.attr @@ -12,6 +12,7 @@ FINT=-36;-30;-24;-18;-12 FLINE=24;30;28;29;25;0 HILO= HLSYM= +CLRBAR= WIND=18/1/1 TITLE=5/-1/~ ^ @ AVERAGE TMPC COLORS=3 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/EnsembleFcstGridContours/500mb_gefs_avg_hght.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/EnsembleFcstGridContours/500mb_gefs_avg_hght.attr new file mode 100644 index 0000000000..98fef4a18f --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/EnsembleFcstGridContours/500mb_gefs_avg_hght.attr @@ -0,0 +1,20 @@ +ENS_COMPONENT_WEIGHTS={gefs} +GLEVEL=500 +GVCORD=pres +SKIP= +FILTER=y +SCALE=-1 +GDPFUN=ens_savg(hght) +TYPE=c +CINT=6>4>2>1 +LINE=20/1/1 +FINT=500;505;510;515;520 +FLINE=0;18;17;16;15;14 +HILO= +HLSYM= +CLRBAR= +WIND=18/1/1 +TITLE=5/-1/~ @ AVERAGE HEIGHT +COLORS=3 +MARKER=2 +GRDLBL=1 \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/EnsembleFcstGridContours/GEFS_ENS-standard.xml b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/EnsembleFcstGridContours/GEFS_ENS-standard.xml new file mode 100644 index 0000000000..7ee98c825b --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/EnsembleFcstGridContours/GEFS_ENS-standard.xml @@ -0,0 +1,7 @@ + + + GEFS_ENS + standard + 500mb_gefs_avg_hght + + diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/1000-470mb_rh_rs_t_700_vv.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/1000-470mb_rh_rs_t_700_vv.attr index 2b93a55f6a..fc685adecc 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/1000-470mb_rh_rs_t_700_vv.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/1000-470mb_rh_rs_t_700_vv.attr @@ -11,9 +11,7 @@ ! GLEVEL=4700:10000!700 !700 !850 !30:0 GVCORD=SGMA !PRES !PRES !PRES!pdly -SKIP= -FILTER=y -SCALE=0 !3 !3 !0 +SCALE=0 !1 !1 !0 GDPFUN=relh !sm9s(omeg)!sm9s(omeg) !tmpc !tmpc TYPE=f !c CINT=0 !1/2 !-1;-2;-3;-5;-7;-9;-11;-13;-15;-17;-19;-21;-23;-25!200;0!200;0 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/1000-470mb_rh_rs_t_700mb_vv.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/1000-470mb_rh_rs_t_700mb_vv.attr index 0c7c4a73bf..29ba4fba93 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/1000-470mb_rh_rs_t_700mb_vv.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/1000-470mb_rh_rs_t_700mb_vv.attr @@ -7,12 +7,12 @@ ! D.W.Plummer/NCEP 7/98 Changed contouring for the product ! T. Lee/GSC 6/99 Increased omega contour range ! -GLEVEL=4400:10000!700 !700 !850 !9950 -GVCORD=SGMA !PRES !PRES!PRES!SGMA -SKIP= -FILTER=y -SCALE=0 !3 !3 !0 -GDPFUN=relh !omeg !omeg!tmpc!tmpc +GLEVEL=4400:10000!700 !700 !850 !9950 +GVCORD=SGMA !PRES !PRES !PRES!SGMA +SKIP=1 +FILTER=1 +SCALE=0 !1 !1 !0 +GDPFUN=relh !omeg!omeg !tmpc !tmpc TYPE=f !c CINT=0 !1/1 !-1;-2;-3;-5;-7;-9;-11;-13;-15;-17;-19;-21;-23;-25!200;0!200;0 LINE=0 !30/10/3!6/1/2 !2/1/2!20/1/2 @@ -21,7 +21,8 @@ FLINE=0;24;23;22 HILO=0 HLSYM=0 WIND= -TITLE=1/-2/~ 1000-440 MB RH, TEMP (BL yel,850 red), 700 Omega!0 -COLORS=2 -MARKER=2 -GRDLBL=5 +TITLE=1/-1/~ 1000-440 MB RH, TEMP (BL yel,850 red), 700 Omega!0 +COLORS=2 +MARKER=2 +GRDLBL=5 + diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/1000-470mb_rh_rs_t_700mb_vv_global.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/1000-470mb_rh_rs_t_700mb_vv_global.attr new file mode 100644 index 0000000000..58998b0fbf --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/1000-470mb_rh_rs_t_700mb_vv_global.attr @@ -0,0 +1,27 @@ +! +! Restore File : 1000-470mb_rh_rs_t_700mb_vv +! +! Log: +! D.W.Plummer/NCEP 2/97 Initial creation +! D.W.Plummer/NCEP 7/98 Changed contouring for the product +! T. Lee/GSC 6/99 Increased omega contour range +! +GLEVEL = 4400:10000!700 !700 !850 !9950 +GVCORD = SGMA !PRES !PRES!PRES!SGMA +SKIP = 0/1 +SCALE = 0 !1 !1 !0 +GDPFUN = relh !omeg !omeg!tmpc!tmpc +TYPE = f !c +CINT = 0 !1/1 !-1;-2;-3;-5;-7;-9;-11;-13;-15;-17;-19;-21;-23;-25!200;0!200;0 +LINE = 0 !30/10/3!6/1/2 !2/1/2!20/1/2 +FINT = 50;70;90 +FLINE = 0;24;23;22 +HILO = 0 +HLSYM = 0 +!CLRBAR= 1 +WIND = +TITLE = 1/-2/~ 1000-440 MB RH, TEMP (BL yel,850 red), 700 Omega!0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/150mb_hght_wind_rap.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/150mb_hght_wind_rap.attr new file mode 100644 index 0000000000..7570a0004d --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/150mb_hght_wind_rap.attr @@ -0,0 +1,25 @@ +! +! Restore File : 150mb_hght_wind +! +! Log: +! J. Carr/HPC 8/99 Initial Creation. +! +GLEVEL = 150 +GVCORD = pres +SKIP = 0 +SCALE = 0 !-1 +GDPFUN = knts((mag(wnd))) !sm9s(hght)!kntv(wnd) +TYPE = c/f !c !b +CINT = 30;50;70;90;110;130;150 !12 +LINE = 27/5/2/1 !20/1/2/1 +FINT = 70;90;110;130;150 +FLINE = 0;25;24;29;7;15 +HILO = +HLSYM = +!CLRBAR = 1 +WIND = 18/1/1 +TITLE = 5/-1/~ @ HEIGHTS, ISOTACHS AND WIND (KTS)!0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/200mb_div_isotachs_rap.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/200mb_div_isotachs_rap.attr new file mode 100644 index 0000000000..d4e7d39294 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/200mb_div_isotachs_rap.attr @@ -0,0 +1,25 @@ +! +! Restore File : 200mb_div_isotachs +! +! Log: +! D.W.Plummer/NCEP 9/97 Initial creation +! +GLEVEL = 200 +GVCORD = PRES +SKIP = 1/1;-1 +SCALE = 0!0!5!5!-1 +GDPFUN = mag(kntv(wnd))//jet!jet!div(wnd)//dvg!dvg!sm5s(hght) +TYPE = c!c/f!c/f!c!c +CINT = 30;50!70;90;110;130;150;170;190!-11;-9;-7;-5;-3!2/3/18!12/720 +LINE = 26!32//2!19/-2//2!20!1//2 +FINT = !70;90;110;130;150;170;190!3;5;7;9;11;13! +FLINE = !0;24;25;29;7;15;14;2!0;23;22;21;17;16;2! +HILO = 0!0!0!0!1/H#;L#/3 +HLSYM = 0!0!0!0!1.5;1.5//22;22/2;2/hw +!CLRBAR = 0!0!1/V/LL!0 +WIND = 0 +TITLE = 1/-1/~ @ DIVERGENCE AND ISOTACHS!0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/24-hr_obs_pcpn_al.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/24-hr_obs_pcpn_al.attr new file mode 100644 index 0000000000..67095bd85b --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/24-hr_obs_pcpn_al.attr @@ -0,0 +1,25 @@ +! +! Restore File : 24-hr_obs_pcpn.al +! +! Log: +! D.W.Plummer/NCEP 2/97 Initial creation +! +GLEVEL = 0 +GVCORD = none +SKIP = 0 +SCALE = 0 +GDPFUN = p24i +TYPE = f +CINT = .25/4/ +LINE = 2//1/0 +FINT = .01;.1;.25;.5;.75;1;1.25;1.5;1.75;2;2.25;2.5;2.75;3;3.25;3.5;3.75;4 +FLINE = 0;21-30;14-20;5 +HILO = 31;0/x#2////y +HLSYM = 1.5 +!CLRBAR= 1 +WIND = 0 +TITLE = 1/-1/~ 24-HR OBS PRECIP (RFC, 40km avg) !0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/24-hr_obs_pcpn_spc_al.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/24-hr_obs_pcpn_spc_al.attr new file mode 100644 index 0000000000..932a9fb000 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/24-hr_obs_pcpn_spc_al.attr @@ -0,0 +1,25 @@ +! +! Restore File : 24-hr_obs_pcpn_spc.al +! +! Log: +! S. Jacobs/NCEP 4/99 +! +GLEVEL = 0 +GVCORD = none +SKIP = 0 +SCALE = 0 +GDPFUN = p24i +TYPE = f +CINT = .01;.10;.25;.5;1;2;3;4;5;6;7;8;9;10 +LINE = 4;4;4;4;1;2;3;4;5;6;7;8;9;10///0;0;0;0;0;0;0;0;0;0;0;0;0;0 +FINT = .01;.10;.25;.5;1;1.5;2;2.5;3;3.5;4;4.5;5;6;8;10.0 +FLINE = 0;11;18;8;6;25;21;22;7;30;4;24;20;17;15;14;31 +HILO = 0 +HLSYM = 0 +!CLRBAR= 1//CL/0;.5/.75;.01 +WIND = +TITLE = 1/-1/COOPERATIVE RAINFALL REPORTS FOR 24 hrs ENDING 12 UTC: ~ +COLORS = +MARKER = +GRDLBL = +FILTER = 0 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/250mb_wind_and_rel_vort_rap.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/250mb_wind_and_rel_vort_rap.attr new file mode 100644 index 0000000000..03eda9fa33 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/250mb_wind_and_rel_vort_rap.attr @@ -0,0 +1,26 @@ +! +! Restore File : 250mb_wind_and_rel_vort +! +! Log: +! J. Carr/NCEP/HPC 10/97 Created restore file +! J. Carr/HPC 2/99 Changed obs to kntv(wnd) + +GLEVEL = 250 +GVCORD = pres +SKIP = 0/1 +SCALE = 5 +GDPFUN = (vor(wnd)) !(vor(wnd)) !kntv(wnd) +TYPE = c/f ! c ! b +CINT = 2/-99/-2 !2/2/99 +LINE = 29/5/1/2 !7/5/1/2 +FINT = 4;6;8;10;12;14;16;18 +FLINE = 0;14-20;3 +HILO = 2;6/X;N/-99--4;4-99 ! 0 +HLSYM = 0 +!CLRBAR = 1/V/LL!0 +WIND = 6/.8/2/112 +TITLE = 1/-1/~ @ WIND = AND RELATIVE VORTICITY!0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/300-200mb_pv.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/300-200mb_pv.attr index 1e8431c169..0a3f996e8e 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/300-200mb_pv.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/300-200mb_pv.attr @@ -3,24 +3,24 @@ ! ! Log: ! D.W.Plummer/NCEP 2/97 Initial creation -! D.W.Plummer/NCEP 8/97 Added FILTER parameter and changed TEXT value ! T. Lee/GSC 6/99 Changed PVOR contour range ! -GLEVEL=9950!300:200!300:200!0:9950!0:9950!0:9950!0 !300:200 -GVCORD=SGMA!pres !pres !none !none !none !none!pres -SKIP= -FILTER=y -SCALE=0!6!6!0 -GDPFUN=thte(pres@0%none;tmpc;dwpc)//te!pvor(thta,wnd)//pv!pv!te!te!te!sm5s(pmsl)!kntv(wnd@300%pres) -TYPE=c/f!c/f!c ! c ! c ! c ! c ! b -CINT=4/332!1/1/4!2/6!4/332!4/308/328!4/292/304!4//1012 -LINE=21/1/2!6/1/2/2!32/1/2/1!21/1/2!21/10/3!23/10/3!20//3 -FINT=332;348;364!1;2;3;4 -FLINE=0;23;22;14!0;0;24;30;13 -HILO=0!0!0!0!0!0!20/H#;L#/1020-1070;900-1012 -HLSYM=0!0!0!0!0!0!1.5;1.5//22;22/3;3/hw -WIND=9/0.9/2/112 -TITLE=1/-1/~ 300-200mb PV, 300mb WIND (KTS) ,PMSL, BL THTAE!0 -COLORS=2 -MARKER=2 -GRDLBL=5 +GLEVEL = 9950!300:200!300:200!9950!9950!9950!0 !300:200 +GVCORD = SGMA!pres !pres !SGMA !SGMA !SGMA !none!pres +SKIP = 0/1;-1 +SCALE = 0!6!6!0 +GDPFUN = thte(mul(1e-2,pres@0%none);tmpc;dwpc)//te!pvor(thta,wnd)//pv!pv!te!te!te!sm5s(mul(1e-2,pmsl))!kntv(wnd@300%pres) +TYPE = c/f!c/f!c ! c ! c ! c ! c ! b +CINT = 4/332!1/1/4!2/6!4/332!4/308/328!4/292/304!4//1012 +LINE = 21/1/2!6/1/2/2!32/1/2/1!21/1/2!21/10/3!23/10/3!20//3 +FINT = 332;348;364!1;2;3;4 +FLINE = 0;23;22;14!0;0;24;30;13 +HILO = 0!0!0!0!0!0!20/H#;L#/1020-1070;900-1012 +HLSYM = 0!0!0!0!0!0!1.5;1.5//22;22/3;3/hw +!CLRBAR= 0!1/V/LL!0!0 +WIND = 9/0.9/2/112 +TITLE = 1/-1/~ 300-200mb PV, 300mb WIND (KTS) ,PMSL, BL THTAE!0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/300mb_hght_absv_adv.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/300mb_hght_absv_adv.attr index 44e8d35d4a..ff45f51192 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/300mb_hght_absv_adv.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/300mb_hght_absv_adv.attr @@ -12,7 +12,7 @@ FILTER=y SCALE=9 !5 !-1 GDPFUN=sm5s(sm5s(adv(avor(wnd),wnd))) !(abs(avor(wnd))) !sm5s(hght) TYPE=c/f !c !c -CINT=3 !3/3 !6 +CINT=3 !3/3 !12 LINE=32/1/1/0 !7/2/2/2 !20/1/2/1 FINT=-12;-9;-6;-3;3;6;9;12 FLINE=29;30;25;24;0;14;15;17;5 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/300mb_hght_absv_rap.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/300mb_hght_absv_rap.attr new file mode 100644 index 0000000000..9882919703 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/300mb_hght_absv_rap.attr @@ -0,0 +1,28 @@ +! +! Restore File : 300mb_hght_absv +! +! Log: +! D.W.Plummer/NCEP 2/97 Initial creation +! D.W.Plummer/NCEP 8/97 Added FILTER = parameter +! J. Carr/HPC 7/99 Smoothed height field. Changed skip to 0. +! Changed contur to a 2 for heights. +! +GLEVEL = 300 +GVCORD = pres +SKIP = 0 +SCALE = 5 !5 !-1 +GDPFUN = abs(avor(wnd))//v !v !sm5s(hght) +TYPE = c/f !c !c +CINT = 2/10/20 !2/4/8 !12 +LINE = 7/5/1/2 !29/5/1/2 !5/1/2/1 +FINT = 16;20;24;28;32;36;40;44 +FLINE = 0;23-15 +HILO = 2;6/X;N/10-99;10-99! +HLSYM = +!CLRBAR = 1 +WIND = 18/1/1 +TITLE = 5/-1/~ @ HEIGHTS AND ABS VORTICITY$!0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/300mb_hght_tmp_wind.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/300mb_hght_tmp_wind.attr index 50aa3c01fe..8fc95e9e8c 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/300mb_hght_tmp_wind.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/300mb_hght_tmp_wind.attr @@ -12,7 +12,7 @@ FILTER=y SCALE=0 !0 !0 !-1 GDPFUN=tmpc !tmpc !tmpc !hght !kntv(wnd) TYPE=c/f !c !c !c !b -CINT=3/-99/0!3/3/18 !3/21/99 !3 +CINT=3/-99/0!3/3/18 !3/21/99 !12 LINE=27/1/2 !2/1/2 !16/1/2 !20/1/1/1 FINT=-60;-54;-48;-42;-36 FLINE=24;30;28;29;25;0 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/400-200mb_pv.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/400-200mb_pv.attr index e43190b79d..9d54d1b47d 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/400-200mb_pv.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/400-200mb_pv.attr @@ -3,24 +3,24 @@ ! ! Log: ! D.W.Plummer/NCEP 2/97 Initial creation -! D.W.Plummer/NCEP 8/97 Added FILTER parameter and changed TEXT value ! T. Lee/GSC 6/99 Changed PVOR contour range ! -GLEVEL=9950!400:200!400:200!0:9950!0:9950!0:9950!0 !400:200 -GVCORD=SGMA!pres !pres !none !none !none !none!pres -SKIP= -FILTER=y -SCALE=0!6!6!0 -GDPFUN=thte(pres@0%none;tmpc;dwpc)//te!pvor(thta,wnd)//pv!pv!te!te!te!sm5s(pmsl)!kntv(wnd@300%pres) -TYPE=c/f!c/f!c ! c ! c ! c ! c ! b -CINT=4/332!1/1/4!2/6!4/332!4/308/328!4/292/304!4//1012 -LINE=21/1/2!6/1/2/2!32/1/2/1!21/1/2!21/10/3!23/10/3!20//3 -FINT=332;348;364!1;2;3;4 -FLINE=0;23;22;14!0;0;24;30;13 -HILO=0!0!0!0!0!0!20/H#;L#/1020-1070;900-1012 -HLSYM=0!0!0!0!0!0!1.5;1.5//22;22/3;3/hw -WIND=9/0.9/2/112 -TITLE=1/-1/~ 400-200mb PV, 300mb WIND (KTS), PMSL, BL THTAE!0 -COLORS=2 -MARKER=2 -GRDLBL=5 +GLEVEL = 9950!400:200!400:200!9950!9950!9950!0 !400:200 +GVCORD = SGMA!pres !pres !SGMA!SGMA!SGMA!none!pres +SKIP = 0/1;-1 +SCALE = 0!6!6!0 +GDPFUN = thte(mul(1e-2,pres@0%none);tmpc;dwpc)//te!pvor(thta,wnd)//pv!pv!te!te!te!sm5s(mul(1e-2,pmsl))!kntv(wnd@300%pres) +TYPE = c/f!c/f!c ! c ! c ! c ! c ! b +CINT = 4/332!1/1/4!2/6!4/332!4/308/328!4/292/304!4//1012 +LINE = 21/1/2!6/1/2/2!32/1/2/1!21/1/2!21/10/3!23/10/3!20//3 +FINT = 332;348;364!1;2;3;4 +FLINE = 0;23;22;14!0;0;24;30;13 +HILO = 0!0!0!0!0!0!20/H#;L#/1020-1070;900-1012 +HLSYM = 0!0!0!0!0!0!1.5;1.5//22;22/3;3/hw +!CLRBAR= 0!1/V/LL!0!0 +WIND = 9/0.9/2/112 +TITLE = 1/-1/~ 400-200mb PV, 300mb WIND (KTS), PMSL, BL THTAE!0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/400-250mb_pv.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/400-250mb_pv.attr index bdf52a731f..5f20c5959d 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/400-250mb_pv.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/400-250mb_pv.attr @@ -9,10 +9,8 @@ ! GLEVEL=9823!400:250!400:250!9823!9823!9823!0!400:250 GVCORD=SGMA!pres!pres!SGMA!SGMA!SGMA!none!pres -SKIP= -FILTER=y SCALE=0!6!6!0 -GDPFUN=(thte(pres;tmpc;dwpc))//te!pvor(thta,wnd)//pv!pv!te!te!te!sm5s(pmsl)!kntv(wnd@300%pres) +GDPFUN =thte(mul(1e-2,pres);tmpc;dwpc)//te!pvor(thta,wnd)//pv!pv!te!te!te!sm5s(mul(1e-2,pmsl))!kntv(wnd@300%pres) TYPE=c/f!c/f!c ! c ! c ! c ! c ! b CINT=4/332!1/1/4!2/6!4/332!4/308/328!4/292/304!4//1012 LINE=21/1/2!6/1/2/2!32/1/2/1!21/1/2!21/10/3!23/10/3!20//3 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/400-250mb_pv_global.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/400-250mb_pv_global.attr new file mode 100644 index 0000000000..101f244f12 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/400-250mb_pv_global.attr @@ -0,0 +1,26 @@ +! +! Restore File : 400-250mb_pv +! +! Log: +! D.W.Plummer/NCEP 2/97 Initial creation +! T. Lee/GSC 6/99 Changed PVOR contour range +! +GLEVEL = 9950!400:250!400:250!9950!9950!9950!0 !400:250 +GVCORD = SGMA!pres !pres !SGMA!SGMA!SGMA!none!pres +SKIP = 0/1;-1 +SCALE = 0!6!6!0 +GDPFUN = thte(mul(1e-2,pres@0%none);tmpc;dwpc)//te!pvor(thta,wnd)//pv!pv!te!te!te!sm5s(mul(1e-2,pmsl))!kntv(wnd@300%pres) +TYPE = c/f!c/f!c ! c ! c ! c ! c ! b +CINT = 4/332!1/1/4!2/6!4/332!4/308/328!4/292/304!4//1012 +LINE = 21/1/2!6/1/2/2!32/1/2/1!21/1/2!21/10/3!23/10/3!20//3 +FINT = 332;348;364!1;2;3;4 +FLINE = 0;23;22;14!0;0;24;30;13 +HILO = 0!0!0!0!0!0!20/H#;L#/1020-1070;900-1012 +HLSYM = 0!0!0!0!0!0!1.5;1.5//22;22/3;3/hw +!CLRBAR= 0!1/V/LL!0!0 +WIND = 9/0.9/2/112 +TITLE = 1/-1/~ 400-250mb PV, 300mb WIND (KTS), PMSL, BL THTAE!0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/400mb_avg_rh_ncf.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/400mb_avg_rh_ncf.attr index 662dc6e789..c8ba25f117 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/400mb_avg_rh_ncf.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/400mb_avg_rh_ncf.attr @@ -4,21 +4,22 @@ ! Log: ! J.L.Partain/MPC 10/97 Initial creation - display avg 300-500mb RH ! -GLEVEL=500:300 ! 500:300 !500:300 -GVCORD=pres ! pres !pres -SKIP= -FILTER=y -SCALE=0 -GDPFUN=lav(relh) ! lav(relh) !lav(relh) -TYPE=c ! c ! c -CINT=70;80;90;95 ! 40;50;60 ! 10;20;30 -LINE=3/1/2/1 ! 23/1/2/1 ! 8/1/2/1 -FINT= -FLINE= -HILO= -HLSYM= -WIND= -TITLE=5/-1/~ @ HEIGHTS AND 500-300mb RH$!0 -COLORS=2 -MARKER=2 -GRDLBL=5 +GLEVEL = 500:300 ! 500:300 !500:300 +GVCORD = pres ! pres !pres +SKIP = 0 +SCALE = 0 +GDPFUN = lav(relh) ! lav(relh) !lav(relh) +TYPE = c ! c ! c +CINT = 70;80;90;95 ! 40;50;60 ! 10;20;30 +LINE = 3/1/2/1 ! 23/1/2/1 ! 8/1/2/1 +FINT = +FLINE = +HILO = +HLSYM = +!CLRBAR= 1 +WIND = +TITLE = 5/-1/~ @ HEIGHTS AND 500-300mb RH$!0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500-250mb_pv.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500-250mb_pv.attr index 7fef55a02c..060c92323e 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500-250mb_pv.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500-250mb_pv.attr @@ -3,24 +3,24 @@ ! ! Log: ! D.W.Plummer/NCEP 2/97 Initial creation -! D.W.Plummer/NCEP 8/97 Added FILTER parameter and changed TEXT value ! T. Lee/GSC 6/99 Changed PVOR contour range ! -GLEVEL=9950!500:250!500:250!0:9950!0:9950!0:9950!0 !500:250 -GVCORD=SGMA!pres !pres !none !none !none !none!pres -SKIP= -FILTER=y -SCALE=0!6!6!0 -GDPFUN=thte(pres@0%none;tmpc;dwpc)//te!pvor(thta,wnd)//pv!pv!te!te!te!sm5s(pmsl)!kntv(wnd@300%pres) -TYPE=c/f!c/f!c ! c ! c ! c ! c ! b -CINT=4/332!1/1/4!2/6!4/332!4/308/328!4/292/304!4//1012 -LINE=21/1/2!6/1/2/2!32/1/2/1!21/1/2!21/10/3!23/10/3!20//3 -FINT=332;348;364!1;2;3;4 -FLINE=0;23;22;14!0;0;24;30;13 -HILO=0!0!0!0!0!0!20/H#;L#/1020-1070;900-1012 -HLSYM=0!0!0!0!0!0!1.5;1.5//22;22/3;3/hw -WIND=9/0.9/2/112 -TITLE=1/-1/~ 500-250mb PV, 300mb WIND (KTS), PMSL, BL THTAE!0 -COLORS=2 -MARKER=2 -GRDLBL=5 +GLEVEL = 9950!500:250!500:250!9950!9950!9950!0 !500:250 +GVCORD = SGMA!pres !pres !SGMA!SGMA!SGMA!none!pres +SKIP = 0/1;-1 +SCALE = 0!6!6!0 +GDPFUN = thte(mul(1e-2,pres@0%none);tmpc;dwpc)//te!pvor(thta,wnd)//pv!pv!te!te!te!sm5s(mul(1e-2,pmsl))!kntv(wnd@300%pres) +TYPE = c/f!c/f!c ! c ! c ! c ! c ! b +CINT = 4/332!1/1/4!2/6!4/332!4/308/328!4/292/304!4//1012 +LINE = 21/1/2!6/1/2/2!32/1/2/1!21/1/2!21/10/3!23/10/3!20//3 +FINT = 332;348;364!1;2;3;4 +FLINE = 0;23;22;14!0;0;24;30;13 +HILO = 0!0!0!0!0!0!20/H#;L#/1020-1070;900-1012 +HLSYM = 0!0!0!0!0!0!1.5;1.5//22;22/3;3/hw +!CLRBAR= 0!1/V/LL!0!0 +WIND = 9/0.9/2/112 +TITLE = 1/-1/~ 500-250mb PV, 300mb WIND (KTS), PMSL, BL THTAE!0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500-300mb_pv.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500-300mb_pv.attr index f2166fa249..9dd596707d 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500-300mb_pv.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500-300mb_pv.attr @@ -3,24 +3,24 @@ ! ! Log: ! D.W.Plummer/NCEP 2/97 Initial creation -! D.W.Plummer/NCEP 8/97 Added FILTER parameter and changed TEXT value ! T. Lee/GSC 6/99 Changed PVOR contour range ! -GLEVEL=9950!500:300!500:300!0:9950!0:9950!0:9950!0 !500:300 -GVCORD=SGMA!pres !pres !none !none !none !none!pres -SKIP= -FILTER=y -SCALE=0!6!6!0 -GDPFUN=thte(pres@0%none;tmpc;dwpc)//te!pvor(thta,wnd)//pv!pv!te!te!te!sm5s(pmsl)!kntv(wnd@400%pres) -TYPE=c/f!c/f!c ! c ! c ! c ! c ! b -CINT=4/332!1/1/4!2/6!4/332!4/308/328!4/292/304!4//1012 -LINE=21/1/2!6/1/2/2!32/1/2/1!21/1/2!21/10/3!23/10/3!20//3 -FINT=332;348;364!1;2;3;4 -FLINE=0;23;22;14!0;0;24;30;13 -HILO=0!0!0!0!0!0!20/H#;L#/1020-1070;900-1012 -HLSYM=0!0!0!0!0!0!1.5;1.5//22;22/3;3/hw -WIND=9/0.9/2/112 -TITLE=1/-1/~ 500-300mb PV, 400mb WIND (KTS), PMSL, BL THTAE!0 -COLORS=2 -MARKER=2 -GRDLBL=5 +GLEVEL = 9950!500:300!500:300!9950!9950!9950!0 !500:300 +GVCORD = SGMA!pres !pres !SGMA!SGMA!SGMA!none!pres +SKIP = 0/1;-1 +SCALE = 0!6!6!0 +GDPFUN = thte(mul(1e-2,pres@0%none);tmpc;dwpc)//te!pvor(thta,wnd)//pv!pv!te!te!te!sm5s(mul(1e-2,pmsl))!kntv(wnd@400%pres) +TYPE = c/f!c/f!c ! c ! c ! c ! c ! b +CINT = 4/332!1/1/4!2/6!4/332!4/308/328!4/292/304!4//1012 +LINE = 21/1/2!6/1/2/2!32/1/2/1!21/1/2!21/10/3!23/10/3!20//3 +FINT = 332;348;364!1;2;3;4 +FLINE = 0;23;22;14!0;0;24;30;13 +HILO = 0!0!0!0!0!0!20/H#;L#/1020-1070;900-1012 +HLSYM = 0!0!0!0!0!0!1.5;1.5//22;22/3;3/hw +!CLRBAR= 0!1/V/LL!0!0 +WIND = 9/0.9/2/112 +TITLE = 1/-1/~ 500-300mb PV, 400mb WIND (KTS), PMSL, BL THTAE!0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght_absv_adv.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght_absv_adv.attr index c53cd73012..404591c341 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght_absv_adv.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght_absv_adv.attr @@ -5,21 +5,22 @@ ! J. Carr/HPC 6/98 Initial creation ! J. Carr/HPC 7/99 Changed title. Smoothed height. Changed contur to 2 for height. ! -GLEVEL=500 -GVCORD=pres -SKIP= -FILTER=y -SCALE=9 !5 !-1 -GDPFUN=sm5s(sm5s(adv(avor(wnd),wnd))) !(abs(avor(wnd))) !sm5s(hght) -TYPE=c/f !c !c -CINT=3 !3/3 !6 -LINE=32/1/1/0 !7/2/2/2 !20/1/2/1 -FINT=-12;-9;-6;-3;3;6;9;12 -FLINE=29;30;25;24;0;14;15;17;5 -HILO=!2;6/X;N/10-99;10-99! -HLSYM=0 -WIND=18/1/1 -TITLE=5/0/~ @ HEIGHT, VORTICITY, VORTICITY ADV|~ @ HGHT, VORT ADV!0 -COLORS=2 -MARKER=2 -GRDLBL=5 +GLEVEL = 500 +GVCORD = pres +SKIP = 0 +SCALE = 9 !5 !-1 +GDPFUN = sm5s(sm5s(adv(avor(wnd),wnd))) !(abs(avor(wnd))) !sm5s(hght) +TYPE = c/f !c !c +CINT = 3 !3/3 !6 +LINE = 32/1/1/0 !7/2/2/2 !20/1/2/1 +FINT = -12;-9;-6;-3;3;6;9;12 +FLINE = 29;30;25;24;0;14;15;17;5 +HILO = !2;6/X;N/10-99;10-99! +HLSYM = 0 +!CLRBAR= 1 +WIND = 18/1/1 +TITLE = 5/0/~ @ HEIGHT, VORTICITY AND VORTICITY ADV|~ @ HGHT AND VORT ADV!0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght_absv_adv_rap.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght_absv_adv_rap.attr new file mode 100644 index 0000000000..895decc226 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght_absv_adv_rap.attr @@ -0,0 +1,26 @@ +! +! Restore File : 500mb_hght_absv_adv +! +! Log: +! J. Carr/HPC 6/98 Initial creation +! J. Carr/HPC 7/99 Changed title. Smoothed height. Changed contur to 2 for height. +! +GLEVEL = 500 +GVCORD = pres +SKIP = 0 +SCALE = 9 !5 !-1 +GDPFUN = sm5s(sm5s(adv(avor(wnd),wnd))) !(abs(avor(wnd))) !sm5s(hght) +TYPE = c/f !c !c +CINT = 3 !3/3 !6 +LINE = 32/1/1/0 !7/2/2/2 !20/1/2/1 +FINT = -12;-9;-6;-3;3;6;9;12 +FLINE = 29;30;25;24;0;14;15;17;5 +HILO = !2;6/X;N/10-99;10-99! +HLSYM = 0 +!CLRBAR = 1 +WIND = 18/1/1 +TITLE = 5/0/~ @ HEIGHT, VORTICITY & VORTICITY ADV|~ @ HGHT & VORT ADV!0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght_absv_rap.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght_absv_rap.attr new file mode 100644 index 0000000000..ea0c0d19d2 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght_absv_rap.attr @@ -0,0 +1,28 @@ +! +! Restore File : 500mb_hght_absv +! +! Log: +! D.W.Plummer/NCEP 2/97 Initial creation +! D.W.Plummer/NCEP 8/97 Added FILTER = parameter +! J. Carr/HPC 7/99 Smoothed height field. Changed skip to 0. +! Changed contur to 2 for height. +! +GLEVEL = 500 +GVCORD = pres +SKIP = 0 !0 !0 +SCALE = 5 !5 !-1 +GDPFUN = abs(avor(wnd))//v !v !sm5s(hght) +TYPE = c/f !c !c +CINT = 2/10/20 !2/4/8 !6 +LINE = 7/5/1/2 !29/5/1/2 !5/1/2/1 +FINT = 16;20;24;28;32;36;40;44 +FLINE = 0;23-15 +HILO = 2;6/X;N/10-99;10-99!0 +HLSYM = +!CLRBAR = 1 +WIND = 18/1/1 +TITLE = 5/-1/~ @ HEIGHT AND ABS VORTICITY!0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght_color_rap.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght_color_rap.attr new file mode 100644 index 0000000000..d347df50d7 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght_color_rap.attr @@ -0,0 +1,27 @@ +! +! Restore File : 500mb_hght_color +! +! Log: +! D.W.Plummer/NCEP 2/97 Initial creation +! D.W.Plummer/NCEP 8/97 Added FILTER = parameter +! J. Carr/HPC 7/99 Changed contur to a 2. +! +GLEVEL = 500 +GVCORD = pres +SKIP = 0 +SCALE = -1 +GDPFUN = sm5s(hght) +TYPE = c/f +CINT = 6 +LINE = 32/1/1/1 +FINT = 504;510;516;522;528;534;540;546;552;558;564;570;576;582;588;594 +FLINE = 30-14 +HILO = +HLSYM = +!CLRBAR = 1 +WIND = 18/1/1 +TITLE = 1/-1/~ 500mb HEIGHTS !0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght_geoabsv.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght_geoabsv.attr index 750e33c89c..02338faa7a 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght_geoabsv.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght_geoabsv.attr @@ -6,22 +6,24 @@ ! D.W.Plummer/NCEP 8/97 Added FILTER parameter ! T. Lee/GSC 6/99 Changed contour SKIP = 0 ! J. Carr/HPC 7/99 Smoothed height lines. Changed contur to a 2 for height. +! Archana/Chugach 9/2012 #866 Added CLRBAR ! -GLEVEL=500 -GVCORD=pres -SKIP= -FILTER=y -SCALE=5 !5 !-1 -GDPFUN=abs(avor(geo)) !abs(avor(geo)) !sm5s(hght) -TYPE=c/f !c !c -CINT=2/10/20 !2/4/8 !6 -LINE=7/5/1/2 !29/5/1/2 !5/1/2/1 -FINT=16;20;24;28;32;36;40;44 -FLINE=0;23;22;21;20;19;18;17;16 -HILO=2;6/X;N/10-99;10-99! ! -HLSYM= -WIND=18/1/1 -TITLE=5/0/~ @ HEIGHTS AND GEO ABS VORTICITY!0 -COLORS=2 -MARKER=2 -GRDLBL=5 +GLEVEL = 500 +GVCORD = pres +SKIP = 0 +SCALE = 5 !5 !-1 +GDPFUN = abs(avor(geo))//v !v !sm5s(hght) +TYPE = c/f !c !c +CINT = 2/10/20 !2/4/8 !6 +LINE = 7/5/1/2 !29/5/1/2 !5/1/2/1 +FINT = 16;20;24;28;32;36;40;44 +FLINE = 0;23-15 +HILO = 2;6/X;N/10-99;10-99! ! +HLSYM = +!CLRBAR= 1 +WIND = 18/1/1 +TITLE = 5/0/~ @ HEIGHTS AND GEO ABS VORTICITY!0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght_geoabsv_rap.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght_geoabsv_rap.attr new file mode 100644 index 0000000000..f70e4b825e --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght_geoabsv_rap.attr @@ -0,0 +1,28 @@ +! +! Restore File : 500mb_hght_geoabsv +! +! Log: +! D.W.Plummer/NCEP 2/97 Initial creation +! D.W.Plummer/NCEP 8/97 Added FILTER = parameter +! T. Lee/GSC 6/99 Changed contour SKIP = = 0 +! J. Carr/HPC 7/99 Smoothed height lines. Changed contur to a 2 for height. +! +GLEVEL = 500 +GVCORD = pres +SKIP = 0 +SCALE = 5 !5 !-1 +GDPFUN = abs(avor(geo))//v !v !sm5s(hght) +TYPE = c/f !c !c +CINT = 2/10/20 !2/4/8 !6 +LINE = 7/5/1/2 !29/5/1/2 !5/1/2/1 +FINT = 16;20;24;28;32;36;40;44 +FLINE = 0;23-15 +HILO = 2;6/X;N/10-99;10-99! ! +HLSYM = +!CLRBAR = 1 +WIND = 18/1/1 +TITLE = 5/0/~ @ HEIGHTS AND GEO ABS VORTICITY!0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght_rh_omega.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght_rh_omega.attr index bcdb664136..28fa778150 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght_rh_omega.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght_rh_omega.attr @@ -9,7 +9,7 @@ GLEVEL=500 GVCORD=pres SKIP= FILTER=y -SCALE=0 !0 !-1 ! 3 ! 3 +SCALE=0 !0 !-1 ! 1 ! 1 GDPFUN=relh !(relh) !(hght) !(omeg) !(omeg) TYPE=c !c/f ! c CINT=10;30 !50;70;90 !3 !-25;-23;-21;-19;-17;-15;-13;-11;-9;-7;-5;-3;-1 !1;3;5;7;9;11;13;15;17;19 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght_tmp_wind.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght_tmp_wind.attr index 7a8cc8e365..e3102c24e5 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght_tmp_wind.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght_tmp_wind.attr @@ -12,7 +12,7 @@ FILTER=y SCALE=0 !0 !0 !-1 GDPFUN=tmpc !tmpc !tmpc !hght !kntv(wnd) TYPE=c/f !c !c !c !b -CINT=3/-99/0!3/3/18 !3/21/99 !3 +CINT=3/-99/0!3/3/18 !3/21/99 !6 LINE=27/1/2 !2/1/2 !16/1/2 !20/1/1/1 FINT=-36;-30;-24;-18;-12 FLINE=24;30;28;29;25;0 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/600mb_hght_rh_omega.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/600mb_hght_rh_omega.attr index 2c4a2c7876..2abfff8be2 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/600mb_hght_rh_omega.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/600mb_hght_rh_omega.attr @@ -8,7 +8,7 @@ GLEVEL=600 GVCORD=pres SKIP= FILTER=y -SCALE=0 !0 !-1 !3 !3 +SCALE=0 !0 !-1 !1 !1 GDPFUN=sm5s(relh) !sm5s(relh) !sm5s(hght)!sm5s(omeg) !sm5s(omeg) TYPE=c !c/f !c CINT=10;30 !50;70;90 !3 !-25;-23;-21;-19;-17;-15;-13;-11;-9;-7;-5;-3;-1 !1;3;5;7;9;11;13;15;17;19 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/600mb_hght_rh_omega_rap.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/600mb_hght_rh_omega_rap.attr new file mode 100644 index 0000000000..de0552a00b --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/600mb_hght_rh_omega_rap.attr @@ -0,0 +1,25 @@ +! +! Restore File : 600mb_hght_rh_omega +! +! Log: +! J. Carr/HPC 7/99 Initial creation. +! +GLEVEL = 600 +GVCORD = pres +SKIP = 0 +SCALE = 0 !0 !-1 !1 !1 +GDPFUN = sm5s(relh) !sm5s(relh) !sm5s(hght)!sm5s(omeg) !sm5s(omeg) +TYPE = c !c/f !c +CINT = 10;30 !50;70;90 !3 !-25;-23;-21;-19;-17;-15;-13;-11;-9;-7;-5;-3;-1 !1;3;5;7;9;11;13;15;17;19 +LINE = 8/1/2/0 !23//2/0 !20/1/1/1 !6/1/1/1 ! 24/5/1/1 +FINT = 70;90 +FLINE = 0;23;22 +HILO = +HLSYM = +!CLRBAR = 1 +WIND = 18/1/1 +TITLE = 5/0/~ @ HEIGHTS, REL HUMIDITY AND OMEGA! +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/700mb_hght_rh_omega.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/700mb_hght_rh_omega.attr index 8154406e2f..3d4e250720 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/700mb_hght_rh_omega.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/700mb_hght_rh_omega.attr @@ -11,7 +11,7 @@ GLEVEL=700 GVCORD=pres SKIP= FILTER=y -SCALE=0 !0 !-1 !3 !3 +SCALE=0 !0 !-1 !1 !1 GDPFUN=sm5s(relh) !sm5s(relh) !sm5s(hght)!sm5s(omeg) !sm5s(omeg) TYPE=c !c/f !c CINT=10;30 !50;70;90 !3 !-25;-23;-21;-19;-17;-15;-13;-11;-9;-7;-5;-3;-1 !1;3;5;7;9;11;13;15;17;19 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/700mb_hght_rh_omega_ncf.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/700mb_hght_rh_omega_ncf.attr index f19a44133b..77b3e5a03e 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/700mb_hght_rh_omega_ncf.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/700mb_hght_rh_omega_ncf.attr @@ -6,21 +6,19 @@ ! T. Lee/GSC 6/99 Increased omega contour range ! J. Carr/HPC 7/99 Inserted skip = 0. Smoothed fields. Inserted contur=2. ! -GLEVEL=700 -GVCORD=pres -SKIP= -FILTER=y -SCALE=0 !0 !0 !-1 !3 !3 -GDPFUN=sm5s(relh)!sm5s(relh)!sm5s(relh)!sm5s(hght)!sm5s(omeg)!sm5s(omeg) -TYPE=c -CINT=10;30!50;70!90!3!-25;-23;-21;-19;-17;-15;-13;-11;-9;-7;-5;-3;-1!1;3;5;7;9;11 -LINE=8//2 !23//2!3/1/2!20/1/1/1 !6/10/1/1 ! 24/5/1/1 -FINT= -FLINE= -HILO=0 -HLSYM=0 -WIND= -TITLE=5/0/~ @ HEIGHT, REL HUMIDITY AND OMEGA! -COLORS=2 -MARKER=2 -GRDLBL=5 +GLEVEL = 700 +GVCORD = pres +SKIP = 0 +SCALE = 0 !0 !0 !-1 !1 !1 +GDPFUN = sm5s(relh)!sm5s(relh)!sm5s(relh)!sm5s(hght)!sm5s(omeg)!sm5s(omeg) +TYPE = c +CINT = 10;30!50;70!90!3!-25;-23;-21;-19;-17;-15;-13;-11;-9;-7;-5;-3;-1!1;3;5;7;9;11 +LINE = 8//2 !23//2!3/1/2!20/1/1/1 !6/10/1/1 ! 24/5/1/1 +FINT = +FLINE = +HILO = 0 +HLSYM = 0 +!CLRBAR= 1 +WIND = +TITLE = 5/0/~ @ HEIGHT, REL HUMIDITY AND OMEGA! +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/700mb_hght_rh_omega_rap.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/700mb_hght_rh_omega_rap.attr new file mode 100644 index 0000000000..ac145a9d9f --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/700mb_hght_rh_omega_rap.attr @@ -0,0 +1,28 @@ +! +! Restore File : 700mb_hght_rh_omega +! +! Log: +! D.W.Plummer/NCEP 2/97 Initial creation +! D.W.Plummer/NCEP 8/97 Added FILTER = parameter +! T. Lee/GSC 6/99 Increased omega contour range +! J. Carr/HPC 7/99 Changed skip to a 0 and changed contur to a 2. +! +GLEVEL = 700 +GVCORD = pres +SKIP = 0 +SCALE = 0 !0 !-1 !1 !1 +GDPFUN = sm5s(relh) !sm5s(relh) !sm5s(hght)!sm5s(omeg) !sm5s(omeg) +TYPE = c !c/f !c +CINT = 10;30 !50;70;90 !3 !-25;-23;-21;-19;-17;-15;-13;-11;-9;-7;-5;-3;-1 !1;3;5;7;9;11;13;15;17;19 +LINE = 8/1/2/0 !23//2/0 !20/1/1/1 !6/1/1/1 ! 24/5/1/1 +FINT = 70;90 +FLINE = 0;23;22 +HILO = +HLSYM = +!CLRBAR = 1 +WIND = 18/1/1 +TITLE = 5/0/~ @ HEIGHTS, REL HUMIDITY AND OMEGA! +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/700mb_hght_wind_dwpt.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/700mb_hght_wind_dwpt.attr index 40908152c9..85013bf218 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/700mb_hght_wind_dwpt.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/700mb_hght_wind_dwpt.attr @@ -3,24 +3,24 @@ ! ! Log: ! D.W.Plummer/NCEP 2/97 Initial creation -! D.W.Plummer/NCEP 8/97 Changed TEXT from 1.2 to 1 -! D.W.Plummer/NCEP 8/97 Added FILTER parameter +! D.W.Plummer/NCEP 8/97 Added FILTER = parameter ! -GLEVEL=700 -GVCORD=PRES -SKIP= -FILTER=y -SCALE=0!0!-1 -GDPFUN=dwpc!dwpc!sm5s(hght) ! kntv(wnd) -TYPE=c/f!c!c ! b -CINT=-8;-6;-4;-2!1/0/28!3 -LINE=3//1!32//1!6//3 -FINT=0;4;8;12;16 -FLINE=0;23;22;30;14;2 -HILO=0!0!6/H#;L# -HLSYM=0!0!1.5;1.5//22;22/2;2/hw -WIND=9/0.9/2/212 -TITLE=1/-1/~ @ DEW POINT (>-8), WIND (KTS), AND HEIGHT!0 -COLORS=2 -MARKER=2 -GRDLBL=5 +GLEVEL = 700 +GVCORD = PRES +SKIP = 0/1 +SCALE = 0!0!-1 +GDPFUN = dwpc!dwpc!sm5s(hght) ! kntv(wnd) +TYPE = c/f!c!c ! b +CINT = -8;-6;-4;-2!1/0/28!3 +LINE = 3//1!32//1!6//3 +FINT = 0;4;8;12;16 +FLINE = 0;23;22;30;14;2 +HILO = 0!0!6/H#;L# +HLSYM = 0!0!1.5;1.5//22;22/2;2/hw +!CLRBAR= 1/V/LL!0 +WIND = 9/0.9/2/212 +TITLE = 1/-1/~ @ DEW POINT (>-8), WIND (KTS), AND HEIGHT!0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/700mb_rh_rs_temp_nam.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/700mb_rh_rs_temp_nam.attr new file mode 100644 index 0000000000..c90d5f1e02 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/700mb_rh_rs_temp_nam.attr @@ -0,0 +1,28 @@ +! +! Restore File : 700mb_rh_rs_temp +! +! Log: +! D.W.Plummer/NCEP 2/97 Initial creation +! J.Carr/NCEP 6/97 changed boundary layer labels to comply with EMC +! D.W.Plummer/NCEP 8/97 Added FILTER parameter and changed TEXT value +! Archana/Chugach 9/2012 #866 Added CLRBAR +! +GLEVEL=700!700!700!850!850!30:0!30:0 +GVCORD=PRES!PRES!PRES!PRES!PRES!pdly!pdly +SKIP= +FILTER=y +SCALE=0 +GDPFUN=relh !tmpc !tmpc !tmpc !tmpc !tmpc !tmpc +TYPE=c/f ! c +CINT=70;90;95 !2;-2 !200;0 !2;-2 !200;0 !2;-2 !-100;0;100 +LINE=32//1/0 !6/3/2!6/1/2 !2/3/2!2/1/2 !20/3/2!20/1/2 +FINT=70;90;95 +FLINE=0;24;23;22 +HILO=0 +HLSYM=0 +!CLRBAR=1 +WIND= +TITLE=1/-1/~ 700 MB RH, TEMPERATURES (BL yel, 850 red, 700 cyan)!0 +COLORS=2 +MARKER=2 +GRDLBL=5 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_h2o_transport_nam.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_h2o_transport_nam.attr new file mode 100644 index 0000000000..8e09827957 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_h2o_transport_nam.attr @@ -0,0 +1,30 @@ +! +! Restore File : 850mb_h2o_transport +! +! Log: +! D.W.Plummer/NCEP 2/97 Initial creation +! J. Carr/HPC 5/14/97 edited high and low symbols -- colors +! D.W.Plummer/NCEP 8/97 Added FILTER = parameter +! J. Carr/HPC 10/97 Moved from the standard directory because this +! restore file did not apply to all the models +! J. Carr/HPC 2/99 Changed 9823 sgma to 30:0 pdly +! +GLEVEL = 850 !850 !30:0 !850 +GVCORD = pres !pres !pdly !pres +SKIP = 0/1 +SCALE = 2 !-1/2 !0 !2 +GDPFUN = mag(smul(mixr;wnd))!hght !thte(pres;tmpc;dwpc) !smul(mixr;wnd) +TYPE = c/f !c !c !a +CINT = 3 !3 !5 +LINE = 3 !5//2 !25/10/2 +FINT = 6;12;18;24;30;36 +FLINE = 0;23;22;21;14;15;2 +HILO = 0 !5/H#;L#!0 +HLSYM = 0 !1;1//22;22/2;2/hw!0 +!CLRBAR= 1/V/LL!0 +WIND = 16/0.9/2/211/0.5 +TITLE = 1/-1/~ @ MOISTURE TRANSPORT, HGHT, BL THTAE!0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_hght_rh_omega.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_hght_rh_omega.attr index 8256f5a7ca..5c5518fed3 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_hght_rh_omega.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_hght_rh_omega.attr @@ -10,7 +10,7 @@ GLEVEL=850 GVCORD=pres SKIP= FILTER=y -SCALE=0 !0 !-1 ! 3 !3 +SCALE=0 !0 !-1 ! 1 !1 GDPFUN=relh !(relh) !sm9s(hght)!sm9s(omeg)!sm9s(omeg) TYPE=c !c/f !c CINT=10;30 !50;70;90 !3 !-25;-23;-21;-19;-17;-15;-13;-11;-9;-7;-5;-3;-1 !1;3;5;7;9;11;13;15;17;19 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_hgt_wind.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_hgt_wind.attr new file mode 100644 index 0000000000..960703074c --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_hgt_wind.attr @@ -0,0 +1,25 @@ +! +! Restore File : 850mb_hgt_wind +! +! Log: +! J. Carr/HPC 7/23/98 Initial creation +! +GLEVEL = 850!850!850 +GVCORD = pres!pres!pres +SKIP = 0/1;-1 +SCALE = 0 !-1 +GDPFUN = mag(kntv(wnd))!sm5s(hght)!kntv(wnd) +TYPE = c/f !c !b +CINT = 5/20 !3 +LINE = 32/1/2/2 !19//2 +FINT = 20;35;50;65 +FLINE = 0;24;25;30;15 +HILO = 0 !20/H#;L#/ +HLSYM = 0 !1.5;1.5//22;22/3;3/hw +!CLRBAR = 1/V/LL!0 +WIND = 9/0.7/2/112 +TITLE = 1/-1/~ @HGT, WIND (KTS) +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_wind_pw_mm_ncf.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_wind_pw_mm_ncf.attr index 7377a0cc8b..f18c5959ce 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_wind_pw_mm_ncf.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_wind_pw_mm_ncf.attr @@ -3,23 +3,23 @@ ! ! Log: ! D.W.Plummer/NCEP 2/97 Initial creation -! D.W.Plummer/NCEP 8/97 Added FILTER parameter and changed TEXT value ! -GLEVEL=0 -GVCORD=none -SKIP= -FILTER=y -SCALE=0!0!0 -GDPFUN=sm9s(pwtr) !sm9s(pwtr)!sm9s(pwtr) !kntv(wnd@850%PRES) -TYPE=c !c !c !b -CINT=7;13;19 !25;31 !38;44;50;56;62 -LINE=22/1/1/1 !3/1/2/1 !2/1/3/1 ! -FINT= -FLINE= -HILO=0 -HLSYM=0 -WIND=! ! !9/0.9/2/112 -TITLE=1/-1/~ 850mb WIND (KTS) and PRECIP WATER (MM) !0 -COLORS=2 -MARKER=2 -GRDLBL=5 +GLEVEL = 0 +GVCORD = none +SKIP = 0/1 +SCALE = 0!0!0 +GDPFUN = sm9s(pwtr) !sm9s(pwtr)!sm9s(pwtr) !kntv(wnd@850%PRES) +TYPE = c !c !c !b +CINT = 7;13;19 !25;31 !38;44;50;56;62 +LINE = 22/1/1/1 !3/1/2/1 !2/1/3/1 ! +FINT = +FLINE = +HILO = 0 +HLSYM = 0 +!CLRBAR= 0 +WIND = ! ! !9/0.9/2/112 +TITLE = 1/-1/~ 850mb WIND (KTS) and PRECIP WATER (MM) !0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_wind_pw_ncf.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_wind_pw_ncf.attr index 4e719d3a12..ba96a5fc69 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_wind_pw_ncf.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_wind_pw_ncf.attr @@ -4,23 +4,23 @@ ! Log: ! D.W.Plummer/NCEP 2/97 Initial creation ! J. Carr/NCEP 6/97 changed glevel and gvcord for pw to comply with EMC -! D.W.Plummer/NCEP 8/97 Added FILTER parameter and changed TEXT value ! -GLEVEL=0 -GVCORD=none -SKIP= -FILTER=y -SCALE=0!0!0 -GDPFUN=quo(pwtr;25.4)//pw!pw !pw! kntv(wnd@850%PRES) -TYPE=c!c !c! b -CINT=.25;0.5;.75 !1.00;1.25 !0.25/1.50/6 -LINE=22/1/1/1 !3/1/2/1 !2/1/3/1 -FINT= -FLINE= -HILO=0 -HLSYM=0 -WIND=9/0.9/2/112 -TITLE=1/-1/~ 850mb WIND (KTS) and PRECIP WATER -COLORS=2 -MARKER=2 -GRDLBL=5 +GLEVEL = 0 +GVCORD = none +SKIP = 0/1 +SCALE = 0!0!0 +GDPFUN = quo(pwtr;25.4)//pw!pw !pw! kntv(wnd@850%PRES) +TYPE = c!c !c! b +CINT = .25;0.5;.75 !1.00;1.25 !0.25/1.50/6 +LINE = 22/1/1/1 !3/1/2/1 !2/1/3/1 +FINT = +FLINE = +HILO = 0 +HLSYM = 0 +!CLRBAR= 0 +WIND = 9/0.9/2/112 +TITLE = 1/-1/~ 850mb WIND (KTS) and PRECIP WATER +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_wind_pw_ncf_nam.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_wind_pw_ncf_nam.attr new file mode 100644 index 0000000000..ba96a5fc69 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_wind_pw_ncf_nam.attr @@ -0,0 +1,26 @@ +! +! Restore File : 850mb_wind_pw_ncf +! +! Log: +! D.W.Plummer/NCEP 2/97 Initial creation +! J. Carr/NCEP 6/97 changed glevel and gvcord for pw to comply with EMC +! +GLEVEL = 0 +GVCORD = none +SKIP = 0/1 +SCALE = 0!0!0 +GDPFUN = quo(pwtr;25.4)//pw!pw !pw! kntv(wnd@850%PRES) +TYPE = c!c !c! b +CINT = .25;0.5;.75 !1.00;1.25 !0.25/1.50/6 +LINE = 22/1/1/1 !3/1/2/1 !2/1/3/1 +FINT = +FLINE = +HILO = 0 +HLSYM = 0 +!CLRBAR= 0 +WIND = 9/0.9/2/112 +TITLE = 1/-1/~ 850mb WIND (KTS) and PRECIP WATER +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/900mb_hght_rh_omega.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/900mb_hght_rh_omega.attr index 8e2d3d7f30..3bd16c321a 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/900mb_hght_rh_omega.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/900mb_hght_rh_omega.attr @@ -10,7 +10,7 @@ GLEVEL=900 GVCORD=pres SKIP= FILTER=y -SCALE=0 !0 !-1 ! 3 ! 3 +SCALE=0 !0 !-1 ! 1 ! 1 GDPFUN=relh !sm9s(relh) !sm9s(hght)!sm9s(omeg) !(omeg) TYPE=c !c/f ! c CINT=10;30 !50;70;90 !3 !-25;-23;-21;-19;-17;-15;-13;-11;-9;-7;-5;-3;-1 !1;3;5;7;9;11;13;15;17;19 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/925mb_hght_rh_omega.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/925mb_hght_rh_omega.attr index bad8168ea2..c345ccd88b 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/925mb_hght_rh_omega.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/925mb_hght_rh_omega.attr @@ -10,7 +10,7 @@ GLEVEL=925 GVCORD=pres SKIP= FILTER=y -SCALE=0 !0 !-1 ! 3 ! 3 +SCALE=0 !0 !-1 ! 1 ! 1 GDPFUN=relh !sm9s(relh) !sm9s(hght)!sm9s(omeg) !(omeg) TYPE=c !c/f ! c CINT=10;30 !50;70;90 !3 !-25;-23;-21;-19;-17;-15;-13;-11;-9;-7;-5;-3;-1 !1;3;5;7;9;11;13;15;17;19 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/CMC-precip.xml b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/CMC-precip.xml new file mode 100644 index 0000000000..e3aa96fa61 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/CMC-precip.xml @@ -0,0 +1,6 @@ + + + CMC + precip + precip_12hr,precip_12hr_mm,precip_24hr,precip_24hr_mm,precip_3-day,precip_4-day,precip_48hr,precip_5-day,precip_54hr,precip_60hr,precip_66hr,precip_6hr,precip_6hr_mslp,precip_6hr_mslp_sfchght,precip_6hr_mslphilo,precip_72hr,precip_78hr + \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/CMC-standard.xml b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/CMC-standard.xml new file mode 100644 index 0000000000..087a1d65e6 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/CMC-standard.xml @@ -0,0 +1,7 @@ + + + CMC + standard + 1000-500_thkn,1000-850_thkn,1000mb_hght_tmp_wind,200mb_div_isotachs,200mb_hght_wind,250mb_ageo_div_isotachs,250mb_hght_wind,250mb_wind_and_rel_vort,300mb_div_isotachs,500mb_hght_absv,500mb_hght_absv_adv,500mb_hght_absv_wind,500mb_hght_color,500mb_hght_geoabsv,500mb_hght_wind,500mb_hght_tmp_wind,700mb_hght_rh_omega,700mb_hght_tmp_wind,850-700_thkn,850mb_hght_tmp_wind,pmsl,pmsl_thkn,pmsl_and_bl_wind_global,300-200mb_pv,400-200mb_pv,400-250mb_pv_global,500-250mb_pv,500-300mb_pv + + \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/CMC-streamlines.xml b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/CMC-streamlines.xml new file mode 100644 index 0000000000..0776776607 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/CMC-streamlines.xml @@ -0,0 +1,6 @@ + + + CMC + streamline + 250mb_streamlines,500mb_streamlines,700mb_streamlines,850mb_streamlines,925mb_streamlines,1000mb_streamlines + \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/CMC-surface.xml b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/CMC-surface.xml new file mode 100644 index 0000000000..13afd07aa4 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/CMC-surface.xml @@ -0,0 +1,7 @@ + + + CMC + surface + 1000-500_thkn,1000-850_thkn,500mb_absv_ncf,500mb_hght,850-700_thkn,850mb_thtae_ncf,pmsl + + \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/CMC-tropical.xml b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/CMC-tropical.xml new file mode 100644 index 0000000000..3f292cb07b --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/CMC-tropical.xml @@ -0,0 +1,6 @@ + + + CMC + tropical + 500mb_hght_absv,850-300mb_wind_shear,850mb_wind_pw_mm,bl_moisture_conv_thtae,bl_thte_wind_global,mlw_pmsl,pmsl_bl_temp_wind,pmsl_thkn_850mb_wind,pmsl_and_bl_wind_global,precip_water_mslp,precip_water_mslp_mm + \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/ECMWFG-medr.xml b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/ECMWFG-medr.xml new file mode 100644 index 0000000000..dc93765865 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/ECMWFG-medr.xml @@ -0,0 +1,6 @@ + + + ECMWFG + medr + ethkn + \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/ECMWFG-standard.xml b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/ECMWFG-standard.xml new file mode 100644 index 0000000000..9f6b540087 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/ECMWFG-standard.xml @@ -0,0 +1,6 @@ + + + ECMWFG + standard + 500mb_hght_geoabsv,850mb_tmp,ethkn,pmsl_ethkn + \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/ECMWFT-standard.xml b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/ECMWFT-standard.xml new file mode 100644 index 0000000000..fceba1c459 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/ECMWFT-standard.xml @@ -0,0 +1,6 @@ + + + ECMWFT + standard + 200mb_wind,850mb_wnd + diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/FNMOCWAVE-exp_marine.xml b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/FNMOCWAVE-exp_marine.xml new file mode 100644 index 0000000000..7b85d5250c --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/FNMOCWAVE-exp_marine.xml @@ -0,0 +1,6 @@ + + + FNMOCWAVE + exp_marine + sig_wave_gridded_feet,sig_wave_gridded_feet_only,sig_wave_gridded_feet_dir,sig_wave_gridded_metersn,sig_wave_gridded_meters_only,sig_wave_gridded_meters_dir + \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/FNMOCWAVE-marine.xml b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/FNMOCWAVE-marine.xml new file mode 100644 index 0000000000..477542643e --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/FNMOCWAVE-marine.xml @@ -0,0 +1,6 @@ + + + FNMOCWAVE + marine + sig_wave_gridded_feet,sig_wave_gridded_meters,sig_wave_cont_fill_feet,sig_wave_cont_fill_meters + \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/GFS-basic_wx.xml b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/GFS-basic_wx.xml index 1d8b0aa37e..ccbbc12007 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/GFS-basic_wx.xml +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/GFS-basic_wx.xml @@ -2,5 +2,5 @@ GFS basic_wx - 1000-470mb_rh_rs_t_700mb_vv,1000-500mb_rh,200mb_vorticity_pw,250mb_vorticity_pw,300-700_q-vctrs_thkn,300mb_vorticity_pw,bl_thte_wind_mono,ct_index,great_lakes_snow,great_lakes_snow2,lifted_index,emsl_bl_tempc_wind,great_lakes_snow,great_lakes_snow2,pmsl_thkn_wind,pmsl_1000-850_thk,pmsl_bl_temp_wind,precip_6hr_1000-500_thkn,precip_type,precip_type_vv + 1000-470mb_rh_rs_t_700mb_vv_global,1000-500mb_rh,200mb_vorticity_pw,250mb_vorticity_pw,300-700_q-vctrs_thkn,300mb_vorticity_pw,bl_thte_wind_global,ct_index_global,great_lakes_snow_global,great_lakes_snow2_global,lifted_index_global,pmsl_thkn_wind,pmsl_1000-850_thk_global,pmsl_bl_temp_wind,precip_6hr_1000-500_thkn,precip_type_global,precip_type_vv_global diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/GFS-exp_marine.xml b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/GFS-exp_marine.xml index 81e14cb79b..c1af82e467 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/GFS-exp_marine.xml +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/GFS-exp_marine.xml @@ -2,5 +2,5 @@ GFS exp_marine - 1000-850thk_only,500_vort_only,marine_fronts,pmsl_1000-850thk,pmsl_1000-500thk,bl_winds_only,pmsl_only + 1000-850thk_only,500_vort_only,marine_fronts,pmsl_1000-500thk,pmsl_1000-850thk_global,pmsl_only,bl_winds_only_global diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/GFS-marine.xml b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/GFS-marine.xml index 5f2a1c28e5..a02521657f 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/GFS-marine.xml +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/GFS-marine.xml @@ -2,5 +2,5 @@ GFS marine - 1000mb_hght_absv,500mb_hght_absv,850mb_hght_absv,bl_moisture_conv_thtae,pmsl_bl_temp_wind,pmsl_and_bl_wind,precip_water_pmsl,stability_850mb_wnd,stability_950mb_wnd + 1000mb_hght_absv,500mb_hght_absv,850mb_hght_absv,bl_moisture_conv_thtae,pmsl_1000-850_thk_global.attr,pmsl_bl_temp_wind,pmsl_and_bl_wind_global,pmsl_and_bl_wind_global,precip_water_pmsl,stability_850mb_wnd_global,stability_950mb_wnd diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/GFS-monochrome.xml b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/GFS-monochrome.xml index 0a54b1a6ba..58d504aff6 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/GFS-monochrome.xml +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/GFS-monochrome.xml @@ -2,5 +2,5 @@ GFS monochrome - bl_thte_wind,pmsl_thkn_wind + bl_thte_wind_mono_global,pmsl_thkn_wind_mono_global.attr diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/GFS-no_col-fill.xml b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/GFS-no_col-fill.xml index 0047d5c73e..aefc89d45a 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/GFS-no_col-fill.xml +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/GFS-no_col-fill.xml @@ -2,5 +2,5 @@ GFS no_col-fill - 250mb_hght_wind_ncf,400mb_avg_rh_ncf,500mb_absv_ncf,500mb_hght_absv_ncf,700mb_hght_rh_omega_ncf,850mb_hght_tmp_wind_ncf,850mb_wind_pw,bl_h2o_conv_ncf,lifted_index_ncf,pcpn_potential_ncf,precip_type_vv_ncf + 250mb_hght_wind_ncf,400mb_avg_rh_ncf,500mb_absv_ncf,500mb_hght_absv_ncf,700mb_hght_rh_omega_ncf,850mb_hght_tmp_wind_ncf,850mb_wind_pw,850mb_wind_pw_mm_ncf,bl_h2o_conv_ncf_global,lifted_index_ncf,pcpn_potential_ncf_global,precip_type_vv_ncf_global diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/GFS-qpf.xml b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/GFS-qpf.xml index 82751731bb..b09f56f194 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/GFS-qpf.xml +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/GFS-qpf.xml @@ -2,5 +2,5 @@ GFS qpf - 300mb_ageo_div_isotachs,700mb_hght_wind_dwpt,850mb_h2o_transport,850mb_hght_wind_dwpt,850mb_thtae_advection,850mb_wind_pw,bl_moistconv_wind_dwpt,kindex_700mbtemp_bldwpt_mslp,lifted_index,pcpn_potential,pw_emsl_c-vec,ransnocsi_500-850,ransnocsi_700-850,svrwx + 300mb_ageo_div_isotachs,700mb_hght_wind_dwpt,850mb_h2o_transport,850mb_hght_wind_dwpt,850mb_thtae_advection,850mb_wind_pw,bl_moistconv_wind_dwpt_global,kindex_700mbtemp_bldwpt_mslp_global,lifted_index_global,pcpn_potential_global,pw_emsl_c-vec,ransnocsi_500-850,ransnocsi_700-850,svrwx_global diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/GFS-standard.xml b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/GFS-standard.xml index 960ec3c026..eac6181f7f 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/GFS-standard.xml +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/GFS-standard.xml @@ -2,5 +2,5 @@ GFS standard - 1000-500_thkn,1000-850_thkn,1000mb_hght_tmp_wind,100mb_hght_wind,150mb_hght_wind,200mb_div_isotachs,200mb_hght_wind,250mb_ageo_div_isotachs,250mb_hght_wind,250mb_wind_and_rel_vort,300mb_div_isotachs,300mb_hght_absv_adv,300mb_hght_wind,300mb_hght_tmp_wind,500mb_hght_absv,500mb_hght_absv_adv,500mb_hght_color,500mb_hght_geoabsv,500mb_hght_wind,500mb_hght_tmp_wind,50mb_hght_wind,600mb_hght_rh_omega,700mb_hght_rh_omega,700mb_hght_tmp_wind,70mb_hght_wind,850-700_thkn,850mb_hght_tmp_wind,pmsl,pmsl_thkn,pmsl_and_bl_wind,300-200mb_pv,400-200mb_pv,400-250mb_pv,500-250mb_pv,500-300mb_pv + 1000-500_thkn,1000-850_thkn,1000mb_hght_tmp_wind,100mb_hght_wind,150mb_hght_wind,200mb_div_isotachs,200mb_hght_wind,250mb_ageo_div_isotachs,250mb_hght_wind,250mb_wind_and_rel_vort,300mb_div_isotachs,300mb_hght_absv_adv,300mb_hght_wind,300mb_hght_tmp_wind,500mb_hght_absv,500mb_hght_absv_adv,500mb_hght_absv_wnd,500mb_hght_color,500mb_hght_geoabsv,500mb_hght_wind,500mb_hght_tmp_wind,50mb_hght_wind,600mb_hght_rh_omega,700mb_hght_rh_omega,700mb_hght_tmp_wind,70mb_hght_wind,850-700_thkn,850mb_hght_tmp_wind,pmsl,pmsl_thkn,pmsl_and_bl_wind_global,300-200mb_pv,400-200mb_pv,400-250mb_pv_global,500-250mb_pv,500-300mb_pv diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/GFS-tropical.xml b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/GFS-tropical.xml index fd9b3cc0c6..d05ca673d1 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/GFS-tropical.xml +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/GFS-tropical.xml @@ -2,5 +2,5 @@ GFS tropical - 1000-500mb_rh,500mb_hght_absv,850-300mb_wind_shear,bl_moisture_conv_thtae,bl_thte_wind_mono,pmsl_bl_temp_wind,pmsl_thkn_850mb_wind,pmsl_and_bl_wind,precip_water_pmsl,precip_water_pmsl_mm + 1000-500mb_rh,500mb_hght_absv,850-300mb_wind_shear,850mb_wind_pw_mm,bl_moisture_conv_thtae,bl_thte_wind_global,mlw_pmsl,pmsl_bl_temp_wind,pmsl_thkn_850mb_wind,pmsl_and_bl_wind_global,precip_water_pmsl,precip_water_pmsl_mm diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/NAM-aviation.xml b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/NAM-aviation.xml index 2d074fe695..5786b9f44a 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/NAM-aviation.xml +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/NAM-aviation.xml @@ -2,5 +2,5 @@ NAM aviation - bl1_rh,bl2-5_rh,emsl_bl1_wind_850mb_tad,frzg_lvl_hght,frzg_lvl_hght_ncf + bl1_rh_nam,bl2-5_rh,emsl_bl1_wind_850mb_tad,frzg_lvl_hght,frzg_lvl_hght_ncf diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/NAM-basic_wx.xml b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/NAM-basic_wx.xml index 3459109c55..e963e6648c 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/NAM-basic_wx.xml +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/NAM-basic_wx.xml @@ -2,5 +2,5 @@ NAM basic_wx - 1000-470mb_rh_rs_t_700_vv,700mb_rh_rs_temp,lifted_index,bl_thte_wind,ct_index,emsl_bl_tempc_wind,great_lakes_snow,great_lakes_snow2,pmsl_thkn_wind,pmsl_1000-850_thk,precip_6hr_1000-500_thkn,precip_type,precip_type_vv,sfclifted_index + 1000-470mb_rh_rs_t_700mb_vv,700mb_rh_rs_temp_nam,lifted_index_nam,bl_thte_wind,ct_index,emsl_bl_tempc_wind,great_lakes_snow,great_lakes_snow2,pmsl_thkn_wind_nam,pmsl_1000-850_thk_nam,precip_6hr_1000-500_thkn,precip_type,precip_type_vv,sfclifted_index diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/NAM-exp_marine.xml b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/NAM-exp_marine.xml index e55cd7d918..5093e0f83f 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/NAM-exp_marine.xml +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/NAM-exp_marine.xml @@ -2,5 +2,5 @@ NAM exp_marine - 1000-850thk_only,500_vort_only,marine_fronts,pmsl_1000-850thk,pmsl_1000-500thk,bl_winds_only,pmsl_only + 1000-850thk_only,500_vort_only,marine_fronts_nam,pmsl_1000-850thk_nam,pmsl_1000-500thk,bl_winds_only,pmsl_only diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/NAM-marine.xml b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/NAM-marine.xml index e91b4e2e30..1afd287aba 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/NAM-marine.xml +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/NAM-marine.xml @@ -2,5 +2,5 @@ NAM marine - bl_h2o_conv,500mb_hght_absv,emsl_and_bl_wind,emsl_and_10m_wind,emsl_and_ll_wind,pmsl_1000-850_thk,pmsl_and_bl_wind,pmsl_and_10m_wind,pmsl_and_ll_wind,stability_850mb_wnd,stability_900mb_wnd,stability_950mb_wnd + bl_h2o_conv_nam,500mb_hght_absv,emsl_and_bl_wind,emsl_and_10m_wind,emsl_and_ll_wind,pmsl_1000-850_thk_nam,pmsl_and_bl_wind,pmsl_and_10m_wind_nam,pmsl_and_ll_wind_nam,stability_850mb_wnd,stability_900mb_wnd,stability_950mb_wnd diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/NAM-monochrome.xml b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/NAM-monochrome.xml index 25d18c01b6..781c0c716a 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/NAM-monochrome.xml +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/NAM-monochrome.xml @@ -2,5 +2,5 @@ NAM monochrome - bl_thte_wind_mono,pmsl_thkn_wind + bl_thte_wind_mono_nam,pmsl_thkn_wind_mono diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/NAM-no_col-fill.xml b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/NAM-no_col-fill.xml index afd8bd5628..1db3d01f6d 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/NAM-no_col-fill.xml +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/NAM-no_col-fill.xml @@ -2,5 +2,5 @@ NAM no_col-fill - 250mb_hght_wind_ncf,400mb_avg_rh_ncf,500mb_absv_ncf,500mb_hght_absv_ncf,700mb_hght_rh_omega_ncf,850mb_hght_tmp_wind_ncf,850mb_wind_pw,bestcape_cin_ncf,bl_h2o_conv_ncf,bl_thte_ncf,lifted_index_ncf,pcpn_potential_ncf,precip_type_vv_ncf + 250mb_hght_wind_ncf,400mb_avg_rh_ncf,500mb_absv_ncf,500mb_hght_absv_ncf,700mb_hght_rh_omega_ncf,850mb_hght_tmp_wind_ncf,850mb_wind_pw,850mb_wind_pw_ncf_nam,bestcape_cin_ncf_nam,bl_h2o_conv_ncf_nam,bl_thte_ncf_nam,lifted_index_ncf_nam,pcpn_potential_ncf_nam,precip_type_vv_ncf_nam diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/NAM-qpf.xml b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/NAM-qpf.xml index 51aee41b1c..2e21800de6 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/NAM-qpf.xml +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/NAM-qpf.xml @@ -2,5 +2,5 @@ NAM qpf - 300mb_ageo_div_isotachs,700mb_hght_wind_dwpt,850mb_h2o_transport,850mb_hght_wind_dwpt,850mb_thtae_advection,850mb_wind_pw,lifted_index,bl_h2o_trnsp_omgq,bl_moistconv_wind_dwpt,bestcape_cin,kindex_700mbtemp_bldwpt_mslp,pcpn_potential,precip_type_12hr_amounts,precip_type_24hr_amounts,precip_type_48hr_amounts,precip_type_6hr_amounts,pw_emsl_c-vec,ransnocsi_500-850,ransnocsi_600-800,sfclifted_index + 300mb_ageo_div_isotachs,700mb_hght_wind_dwpt,850mb_h2o_transport_nam,850mb_hght_wind_dwpt,850mb_thtae_advection,850mb_wind_pw,lifted_index_nam,bl_h2o_trnsp_omgq,bl_moistconv_wind_dwpt,bestcape_cin_nam,kindex_700mbtemp_bldwpt_mslp,pcpn_potential,precip_type_12hr_amounts,precip_type_24hr_amounts,precip_type_48hr_amounts,pw_emsl_c-vec,ransnocsi_500-850,ransnocsi_600-800,sfclifted_index diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/NAM-severe.xml b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/NAM-severe.xml index 21f4a935bf..8a03f5ab79 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/NAM-severe.xml +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/NAM-severe.xml @@ -2,5 +2,5 @@ NAM severe - svrwx + svrwx_nam diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/NAM-standard.xml b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/NAM-standard.xml index f6824f2999..df2712dec0 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/NAM-standard.xml +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/NAM-standard.xml @@ -2,5 +2,5 @@ NAM standard - 1000-500_thkn,1000-850_thkn,1000mb_hght_tmp_wind,100mb_hght_wind,150mb_hght_wind,200mb_hght_wind,250mb_ageo_div_isotachs,250mb_hght_wind,250mb_wind_and_rel_vort,300mb_hght_absv_adv,300mb_hght_wind,300mb_hght_tmp_wind,500mb_hght_absv,500mb_hght_absv_adv,500mb_hght_color,500mb_hght_geoabsv,500mb_hght_wind,500mb_hght_tmp_wind,50mb_hght_wind,600mb_hght_rh_omega,700mb_hght_rh_omega,700mb_hght_tmp_wind,850-700_thkn,850mb_hght_tmp_wind,pmsl,pmsl_thkn,potvort_400-250mb + 1000-500_thkn,1000-850_thkn,1000mb_hght_tmp_wind,100mb_hght_wind,150mb_hght_wind,200mb_hght_wind,250mb_ageo_div_isotachs,250mb_hght_wind,250mb_wind_and_rel_vort,300mb_hght_absv_adv,300mb_hght_wind,300mb_hght_tmp_wind,500mb_hght_absv,500mb_hght_absv_adv,500mb_hght_absv_wnd, 500mb_hght_color,500mb_hght_geoabsv,500mb_hght_wind,500mb_hght_tmp_wind,50mb_hght_wind,600mb_hght_rh_omega,700mb_hght_rh_omega,700mb_hght_tmp_wind,850-700_thkn,850mb_hght_tmp_wind,emsl_thkn,pmsl,pmsl_thkn,potvort_400-250mb diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/NAM-surface.xml b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/NAM-surface.xml index b879c43269..61f4f0ed69 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/NAM-surface.xml +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/NAM-surface.xml @@ -2,5 +2,5 @@ NAM surface - 1000-500_thkn,1000-850_thkn,500mb_absv_ncf,500mb_hght,850-700_thkn,850mb_thtae_ncf,bl_thte_ncf,pmsl + 1000-500_thkn,1000-850_thkn,500mb_absv_ncf,500mb_hght,850-700_thkn,850mb_thtae_ncf,bl_thte_ncf_nam,pmsl diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/NOGAPS-exp_marine.xml b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/NOGAPS-exp_marine.xml new file mode 100644 index 0000000000..ebe50761aa --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/NOGAPS-exp_marine.xml @@ -0,0 +1,6 @@ + + + NOGAPS + exp_marine + 1000-850thk_only,500_vort_only,pmsl_1000-850thk,pmsl_1000-500thk,pmsl_only,bl_winds_only_nogaps + \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/NOGAPS-loops.xml b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/NOGAPS-loops.xml new file mode 100644 index 0000000000..a8ca8f8a20 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/NOGAPS-loops.xml @@ -0,0 +1,6 @@ + + + NOGAPS + loops + 24-hr_obs_pcpn_al,24-hr_obs_pcpn_spc_al + \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/NOGAPS-marine.xml b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/NOGAPS-marine.xml new file mode 100644 index 0000000000..9c006a4279 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/NOGAPS-marine.xml @@ -0,0 +1,6 @@ + + + NOGAPS + marine + 1000mb_hght_absv,850mb_hght_absv,pmsl_1000-850_thk_global,pmsl_and_bl_wind_nogaps + \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/NOGAPS-medr.xml b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/NOGAPS-medr.xml new file mode 100644 index 0000000000..905c66863e --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/NOGAPS-medr.xml @@ -0,0 +1,6 @@ + + + NOGAPS + medr + 1000-500_thkn + \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/NOGAPS-no_col-fill.xml b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/NOGAPS-no_col-fill.xml new file mode 100644 index 0000000000..57e6f3ed31 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/NOGAPS-no_col-fill.xml @@ -0,0 +1,6 @@ + + + NOGAPS + no_col-fill + 500mb_absv_ncf + \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/NOGAPS-precip.xml b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/NOGAPS-precip.xml new file mode 100644 index 0000000000..b9462935ac --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/NOGAPS-precip.xml @@ -0,0 +1,6 @@ + + + NOGAPS + precip + precip_12hr_nogaps,precip_12hr_mm_nogaps + \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/NOGAPS-standard.xml b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/NOGAPS-standard.xml new file mode 100644 index 0000000000..a9f12dc66a --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/NOGAPS-standard.xml @@ -0,0 +1,6 @@ + + + NOGAPS + standard + 1000-500_thkn,1000-850_thkn,1000mb_hght_tmp_wind,200mb_div_isotachs,200mb_hght_wind,250mb_hght_wind,250mb_wind_and_rel_vort,300mb_div_isotachs,300mb_hght_absv_adv,300mb_hght_wind,300mb_hght_tmp_wind,500mb_hght_absv,500mb_hght_absv_adv,500mb_hght_absv_wind,500mb_hght_color,500mb_hght_geoabsv,500mb_hght_rh_omega,500mb_hght_wind,500mb_hght_tmp_wind,700mb_hght_rh_omega,700mb_hght_tmp_wind,850-700_thkn,850mb_hght_tmp_wind,850mb_hgt_wind,pmsl,pmsl_thkn,pmsl_and_bl_wind_nogaps,300-200mb_pv,400-200mb_pv,400-250mb_pv_global,500-250mb_pv,500-300mb_pv + \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/NOGAPS-surface.xml b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/NOGAPS-surface.xml new file mode 100644 index 0000000000..b9bd4f1cea --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/NOGAPS-surface.xml @@ -0,0 +1,6 @@ + + + NOGAPS + surface + 1000-500_thk,1000-850_thk,500mb_absv_ncf,500mb_hght,850-700_thkn,pmsl + \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/NOGAPS-tropical.xml b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/NOGAPS-tropical.xml new file mode 100644 index 0000000000..6a8d177923 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/NOGAPS-tropical.xml @@ -0,0 +1,6 @@ + + + NOGAPS + tropical + 500mb_hght_absv + \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/NWW3-exp_marine.xml b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/NWW3-exp_marine.xml new file mode 100644 index 0000000000..5e1250f05d --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/NWW3-exp_marine.xml @@ -0,0 +1,6 @@ + + + NWW3 + exp_marine + NWW3-exp_marine.xml,sig_wave_gridded_meters_dir,sig_wave_gridded_meters_only,sig_wave_gridded_dir_only,sig_wave_gridded_feet,sig_wave_gridded_mslp_feet_nw,sig_wave_gridded_feet_dir,sig_wave_gridded_feet_only,peak_swell_per_gridded + diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/NWW3-marine.xml b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/NWW3-marine.xml new file mode 100644 index 0000000000..15f8bb8365 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/NWW3-marine.xml @@ -0,0 +1,6 @@ + + + NWW3 + marine + sig_wave_cont_fill_feet,sig_wave_cont_fill_meters,sig_wave_and_mslp_feet,sig_wave_and_mslp_meters,sig_wave_gridded_feet,sig_wave_gridded_meters,sig_wave_gridded_mslp_feet,sig_wave_gridded_mslp_meters,peak_swell_period_contoured + diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/RAP-anl_loops.xml b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/RAP-anl_loops.xml new file mode 100644 index 0000000000..9f7107b3df --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/RAP-anl_loops.xml @@ -0,0 +1,6 @@ + + + RAP + anl_loops + 200mb_hght_wind_al,250mb_ageo_div_isotachs_al,300mb_hght_wind_al,300mb_hght_absv_al,500mb_hght_absv_al,700mb_rh_rs_temp_al,700mb_hght_rh_al,850mb_hght_tmp_wind_al,850mb_hght_wind_dwpt_al,850mb_h2o_transport_al,potvort_400-250mb_al,300thta_pres_wnd_pres_adv_al + diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/RAP-precip.xml b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/RAP-precip.xml new file mode 100644 index 0000000000..0ed8c2c592 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/RAP-precip.xml @@ -0,0 +1,6 @@ + + + RAP + precip + precip_3hr,precip_6hr,precip_6hr_emsl,precip_6hr_mslp,precip_6hr_mslp_sfcddhght,precip_6hr_mslphilo + diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/RAP-standard.xml b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/RAP-standard.xml new file mode 100644 index 0000000000..a724fee076 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/RAP-standard.xml @@ -0,0 +1,6 @@ + + + RAP + standard + 1000-850_thkni,100mb_hght_wind,150mb_hght_wind,200mb_hght_wind,200mb_div_isotachs,250mb_ageo_div_isotachs,250mb_hght_wind,250mb_wind_and_rel_vort,300mb_hght_absv,300mb_hght_absv_adv,300mb_hght_wind,500mb_hght_absv,500mb_hght_absv_adv,500mb_hght_geoabsv,500mb_hght_wind,500mb_hght_color,600mb_hght_rh_omega,700mb_hght_rh_omega,850-700_thkn,bl_rh,mmsl,potvort_400-250mb + diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/UKMET-exp_marine.xml b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/UKMET-exp_marine.xml index f8db3b771c..9f668fe2e8 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/UKMET-exp_marine.xml +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/UKMET-exp_marine.xml @@ -2,5 +2,5 @@ UKMET exp_marine - 1000-850thk_only,500_vort_only,pmsl_1000-850thk,pmsl_1000-500thk,bl_winds_only,pmsl_only + 1000-850thk_only,500_vort_only,pmsl_1000-850thk,pmsl_1000-500thk,bl_winds_only_ukmet,pmsl_only diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bestcape_cin_nam.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bestcape_cin_nam.attr new file mode 100644 index 0000000000..bf688267db --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bestcape_cin_nam.attr @@ -0,0 +1,27 @@ +! +! Restore File : bestcape_cin +! +! Log: +! D.W.Plummer/NCEP 2/97 Initial creation +! J. Carr/NCEP 6/97 changed glevel and gvcord for cape and cin +! to comply with EMC +! +GLEVEL = 180:0 +GVCORD = pdly +SKIP = 0/1 +SCALE = 0 +GDPFUN = sm5s(cape)//cp!cp!sm5s(cins)//cn!cn!cn +TYPE = c/f!c!c +CINT = 250/250/1000!250/1250!20/-60/-20!20/-200/-80!-2000;-250 +LINE = 22/1/2!32//2/0!6/10/3!6/1/2!25/1/3 +FINT = 1000;2000;3000;4000;5000 +FLINE = 0;23;30;15;2;5 +HILO = 0!0 +HLSYM = 1;1//22;22/2;2/hw +!CLRBAR= 1/V/LL!0 +WIND = 0 +TITLE = 1/-1/~ 0-180 MB AGL BEST CAPE (jkg-1) & CIN (cyan)!0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bestcape_cin_ncf_nam.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bestcape_cin_ncf_nam.attr new file mode 100644 index 0000000000..a9530a16f1 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bestcape_cin_ncf_nam.attr @@ -0,0 +1,27 @@ +! +! Restore File : bestcape_cin_ncf +! +! Log: +! D.W.Plummer/NCEP 2/97 Initial creation +! J. Carr/NCEP 6/97 changed glevel and gvcord for cape and cin +! to comply with EMC +! +GLEVEL = 180:0 +GVCORD = pdly +SKIP = 0/1 +SCALE = 0 +GDPFUN = sm5s(cape)//cp!cp !cp !sm5s(cins)//cn!cn !cn +TYPE = c !c !c !c +CINT = 250/250/750 !250/1000/2500!250/2500!-40;-80 !40/-200/-120!-240;-280 +LINE = 22/1/1 !3/1/3/1 !2/1/3 !6/10/1/2 !6/1/1/2 !25/1/2/2 +FINT = 0 +FLINE = 0 +HILO = 0!0 +HLSYM = 0 +!CLRBAR= 0 +WIND = 0 +TITLE = 1/-1/~ BEST CAPE (0-180 MB AGL)(jkg-1) & CIN (cyan)!0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl1_rh.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl1_rh.attr index 51b010bec2..f49cb157b6 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl1_rh.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl1_rh.attr @@ -11,7 +11,7 @@ GLEVEL=30:0!30:0!90:60!30:0 GVCORD=pdly SKIP= FILTER=y -SCALE=0!0!3!0 +SCALE=0!0!1!0 GDPFUN=relh!relh!omeg!kntv(wnd) TYPE=c/f!c!c ! b CINT=80;90;95!10;20;30;40;50;60;70!-25;-23;-21;-19;-17;-15;-13;-11;-9;-7;-5;-3;-1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl1_rh_nam.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl1_rh_nam.attr new file mode 100644 index 0000000000..c23c64626f --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl1_rh_nam.attr @@ -0,0 +1,29 @@ +! +! Restore File : bl1_rh +! +! Log: +! D.W.Plummer/NCEP 2/97 Initial creation +! J. Carr/NCEP 6/97 changed boundary layer labels to comply with EMC +! D.W.Plummer/NCEP 8/97 Added FILTER parameter and changed TEXT value +! T. Lee/GSC 6/99 Increased omega contour range +! Archana/Chugach 9/2012 #866 Added CLRBAR +! +GLEVEL=30:0!30:0!90:60!30:0 +GVCORD=pdly +SKIP= +FILTER=y +SCALE=0!0!3!0 +GDPFUN=relh!relh!omeg!kntv(wnd) +TYPE=c/f!c!c ! b +CINT=80;90;95!10;20;30;40;50;60;70!-25;-23;-21;-19;-17;-15;-13;-11;-9;-7;-5;-3;-1 +LINE=32//1!25//1!6//3 +FINT=70;80;90;95 +FLINE=0;24;23;22;14 +HILO=0 +HLSYM=0 +WIND=9/0.8/2/112 +!CLRBAR=1/V/LL!0 +TITLE=1/-1/~ 0-30MB AGL RELH AND WIND (KTS) AND 60-90MB AGL OMEGA!0 +COLORS=2 +MARKER=2 +GRDLBL=5 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl2-5_rh.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl2-5_rh.attr index 00c3d50d02..6898b0cedd 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl2-5_rh.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl2-5_rh.attr @@ -12,7 +12,7 @@ GLEVEL=8400:9800!8400:9800!90:60 GVCORD=sgma!sgma!pdly SKIP= FILTER=y -SCALE=0!0!3!0 +SCALE=0!0!1!0 GDPFUN=relh!relh!omeg!kntv(wnd@30:0%pdly) TYPE=c/f!c!c ! b CINT=80;90;95!10;20;30;40;50;60;70!-25;-23;-21;-19;-17;-15;-13;-11;-9;-7;-5;-3;-1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_h2o_conv.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_h2o_conv.attr index 1ccae467f3..0664c95748 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_h2o_conv.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_h2o_conv.attr @@ -13,7 +13,7 @@ GVCORD=sgma!sgma!sgma!sgma!none SKIP= FILTER=y SCALE=7!0 -GDPFUN=sdiv(mixr,obs)!thte(mul(.9823;pres@0%none),tmpc,dwpc)//te!te!te!pmsl!kntv(wnd%sgma@9823) +GDPFUN=sdiv(mixr,obs)!thte(mul(.9823;mul(1e-2,pres@0%none)),tmpc,dwpc)//te!te!te!mul(1e-2,pmsl)!kntv(wnd%sgma@9823) TYPE=c/f!c!c!c!c ! b CINT=1!4//296!4/300/320!4/324!1;2 LINE=32/1/1/2!30/1/1/0!29/1/1/0!7/1/1/1!1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_h2o_conv_nam.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_h2o_conv_nam.attr new file mode 100644 index 0000000000..443890c08a --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_h2o_conv_nam.attr @@ -0,0 +1,28 @@ +! +! Restore File : bl_h2o_conv +! +! Log: +! D.W.Plummer/NCEP 2/97 Initial creation +! J. Carr/HPC 5/14/97 Changed high and low ranges +! J. Carr/HPC 6/97 changed boundary layer labels to comply with EMC +! changed title line to show better labeling +! +GLEVEL = 9823!9823!9823:0!9823:0!0 +GVCORD = sgma!sgma!sgma!sgma!none +SKIP = 0/1 +SCALE = 7!0 +GDPFUN = sdiv(mixr,obs)!thte(mul(.9823;mul(1e-2,pres@0%none)),tmpc,dwpc)//te!te!te!mul(1e-2,pmsl)!kntv(wnd%sgma@9823) +TYPE = c/f!c!c!c!c ! b +CINT = 1!4//296!4/300/320!4/324!1;2 +LINE = 32/1/1/2!30/1/1/0!29/1/1/0!7/1/1/1!1 +FINT = -9;-7;-5;-3;-1 +FLINE = 2;15;21;22;23;0 +HILO = !!!!6/H#;L#/1020-1070;900-1016 +HLSYM = 1;1/2//4;1.5/0 +!CLRBAR= 1 +WIND = 10/0.75/1.5/112 +TITLE = 1/-1/~ BL (18MB AGL)MOISTURE CONVERGENCE, WIND (KTS) and THTAE!0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_h2o_conv_ncf.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_h2o_conv_ncf.attr index 512103a772..5e0dc7f304 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_h2o_conv_ncf.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_h2o_conv_ncf.attr @@ -5,23 +5,23 @@ ! D.W.Plummer/NCEP 2/97 Initial creation ! J. Carr/HPC 5/14/97 Changed high and low ranges ! J. Carr/NCEP 6/97 changed title to reflect boundary layer -! D.W.Plummer/NCEP 8/97 Added FILTER parameter and changed TEXT value ! -GLEVEL=9823!9823!9823:0!9823:0!9823 -GVCORD=sgma!sgma!sgma!sgma!sgma -SKIP= -FILTER=y -SCALE=7!0 -GDPFUN=sdiv(mixr,obs)!thte(mul(.9823;pres@0%none),tmpc,dwpc)//te!te!te!kntv(wnd) -TYPE=c !c !c !c !b -CINT=2/-100/-2 !4//296 !4/300/320!4/324 -LINE=3/1/2/1 !30/10/1/0 !29/10/1/0!7/10/2/1 -FINT=0 -FLINE=0 -HILO=0 -HLSYM=0 -WIND=10/0.75/1.5/112 -TITLE=1/-1/~ BL (18MB AGL) MOIST CONV, WIND (KTS) and THTAE!0 -COLORS=2 -MARKER=2 -GRDLBL=5 +GLEVEL = 9823!9823!9823:0!9823:0!9823 +GVCORD = sgma!sgma!sgma!sgma!sgma +SKIP = 0/1 +SCALE = 7!0 +GDPFUN = sdiv(mixr,obs)!thte(mul(.9823;mul(1e-2,pres@0%none)),tmpc,dwpc)//te!te!te!kntv(wnd) +TYPE = c !c !c !c !b +CINT = 2/-100/-2 !4//296 !4/300/320!4/324 +LINE = 3/1/2/1 !30/10/1/0 !29/10/1/0!7/10/2/1 +FINT = 0 +FLINE = 0 +HILO = 0 +HLSYM = 0 +!CLRBAR= 1 +WIND = 10/0.75/1.5/112 +TITLE = 1/-1/~ BL (18MB AGL) MOIST CONV, WIND(KTS) AND THTAE!0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_h2o_conv_ncf_global.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_h2o_conv_ncf_global.attr new file mode 100644 index 0000000000..42852e74ef --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_h2o_conv_ncf_global.attr @@ -0,0 +1,26 @@ +! +! Restore File : bl_h2o_conv_ncf +! +! Log: +! D.W.Plummer/NCEP 2/97 Initial creation +! J. Carr/HPC 5/14/97 Changed high and low ranges +! +GLEVEL = 9950!9950!9950!9950!9950 +GVCORD = sgma!sgma!sgma!sgma!sgma +SKIP = 0/1 +SCALE = 7!0 +GDPFUN = sdiv(mixr(dwpc;mul(1e-2,pres@0%none)),obs!thte(mul(1e-2,pres@0%none),tmpc,dwpc)//te!te!te!kntv(wnd) +TYPE = c !c !c !c !b +CINT = 2/-100/-2 !4//296 !4/300/320!4/324 +LINE = 3/1/2/1 !30/10/1/0 !29/10/1/0!7/10/2/1 +FINT = 0 +FLINE = 0 +HILO = 0 +HLSYM = 0 +!CLRBAR= 1 +WIND = 10/0.75/1.5/112 +TITLE = 1/-1/~ (~995 MB) BL MOIST CONV, WIND (KTS) and THTAE!0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_h2o_conv_ncf_nam.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_h2o_conv_ncf_nam.attr new file mode 100644 index 0000000000..b81067ab94 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_h2o_conv_ncf_nam.attr @@ -0,0 +1,27 @@ +! +! Restore File : bl_h2o_conv_ncf +! +! Log: +! D.W.Plummer/NCEP 2/97 Initial creation +! J. Carr/HPC 5/14/97 Changed high and low ranges +! J. Carr/NCEP 6/97 changed title to reflect boundary layer +! +GLEVEL = 9823!9823!9823:0!9823:0!9823 +GVCORD = sgma!sgma!sgma!sgma!sgma +SKIP = 0/1 +SCALE = 7!0 +GDPFUN = sdiv(mixr,obs)!thte(mul(.9823;mul(1e-2,pres@0%none)),tmpc,dwpc)//te!te!te!kntv(wnd) +TYPE = c !c !c !c !b +CINT = 2/-100/-2 !4//296 !4/300/320!4/324 +LINE = 3/1/2/1 !30/10/1/0 !29/10/1/0!7/10/2/1 +FINT = 0 +FLINE = 0 +HILO = 0 +HLSYM = 0 +!CLRBAR= 1 +WIND = 10/0.75/1.5/112 +TITLE = 1/-1/~ BL (18MB AGL) MOIST CONV, WIND (KTS) and THTAE!0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_h2o_trnsp_omgq.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_h2o_trnsp_omgq.attr index eec0e6ae53..c9580703aa 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_h2o_trnsp_omgq.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_h2o_trnsp_omgq.attr @@ -10,7 +10,7 @@ GVCORD=SGMA!SGMA!none!SGMA SKIP= FILTER=y SCALE=5/2!5/2!0 ! 5/2 -GDPFUN=mul(mixr,(ADV(pres@0%none,wnd)))!mul(mixr,(ADV(pres@0%none,wnd)))!hght!smul(mixr;wnd) +GDPFUN=mul(mixr,(ADV(mul(1e-2,pres@0%none),wnd)))!mul(mixr,(ADV(pres@0%none,wnd)))!hght!smul(mixr;wnd) TYPE=c/f ! c !c !a CINT=1/1/99 !1/-99/-1!200/200 LINE=21/1/1!24/1/2/2!18/1/1/3 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_moistconv_wind_dwpt_global.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_moistconv_wind_dwpt_global.attr new file mode 100644 index 0000000000..d55df3061e --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_moistconv_wind_dwpt_global.attr @@ -0,0 +1,26 @@ +! +! Restore File : bl_moistconv_wind_dwpt +! +! Log: +! D.W.Plummer/NCEP 2/97 Initial creation +! J. Carr/HPC 5/15/97 Changed dwpc to dwpf and the cint +! +GLEVEL = 9950 +GVCORD = SGMA +SKIP = 0/1;0 +SCALE = 7!0!0 +GDPFUN = sdiv(mixr(dwpc;mul(1e-2,pres@0%none));wnd)!dwpf!dwpf!dwpf ! kntv(wnd@9950%SGMA) +TYPE = c/f !c !c !c ! b +CINT = 1//-1!4//32 !4/32/48 !4/52 +LINE = 32!19!5//2!6//2 +FINT = -7;-5;-3;-1 +FLINE = 2;23;22;3;0 +HILO = 0 +HLSYM = 0!1;1//22;22/2;2/hw +!CLRBAR= 1/V/LL!0 +WIND = 9/0.7/2/112 +TITLE = 1/-1/~ BL MOIST FLUX CONVERGENCE, WIND (KTS), DEW POINT!0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_moisture_conv_thtae.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_moisture_conv_thtae.attr index db33b155cb..cc5c57829f 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_moisture_conv_thtae.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_moisture_conv_thtae.attr @@ -4,23 +4,23 @@ ! Log: ! D.W.Plummer/NCEP 2/97 Initial creation ! J. Carr/HPC 5/14/97 Changed hilo ranges -! D.W.Plummer/NCEP 8/97 Added FILTER parameter and changed TEXT value ! -GLEVEL=9950!9950!0:9950!0:9950!0 -GVCORD=sgma!sgma!none!none!none -SKIP= -FILTER=y -SCALE=7!0 -GDPFUN=sdiv(mixr(dwpc;pres@0%none),obs!thte(pres@0%none,tmpc,dwpc)//e!e!e!pmsl!kntv(wnd%sgma@9950) -TYPE=c/f!c!c!c!c ! b -CINT=1//-1!4//296!4/300/320!4/324!1;2 -LINE=32/1/1/2!30/1/1/0!29/1/1/0!7/1/1/1!1 -FINT=-9;-7;-5;-3;-1 -FLINE=2;15;21;22;23;0 -HILO=!!!!6/H#;L#/1020-1070;900-1012 -HLSYM=1;1/2//4;1.5/0 -WIND=10/0.75/1.5/112 -TITLE=1/-1/~ (~995 MB) MOISTURE CONVERGENCE, WIND (KTS), THTAE!0 -COLORS=2 -MARKER=2 -GRDLBL=5 +GLEVEL = 9950!9950!9950!9950!0 +GVCORD = sgma!sgma!sgma!sgma!none +SKIP = 0/1;-1 +SCALE = 7!0 +GDPFUN = sdiv(mixr(dwpc;mul(1e-2,pres@0%none)),obs!thte(mul(1e-2,pres@0%none),tmpc,dwpc)//e!e!e!mul(1e-2,pmsl)!kntv(wnd%sgma@9950) +TYPE = c/f!c!c!c!c ! b +CINT = 1//-1!4//296!4/300/320!4/324!1;2 +LINE = 32/1/1/2!30/1/1/0!29/1/1/0!7/1/1/1!1 +FINT = -9;-7;-5;-3;-1 +FLINE = 2;15;21;22;23;0 +HILO = !!!!6/H#;L#/1020-1070;900-1012 +HLSYM = 1;1/2//4;1.5/0 +!CLRBAR= 1 +WIND = 10/0.75/1.5/112 +TITLE = 1/-1/~ (~995 MB) MOISTURE CONVERGENCE, WIND = (KTS), THTAE!0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_rh_lake.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_rh_lake.attr index e4a677bfae..b8c1ad0529 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_rh_lake.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_rh_lake.attr @@ -10,7 +10,7 @@ GLEVEL=9100:9400!9100:8200!850 !850 !8200:8500!9100:9400 GVCORD=sgma !sgma !pres!pres!sgma !sgma SKIP= FILTER=y -SCALE=0!0!0!0!3!0 +SCALE=0!0!0!0!1!0 GDPFUN=avg(relh,relh@8200:8500)//rh!rh!sub(tmpc@2%hght,tmpc)!sm9s(tmpc)!omeg!kntv(wnd@9700:10000%SGMA) TYPE=c/f !c !c !c !c !b CINT=85;90;95 !60;70;80!1/10 !1//0 !1//-1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_thte_ncf.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_thte_ncf.attr index 6284525648..f88b61ee81 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_thte_ncf.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_thte_ncf.attr @@ -4,21 +4,22 @@ ! Log: ! J. Carr/HPC 9/98 Initial creation ! -GLEVEL=9823!9823:0!9823:0 -GVCORD=sgma!sgma!sgma -SKIP= -FILTER=y -SCALE=0 -GDPFUN=thte(mul(.9823;pres@0%none),tmpc,dwpc)//te!te!te -TYPE=c -CINT=4//296 !4/300/320!4/324 -LINE=30/2/2/0 !29/2/2/0 !7/2/2/1 -FINT=0 -FLINE=0 -HILO=0 -HLSYM=0 -WIND= -TITLE=1/-1/~ BL (18MB AGL) THTAE!0 -COLORS=2 -MARKER=2 -GRDLBL=5 +GLEVEL = 9950!9950 +GVCORD = sgma!sgma +SKIP = 0/1 +SCALE = 0 +GDPFUN = thte(mul(1e-2,pres@0%none);tmpc;dwpc)//the!the!the +TYPE = c +CINT = 4//296 !4/300/320!4/324 +LINE = 30/2/2/0 !29/2/2/0 !7/2/2/1 +FINT = +FLINE = +HILO = 0 +HLSYM = 0 +!CLRBAR= 1/V/LL +WIND = +TITLE = 1/-1/~ BL THTE!0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_thte_ncf_cmc.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_thte_ncf_cmc.attr new file mode 100644 index 0000000000..423519f94e --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_thte_ncf_cmc.attr @@ -0,0 +1,25 @@ +! +! Restore File : bl_thte_ncf +! +! Log: +! J. Carr/HPC 9/98 Initial creation +! +GLEVEL = 9950!0:9950 +GVCORD = sgma!none +SKIP = 0/1 +SCALE = 0 +GDPFUN = thte(mul(1e-2,pres@0%none);tmpc;dwpc)//the!the!the +TYPE = c +CINT = 4//296 !4/300/320!4/324 +LINE = 30/2/2/0 !29/2/2/0 !7/2/2/1 +FINT = +FLINE = +HILO = 0 +HLSYM = 0 +!CLRBAR= 1/V/LL +WIND = +TITLE = 1/-1/~ BL THTE!0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_thte_ncf_nam.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_thte_ncf_nam.attr new file mode 100644 index 0000000000..6c7774113b --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_thte_ncf_nam.attr @@ -0,0 +1,25 @@ +! +! Restore File : bl_thte_ncf +! +! Log: +! J. Carr/HPC 9/98 Initial creation +! +GLEVEL = 9823!9823:0!9823:0 +GVCORD = sgma!sgma!sgma +SKIP = 0/1 +SCALE = 0 +GDPFUN = thte(mul(.9823;mul(1e-2,pres@0%none)),tmpc,dwpc)//te!te!te +TYPE = c +CINT = 4//296 !4/300/320!4/324 +LINE = 30/2/2/0 !29/2/2/0 !7/2/2/1 +FINT = 0 +FLINE = 0 +HILO = 0 +HLSYM = 0 +!CLRBAR= 1 +WIND = +TITLE = 1/-1/~ BL (18MB AGL) THTAE!0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_thte_wind_global.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_thte_wind_global.attr new file mode 100644 index 0000000000..fc78c64ac0 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_thte_wind_global.attr @@ -0,0 +1,28 @@ +! +! Restore File : bl_thte_wind +! +! Log: +! D.W.Plummer/NCEP 2/97 Initial creation +! J. Carr/HPC 6/97 Changed title to reflect better labeling +! D.W.Plummer/NCEP 8/97 Added FILTER parameter and changed TEXT value +! J. Carr/HPC 10/97 Changed the files parameters for contouring and color fill +! +GLEVEL= 9950 +GVCORD= sgma +SKIP= 0/1 +FILTER= yes +SCALE= 0 +GDPFUN= thte(mul(1e-2,pres@0%none;tmpc;dwpc))//the!the!the!kntv(wnd) +TYPE= c/f !c !c !b +CINT= 4/200/308 !4/312/324/!4/328 +LINE= 16/1/1 !2/1/3 !32/1/2/1 +FINT= 328;336;344;352;360;368 +FLINE= 0;24;30;29;15;18;20 +HILO= 0 +HLSYM= 0 +WIND= 9/0.7/2/112 +TITLE= 1/-1/~ BL (5 MB AGL) THTE AND WIND (KTS)!0 +!CLRBAR= 1/V/LL!0 +COLORS= 2 +MARKER= 2 +GRDLBL= 5 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_thte_wind_mono_global.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_thte_wind_mono_global.attr new file mode 100644 index 0000000000..c5e4ef1071 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_thte_wind_mono_global.attr @@ -0,0 +1,25 @@ +! +! Restore File : bl_thte_wind_mono +! +! Log: +! J. Carr/HPC 7/97 Initial creation +! +GLEVEL = 9950 +GVCORD = sgma +SKIP = 0!0!0!0 +SCALE = 0 +GDPFUN = thte(mul(1e-2,pres@0%none);tmpc;dwpc)!thte(mul(1e-2,pres@0%none);tmpc;dwpc)!thte(mul(1e-2,pres@0%none);tmpc;dwpc)!kntv(wnd) +TYPE = c !c !c !b +CINT = 4/200/308 !4/312/324/!4/328 +LINE = 18/10/4 !18/2/3 !18/1/2 +FINT = 0 +FLINE = 00 +HILO = 0 +HLSYM = 0 +!CLRBAR= 1/V/LL!0 +WIND = 18/0.8/1/112 +TITLE = 1/-1/~ BL (5 MB AGL) THTE AND WIND (KTS)!0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_thte_wind_mono_nam.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_thte_wind_mono_nam.attr new file mode 100644 index 0000000000..7e2ee2a65e --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_thte_wind_mono_nam.attr @@ -0,0 +1,25 @@ +! +! Restore File : bl_thte_wind_mono +! +! Log: +! J. Carr/HPC 7/97 Initial creation +! +GLEVEL = 9823 +GVCORD = sgma +SKIP = 0!0!0!0/1;2 +SCALE = 0 +GDPFUN = thte(pres;tmpc;dwpc)//the!the !the !kntv(wnd) +TYPE = c !c !c !b +CINT = 4/200/308 !4/312/324/!4/328 +LINE = 18/10/4 !18/2/3 !18/1/2 +FINT = 0 +FLINE = 00 +HILO = 0 +HLSYM = 0 +CLRBAR = 1/V/LL!0 +WIND = 18/0.8/1/112 +TITLE = 1/-1/~ BL (18MB AGL) THTE & WIND (KTS)!0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = no diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_wind.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_wind.attr index c66125d7f5..32b770b9a7 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_wind.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_wind.attr @@ -13,7 +13,7 @@ GVCORD=pdly!none SKIP= FILTER=y SCALE=0 -GDPFUN=mag(kntv(wnd))!sm5s(emsl) ! kntv(wnd@30:0%pdly) +GDPFUN=mag(kntv(wnd))!sm5s(mul(1e-2,emsl)) ! kntv(wnd@30:0%pdly) TYPE=c/f!c ! b CINT=5/20!4 LINE=32/1/2/2!19//2 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_winds_only_global.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_winds_only_global.attr new file mode 100644 index 0000000000..a81cf3895d --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_winds_only_global.attr @@ -0,0 +1,25 @@ +! +! Restore File : gfs_winds_only +! +! Log: +! J.L.Partain/MPC 6/98 Initial creation +! +GLEVEL = 0 +GVCORD = none +SKIP = 0 +SCALE = 0 +GDPFUN = kntv(wnd@9950%sgma) +TYPE = b +CINT = +LINE = +FINT = +FLINE = +HILO = +HLSYM = +!CLRBAR= 0 +WIND = 9/0.7/1.5/112 +TITLE = 1/-1/~ BL WIND = (40m; KTS) +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_winds_only_nogaps.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_winds_only_nogaps.attr new file mode 100644 index 0000000000..1e90e16771 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_winds_only_nogaps.attr @@ -0,0 +1,26 @@ +! +! Restore File : bl_winds_only +! +! Log: +! J.L.Partain/MPC 2/99 Initial creation +! J.L.Partain/MPC 03/00 Chg GLEVEL = from 19 to 10 +! +GLEVEL = 10 +GVCORD = hght +SKIP = 0 +SCALE = 0 +GDPFUN = kntv(wnd) +TYPE = b +CINT = +LINE = +FINT = +FLINE = +HILO = +HLSYM = +!CLRBAR = 0 +WIND = 9/0.7/1.5/112 +TITLE = 1/-1/~ BL WIND = (10m; KTS) +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_winds_only_ukmet.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_winds_only_ukmet.attr new file mode 100644 index 0000000000..df8339369a --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_winds_only_ukmet.attr @@ -0,0 +1,25 @@ +! +! Restore File : bl_winds_only +! +! Log: +! J.L.Partain/MPC 2/99 Initial creation +! +GLEVEL = 0 +GVCORD = none +SKIP = 0 +SCALE = 0 +GDPFUN = kntv(wnd) +TYPE = b +CINT = +LINE = +FINT = +FLINE = +HILO = +HLSYM = +!CLRBAR= 0 +WIND = 9/0.7/1.5/112 +TITLE = 1/-1/~ SFC WIND (KTS) +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/ct_index.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/ct_index.attr index 581d18adff..4aaf770de3 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/ct_index.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/ct_index.attr @@ -9,7 +9,7 @@ GVCORD=none!pres!pdly!none SKIP= FILTER=y SCALE=0 -GDPFUN=sm9s(ctot)!sm9s(tmpc)!sm9s(dwpf)!sm9s(pmsl) +GDPFUN=sm9s(ctot)!sm9s(tmpc)!sm9s(dwpf)!sm9s(mul(1e-2,pmsl)) TYPE=f!c CINT=2/16/36!2/6!50;55;60;65;70;75;80!4 LINE=0!5/10/4!21/1/3!6//3 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/ct_index_global.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/ct_index_global.attr new file mode 100644 index 0000000000..20e597e55b --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/ct_index_global.attr @@ -0,0 +1,22 @@ +! +! Restore File : ct_index +! +! Log: +! J.Carr/HPC 5/99 Initial creation +! +GLEVEL= 0!700!9950!0 +GVCORD= none!pres!sgma!none +SCALE = 0 +GDPFUN= sm9s(ctot)!sm9s(tmpc)!sm9s(dwpf)!sm9s(mul(1e-2,pmsl)) +TYPE = f!c +CINT = 2/16/36!2/6!50;55;60;65;70;75;80!4 +CONTUR= 2 +LINE = 0!5/10/4!21/1/3!6//3 +FINT = 16;20;24;28 +FLINE = 0;24;30;14;2 +HILO = 0!0!0!6/H#;L# +HLSYM = !!!1.5;1.5//22;22/3;3/hw +!CLRBAR= 1 +WIND = bk0 +TITLE = 1/0/~ CT INDEX, 700mb TEMP (>6 C), BL DWPT AND MSLP|~CT INDEX +FILTER= 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/emsl_and_10m_wind.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/emsl_and_10m_wind.attr index 7319819b66..2e6ff8cf65 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/emsl_and_10m_wind.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/emsl_and_10m_wind.attr @@ -6,21 +6,22 @@ ! J. Carr/HPC 5/15/97 Changed PMSL to EMSL and changed hilo ranges ! D.W.Plummer/NCEP 8/97 Added FILTER parameter and changed TEXT value ! -GLEVEL=10!0 -GVCORD=hght!none -SKIP= -FILTER=y -SCALE=0 -GDPFUN=mag(kntv(wnd))!sm5s(pmsl) ! kntv(wnd@10%hght) -TYPE=c/f!c ! b -CINT=5/20!4 -LINE=32/1/2/2!19//2 -FINT=20;35;50;65 -FLINE=0;24;25;30;15 -HILO=0!20/H#;L#/1020-1070;900-1012 -HLSYM=0!1.5;1.5//22;22/3;3/hw -WIND=9/0.7/2/112 -TITLE=1/-1/~ EMSL, 10m WIND (AGL; KTS) -COLORS=2 -MARKER=2 -GRDLBL=5 +GLEVEL = 10!0 +GVCORD = hght!none +SKIP = 0/1 +SCALE = 0 +GDPFUN = mag(kntv(wnd))!sm5s(mul(1e-2,pmsl)) ! kntv(wnd@10%hght) +TYPE = c/f!c ! b +CINT = 5/20!4 +LINE = 32/1/2/2!19//2 +FINT = 20;35;50;65 +FLINE = 0;24;25;30;15 +HILO = 0!20/H#;L#/1020-1070;900-1012 +HLSYM = 0!1.5;1.5//22;22/3;3/hw +!CLRBAR = 1/V/LL!0 +WIND = 9/0.7/2/112 +TITLE = 1/-1/~ EMSL, 10m WIND (AGL; KTS) +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/emsl_and_bl_wind.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/emsl_and_bl_wind.attr index 0fa74430dc..9bdee2da6e 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/emsl_and_bl_wind.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/emsl_and_bl_wind.attr @@ -6,21 +6,22 @@ ! J. Carr/HPC 6/97 Changed boundary level to comply with EMC changes ! D.W.Plummer/NCEP 8/97 Added FILTER parameter and changed TEXT value ! -GLEVEL=30:0!0 -GVCORD=pdly!none -SKIP= -FILTER=y -SCALE=0 -GDPFUN=mag(kntv(wnd))!sm5s(emsl) ! kntv(wnd@30:0%pdly) -TYPE=c/f!c ! b -CINT=5/20!4 -LINE=32/1/2/2!19//2 -FINT=20;35;50;65 -FLINE=0;24;25;30;15 -HILO=0!20/H#;L#/1020-1070;900-1012 -HLSYM=0!1.5;1.5//22;22/3;3/hw -WIND=9/0.6/2/112 -TITLE=1/-1/~ EMSL, BL WIND (0-30 MB AGL; KTS) -COLORS=2 -MARKER=2 -GRDLBL=5 +GLEVEL = 30:0!0 +GVCORD = pdly!none +SKIP = 0/1 +SCALE = 0 +GDPFUN = mag(kntv(wnd))!sm5s(mul(1e-2,emsl)) ! kntv(wnd@30:0%pdly) +TYPE = c/f!c ! b +CINT = 5/20!4 +LINE = 32/1/2/2!19//2 +FINT = 20;35;50;65 +FLINE = 0;24;25;30;15 +HILO = 0!20/H#;L#/1020-1070;900-1012 +HLSYM = 0!1.5;1.5//22;22/3;3/hw +!CLRBAR = 1/V/LL!0 +WIND = 9/0.6/2/112 +TITLE = 1/-1/~ EMSL, BL WIND (0-30 MB AGL; KTS) +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/emsl_and_ll_wind.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/emsl_and_ll_wind.attr index 8702b61bbe..facee77e0f 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/emsl_and_ll_wind.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/emsl_and_ll_wind.attr @@ -6,21 +6,22 @@ ! J. Carr/HPC 6/97 Changed boundary level to comply with EMC changes ! D.W.Plummer/NCEP 8/97 Added FILTER parameter and changed TEXT value ! -GLEVEL=60:30!0 -GVCORD=pdly!none -SKIP= -FILTER=y -SCALE=0 -GDPFUN=mag(kntv(wnd))!sm5s(emsl) ! kntv(wnd@60:30%pdly) -TYPE=c/f!c ! b -CINT=5/20!4 -LINE=32/1/2/2!19//2 -FINT=20;35;50;65 -FLINE=0;24;25;30;15 -HILO=0!20/H#;L#/1020-1070;900-1012 -HLSYM=0!1.5;1.5//22;22/3;3/hw -WIND=9/0.6/2/112 -TITLE=1/-1/~ EMSL, LL WIND (2nd Eta LVL 30-60 MB ABOVE SFC; KTS) -COLORS=2 -MARKER=2 -GRDLBL=5 +GLEVEL = 60:30!0 +GVCORD = pdly!none +SKIP = 0/1 +SCALE = 0 +GDPFUN = mag(kntv(wnd))!sm5s(mul(1e-2,emsl)) ! kntv(wnd@60:30%pdly) +TYPE = c/f!c ! b +CINT = 5/20!4 +LINE = 32/1/2/2!19//2 +FINT = 20;35;50;65 +FLINE = 0;24;25;30;15 +HILO = 0!20/H#;L#/1020-1070;900-1012 +HLSYM = 0!1.5;1.5//22;22/3;3/hw +!CLRBAR = 1/V/LL!0 +WIND = 9/0.6/2/112 +TITLE = 1/-1/~ EMSL, LL WIND (2nd Eta LVL 30-60 MB ABOVE SFC; KTS) +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/emsl_bl1_wind_850mb_tad.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/emsl_bl1_wind_850mb_tad.attr index 666a19bf66..b36492d164 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/emsl_bl1_wind_850mb_tad.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/emsl_bl1_wind_850mb_tad.attr @@ -12,7 +12,7 @@ GVCORD=pres!pdly!none SKIP= FILTER=y SCALE=4!0 -GDPFUN=adv(tmpc,wnd)!mag(kntv(wnd))!sm5s(emsl) ! kntv(wnd@30:0%pdly) +GDPFUN=adv(tmpc,wnd)!mag(kntv(wnd))!sm5s(mul(1e-2,emsl)) ! kntv(wnd@30:0%pdly) TYPE=c/f !c !c ! b CINT=1 !5/20 !4 LINE=32/1/2/1 !5/1/2 !1//2 @@ -20,6 +20,7 @@ FINT=-7;-5;-3;-1;1;3;5;7 FLINE=7;29;30;24;0;14;15;18;5 HILO=0!0!1/H#;L#/1020-1070;900-1012 HLSYM=0!0!1.5;1.5//22;22/3;3/hw +!CLRBAR=1/V/LL!0 WIND=9/0.8/2/112 TITLE=1/-1/~ EMSL, (0-30MB AGL) WIND (KTS) AND 850 MB TMP ADV!0 COLORS=2 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/emsl_bl_tempc_wind.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/emsl_bl_tempc_wind.attr index f0f5684334..4435afa0c7 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/emsl_bl_tempc_wind.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/emsl_bl_tempc_wind.attr @@ -12,7 +12,7 @@ GVCORD=pdly!pdly!pdly!none!pdly SKIP= FILTER=y SCALE=0 -GDPFUN=tmpc!tmpc!tmpc!sm5s(emsl) ! kntv(wnd) +GDPFUN=tmpc!tmpc!tmpc!sm5s(mul(1e-2,emsl)) ! kntv(wnd) TYPE=c/f !c !c !c ! b CINT=3/-99/0!3/3/18!3/21/99!4 LINE=27/1/2!2/1/2!16/1/2!19//3 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/emsl_bl_tempf_wind.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/emsl_bl_tempf_wind.attr index 084419a609..a260d212b4 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/emsl_bl_tempf_wind.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/emsl_bl_tempf_wind.attr @@ -4,21 +4,22 @@ ! Log: ! J. Carr/HPC 10/97 New file ! -GLEVEL=30:0!30:0!30:0!0 !30:0 -GVCORD=pdly!pdly!pdly!none!pdly -SKIP= -FILTER=y -SCALE=0 -GDPFUN=tmpf!tmpf!tmpf!sm5s(emsl) ! kntv(wnd) -TYPE=c/f !c !c !c ! b -CINT=4/-99/32!4/36/80!4/84 !4 -LINE=27/1/2 !2/1/1 !16/1/3!19//3 -FINT=20;32;0! -FLINE=29;30;24;0! -HILO=0!0!0!20/H#;L#/1020-1070;900-1012 -HLSYM=0!0!0!1.5;1.5//22;22/3;3/hw -WIND=9/0.7/2/112 -TITLE=1/-1/~ EMSL PRESSURE, BL TEMPERATURE (0-30MB AGL), WIND (KTS)!0 -COLORS=2 -MARKER=2 -GRDLBL=5 +GLEVEL = 30:0!30:0!30:0!0 !30:0 +GVCORD = pdly!pdly!pdly!none!pdly +SKIP = 0/1 +SCALE = 0 +GDPFUN = tmpf!tmpf!tmpf!sm5s(mul(1e-2,emsl)) ! kntv(wnd) +TYPE = c/f !c !c !c ! b +CINT = 4/-99/32!4/36/80!4/84 !4 +LINE = 27/1/2 !2/1/1 !16/1/3!19//3 +FINT = 20;32;0! +FLINE = 29;30;24;0! +HILO = 0!0!0!20/H#;L#/1020-1070;900-1012 +HLSYM = 0!0!0!1.5;1.5//22;22/3;3/hw +!CLRBAR = 1/V/LL!0 +WIND = 9/0.7/2/112 +TITLE = 1/-1/~ EMSL PRESSURE, BL TEMPERATURE (0-30MB AGL), WIND (KTS)!0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/emsl_thkn.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/emsl_thkn.attr index f14c2bbec0..9dbd0d38c2 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/emsl_thkn.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/emsl_thkn.attr @@ -10,7 +10,7 @@ GVCORD=pres!pres!none SKIP= FILTER=y SCALE=-1!-1!0 -GDPFUN=ldf(hght) ! ldf(hght) !sm5s(emsl) +GDPFUN=ldf(hght) ! ldf(hght) !sm5s(mul(1e-2,emsl)) TYPE=c CINT=6/0/540 ! 6/546/999 ! 4 LINE=6/3/2 ! 2/3/2 ! 20//3 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/emsl_thkn_wind.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/emsl_thkn_wind.attr index 50865c9c33..76f3f6142c 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/emsl_thkn_wind.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/emsl_thkn_wind.attr @@ -3,23 +3,24 @@ ! ! Log: ! J. Carr/HPC 2/98 Initial creation -! J. Carr/HPC 7/98 Modified title to emsl rather than pmsl +! J. Carr/HPC 7/98 Modified title to mul(1e-2,emsl) rather than mul(1e-2,pmsl) ! -GLEVEL=500:1000!500:1000!0!30:0 -GVCORD=pres!pres!none!pdly -SKIP= -FILTER=y -SCALE=-1!-1!0 -GDPFUN=ldf(hght) ! ldf(hght) !sm9s(emsl)! kntv(wnd) -TYPE=c!c!c!b -CINT=6/0/540 ! 6/546/999 ! 4 -LINE=6/3/2 ! 2/3/2 ! 20//3 -FINT= -FLINE= -HILO=!! 26;2/H#;L#/1018-1070;900-1012//30;30/y -HLSYM=2;1.5//21//hw -WIND=9/0.8/2/112 -TITLE=5/-1/~ EMSL, 1000-500 MB THICKNESS, BL WIND!0 -COLORS=2 -MARKER=2 -GRDLBL=5 +GLEVEL = 500:1000!500:1000!0!30:0 +GVCORD = pres!pres!none!pdly +SKIP = 1!!0 +SCALE = -1!-1!0 +GDPFUN = ldf(hght) ! ldf(hght) !sm9s(mul(1e-2,emsl))! kntv(wnd) +TYPE = c!c!c!b +CINT = 6/0/540 ! 6/546/999 ! 4 +LINE = 6/3/2 ! 2/3/2 ! 20//3 +FINT = +FLINE = +HILO = !! 26;2/H#;L#/1018-1070;900-1012//30;30/y +HLSYM = 2;1.5//21//hw +!CLRBAR = 1 +WIND = 9/0.8/2/112 +TITLE = 5/-1/~ EMSL, 1000-500 MB THICKNESS, BL WIND!0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/ethkn.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/ethkn.attr index ab3b2baa6c..81b6e82862 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/ethkn.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/ethkn.attr @@ -10,7 +10,7 @@ GVCORD=pres !pres SKIP= FILTER=y SCALE=-1 !-1 -GDPFUN=sm9s(sub(hght,mul(8.0,sub(pmsl@0%none,1000)))!sm9s(sub(hght,mul(8.0,sub(pmsl@0%none,1000))) +GDPFUN=sm9s(sub(hght,mul(8.0,sub(mul(1e-2,pmsl@0%none),1000)))!sm9s(sub(hght,mul(8.0,sub(mul(1e-2,pmsl@0%none),1000))) TYPE=c CINT=6/0/540!6/546/999!4 LINE=6/3/2 !2/3/2 !20//3 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/great_lakes_snow.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/great_lakes_snow.attr index 90d8bd3d12..79575bcddf 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/great_lakes_snow.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/great_lakes_snow.attr @@ -12,7 +12,7 @@ GLEVEL=90:60 !850 !850 !180:150 !30:0 GVCORD=pdly !pres !pres !pdly !pdly SKIP= FILTER=y -SCALE=0 !0 !0 !3 !0 +SCALE=0 !0 !0 !1 !0 GDPFUN=avg(relh,relh@180:150)!sub(tmpc@2%hght,tmpc)!sm9s(tmpc)!sm5s(omeg)!kntv(wnd) TYPE=c/f !c !c !c !b CINT=60;65;70;75 !1/10 !1//0 !1//-1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/great_lakes_snow2.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/great_lakes_snow2.attr index 951df5b655..c944e9270b 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/great_lakes_snow2.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/great_lakes_snow2.attr @@ -8,7 +8,7 @@ GLEVEL=90:60 !850 !850 !180:150 !30:0 GVCORD=pdly !pres !pres !pdly !pdly SKIP= FILTER=y -SCALE=0 !0 !0 !3 !0 +SCALE=0 !0 !0 !1 !0 GDPFUN=avg(relh,relh@180:150)!sub(tmpc@2%hght,tmpc)!sm9s(tmpc)!sm5s(omeg)!kntv(wnd) TYPE=c/f !c !c !c !s CINT=60;65;70;75 !1/10 !1//0 !1//-1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/great_lakes_snow2_global.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/great_lakes_snow2_global.attr new file mode 100644 index 0000000000..93ff06cbdf --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/great_lakes_snow2_global.attr @@ -0,0 +1,25 @@ +! +! Restore File : great_lakes_snow2 +! +! Log: +! J. Carr/HPC 3/00 Initial creation +! +GLEVEL= 7200:9400 !850 !850 !850 !9950 +GVCORD= sgma !pres !pres !pres !sgma +SKIP = 0 +SCALE = 0 !0 !0 !1 !0 +GDPFUN= sm5s(relh) !sub(tmpc@2%hght,tmpc)!sm9s(tmpc)!sm5s(omeg)!kntv(wnd) +TYPE = c/f !c !c !c !s +CINT = 60;65;70;75!1/10 !1//0 !1//-1 +LINE = 3//2 !20/1/1 !15/3/2 !6/1/2 !17/1/2 +FINT = 80;90 +FLINE = 0;23;22 +HILO = 0 +HLSYM = 0 +!CLRBAR= 1/V/LL!0 +WIND = 9/0.9/2/112 +TITLE = 1/-1/~ 720-940 MB RH,9950 SG STRM,850 MB OMG,850-2m dT (YEL),850 T(RED)!0 +COLORS= 2 +MARKER= 2 +GRDLBL= 5 +FILTER= 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/great_lakes_snow_global.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/great_lakes_snow_global.attr new file mode 100644 index 0000000000..3dbdab2465 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/great_lakes_snow_global.attr @@ -0,0 +1,25 @@ +! +! Restore File : great_lakes_snow +! +! Log: +! J. Carr/HPC 3/00 Initial creation +! +GLEVEL= 7200:9400 !850 !850 !850 !9950 +GVCORD= sgma !pres !pres !pres !sgma +SKIP = 0 +SCALE = 0 !0 !0 !1 !0 +GDPFUN= sm5s(relh) !sub(tmpc@2%hght,tmpc)!sm9s(tmpc)!sm5s(omeg)!kntv(wnd) +TYPE = c/f !c !c !c !b +CINT = 60;65;70;75!1/10 !1//0 !1//-1 +LINE = 3//2 !20/1/1 !15/3/2 !6/1/2 !17/1/2 +FINT = 80;90 +FLINE = 0;23;22 +HILO = 0 +HLSYM = 0 +!CLRBAR= 1/V/LL!0 +WIND = 9/0.9/2/112 +TITLE = 1/-1/~ 720-940 MB RH,9950 SG WIND,850 MB OMG,850-2m dT (YEL),850 T(RED)!0 +COLORS= 2 +MARKER= 2 +GRDLBL= 5 +FILTER= 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/kindex_700mbtemp_bldwpt_mslp.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/kindex_700mbtemp_bldwpt_mslp.attr index 814fef2ab1..cfb1f8832d 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/kindex_700mbtemp_bldwpt_mslp.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/kindex_700mbtemp_bldwpt_mslp.attr @@ -12,7 +12,7 @@ GVCORD=pres!pres!pdly!none SKIP= FILTER=y SCALE=0 -GDPFUN=sub(add(add(dwpc@850,dwpc),sub(tmpc@850,tmpc@500)),tmpc)!tmpc!dwpf!emsl +GDPFUN=sub(add(add(dwpc@850,dwpc),sub(tmpc@850,tmpc@500)),tmpc)!tmpc!dwpf!mul(1e-2,emsl) TYPE=c/f!c CINT=3/15/60!2/6!50;55;60;65;70;75;80!4 LINE=32/1/2/2!20/3/2!3/1/3!6//3 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/kindex_700mbtemp_bldwpt_mslp_global.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/kindex_700mbtemp_bldwpt_mslp_global.attr new file mode 100644 index 0000000000..29590f5f50 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/kindex_700mbtemp_bldwpt_mslp_global.attr @@ -0,0 +1,26 @@ +! +! Restore File : kindex_700mbtemp_bldwpt_mslp +! +! Log: +! D.W.Plummer/NCEP 2/97 Initial creation +! J. Carr/HPC 5/15/97 Changed HILO =, color of dewpoint and PMSL to EMSL +! +GLEVEL = 700!700!9950!0 +GVCORD = pres!pres!sgma!none +SKIP = 0/1 +SCALE = 0 +GDPFUN = sub(add(add(dwpc@850,dwpc),sub(tmpc@850,tmpc@500)),tmpc)!tmpc!dwpf!mul(1e-2,pmsl) +TYPE = c/f!c +CINT = 3/15/60!2/6!50;55;60;65;70;75;80!4 +LINE = 32/1/2/2!20/10/3!3/1/3!6//3 +FINT = 15;24;33;42 +FLINE = 0;24;30;14;2 +HILO = 0!0!0!6/H#;L#/1020-1070;900-1012 +HLSYM = !!!1.5;1.5//22;22/3;3/hw +!CLRBAR= 1/V/LL!0 +WIND = +TITLE = 1/-1/~ K INDEX, 700mb TEMP (>6 C), BL DWPT AND MSLP!0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/lifted_index_global.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/lifted_index_global.attr new file mode 100644 index 0000000000..ce11cc2740 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/lifted_index_global.attr @@ -0,0 +1,28 @@ +! +! Restore File : lifted_index +! +! Log: +! D.W.Plummer/NCEP 2/97 Initial creation +! Joe Carr/HPC 8/97 Fixed winds, they were not loading +! D.W.Plummer/NCEP 8/97 Added FILTER parameter and changed TEXT value +! +GLEVEL =0 +GVCORD =none +SKIP =0/1 +SCALE =0 +GDPFUN =sm5s(lift)//li!li!li ! kntv(wnd@9950%sgma) +TYPE =c/f !c !c ! b +CINT =2/2!-10000;0.05!2/-100/-2 +LINE =20/-32/2!0;5//0;4/0;0!32//2 +FINT =-8;-6;-4;-2;0.05;10 +FINT =-8;-6;-4;-2;0;10 +FLINE =2;15;21;22;23;0;24 +HILO =0 +HLSYM =1;1//22;22/2;2/hw +!CLRBAR=1/V/LL!0 +WIND =!!!10/0.9/2/112 +TITLE =1/-2/~ Best LIFTED INDEX AND BL WINDS (KTS)!0 +COLORS =2 +MARKER =2 +GRDLBL =5 +FILTER =1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/lifted_index_nam.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/lifted_index_nam.attr new file mode 100644 index 0000000000..c40ac889b4 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/lifted_index_nam.attr @@ -0,0 +1,26 @@ +! +! Restore File : lifted_index +! +! Log: +! D.W.Plummer/NCEP 2/97 Initial creation +! J. Carr/HPC 6/97 Changed lifted index level to comply with EMC changes +! +GLEVEL = 180:0 +GVCORD = pdly +SKIP = 0/1 +SCALE = 0 +GDPFUN = sm5s(lft4)//li!li!li ! kntv(wnd@30:0) +TYPE = c/f!c!c ! b +CINT = 2/2!-10000;0.05!2/-100/-2 +LINE = 20/-32/2!0;5//0;4/0;0!32//2 +FINT = -8;-6;-4;-2;0.05;10 +FLINE = 2;15;21;22;23;0;24 +HILO = 0!0 +HLSYM = 1;1//22;22/2;2/hw +CLRBAR = 1/V/LL!0 +WIND = 10/0.9/2/112 +TITLE = 1/-1/~ BEST LI (0-180 MB AGL) AND BL (0-30 MB AGL) WIND (KTS)!0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/lifted_index_ncf.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/lifted_index_ncf.attr index 1ad08dcc52..f48b0a9530 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/lifted_index_ncf.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/lifted_index_ncf.attr @@ -3,24 +3,23 @@ ! ! Log: ! D.W.Plummer/NCEP 2/97 Initial creation -! J. Carr/HPC 6/97 Changed lifted index level to comply with EMC changes -! D.W.Plummer/NCEP 8/97 Added FILTER parameter and changed TEXT value ! -GLEVEL=180:0 -GVCORD=pdly -SKIP= -FILTER=y -SCALE=0 -GDPFUN=sm5s(lft4) !sm5s(lft4) !sm5s(lft4) !kntv(wnd@30:0%pdly) -TYPE=c !c !c !b -CINT=2/2 !2/-4/-2 !2/-100/-6 -LINE=20/1/1 !2/1/2/1 !2/1/4/1 -FINT= -FLINE= -HILO=0 -HLSYM=0 -WIND=10/0.9/2/112 -TITLE=1/-1/~ BEST LI (0-180 MB AGL) AND BL (0-30 MB AGL)WINDS (KTS)!0 -COLORS=2 -MARKER=2 -GRDLBL=5 +GLEVEL = 0 +GVCORD = none +SKIP = 0/1 +SCALE = 0 +GDPFUN = sm5s(lft4) !sm5s(lft4) !sm5s(lft4) !kntv(wnd@9950%sgma) +TYPE = c !c !c !b +CINT = 2/2 !2/-4/-2 !2/-100/-6 +LINE = 20/1/1 !2/1/2/1 !2/1/4/1 +FINT = +FLINE = +HILO = 0 +HLSYM = 0 +!CLRBAR= 1/V/LL!0 +WIND = 10/0.9/2/112 +TITLE = 1/-1/~ Best LIFTED INDEX AND BL WIND =S (KTS)!0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/lifted_index_ncf_global.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/lifted_index_ncf_global.attr new file mode 100644 index 0000000000..f96b9e019b --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/lifted_index_ncf_global.attr @@ -0,0 +1,25 @@ +! +! Restore File : lifted_index_ncf +! +! Log: +! D.W.Plummer/NCEP 2/97 Initial creation +! +GLEVEL = 0 +GVCORD = none +SKIP = 0/1 +SCALE = 0 +GDPFUN = sm5s(lft4) !sm5s(lft4) !sm5s(lft4) !kntv(wnd@9950%sgma) +TYPE = c !c !c !b +CINT = 2/2 !2/-4/-2 !2/-100/-6 +LINE = 20/1/1 !2/1/2/1 !2/1/4/1 +FINT = +FLINE = +HILO = 0 +HLSYM = 0 +!CLRBAR = 1/V/LL!0 +WIND = 10/0.9/2/112 +TITLE = 1/-1/~ Best LIFTED INDEX AND BL WIND (KTS)!0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/lifted_index_ncf_nam.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/lifted_index_ncf_nam.attr new file mode 100644 index 0000000000..750e43f46f --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/lifted_index_ncf_nam.attr @@ -0,0 +1,26 @@ +! +! Restore File : lifted_index_ncf +! +! Log: +! D.W.Plummer/NCEP 2/97 Initial creation +! J. Carr/HPC 6/97 Changed lifted index level to comply with EMC changes +! +GLEVEL = 180:0 +GVCORD = pdly +SKIP = 0/1 +SCALE = 0 +GDPFUN = sm5s(lft4) !sm5s(lft4) !sm5s(lft4) !kntv(wnd@30:0%pdly) +TYPE = c !c !c !b +CINT = 2/2 !2/-4/-2 !2/-100/-6 +LINE = 20/1/1 !2/1/2/1 !2/1/4/1 +FINT = +FLINE = +HILO = 0 +HLSYM = 0 +CLRBAR = 1/V/LL!0 +WIND = 10/0.9/2/112 +TITLE = 1/-1/~ BEST LI (0-180 MB AGL) AND BL (0-30 MB AGL)WIND =S (KTS)!0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/ll_turb.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/ll_turb.attr index 796d37da71..1b1e7ded3f 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/ll_turb.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/ll_turb.attr @@ -11,7 +11,7 @@ GVCORD=pres!SGMA!none SKIP= FILTER=y SCALE=4!0 -GDPFUN=adv(tmpc,wnd)!mag(kntv(wnd))!sm5s(emsl) ! kntv(wnd@9700:10000%SGMA) +GDPFUN=adv(tmpc,wnd)!mag(kntv(wnd))!sm5s(mul(1e-2,emsl)) ! kntv(wnd@9700:10000%SGMA) TYPE=c/f !c !c ! b CINT=1 !5/20 !4 LINE=32/1/2/1 !5/1/2 !1//2 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/marine_fronts.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/marine_fronts.attr index 8229da3aa5..ec1dc62f88 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/marine_fronts.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/marine_fronts.attr @@ -9,7 +9,7 @@ GVCORD=sgma ! pres SKIP= FILTER=y SCALE=7 ! -1 -GDPFUN=sdiv(mixr(dwpc;pres@0%none),obs ! (sub(hght@850,hght@1000) ! kntv(wnd@30:0%pdly) +GDPFUN=sdiv(mixr(dwpc;mul(1e-2,pres@0%none)),obs) ! (sub(hght@850,hght@1000)) ! kntv(wnd@30:0%pdly) TYPE=c/f ! c ! b CINT=1//-1 ! 1 LINE=32/1/1/2 ! 6/5/1/1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/marine_fronts_nam.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/marine_fronts_nam.attr new file mode 100644 index 0000000000..3abf7d110c --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/marine_fronts_nam.attr @@ -0,0 +1,25 @@ +! +! Restore File : eta_marine_fronts +! +! Log: +! J.L.Partain/MPC 6/98 New file with bl moist conv, 1000-850thk, winds +! +GLEVEL = 9823 ! 850:1000 +GVCORD = sgma ! pres +SKIP = 0 +SCALE = 7 ! -1 +GDPFUN = sdiv(mixr(dwpc;mul(1e-2,pres@0%none)),obs ! (sub(hght@850,hght@1000) ! kntv(wnd@30:0%pdly) +TYPE = c/f ! c ! b +CINT = 1//-1 ! 1 +LINE = 32/1/1/2 ! 6/5/1/1 +FINT = -9;-7;-5;-3;-1 ! +FLINE = 2;15;21;22;23;0 ! +HILO = +HLSYM = +!CLRBAR= 1 +WIND = 9/0.7/1.5/112 +TITLE = 1/-1/~ 1000-850mb THK, BL MOISTURE CONVERGENCE & WIND = (KT)!0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/minpres_1000mb_wind.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/minpres_1000mb_wind.attr index 92136a56f7..9a36360870 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/minpres_1000mb_wind.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/minpres_1000mb_wind.attr @@ -9,7 +9,7 @@ GVCORD=pres !pres !none !pres SKIP= FILTER=y SCALE=0 -GDPFUN=mag(kntv(wnd)) !mag(kntv(wnd)) !sm5s(sm5s(pmsl)) !kntv(wnd) +GDPFUN=mag(kntv(wnd)) !mag(kntv(wnd)) !sm5s(sm5s(mul(1e-2,pmsl))) !kntv(wnd) TYPE=c/f !c !c !b CINT=5/10/20 !5/25 !0 LINE=6//1/0 !32//1/0 !0 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/minpres_35m_wind.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/minpres_35m_wind.attr index 3ed1d7c770..9e73487450 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/minpres_35m_wind.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/minpres_35m_wind.attr @@ -9,7 +9,7 @@ GVCORD=hght !hght !none !hght SKIP= FILTER=y SCALE=0 -GDPFUN=mag(kntv(wnd)) !mag(kntv(wnd)) !sm5s(sm5s(pmsl)) !kntv(wnd) +GDPFUN=mag(kntv(wnd)) !mag(kntv(wnd)) !sm5s(sm5s(mul(1e-2,pmsl))) !kntv(wnd) TYPE=c/f !c !c !b CINT=5/10/20 !5/25 !0 LINE=6//1/0 !32//1/0 !0 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/mlw_pmsl.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/mlw_pmsl.attr index cc0d022d6e..256853762c 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/mlw_pmsl.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/mlw_pmsl.attr @@ -4,21 +4,22 @@ ! Log: ! J. Carr/HPC 7/98 Initial creation ! -GLEVEL=400:850!0 -GVCORD=pres!none -SKIP= -FILTER=y -SCALE=0 -GDPFUN=squo(2,vadd(vlav(wnd@850:700%pres,vlav(wnd@500:400%pres)!sm9s(pmsl) -TYPE=b!c -CINT=0!4 -LINE=0!20//3 -FINT= -FLINE= -HILO=0!26;2/H#;L#/1020-1070;900-1012//30;30/y -HLSYM=0!2;1.5//21//hw -WIND=bk10/0.9/1.4/112!bk0 -TITLE=1/-2/~ 850-400 MB MLW and MSLP|~850-400mb MLW, MSLP!0 -COLORS=2 -MARKER=2 -GRDLBL=5 +GLEVEL = 400:850!0 +GVCORD = pres!none +SKIP = 0 +SCALE = 0 +GDPFUN = squo(2,vadd(vlav(wnd@850:700%pres,vlav(wnd@500:400%pres)!sm9s(mul(1e-2,pmsl)) +TYPE = b!c +CINT = 0!4 +LINE = 0!20//3 +FINT = +FLINE = +HILO = 0!26;2/H#;L#/1020-1070;900-1012//30;30/y +HLSYM = 0!2;1.5//21//hw +!CLRBAR= 0 +WIND = bk10/0.9/1.4/112!bk0 +TITLE = 1/-2/~ 850-400 MB MLW and MSLP|~850-400mb MLW AND MSLP!0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/mslp_thkn_850mb_wind.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/mslp_thkn_850mb_wind.attr index 807878f1d3..184a83b936 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/mslp_thkn_850mb_wind.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/mslp_thkn_850mb_wind.attr @@ -10,7 +10,7 @@ GVCORD=pres !none ! pres SKIP= FILTER=y SCALE=-1 ! 0 -GDPFUN=(sub(hght@500,hght@1000)) !sm5s(pmsl) ! kntv(wnd@850%pres) +GDPFUN=(sub(hght@500,hght@1000)) !sm5s(mul(1e-2,pmsl)) ! kntv(wnd@850%pres) TYPE=c ! c ! b CINT=3 ! 4 LINE=3/3/2 ! 20//3 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pcpn_potential_global.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pcpn_potential_global.attr new file mode 100644 index 0000000000..f95a2b0ab7 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pcpn_potential_global.attr @@ -0,0 +1,25 @@ +! +! Restore File : precipitation_potential +! +! Log: +! J. Carr 5/21/97 Initial creation +! +GLEVEL = 0 +GVCORD = none +SKIP = 0 +SCALE = 0 +GDPFUN = sm9s(quo(mul(quo(pwtr;25.4),relh@4400:10000%sgma),100)) +TYPE = c/f +CINT = .2/.2 +LINE = 23/1/2/1 +FINT = .6;.8;1;1.2;1.4;1.6 +FLINE = 0;23;22;21;2;30;7 +HILO = 0 +HLSYM = 0 +!CLRBAR= 1 +WIND = +TITLE = 1/-2/~ PCPN POTENTIAL (PW X (1000-440 MB RH)) INCHES OF PW!0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pcpn_potential_ncf.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pcpn_potential_ncf.attr index f69feea500..4fd7a6b22c 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pcpn_potential_ncf.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pcpn_potential_ncf.attr @@ -6,7 +6,7 @@ ! J. Carr/HPC 6/97 Changed prec water level to comply with EMC changes ! D.W.Plummer/NCEP 8/97 Added FILTER parameter and changed TEXT value ! -GLEVEL=0!0:4700 +GLEVEL=0!0 GVCORD=none!none SKIP= FILTER=y diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pcpn_potential_ncf_global.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pcpn_potential_ncf_global.attr new file mode 100644 index 0000000000..dc239957aa --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pcpn_potential_ncf_global.attr @@ -0,0 +1,25 @@ +! +! Restore File : precipitation_potential_ncf +! +! Log: +! J. Carr 5/21/97 Initial creation +! +GLEVEL = 0!0 +GVCORD = none!none +SKIP = 0 +SCALE = 0 +GDPFUN = sm9s(quo(mul(quo(pwtr;25.4),relh@4400:10000%sgma),100))//pcp!pcp!pcp +TYPE = c !c !c +CINT = .2/.2/.6 !.2/.8/1.4!.2/1.6 +LINE = 23/1/2/1 !3/1/2/1 !2/1/2/1 +FINT = +FLINE = +HILO = 0 +HLSYM = 0 +!CLRBAR= 1 +WIND = +TITLE = 1/-2/~ PCPN POTENTIAL (PW X (1000-440 MB RH)) INCHES OF PW!0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pcpn_potential_ncf_nam.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pcpn_potential_ncf_nam.attr new file mode 100644 index 0000000000..939c331aff --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pcpn_potential_ncf_nam.attr @@ -0,0 +1,26 @@ +! +! Restore File : pcpn_potential_ncf +! +! Log: +! J. Carr 5/21/97 Initial creation +! J. Carr/HPC 6/97 Changed prec water level to comply with EMC changes +! +GLEVEL = 0!0:4700 +GVCORD = none!none +SKIP = 0 +SCALE = 0 +GDPFUN = sm9s(quo(mul(quo(pwtr;25.4),relh@4700:10000%sgma),100))//pcp!pcp!pcp +TYPE = c !c !c +CINT = .2/.2/.6 !.2/.8/1.4!.2/1.6 +LINE = 23/1/2/1 !3/1/2/1 !2/1/2/1 +FINT = +FLINE = +HILO = 0 +HLSYM = 0 +!CLRBAR= 1 +WIND = +TITLE = 1/-2/~ PCPN POTENTIAL (PW X (1000-470 MB RH)) INCHES OF PW!0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/peak_swell_per_gridded.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/peak_swell_per_gridded.attr new file mode 100644 index 0000000000..104db8ebd4 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/peak_swell_per_gridded.attr @@ -0,0 +1,25 @@ +! +! Restore File : peak_swell_per_gridded +! +! Log: +! J.L.Partain/MPC 11/16/99 Gridpoint peak swell period +! +GLEVEL = 0 +GVCORD = none +SKIP = 0 +SCALE = 0 +GDPFUN = perpw +TYPE = p +CINT = 0 +LINE = +FINT = +FLINE = +HILO = 0 +HLSYM = +!CLRBAR = +WIND = +TITLE = 5/-1/~ GRIDPOINT PEAK SWELL PERIOD (sec)!0 +COLORS = 1 +MARKER = 0 +GRDLBL = +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/peak_swell_period_contoured.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/peak_swell_period_contoured.attr new file mode 100644 index 0000000000..14f388592a --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/peak_swell_period_contoured.attr @@ -0,0 +1,25 @@ +! +! Restore File : peak_swell_period_contoured +! +! Log: +! J.L.Partain/MPC 08/18/00 Contoured peak swell period +! +GLEVEL = 0 +GVCORD = none +SKIP = 0 +SCALE = 0 +GDPFUN = sm5s(perpw)!sm5s(perpw)!sm5s(perpw)!vecn(mul(sin(mul(dirpw,DTR)),-5),mul(cos(mul(dirpw,DTR)),-5)) +TYPE = c!c!c!a +CINT = 1/0/8!1/9/13!1/14 +LINE = 18/1/2!5/1/2!2/1/2 +FINT = +FLINE = +HILO = 0 +HLSYM = +!CLRBAR = +WIND = !!!ak31/.7/1.2/112/.5 +TITLE = 5/-1/~ PEAK SWELL PERIOD (sec) and DIRECTION!0 +COLORS = 1 +MARKER = 0 +GRDLBL = +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl.attr index 1c3417eb80..ff4f7aea13 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl.attr @@ -4,21 +4,22 @@ ! Log: ! J. Carr/HPC 9/98 Initial creation ! -GLEVEL=0 -GVCORD=none -SKIP= -FILTER=y -SCALE=0 -GDPFUN=sm5s(pmsl) -TYPE=c -CINT=4 -LINE=20//3 -FINT= -FLINE= -HILO=26;2/H#;L#/1018-1070;900-1012//30;30/y -HLSYM=2;1.5//21//hw -WIND= -TITLE=5/-1/~ MEAN SEA LEVEL PRESSURE -COLORS=2 -MARKER=2 -GRDLBL=5 +GLEVEL = 0 +GVCORD = none +SKIP = 0 +SCALE = 0 +GDPFUN = sm5s(mul(1e-2,pmsl)) +TYPE = c +CINT = 4 +LINE = 20//3 +FINT = +FLINE = +HILO = 26;2/H#;L#/1018-1070;900-1012//30;30/y +HLSYM = 2;1.5//21//hw +!CLRBAR= 1 +WIND = +TITLE = 5/-1/~ MEAN SEA LEVEL PRESSURE +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_1000-500thk.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_1000-500thk.attr index 800010c7f0..4470f4a70c 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_1000-500thk.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_1000-500thk.attr @@ -9,9 +9,9 @@ GVCORD=pres !none SKIP= FILTER=y SCALE=-1 ! 0 -GDPFUN=(sub(hght@500,hght@1000)) !sm9s(pmsl) +GDPFUN=(sub(hght@500,hght@1000)) !sm9s(mul(1e-2,pmsl)) TYPE=c ! -CINT=2 !4 +CINT=6 !4 LINE=3/5/1/2 !20/1/1/2 FINT= FLINE= diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_1000-500thk_global.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_1000-500thk_global.attr new file mode 100644 index 0000000000..3cb68ca92b --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_1000-500thk_global.attr @@ -0,0 +1,26 @@ +! +! Restore File : pmsl_1000-850_thk_nw +! +! Log: +! J.L.Partain/MPC 7/98 PMSL & 1000-500thk with no winds for pgen underlay +! J.L.Partain/MPC 2/99 chg cint to 6 +! +GLEVEL = 500:1000 !0 +GVCORD = pres !none +SKIP = 0 +SCALE = -1 ! 0 +GDPFUN = (sub(hght@500,hght@1000)) !sm9s(mul(1e-2,pmsl)) +TYPE = c ! +CINT = 6 !4 +LINE = 3/5/1/2 !20/1/1/2 +FINT = +FLINE = +HILO = !26;2/H#;L#/1020-1070;900-1012/3/30;30/y +HLSYM = 1;1//22;22/1.4;1.4/hw +!CLRBAR= 1 +WIND = +TITLE = 1/-1/~ PMSL, 1000-500mb THKN !0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_1000-500thk_nogaps.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_1000-500thk_nogaps.attr new file mode 100644 index 0000000000..3cb68ca92b --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_1000-500thk_nogaps.attr @@ -0,0 +1,26 @@ +! +! Restore File : pmsl_1000-850_thk_nw +! +! Log: +! J.L.Partain/MPC 7/98 PMSL & 1000-500thk with no winds for pgen underlay +! J.L.Partain/MPC 2/99 chg cint to 6 +! +GLEVEL = 500:1000 !0 +GVCORD = pres !none +SKIP = 0 +SCALE = -1 ! 0 +GDPFUN = (sub(hght@500,hght@1000)) !sm9s(mul(1e-2,pmsl)) +TYPE = c ! +CINT = 6 !4 +LINE = 3/5/1/2 !20/1/1/2 +FINT = +FLINE = +HILO = !26;2/H#;L#/1020-1070;900-1012/3/30;30/y +HLSYM = 1;1//22;22/1.4;1.4/hw +!CLRBAR= 1 +WIND = +TITLE = 1/-1/~ PMSL, 1000-500mb THKN !0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_1000-850_thk.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_1000-850_thk.attr index 3c23795aab..81b0a6ed6c 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_1000-850_thk.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_1000-850_thk.attr @@ -12,7 +12,7 @@ GVCORD=pres !none SKIP= FILTER=y SCALE=-1 ! 0 -GDPFUN=(sub(hght@850,hght@1000)) !sm9s(pmsl) ! kntv(wnd@30:0%pdly) +GDPFUN=(sub(hght@850,hght@1000)) !sm9s(mul(1e-2,pmsl)) ! kntv(wnd@30:0%pdly) TYPE=c !c ! b CINT=1 !4 LINE=3/5/2/1 !20//2 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_1000-850_thk_global.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_1000-850_thk_global.attr new file mode 100644 index 0000000000..cf8c958e7a --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_1000-850_thk_global.attr @@ -0,0 +1,28 @@ +! +! Restore File : pmsl_1000-850_thk +! +! Log: +! D.W.Plummer/NCEP 2/97 Initial creation +! J. Carr/HPC 5/15/97 Changed line thickness on thickness and hilo ranges +! D.W.Plummer/NCEP 8/97 Added FILTER parameter and changed TEXT value +! J. Carr/HPC 2/99 Smoothed thickness, changed color of isobar, changed wind to green. +! +GLEVEL =850:1000 !0 +GVCORD =pres !none +SKIP =0/2;-2 +SCALE =-1 !0 +GDPFUN =sm5s(sub(hght@850,hght@1000))!sm9s(mul(1e-2,pmsl)) !kntv(wnd@9950%sgma) +TYPE =c !c !b +CINT =1 !4 +LINE =22/5/2/1 !10/1/2 +FINT = +FLINE = +HILO = !26;2/H#;L#/1020-1070;900-1012/3/30;30/y +HLSYM = !2;1.5//21//hw +!CLRBAR=1 +WIND =!!22/0.7/2/112 +TITLE =1/-1/~ PMSL, 1000-850mb THKN AND BL (~995 MB) WIND (KTS)!0 +COLORS =2 +MARKER =2 +GRDLBL =5 +FILTER =0 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_1000-850_thk_nam.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_1000-850_thk_nam.attr new file mode 100644 index 0000000000..185738936c --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_1000-850_thk_nam.attr @@ -0,0 +1,27 @@ +! +! Restore File : mul(1e-2,pmsl)_1000-850_thk +! +! Log: +! D.W.Plummer/NCEP 2/97 Initial creation +! J. Carr/HPC 5/15/97 Changed line thickness on thickness and hilo ranges +! J. Carr/HPC 6/97 Changed boundary level to comply with EMC changes +! +GLEVEL = 850:1000 !0 +GVCORD = pres !none +SKIP = 0/1;1 +SCALE = -1 ! 0 +GDPFUN = (sub(hght@850,hght@1000)) !sm9s(mul(1e-2,pmsl)) ! kntv(wnd@30:0%pdly) +TYPE = c ! ! b +CINT = 1 !4 +LINE = 3/5/2/1 !20//2 +FINT = +FLINE = +HILO = !26;2/H#;L#/1020-1070;900-1012/3/30;30/y +HLSYM = 2;1.5//21//hw +!CLRBAR= 1 +WIND = 9/0.7/2/112 +TITLE = 1/-1/~ PMSL, 1000-850mb THKN & BL (0-30 MB AGL) WIND (KTS)!0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_1000-850_thk_nogaps.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_1000-850_thk_nogaps.attr new file mode 100644 index 0000000000..d05076a9ad --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_1000-850_thk_nogaps.attr @@ -0,0 +1,29 @@ +! +! Restore File : pmsl_1000-850_thk +! +! Log: +! D.W.Plummer/NCEP 2/97 Initial creation +! J. Carr/HPC 5/15/97 Changed line thickness on thickness and hilo ranges +! J. Carr/HPC 2/99 Smoothed thickness, changed color of isobar, changed wind to green. +! J.L.Partain/MPC 5/10/99 Mods for use in NOGAPS +! J.L.Partain/MPC 03/00 Chg GLEVEL = from 19 to 10 +! +GLEVEL = 850:1000 !0 +GVCORD = pres !none +SKIP = 0/2;-2 +SCALE = -1 !0 +GDPFUN = sm5s(sub(hght@850,hght@1000))!sm9s(mul(1e-2,pmsl)) !kntv(wnd@10%hght) +TYPE = c !c !b +CINT = 1 !4 +LINE = 22/5/2/1 !19/1/2 +FINT = +FLINE = +HILO = !26;2/H#;L#/1020-1070;900-1012/3/30;30/y +HLSYM = !2;1.5//21//hw +!CLRBAR= 1 +WIND = !!9/0.7/2/112 +TITLE = 1/-1/~ PMSL, 1000-850mb THKN & BL (~10m) WIND (KTS)!0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = no diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_1000-850thk.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_1000-850thk.attr index cf06c722c5..9038ec938c 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_1000-850thk.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_1000-850thk.attr @@ -9,7 +9,7 @@ GVCORD=pres !none SKIP= FILTER=y SCALE=-1 ! 0 -GDPFUN=(sub(hght@850,hght@1000)) !sm9s(pmsl) +GDPFUN=(sub(hght@850,hght@1000)) !sm9s(mul(1e-2,pmsl)) TYPE=c ! CINT=1 !4 LINE=3/5/1/2 !20/1/1/2 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_1000-850thk_global.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_1000-850thk_global.attr new file mode 100644 index 0000000000..d4cc2e7db2 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_1000-850thk_global.attr @@ -0,0 +1,25 @@ +! +! Restore File : pmsl_1000-850_thk_nw +! +! Log: +! J.L.Partain/MPC 5/98 PMSL & 1000-850thk with no winds for pgen underlay +! +GLEVEL = 850:1000 !0 +GVCORD = pres !none +SKIP = 0 +SCALE = -1 ! 0 +GDPFUN = (sub(hght@850,hght@1000)) !sm9s(mul(1e-2,pmsl)) +TYPE = c ! +CINT = 1 !4 +LINE = 3/5/1/2 !20/1/1/2 +FINT = +FLINE = +HILO = !26;2/H#;L#/1020-1070;900-1012/3/30;30/y +HLSYM = 1;1//22;22/1.4;1.4/hw +!CLRBAR= 1 +WIND = +TITLE = 1/-1/~ PMSL, 1000-850mb THKN !0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_1000-850thk_nam.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_1000-850thk_nam.attr new file mode 100644 index 0000000000..cc34eb4f56 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_1000-850thk_nam.attr @@ -0,0 +1,25 @@ +! +! Restore File : mul(1e-2,pmsl)_1000-850_thk_nw +! +! Log: +! J.L.Partain/MPC 5/98 PMSL & 1000-850thk with no winds for pgen underlay +! +GLEVEL = 850:1000 !0 +GVCORD = pres !none +SKIP = 0 +SCALE = -1 ! 0 +GDPFUN = (sub(hght@850,hght@1000)) !sm9s(mul(1e-2,pmsl)) +TYPE = c ! +CINT = 1 !4 +LINE = 3/5/1/2 !20/1/1/2 +FINT = +FLINE = +HILO = !26;2/H#;L#/1020-1070;900-1012/3/30;30/y +HLSYM = 1;1//22;22/1.4;1.4/hw +!CLRBAR= 1 +WIND = +TITLE = 1/-1/~ PMSL, 1000-850mb THKN !0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_1000mb_wind.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_1000mb_wind.attr index 43a15d8f98..46211f42b8 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_1000mb_wind.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_1000mb_wind.attr @@ -9,7 +9,7 @@ GVCORD=pres !pres !none !pres SKIP= FILTER=y SCALE=0 -GDPFUN=mag(kntv(wnd)) !mag(kntv(wnd)) !sm5s(sm5s(pmsl)) !kntv(wnd) +GDPFUN=mag(kntv(wnd)) !mag(kntv(wnd)) !sm5s(sm5s(mul(1e-2,pmsl))) !kntv(wnd) TYPE=c/f !c !c !b CINT=5/10/20 !5/25 !2/980 LINE=6//1/0 !32//1/0 !20//1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_and_10m_wind.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_and_10m_wind.attr index 36bf6943b2..22ea89dc72 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_and_10m_wind.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_and_10m_wind.attr @@ -10,7 +10,7 @@ GVCORD=hght!none SKIP= FILTER=y SCALE=0 -GDPFUN=mag(kntv(wnd))!sm5s(pmsl) ! kntv(wnd@10%hght) +GDPFUN=mag(kntv(wnd))!sm5s(mul(1e-2,pmsl)) ! kntv(wnd@10%hght) TYPE=c/f!c ! b CINT=5/20!4 LINE=32/1/2/2!19//2 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_and_10m_wind_nam.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_and_10m_wind_nam.attr new file mode 100644 index 0000000000..ea576c1652 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_and_10m_wind_nam.attr @@ -0,0 +1,25 @@ +! +! Restore File : mul(1e-2,pmsl)_and_10m_wind +! +! Log: +! D.W.Plummer/NCEP 2/97 Initial creation +! +GLEVEL = 10!0 +GVCORD = hght!none +SKIP = 0/1 +SCALE = 0 +GDPFUN = mag(kntv(wnd))!sm5s(mul(1e-2,pmsl)) ! kntv(wnd@10%hght) +TYPE = c/f!c ! b +CINT = 5/20!4 +LINE = 32/1/2/2!19//2 +FINT = 20;35;50;65 +FLINE = 0;24;25;30;15 +HILO = 0!20/H#;L#/1020-1070;900-1012 +HLSYM = 0!1.5;1.5//22;22/3;3/hw +CLRBAR = 1/V/LL!0 +WIND = 9/0.7/2/112 +TITLE = 1/-1/~ PMSL, 10m WIND = (AGL; KTS) +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_and_bl_wind.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_and_bl_wind.attr index e76c70ce02..3e46faae75 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_and_bl_wind.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_and_bl_wind.attr @@ -11,7 +11,7 @@ GVCORD=pdly!none SKIP= FILTER=y SCALE=0 -GDPFUN=mag(kntv(wnd))!sm5s(pmsl) ! kntv(wnd@30:0%pdly) +GDPFUN=mag(kntv(wnd))!sm5s(mul(1e-2,pmsl)) ! kntv(wnd@30:0%pdly) TYPE=c/f!c ! b CINT=5/20!4 LINE=32/1/2/2!19//2 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_and_bl_wind_global.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_and_bl_wind_global.attr new file mode 100644 index 0000000000..4e19ea5044 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_and_bl_wind_global.attr @@ -0,0 +1,26 @@ +! +! Restore File : pmsl_and_bl_wind +! +! Log: +! D.W.Plummer/NCEP 2/97 Initial creation +! J. Carr/HPC 5/19/97 Changed hilo ranges +! +GLEVEL = 9950!0 +GVCORD = sgma!none +SKIP = 0/1;-1 +SCALE = 0 +GDPFUN = mag(kntv(wnd))!sm5s(mul(1e-2,pmsl)) ! kntv(wnd@9950%sgma) +TYPE = c/f!c ! b +CINT = 5/20!4 +LINE = 32/1/2/2!19//2 +FINT = 20;35;50;65 +FLINE = 0;24;25;30;15 +HILO = 0!20/H#;L#/1020-1070;900-1012 +HLSYM = 0!1.5;1.5//22;22/3;3/hw +!CLRBAR= 1/V/LL!0 +WIND = 9/0.7/2/112 +TITLE = 1/-1/~ PMSL, BL WIND = (40m AGL (~995 MB); KTS) +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_and_bl_wind_nogaps.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_and_bl_wind_nogaps.attr new file mode 100644 index 0000000000..97100f3364 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_and_bl_wind_nogaps.attr @@ -0,0 +1,28 @@ +! +! Restore File : pmsl_and_bl_wind +! +! Log: +! D.W.Plummer/NCEP 2/97 Initial creation +! J. Carr/HPC 5/19/97 Changed hilo ranges +! J.L.Partain/MPC 5/10/99 Mods for use in NOGAPS +! J.L.Partain/MPC 03/00 Chg GLEVEL = from 19 to 10 +! +GLEVEL = 10!0 +GVCORD = hght!none +SKIP = 0/1;-1 +SCALE = 0 +GDPFUN = mag(kntv(wnd))!sm5s(mul(1e-2,pmsl)) ! kntv(wnd@10%hght) +TYPE = c/f!c ! b +CINT = 5/20!4 +LINE = 32/1/2/2!19//2 +FINT = 20;35;50;65 +FLINE = 0;24;25;30;15 +HILO = 0!20/H#;L#/1020-1070;900-1012 +HLSYM = 0!1.5;1.5//22;22/3;3/hw +!CLRBAR = 1/V/LL!0 +WIND = 9/0.7/2/112 +TITLE = 1/-1/~ PMSL, BL WIND = (10m, KTS) +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_and_ll_wind.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_and_ll_wind.attr index 4d2836ea7b..2ae1afdb79 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_and_ll_wind.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_and_ll_wind.attr @@ -11,7 +11,7 @@ GVCORD=pdly!none SKIP= FILTER=y SCALE=0 -GDPFUN=mag(kntv(wnd))!sm5s(pmsl) ! kntv(wnd@60:30%pdly) +GDPFUN=mag(kntv(wnd))!sm5s(mul(1e-2,pmsl)) ! kntv(wnd@60:30%pdly) TYPE=c/f!c ! b CINT=5/20!4 LINE=32/1/2/2!19//2 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_and_ll_wind_nam.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_and_ll_wind_nam.attr new file mode 100644 index 0000000000..87cf03be56 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_and_ll_wind_nam.attr @@ -0,0 +1,26 @@ +! +! Restore File : mul(1e-2,pmsl)_and_ll_wind +! +! Log: +! D.W.Plummer/NCEP 2/97 Initial creation +! J. Carr/HPC 6/97 Changed boundary level to comply with EMC changes +! +GLEVEL = 60:30!0 +GVCORD = pdly!none +SKIP = 0/1 +SCALE = 0 +GDPFUN = mag(kntv(wnd))!sm5s(mul(1e-2,pmsl)) ! kntv(wnd@60:30%pdly) +TYPE = c/f!c ! b +CINT = 5/20!4 +LINE = 32/1/2/2!19//2 +FINT = 20;35;50;65 +FLINE = 0;24;25;30;15 +HILO = 0!20/H#;L#/1020-1070;900-1012 +HLSYM = 0!1.5;1.5//22;22/3;3/hw +CLRBAR = 1/V/LL!0 +WIND = 9/0.6/2/112 +TITLE = 1/-1/~ PMSL, LL WIND = (2nd Eta LVL 30-60 MB AGL; KTS) +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_and_sfc_temp.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_and_sfc_temp.attr index a362e0a20a..d8f74e6dff 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_and_sfc_temp.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_and_sfc_temp.attr @@ -11,7 +11,7 @@ GVCORD=none SKIP= FILTER=y SCALE=0 -GDPFUN=tmpc!tmpc!tmpc!sm5s(pmsl) ! kntv(wnd) +GDPFUN=tmpc!tmpc!tmpc!sm5s(mul(1e-2,pmsl)) ! kntv(wnd) TYPE=c/f!c!c!! b CINT=3/-99/0!3/3/18!3/21/99!4 LINE=27/1/2!2/1/2!16/1/2!19//3 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_bl_temp_wind.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_bl_temp_wind.attr index 6b26c6a72e..b38202c7bd 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_bl_temp_wind.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_bl_temp_wind.attr @@ -3,24 +3,24 @@ ! ! Log: ! D.W.Plummer/NCEP 2/97 Initial creation -! J. Carr/HPC 5/15/97 Changed HILO, wind size -! D.W.Plummer/NCEP 8/97 Added FILTER parameter and changed TEXT value +! J. Carr/HPC 5/15/97 Changed HILO =, wind size ! -GLEVEL=9950!9950!9950!0 !9950 -GVCORD=sgma!sgma!sgma!none!sgma -SKIP= -FILTER=y -SCALE=0 -GDPFUN=tmpc!tmpc!tmpc!sm5s(pmsl) ! kntv(wnd@9950%sgma) -TYPE=c/f !c !c !c ! b -CINT=3/-99/0!3/3/18!3/21/99!4 -LINE=27/1/2!2/1/2!16/1/2!19//3 -FINT=-24;-12;0 ! -FLINE=29;30;24;0 ! -HILO=0!0!0!20/H#;L#/1020-1070;900-1012 -HLSYM=0!0!0!1.5;1.5//22;22/3;3/hw -WIND=9/0.8/2/112 -TITLE=1/-1/~ PMSL, BL TEMPERATURE (C), WIND (KTS)!0 -COLORS=2 -MARKER=2 -GRDLBL=5 +GLEVEL = 9950!9950!9950!0 !9950 +GVCORD = sgma!sgma!sgma!none!sgma +SKIP = 0/1 +SCALE = 0 +GDPFUN = tmpc!tmpc!tmpc!sm5s(mul(1e-2,pmsl)) ! kntv(wnd@9950%sgma) +TYPE = c/f !c !c !c ! b +CINT = 3/-99/0!3/3/18!3/21/99!4 +LINE = 27/1/2!2/1/2!16/1/2!19//3 +FINT = -24;-12;0 ! +FLINE = 29;30;24;0 ! +HILO = 0!0!0!20/H#;L#/1020-1070;900-1012 +HLSYM = 0!0!0!1.5;1.5//22;22/3;3/hw +!CLRBAR= 1/V/LL!0 +WIND = 9/0.8/2/112 +TITLE = 1/-1/~ PMSL, BL TEMPERATURE (C), WIND (KTS)!0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_estthkn.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_estthkn.attr index aea9f1369d..5e334817bc 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_estthkn.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_estthkn.attr @@ -10,7 +10,7 @@ GVCORD=pres!pres!none SKIP= FILTER=y SCALE=-1!-1!0 -GDPFUN=sub(hght,mul(8.0,sub(pmsl@0%none,1000)))!sub(hght,mul(8.0,sub(pmsl@0%none,1000)))!pmsl +GDPFUN=sub(hght,mul(8.0,sub(mul(1e-2,pmsl@0%none),1000)))!sub(hght,mul(8.0,sub(mul(1e-2,pmsl@0%none),1000)))!mul(1e-2,pmsl) TYPE=c CINT=6/0/540 ! 6/546/999 ! 4 LINE=6/3/2 ! 2/3/2 ! 20//3 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_ethkn.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_ethkn.attr index 5c1a239426..c1233ae3f3 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_ethkn.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_ethkn.attr @@ -10,7 +10,7 @@ GVCORD=pres !pres !none SKIP= FILTER=y SCALE=-1 !-1 !0 -GDPFUN=sub(hght,mul(8.0,sub(pmsl@0%none,1000)))!sub(hght,mul(8.0,sub(pmsl@0%none,1000)))!sm9s(pmsl) +GDPFUN=sub(hght,mul(8.0,sub(mul(1e-2,pmsl@0%none,1000))))!sub(hght,mul(8.0,sub(mul(1e-2,pmsl@0%none,1000))))!sm9s(mul(1e-2,pmsl)) TYPE=c CINT=6/0/540!6/546/999!4 LINE=6/3/2 !2/3/2 !20//3 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_only.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_only.attr index 72dde0c366..a580cf2237 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_only.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_only.attr @@ -1,18 +1,19 @@ -GLEVEL=0 -GVCORD=none -SKIP= -FILTER=y -SCALE=0 -GDPFUN=sm5s(pmsl) -TYPE=c -CINT=4 -LINE=20/1/1/2 -FINT= -FLINE= -HILO=26;2/H#;L#/1020-1070;900-1012 -HLSYM=1;1//22;22/1.4;1.4/hw -WIND= -TITLE=1/-1/~ PMSL -COLORS=2 -MARKER=2 -GRDLBL=5 +GLEVEL = 0 +GVCORD = none +SKIP = 0 +SCALE = 0 +GDPFUN = sm5s(mul(1e-2,pmsl)) +TYPE = c +CINT = 4 +LINE = 20/1/1/2 +FINT = +FLINE = +HILO = 26;2/H#;L#/1020-1070;900-1012 +HLSYM = 1;1//22;22/1.4;1.4/hw +!CLRBAR= 0 +WIND = +TITLE = 1/-1/~ PMSL +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_only_nogaps.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_only_nogaps.attr new file mode 100644 index 0000000000..a580cf2237 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_only_nogaps.attr @@ -0,0 +1,19 @@ +GLEVEL = 0 +GVCORD = none +SKIP = 0 +SCALE = 0 +GDPFUN = sm5s(mul(1e-2,pmsl)) +TYPE = c +CINT = 4 +LINE = 20/1/1/2 +FINT = +FLINE = +HILO = 26;2/H#;L#/1020-1070;900-1012 +HLSYM = 1;1//22;22/1.4;1.4/hw +!CLRBAR= 0 +WIND = +TITLE = 1/-1/~ PMSL +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_thkn.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_thkn.attr index 01546668ef..c9a4ab99d7 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_thkn.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_thkn.attr @@ -8,21 +8,22 @@ ! J. Carr/HPC 7/99 Changed skip to 0. Changed contur to 2. Changed sm5s to sm9s. ! T. Lee/GSC 11/00 Added 543 dam to thickness contour ! -GLEVEL=500:1000 !500:1000 !0 -GVCORD=pres !pres !none -SKIP= -FILTER=y -SCALE=-1 !-1 !0 -GDPFUN=sm9s(ldf(hght)!sm9s(ldf(hght)!sm9s(pmsl) -TYPE=c -CINT=3/0/540 !3/543/999 !4 -LINE=6/3/2 !2/3/2 !20//3 -FINT= -FLINE= -HILO=!! 26;2/H#;L#/1018-1070;900-1012//30;30/y -HLSYM=2;1.5//21//hw -WIND= -TITLE=5/-1/~ PMSL, 1000-500 MB THICKNESS!0 -COLORS=2 -MARKER=2 -GRDLBL=5 +GLEVEL = 500:1000 !500:1000 !0 +GVCORD = pres !pres !none +SKIP = 0 +SCALE = -1 !-1 !0 +GDPFUN = sm9s(ldf(hght)!sm9s(ldf(hght)!sm9s(mul(1e-2,pmsl)) +TYPE = c +CINT = 3/0/540 !3/543/999 !4 +LINE = 6/3/2 !2/3/2 !20//3 +FINT = +FLINE = +HILO = !! 26;2/H#;L#/1018-1070;900-1012//30;30/y +HLSYM = 2;1.5//21//hw +!CLRBAR= 1 +WIND = +TITLE = 5/-1/~ PMSL, 1000-500 MB THICKNESS!0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_thkn_850mb_wind.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_thkn_850mb_wind.attr index e375221dcb..f586ff54a1 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_thkn_850mb_wind.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_thkn_850mb_wind.attr @@ -3,23 +3,23 @@ ! ! Log: ! D.W.Plummer/NCEP 2/97 Initial creation -! D.W.Plummer/NCEP 8/97 Added FILTER parameter and changed TEXT value ! -GLEVEL=500:1000 !0 ! 850 -GVCORD=pres !none ! pres -SKIP= -FILTER=y -SCALE=-1 ! 0 -GDPFUN=(sub(hght@500,hght@1000)) !sm5s(pmsl) ! kntv(wnd@850%pres) -TYPE=c ! c ! b -CINT=3 ! 4 -LINE=3/3/2 ! 20//3 -FINT= -FLINE= -HILO=! 26;2/H#;L#///30;30/y -HLSYM=2;1.5//21//hw -WIND=9/0.9/2/112 -TITLE=5/-1/~ MSL PRESSURE, 1000-500mb THICKNESS AND 850mb WIND (KTS)!0 -COLORS=2 -MARKER=2 -GRDLBL=5 +GLEVEL = 500:1000 !0 ! 850 +GVCORD = pres !none ! pres +SKIP = 1 ! 0 ! 0/1;-1 +SCALE = -1 ! 0 +GDPFUN = (sub(hght@500,hght@1000)) !sm5s(mul(1e-2,pmsl)) ! kntv(wnd@850%pres) +TYPE = c ! c ! b +CINT = 3 ! 4 +LINE = 3/3/2 ! 20//3 +FINT = +FLINE = +HILO = ! 26;2/H#;L#///30;30/y +HLSYM = 2;1.5//21//hw +!CLRBAR= 1 +WIND = 9/0.9/2/112 +TITLE = 5/-1/~ MSL PRESSURE, 1000-500mb THICKNESS AND 850mb WIND (KTS)!0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_thkn_wind.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_thkn_wind.attr index 9958c9856b..fdd66f120f 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_thkn_wind.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_thkn_wind.attr @@ -10,7 +10,7 @@ GVCORD=pres!pres!none!pdly SKIP= FILTER=y SCALE=-1!-1!0 -GDPFUN=ldf(hght) !ldf(hght) !sm9s(pmsl)! kntv(wnd) +GDPFUN=ldf(hght) !ldf(hght) !sm9s(mul(1e-2,pmsl))! kntv(wnd) TYPE=c!c!c!b CINT=3/0/540 !3/546/999 !4 LINE=6/3/2 !2/3/2 !10/1/2 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_thkn_wind_mono.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_thkn_wind_mono.attr index d47195d81e..6f6645117e 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_thkn_wind_mono.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_thkn_wind_mono.attr @@ -10,7 +10,7 @@ GVCORD=pres!pres!none!pdly SKIP= FILTER=y SCALE=-1!-1!0 -GDPFUN=ldf(hght) !ldf(hght) !sm9s(pmsl)!kntv(wnd) +GDPFUN=ldf(hght) !ldf(hght) !sm9s(mul(1e-2,pmsl))!kntv(wnd) TYPE=c!c!c!b CINT=3/0/540 !3/546/999 !4 LINE=23/3/2 !23/3/2 !23/1/2 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_thkn_wind_mono_global.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_thkn_wind_mono_global.attr new file mode 100644 index 0000000000..dbfdc0c791 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_thkn_wind_mono_global.attr @@ -0,0 +1,26 @@ +! +! Restore File : pmsl_thkn_wnd_mono +! +! Log: +! J. Carr/HPC 7/98 Initial creation +! J. Carr/HPC 11/98 Change color from brown to green and thickness increment from 60 to 30. +! +GLEVEL = 500:1000!500:1000!0!9950 +GVCORD = pres!pres!none!sgma +SKIP = 0!0!0!0 +SCALE = -1!-1!0 +GDPFUN = ldf(hght) ! ldf(hght) !sm9s(mul(1e-2,pmsl))! kntv(wnd) +TYPE = c!c!c!b +CINT = 3/0/540 !3/546/999 !4 +LINE = 23/3/2 !23/3/2 !23/1/2 +FINT = +FLINE = +HILO = !! 23;23/H#;L#/1018-1070;900-1012//30;30/y +HLSYM = 2;1.5//21//hw +!CLRBAR= 1 +WIND = 23/0.8/1/112 +TITLE = 23/-1/~ PMSL, 1000-500 MB THICKNESS, BL (~995 MB)WIND =!0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_thkn_wind_mono_nam.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_thkn_wind_mono_nam.attr new file mode 100644 index 0000000000..6775249b4b --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_thkn_wind_mono_nam.attr @@ -0,0 +1,26 @@ +! +! Restore File : mul(1e-2,pmsl)_thkn_wnd_mono +! +! Log: +! J. Carr/HPC 7/98 Initial creation +! J. Carr/HPC 11/98 Made some changes for the basic weather forecasters +! +GLEVEL = 500:1000!500:1000!0!30:0 +GVCORD = pres!pres!none!pdly +SKIP = 0!0!0!0/1;2 +SCALE = -1!-1!0 +GDPFUN = ldf(hght) !ldf(hght) !sm9s(mul(1e-2,pmsl))!kntv(wnd) +TYPE = c!c!c!b +CINT = 3/0/540 !3/546/999 !4 +LINE = 23/3/2 !23/3/2 !23/1/2 +FINT = +FLINE = +HILO = !! 23;23/H#;L#/1018-1070;900-1012//30;30/y +HLSYM = 2;1.5//21//hw +!CLRBAR= 1 +WIND = 23/0.8/1/112 +TITLE = 23/-1/~ PMSL, 1000-500 MB THICKNESS, BL WIND =!0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = no diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_thkn_wind_nam.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_thkn_wind_nam.attr new file mode 100644 index 0000000000..a98b54d7c0 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_thkn_wind_nam.attr @@ -0,0 +1,26 @@ +! +! Restore File : pmsl_thkn_wnd +! +! Log: +! J. Carr/HPC 7/98 Initial creation +! J. Carr/HPC 11/98 changed thickness increment from 60 to 30 +! +GLEVEL=500:1000!500:1000!0!30:0 +GVCORD=pres!pres!none!pdly +SKIP= +FILTER=y +SCALE=-1!-1!0 +GDPFUN=ldf(hght) !ldf(hght) !sm9s(pmsl)! kntv(wnd) +TYPE=c!c!c!b +CINT=3/0/540 !3/546/999 !4 +LINE=6/3/2 !2/3/2 !10/1/2 +FINT= +FLINE= +HILO=!! 26;2/H#;L#/1018-1070;900-1012//30;30/y +HLSYM=2;1.5//21//hw +!CLRBAR=1 +WIND=3/0.8/1/112 +TITLE=1/-2/~ PMSL, 1000-500 MB THICKNESS, BL WIND!0 +COLORS=2 +MARKER=2 +GRDLBL=5 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmslcomponly.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmslcomponly.attr index eebfd8c4b6..4fc3f3e54b 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmslcomponly.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmslcomponly.attr @@ -10,7 +10,7 @@ GVCORD=none SKIP= FILTER=y SCALE=0 -GDPFUN=sm5s(pmsl) +GDPFUN=sm5s(mul(1e-2,pmsl)) TYPE=c CINT=4 LINE=5/1/1/2 !6/1/1/2 !3/1/1/2 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/potvort_400-250mb.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/potvort_400-250mb.attr index 73997698d9..50b2c6eea7 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/potvort_400-250mb.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/potvort_400-250mb.attr @@ -12,7 +12,7 @@ GVCORD=SGMA!pres!pres!SGMA!SGMA!SGMA!none!pres SKIP= FILTER=y SCALE=0!6!6!0 -GDPFUN=(thte(pres;tmpc;dwpc))//te!pvor(thta,wnd)//pv!pv!te!te!te!sm5s(pmsl)!kntv(wnd@300%pres) +GDPFUN=(thte(pres;tmpc;dwpc))//te!pvor(thta,wnd)//pv!pv!te!te!te!sm5s(mul(1e-2,pmsl))!kntv(wnd@300%pres) TYPE=c/f!c/f!c ! c ! c ! c ! c ! b CINT=4/332!1/1/4!2/6!4/332!4/308/328!4/292/304!4//1012 LINE=21/1/2!6/1/2/2!32/1/2/1!21/1/2!21/10/3!23/10/3!20//3 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/potvort_400-250mb_rap.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/potvort_400-250mb_rap.attr new file mode 100644 index 0000000000..2da493734c --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/potvort_400-250mb_rap.attr @@ -0,0 +1,26 @@ +! +! Restore File : potvort_400-250mb +! +! Log: +! D.W.Plummer/NCEP 2/97 Initial creation +! T. Lee/GSC 6/99 Changed PVOR contour range +! +GLEVEL = 850!400:250!400:250!850!850!1000 +GVCORD = pres!pres!pres!pres!pres!pres +SKIP = 0/2 +SCALE = 0!6!6!0!0!0 +GDPFUN = (thte(pres;tmpc;dwpc))//te!pvor(thta,wnd)//pv!pv!te!te!sm5s(mul(1e-2,psml)))!kntv(wnd@300%pres) +TYPE = c/f!c/f!c ! ! ! ! b +CINT = 4/332!1/1/4!2/6!4/308/328!4/292/304!4//1012 +LINE = 21/1/2!6/1/2/2!32/1/2/1!21/10/3!23/10/3!20//3 +FINT = 332;348;364!1;2;3;4 +FLINE = 0;23;22;21!0;0;24;30;13 +HILO = 0!0!0!0!0!0!20/H#;L# +HLSYM = 0!0!0!0!0!0!1.5;1.5//22;22/3;3/hw +!CLRBAR = 0!1/V/LL!0!0 +WIND = 9/0.9/2/112 +TITLE = 1/-1/~ 400-250mb PV,300mb WIND (KTS) and 850mb THTAE!0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_12hr.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_12hr.attr index 47110cd777..e9a998a826 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_12hr.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_12hr.attr @@ -7,22 +7,23 @@ ! J. Carr/HPC 2/99 Removed the contour from type and left just fill ! Also changed the fint and time interval ! -GLEVEL=0 -GVCORD=none -SKIP= -FILTER=y -SCALE=0 -GDPFUN=p12i -TYPE=f -CINT= -LINE= -FINT=.01;.1;.25;.5;.75;1;1.25;1.5;1.75;2;2.5;3;4;5;6;7;8;9 -FLINE=0;21-30;14-20;5 -HILO=31;0/x#2/0.1-99//100;0/y -HLSYM=1.5 -WIND= -TITLE=5/-1/~ 12-HR TOTAL PRECIPITATION ! 0 -COLORS=2 -MARKER=2 -GRDLBL=5 -GDATTIM=f12-last-06 \ No newline at end of file +GLEVEL = 0 +GVCORD = none +SKIP = 0 +SCALE = 0 +GDPFUN = p12i +TYPE = f +CINT = +LINE = +FINT = .01;.1;.25;.5;.75;1;1.25;1.5;1.75;2;2.5;3;4;5;6;7;8;9 +FLINE = 0;21-30;14-20;5 +HILO = 31;0/x#2/0.1-99//100;0/y +HLSYM = 1.5 +!CLRBAR= 1 +WIND = +TITLE = 5/-1/~ 12-HR TOTAL PRECIPITATION ! 0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 +GDATTIM= f12-last-6 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_12hr_avg.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_12hr_avg.attr index df798081a6..918b4bc7d4 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_12hr_avg.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_12hr_avg.attr @@ -22,4 +22,4 @@ TITLE=5/-1/~ 12-HR AVERAGE PRECIPITATION ! 0 COLORS=2 MARKER=2 GRDLBL=5 -GDATTIM=f12-last-06 \ No newline at end of file +GDATTIM=f12-last-06 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_12hr_mm.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_12hr_mm.attr index 8227dff88d..23b79a2b30 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_12hr_mm.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_12hr_mm.attr @@ -7,22 +7,23 @@ ! J. Carr/HPC 2/99 Removed the contour from type and left just fill ! Also changed the fint and time interval ! -GLEVEL=0 -GVCORD=none -SKIP= -FILTER=y -SCALE=0 -GDPFUN=p12m -TYPE=f -CINT= -LINE= -FINT=2;4;7;13;19;26;32;39;45;52;58;65;72;78;84;91;98;104 -FLINE=0;21-30;14-20;5 -HILO=31;0/x#/3-200//100;0/y -HLSYM=1.5 -WIND= -TITLE=5/-1/~ 12-HR TOTAL PRECIPITATION (MM)! 0 -COLORS=2 -MARKER=2 -GRDLBL=5 -GDATTIM=f12-last-06 \ No newline at end of file +GLEVEL = 0 +GVCORD = none +SKIP = 0 +SCALE = 0 +GDPFUN = p12m +TYPE = f +CINT = +LINE = +FINT = 2;4;7;13;19;26;32;39;45;52;58;65;72;78;84;91;98;104 +FLINE = 0;21-30;14-20;5 +HILO = 31;0/x#/3-200//100;0/y +HLSYM = 1.5 +!CLRBAR= 1 +WIND = +TITLE = 5/-1/~ 12-HR TOTAL PRECIPITATION (MM)! 0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 +GDATTIM= f12-last-06 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_12hr_mm_cmc.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_12hr_mm_cmc.attr new file mode 100644 index 0000000000..04687cfc61 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_12hr_mm_cmc.attr @@ -0,0 +1,29 @@ +! +! Restore File : precip_12hr_mm +! +! Log: +! D.W.Plummer/NCEP 2/97 Initial creation +! D.W.Plummer/NCEP 8/97 Added FILTER = parameter +! J. Carr/HPC 2/99 Removed the contour from type and left just fill +! Also changed the fint and time interval +! +GLEVEL = 0 +GVCORD = none +SKIP = 0 +SCALE = 0 +GDPFUN = p12m +TYPE = f +CINT = +LINE = +FINT = 2;4;7;13;19;26;32;39;45;52;58;65;72;78;84;91;98;104 +FLINE = 0;21-30;14-20;5 +HILO = 31;0/x#/3-200//100;0/y +HLSYM = 1.5 +!CLRBAR = 1 +WIND = +TITLE = 5/-1/~ 12-HR TOTAL PRECIPITATION (MM)! 0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 +GDATTIM= f12-last-06 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_12hr_mm_nogaps.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_12hr_mm_nogaps.attr new file mode 100644 index 0000000000..bf2750411e --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_12hr_mm_nogaps.attr @@ -0,0 +1,26 @@ +! +! Restore File : precip_12hr_mm +! +! Log: +! J. Carr/HPC 6/16/98 Created for nogaps. +! +GLEVEL = 0 +GVCORD = none +SKIP = 0 +SCALE = 0 +GDPFUN = pxxm +TYPE = f +CINT = 0 +LINE = 0 +FINT = 1;5;10;15;20;25;30;35;40;45;50;55;60;65;70;75;80;85 +FLINE = 0;21-30;14-20;5 +HILO = 31;0/x#/5-500///y +HLSYM = 1.5 +!CLRBAR = 1 +WIND = +TITLE = 5/-1/~ 12-HR TOTAL PRECIPITATION!0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 +GDATTIM= f12-last-06 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_12hr_nogaps.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_12hr_nogaps.attr new file mode 100644 index 0000000000..ee9bf09293 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_12hr_nogaps.attr @@ -0,0 +1,26 @@ +! +! Restore File : precip_12hr +! +! Log: +! J. Carr/NCEP 6/16/98 Created for nogaps. +! +GLEVEL = 0 +GVCORD = none +SKIP = 0 +SCALE = 0 +GDPFUN = (quo(pxxm,25.4))!(quo(pxxm,25.4)) +TYPE = c/f!c +CINT = 0.1;0.25!0.25/0.5 +LINE = 32//1/0!32//1/0 +FINT = .01;.1;.25;.5;.75;1;1.25;1.5;1.75;2;2.25;2.5;2.75;3;3.25;3.5;3.75;4 +FLINE = 0;21-30;14-20;5 +HILO = 0!31;0/x#2/0.1-99//100;0/y +HLSYM = 0!1.5 +!CLRBAR = 1 +WIND = +TITLE = 5/-1/~ 12-HR TOTAL PRECIPITATION ! 0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 +GDATTIM= f12-last-06 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_24hr.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_24hr.attr index 57154fb50c..3c608cbe0c 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_24hr.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_24hr.attr @@ -3,26 +3,27 @@ ! ! Log: ! D.W.Plummer/NCEP 2/97 Initial creation -! D.W.Plummer/NCEP 8/97 Added FILTER parameter +! D.W.Plummer/NCEP 8/97 Added FILTER = parameter ! J. Carr/HPC 2/99 Removed the contour from type and left just fill ! Also changed the fint and time interval ! -GLEVEL=0 -GVCORD=none -SKIP= -FILTER=y -SCALE=0 -GDPFUN=p24i -TYPE=f -CINT= -LINE= -FINT=.01;.1;.25;.5;.75;1;1.25;1.5;1.75;2;2.5;3;4;5;6;7;8;9 -FLINE=0;21-30;14-20;5 -HILO=31;0/x#2/0.1-99//100;0/y -HLSYM=1.5 -WIND= -TITLE=5/-1/~ 24-HR TOTAL PRECIPITATION ! 0 -COLORS=2 -MARKER=2 -GRDLBL=5 -GDATTIM=f24-last-06 \ No newline at end of file +GLEVEL = 0 +GVCORD = none +SKIP = 0 +SCALE = 0 +GDPFUN = p24i +TYPE = f +CINT = +LINE = +FINT = .01;.1;.25;.5;.75;1;1.25;1.5;1.75;2;2.5;3;4;5;6;7;8;9 +FLINE = 0;21-30;14-20;5 +HILO = 31;0/x#2/0.1-99//100;0/y +HLSYM = 1.5 +!CLRBAR= 1 +WIND = +TITLE = 5/-1/~ 24-HR TOTAL PRECIPITATION ! 0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 +GDATTIM= f24-last-06 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_24hr_mm.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_24hr_mm.attr index b2d9bec302..68f8be3411 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_24hr_mm.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_24hr_mm.attr @@ -7,22 +7,23 @@ ! J. Carr/HPC 2/99 Removed the contour from type and left just fill ! Also changed the fint and time interval ! -GLEVEL=0 -GVCORD=none -SKIP= -FILTER=y -SCALE=0 -GDPFUN=p24m -TYPE=f -CINT= -LINE= -FINT=2;4;7;13;19;26;32;39;45;52;58;65;72;78;84;91;98;104 -FLINE=0;21-30;14-20;5 -HILO=31;0/x#/3-200//100;0/y -HLSYM=1.5 -WIND= -TITLE=5/-1/~ 24-HR TOTAL PRECIPITATION (MM)! 0 -COLORS=2 -MARKER=2 -GRDLBL=5 -GDATTIM=f24-last-06 \ No newline at end of file +GLEVEL = 0 +GVCORD = none +SKIP = 0 +SCALE = 0 +GDPFUN = p24m +TYPE = f +CINT = +LINE = +FINT = 2;4;7;13;19;26;32;39;45;52;58;65;72;78;84;91;98;104 +FLINE = 0;21-30;14-20;5 +HILO = 31;0/x#/3-200//100;0/y +HLSYM = 1.5 +!CLRBAR= 1 +WIND = +TITLE = 5/-1/~ 24-HR TOTAL PRECIPITATION (MM)! 0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 +GDATTIM= f24-last-06 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_3-day.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_3-day.attr index 7bed61c623..43835d4e74 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_3-day.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_3-day.attr @@ -3,26 +3,27 @@ ! ! Log: ! D.W.Plummer/NCEP 2/97 Initial creation -! D.W.Plummer/NCEP 8/97 Added FILTER parameter -! D.W.Plummer/NCEP 8/97 Changed TEXT size 1.2 to 1 +! D.W.Plummer/NCEP 8/97 Added FILTER = parameter ! J. Carr/HPC 2/99 Removed the contour from type and left just fill ! -GLEVEL=0 -GVCORD=none -SKIP= -FILTER=y -SCALE=0 -GDPFUN=p72i -TYPE=f -CINT= -LINE= -FINT=.01;.1;.25;.5;.75;1;1.5;2;2.5;3;4;5;6;7;8;9;10 -FLINE=0;21-30;14-20;5 -HILO=31;0/x#2/0.1-99//100;0/y -HLSYM=1.5 -WIND= -TITLE=5/-1/3-day (F72-F144) PCPN ! 0 -COLORS=2 -MARKER=2 -GRDLBL=5 -GDATTIM=F144 \ No newline at end of file +GLEVEL = 0 +GVCORD = none +SKIP = 0 +SCALE = 0 +GDPFUN = p72i +TYPE = f +CINT = +LINE = +FINT = .01;.1;.25;.5;.75;1;1.5;2;2.5;3;4;5;6;7;8;9;10 +FLINE = 0;21-30;14-20;5 +HILO = 31;0/x#2/0.1-99//100;0/y +HLSYM = 1.5 +!CLRBAR= 1/V/LL!0 +WIND = +TITLE = 5/-1/3-day (F72-F144) PCPN ! 0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 +GDATTIM= f72-last-06 + diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_3hr_emsl.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_3hr_emsl.attr index 599055c37c..789269991c 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_3hr_emsl.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_3hr_emsl.attr @@ -12,7 +12,7 @@ GVCORD=none SKIP= FILTER=y SCALE=0 -GDPFUN=p03i!sm5s(emsl) +GDPFUN=p03i!sm5s(mul(1e-2,emsl)) TYPE=f !c CINT=!4 LINE=!5/1/1/0 @@ -25,4 +25,4 @@ TITLE=5/-1/~ 3-HR TOTAL PRECIPITATION, MSLP (ETA REDUCTION)!0 COLORS=2 MARKER=2 GRDLBL=5 -GDATTIM=f03-LAST-3 \ No newline at end of file +GDATTIM=f03-LAST-3 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_3hr_rap.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_3hr_rap.attr new file mode 100644 index 0000000000..ba34537ff1 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_3hr_rap.attr @@ -0,0 +1,28 @@ +! +! Restore File : precip_3hr +! +! Log: +! D.W.Plummer/NCEP 2/97 Initial creation +! D.W.Plummer/NCEP 8/97 Added FILTER = parameter +! J. Carr/HPC 2/99 Removed the contour from type and left just fill +! Also changed the fint and time interval +! +GLEVEL = 0 +GVCORD = none +SKIP = 0 +SCALE = 0 +GDPFUN = p03i +TYPE = f +CINT = +LINE = +FINT = .01;.1;.25;.5;.75;1;1.25;1.5;1.75;2;2.5;3;4;5;6;7;8;9 +FLINE = 0;21-30;14-20;5 +HILO = 31;0/x#2/0.1-99//100;0/y +HLSYM = 1.5 +!CLRBAR = 1 +WIND = +TITLE = 5/-1/~ 3hr TOTAL PRECIPITATION (IN) +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_4-day.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_4-day.attr index a16263aba0..96a226710d 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_4-day.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_4-day.attr @@ -3,26 +3,26 @@ ! ! Log: ! D.W.Plummer/NCEP 2/97 Initial creation -! D.W.Plummer/NCEP 8/97 Added FILTER parameter -! D.W.Plummer/NCEP 8/97 Changed TEXT size 1.2 to 1 +! D.W.Plummer/NCEP 8/97 Added FILTER = parameter ! J. Carr/HPC 2/99 Removed the contour from type and left just fill ! -GLEVEL=0 -GVCORD=none -SKIP= -FILTER=y -SCALE=0 -GDPFUN=p96i -TYPE=f -CINT= -LINE= -FINT=.01;.1;.25;.5;.75;1;1.5;2;2.5;3;4;5;6;7;8;9;10 -FLINE=0;21-30;14-20;5 -HILO=31;0/x#2/0.1-99//100;0/y -HLSYM=1.5 -WIND= -TITLE=5/-1/~ 4-day (F24-F120) PCPN!0 -COLORS=2 -MARKER=2 -GRDLBL=5 -GDATTIM=f120 \ No newline at end of file +GLEVEL = 0 +GVCORD = none +SKIP = 0 +SCALE = 0 +GDPFUN = p96i +TYPE = f +CINT = +LINE = +FINT = .01;.1;.25;.5;.75;1;1.5;2;2.5;3;4;5;6;7;8;9;10 +FLINE = 0;21-30;14-20;5 +HILO = 31;0/x#2/0.1-99//100;0/y +HLSYM = 1.5 +!CLRBAR= 1/V/LL!0 +WIND = +TITLE = 5/-1/~ 4-day (F24-F120) PCPN!0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 +GDATTIM= f96-last-06 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_48hr.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_48hr.attr index 0263e65ecb..a8e86fe40b 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_48hr.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_48hr.attr @@ -3,26 +3,27 @@ ! ! Log: ! D.W.Plummer/NCEP 2/97 Initial creation -! D.W.Plummer/NCEP 8/97 Added FILTER parameter +! D.W.Plummer/NCEP 8/97 Added FILTER = parameter ! J. Carr/HPC 2/99 Removed the contour from type and left just fill ! Also changed the fint, gdpfun parameter to p48i ! -GLEVEL=0 -GVCORD=none -SKIP= -FILTER=y -SCALE=0 -GDPFUN=p48i -TYPE=f -CINT= -LINE= -FINT=.01;.1;.25;.5;.75;1;1.25;1.5;1.75;2;2.5;3;4;5;6;7;8;9 -FLINE=0;21-30;14-20;5 -HILO=31;0/x#2/0.1-99//100;0/y -HLSYM=1.5 -WIND= -TITLE=5/-1/~ 48-HR TOTAL PRECIPITATION!0 -COLORS=2 -MARKER=2 -GRDLBL=5 -GDATTIM=f48 \ No newline at end of file +GLEVEL = 0 +GVCORD = none +SKIP = 0 +SCALE = 0 +GDPFUN = p48i +TYPE = f +CINT = +LINE = +FINT = .01;.1;.25;.5;.75;1;1.25;1.5;1.75;2;2.5;3;4;5;6;7;8;9 +FLINE = 0;21-30;14-20;5 +HILO = 31;0/x#2/0.1-99//100;0/y +HLSYM = 1.5 +!CLRBAR= 1 +WIND = +TITLE = 5/-1/~ 48-HR TOTAL PRECIPITATION!0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 +GDATTIM=f48-last-06 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_5-day.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_5-day.attr index 1b1bf105a6..230ac3d359 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_5-day.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_5-day.attr @@ -3,27 +3,27 @@ ! ! Log: ! D.W.Plummer/NCEP 2/97 Initial creation -! D.W.Plummer/NCEP 8/97 Added FILTER parameter -! D.W.Plummer/NCEP 8/97 Changed TEXT size from 1.2 to 1 +! D.W.Plummer/NCEP 8/97 Added FILTER = parameter ! J. Carr/HPC 2/99 Removed the contour from type and left just fill ! J. Carr/HPC 11/99 Changed gdattim from f144 to f120-last-12 ! -GLEVEL=0 -GVCORD=none -SKIP= -FILTER=y -SCALE=0 -GDPFUN=p120i -TYPE=f -CINT= -LINE= -FINT=.01;.1;.25;.5;.75;1;1.5;2;2.5;3;4;5;6;7;8;9;10 -FLINE=0;21-30;14-20;5 -HILO=31;0/x#2/0.1-99//100;0/y -HLSYM=1.5 -WIND= -TITLE=5/-1/~ 5-day (120-HR) PCPN!0 -COLORS=2 -MARKER=2 -GRDLBL=5 -GDATTIM=f120-last-12 \ No newline at end of file +GLEVEL = 0 +GVCORD = none +SKIP = 0 +SCALE = 0 +GDPFUN = p120i +TYPE = f +CINT = +LINE = +FINT = .01;.1;.25;.5;.75;1;1.5;2;2.5;3;4;5;6;7;8;9;10 +FLINE = 0;21-30;14-20;5 +HILO = 31;0/x#2/0.1-99//100;0/y +HLSYM = 1.5 +!CLRBAR= 1/V/LL!0 +WIND = +TITLE = 5/-1/~ 5-day (120-HR) PCPN!0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 +GDATTIM= f120-last-06 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_54hr.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_54hr.attr index 2fb3732a55..dfc77e985d 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_54hr.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_54hr.attr @@ -3,26 +3,27 @@ ! ! Log: ! J. Carr 5/29/97 Initial creation -! D.W.Plummer/NCEP 8/97 Added FILTER parameter +! D.W.Plummer/NCEP 8/97 Added FILTER = parameter ! J. Carr/HPC 2/99 Removed the contour from type and left just fill ! Also changed the fint ! -GLEVEL=0 -GVCORD=none -SKIP= -FILTER=y -SCALE=0 -GDPFUN=p54i -TYPE=f -CINT= -LINE= -FINT=.01;.1;.25;.5;.75;1;1.25;1.5;1.75;2;2.5;3;4;5;6;7;8;9 -FLINE=0;21-30;14-20;5 -HILO=31;0/x#2/0.1-99//100;0/y -HLSYM=1.5 -WIND= -TITLE=5/-1/~ 54-HR TOTAL PRECIPITATION ! 0 -COLORS=2 -MARKER=2 -GRDLBL=5 -GDATTIM=f54-last-06 \ No newline at end of file +GLEVEL = 0 +GVCORD = none +SKIP = 0 +SCALE = 0 +GDPFUN = p54i +TYPE = f +CINT = +LINE = +FINT = .01;.1;.25;.5;.75;1;1.25;1.5;1.75;2;2.5;3;4;5;6;7;8;9 +FLINE = 0;21-30;14-20;5 +HILO = 31;0/x#2/0.1-99//100;0/y +HLSYM = 1.5 +!CLRBAR= 1 +WIND = +TITLE = 5/-1/~ 54-HR TOTAL PRECIPITATION ! 0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 +GDATTIM= f54-last-06 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_60hr.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_60hr.attr index 38e9fda33b..f7acc13b22 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_60hr.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_60hr.attr @@ -3,26 +3,27 @@ ! ! Log: ! Joe Carr/HPC 8/97 Initial creation -! D.W.Plummer/NCEP 8/97 Added FILTER parameter +! D.W.Plummer/NCEP 8/97 Added FILTER = parameter ! J. Carr/HPC 2/99 Removed the contour from type and left just fill ! Also changed the fint ! -GLEVEL=0 -GVCORD=none -SKIP= -FILTER=y -SCALE=0 -GDPFUN=p60i -TYPE=f -CINT= -LINE= -FINT=.01;.1;.25;.5;.75;1;1.25;1.5;1.75;2;2.5;3;4;5;6;7;8;9 -FLINE=0;21-30;14-20;5 -HILO=31;0/x#2/0.1-99//100;0/y -HLSYM=1.5 -WIND= -TITLE=5/-1/~ 60-HR TOTAL PRECIPITATION ! 0 -COLORS=2 -MARKER=2 -GRDLBL=5 -GDATTIM=f60-last-06 \ No newline at end of file +GLEVEL = 0 +GVCORD = none +SKIP = 0 +SCALE = 0 +GDPFUN = p60i +TYPE = f +CINT = +LINE = +FINT = .01;.1;.25;.5;.75;1;1.25;1.5;1.75;2;2.5;3;4;5;6;7;8;9 +FLINE = 0;21-30;14-20;5 +HILO = 31;0/x#2/0.1-99//100;0/y +HLSYM = 1.5 +!CLRBAR= 1 +WIND = +TITLE = 5/-1/~ 60-HR TOTAL PRECIPITATION ! 0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 +GDATTIM= f60-last-06 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_66hr.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_66hr.attr index ea1401ca63..8d5fb31f08 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_66hr.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_66hr.attr @@ -6,22 +6,23 @@ ! J. Carr/HPC 2/99 Removed the contour from type and left just fill ! Also changed the fint. ! -GLEVEL=0 -GVCORD=none -SKIP= -FILTER=y -SCALE=0 -GDPFUN=p66i -TYPE=f -CINT= -LINE= -FINT=.01;.1;.25;.5;.75;1;1.25;1.5;1.75;2;2.5;3;4;5;6;7;8;9 -FLINE=0;21-30;14-20;5 -HILO=31;0/x#2/0.1-99//100;0/y -HLSYM=1.5 -WIND= -TITLE=5/-1/~ 66-HR TOTAL PRECIPITATION ! 0 -COLORS=2 -MARKER=2 -GRDLBL=5 -GDATTIM=f66-last-06 \ No newline at end of file +GLEVEL = 0 +GVCORD = none +SKIP = 0 +SCALE = 0 +GDPFUN = p66i +TYPE = f +CINT = +LINE = +FINT = .01;.1;.25;.5;.75;1;1.25;1.5;1.75;2;2.5;3;4;5;6;7;8;9 +FLINE = 0;21-30;14-20;5 +HILO = 31;0/x#2/0.1-99//100;0/y +HLSYM = 1.5 +!CLRBAR= 1 +WIND = +TITLE = 5/-1/~ 66-HR TOTAL PRECIPITATION ! 0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 +GDATTIM= f66-last-06 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_6hr.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_6hr.attr index 29855be132..e092cd2922 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_6hr.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_6hr.attr @@ -3,7 +3,7 @@ ! ! Log: ! D.W.Plummer/NCEP 2/97 Initial creation -! D.W.Plummer/NCEP 8/97 Added FILTER parameter +! D.W.Plummer/NCEP 8/97 Added FILTER = parameter ! J. Carr/HPC 2/99 Removed the contour from type and left just fill ! Also changed the fint ! J. Carr/HPC 8/99 Changed gdattim to fall so that all model times would show up @@ -12,22 +12,23 @@ ! what the forecasters need to do their job. Changed title to ! eliminate the hat symbol. ! -GLEVEL=0 -GVCORD=none -SKIP= -FILTER=y -SCALE=0 -GDPFUN=p06i -TYPE=f -CINT= -LINE= -FINT=.01;.1;.25;.5;.75;1;1.25;1.5;1.75;2;2.5;3;4;5;6;7;8;9 -FLINE=0;21-30;14-20;5 -HILO=31;0/x#2/0.1-99//100;0/y -HLSYM=1.5 -WIND= -TITLE=5/-1/~ 6hr TOTAL PRECIPITATION (IN) -COLORS=2 -MARKER=2 -GRDLBL=5 -GDATTIM=fall \ No newline at end of file +GLEVEL = 0 +GVCORD = none +SKIP = 0 +SCALE = 0 +GDPFUN = p06i +TYPE = f +CINT = +LINE = +FINT = .01;.1;.25;.5;.75;1;1.25;1.5;1.75;2;2.5;3;4;5;6;7;8;9 +FLINE = 0;21-30;14-20;5 +HILO = 31;0/x#2/0.1-99//100;0/y +HLSYM = 1.5 +!CLRBAR= 1 +WIND = +TITLE = 5/-1/~ 6hr TOTAL PRECIPITATION (IN) +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 +GDATTIM= f06-last-06 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_6hr_1000-500_thkn.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_6hr_1000-500_thkn.attr index b019453928..e886a60d34 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_6hr_1000-500_thkn.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_6hr_1000-500_thkn.attr @@ -13,7 +13,7 @@ GVCORD=none!pres !pres !none SKIP= FILTER=y SCALE=0 !-1 !-1 !0 -GDPFUN=p06i!sm5s(ldf(hght))!sm5s(ldf(hght))!sm5s(pmsl) +GDPFUN=p06i!sm5s(ldf(hght))!sm5s(ldf(hght))!sm5s(mul(1e-2,pmsl)) TYPE=f !c CINT=!3/0/540 !3/543/1000 !4 LINE=!4/5/2 !2/5/2 !5//1 @@ -26,4 +26,4 @@ TITLE=1/-1/~ 6-H TOTAL PRECIPITATION, PMSL, 1000-500mb THICKNESS!0 COLORS=2 MARKER=2 GRDLBL=5 -GDATTIM=f06-LAST-6 \ No newline at end of file +GDATTIM=f06-LAST-6 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_6hr_emsl.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_6hr_emsl.attr index 239b94c056..a9ea318e4d 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_6hr_emsl.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_6hr_emsl.attr @@ -12,7 +12,7 @@ GVCORD=none SKIP= FILTER=y SCALE=0 -GDPFUN=p06i!sm5s(emsl) +GDPFUN=p06i!sm5s(mul(1e-2,emsl)) TYPE=f !c CINT=!4 LINE=!5/1/1/0 @@ -25,4 +25,4 @@ TITLE=5/-1/~ 6-HOUR TOTAL PRECIPITATION, MSLP (ETA REDUCTION)!0 COLORS=2 MARKER=2 GRDLBL=5 -GDATTIM=f06-LAST-6 \ No newline at end of file +GDATTIM=f06-LAST-6 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_6hr_emsl_rap.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_6hr_emsl_rap.attr new file mode 100644 index 0000000000..fa760c8cdc --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_6hr_emsl_rap.attr @@ -0,0 +1,28 @@ +! +! Restore File : precip_6hr_mul(1e-2,emsl) +! +! Log: +! D.W.Plummer/NCEP 2/97 Initial creation +! D.W.Plummer/NCEP 8/97 Added FILTER = parameter +! J. Carr/HPC 2/99 Removed the contour from type and left just fill +! Also changed the fint +! +GLEVEL = 0 +GVCORD = none +SKIP = 0 +SCALE = 0 +GDPFUN = p06i!sm5s(mul(1e-2,emsl)) +TYPE = f !c +CINT = !4 +LINE = !5/1/1/0 +FINT = .01;.1;.25;.5;.75;1;1.25;1.5;1.75;2;2.5;3;4;5;6;7;8;9 +FLINE = 0;21-30;14-20;5 +HILO = !26;2/H#;L#//6/20;20/y +HLSYM = !2;1.5//21//hw +!CLRBAR = 1 +WIND = +TITLE = 5/-1/~ 6-HOUR TOTAL PRECIPITATION, MSLP (ETA REDUCTION)!0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_6hr_mdl_topography.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_6hr_mdl_topography.attr index 766571844b..322ddaf065 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_6hr_mdl_topography.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_6hr_mdl_topography.attr @@ -10,7 +10,7 @@ GVCORD=none SKIP= FILTER=y SCALE=0 -GDPFUN=quo(p06m);25.4)//p06!p06!sm5s(pmsl)!hght +GDPFUN=quo(p06m);25.4)//p06!p06!sm5s(mul(1e-2,pmsl))!hght TYPE=c/f!c!c!c CINT=0.1;0.25!0.25/0.5!4!200/200 LINE=32//1/0!32//1/0!5/1/1!18/1/1/3 @@ -23,4 +23,4 @@ TITLE=5/-1/~ 6-HR TOTAL PCPN, MSLP, MDL TOPOGRAPHY!0 COLORS=2 MARKER=2 GRDLBL=5 -GDATTIM=f06-LAST-6 \ No newline at end of file +GDATTIM=f06-LAST-6 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_6hr_mslp.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_6hr_mslp.attr index 3ecf55460f..cb3ea81487 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_6hr_mslp.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_6hr_mslp.attr @@ -3,26 +3,27 @@ ! ! Log: ! D.W.Plummer/NCEP 2/97 Initial creation -! D.W.Plummer/NCEP 8/97 Added FILTER parameter +! D.W.Plummer/NCEP 8/97 Added FILTER = parameter ! J. Carr/HPC 2/99 Removed the contour from type and left just fill ! Also changed the fint ! -GLEVEL=0 -GVCORD=none -SKIP= -FILTER=y -SCALE=0 -GDPFUN=p06i !sm5s(pmsl) -TYPE=f !c -CINT=!4 -LINE=!5/1/1/0 -FINT=.01;.1;.25;.5;.75;1;1.25;1.5;1.75;2;2.5;3;4;5;6;7;8;9 -FLINE=0;21-30;14-20;5 -HILO=!26;2////30;30/y -HLSYM=!2;1.5//21//hw -WIND= -TITLE=5/-1/~ 6-HOUR TOTAL PCPN, MSLP!0 -COLORS=2 -MARKER=2 -GRDLBL=5 -GDATTIM=f06-LAST-6 \ No newline at end of file +GLEVEL = 0 +GVCORD = none +SKIP = 0 +SCALE = 0 +GDPFUN = p06i !sm5s(mul(1e-2,pmsl)) +TYPE = f !c +CINT = !4 +LINE = !5/1/1/0 +FINT = .01;.1;.25;.5;.75;1;1.25;1.5;1.75;2;2.5;3;4;5;6;7;8;9 +FLINE = 0;21-30;14-20;5 +HILO = !26;2////30;30/y +HLSYM = !2;1.5//21//hw +!CLRBAR= 1 +WIND = +TITLE = 5/-1/~ 6-HOUR TOTAL PCPN, MSLP!0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 +GDATTIM= f06-last-06 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_6hr_mslp_rap.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_6hr_mslp_rap.attr new file mode 100644 index 0000000000..be063a18db --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_6hr_mslp_rap.attr @@ -0,0 +1,28 @@ +! +! Restore File : precip_6hr_mslp +! +! Log: +! D.W.Plummer/NCEP 2/97 Initial creation +! D.W.Plummer/NCEP 8/97 Added FILTER = parameter +! J. Carr/HPC 2/99 Removed the contour from type and left just fill +! Also changed the fint +! +GLEVEL = 0 +GVCORD = none +SKIP = 0 +SCALE = 0 +GDPFUN = p06i !sm5s(mul(1e-2,pmsl)) +TYPE = f !c +CINT = !4 +LINE = !5/1/1/0 +FINT = .01;.1;.25;.5;.75;1;1.25;1.5;1.75;2;2.5;3;4;5;6;7;8;9 +FLINE = 0;21-30;14-20;5 +HILO = !26;2////30;30/y +HLSYM = !2;1.5//21//hw +!CLRBAR = 1 +WIND = +TITLE = 5/-1/~ 6-HOUR TOTAL PCPN, MSLP!0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_6hr_mslp_sfchght.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_6hr_mslp_sfchght.attr index 79cc0574c5..9dfb094810 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_6hr_mslp_sfchght.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_6hr_mslp_sfchght.attr @@ -3,26 +3,27 @@ ! ! Log: ! D.W.Plummer/NCEP 2/97 Initial creation -! D.W.Plummer/NCEP 8/97 Added FILTER parameter +! D.W.Plummer/NCEP 8/97 Added FILTER = parameter ! J. Carr/HPC 2/99 Removed the contour from type and left just fill ! Also changed the fint. Changed mm to p06i ! -GLEVEL=0 -GVCORD=none -SKIP= -FILTER=y -SCALE=0 -GDPFUN=p06i!sm5s(pmsl)!sm5s(hght) -TYPE=f !c !c -CINT=!4 !200/200 -LINE=!5/1/1 !18/1/1/3 -FINT=.01;.1;.25;.5;.75;1;1.25;1.5;1.75;2;2.5;3;4;5;6;7;8;9 -FLINE=0;21-30;14-20;5 -HILO=31;0/x#2/0.1-99//100;0/y!5/H#;L#/1020-1070;900-1012!0 -HLSYM=1.5!1;1//22;22/2;2/hw!0 -WIND= -TITLE=5/-1/~ 6-HR TOTAL PCPN, MSLP, MDL TOPOGRAPHY!0 -COLORS=2 -MARKER=2 -GRDLBL=5 -GDATTIM=f06-LAST-6 \ No newline at end of file +GLEVEL = 0 +GVCORD = none +SKIP = 0 +SCALE = 0 +GDPFUN = p06i!sm5s(mul(1e-2,pmsl))!sm5s(hght) +TYPE = f !c !c +CINT = !4 !200/200 +LINE = !5/1/1 !18/1/1/3 +FINT = .01;.1;.25;.5;.75;1;1.25;1.5;1.75;2;2.5;3;4;5;6;7;8;9 +FLINE = 0;21-30;14-20;5 +HILO = 31;0/x#2/0.1-99//100;0/y!5/H#;L#/1020-1070;900-1012!0 +HLSYM = 1.5!1;1//22;22/2;2/hw!0 +!CLRBAR= 1 +WIND = +TITLE = 5/-1/~ 6-HR TOTAL PCPN, MSLP, MDL TOPOGRAPHY!0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 +GDATTIM= f06-last-06 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_6hr_mslp_sfchght_rap.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_6hr_mslp_sfchght_rap.attr new file mode 100644 index 0000000000..a3dbd9e18a --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_6hr_mslp_sfchght_rap.attr @@ -0,0 +1,28 @@ +! +! Restore File : precip_6hr_mslp_sfchght +! +! Log: +! D.W.Plummer/NCEP 2/97 Initial creation +! D.W.Plummer/NCEP 8/97 Added FILTER = parameter +! J. Carr/HPC 2/99 Removed the contour from type and left just fill +! Also changed the fint. Changed mm to p06i +! +GLEVEL = 0 +GVCORD = none +SKIP = 0 +SCALE = 0 +GDPFUN = p06i!sm5s(mul(1e-2,pmsl))!sm5s(hght) +TYPE = f !c !c +CINT = !4 !200/200 +LINE = !5/1/1 !18/1/1/3 +FINT = .01;.1;.25;.5;.75;1;1.25;1.5;1.75;2;2.5;3;4;5;6;7;8;9 +FLINE = 0;21-30;14-20;5 +HILO = 31;0/x#2/0.1-99//100;0/y!5/H#;L#/1020-1070;900-1012!0 +HLSYM = 1.5!1;1//22;22/2;2/hw!0 +!CLRBAR = 1 +WIND = +TITLE = 5/-1/~ 6-HR TOTAL PCPN, MSLP, MDL TOPOGRAPHY!0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_6hr_mslphilo.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_6hr_mslphilo.attr index d7786b3201..0f75a1476b 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_6hr_mslphilo.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_6hr_mslphilo.attr @@ -3,26 +3,27 @@ ! ! Log: ! D.W.Plummer/NCEP 2/97 Initial creation -! D.W.Plummer/NCEP 8/97 Added FILTER parameter +! D.W.Plummer/NCEP 8/97 Added FILTER = parameter ! J. Carr/HPC 2/99 Removed the contour from type and left just fill ! Also changed the fint. Changed p06m to p06i ! -GLEVEL=0 -GVCORD=none -SKIP= -FILTER=y -SCALE=0 -GDPFUN=p06i!sm5s(pmsl) -TYPE=f !c -CINT=!4 -LINE=!17/1/2 -FINT=.01;.1;.25;.5;.75;1;1.25;1.5;1.75;2;2.5;3;4;5;6;7;8;9 -FLINE=0;21-30;14-20;5 -HILO=31;0/x#2/0.1-99//100;0/y!17/H#;L# -HLSYM=1.5 !1;1//22;22/2;2/hw -WIND= -TITLE=5/-1/~ 6-HR TOTAL PCPN, MSLP!0 -COLORS=2 -MARKER=2 -GRDLBL=5 -GDATTIM=f06-LAST-6 \ No newline at end of file +GLEVEL = 0 +GVCORD = none +SKIP = 0 +SCALE = 0 +GDPFUN = p06i!sm5s(mul(1e-2,pmsl)) +TYPE = f !c +CINT = !4 +LINE = !17/1/2 +FINT = .01;.1;.25;.5;.75;1;1.25;1.5;1.75;2;2.5;3;4;5;6;7;8;9 +FLINE = 0;21-30;14-20;5 +HILO = 31;0/x#2/0.1-99//100;0/y!17/H#;L# +HLSYM = 1.5 !1;1//22;22/2;2/hw +!CLRBAR= 1 +WIND = +TITLE = 5/-1/~ 6-HR TOTAL PCPN, MSLP!0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 +GDATTIM= f06-last-06 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_6hr_mslphilo_rap.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_6hr_mslphilo_rap.attr new file mode 100644 index 0000000000..cbc28f1adc --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_6hr_mslphilo_rap.attr @@ -0,0 +1,28 @@ +! +! Restore File : precip_6hr_mslphilo +! +! Log: +! D.W.Plummer/NCEP 2/97 Initial creation +! D.W.Plummer/NCEP 8/97 Added FILTER = parameter +! J. Carr/HPC 2/99 Removed the contour from type and left just fill +! Also changed the fint. Changed p06m to p06i +! +GLEVEL = 0 +GVCORD = none +SKIP = 0 +SCALE = 0 +GDPFUN = p06i!sm5s(mul(1e-2,pmsl)) +TYPE = f !c +CINT = !4 +LINE = !17/1/2 +FINT = .01;.1;.25;.5;.75;1;1.25;1.5;1.75;2;2.5;3;4;5;6;7;8;9 +FLINE = 0;21-30;14-20;5 +HILO = 31;0/x#2/0.1-99//100;0/y!17/H#;L# +HLSYM = 1.5 !1;1//22;22/2;2/hw +!CLRBAR = 1 +WIND = +TITLE = 5/-1/~ 6-HR TOTAL PCPN, MSLP!0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_6hr_rap.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_6hr_rap.attr new file mode 100644 index 0000000000..ff540dd414 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_6hr_rap.attr @@ -0,0 +1,33 @@ +! +! Restore File : precip_6hr +! +! Log: +! D.W.Plummer/NCEP 2/97 Initial creation +! D.W.Plummer/NCEP 8/97 Added FILTER = parameter +! J. Carr/HPC 2/99 Removed the contour from type and left just fill +! Also changed the fint +! J. Carr/HPC 8/99 Changed gdattim to fall so that all model times would show up +! for 6-hr pcpn on the eta offtime runs and ruc2. This will mean +! the first image in the loop will always be blank, but this is +! what the forecasters need to do their job. Changed title to +! eliminate the hat symbol. +! +GLEVEL = 0 +GVCORD = none +SKIP = 0 +SCALE = 0 +GDPFUN = p06i +TYPE = f +CINT = +LINE = +FINT = .01;.1;.25;.5;.75;1;1.25;1.5;1.75;2;2.5;3;4;5;6;7;8;9 +FLINE = 0;21-30;14-20;5 +HILO = 31;0/x#2/0.1-99//100;0/y +HLSYM = 1.5 +!CLRBAR = 1 +WIND = +TITLE = 5/-1/~ 6hr TOTAL PRECIPITATION (IN) +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_72hr.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_72hr.attr index 8bf04684c4..783d9f087e 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_72hr.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_72hr.attr @@ -3,26 +3,27 @@ ! ! Log: ! D.W.Plummer/NCEP 2/97 Initial creation -! D.W.Plummer/NCEP 8/97 Added FILTER parameter +! D.W.Plummer/NCEP 8/97 Added FILTER = parameter ! J. Carr/HPC 2/99 Removed the contour from type and left just fill ! Also changed the fint. Changed gdattim and title line. ! -GLEVEL=0 -GVCORD=none -SKIP= -FILTER=y -SCALE=0 -GDPFUN=p72i -TYPE=f -CINT= -LINE= -FINT=.01;.1;.25;.5;.75;1;1.25;1.5;1.75;2;2.5;3;4;5;6;7;8;9 -FLINE=0;21-30;14-20;5 -HILO=31;0/x#2/0.1-99//100;0/y -HLSYM=1.5 -WIND= -TITLE=5/-1/~ 72-HR TOTAL PRECIPITATION!0 -COLORS=2 -MARKER=2 -GRDLBL=5 -GDATTIM=f72-last-06 \ No newline at end of file +GLEVEL = 0 +GVCORD = none +SKIP = 0 +SCALE = 0 +GDPFUN = p72i +TYPE = f +CINT = +LINE = +FINT = .01;.1;.25;.5;.75;1;1.25;1.5;1.75;2;2.5;3;4;5;6;7;8;9 +FLINE = 0;21-30;14-20;5 +HILO = 31;0/x#2/0.1-99//100;0/y +HLSYM = 1.5 +!CLRBAR= 1 +WIND = +TITLE = 5/-1/~ 72-HR TOTAL PRECIPITATION!0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 +GDATTIM= f72-last-06 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_78hr.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_78hr.attr index 0a3235f068..e5d4fc7fd5 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_78hr.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_78hr.attr @@ -3,26 +3,27 @@ ! ! Log: ! D.W.Plummer/NCEP 2/97 Initial creation -! D.W.Plummer/NCEP 8/97 Added FILTER parameter +! D.W.Plummer/NCEP 8/97 Added FILTER = parameter ! J. Carr/HPC 2/99 Removed the contour from type and left just fill ! Also changed the fint. Changed gdattim and title line. ! -GLEVEL=0 -GVCORD=none -SKIP= -FILTER=y -SCALE=0 -GDPFUN=p78i -TYPE=f -CINT= -LINE= -FINT=.01;.1;.25;.5;.75;1;1.25;1.5;1.75;2;2.5;3;4;5;6;7;8;9 -FLINE=0;21-30;14-20;5 -HILO=31;0/x#2/0.1-99//100;0/y -HLSYM=1.5 -WIND= -TITLE=5/-1/~ 78-HR TOTAL PRECIPITATION!0 -COLORS=2 -MARKER=2 -GRDLBL=5 -GDATTIM=f78 \ No newline at end of file +GLEVEL = 0 +GVCORD = none +SKIP = 0 +SCALE = 0 +GDPFUN = p78i +TYPE = f +CINT = +LINE = +FINT = .01;.1;.25;.5;.75;1;1.25;1.5;1.75;2;2.5;3;4;5;6;7;8;9 +FLINE = 0;21-30;14-20;5 +HILO = 31;0/x#2/0.1-99//100;0/y +HLSYM = 1.5 +!CLRBAR= 1 +WIND = +TITLE = 5/-1/~ 78-HR TOTAL PRECIPITATION!0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 +GDATTIM= f78-last-06 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_type_12hr_amounts.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_type_12hr_amounts.attr index 4c68bf3029..2eea639725 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_type_12hr_amounts.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_type_12hr_amounts.attr @@ -24,3 +24,4 @@ TITLE=1/-2/~ 12-HR PCPN BY TYPE (INST)|~ 12-HR PCPN BY TYPE!0 COLORS=2 MARKER=2 GRDLBL=5 +GDATTIM=f12-last-06 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_type_24hr_amounts.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_type_24hr_amounts.attr index bbac2d91bb..961b760249 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_type_24hr_amounts.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_type_24hr_amounts.attr @@ -23,3 +23,4 @@ TITLE=1/-2/~ 24-HR PCPN BY TYPE (INST)|~ 24-HR PCPN BY TYPE!0 COLORS=2 MARKER=2 GRDLBL=5 +GDATTIM=f24-last-06 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_type_48hr_amounts.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_type_48hr_amounts.attr index 7afcbcd99c..3cadd102dd 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_type_48hr_amounts.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_type_48hr_amounts.attr @@ -23,3 +23,4 @@ TITLE=1/-2/~ 48-HR PCPN BY TYPE (INST)|~ 48-HR PCPN BY TYPE!0 COLORS=2 MARKER=2 GRDLBL=5 +GDATTIM=f48-last-06 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_type_6hr_amounts.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_type_6hr_amounts.attr index d4e02ffc11..81ee01f678 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_type_6hr_amounts.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_type_6hr_amounts.attr @@ -23,3 +23,4 @@ TITLE=1/-2/~ ETA 6-HR PCPN BY TYPE (INST)|~ 6-HR PCPN BY TYPE!0 COLORS=2 MARKER=2 GRDLBL=5 +GDATTIM=f06-last-06 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_type_global.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_type_global.attr new file mode 100644 index 0000000000..58f1b338e9 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_type_global.attr @@ -0,0 +1,25 @@ +! +! Restore File : precip_type +! +! Log: +! J. Carr/HPC 03/00 Initial creation +! +GLEVEL = 0 !0 !0 !0 +GVCORD = none !none !none !none +SKIP = 0/1 +SCALE = 2 !2 !2 !2 +GDPFUN = sm5s(WXTr06)!sm5s(WXTs06)!sm5s(WXTp06)!sm5s(WXTz06) +TYPE = c/f !c/f !c/f !c/f +LINE = 22/1/2/0 !4/1/2/0 !7/1/2/0 !2/1/2/0 +CINT = 50;200 !50;200 !50;200 !50;200 +FINT = 50;200 !50;200 !50;200 !50;200 +FLINE = 0;23;23 !0;25;25 !0;30;30 !0;15;15 +HILO = 0 +HLSYM = 0 +!CLRBAR= 0 +WIND = 9/0.7/2/112 +TITLE = 1/-2/~ PCPN TYPE =|~PCPN TYPE AND VV!0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_type_vv.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_type_vv.attr index 4217642861..4d2f03d5d5 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_type_vv.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_type_vv.attr @@ -14,7 +14,7 @@ GLEVEL=0 !0 !0 !0 !700:500!4700:10000 GVCORD=none!none!none!none!PRES !sgma SKIP= FILTER=y -SCALE=2 !2 !2 !2 !3 !0 +SCALE=2 !2 !2 !2 !1 !0 GDPFUN=sm5s(WXTr)!sm5s(WXTs)!sm5s(WXTp)!sm5s(WXTz)!sm9s(lav(omeg))!sm9s(relh) TYPE=f !f !f !f !c !c LINE=! ! ! !11/1/2 !4/1/2 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_type_vv_global.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_type_vv_global.attr new file mode 100644 index 0000000000..6e0d01a1f3 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_type_vv_global.attr @@ -0,0 +1,26 @@ +! +! Restore File : precip_type_vv +! +! Log: +! J. Carr/HPC 12/99 Initial creation +! T. Lee/SAIC 02/04 changed AVN to GFS +! +GLEVEL = 0!0!0!0!700:500 !4400:10000 +GVCORD = none!none!none!none!PRES!sgma +SKIP = 0/1 +SCALE = 2!2!2!2!1!0 +GDPFUN = sm5s(WXTr06)!sm5s(WXTs06)!sm5s(WXTp06)!sm5s(WXTz06)!sm9s(lav(omeg))!sm9s(relh) +TYPE = c/f!c/f!c/f!c/f!c!c +LINE = 22/1/2/0!4/1/2/0!7/1/2/0!2/1/2/0!6/1/3!21/1/3 +CINT = 50;200!50;200!50;200!50;200!-1;-3;-5;-7;-9;-11;-13;-15;-17;-19;-21!5/70 +FINT = 50;200!50;200!50;200!50;200 +FLINE = 0;23;23!0;25;25!0;30;30!0;15;15 +HILO = 0 +HLSYM = 0 +!CLRBAR= 0 +WIND = 9/0.7/2/112 +TITLE = 1/-2/~ GFS PCPN TYPE =, 1000-500 RH AND 700-500 VV|~PCPN TYPE AND VV!0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_type_vv_ncf.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_type_vv_ncf.attr index ea91d565d3..86899267b9 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_type_vv_ncf.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_type_vv_ncf.attr @@ -9,7 +9,7 @@ GLEVEL=0!0!0!0!700:500!4700:10000 GVCORD=none!none!none!none!PRES!sgma SKIP= FILTER=y -SCALE=2!2!2!2!3!0 +SCALE=2!2!2!2!1!0 GDPFUN=sm5s(WXTr)!sm5s(WXTs)!WXTp!WXTz!lav(omeg)!relh TYPE=c!c!c!c!c!c CINT=50;200!50;200!50;200!50;200!-1;-2;-3;-5;-7;-9;-11;-13;-15;-17;-19;-21;-23;-25!5/70 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_type_vv_ncf_global.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_type_vv_ncf_global.attr new file mode 100644 index 0000000000..013855a31d --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_type_vv_ncf_global.attr @@ -0,0 +1,26 @@ +! +! Restore File : precip_type_vv_ncf +! +! Log: +! J. Carr/HPC 03/00 Initial creation +! T. Lee/SAIC 02/04 changed AVN to GFS +! +GLEVEL = 0 !0 !0 !700:500 !4400:10000 +GVCORD = none !none !none !PRES !sgma +SKIP = 0/1 +SCALE = 2 !2 !2 !1 !0 +GDPFUN = sm5s(WXTs06)!sm5s(WXTp06)!sm5s(WXTz06)!sm9s(lav(omeg))!sm9s(relh) +TYPE = c !c !c !c !c +LINE = 4/1/2/0 !7/1/2/0 !2/1/2/0 !6/1/3 !21/1/3 +CINT = 50;200 !50;200 !50;200 !-3;-5;-7;-9;-11;-13;-15;-17;-19;-21!10/70 +FINT = +FLINE = +HILO = 0 +HLSYM = 0 +!CLRBAR= 0 +WIND = 9/0.7/2/112 +TITLE = 1/-2/~ GFS PCPN TYPE, 1000-500 RH AND 700-500 VV|~PCPN TYPE AND VV!0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_type_vv_ncf_nam.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_type_vv_ncf_nam.attr new file mode 100644 index 0000000000..6e560d4ea6 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_type_vv_ncf_nam.attr @@ -0,0 +1,26 @@ +! +! Restore File : precip_type_vv_ncf +! +! Log: +! J. Carr/HPC 1/98 Initial creation +! T. Lee/GSC 6/99 Increased omega contour range +! +GLEVEL = 0!0!0!0!700:500!4700:10000 +GVCORD = none!none!none!none!PRES!sgma +SKIP = 0/1 +SCALE = 2!2!2!2!3!0 +GDPFUN = sm5s(WXTr)!sm5s(WXTs)!WXTp!WXTz!lav(omeg)!relh +TYPE = c!c!c!c!c!c +CINT = 50;200!50;200!50;200!50;200!-1;-2;-3;-5;-7;-9;-11;-13;-15;-17;-19;-21;-23;-25!5/70 +LINE = 22/1/2/0!4/1/2/0!7/1/2/0!2/1/2/0!6/10/3!21/1/3 +FINT = 50;200!50;200!50;200!50;200 +FLINE = 0;23;23!0;25;25!0;30;30!0;15;15 +HILO = 0 +HLSYM = 0 +!CLRBAR= 1/V/LL!0 +WIND = 9/0.7/2/112 +TITLE = 1/-1/~ Precip Type, 1000-470 MB RH & 700-500 MB Vertical Velocity!0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_water_pmsl.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_water_pmsl.attr index da543f85fb..6b61e7dac6 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_water_pmsl.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_water_pmsl.attr @@ -3,25 +3,25 @@ ! ! Log: ! D.W.Plummer/NCEP 2/97 Initial creation -! J. Carr/HPC 5/15/97 Changed HILO and cint of pmsl +! J. Carr/HPC 5/15/97 Changed HILO = and cint of mul(1e-2,pmsl) ! J. Carr/HPC 5/29/97 -! D.W.Plummer/NCEP 8/97 Added FILTER parameter and changed TEXT value ! -GLEVEL=0!0!500:1000!500:1000!0 -GVCORD=none!none!PRES!PRES!none -SKIP= -FILTER=y -SCALE=0!0!-1!-1!0 -GDPFUN=quo(pwtr;25.4)//pw!pw!ldf(hght)//tk!tk!sm9s(pmsl) -TYPE=c/f!c!c -CINT=0.25/0.5/1.0!0.25/1.25/6.0!6/460/540!6/546!4 -LINE=22//1!32//2/1!17/5/2!20/5/2!6//3 -FINT=1.0;1.5;2.0;2.5! -FLINE=0;23;22;14;2! -HILO=0!0!0!0!6/H#;L#/1020-1070;900-1012 -HLSYM=0!0!0!0!1;1//22;22/3;3/hw -WIND=0 -TITLE=1/-1/~ PW, PMSL, THICKNESS!0 -COLORS=2 -MARKER=2 -GRDLBL=5 +GLEVEL = 0!0!500:1000!500:1000!0 +GVCORD = none!none!PRES!PRES!none +SKIP = 0 +SCALE = 0!0!-1!-1!0 +GDPFUN = quo(pwtr;25.4)//pw!pw!ldf(hght)//tk!tk!sm9s(mul(1e-2,pmsl)) +TYPE = c/f!c!c +CINT = 0.25/0.5/1.0!0.25/1.25/6.0!6/460/540!6/546!4 +LINE = 22//1!32//2/1!17/5/2!20/5/2!6//3 +FINT = 1.0;1.5;2.0;2.5! +FLINE = 0;23;22;14;2! +HILO = 0!0!0!0!6/H#;L#/1020-1070;900-1012 +HLSYM = 0!0!0!0!1;1//22;22/3;3/hw +!CLRBAR= 1/V/LL!0!0!0 +WIND = 0 +TITLE = 1/-1/~ PW, PMSL, THICKNESS!0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_water_pmsl_mm.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_water_pmsl_mm.attr index 86abe3f446..89639b30ce 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_water_pmsl_mm.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_water_pmsl_mm.attr @@ -3,23 +3,23 @@ ! ! Log: ! D.W.Plummer/NCEP 2/97 Initial creation -! D.W.Plummer/NCEP 8/97 Added FILTER parameter and changed TEXT value ! -GLEVEL=0 !0 !500:1000 !500:1000 !0 -GVCORD=none !none !PRES !PRES !none -SKIP= -FILTER=y -SCALE=0 !0 !-1 !-1 !0 -GDPFUN=pwtr !sm9s(pwtr) !ldf(hght) !ldf(hght)!sm5s(pmsl) -TYPE=c !c/f !c -CINT=7;13 !19;25;31;38;44;50!6/460/540 !6/546 !4 -LINE=22//2 !32//2/1 !17/5/2 !20/5/2!6//3 -FINT=!13;25;38;50 ! -FLINE=!0;23;22;21;2 ! -HILO=0 !0 !0 !0 !6/H#;L#/1020-1080;900-1012 -HLSYM=0 !0 !0 !0 !1.5;1.5//22;22/3;3/hw -WIND=18/1/1 -TITLE=5/-1/~ PRECIPITABLE WATER, PMSL, THICKNESS!0 -COLORS=2 -MARKER=2 -GRDLBL=5 +GLEVEL = 0 !0 !500:1000 !500:1000 !0 +GVCORD = none !none !PRES !PRES !none +SKIP = 0 !0 !1 !1 !0 +SCALE = 0 !0 !-1 !-1 !0 +GDPFUN = pwtr !sm9s(pwtr) !ldf(hght) !ldf(hght)!sm5s(mul(1e-2,pmsl)) +TYPE = c !c/f !c +CINT = 7;13 !19;25;31;38;44;50!6/460/540 !6/546 !4 +LINE = 22//2 !32//2/1 !17/5/2 !20/5/2!6//3 +FINT = !13;25;38;50 ! +FLINE = !0;23;22;21;2 ! +HILO = 0 !0 !0 !0 !6/H#;L#/1020-1080;900-1012 +HLSYM = 0 !0 !0 !0 !1.5;1.5//22;22/3;3/hw +!CLRBAR= !1/V/LL !0 +WIND = 18/1/1 +TITLE = 5/-1/~ PRECIPITABLE WATER, PMSL, THICKNESS!0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pw_emsl_c-vec.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pw_emsl_c-vec.attr index 86f1c8a245..6babd4e4fc 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pw_emsl_c-vec.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pw_emsl_c-vec.attr @@ -12,7 +12,7 @@ GVCORD=none !none !NONE!PRES !PRES !PRES SKIP= FILTER=y SCALE=0!0!0!-1 -GDPFUN=quo(pwtr;25.4)//pw!pw !sm5s(emsl)!sm5s(ldf(hght))//tkns!tkns!vsub(squo(2,vadd(vlav(wnd,vlav(wnd@500:300)),wnd@850)) +GDPFUN=quo(pwtr;25.4)//pw!pw !sm5s(mul(1e-2,emsl))!sm5s(ldf(hght))//tkns!tkns!vsub(squo(2,vadd(vlav(wnd,vlav(wnd@500:300)),wnd@850)) TYPE=c !c/f!c !c ! c ! b CINT=0.25/0.25/0.5!0.25/0.75/6.0!4!3/0/540!3/543/1000 LINE=22///2!32//2/2!6//3!4/5/2!5/5/2 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pw_mslp_c-vec.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pw_mslp_c-vec.attr index 44613d5504..664b0e6982 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pw_mslp_c-vec.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pw_mslp_c-vec.attr @@ -3,23 +3,23 @@ ! ! Log: ! D.W.Plummer/NCEP 2/97 Initial creation -! D.W.Plummer/NCEP 8/97 Added FILTER parameter and changed TEXT value ! -GLEVEL=0!0!0!500:1000!500:1000!850:700 -GVCORD=none!none!none!PRES!PRES!PRES -SKIP= -FILTER=y -SCALE=0!0!0!-1!-1!0 -GDPFUN=quo(pwtr;25.4)//pw!pw!pmsl!ldf(hght)//tk!tk! vsub(squo(2,vadd(vlav(wnd,vlav(wnd@500:300)),wnd@850)) -TYPE=c!c/f!c!c ! c ! b -CINT=0.25/0.25/0.5!0.25/0.75/6.0!4!3/0/540!3/543/1000 -LINE=22///2!32//2/2!6//3!4/5/2!5/5/2 -FINT=!0.5;1.0;1.5;2.0 -FLINE=!0;23;22;30;14 -HILO=0!0!6/H#;L#/1020-1070;900-1012!0 -HLSYM=0!0!1.5;1.5//22;22/3;3/hw!0 -WIND=9/0.9/2/112 -TITLE=1/-1/~ PW, MSL PRESSURE, THICKNESS, C-VEC!0 -COLORS=2 -MARKER=2 -GRDLBL=5 +GLEVEL = 0!0!0!500:1000!500:1000!850:700 +GVCORD = none!none!none!PRES!PRES!PRES +SKIP = 0!0!0!0!0!0/1;-1 +SCALE = 0!0!0!-1!-1!0 +GDPFUN = quo(pwtr;25.4)//pw!pw!mul(1e-2,pmsl)!ldf(hght)//tk!tk! vsub(squo(2,vadd(vlav(wnd,vlav(wnd@500:300)),wnd@850)) +TYPE = c!c/f!c!c ! c ! b +CINT = 0.25/0.25/0.5!0.25/0.75/6.0!4!3/0/540!3/543/1000 +LINE = 22///2!32//2/2!6//3!4/5/2!5/5/2 +FINT = !0.5;1.0;1.5;2.0 +FLINE = !0;23;22;30;14 +HILO = 0!0!6/H#;L#/1020-1070;900-1012!0 +HLSYM = 0!0!1.5;1.5//22;22/3;3/hw!0 +!CLRBAR= 0!1/V/LL!0!0 +WIND = 9/0.9/2/112 +TITLE = 1/-1/~ PW, MSL PRESSURE, THICKNESS, C-VEC!0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/ransnocsi_500-850.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/ransnocsi_500-850.attr index b2d39006df..549912f59e 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/ransnocsi_500-850.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/ransnocsi_500-850.attr @@ -5,22 +5,22 @@ ! J.Carr/HPC 8/97 Initial creation ! J.Carr/HPC 2/98 changed thes to thte and geo to wnd ! -GLEVEL=850:700!700!700!850!850!30:0!30:0!850:500 -GVCORD=PRES!PRES!PRES!PRES!PRES!pdly!pdly!PRES -SKIP= -FILTER=y -SCALE=0!0!0!0!0!0!0!6 -GDPFUN=lav(relh)!tmpc!tmpc!tmpc!tmpc!tmpc!tmpc!sm9s(pvor(thte,wnd)) -TYPE=f ! c -CINT=5/70 !2;-2 !200;0 !2;-2 !200;0 !2;-2 !200;0!.2/-10/-0.2 -LINE=32//2/0 !6/3/2!6/1/2 !2/3/2!2/1/2 !20/3/2!20/1/2 !7/1/2 -FINT=70;80;90 -FLINE=0;24;23;22 -HILO= -HLSYM= -WIND= -TITLE=1/-2/~ 850-700 RH,T(BL y,850 r,700 cyan),850-500 EPV|~ 850-700 RH, R/S T, EPV!0 -COLORS=2 -MARKER=2 -GRDLBL=5 - +GLEVEL = 850:700!700!700!850!850!30:0!30:0!850:500 +GVCORD = PRES!PRES!PRES!PRES!PRES!pdly!pdly!PRES +SKIP = +SCALE = 0!0!0!0!0!0!0!6 +GDPFUN = lav(relh)!tmpc!tmpc!tmpc!tmpc!tmpc!tmpc!sm9s(pvor(thte,wnd)) +TYPE = f ! c +CINT = 5/70 !2;-2 !200;0 !2;-2 !200;0 !2;-2 !200;0!.2/-10/-0.2 +LINE = 32//2/0 !6/3/2!6/1/2 !2/3/2!2/1/2 !20/3/2!20/1/2 !7/1/2 +FINT = 70;80;90 +FLINE = 0;24;23;22 +HILO = +HLSYM = +!CLRBAR = 1 +WIND = +TITLE = 1/-2/~ 850-700 RH,T(BL y,850 r,700 cyan),850-500 EPV|~ 850-700 RH, R/S T, EPV!0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/sig_wave_and_mslp_feet.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/sig_wave_and_mslp_feet.attr new file mode 100644 index 0000000000..cfebcfa15b --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/sig_wave_and_mslp_feet.attr @@ -0,0 +1,28 @@ +! +! Restore File : sig_wave_and_mslp_feet +! +! Log: +! J.L.Partain/MPC 2/99 Initial creation for nww3 +! T. Piper/GSC 5/99 Added -1 line position for TITLE = +! T. Lee/SAIC 2/04 Changed AVN to GFS +! +GDFILE nww3 ! nww3 ! gfs +GLEVEL = 0 +GVCORD = none +SKIP = 0 +SCALE = 0 +GDPFUN = mul(HTSGW,3.28) !mul(HTSGW,3.28) ! sm5s(mul(1e-2,pmsl)) ! kntv(wnd@9950%sgma) +TYPE = c/f ! c ! c ! b +CINT = 3/6 ! 6;1000 ! 4 +LINE = 31//1/1 ! 25/1/2 ! 20//2/1 +FINT = 6;12;18;24;30 +FLINE = 0;24;25;30;14;2 +HILO = ! ! 26;2/H#;L#///30;30/y +HLSYM = ! ! 1.2;0.8//21//hw +!CLRBAR = 1 +WIND = 17/0.9/1.5/112 +TITLE = 5/-1/~ SIG WAVE HEIGHT (ft) with GFS PMSL and BL WIND =S!0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/sig_wave_and_mslp_meters.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/sig_wave_and_mslp_meters.attr new file mode 100644 index 0000000000..e16ec4cc50 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/sig_wave_and_mslp_meters.attr @@ -0,0 +1,28 @@ +! +! Restore File : sig_wave_and_mslp_meters +! +! Log: +! J.L.Partain/MPC 2/99 Initial creation for nww3 +! T. Piper/GSC 5/99 Added -1 line position for TITLE = +! T. Lee/SAIC 2/04 Changed AVN to GFS +! +GDFILE nww3 ! nww3 ! gfs +GLEVEL = 0 +GVCORD = none +SKIP = 0 +SCALE = 0 +GDPFUN = HTSGW !HTSGW !sm5s(mul(1e-2,pmsl)) !kntv(wnd@9950%sgma) +TYPE = c/f !c !c !b +CINT = 1/2 !1000 !4 +LINE = 31/1/2/1 !25/1/2 !20//2/1 +FINT = 2;4;6;8;10 +FLINE = 0;24;25;30;14;2 +HILO = ! !26;2/H#;L#///30;30/y +HLSYM = ! !1.2;0.8//21//hw +!CLRBAR = 1 +WIND = 17/0.9/1.5/112 +TITLE = 5/-1/~ SIG WAVE HEIGHT (m) with GFS PMSL and BL WIND =S!0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/sig_wave_cont_fill_feet.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/sig_wave_cont_fill_feet.attr new file mode 100644 index 0000000000..491255d9c0 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/sig_wave_cont_fill_feet.attr @@ -0,0 +1,26 @@ +! +! Restore File : sig_wave_cont_fill_feet +! +! Log: +! J.L.Partain/MPC 2/99 Initial creation for nww3 +! T. Piper/GSC 5/99 Added -1 line position for TITLE = +! +GLEVEL = 0 +GVCORD = none +SKIP = 0 +SCALE = 0 +GDPFUN = mul(HTSGW,3.28) ! kntv(wnd) +TYPE = c/f ! b +CINT = 3/6/1000 +LINE = 31/1/1/1 +FINT = 6;12;18;24;30 +FLINE = 0;24;25;30;14;2 +HILO = 0 +HLSYM = 0 +!CLRBAR = 1 +WIND = 17/0.9/1.5/112 +TITLE = 5/-1/~ SIG WAVE HEIGHT (ft) and NWW3 10m WIND =S!0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/sig_wave_cont_fill_meters.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/sig_wave_cont_fill_meters.attr new file mode 100644 index 0000000000..2f61626efa --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/sig_wave_cont_fill_meters.attr @@ -0,0 +1,26 @@ +! +! Restore File : sig_wave_cont_fill_meters +! +! Log: +! J.L.Partain/MPC 2/98 Initial creation for nww3 +! T. Piper/GSC 5/99 Added -1 line position for TITLE = +! +GLEVEL = 0 +GVCORD = none +SKIP = 0 +SCALE = 0 +GDPFUN = HTSGW !kntv(wnd) +TYPE = c/f !b +CINT = 1/2/1000 +LINE = 31/1/1/1 +FINT = 2;4;6;8;10 +FLINE = 0;24;25;30;14;2 +HILO = 0 +HLSYM = 0 +!CLRBAR = 1 +WIND = 17/0.9/1.5/112 +TITLE = 5/-1/~ SIG WAVE HEIGHT (m) and NWW3 10m WIND =S!0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/sig_wave_gridded_dir_only.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/sig_wave_gridded_dir_only.attr new file mode 100644 index 0000000000..2f5a3c996e --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/sig_wave_gridded_dir_only.attr @@ -0,0 +1,27 @@ +! +! Restore File : sig_wave_gridded_dir_only +! +! Log: +! J.L.Partain/MPC 2/99 Gridpoint mean swell direction +! T. Piper/GSC 5/99 Added -1 line position for TITLE = +! J.L.Partain/MPC 03/00 switched from mean to peak swell dir +! +GLEVEL = 0 +GVCORD = none +SKIP = 0 +SCALE = 0 +GDPFUN = vecn(mul(sin(mul(dirpw,DTR)),-10),mul(cos(mul(dirpw,DTR)),-10)) +TYPE = a +CINT = 0 +LINE = +FINT = +FLINE = +HILO = +HLSYM = +!CLRBAR = +WIND = 3/.7/.6/212/.6 +TITLE = 5/-1/~ GRIDPOINT PEAK SWELL DIR!0 +COLORS = 1 +MARKER = 0 +GRDLBL = +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/sig_wave_gridded_feet.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/sig_wave_gridded_feet.attr new file mode 100644 index 0000000000..ed1769c6ef --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/sig_wave_gridded_feet.attr @@ -0,0 +1,27 @@ +! +! Restore File : sig_wave_gridded_feet +! +! Log: +! J.L.Partain/MPC 2/99 Initial creation for nww3 +! T. Piper/GSC 5/99 Added -1 line position for TITLE = +! J.L.Partain/MPC 5/01 Set filter=n and added SKIP = +! +GLEVEL = 0 +GVCORD = none +SKIP = /-1;1 +SCALE = 0 +GDPFUN = mul(HTSGW,3.28) ! kntv(wnd) +TYPE = p ! b +CINT = 0 +LINE = +FINT = +FLINE = +HILO = 0 +HLSYM = 0 +!CLRBAR = 1 +WIND = 17/.8/1.8/112 +TITLE = 5/-1/~ GRIDDED SIG WAVE HEIGHT (ft) and NWW3 10m WIND =S!0 +COLORS = 1 +MARKER = 0 +GRDLBL = +FILTER = no diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/sig_wave_gridded_feet_dir.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/sig_wave_gridded_feet_dir.attr new file mode 100644 index 0000000000..11815cd312 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/sig_wave_gridded_feet_dir.attr @@ -0,0 +1,28 @@ +! +! Restore File : sig_wave_gridded_feet_dir +! +! Log: +! J.L.Partain/MPC 2/99 Gridpoint sig waves (f) and swell direction +! T. Piper/GSC 5/99 Added -1 line position for TITLE = +! J.L.Partain/MPC 03/00 switched from mean to peak swell dir +! J.L.Partain/MPC 5/01 Set filter=n and added SKIP = +! +GLEVEL = 0 +GVCORD = none +SKIP = /-1;1 +SCALE = 0 +GDPFUN = mul(HTSGW,3.28) ! vecn(mul(sin(mul(dirpw,DTR)),-10),mul(cos(mul(dirpw,DTR)),-10)) +TYPE = p ! a +CINT = 0 +LINE = +FINT = +FLINE = +HILO = +HLSYM = +!CLRBAR = +WIND = 3/.7/.6/212/.6 +TITLE = 5/-1/~ GRIDDED SIG WAVE HEIGHT (ft) and PEAK SWELL DIR!0 +COLORS = 1 +MARKER = 0 +GRDLBL = +FILTER = no diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/sig_wave_gridded_feet_only.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/sig_wave_gridded_feet_only.attr new file mode 100644 index 0000000000..43d6ae693e --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/sig_wave_gridded_feet_only.attr @@ -0,0 +1,27 @@ +! +! Restore File : sig_wave_gridded_feet_only +! +! Log: +! J.L.Partain/MPC 2/99 Initial creation - nww3 model +! T. Piper/GSC 5/99 Added -1 line position for TITLE = +! J.L.Partain/MPC 5/01 Set filter=n and added SKIP = +! +GLEVEL = 0 +GVCORD = none +SKIP = /-1;1 +SCALE = 0 +GDPFUN = mul(HTSGW,3.28) +TYPE = p +CINT = 0 +LINE = +FINT = +FLINE = +HILO = 0 +HLSYM = 0 +!CLRBAR = 0 +WIND = +TITLE = 5/-1/~ GRIDDED SIG WAVE HEIGHT (ft)!0 +COLORS = 1 +MARKER = 0 +GRDLBL = +FILTER = no diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/sig_wave_gridded_meters.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/sig_wave_gridded_meters.attr new file mode 100644 index 0000000000..d27bf9013e --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/sig_wave_gridded_meters.attr @@ -0,0 +1,27 @@ +! +! Restore File : sig_wave_gridded_meters +! +! Log: +! J.L.Partain/MPC 2/99 Initial creation - NWW3 model +! T. Piper/GSC 5/99 Added -1 line position for TITLE = +! J.L.Partain/MPC 5/01 Set filter=n and added SKIP = +! +GLEVEL = 0 +GVCORD = none +SKIP = /-1;1 +SCALE = 0 +GDPFUN = HTSGW ! kntv(wnd) +TYPE = p ! b +CINT = 0 +LINE = +FINT = +FLINE = +HILO = 0 +HLSYM = 0 +!CLRBAR = 0 +WIND = 17/0.8/1.8/112 +TITLE = 5/-1/~ GRIDDED SIG WAVE HEIGHT (m) and NWW3 10m WIND =S!0 +COLORS = 1 +MARKER = 0 +GRDLBL = +FILTER = no diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/sig_wave_gridded_meters_dir.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/sig_wave_gridded_meters_dir.attr new file mode 100644 index 0000000000..4f3ead373a --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/sig_wave_gridded_meters_dir.attr @@ -0,0 +1,28 @@ +! +! Restore File : sig_wave_gridded_meters_dir +! +! Log: +! J.L.Partain/MPC 2/99 Gridpoint sig waves (m) and swell direction +! T. Piper/GSC 5/99 Added -1 line position for TITLE = +! J.L.Partain/MPC 03/00 switched from mean to peak swell dir +! J.L.Partain/MPC 5/01 Set filter=n and added SKIP = +! +GLEVEL = 0 +GVCORD = none +SKIP = /-1;1 +SCALE = 0 +GDPFUN = HTSGW ! vecn(mul(sin(mul(dirpw,DTR)),-10),mul(cos(mul(dirpw,DTR)),-10)) +TYPE = p ! a +CINT = 0 +LINE = +FINT = +FLINE = +HILO = +HLSYM = +!CLRBAR = +WIND = 3/.7/.6/212/.6 +TITLE = 5/-1/~ GRIDDED SIG WAVE HEIGHT (m) and PEAK SWELL DIR!0 +COLORS = 1 +MARKER = 0 +GRDLBL = +FILTER = no diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/sig_wave_gridded_meters_only.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/sig_wave_gridded_meters_only.attr new file mode 100644 index 0000000000..86d784a471 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/sig_wave_gridded_meters_only.attr @@ -0,0 +1,27 @@ +! +! Restore File : sig_wave_gridded_meters_only +! +! Log: +! J.L.Partain/MPC 2/99 Initial creation - nww3 model +! T. Piper/GSC 5/99 Added -1 line position for TITLE = +! J.L.Partain/MPC 5/01 Set filter=n and added SKIP = +! +GLEVEL = 0 +GVCORD = none +SKIP = /-1;1 +SCALE = 0 +GDPFUN = HTSGW +TYPE = p +CINT = 0 +LINE = +FINT = +FLINE = +HILO = 0 +HLSYM = 0 +!CLRBAR = 0 +WIND = +TITLE = 5/-1/~ GRIDDED SIG WAVE HEIGHT (m)!0 +COLORS = 1 +MARKER = 0 +GRDLBL = +FILTER = no diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/sig_wave_gridded_mslp_feet.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/sig_wave_gridded_mslp_feet.attr new file mode 100644 index 0000000000..7ee4964b8e --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/sig_wave_gridded_mslp_feet.attr @@ -0,0 +1,29 @@ +! +! Restore File : sig_wave_gridded_mslp_feet +! +! Log: +! J.L.Partain/MPC 2/99 initial creation for nww3 +! T. Piper/GSC 5/99 Added -1 line position for TITLE = +! J.L.Partain/MPC 5/01 Set filter=n and added SKIP = +! T. Lee/SAIC 2/04 Changed AVN to GFS +! +GDFILE nww3 ! gfs ! gfs +GLEVEL = 0 +GVCORD = none +SKIP = 0/-1;1 +SCALE = 0 +GDPFUN = mul(HTSGW,3.28) ! kntv(wnd@9950%sgma) !sm5s(mul(1e-2,pmsl)) +TYPE = p ! b !c +CINT = 0 ! !4 +LINE = ! !20//2/1 +FINT = +FLINE = +HILO = ! !26;2/H#;L#///30;30/y +HLSYM = ! !1.2;0.8//21//hw +!CLRBAR = 1 +WIND = !17/0.8/1.8/112 +TITLE = 5/-1/~ GRIDDED SIG WAVE HEIGHT (ft) with GFS PMSL and BL Winds!0 +COLORS = 1 +MARKER = 0 +GRDLBL = +FILTER = no diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/sig_wave_gridded_mslp_feet_nw.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/sig_wave_gridded_mslp_feet_nw.attr new file mode 100644 index 0000000000..4650dc4234 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/sig_wave_gridded_mslp_feet_nw.attr @@ -0,0 +1,29 @@ +! +! Restore File : sig_wave_gridded_mslp_feet_nw +! +! Log: +! J.L.Partain/MPC 2/99 no-winds version +! T. Piper/GSC 5/99 Added -1 line position for TITLE = +! J.L.Partain/MPC 5/01 Set filter=n and added SKIP = +! T. Lee/SAIC 2/04 Changed AVN to GFS +! +GDFILE nww3 ! gfs +GLEVEL = 0 +GVCORD = none +SKIP = 0/-1;1 +SCALE = 0 +GDPFUN = mul(HTSGW,3.28) !sm5s(mul(1e-2,pmsl)) +TYPE = p !c +CINT = 0 !4 +LINE = !20//2/1 +FINT = +FLINE = +HILO = !26;2/H#;L#///30;30/y +HLSYM = !1.2;0.8//21//hw +!CLRBAR = 1 +WIND = +TITLE = 5/-1/~ GRIDDED SIG WAVE HEIGHT (ft) with GFS PMSL!0 +COLORS = 1 +MARKER = 0 +GRDLBL = +FILTER = no diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/sig_wave_gridded_mslp_meters.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/sig_wave_gridded_mslp_meters.attr new file mode 100644 index 0000000000..f422fbefce --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/sig_wave_gridded_mslp_meters.attr @@ -0,0 +1,29 @@ +! +! Restore File : sig_wave_gridded_mslp_meters +! +! Log: +! J.L.Partain/MPC 2/99 Gridpoint sig waves (m), AVN BL Winds & MSLP +! T. Piper/GSC 5/99 Added -1 line position for TITLE = +! J.L.Partain/MPC 5/01 Set filter=n and added SKIP = +! T. Lee/SAIC 2/04 Changed AVN to GFS +! +GDFILE nww3 ! gfs ! gfs +GLEVEL = 0 +GVCORD = none +SKIP = 0/-1;1 +SCALE = 0 +GDPFUN = HTSGW ! kntv(wnd@9950%sgma) !sm5s(mul(1e-2,pmsl)) +TYPE = p ! b !c +CINT = 0 ! !4 +LINE = ! !25/13/1/2 +FINT = +FLINE = +HILO = ! !26;2/h#;l#///30;30/y +HLSYM = ! !.9;0.8//21//hw +!CLRBAR = 1 +WIND = 17/1/1.4/112 +TITLE = 5/-1/~ GRIDDED SIG WAVE HEIGHT (m) with GFS PMSL and BL WIND =S!0 +COLORS = 1 +MARKER = 0 +GRDLBL = +FILTER = no diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/sig_wave_gridded_mslp_meters_nw.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/sig_wave_gridded_mslp_meters_nw.attr new file mode 100644 index 0000000000..36c664ca12 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/sig_wave_gridded_mslp_meters_nw.attr @@ -0,0 +1,29 @@ +! +! Restore File : sig_wave_gridded_mslp_meters_nw +! +! Log: +! J.L.Partain/MPC 2/99 no-winds version +! T. Piper/GSC 5/99 Added -1 line position for TITLE = +! J.L.Partain/MPC 5/01 Set filter=n and added SKIP = +! T. Lee/SAIC 2/04 Changed AVN to GFS +! +GDFILE nww3 ! gfs +GLEVEL = 0 +GVCORD = none +SKIP = 0/-1;1 +SCALE = 0 +GDPFUN = HTSGW !sm5s(mul(1e-2,pmsl)) +TYPE = p !c +CINT = 0 !4 +LINE = !25/13/1/2 +FINT = +FLINE = +HILO = !26;2/h#;l#///30;30/y +HLSYM = !.9;0.8//21//hw +!CLRBAR = 1 +WIND = +TITLE = 5/-1/~ GRIDDED SIG WAVE HEIGHT (m) with GFS PMSL!0 +COLORS = 1 +MARKER = 0 +GRDLBL = +FILTER = no diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/stability_850mb_wnd.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/stability_850mb_wnd.attr index 7849f3786c..94667f3c15 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/stability_850mb_wnd.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/stability_850mb_wnd.attr @@ -12,7 +12,7 @@ GVCORD=pres!pres!pres!none SKIP= FILTER=y SCALE=0 -GDPFUN=mag(kntv(wnd))!sm9s(sub(thta,thta@0%none))//stb!stb!emsl!kntv(wnd@850%pres) +GDPFUN=mag(kntv(wnd))!sm9s(sub(thta,thta@0%none))//stb!stb!mul(1e-2,emsl)!kntv(wnd@850%pres) TYPE=c/f!c!c!c ! b CINT=5/35!1//-12!1/-11/0!4//1012 LINE=32/1/2/2!7/1/2!7/2/2!19//2 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/stability_850mb_wnd_global.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/stability_850mb_wnd_global.attr new file mode 100644 index 0000000000..81b432f8e1 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/stability_850mb_wnd_global.attr @@ -0,0 +1,25 @@ +! +! Restore File : stability_850mb_wnd +! +! Log: +! J.L.Partain/MPC 3/98 Initial creation - 850mb AVN stability +! +GLEVEL = 850!850!850:0!0 +GVCORD = pres!pres!pres!none +SKIP = 0/1 +SCALE = 0 +GDPFUN = mag(kntv(wnd))!sm9s(sub(thta,thta@0%none))//stb!stb!mul(1e-2,pmsl)!kntv(wnd@850%pres) +TYPE = c/f!c!c!c ! b +CINT = 5/35!1//-12!1/-11/0!4//1012 +LINE = 32/1/2/2!7/1/2!7/2/2!19//2 +FINT = 35;50;65 +FLINE = 0;25;30;15 +HILO = 0!7/;N#/;-30--12!0!20/H#;L#/1018-1070;900-1014 +HLSYM = 0!1.2;1.2//21;21/2;2/hw!0!1.2;1.2//21;21/2;2/hw +!CLRBAR= 0 +WIND = 9/0.8/1.8/112 +TITLE = 1/-1/~ 850mb Wind, Lapse Rate (850-SFC) [Unstable LESS THAN -12 (SOLID)]!0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/stability_900mb_wnd.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/stability_900mb_wnd.attr index 03b17b886a..2ba0a2d758 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/stability_900mb_wnd.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/stability_900mb_wnd.attr @@ -9,7 +9,7 @@ GVCORD=pres!pres!pres!none SKIP= FILTER=y SCALE=0 -GDPFUN=mag(kntv(wnd))!sm9s(sub(thta,thta@0%none))//stb!stb!emsl!kntv(wnd@900%pres) +GDPFUN=mag(kntv(wnd))!sm9s(sub(thta,thta@0%none))//stb!stb!mul(1e-2,emsl)!kntv(wnd@900%pres) TYPE=c/f!c!c!c ! b CINT=5/35!1//-8!1/-7/0!4//1012 LINE=32/1/2/2!7/1/2!7/2/2!19//2 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/stability_925mb_wnd.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/stability_925mb_wnd.attr index 03ff00f9a7..6dafb9bfee 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/stability_925mb_wnd.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/stability_925mb_wnd.attr @@ -10,7 +10,7 @@ GVCORD=pres!pres!pres!none SKIP= FILTER=y SCALE=0 -GDPFUN=mag(kntv(wnd))!sm9s(sub(thta,thta@0%none))//stb!stb!pmsl!kntv(wnd@925%pres) +GDPFUN=mag(kntv(wnd))!sm9s(sub(thta,thta@0%none))//stb!stb!mul(1e-2,pmsl)!kntv(wnd@925%pres) TYPE=c/f!c!c!c ! b CINT=5/35!1//-6!1/-5/0!4//1012 LINE=32/1/2/2!7/1/2!7/2/2!19//2 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/stability_950mb_wnd.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/stability_950mb_wnd.attr index b404a8e645..0a42ceb8f2 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/stability_950mb_wnd.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/stability_950mb_wnd.attr @@ -4,21 +4,22 @@ ! Log: ! J.L.Partain/NCEP 3/98 ETA 950mb stability - Initial creation ! -GLEVEL=950!950!950:0!0 -GVCORD=pres!pres!pres!none -SKIP= -FILTER=y -SCALE=0 -GDPFUN=mag(kntv(wnd))!sm9s(sub(thta,thta@0%none))//stb!stb!emsl!kntv(wnd@950%pres) -TYPE=c/f!c!c!c ! b -CINT=5/35!1//-4!1/-3/0!4//1012 -LINE=32/1/2/2!7/1/2!7/2/2!19//2 -FINT=35;50;65 -FLINE=0;25;30;15 -HILO=0!20/;N#/;-30--4!0!20/H#;L#/1018-1070;900-1014 -HLSYM=0!1.2;1.2//21;21/2;2/hw!0!1.2;1.2//21;21/2;2/hw -WIND=9/0.8/1.8/112 -TITLE=1/-1/~ 950mb Wind, Lapse Rate (950-SFC) [Unstable less than -4 (SOLID)]!0 -COLORS=2 -MARKER=2 -GRDLBL=5 +GLEVEL = 950!950!950:0!0 +GVCORD = pres!pres!pres!none +SKIP = 0/1 +SCALE = 0 +GDPFUN = mag(kntv(wnd))!sm9s(sub(thta,thta@0%none))//stb!stb!mul(1e-2,emsl)!kntv(wnd@950%pres) +TYPE = c/f!c!c!c ! b +CINT = 5/35!1//-4!1/-3/0!4//1012 +LINE = 32/1/2/2!7/1/2!7/2/2!19//2 +FINT = 35;50;65 +FLINE = 0;25;30;15 +HILO = 0!20/;N#/;-30--4!0!20/H#;L#/1018-1070;900-1014 +HLSYM = 0!1.2;1.2//21;21/2;2/hw!0!1.2;1.2//21;21/2;2/hw +!CLRBAR= 0 +WIND = 9/0.8/1.8/112 +TITLE = 1/-1/~ 950mb Wind, Lapse Rate (950-SFC) [Unstable LESS THAN -4 (SOLID)]!0 +COLORS = 2 +MARKER = 2 +GRDLBL = 5 +FILTER = 1 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/svrwx.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/svrwx.attr index 5c5b5e61bc..47a249b45b 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/svrwx.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/svrwx.attr @@ -13,7 +13,7 @@ GVCORD=pres !pdly !pres !pres !none !pres SKIP= FILTER=y SCALE=0 -GDPFUN=sm9s(relh) !sm9s(dwpf)!sm9s(relh)!sm9s(tmpc)!emsl!sm9s(relh)!kntv(wnd@30:0%pdly)!kntv(wnd@700%pres) +GDPFUN=sm9s(relh) !sm9s(dwpf)!sm9s(relh)!sm9s(tmpc)!mul(1e-2,emsl)!sm9s(relh)!kntv(wnd@30:0%pdly)!kntv(wnd@700%pres) TYPE=c/f !c/f !c !c !c !c !b!a CINT=10;20;30;40!50;53;56;59;62;65;68;71;74!-5;50!3!4//1016!10;20;30;40 LINE=10/1/2 !32/1/2/1 !8/1/5!4/5/3!5//3!10/1/2 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/svrwx_global.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/svrwx_global.attr new file mode 100644 index 0000000000..0dbe5d5e39 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/svrwx_global.attr @@ -0,0 +1,22 @@ +! +! Restore File : svrwx +! +! Log: +! J. Carr/HPC 10/98 Initial creation +! +GLEVEL = 700 !9950 !700 !700 !0 !700 +GVCORD = pres !sgma !pres !pres !none !pres +SKIP = 0/1;1 +SCALE = 0 +GDPFUN = sm9s(relh) !sm9s(dwpf)!sm9s(relh)!sm9s(tmpc)!mul(1e-2,pmsl)!sm9s(relh)!kntv(wnd@9950%sgma)!kntv(wnd@700%pres) +TYPE = c/f !c/f !c !c !c !c !b!a +CINT = 10;20;30;40!50;53;56;59;62;65;68;71;74!-5;50!3!4//1016!10;20;30;40 +LINE = 10/1/2 !32/1/2/1 !8/1/5!4/5/3!5//3!10/1/2 +FINT = 0;50 !50;56;62;68;74 +FLINE = 0;8;0 !0;23;22;30;14;2 +HILO = 0!0!0!0!5/H#;L#/1080-2000;900-1012!0 +HLSYM = !!!!!1.5;1.5//22/3/hw! +!CLRBAR= 0!1/V/LL!0 +WIND = !!!!!!9/0.8/2/112!6/.3/2/221/.4 +TITLE = 1/-2/~ BL DWPT AND WIND, 700mb TEMP, RH AND WND, PMSL!0 +FILTER = no diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/svrwx_intl.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/svrwx_intl.attr index 4cfd9decec..d6d93383f1 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/svrwx_intl.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/svrwx_intl.attr @@ -9,7 +9,7 @@ GVCORD=pres !sgma !pres !pres !none !pres SKIP= FILTER=y SCALE=0 -GDPFUN=sm9s(relh) !sm9s(dwpc)!sm9s(relh)!sm9s(tmpc)!pmsl!sm9s(relh)!kntv(wnd@9950%sgma)!kntv(wnd@700%pres) +GDPFUN=sm9s(relh) !sm9s(dwpc)!sm9s(relh)!sm9s(tmpc)!mul(1e-2,pmsl)!sm9s(relh)!kntv(wnd@9950%sgma)!kntv(wnd@700%pres) TYPE=c/f !c/f !c !c !c !c !b!a CINT=10;20;30;40!15;18;21;24;27;30;33;36;39!-5;50!3!4//1016!10;20;30;40 LINE=10/1/2 !32/1/2/1 !8/1/5!4/5/3!5//3!10/1/2 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/svrwx_nam.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/svrwx_nam.attr new file mode 100644 index 0000000000..1450c81949 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/svrwx_nam.attr @@ -0,0 +1,25 @@ +! +! Restore File : svrwx +! +! Log: +! J. Carr/HPC 6/97 Initial creation +! J. Carr/HPC 6/97 Changed boundary level to comply with EMC changes +! J. Carr/HPC 10/97 Removed filter set to 1 and used skip because there are two wind +! fields plotted and it is too busy +! +GLEVEL = 700 !30:0 !700 !700 !0 !700 +GVCORD = pres !pdly !pres !pres !none !pres +SKIP = 0/1;1 +SCALE = 0 +GDPFUN = sm9s(relh) !sm9s(dwpf)!sm9s(relh)!sm9s(tmpc)!mul(1e-2,emsl)!sm9s(relh)!kntv(wnd@30:0%pdly)!kntv(wnd@700%pres) +TYPE = c/f !c/f !c !c !c !c !b!a +CINT = 10;20;30;40!50;53;56;59;62;65;68;71;74!-5;50!3!4//1016!10;20;30;40 +LINE = 10/1/2 !32/1/2/1 !8/1/5!4/5/3!5//3!10/1/2 +FINT = 0;50 !50;56;62;68;74 +FLINE = 0;8;0 !0;23;22;30;14;2 +HILO = 0!0!0!0!5/H#;L#/1080-2000;900-1012!0 +HLSYM = !!!!!1.5;1.5//22/3/hw! +!CLRBAR= 0!1/V/LL!0 +WIND = !!!!!!9/0.8/2/112!6/.3/2/221/.4 +TITLE = 1/-2/~ BL (0-30 MB AGL)DWPT & WIND =, 700mb TEMP, RH & WND, EMSL!0 +FILTER = no diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/BREF_2.00.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/BREF_2.00.attr index 2a68e8ad4f..078f9c3a41 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/BREF_2.00.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/BREF_2.00.attr @@ -1,7 +1,7 @@ colorMapName=osf_ref16 colorBar=@ColorBars/Radar/dfltMosaicColorBar.xml productCode=140 -prodName=BREF_2 +!prodName=BREF_2 alpha=1.0 brightness=1.0 -contrast=1.0 \ No newline at end of file +contrast=1.0 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/BREF_nids_cmref.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/BREF_nids_cmref.attr index 87ac3da07e..9fd91b787d 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/BREF_nids_cmref.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/BREF_nids_cmref.attr @@ -1,7 +1,7 @@ colorMapName=nids_cmref colorBar=@ColorBars/Radar/dfltMosaicColorBar.xml productCode=140 -prodName=BREF +!prodName=BREF alpha=1.0 brightness=1.0 -contrast=1.0 \ No newline at end of file +contrast=1.0 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/CREF_1.00.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/CREF_1.00.attr index 60be8e2ab2..391516dd1d 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/CREF_1.00.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/CREF_1.00.attr @@ -1,7 +1,7 @@ colorMapName=osf_ref16 colorBar=@ColorBars/Radar/dfltMosaicColorBar.xml productCode=211 -prodName=CREF +!prodName=CREF alpha=1.0 brightness=1.0 -contrast=1.0 \ No newline at end of file +contrast=1.0 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/CREF_30.00.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/CREF_30.00.attr index f3b92ec585..f17dc5c97f 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/CREF_30.00.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/CREF_30.00.attr @@ -1,7 +1,7 @@ colorMapName=osf_ref16 colorBar=@ColorBars/Radar/dfltMosaicColorBar.xml productCode=30 -prodName=CREF_30 +!prodName=CREF_30 alpha=1.0 brightness=1.0 -contrast=1.0 \ No newline at end of file +contrast=1.0 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/CREF_4.00.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/CREF_4.00.attr index f3b92ec585..f17dc5c97f 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/CREF_4.00.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/CREF_4.00.attr @@ -1,7 +1,7 @@ colorMapName=osf_ref16 colorBar=@ColorBars/Radar/dfltMosaicColorBar.xml productCode=30 -prodName=CREF_30 +!prodName=CREF_30 alpha=1.0 brightness=1.0 -contrast=1.0 \ No newline at end of file +contrast=1.0 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/CREF_nids_cmref.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/CREF_nids_cmref.attr index 3100f09511..a4bae24fc9 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/CREF_nids_cmref.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/CREF_nids_cmref.attr @@ -1,7 +1,7 @@ colorMapName=nids_cmref colorBar=@ColorBars/Radar/dfltMosaicColorBar.xml productCode=30 -prodName=CREF +!prodName=CREF alpha=1.0 brightness=1.0 -contrast=1.0 \ No newline at end of file +contrast=1.0 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/NatlMosaic-ALL.xml b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/NatlMosaic-ALL.xml index 806932a362..29bb7cec60 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/NatlMosaic-ALL.xml +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/NatlMosaic-ALL.xml @@ -2,5 +2,5 @@ NatlMosaic ALL - RALA_1.00,PRCP,PRCP1_4.00,VIL_4.00,PRCP24_4.00,TOPS_4.00,TOPS2_4.00,PRCPC_4.00,CREF_4.00,CREF_1.00,TOPS18_1.00,TOPS30_1.00,VIL_1.00 + BREF_2.00,BREF_nids_cmref,RALA_1.00,PRCP,PRCP1_4.00,PRCP24_4.00,PRCPC_4.00,CREF_4.00,CREF_1.00,CREF_30.00,CREF_nids_cmref,TOPS_4.00,TOPS2_4.00,TOPS18_1.00,TOPS30_1.00,VIL_1.00,VIL_4.00 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/NatlMosaic-CREF.xml b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/NatlMosaic-CREF.xml index 3ac1b59560..e6739c4b93 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/NatlMosaic-CREF.xml +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/NatlMosaic-CREF.xml @@ -2,5 +2,5 @@ NatlMosaic CREF - CREF_4.00,CREF_1.00,CREF_nids_cmref + CREF_4.00,CREF_1.00,CREF_30.00,CREF_nids_cmref diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/PRCP.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/PRCP.attr index 24689fead5..8b1f136473 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/PRCP.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/PRCP.attr @@ -1,7 +1,7 @@ colorMapName=nids_pre colorBar=@ColorBars/Radar/dfltMosaicColorBar.xml productCode=101 -prodName=PRCP +!prodName=PRCP alpha=1.0 brightness=1.0 -contrast=1.0 \ No newline at end of file +contrast=1.0 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/PRCP1_4.00.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/PRCP1_4.00.attr index 758f3eb6a0..3e0af7e11f 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/PRCP1_4.00.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/PRCP1_4.00.attr @@ -1,7 +1,7 @@ colorMapName=nids_pre colorBar=@ColorBars/Radar/dfltMosaicColorBar.xml productCode=90 -prodName=PRCP1_4 +!prodName=PRCP1_4 alpha=1.0 brightness=1.0 -contrast=1.0 \ No newline at end of file +contrast=1.0 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/PRCP24_4.00.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/PRCP24_4.00.attr index 2d338ed6ec..4cddd03169 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/PRCP24_4.00.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/PRCP24_4.00.attr @@ -1,7 +1,7 @@ colorMapName=nids_pre colorBar=@ColorBars/Radar/dfltMosaicColorBar.xml productCode=102 -prodName=PRCP24 +!prodName=PRCP24 alpha=1.0 brightness=1.0 -contrast=1.0 \ No newline at end of file +contrast=1.0 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/PRCPC_4.00.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/PRCPC_4.00.attr index 381c0f60b2..7858d5fe33 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/PRCPC_4.00.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/PRCPC_4.00.attr @@ -1,7 +1,7 @@ colorMapName=nids_pre colorBar=@ColorBars/Radar/dfltMosaicColorBar.xml productCode=101 -prodName=PRCPC +!prodName=PRCPC alpha=1.0 brightness=1.0 -contrast=1.0 \ No newline at end of file +contrast=1.0 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/RALA_1.00.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/RALA_1.00.attr index 5da15345b3..e5a314cfa2 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/RALA_1.00.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/RALA_1.00.attr @@ -1,7 +1,7 @@ colorMapName=osf_ref16 colorBar=@ColorBars/Radar/dfltMosaicColorBar.xml productCode=203 -prodName=RALA +!prodName=RALA alpha=1.0 brightness=1.0 -contrast=1.0 \ No newline at end of file +contrast=1.0 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/TOPS18_1.00.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/TOPS18_1.00.attr index 51002d0cf6..f924e71ef3 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/TOPS18_1.00.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/TOPS18_1.00.attr @@ -1,7 +1,7 @@ colorMapName=nids_tops colorBar=@ColorBars/Radar/dfltMosaicColorBar.xml productCode=210 -prodName=TOPS18 +!prodName=TOPS18 alpha=1.0 brightness=1.0 -contrast=1.0 \ No newline at end of file +contrast=1.0 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/TOPS2_4.00.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/TOPS2_4.00.attr index 959ce9063a..66bde0ec39 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/TOPS2_4.00.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/TOPS2_4.00.attr @@ -1,7 +1,7 @@ colorMapName=nids_tops colorBar=@ColorBars/Radar/dfltMosaicColorBar.xml productCode=95 -prodName=TOPS2 +!prodName=TOPS2 alpha=1.0 brightness=1.0 -contrast=1.0 \ No newline at end of file +contrast=1.0 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/TOPS30_1.00.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/TOPS30_1.00.attr index a7fc31b306..d1d4271f1a 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/TOPS30_1.00.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/TOPS30_1.00.attr @@ -1,7 +1,7 @@ colorMapName=nids_tops colorBar=@ColorBars/Radar/dfltMosaicColorBar.xml productCode=212 -prodName=TOPS30 +!prodName=TOPS30 alpha=1.0 brightness=1.0 -contrast=1.0 \ No newline at end of file +contrast=1.0 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/TOPS_4.00.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/TOPS_4.00.attr index 4e92309dc3..1d1ff62984 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/TOPS_4.00.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/TOPS_4.00.attr @@ -1,7 +1,7 @@ colorMapName=nids_tops colorBar=@ColorBars/Radar/dfltMosaicColorBar.xml productCode=95 -prodName=TOPS_4 +!prodName=TOPS_4 alpha=1.0 brightness=1.0 -contrast=1.0 \ No newline at end of file +contrast=1.0 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/VIL_1.00.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/VIL_1.00.attr index 0c86f7eb03..5e777c3a6f 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/VIL_1.00.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/VIL_1.00.attr @@ -1,7 +1,7 @@ colorMapName=nids_vil colorBar=@ColorBars/Radar/dfltMosaicColorBar.xml productCode=209 -prodName=VIL +!prodName=VIL alpha=1.0 brightness=1.0 -contrast=1.0 \ No newline at end of file +contrast=1.0 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/VIL_4.00.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/VIL_4.00.attr index f8034564a7..3e1a91c2ce 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/VIL_4.00.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/VIL_4.00.attr @@ -1,7 +1,7 @@ colorMapName=nids_vil colorBar=@ColorBars/Radar/dfltMosaicColorBar.xml productCode=148 -prodName=VIL_4 +!prodName=VIL_4 alpha=1.0 brightness=1.0 -contrast=1.0 \ No newline at end of file +contrast=1.0 diff --git a/cave/build/static/common/cave/etc/ncep/ColorBars/FFG/ffgColorBar.xml b/cave/build/static/common/cave/etc/ncep/ColorBars/FFG/ffgColorBar.xml index 5136fe8358..b55e775864 100644 --- a/cave/build/static/common/cave/etc/ncep/ColorBars/FFG/ffgColorBar.xml +++ b/cave/build/static/common/cave/etc/ncep/ColorBars/FFG/ffgColorBar.xml @@ -1,12 +1,12 @@ true - true + false Vertical - UpperLeft - 0.4 - 15 + LowerLeft + 0.5 + 10 1 - 0.0 + 0.0 0.5 1.0 1.5 diff --git a/cave/build/static/common/cave/etc/ncep/ColorBars/Lightning/dfltLtngColorBar.xml b/cave/build/static/common/cave/etc/ncep/ColorBars/Lightning/dfltLtngColorBar.xml index 8170907be7..2eb308bd80 100644 --- a/cave/build/static/common/cave/etc/ncep/ColorBars/Lightning/dfltLtngColorBar.xml +++ b/cave/build/static/common/cave/etc/ncep/ColorBars/Lightning/dfltLtngColorBar.xml @@ -1,10 +1,10 @@ true - true + false Vertical - UpperLeft + LowerRight 0.4 - 15 + 10 0 0.0 diff --git a/cave/build/static/common/cave/etc/ncep/ColorBars/Lightning/intensityColorBar.xml b/cave/build/static/common/cave/etc/ncep/ColorBars/Lightning/intensityColorBar.xml index df69286ddd..58618fc20f 100644 --- a/cave/build/static/common/cave/etc/ncep/ColorBars/Lightning/intensityColorBar.xml +++ b/cave/build/static/common/cave/etc/ncep/ColorBars/Lightning/intensityColorBar.xml @@ -1,6 +1,6 @@ true - true + false Vertical UpperLeft 0.4 diff --git a/cave/build/static/common/cave/etc/ncep/ColorBars/Satellite/dfltMcidasColorBar.xml b/cave/build/static/common/cave/etc/ncep/ColorBars/Satellite/dfltMcidasColorBar.xml index f75032bbb2..a92a9dbda0 100644 --- a/cave/build/static/common/cave/etc/ncep/ColorBars/Satellite/dfltMcidasColorBar.xml +++ b/cave/build/static/common/cave/etc/ncep/ColorBars/Satellite/dfltMcidasColorBar.xml @@ -6,7 +6,4 @@ 0.6 15 0 - - 0,50,100,150,200,255 - diff --git a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/37ghz-trmm1.cmap b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/37ghz-trmm1.cmap index 069d8eb389..2b8e515693 100644 --- a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/37ghz-trmm1.cmap +++ b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/37ghz-trmm1.cmap @@ -1,130 +1,130 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/37ghz-trmm2.cmap b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/37ghz-trmm2.cmap index fb8227c3f0..9ad611c4f0 100644 --- a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/37ghz-trmm2.cmap +++ b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/37ghz-trmm2.cmap @@ -1,131 +1,131 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/37ghz-trmm3.cmap b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/37ghz-trmm3.cmap index d5c2660374..26cbf82167 100644 --- a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/37ghz-trmm3.cmap +++ b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/37ghz-trmm3.cmap @@ -1,131 +1,131 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/50C.cmap b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/50C.cmap index bf4fb6a110..2a58120fa9 100644 --- a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/50C.cmap +++ b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/50C.cmap @@ -1,131 +1,131 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/85ghz-trmm1.cmap b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/85ghz-trmm1.cmap index d5c2660374..26cbf82167 100644 --- a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/85ghz-trmm1.cmap +++ b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/85ghz-trmm1.cmap @@ -1,131 +1,131 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/85h-ssmi.cmap b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/85h-ssmi.cmap index eecd327c1f..fa7739d95d 100644 --- a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/85h-ssmi.cmap +++ b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/85h-ssmi.cmap @@ -1,5 +1,5 @@ - - + + diff --git a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/airmass.cmap b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/airmass.cmap index 331d30382a..3d1f9ec1ab 100644 --- a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/airmass.cmap +++ b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/airmass.cmap @@ -1,98 +1,98 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/base_other_test1.cmap b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/base_other_test1.cmap index f020dad494..aa7be78e3f 100644 --- a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/base_other_test1.cmap +++ b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/base_other_test1.cmap @@ -1,67 +1,67 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/base_other_test2.cmap b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/base_other_test2.cmap index 4c01061892..0f6f77ddbe 100644 --- a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/base_other_test2.cmap +++ b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/base_other_test2.cmap @@ -1,91 +1,91 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/bd.cmap b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/bd.cmap index 41c1f2ab79..1e5830f1da 100644 --- a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/bd.cmap +++ b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/bd.cmap @@ -1,259 +1,259 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/desktop_desk1_other_test1.cmap b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/desktop_desk1_other_test1.cmap index f020dad494..aa7be78e3f 100644 --- a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/desktop_desk1_other_test1.cmap +++ b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/desktop_desk1_other_test1.cmap @@ -1,67 +1,67 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/desktop_desk1_other_test2.cmap b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/desktop_desk1_other_test2.cmap index 4c01061892..0f6f77ddbe 100644 --- a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/desktop_desk1_other_test2.cmap +++ b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/desktop_desk1_other_test2.cmap @@ -1,91 +1,91 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/desktop_desk2_other_test1.cmap b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/desktop_desk2_other_test1.cmap index f020dad494..aa7be78e3f 100644 --- a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/desktop_desk2_other_test1.cmap +++ b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/desktop_desk2_other_test1.cmap @@ -1,67 +1,67 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/desktop_desk2_other_test2.cmap b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/desktop_desk2_other_test2.cmap index 4c01061892..0f6f77ddbe 100644 --- a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/desktop_desk2_other_test2.cmap +++ b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/desktop_desk2_other_test2.cmap @@ -1,91 +1,91 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/dust.cmap b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/dust.cmap index a509b838d3..d6f99c9e41 100644 --- a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/dust.cmap +++ b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/dust.cmap @@ -1,98 +1,98 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/ir_trp.cmap b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/ir_trp.cmap index 42879f3e8e..3bdce5023f 100644 --- a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/ir_trp.cmap +++ b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/ir_trp.cmap @@ -1,259 +1,259 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/ir_tv2.cmap b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/ir_tv2.cmap index ecf097a199..9718b069c4 100644 --- a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/ir_tv2.cmap +++ b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/ir_tv2.cmap @@ -1,217 +1,217 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/jf.cmap b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/jf.cmap index 61dd021f53..0eb824e630 100644 --- a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/jf.cmap +++ b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/jf.cmap @@ -1,131 +1,131 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/nmcir.cmap b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/nmcir.cmap index 97ef1a9628..856548fd8f 100644 --- a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/nmcir.cmap +++ b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/nmcir.cmap @@ -1,67 +1,67 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/omiai.cmap b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/omiai.cmap index be00e80125..10fe97ab64 100644 --- a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/omiai.cmap +++ b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/omiai.cmap @@ -1,259 +1,259 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/omiso2.cmap b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/omiso2.cmap index 5e1a0ac8b9..a7f67e37d3 100644 --- a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/omiso2.cmap +++ b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/omiso2.cmap @@ -1,259 +1,259 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/qscat.cmap b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/qscat.cmap index d0a39824d3..183d29199a 100644 --- a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/qscat.cmap +++ b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/qscat.cmap @@ -1,19 +1,19 @@ - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + diff --git a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/qscat1.cmap b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/qscat1.cmap index 4613a102ef..ebf1f96f9e 100644 --- a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/qscat1.cmap +++ b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/qscat1.cmap @@ -1,132 +1,132 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/rgb_airmass_95.cmap b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/rgb_airmass_95.cmap index 331d30382a..3d1f9ec1ab 100644 --- a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/rgb_airmass_95.cmap +++ b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/rgb_airmass_95.cmap @@ -1,98 +1,98 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/rgb_dust_95.cmap b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/rgb_dust_95.cmap index a509b838d3..d6f99c9e41 100644 --- a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/rgb_dust_95.cmap +++ b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/rgb_dust_95.cmap @@ -1,98 +1,98 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/roygbv.cmap b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/roygbv.cmap index bea3269fdf..49daf1b48b 100644 --- a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/roygbv.cmap +++ b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/roygbv.cmap @@ -1,67 +1,67 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/rr_trmm.cmap b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/rr_trmm.cmap index 93f40f9495..c2144c9d87 100644 --- a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/rr_trmm.cmap +++ b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/rr_trmm.cmap @@ -1,19 +1,19 @@ - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + diff --git a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/sabir.cmap b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/sabir.cmap index 9512ba5088..d3ea313d69 100644 --- a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/sabir.cmap +++ b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/sabir.cmap @@ -1,67 +1,67 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/site_oax_other_test1.cmap b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/site_oax_other_test1.cmap index f020dad494..aa7be78e3f 100644 --- a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/site_oax_other_test1.cmap +++ b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/site_oax_other_test1.cmap @@ -1,67 +1,67 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/site_oax_other_test2.cmap b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/site_oax_other_test2.cmap index 4c01061892..0f6f77ddbe 100644 --- a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/site_oax_other_test2.cmap +++ b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/site_oax_other_test2.cmap @@ -1,91 +1,91 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/site_xyz_other_test1.cmap b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/site_xyz_other_test1.cmap index f020dad494..aa7be78e3f 100644 --- a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/site_xyz_other_test1.cmap +++ b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/site_xyz_other_test1.cmap @@ -1,67 +1,67 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/site_xyz_other_test2.cmap b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/site_xyz_other_test2.cmap index 4c01061892..0f6f77ddbe 100644 --- a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/site_xyz_other_test2.cmap +++ b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/site_xyz_other_test2.cmap @@ -1,91 +1,91 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/ssmi_mpc.cmap b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/ssmi_mpc.cmap index 9757edfeca..406fe92826 100644 --- a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/ssmi_mpc.cmap +++ b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/ssmi_mpc.cmap @@ -1,67 +1,67 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/ssmi_tpc.cmap b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/ssmi_tpc.cmap index b56459f7cc..52c1443909 100644 --- a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/ssmi_tpc.cmap +++ b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/ssmi_tpc.cmap @@ -1,239 +1,239 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/ssmi_wr.cmap b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/ssmi_wr.cmap index 6d3cfae897..c8651e0a46 100644 --- a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/ssmi_wr.cmap +++ b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/ssmi_wr.cmap @@ -1,131 +1,131 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/ssmiwnd_hi.cmap b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/ssmiwnd_hi.cmap index 547b8e833a..222784c7e3 100644 --- a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/ssmiwnd_hi.cmap +++ b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/ssmiwnd_hi.cmap @@ -1,67 +1,67 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/topo-mb2.cmap b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/topo-mb2.cmap index 57a655854a..e1541c9b48 100644 --- a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/topo-mb2.cmap +++ b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/topo-mb2.cmap @@ -1,102 +1,102 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/topo-tv0.cmap b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/topo-tv0.cmap index 3efe052102..b4a81a5e5d 100644 --- a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/topo-tv0.cmap +++ b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/topo-tv0.cmap @@ -1,131 +1,131 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/topo-tv1.cmap b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/topo-tv1.cmap index 5367060bc9..30fd7b747a 100644 --- a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/topo-tv1.cmap +++ b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/topo-tv1.cmap @@ -1,131 +1,131 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/topo-tv2.cmap b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/topo-tv2.cmap index e1d1b31f1d..781f3b5e48 100644 --- a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/topo-tv2.cmap +++ b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/topo-tv2.cmap @@ -1,131 +1,131 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/topo.cmap b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/topo.cmap index afb07eebfc..016d2151f4 100644 --- a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/topo.cmap +++ b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/topo.cmap @@ -1,275 +1,275 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/topo42.cmap b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/topo42.cmap index f81d0876a2..0e75b152b5 100644 --- a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/topo42.cmap +++ b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/topo42.cmap @@ -1,131 +1,131 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/topo42x.cmap b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/topo42x.cmap index 6ae36ecf5f..37a4962d94 100644 --- a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/topo42x.cmap +++ b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/topo42x.cmap @@ -1,132 +1,132 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/topomap.cmap b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/topomap.cmap index 11bc2fdb10..2426ad8039 100644 --- a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/topomap.cmap +++ b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/topomap.cmap @@ -1,288 +1,288 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/tpc_topoir.cmap b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/tpc_topoir.cmap index f1a6cfa4d0..a97ea63176 100644 --- a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/tpc_topoir.cmap +++ b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/tpc_topoir.cmap @@ -1,131 +1,131 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/tpw.cmap b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/tpw.cmap index 0f08186ee9..cadd7210ed 100644 --- a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/tpw.cmap +++ b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/tpw.cmap @@ -1,67 +1,67 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/tpw_cira.cmap b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/tpw_cira.cmap index 1f30b1e4a3..03ff146abf 100644 --- a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/tpw_cira.cmap +++ b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/tpw_cira.cmap @@ -1,259 +1,259 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/tpwpct_cira.cmap b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/tpwpct_cira.cmap index b18833b020..58b4b7bb21 100644 --- a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/tpwpct_cira.cmap +++ b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/tpwpct_cira.cmap @@ -1,259 +1,259 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/upc_topo.cmap b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/upc_topo.cmap index f23bf0374f..302152e413 100644 --- a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/upc_topo.cmap +++ b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/upc_topo.cmap @@ -1,91 +1,91 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/user_mgao_other_test1.cmap b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/user_mgao_other_test1.cmap index f020dad494..aa7be78e3f 100644 --- a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/user_mgao_other_test1.cmap +++ b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/user_mgao_other_test1.cmap @@ -1,67 +1,67 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/user_mgao_other_test2.cmap b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/user_mgao_other_test2.cmap index 4c01061892..0f6f77ddbe 100644 --- a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/user_mgao_other_test2.cmap +++ b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/user_mgao_other_test2.cmap @@ -1,91 +1,91 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/vis_blue.cmap b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/vis_blue.cmap index 93b9b4954a..59ef5dc344 100644 --- a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/vis_blue.cmap +++ b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/vis_blue.cmap @@ -1,131 +1,131 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/vis_early.cmap b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/vis_early.cmap index 4464846c4d..a2773e582c 100644 --- a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/vis_early.cmap +++ b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/vis_early.cmap @@ -1,131 +1,131 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/visgray2.cmap b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/visgray2.cmap index f2c60a186b..349394a97d 100644 --- a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/visgray2.cmap +++ b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/visgray2.cmap @@ -1,131 +1,131 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/visgray3.cmap b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/visgray3.cmap index f2fb402713..1b0b0bf18d 100644 --- a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/visgray3.cmap +++ b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/visgray3.cmap @@ -1,131 +1,131 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/wv_bw.cmap b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/wv_bw.cmap index 3d19874de0..68137ac1e4 100644 --- a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/wv_bw.cmap +++ b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/wv_bw.cmap @@ -1,131 +1,131 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/wv_old.cmap b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/wv_old.cmap index 00b9de94a3..d267765bdb 100644 --- a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/wv_old.cmap +++ b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/wv_old.cmap @@ -1,259 +1,259 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/wv_tpc2.cmap b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/wv_tpc2.cmap index 394cc655f2..d52e70eb01 100644 --- a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/wv_tpc2.cmap +++ b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/wv_tpc2.cmap @@ -1,131 +1,131 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/wv_tpc3.cmap b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/wv_tpc3.cmap index 9ec4ab21ca..918f965034 100644 --- a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/wv_tpc3.cmap +++ b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/wv_tpc3.cmap @@ -1,131 +1,131 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/zbd.cmap b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/zbd.cmap index 41c1f2ab79..1e5830f1da 100644 --- a/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/zbd.cmap +++ b/cave/build/static/common/cave/etc/ncep/ColorMaps/Other/zbd.cmap @@ -1,259 +1,259 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cave/build/static/common/cave/etc/ncep/DefaultRBDs/defaultRBD.xml b/cave/build/static/common/cave/etc/ncep/DefaultRBDs/defaultRBD.xml index c4d181573b..356e181f27 100644 --- a/cave/build/static/common/cave/etc/ncep/DefaultRBDs/defaultRBD.xml +++ b/cave/build/static/common/cave/etc/ncep/DefaultRBDs/defaultRBD.xml @@ -55,7 +55,9 @@ World mapdata.world
- name not in ('CANADA', 'MEXICO', 'UNITED STATES, THE') + the_geom name RGB {255, 228, 220} @@ -68,7 +70,7 @@ PLAN_VIEW - + State Boundaries @@ -101,8 +103,9 @@ PLAN_VIEW + - + Mexico @@ -119,8 +122,9 @@ PLAN_VIEW - + + County Boundaries mapdata.county
diff --git a/cave/build/static/common/cave/etc/ncep/PgenXmlOverlayProducts/hpc050_med.xml b/cave/build/static/common/cave/etc/ncep/PgenXmlOverlayProducts/hpc050_med.xml new file mode 100644 index 0000000000..83e78a1a2e --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/PgenXmlOverlayProducts/hpc050_med.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/cave/build/static/common/cave/etc/ncep/PgenXmlOverlayProducts/locowobnds.xml b/cave/build/static/common/cave/etc/ncep/PgenXmlOverlayProducts/locowobnds.xml new file mode 100644 index 0000000000..6d5a7fff99 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/PgenXmlOverlayProducts/locowobnds.xml @@ -0,0 +1,9603 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cave/build/static/common/cave/etc/ncep/PgenXmlOverlayProducts/ua_bnd.xml b/cave/build/static/common/cave/etc/ncep/PgenXmlOverlayProducts/ua_bnd.xml new file mode 100644 index 0000000000..92b9e9c6ac --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/PgenXmlOverlayProducts/ua_bnd.xml @@ -0,0 +1,2003 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cave/build/static/common/cave/etc/ncep/PgenXmlOverlayProducts/vaacarbnds.xml b/cave/build/static/common/cave/etc/ncep/PgenXmlOverlayProducts/vaacarbnds.xml new file mode 100644 index 0000000000..9265365ea7 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/PgenXmlOverlayProducts/vaacarbnds.xml @@ -0,0 +1,373 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cave/build/static/common/cave/etc/ncep/PlotModels/ConditionalFilters/taf_tempo_prob.xml b/cave/build/static/common/cave/etc/ncep/PlotModels/ConditionalFilters/taf_tempo_prob.xml index e45d0577c6..6ee2d63154 100644 --- a/cave/build/static/common/cave/etc/ncep/PlotModels/ConditionalFilters/taf_tempo_prob.xml +++ b/cave/build/static/common/cave/etc/ncep/PlotModels/ConditionalFilters/taf_tempo_prob.xml @@ -1,4 +1,4 @@ - + diff --git a/cave/build/static/common/cave/etc/ncep/PlotModels/Standard.svg b/cave/build/static/common/cave/etc/ncep/PlotModels/Standard.svg index 3041f9fb5b..b67e37a4cf 100644 --- a/cave/build/static/common/cave/etc/ncep/PlotModels/Standard.svg +++ b/cave/build/static/common/cave/etc/ncep/PlotModels/Standard.svg @@ -5,8 +5,8 @@ xmlns:xlink="http://www.w3.org/1999/xlink"> + units-per-em="10" + alphabetic="0" /> - + LR - + UR - + TC - + LL diff --git a/cave/build/static/common/cave/etc/ncep/PlotModels/bufrmosGFS/12hrpop.xml b/cave/build/static/common/cave/etc/ncep/PlotModels/bufrmosGFS/12hrpop.xml index 95616859e7..ca0447d468 100644 --- a/cave/build/static/common/cave/etc/ncep/PlotModels/bufrmosGFS/12hrpop.xml +++ b/cave/build/static/common/cave/etc/ncep/PlotModels/bufrmosGFS/12hrpop.xml @@ -1,7 +1,7 @@ - + UR diff --git a/cave/build/static/common/cave/etc/ncep/PlotModels/bufrmosGFS/6hrpop.xml b/cave/build/static/common/cave/etc/ncep/PlotModels/bufrmosGFS/6hrpop.xml index 4537377d7a..3acbca874e 100644 --- a/cave/build/static/common/cave/etc/ncep/PlotModels/bufrmosGFS/6hrpop.xml +++ b/cave/build/static/common/cave/etc/ncep/PlotModels/bufrmosGFS/6hrpop.xml @@ -1,7 +1,7 @@ - + UR diff --git a/cave/build/static/common/cave/etc/ncep/PlotModels/bufrmosGFS/fosb.xml b/cave/build/static/common/cave/etc/ncep/PlotModels/bufrmosGFS/fosb.xml index 3ae9c3f780..ddf3ab8381 100644 --- a/cave/build/static/common/cave/etc/ncep/PlotModels/bufrmosGFS/fosb.xml +++ b/cave/build/static/common/cave/etc/ncep/PlotModels/bufrmosGFS/fosb.xml @@ -1,7 +1,7 @@ - + UL diff --git a/cave/build/static/common/cave/etc/ncep/PlotModels/bufrmosGFS/misc.xml b/cave/build/static/common/cave/etc/ncep/PlotModels/bufrmosGFS/misc.xml index cf02c402f1..c22f0fc486 100644 --- a/cave/build/static/common/cave/etc/ncep/PlotModels/bufrmosGFS/misc.xml +++ b/cave/build/static/common/cave/etc/ncep/PlotModels/bufrmosGFS/misc.xml @@ -1,83 +1,83 @@ - + BC - + LL - + TC - + LR - + TC - + BC - + TC - + BC - + UR - + UR - + LR - + LL - + UL - + BC - + TC - + LR diff --git a/cave/build/static/common/cave/etc/ncep/PlotModels/bufrmosGFS/standard.xml b/cave/build/static/common/cave/etc/ncep/PlotModels/bufrmosGFS/standard.xml index cfbad0ecb3..7e1e149183 100644 --- a/cave/build/static/common/cave/etc/ncep/PlotModels/bufrmosGFS/standard.xml +++ b/cave/build/static/common/cave/etc/ncep/PlotModels/bufrmosGFS/standard.xml @@ -1,52 +1,52 @@ - + UL - + UR - + TC - + LL - + LR - + BC - + UL - + UR - + TC - + LL - + LR - + UR diff --git a/cave/build/static/common/cave/etc/ncep/PlotModels/bufrmosLAMP/standard.xml b/cave/build/static/common/cave/etc/ncep/PlotModels/bufrmosLAMP/standard.xml index 5d485e6573..ff96fa5276 100644 --- a/cave/build/static/common/cave/etc/ncep/PlotModels/bufrmosLAMP/standard.xml +++ b/cave/build/static/common/cave/etc/ncep/PlotModels/bufrmosLAMP/standard.xml @@ -1,38 +1,38 @@ - + UL - + LL - + SC - + LR diff --git a/cave/build/static/common/cave/etc/ncep/PlotModels/bufrmosMRF/standard.xml b/cave/build/static/common/cave/etc/ncep/PlotModels/bufrmosMRF/standard.xml index 43c86fd02d..f7c3b9546d 100644 --- a/cave/build/static/common/cave/etc/ncep/PlotModels/bufrmosMRF/standard.xml +++ b/cave/build/static/common/cave/etc/ncep/PlotModels/bufrmosMRF/standard.xml @@ -1,16 +1,16 @@ - + LR diff --git a/cave/build/static/common/cave/etc/ncep/PlotModels/bufrmosNGM/standard.xml b/cave/build/static/common/cave/etc/ncep/PlotModels/bufrmosNGM/standard.xml index 40fac1486f..b5641eb14a 100644 --- a/cave/build/static/common/cave/etc/ncep/PlotModels/bufrmosNGM/standard.xml +++ b/cave/build/static/common/cave/etc/ncep/PlotModels/bufrmosNGM/standard.xml @@ -1,14 +1,14 @@ - + UL - + LL - + LR diff --git a/cave/build/static/common/cave/etc/ncep/PlotModels/bufrua/standard.xml b/cave/build/static/common/cave/etc/ncep/PlotModels/bufrua/standard.xml index 8ab913ad8e..7f7db0bd60 100644 --- a/cave/build/static/common/cave/etc/ncep/PlotModels/bufrua/standard.xml +++ b/cave/build/static/common/cave/etc/ncep/PlotModels/bufrua/standard.xml @@ -5,23 +5,23 @@ plugin="bufrua" name="standard" svgTemplate="standardPlotModelTemplate.svg"> - + UL - + UR - + LL - + LR - + WD diff --git a/cave/build/static/common/cave/etc/ncep/PlotModels/modelsounding/basicNAM.xml b/cave/build/static/common/cave/etc/ncep/PlotModels/modelsounding/basicNAM.xml index 6ee4096621..ecc003f6cb 100644 --- a/cave/build/static/common/cave/etc/ncep/PlotModels/modelsounding/basicNAM.xml +++ b/cave/build/static/common/cave/etc/ncep/PlotModels/modelsounding/basicNAM.xml @@ -1,49 +1,49 @@ - + MC - + UL - + LL - + ML - + MR - + TR - + BR - + LC - + BC +textFont="Standard" textSize="14" paramName="TBSY"> TC +textFont="Standard" textSize="14" paramName="TMPC"> UL +textFont="Standard" textSize="14" paramName="FELV"> LL +textFont="Standard" textSize="14" paramName="ICSY"> MR +textFont="Standard" textSize="14" paramName="STID"> LR +textFont="Standard" textSize="14" paramName="TPOI"> UC +textFont="Standard" textSize="14" paramName="ICSY"> UR +textFont="Standard" textSize="14" paramName="STID"> MC +textFont="Standard" textSize="14" paramName="FELV"> LC +textFont="Standard" textSize="14" paramName="TBSY"> UL diff --git a/cave/build/static/common/cave/etc/ncep/PlotModels/ncpafm/standard.xml b/cave/build/static/common/cave/etc/ncep/PlotModels/ncpafm/standard.xml index 1ae5c11d01..23cd2b455e 100644 --- a/cave/build/static/common/cave/etc/ncep/PlotModels/ncpafm/standard.xml +++ b/cave/build/static/common/cave/etc/ncep/PlotModels/ncpafm/standard.xml @@ -1,50 +1,50 @@ - + TC - + UL - + UC - + UR - + ML - + MR - + LL - + LC - + WD diff --git a/cave/build/static/common/cave/etc/ncep/PlotModels/ncpirep/standard.xml b/cave/build/static/common/cave/etc/ncep/PlotModels/ncpirep/standard.xml index 65494863c7..db0b3c9f70 100644 --- a/cave/build/static/common/cave/etc/ncep/PlotModels/ncpirep/standard.xml +++ b/cave/build/static/common/cave/etc/ncep/PlotModels/ncpirep/standard.xml @@ -10,20 +10,20 @@ have not been implemented yet for airep --> +textFont="Standard" textSize="14" paramName="TPOI"> UC +textFont="Standard" textSize="14" paramName="STID"> MC +textFont="Standard" textSize="14" paramName="FELV"> LC +textFont="Standard" textSize="14" paramName="TBSY"> UL +textFont="Standard" textSize="14" paramName="ICSY"> UR diff --git a/cave/build/static/common/cave/etc/ncep/PlotModels/ncscd/standard.xml b/cave/build/static/common/cave/etc/ncep/PlotModels/ncscd/standard.xml index e8bcfcca7f..5df78b487b 100644 --- a/cave/build/static/common/cave/etc/ncep/PlotModels/ncscd/standard.xml +++ b/cave/build/static/common/cave/etc/ncep/PlotModels/ncscd/standard.xml @@ -1,34 +1,34 @@ - + UL - + ML - + LL - + UR - + LR - + BC diff --git a/cave/build/static/common/cave/etc/ncep/PlotModels/nctaf/simple.xml b/cave/build/static/common/cave/etc/ncep/PlotModels/nctaf/simple.xml index 0e3deaa413..dbd95ad9a8 100644 --- a/cave/build/static/common/cave/etc/ncep/PlotModels/nctaf/simple.xml +++ b/cave/build/static/common/cave/etc/ncep/PlotModels/nctaf/simple.xml @@ -1,38 +1,38 @@ - + UL - + LL - + SC - + WD - - + LR - + TC - + UR - + LM diff --git a/cave/build/static/common/cave/etc/ncep/PlotModels/nctaf/standard.xml b/cave/build/static/common/cave/etc/ncep/PlotModels/nctaf/standard.xml index d7853d0259..a1a967caad 100644 --- a/cave/build/static/common/cave/etc/ncep/PlotModels/nctaf/standard.xml +++ b/cave/build/static/common/cave/etc/ncep/PlotModels/nctaf/standard.xml @@ -1,14 +1,14 @@ - + SC - + ML - + LR diff --git a/cave/build/static/common/cave/etc/ncep/PlotModels/nctaf/tempo_flt_condition.xml b/cave/build/static/common/cave/etc/ncep/PlotModels/nctaf/tempo_flt_condition.xml index c00ee75b40..0e6ff9cdfa 100644 --- a/cave/build/static/common/cave/etc/ncep/PlotModels/nctaf/tempo_flt_condition.xml +++ b/cave/build/static/common/cave/etc/ncep/PlotModels/nctaf/tempo_flt_condition.xml @@ -1,30 +1,30 @@ - + UL - + LL - + SC - + UR - + LR - + TC - + BC diff --git a/cave/build/static/common/cave/etc/ncep/PlotModels/nctaf/tempo_prob.xml b/cave/build/static/common/cave/etc/ncep/PlotModels/nctaf/tempo_prob.xml index 41d35ace04..949ee03688 100644 --- a/cave/build/static/common/cave/etc/ncep/PlotModels/nctaf/tempo_prob.xml +++ b/cave/build/static/common/cave/etc/ncep/PlotModels/nctaf/tempo_prob.xml @@ -1,30 +1,30 @@ - + UL - + LL - + SC - + UR - + LR - + TC - + BC diff --git a/cave/build/static/common/cave/etc/ncep/PlotModels/ncuair/standard.xml b/cave/build/static/common/cave/etc/ncep/PlotModels/ncuair/standard.xml index d195d6eaba..4d351e8460 100644 --- a/cave/build/static/common/cave/etc/ncep/PlotModels/ncuair/standard.xml +++ b/cave/build/static/common/cave/etc/ncep/PlotModels/ncuair/standard.xml @@ -5,23 +5,23 @@ plugin="ncuair" name="standard" svgTemplate="standardPlotModelTemplate.svg"> - + UL - + UR - + LL - + LR - + WD diff --git a/cave/build/static/common/cave/etc/ncep/PlotModels/obs/simple.xml b/cave/build/static/common/cave/etc/ncep/PlotModels/obs/simple.xml index 5bc098fabb..6681d64d69 100644 --- a/cave/build/static/common/cave/etc/ncep/PlotModels/obs/simple.xml +++ b/cave/build/static/common/cave/etc/ncep/PlotModels/obs/simple.xml @@ -4,7 +4,7 @@ plugin="obs" svgTemplate="standardPlotModelTemplate.svg"> - + UL @@ -12,7 +12,7 @@ ML - + LL diff --git a/cave/build/static/common/cave/etc/ncep/PlotModels/obs/standard.xml b/cave/build/static/common/cave/etc/ncep/PlotModels/obs/standard.xml index 7e4b6ff7e7..4678fb19fc 100644 --- a/cave/build/static/common/cave/etc/ncep/PlotModels/obs/standard.xml +++ b/cave/build/static/common/cave/etc/ncep/PlotModels/obs/standard.xml @@ -1,40 +1,40 @@ - + UL - + LL - + BC - + LR - + UR - + SC - + WD - + ML - + MR diff --git a/cave/build/static/common/cave/etc/ncep/PlotModels/obs/standard2.xml b/cave/build/static/common/cave/etc/ncep/PlotModels/obs/standard2.xml index c3d11a4e40..45944bc6d7 100644 --- a/cave/build/static/common/cave/etc/ncep/PlotModels/obs/standard2.xml +++ b/cave/build/static/common/cave/etc/ncep/PlotModels/obs/standard2.xml @@ -1,42 +1,42 @@ - + UL - + LL - + BC - + LR - + UR - + SC - + WD - + ML - + MR - + LC diff --git a/cave/build/static/common/cave/etc/ncep/PlotModels/sfcobs/bouys.xml b/cave/build/static/common/cave/etc/ncep/PlotModels/sfcobs/bouys.xml index e51feb6fbf..5cbd00d02d 100644 --- a/cave/build/static/common/cave/etc/ncep/PlotModels/sfcobs/bouys.xml +++ b/cave/build/static/common/cave/etc/ncep/PlotModels/sfcobs/bouys.xml @@ -1,18 +1,18 @@ - + WD - + UL - + UR - + ML diff --git a/cave/build/static/common/cave/etc/ncep/PlotModels/sfcobs/ship_standard.xml b/cave/build/static/common/cave/etc/ncep/PlotModels/sfcobs/ship_standard.xml index 976ac6d526..d6e3e566d6 100644 --- a/cave/build/static/common/cave/etc/ncep/PlotModels/sfcobs/ship_standard.xml +++ b/cave/build/static/common/cave/etc/ncep/PlotModels/sfcobs/ship_standard.xml @@ -1,44 +1,44 @@ - + UL - + ML - + LL - + SC - + WD - + UR - + MR - + LR - + TC - + BC diff --git a/cave/build/static/common/cave/etc/ncep/PlotModels/sfcobs/synop_standard.xml b/cave/build/static/common/cave/etc/ncep/PlotModels/sfcobs/synop_standard.xml index 4258a9b1bf..8d1b41bbdf 100644 --- a/cave/build/static/common/cave/etc/ncep/PlotModels/sfcobs/synop_standard.xml +++ b/cave/build/static/common/cave/etc/ncep/PlotModels/sfcobs/synop_standard.xml @@ -1,42 +1,42 @@ - + UL - + ML - + LL - + SC - + WD - + UR - + MR - + LR - + BC - + LC diff --git a/cave/build/static/common/cave/etc/ncep/PlotModels/standardPlotModelTemplate.svg b/cave/build/static/common/cave/etc/ncep/PlotModels/standardPlotModelTemplate.svg index 7ce4be2933..3fdbce6c6a 100644 --- a/cave/build/static/common/cave/etc/ncep/PlotModels/standardPlotModelTemplate.svg +++ b/cave/build/static/common/cave/etc/ncep/PlotModels/standardPlotModelTemplate.svg @@ -1,6 +1,6 @@ - @@ -11,7 +11,7 @@ xmlns:xlink="http://www.w3.org/1999/xlink" style="stroke: rgb(255,255,255);"> src: url(../ncep/PlotModels/WindSymbols.svg#WindSymbols); } @font-face { font-family: "StandardFont"; - src: url(Standard.svg#Standard); } + src: url(../ncep/PlotModels/Standard.svg#Standard); } @font-face { font-family: "CourierNormalFont"; src: url(../ncep/PlotModels/CourierNormal.svg#CourierNormal); } @@ -69,9 +69,9 @@ xmlns:xlink="http://www.w3.org/1999/xlink" style="stroke: rgb(255,255,255);"> err err - err - err - err + err + err + err arrow diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/ENSEMBLE/GEFS_ENS.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/ENSEMBLE/GEFS_ENS.xml new file mode 100644 index 0000000000..0caf0859bb --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/ENSEMBLE/GEFS_ENS.xml @@ -0,0 +1,22 @@ + + + true + true + GEFS_ENS + ENSEMBLE + +primaryModel=gefs +availableModels=gefs:01,02;gfs;nam12 +pluginName=grid + + Forecast,Global,Ensemble + EnsembleFcstGridContours + + + CLOSEST_BEFORE_OR_AFTER + 60 + USE_DATA_TIMES + 10 + 48 + BasicWX_US + diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/ENSEMBLE/GFS_ENS.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/ENSEMBLE/GFS_ENS.xml index 0c730e6d4e..9babedc824 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/ENSEMBLE/GFS_ENS.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/ENSEMBLE/GFS_ENS.xml @@ -1,12 +1,13 @@ true + true GFS_ENS ENSEMBLE primaryModel=gfs availableModels=gfs -pluginName=ncgrib +pluginName=grid Forecast,Global,Ensemble EnsembleFcstGridContours diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/ENSEMBLE/NAM_00.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/ENSEMBLE/NAM_00.xml index d3c854a6b7..875d5a1a0c 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/ENSEMBLE/NAM_00.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/ENSEMBLE/NAM_00.xml @@ -1,12 +1,13 @@ true + true NAM_00 ENSEMBLE primaryModel=nam availableModels=nam;gefs:01,02,03,04,05,07,09;gfs;ruc80 -pluginName=ncgrib +pluginName=grid Forecast,Ensemble EnsembleFcstGridContours diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/GRID/AVIATION/AVIATION.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/GRID/CMC/CMC.xml similarity index 72% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/GRID/AVIATION/AVIATION.xml rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/GRID/CMC/CMC.xml index 25047846b3..901ab27561 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/GRID/AVIATION/AVIATION.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/GRID/CMC/CMC.xml @@ -1,14 +1,15 @@ true - AVIATION + true + CMC GRID -GDFILE=aviation -pluginName=ncgrib -eventName=% +GDFILE=cmc +pluginName=grid +info.secondaryId=% - Forecast + Forecast,Global ModelFcstGridContours @@ -16,6 +17,6 @@ eventName=% 60 USE_DATA_TIMES 10 - 48 + 384 BasicWX_US - + \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/OPC/OPC.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/GRID/ECMWFG/ECMWFG.xml similarity index 54% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/OPC/OPC.xml rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/GRID/ECMWFG/ECMWFG.xml index 08236b45bc..f715a443d5 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/OPC/OPC.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/GRID/ECMWFG/ECMWFG.xml @@ -1,22 +1,22 @@ true - OPC - OVERLAY + true + ECMWFG + GRID -dbName=ncep -tableName=bounds.opcbnds -labelField=area -mapName=OPC +GDFILE=ecmwfg +pluginName=grid +info.secondaryId=% - NaturalFeatures - DbOverlay + Forecast,Global + ModelFcstGridContours CLOSEST_BEFORE_OR_AFTER - 0 + 60 USE_DATA_TIMES - 10 - 24 + 999 + 240 BasicWX_US \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/GRID/ECMWFT/ECMWFT.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/GRID/ECMWFT/ECMWFT.xml new file mode 100644 index 0000000000..705a88b9d3 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/GRID/ECMWFT/ECMWFT.xml @@ -0,0 +1,22 @@ + + + true + true + ECMWFT + GRID + +GDFILE=ecmwft +pluginName=grid +info.secondaryId=% + + Forecast,Global + ModelFcstGridContours + + + CLOSEST_BEFORE_OR_AFTER + 60 + USE_DATA_TIMES + 999 + 240 + BasicWX_US + diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/GRID/RUC40/RUC40.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/GRID/FNMOCWAVE/FNMOCWAVE.xml similarity index 71% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/GRID/RUC40/RUC40.xml rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/GRID/FNMOCWAVE/FNMOCWAVE.xml index b13adff0cd..61cb7871df 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/GRID/RUC40/RUC40.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/GRID/FNMOCWAVE/FNMOCWAVE.xml @@ -1,14 +1,15 @@ true - RUC40 + true + FNMOCWAVE GRID -GDFILE=ruc40 -pluginName=ncgrib -eventName=% +GDFILE=fnmocwave +pluginName=grid +info.secondaryId=% - Forecast,Regional + Forecast,Global ModelFcstGridContours @@ -16,6 +17,6 @@ eventName=% 60 USE_DATA_TIMES 10 - 48 + 384 BasicWX_US - + \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/GRID/NOGAPS/NOGAPS.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/GRID/NOGAPS/NOGAPS.xml new file mode 100644 index 0000000000..262c020ac8 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/GRID/NOGAPS/NOGAPS.xml @@ -0,0 +1,22 @@ + + + true + true + NOGAPS + GRID + +GDFILE=nogaps +pluginName=grid +info.secondaryId=% + + Forecast,Global + ModelFcstGridContours + + + CLOSEST_BEFORE_OR_AFTER + 60 + USE_DATA_TIMES + 999 + 240 + BasicWX_US + \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/GRID/NWW3/NWW3.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/GRID/NWW3/NWW3.xml new file mode 100644 index 0000000000..e9822aa96a --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/GRID/NWW3/NWW3.xml @@ -0,0 +1,22 @@ + + + true + true + NWW3 + GRID + +GDFILE=nww3 +pluginName=grid +info.secondaryId=% + + Forecast,Global + ModelFcstGridContours + + + CLOSEST_BEFORE_OR_AFTER + 60 + USE_DATA_TIMES + 999 + 144 + BasicWX_US + diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/GRID/RUC/RUC.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/GRID/RAP/RAP.xml similarity index 89% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/GRID/RUC/RUC.xml rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/GRID/RAP/RAP.xml index f8589e8ee2..880992793a 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/GRID/RUC/RUC.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/GRID/RAP/RAP.xml @@ -1,12 +1,12 @@ true - RUC + RAP GRID -GDFILE=ruc80 -pluginName=ncgrib -eventName=% +GDFILE=rap +pluginName=grid +info.secondaryId=% Forecast,Regional ModelFcstGridContours diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/MISC/ATCF/ATCF.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/MISC/ATCF/ATCF.xml index a9782556fe..0f1b18051b 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/MISC/ATCF/ATCF.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/MISC/ATCF/ATCF.xml @@ -1,6 +1,7 @@ true + true ATCF MISC diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/MISC/ENS_CYC/ENS_CYC.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/MISC/ENS_CYC/ENS_CYC.xml index ff11d02701..bcb49e591a 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/MISC/ENS_CYC/ENS_CYC.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/MISC/ENS_CYC/ENS_CYC.xml @@ -1,6 +1,7 @@ true + true ENS_CYC MISC diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/MISC/FFA/default.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/MISC/FFA/default.attr index c78205c999..62e2816e10 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/MISC/FFA/default.attr +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/MISC/FFA/default.attr @@ -3,27 +3,27 @@ flashFloodAdvisoryEnable=true flashFloodAdvisoryColor=RGB {0, 255, 0} flashFloodAdvisorySymbolWidth=2 -flashFloodAdvisorySymbolSize=1 +flashFloodAdvisorySymbolSize=2 ! flashFloodWarningEnable=true flashFloodWarningColor=RGB {255, 255, 0} flashFloodWarningSymbolWidth=2 -flashFloodWarningSymbolSize=1 +flashFloodWarningSymbolSize=2 ! flashFloodWatchEnable=true -flashFloodWatchColor=RGB {145, 44, 238} +flashFloodWatchColor=RGB {236, 114, 11} flashFloodWatchSymbolWidth=2 -flashFloodWatchSymbolSize=1 +flashFloodWatchSymbolSize=2 ! flashFloodStatementEnable=true -flashFloodStatementColor=RGB {205, 133, 0} +flashFloodStatementColor=RGB {242, 250, 16} flashFloodStatementSymbolWidth=2 -flashFloodStatementSymbolSize=1 +flashFloodStatementSymbolSize=2 ! timeEnable=true -countyOrZoneNameEnable=true -immediateCauseEnable=true -outlineEnable=true +countyOrZoneNameEnable=false +immediateCauseEnable=false +outlineEnable=false ! !outlineLineWidth=3.0 !symbolSizeScale=1.0 \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/MISC/HRCN/HRCN.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/MISC/HRCN/HRCN.xml index 28206890a9..e711d918d4 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/MISC/HRCN/HRCN.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/MISC/HRCN/HRCN.xml @@ -8,7 +8,7 @@ pluginName=tcm reportType=TCM color= {155, 155, 155} - Huh,Event + Hurricane HRCN diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/MISC/OSCT/OSCT.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/MISC/OSCT/OSCT.xml new file mode 100644 index 0000000000..a96776ccfd --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/MISC/OSCT/OSCT.xml @@ -0,0 +1,22 @@ + + + true + OSCT + MISC + +pluginName=ncscat +! the reportType may be overridden in an attrSet file +reportType=oscat +color=RGB {155, 155, 155} + + SCAT + SCAT + + + CLOSEST_BEFORE_OR_AFTER + 360 + USE_FRAME_INTERVAL + 10 + 24 + BasicWX_US + diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/MISC/OSCT/ambig1_hi.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/MISC/OSCT/ambig1_hi.attr new file mode 100644 index 0000000000..4c3797972c --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/MISC/OSCT/ambig1_hi.attr @@ -0,0 +1,26 @@ +! Attributes for OSCAT - High Resolution - Ambiguity 1 +! +! frame interval in minutes +! the reportType could alternatively be set in the .prm file +reportType=oscat-hi-ambig1 + +colorBar1=@ColorBars/SCAT/ambig1ColorBar1.xml +colorBar2=@ColorBars/SCAT/ambig1ColorBar2.xml +! +skipEnable=false +skipValue=5 +densityValue=50 +timeStampEnable=true +timeStampColor=RGB {255, 255, 255} +timeStampInterval=30 +timeStampLineWidth=1 +arrowStyle=WIND_BARB +arrowWidth=1 +arrowSize=2 +headSize=4 +highWindSpeedEnable=true +lowWindSpeedEnable=true +rainFlagEnable=true +availabilityFlagEnable=true +use2ndColorForRainEnable=false +plotCirclesForRainEnable=true diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/MISC/OSCT/ambig2_hi.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/MISC/OSCT/ambig2_hi.attr new file mode 100644 index 0000000000..c4ca652b8b --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/MISC/OSCT/ambig2_hi.attr @@ -0,0 +1,26 @@ +! Attributes for OSCAT - High Resolution - Ambiguity 2 +! +! frame interval in minutes +! the reportType could alternatively be set in the .prm file +reportType=oscat-hi-ambig2 + +colorBar1=@ColorBars/SCAT/ambig2ColorBar1.xml +colorBar2=@ColorBars/SCAT/ambig2ColorBar2.xml +! +skipEnable=false +skipValue=5 +densityValue=50 +timeStampEnable=true +timeStampColor=RGB {255, 255, 255} +timeStampInterval=30 +timeStampLineWidth=1 +arrowStyle=WIND_BARB +arrowWidth=1 +arrowSize=2 +headSize=4 +highWindSpeedEnable=true +lowWindSpeedEnable=true +rainFlagEnable=true +availabilityFlagEnable=true +use2ndColorForRainEnable=false +plotCirclesForRainEnable=true diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/MISC/OSCT/ambig3_hi.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/MISC/OSCT/ambig3_hi.attr new file mode 100644 index 0000000000..7e87c22afb --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/MISC/OSCT/ambig3_hi.attr @@ -0,0 +1,26 @@ +! Attributes for OSCAT - High Resolution - Ambiguity 3 +! +! frame interval in minutes +! the reportType could alternatively be set in the .prm file +reportType=oscat-hi-ambig3 + +colorBar1=@ColorBars/SCAT/ambig3ColorBar1.xml +colorBar2=@ColorBars/SCAT/ambig3ColorBar2.xml +! +skipEnable=false +skipValue=5 +densityValue=50 +timeStampEnable=true +timeStampColor=RGB {255, 255, 255} +timeStampInterval=30 +timeStampLineWidth=1 +arrowStyle=WIND_BARB +arrowWidth=1 +arrowSize=2 +headSize=4 +highWindSpeedEnable=true +lowWindSpeedEnable=true +rainFlagEnable=true +availabilityFlagEnable=true +use2ndColorForRainEnable=false +plotCirclesForRainEnable=true diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/MISC/OSCT/ambig4_hi.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/MISC/OSCT/ambig4_hi.attr new file mode 100644 index 0000000000..e3ce1ce87b --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/MISC/OSCT/ambig4_hi.attr @@ -0,0 +1,26 @@ +! Attributes for OSCAT - High Resolution - Ambiguity 4 +! +! frame interval in minutes +! the reportType could alternatively be set in the .prm file +reportType=oscat-hi-ambig4 + +colorBar1=@ColorBars/SCAT/ambig4ColorBar1.xml +colorBar2=@ColorBars/SCAT/ambig4ColorBar2.xml +! +skipEnable=false +skipValue=5 +densityValue=50 +timeStampEnable=true +timeStampColor=RGB {255, 255, 255} +timeStampInterval=30 +timeStampLineWidth=1 +arrowStyle=WIND_BARB +arrowWidth=1 +arrowSize=2 +headSize=4 +highWindSpeedEnable=true +lowWindSpeedEnable=true +rainFlagEnable=true +availabilityFlagEnable=true +use2ndColorForRainEnable=false +plotCirclesForRainEnable=true diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/MISC/OSCT/default.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/MISC/OSCT/default.attr new file mode 100644 index 0000000000..60c074fe24 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/MISC/OSCT/default.attr @@ -0,0 +1,26 @@ +! Attributes for OSCAT - Low Resolution +! +! frame interval in minutes +! the reportType could alternatively be set in the .prm file +reportType=oscat + +colorBar1=@ColorBars/SCAT/defaultColorBar1.xml +colorBar2=@ColorBars/SCAT/defaultColorBar2.xml +! +skipEnable=false +skipValue=5 +densityValue=50 +timeStampEnable=true +timeStampColor=RGB {255, 255, 255} +timeStampInterval=30 +timeStampLineWidth=1 +arrowStyle=WIND_BARB +arrowWidth=1 +arrowSize=2 +headSize=4 +highWindSpeedEnable=true +lowWindSpeedEnable=true +rainFlagEnable=true +availabilityFlagEnable=true +use2ndColorForRainEnable=false +plotCirclesForRainEnable=true diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/MISC/OSCT/default_hi.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/MISC/OSCT/default_hi.attr new file mode 100644 index 0000000000..db28d89c83 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/MISC/OSCT/default_hi.attr @@ -0,0 +1,26 @@ +! Attributes for OSCAT - High Resolution +! +! frame interval in minutes +! the reportType could alternatively be set in the .prm file +reportType=oscat-hi + +colorBar1=@ColorBars/SCAT/defaultColorBar1.xml +colorBar2=@ColorBars/SCAT/defaultColorBar2.xml +! +skipEnable=false +skipValue=5 +densityValue=50 +timeStampEnable=true +timeStampColor=RGB {255, 255, 255} +timeStampInterval=30 +timeStampLineWidth=1 +arrowStyle=WIND_BARB +arrowWidth=1 +arrowSize=2 +headSize=4 +highWindSpeedEnable=true +lowWindSpeedEnable=true +rainFlagEnable=true +availabilityFlagEnable=true +use2ndColorForRainEnable=false +plotCirclesForRainEnable=true diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/MISC/SGWH/WaveSat.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/MISC/SGWH/WaveSat.xml index fac8d5d38c..d421de2b2c 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/MISC/SGWH/WaveSat.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/MISC/SGWH/WaveSat.xml @@ -1,6 +1,7 @@ true + true SGWH MISC diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/MISC/SVRL/default.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/MISC/SVRL/default.attr index bb8d5961ba..0705e27bbe 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/MISC/SVRL/default.attr +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/MISC/SVRL/default.attr @@ -8,48 +8,47 @@ tornadoEnable=true tornadoColor=RGB {250, 42, 22} tornadoSymbolWidth=1 tornadoSymbolSize=1 -Watchxxx0Enable=false +Watchxxx0Enable=true Watchxxx0Color=RGB {248, 56, 232} Watchxxx0SymbolWidth=1 Watchxxx0SymbolSize=1 -Watchxxx1Enable=false +Watchxxx1Enable=true Watchxxx1Color=RGB {104, 243, 7} Watchxxx1SymbolWidth=1 Watchxxx1SymbolSize=1 -Watchxxx2Enable=false +Watchxxx2Enable=true Watchxxx2Color=RGB {18, 150, 235} Watchxxx2SymbolWidth=1 Watchxxx2SymbolSize=1 -Watchxxx3Enable=false +Watchxxx3Enable=true Watchxxx3Color=RGB {249, 201, 4} Watchxxx3SymbolWidth=1 Watchxxx3SymbolSize=1 -Watchxxx4Enable=false +Watchxxx4Enable=true Watchxxx4Color=RGB {207, 0, 0} Watchxxx4SymbolWidth=1 Watchxxx4SymbolSize=1 -Watchxxx5Enable=false +Watchxxx5Enable=true Watchxxx5Color=RGB {121, 63, 55} Watchxxx5SymbolWidth=1 Watchxxx5SymbolSize=1 -Watchxxx6Enable=false +Watchxxx6Enable=true Watchxxx6Color=RGB {119, 34, 204} Watchxxx6SymbolWidth=1 Watchxxx6SymbolSize=1 -Watchxxx7Enable=false +Watchxxx7Enable=true Watchxxx7Color=RGB {242, 250, 16} Watchxxx7SymbolWidth=1 Watchxxx7SymbolSize=1 -Watchxxx8Enable=false +Watchxxx8Enable=true Watchxxx8Color=RGB {21, 16, 250} Watchxxx8SymbolWidth=1 Watchxxx8SymbolSize=1 -Watchxxx9Enable=false +Watchxxx9Enable=true Watchxxx9Color=RGB {236, 114, 11} Watchxxx9SymbolWidth=1 Watchxxx9SymbolSize=1 watchBoxTimeEnable=true watchBoxLabelEnable=false -watchBoxNumberEnable=false colorCodeEnable=false watchBoxOutlineEnable=false diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/MISC/WARN/default.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/MISC/WARN/default.attr index 1d67213058..202b014cb0 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/MISC/WARN/default.attr +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/MISC/WARN/default.attr @@ -3,15 +3,15 @@ thunderstormEnable=true thunderstormColor=RGB {10, 232, 243} thunderstormSymbolWidth=3 -thunderstormSymbolSize=1 +thunderstormSymbolSize=2 tornadoEnable=true tornadoColor=RGB {243, 10, 15} tornadoSymbolWidth=3 -tornadoSymbolSize=1 +tornadoSymbolSize=2 flashFloodEnable=true -flashFloodColor=RGB {238, 243, 24} +flashFloodColor=RGB {10, 243, 24} flashFloodSymbolWidth=3 -flashFloodSymbolSize=1 +flashFloodSymbolSize=2 timeEnable=true countyNameEnable=false countyOutlineEnable=false diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/MISC/WATCH/WATCH.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/MISC/WATCH/WATCH.xml index cffe9c32b0..493f3acca1 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/MISC/WATCH/WATCH.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/MISC/WATCH/WATCH.xml @@ -5,7 +5,7 @@ MISC pluginName=aww -reportType=THUNDERSTORM_REPORT,TORNADO_REPORT,WATCH_COUNTY_NOTIFICATION +reportType=THUNDERSTORM_REPORT,TORNADO_REPORT,STATUS_REPORT color=RGB {155, 155, 155} legendName=WATCH diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/MISC/WATCH/default.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/MISC/WATCH/default.attr index f91282bff3..df4b33cd25 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/MISC/WATCH/default.attr +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/MISC/WATCH/default.attr @@ -9,39 +9,39 @@ tornadoLineWidth=1 statusEnable=true statusColor=RGB {239, 96, 82} statusLineWidth=1 -watchxxx0Enable=false +watchxxx0Enable=true watchxxx0Color=RGB {248, 56, 232} watchxxx0LineWidth=1 -watchxxx1Enable=false +watchxxx1Enable=true watchxxx1Color=RGB {104, 243, 7} watchxxx1LineWidth=1 -watchxxx2Enable=false +watchxxx2Enable=true watchxxx2Color=RGB {18, 150, 235} watchxxx2LineWidth=1 -watchxxx3Enable=false +watchxxx3Enable=true watchxxx3Color=RGB {249, 201, 4} watchxxx3LineWidth=1 -watchxxx4Enable=false +watchxxx4Enable=true watchxxx4Color=RGB {207, 0, 0} watchxxx4LineWidth=1 -watchxxx5Enable=false +watchxxx5Enable=true watchxxx5Color=RGB {121, 63, 55} watchxxx5LineWidth=1 -watchxxx6Enable=false +watchxxx6Enable=true watchxxx6Color=RGB {119, 34, 204} watchxxx6LineWidth=1 -watchxxx7Enable=false +watchxxx7Enable=true watchxxx7Color=RGB {242, 250, 16} watchxxx7LineWidth=1 -watchxxx8Enable=false +watchxxx8Enable=true watchxxx8Color=RGB {21, 16, 250} watchxxx8LineWidth=1 -watchxxx9Enable=false +watchxxx9Enable=true watchxxx9Color=RGB {236, 114, 11} watchxxx9LineWidth=1 watchBoxTimeEnable=true statusLinesTimeEnable=false -watchBoxNumberEnable=false +watchBoxNumberEnable=true statusLinesNumberEnable=false colorCodeEnable=false mostRecentStatusEnable=false diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/MISC/WCN/colorCodedMarkers.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/MISC/WCN/colorCodedMarkers.attr index 901fd7d195..095042e983 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/MISC/WCN/colorCodedMarkers.attr +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/MISC/WCN/colorCodedMarkers.attr @@ -64,7 +64,7 @@ watchBoxTimeEnable=true watchBoxLabelEnable=true watchBoxNumberEnable=true colorCodeEnable=true -watchBoxMarkerEnable=false +watchBoxMarkerEnable=true watchBoxOutlineEnable=false watchBoxFillEnable=false watchBoxUnionEnable=false diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/MISC/WCN/default.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/MISC/WCN/default.attr index df8853594d..4b38620426 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/MISC/WCN/default.attr +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/MISC/WCN/default.attr @@ -3,68 +3,68 @@ thunderstormEnable=true thunderstormColor=RGB {109, 246, 254} thunderstormSymbolWidth=1 -thunderstormSymbolSize=1 +thunderstormSymbolSize=2 thunderstormSymbolColor=RGB {19, 131, 242} tornadoEnable=true tornadoColor=RGB {250, 42, 22} tornadoSymbolWidth=1 -tornadoSymbolSize=1 +tornadoSymbolSize=2 tornadoSymbolColor=RGB {239, 96, 82} Watchxxx0Enable=true Watchxxx0Color=RGB {248, 56, 232} Watchxxx0SymbolWidth=1 -Watchxxx0SymbolSize=1 +Watchxxx0SymbolSize=2 Watchxxx0SymbolColor=RGB {255, 174, 185} Watchxxx1Enable=true Watchxxx1Color=RGB {104, 243, 7} Watchxxx1SymbolWidth=1 -Watchxxx1SymbolSize=1 +Watchxxx1SymbolSize=2 Watchxxx1SymbolColor=RGB {255, 174, 185} Watchxxx2Enable=true Watchxxx2Color=RGB {18, 150, 235} Watchxxx2SymbolWidth=1 -Watchxxx2SymbolSize=1 +Watchxxx2SymbolSize=2 Watchxxx2SymbolColor=RGB {255, 174, 185} Watchxxx3Enable=true Watchxxx3Color=RGB {249, 201, 4} Watchxxx3SymbolWidth=1 -Watchxxx3SymbolSize=1 +Watchxxx3SymbolSize=2 Watchxxx3SymbolColor=RGB {255, 174, 185} Watchxxx4Enable=true Watchxxx4Color=RGB {207, 0, 0} Watchxxx4SymbolWidth=1 -Watchxxx4SymbolSize=1 +Watchxxx4SymbolSize=2 Watchxxx4SymbolColor=RGB {255, 174, 185} Watchxxx5Enable=true Watchxxx5Color=RGB {121, 63, 55} Watchxxx5SymbolWidth=1 -Watchxxx5SymbolSize=1 +Watchxxx5SymbolSize=2 Watchxxx5SymbolColor=RGB {255, 174, 185} Watchxxx6Enable=true Watchxxx6Color=RGB {119, 34, 204} Watchxxx6SymbolWidth=1 -Watchxxx6SymbolSize=1 +Watchxxx6SymbolSize=2 Watchxxx6SymbolColor=RGB {255, 174, 185} Watchxxx7Enable=true Watchxxx7Color=RGB {242, 250, 16} Watchxxx7SymbolWidth=1 -Watchxxx7SymbolSize=1 +Watchxxx7SymbolSize=2 Watchxxx7SymbolColor=RGB {255, 174, 185} Watchxxx8Enable=true Watchxxx8Color=RGB {21, 16, 250} Watchxxx8SymbolWidth=1 -Watchxxx8SymbolSize=1 +Watchxxx8SymbolSize=2 Watchxxx8SymbolColor=RGB {255, 174, 185} Watchxxx9Enable=true Watchxxx9Color=RGB {236, 114, 11} Watchxxx9SymbolWidth=1 -Watchxxx9SymbolSize=1 +Watchxxx9SymbolSize=2 Watchxxx9SymbolColor=RGB {255, 174, 185} watchBoxTimeEnable=true watchBoxLabelEnable=false watchBoxNumberEnable=false colorCodeEnable=false -watchBoxMarkerEnable=false +watchBoxMarkerEnable=true watchBoxOutlineEnable=false watchBoxFillEnable=false watchBoxUnionEnable=false diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/MISC/WOU/default.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/MISC/WOU/default.attr index 888674c8d0..ee4d38a80f 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/MISC/WOU/default.attr +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/MISC/WOU/default.attr @@ -3,62 +3,62 @@ thunderstormEnable=true thunderstormColor=RGB {109, 246, 254} thunderstormSymbolWidth=1 -thunderstormSymbolSize=1 +thunderstormSymbolSize=2 thunderstormSymbolColor=RGB {19, 131, 242} tornadoEnable=true tornadoColor=RGB {250, 42, 22} tornadoSymbolWidth=1 -tornadoSymbolSize=1 +tornadoSymbolSize=2 tornadoSymbolColor=RGB {239, 96, 82} -Watchxxx0Enable=false +Watchxxx0Enable=true Watchxxx0Color=RGB {248, 56, 232} Watchxxx0SymbolWidth=1 -Watchxxx0SymbolSize=1 +Watchxxx0SymbolSize=2 Watchxxx0SymbolColor=RGB {255, 174, 185} -Watchxxx1Enable=false +Watchxxx1Enable=true Watchxxx1Color=RGB {104, 243, 7} Watchxxx1SymbolWidth=1 -Watchxxx1SymbolSize=1 +Watchxxx1SymbolSize=2 Watchxxx1SymbolColor=RGB {255, 174, 185} -Watchxxx2Enable=false +Watchxxx2Enable=true Watchxxx2Color=RGB {18, 150, 235} Watchxxx2SymbolWidth=1 -Watchxxx2SymbolSize=1 +Watchxxx2SymbolSize=2 Watchxxx2SymbolColor=RGB {255, 174, 185} -Watchxxx3Enable=false +Watchxxx3Enable=true Watchxxx3Color=RGB {249, 201, 4} Watchxxx3SymbolWidth=1 -Watchxxx3SymbolSize=1 +Watchxxx3SymbolSize=2 Watchxxx3SymbolColor=RGB {255, 174, 185} -Watchxxx4Enable=false +Watchxxx4Enable=true Watchxxx4Color=RGB {207, 0, 0} Watchxxx4SymbolWidth=1 -Watchxxx4SymbolSize=1 +Watchxxx4SymbolSize=2 Watchxxx4SymbolColor=RGB {255, 174, 185} -Watchxxx5Enable=false +Watchxxx5Enable=true Watchxxx5Color=RGB {121, 63, 55} Watchxxx5SymbolWidth=1 -Watchxxx5SymbolSize=1 +Watchxxx5SymbolSize=2 Watchxxx5SymbolColor=RGB {255, 174, 185} -Watchxxx6Enable=false +Watchxxx6Enable=true Watchxxx6Color=RGB {119, 34, 204} Watchxxx6SymbolWidth=1 -Watchxxx6SymbolSize=1 +Watchxxx6SymbolSize=2 Watchxxx6SymbolColor=RGB {255, 174, 185} -Watchxxx7Enable=false +Watchxxx7Enable=true Watchxxx7Color=RGB {242, 250, 16} Watchxxx7SymbolWidth=1 -Watchxxx7SymbolSize=1 +Watchxxx7SymbolSize=2 Watchxxx7SymbolColor=RGB {255, 174, 185} -Watchxxx8Enable=false +Watchxxx8Enable=true Watchxxx8Color=RGB {21, 16, 250} Watchxxx8SymbolWidth=1 -Watchxxx8SymbolSize=1 +Watchxxx8SymbolSize=2 Watchxxx8SymbolColor=RGB {255, 174, 185} -Watchxxx9Enable=false +Watchxxx9Enable=true Watchxxx9Color=RGB {236, 114, 11} Watchxxx9SymbolWidth=1 -Watchxxx9SymbolSize=1 +Watchxxx9SymbolSize=2 Watchxxx9SymbolColor=RGB {255, 174, 185} watchBoxTimeEnable=true watchBoxLabelEnable=false diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Ascairways/Ascairways.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Airways/Airways.xml similarity index 90% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Ascairways/Ascairways.xml rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Airways/Airways.xml index aab175c4d4..0421dd0d75 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Ascairways/Ascairways.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Airways/Airways.xml @@ -1,13 +1,13 @@ true - Ascairways + Airways OVERLAY dbName=ncep tableName=bounds.ascairways labelField=area -mapName=ASCAIRWAYS Boundaries +mapName=AIRWAYS Boundaries DbOverlay diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Ascairways/default.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Airways/default.attr similarity index 100% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Ascairways/default.attr rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Airways/default.attr diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Ascarrfa/Ascarrfa.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Carrfa/Carrfa.xml similarity index 90% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Ascarrfa/Ascarrfa.xml rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Carrfa/Carrfa.xml index a4ff3aa685..926fa28ebe 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Ascarrfa/Ascarrfa.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Carrfa/Carrfa.xml @@ -1,13 +1,13 @@ true - Ascarrfa + Carrfa OVERLAY dbName=ncep tableName=bounds.ascarrfa labelField=area -mapName=ASCARRFA Boundaries +mapName=CARIBBEAN FA Boundaries DbOverlay diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Ascarrfa/default.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Carrfa/default.attr similarity index 100% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Ascarrfa/default.attr rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Carrfa/default.attr diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/AwcCcfcan/AwcCcfcan.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Ccfcan/Ccfcan.xml similarity index 90% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/AwcCcfcan/AwcCcfcan.xml rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Ccfcan/Ccfcan.xml index 93078a1308..4a9d843907 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/AwcCcfcan/AwcCcfcan.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Ccfcan/Ccfcan.xml @@ -1,13 +1,13 @@ true - AwcCcfcan + Ccfcan OVERLAY dbName=ncep tableName=bounds.awcccfcan labelField=area -mapName=AWCCCFCAN Boundaries +mapName=CCFCAN Boundaries DbOverlay diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/AwcCcfcan/default.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Ccfcan/default.attr similarity index 100% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/AwcCcfcan/default.attr rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Ccfcan/default.attr diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/ElevNam1000/default.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/ElevNam1000/default.attr deleted file mode 100644 index b55d6d303e..0000000000 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/ElevNam1000/default.attr +++ /dev/null @@ -1,4 +0,0 @@ -legend_color= RGB {255,255,0} -color= RGB {255,255,0} -lineStyle=SOLID -lineWidth=2 \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/FIRBNDS/FIRBNDS.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/FIRBNDS/FIRBNDS.xml deleted file mode 100644 index 0f648af852..0000000000 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/FIRBNDS/FIRBNDS.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - true - FIRBNDS - OVERLAY - -dbName=ncep -tableName=bounds.firbnds -labelField=fir -mapName=Fir Bnds - - DbOverlay - - - CLOSEST_BEFORE_OR_AFTER - 0 - USE_DATA_TIMES - 10 - 24 - BasicWX_US - \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/FIRBNDS/default.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/FIRBNDS/default.attr deleted file mode 100644 index b7efff8e23..0000000000 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/FIRBNDS/default.attr +++ /dev/null @@ -1,3 +0,0 @@ -color= RGB {255,255,200} -lineStyle=SOLID -lineWidth=2 \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/ElevNam1000/ElevNam1000.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/FireWxAOR/FireWxAOR.xml similarity index 85% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/ElevNam1000/ElevNam1000.xml rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/FireWxAOR/FireWxAOR.xml index 215c82dcfd..6aad13b203 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/ElevNam1000/ElevNam1000.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/FireWxAOR/FireWxAOR.xml @@ -1,13 +1,13 @@ true - ElevNam1000 + FireWxAOR OVERLAY dbName=ncep -tableName=bounds.elev_nam1000 +tableName=bounds.firewxaor labelField=name -mapName=NAM TOPO +mapName=Fire WX AOR DbOverlay diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/FireWxAOR/default.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/FireWxAOR/default.attr index bf2e79f96a..e39d002be9 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/FireWxAOR/default.attr +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/FireWxAOR/default.attr @@ -1,3 +1,3 @@ -color= RGB {255,255,255} +color= RGB {100,255,255} lineStyle=SOLID lineWidth=1 diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/HCN/default.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/HCN/default.attr index 945817f353..1ed31f9677 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/HCN/default.attr +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/HCN/default.attr @@ -1,3 +1,3 @@ -color= RGB {100,100,100} +color= RGB {200,100,100} lineStyle=SOLID lineWidth=2 \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/HPCSFC/HPCSFC.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/HPCSFC/HPCSFC.xml deleted file mode 100644 index 8927210977..0000000000 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/HPCSFC/HPCSFC.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - true - HPCSFC - OVERLAY - -dbName=ncep -tableName=bounds.hpcsfc -labelField=name -mapName=HPCSFC - - - DbOverlay - - - CLOSEST_BEFORE_OR_AFTER - 0 - USE_DATA_TIMES - 10 - 24 - BasicWX_US - diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/HPCSFC/default.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/HPCSFC/default.attr deleted file mode 100644 index 0fc9369f44..0000000000 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/HPCSFC/default.attr +++ /dev/null @@ -1,4 +0,0 @@ -legend_color= RGB {100,100,100} -color= RGB {255,0,225} -lineStyle=SOLID -lineWidth=2 diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Aschifiwo/Aschifiwo.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Hifiwo/Hifiwo.xml similarity index 90% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Aschifiwo/Aschifiwo.xml rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Hifiwo/Hifiwo.xml index 67b596de56..5682838193 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Aschifiwo/Aschifiwo.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Hifiwo/Hifiwo.xml @@ -1,13 +1,13 @@ true - Aschifiwo + Hifiwo OVERLAY dbName=ncep tableName=bounds.aschifiwo labelField=area -mapName=ASCHIFIWO Boundaries +mapName=HIFIWO Boundaries DbOverlay diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Ascfaarea/default.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Hifiwo/default.attr similarity index 100% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Ascfaarea/default.attr rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Hifiwo/default.attr diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/HighSeasZones/default.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/HighSeasZones/default.attr index bf2e79f96a..e39d002be9 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/HighSeasZones/default.attr +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/HighSeasZones/default.attr @@ -1,3 +1,3 @@ -color= RGB {255,255,255} +color= RGB {100,255,255} lineStyle=SOLID lineWidth=1 diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Hpc050Med/Hpc050Med.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Hpc050Med/Hpc050Med.xml deleted file mode 100644 index a7bf8ac741..0000000000 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Hpc050Med/Hpc050Med.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - true - Hpc050Med - OVERLAY - -dbName=ncep -tableName=bounds.hpc050_med -labelField=area -mapName=HPC050 MED - - - DbOverlay - - - CLOSEST_BEFORE_OR_AFTER - 0 - USE_DATA_TIMES - 10 - 24 - BasicWX_US - \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Hpc050Med/default.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Hpc050Med/default.attr deleted file mode 100644 index ad38f0ddb7..0000000000 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Hpc050Med/default.attr +++ /dev/null @@ -1,4 +0,0 @@ -legend_color= RGB {100,150,100} -color= RGB {100,150,100} -lineStyle=SOLID -lineWidth=2 \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Mwo/Mwo.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Mwo/Mwo.xml deleted file mode 100644 index 9e9a499197..0000000000 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Mwo/Mwo.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - true - Mwo - OVERLAY - -dbName=ncep -tableName=bounds.mwobnds -labelField=area -mapName=MWO - - - DbOverlay - - - CLOSEST_BEFORE_OR_AFTER - 0 - USE_DATA_TIMES - 10 - 24 - BasicWX_US - diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Mwo/default.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Mwo/default.attr deleted file mode 100644 index 57e27bfc50..0000000000 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Mwo/default.attr +++ /dev/null @@ -1,4 +0,0 @@ -legend_color= RGB {150,150,100} -color= RGB {150,150,100} -lineStyle=SOLID -lineWidth=2 \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/OPC/default.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/OPC/default.attr deleted file mode 100644 index d61662c0e2..0000000000 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/OPC/default.attr +++ /dev/null @@ -1,4 +0,0 @@ -legend_color= RGB {150,200,150} -color= RGB {150,200,150} -lineStyle=SOLID -lineWidth=2 \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/OPCSSA/OPCSSA.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/OPCSSA/OPCSSA.xml deleted file mode 100644 index 872b177b68..0000000000 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/OPCSSA/OPCSSA.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - true - OPCSSA - OVERLAY - -dbName=ncep -tableName=bounds.opc_ssa -labelField=area -mapName=OPC SSA Boundaries - - DbOverlay - - - CLOSEST_BEFORE_OR_AFTER - 0 - USE_DATA_TIMES - 10 - 24 - BasicWX_US - diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/OPCSSA/default.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/OPCSSA/default.attr deleted file mode 100644 index 5a4850768f..0000000000 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/OPCSSA/default.attr +++ /dev/null @@ -1,4 +0,0 @@ -legend_color= RGB {255,0,225} -color= RGB {255,0,225} -lineStyle=SOLID -lineWidth=2 diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/OpcNomex/OpcNomex.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/OpcNomex/OpcNomex.xml deleted file mode 100644 index 3414189fa2..0000000000 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/OpcNomex/OpcNomex.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - true - OpcNomex - OVERLAY - -dbName=ncep -tableName=bounds.opcbnds_nomex -labelField=area -mapName=OPC NOMEX - - DbOverlay - - - CLOSEST_BEFORE_OR_AFTER - 0 - USE_DATA_TIMES - 10 - 24 - BasicWX_US - diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/OpcNomex/default.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/OpcNomex/default.attr deleted file mode 100644 index 59b977f54e..0000000000 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/OpcNomex/default.attr +++ /dev/null @@ -1,3 +0,0 @@ -color= RGB {150,250,150} -lineStyle=SOLID -lineWidth=2 \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/AwcARTCC/AwcARTCC.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/ARTCC/ARTCC.xml similarity index 93% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/AwcARTCC/AwcARTCC.xml rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/ARTCC/ARTCC.xml index 6c171bc820..96d484728f 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/AwcARTCC/AwcARTCC.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/ARTCC/ARTCC.xml @@ -1,7 +1,7 @@ true - AwcARTCC + ARTCC OVERLAY pgenProductName=awc_ARTCC.xml diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Ascfaregion/default.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/ARTCC/default.attr similarity index 100% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Ascfaregion/default.attr rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/ARTCC/default.attr diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/AscGulfFa/default.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/AscGulfFa/default.attr deleted file mode 100644 index 1742025464..0000000000 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/AscGulfFa/default.attr +++ /dev/null @@ -1,3 +0,0 @@ -color= RGB {255,0,225} -lineStyle=SOLID -lineWidth=2 \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/AscTropFirs/default.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/AscTropFirs/default.attr deleted file mode 100644 index 8a5918f245..0000000000 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/AscTropFirs/default.attr +++ /dev/null @@ -1,4 +0,0 @@ -legend_color= RGB {255,0,225} -color= RGB {255,0,225} -lineStyle=SOLID -lineWidth=2 \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/AwcFIR/AwcARTCC.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/FirBnds/FirBnds.xml similarity index 94% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/AwcFIR/AwcARTCC.xml rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/FirBnds/FirBnds.xml index 8d0468c072..4438f7666b 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/AwcFIR/AwcARTCC.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/FirBnds/FirBnds.xml @@ -1,7 +1,7 @@ true - AwcFIR + FirBnds OVERLAY pgenProductName=awc_FIR.xml diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Aschifiwo/default.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/FirBnds/default.attr similarity index 100% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Aschifiwo/default.attr rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/FirBnds/default.attr diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/AscGulfFa/AscGulfFa.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/GulfFa/GulfFa.xml similarity index 93% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/AscGulfFa/AscGulfFa.xml rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/GulfFa/GulfFa.xml index f4c9bf6a76..a3dbc711e2 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/AscGulfFa/AscGulfFa.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/GulfFa/GulfFa.xml @@ -1,7 +1,7 @@ true - AscGulfFa + GulfFa OVERLAY pgenProductName=ascgulffa.xml diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/AscCarrFa/default.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/GulfFa/default.attr similarity index 100% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/AscCarrFa/default.attr rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/GulfFa/default.attr diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/AscCarrFa/AscCarrFa.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/HPC050Med/HPC050Med.xml similarity index 90% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/AscCarrFa/AscCarrFa.xml rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/HPC050Med/HPC050Med.xml index 5d4d497b46..c4dcc02785 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/AscCarrFa/AscCarrFa.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/HPC050Med/HPC050Med.xml @@ -1,10 +1,10 @@ true - AscCarrFa + HPC050Med OVERLAY -pgenProductName=asccarrfa.xml +pgenProductName=hpc050_med.xml PgenXmlOverlay diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/Hpc050Med/default.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/HPC050Med/default.attr similarity index 100% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/Hpc050Med/default.attr rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/HPC050Med/default.attr diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/Hpc050Med/Hpc050Med.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/Hpc050Med/Hpc050Med.xml deleted file mode 100644 index cadf266d22..0000000000 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/Hpc050Med/Hpc050Med.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - true - Hpc050Med - OVERLAY - -pgenProductName=hpc050med.xml - - - PgenXmlOverlay - - - CLOSEST_BEFORE_OR_AFTER - 0 - USE_DATA_TIMES - 10 - 24 - BasicWX_US - \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/AwcIntlSigmetAreas/AwcIntlSigmetAreas.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/IntlSigmetAreas/IntlSigmetAreas.xml similarity index 92% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/AwcIntlSigmetAreas/AwcIntlSigmetAreas.xml rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/IntlSigmetAreas/IntlSigmetAreas.xml index f7e15d4509..0aadb5f7d1 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/AwcIntlSigmetAreas/AwcIntlSigmetAreas.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/IntlSigmetAreas/IntlSigmetAreas.xml @@ -1,6 +1,6 @@ true - AwcIntlSigmetAreas + IntlSigmetAreas OVERLAY pgenProductName=awc_intl_sigmet_areas.xml diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Asctropfirs/default.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/IntlSigmetAreas/default.attr similarity index 100% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Asctropfirs/default.attr rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/IntlSigmetAreas/default.attr diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/SSA/SSA.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/SSA/SSA.xml similarity index 77% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/SSA/SSA.xml rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/SSA/SSA.xml index e6b80604ff..24e2c2be89 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/SSA/SSA.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/SSA/SSA.xml @@ -4,13 +4,10 @@ SSA OVERLAY -dbName=ncep -tableName=bounds.ssa_bnd -labelField=area -mapName=SSA +pgenProductName=ssa_bnd.xml - AdministrativeBoundaries - DbOverlay + + PgenXmlOverlay CLOSEST_BEFORE_OR_AFTER @@ -19,4 +16,4 @@ mapName=SSA 10 24 BasicWX_US - + \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/OPCSSA/default.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/SSA/default.attr similarity index 100% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/OPCSSA/default.attr rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/SSA/default.attr diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/OPCSSA/OPCSSA.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/UA/UA.xml similarity index 90% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/OPCSSA/OPCSSA.xml rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/UA/UA.xml index 8453e7c463..78b295e453 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/OPCSSA/OPCSSA.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/UA/UA.xml @@ -1,10 +1,10 @@ true - OPCSSA + UA OVERLAY -pgenProductName=ssa_bnd.xml + pgenProductName=ua_bnd.xml PgenXmlOverlay diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/AwcIntlSigmetAreas/default.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/UA/default.attr similarity index 52% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/AwcIntlSigmetAreas/default.attr rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/UA/default.attr index 58d2018ba6..e840c60eaf 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/AwcIntlSigmetAreas/default.attr +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/UA/default.attr @@ -1,3 +1,3 @@ -color= RGB {255,0,225} +color= RGB {255,250,225} lineStyle=SOLID lineWidth=2 diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/AscTropFirs/AscTropFirs.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/VAACAR/VAACAR.xml similarity index 89% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/AscTropFirs/AscTropFirs.xml rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/VAACAR/VAACAR.xml index 7b0677c2cf..0354fa9212 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/AscTropFirs/AscTropFirs.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/VAACAR/VAACAR.xml @@ -1,10 +1,10 @@ true - AscTropFirs + VAACAR OVERLAY -pgenProductName=asctropfirs.xml + pgenProductName=vaacarbnds.xml PgenXmlOverlay diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/AwcWST/default.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/VAACAR/default.attr similarity index 52% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/AwcWST/default.attr rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/VAACAR/default.attr index 58d2018ba6..e840c60eaf 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/AwcWST/default.attr +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/VAACAR/default.attr @@ -1,3 +1,3 @@ -color= RGB {255,0,225} +color= RGB {255,250,225} lineStyle=SOLID lineWidth=2 diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/AwcWST/AwcWST.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/WST/WST.xml similarity index 94% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/AwcWST/AwcWST.xml rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/WST/WST.xml index ad76fc400b..d4bccea809 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/AwcWST/AwcWST.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/WST/WST.xml @@ -1,7 +1,7 @@ true - AwcWST + WST OVERLAY pgenProductName=awc_WST.xml diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Asctweb/default.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/WST/default.attr similarity index 100% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Asctweb/default.attr rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/WST/default.attr diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/World/World.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/World/World.xml index 5351cb2251..d4c444fab1 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/World/World.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/World/World.xml @@ -1,6 +1,7 @@ - true + + false World OVERLAY diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/SSA/default.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/SSA/default.attr deleted file mode 100644 index 0f44c207b3..0000000000 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/SSA/default.attr +++ /dev/null @@ -1,4 +0,0 @@ -legend_color= RGB {150,50,250} -color= RGB {150,50,150} -lineStyle=SOLID -lineWidth=2 \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/TPCBnds/TPCBnds.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/TPCBnds/TPCBnds.xml deleted file mode 100644 index 2963376bb0..0000000000 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/TPCBnds/TPCBnds.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - true - TPCBnds - OVERLAY - -dbName=ncep -tableName=bounds.tpcbounds -labelField=name -mapName=TPC - - AdministrativeBoundaries - DbOverlay - - - CLOSEST_BEFORE_OR_AFTER - 0 - USE_DATA_TIMES - 10 - 24 - BasicWX_US - diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/TPCBnds/default.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/TPCBnds/default.attr deleted file mode 100644 index 5ba799346e..0000000000 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/TPCBnds/default.attr +++ /dev/null @@ -1,4 +0,0 @@ -legend_color= RGB {50,50,250} -color= RGB {50,50,250} -lineStyle=SOLID -lineWidth=2 \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Asctropfirs/Asctropfirs.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/TropFirs/TropFirs.xml similarity index 90% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Asctropfirs/Asctropfirs.xml rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/TropFirs/TropFirs.xml index b6ba0df98e..fc96f48462 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Asctropfirs/Asctropfirs.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/TropFirs/TropFirs.xml @@ -1,13 +1,13 @@ true - Asctropfirs + TropFirs OVERLAY dbName=ncep tableName=bounds.asctropfirs labelField=area -mapName=ASCTROPFIRS Boundaries +mapName=TROPFIRS Boundaries DbOverlay diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Ascwrzones/default.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/TropFirs/default.attr similarity index 100% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Ascwrzones/default.attr rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/TropFirs/default.attr diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Asctweb/Asctweb.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Tweb/Tweb.xml similarity index 91% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Asctweb/Asctweb.xml rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Tweb/Tweb.xml index 220848e254..351b7b94c9 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Asctweb/Asctweb.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Tweb/Tweb.xml @@ -1,13 +1,13 @@ true - Asctweb + Tweb OVERLAY dbName=ncep tableName=bounds.asctweb labelField=area -mapName=ASCTWEB Boundaries +mapName=TWEB Boundaries DbOverlay diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/AwcARTCC/default.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Tweb/default.attr similarity index 100% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/AwcARTCC/default.attr rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Tweb/default.attr diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/UA/default.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/UA/default.attr deleted file mode 100644 index abcc19ddf3..0000000000 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/UA/default.attr +++ /dev/null @@ -1,3 +0,0 @@ -color= RGB {255,50,225} -lineStyle=SOLID -lineWidth=2 diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/UA/ua.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/UA/ua.xml deleted file mode 100644 index f3e2ca936c..0000000000 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/UA/ua.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - true - UA - OVERLAY - -dbName=ncep -tableName=bounds.ua_bnd -labelField=area -mapName=UNIFIED_ANL - - DbOverlay - - - CLOSEST_BEFORE_OR_AFTER - 0 - USE_DATA_TIMES - 10 - 24 - BasicWX_US - diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/USAK/default.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/USAK/default.attr index 39fab926ba..438138d52a 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/USAK/default.attr +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/USAK/default.attr @@ -1,3 +1,3 @@ -color= RGB {50,50,50} +color= RGB {250,250,50} lineStyle=SOLID lineWidth=2 \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Vaacar/Vaacar.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Vaacar/Vaacar.xml deleted file mode 100644 index 3a76d00c7b..0000000000 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Vaacar/Vaacar.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - true - Vaacar - OVERLAY - -dbName=ncep -tableName=bounds.vaacarbnds -labelField=area -mapName=VAACAR - - - DbOverlay - - - CLOSEST_BEFORE_OR_AFTER - 0 - USE_DATA_TIMES - 10 - 24 - BasicWX_US - diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Vaacar/default.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Vaacar/default.attr deleted file mode 100644 index 4bc4861324..0000000000 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Vaacar/default.attr +++ /dev/null @@ -1,3 +0,0 @@ -color= RGB {50,50,10} -lineStyle=SOLID -lineWidth=2 \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Volcano/Volcano.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Volcanos/Volcanos.xml similarity index 92% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Volcano/Volcano.xml rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Volcanos/Volcanos.xml index 9a9ff0c90d..09732ed4c0 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Volcano/Volcano.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Volcanos/Volcanos.xml @@ -1,11 +1,11 @@ true - Volcano + Volcanos OVERLAY LpiFilename=volcano.lpi -mapName=Volcano +mapName=Volcanos Stations LpiOverlay diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Volcano/default.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Volcanos/default.attr similarity index 100% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Volcano/default.attr rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Volcanos/default.attr diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/World/World.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/World/World.xml deleted file mode 100644 index db17bdecad..0000000000 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/World/World.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - true - World - OVERLAY - -dbName=ncep -tableName=bounds.locowobnds -labelField=name -mapName=World BNDs - - - DbOverlay - - - CLOSEST_BEFORE_OR_AFTER - 0 - USE_DATA_TIMES - 10 - 24 - BasicWX_US - diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/World/default.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/World/default.attr deleted file mode 100644 index 57e27bfc50..0000000000 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/World/default.attr +++ /dev/null @@ -1,4 +0,0 @@ -legend_color= RGB {150,150,100} -color= RGB {150,150,100} -lineStyle=SOLID -lineWidth=2 \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Ascwrzones/Ascwrzones.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/WrZones/WrZones.xml similarity index 90% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Ascwrzones/Ascwrzones.xml rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/WrZones/WrZones.xml index c1f021e11c..7910dbb43d 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/Ascwrzones/Ascwrzones.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/WrZones/WrZones.xml @@ -1,13 +1,13 @@ true - Ascwrzones + WrZones OVERLAY dbName=ncep tableName=bounds.ascwrzones labelField=area -mapName=ASCWRZONES Boundaries +mapName=WRZONES Boundaries DbOverlay diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/AwcFIR/default.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/WrZones/default.attr similarity index 100% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/PgenXmlOverlay/AwcFIR/default.attr rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/OVERLAYS/WrZones/default.attr diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/PGEN/Atlantic_500mb/Atlantic_500mb b/cave/build/static/common/cave/etc/ncep/ResourceDefns/PGEN/Atlantic_500mb/Atlantic_500mb new file mode 100644 index 0000000000..34cc14d6b2 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/PGEN/Atlantic_500mb/Atlantic_500mb @@ -0,0 +1,21 @@ + + + true + Atlantic_500mb + PGEN + + +! the sub-directory under the current PGEN working directory +! TODO : may want to change pgenDirectory to productType/activity and get the directory of the productType +pgenDirectory=/home/awp2pgen/activities/Atlantic_500mb/xml + + PGEN + productName + + CLOSEST_BEFORE_OR_AFTER + 60 + USE_FRAME_INTERVAL + 10 + 24 + BasicWX_US + \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/PGEN/Atlantic_Surface/Atlantic_Surface b/cave/build/static/common/cave/etc/ncep/ResourceDefns/PGEN/Atlantic_Surface/Atlantic_Surface new file mode 100644 index 0000000000..e5566dab99 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/PGEN/Atlantic_Surface/Atlantic_Surface @@ -0,0 +1,21 @@ + + + true + Atlantic_Surface + PGEN + + +! the sub-directory under the current PGEN working directory +! TODO : may want to change pgenDirectory to productType/activity and get the directory of the productType +pgenDirectory=/home/awp2pgen/activities/Atlantic_Surface/xml + + PGEN + productName + + CLOSEST_BEFORE_OR_AFTER + 60 + USE_FRAME_INTERVAL + 10 + 24 + BasicWX_US + diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/PGEN/Atlantic_Wind_Wave/Atlantic_Wind_Wave.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/PGEN/Atlantic_Wind_Wave/Atlantic_Wind_Wave.xml new file mode 100644 index 0000000000..f033b49629 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/PGEN/Atlantic_Wind_Wave/Atlantic_Wind_Wave.xml @@ -0,0 +1,21 @@ + + + true + Atlantic_Wind_Wave + PGEN + + +! the sub-directory under the current PGEN working directory +! TODO : may want to change pgenDirectory to productType/activity and get the directory of the productType +pgenDirectory=/home/awp2pgen/activities/Atlantic_Wind_Wave/xml + + PGEN + productName + + CLOSEST_BEFORE_OR_AFTER + 60 + USE_FRAME_INTERVAL + 10 + 24 + BasicWX_US + \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/PGEN/CCFP/CCFP.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/PGEN/CCFP/CCFP.xml new file mode 100644 index 0000000000..cdfed6fe30 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/PGEN/CCFP/CCFP.xml @@ -0,0 +1,21 @@ + + + true + CCFP + PGEN + + +! the sub-directory under the current PGEN working directory +! TODO : may want to change pgenDirectory to productType/activity and get the directory of the productType +pgenDirectory=/home/awp2pgen/activities/CCFP/xml + + PGEN + productName + + CLOSEST_BEFORE_OR_AFTER + 60 + USE_FRAME_INTERVAL + 10 + 24 + BasicWX_US + diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/PGEN/CONV_SIGMET/CONV_SIGMET.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/PGEN/CONV_SIGMET/CONV_SIGMET.xml new file mode 100644 index 0000000000..dfc1459fa1 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/PGEN/CONV_SIGMET/CONV_SIGMET.xml @@ -0,0 +1,21 @@ + + + true + CONV_SIGMET + PGEN + + +! the sub-directory under the current PGEN working directory +! TODO : may want to change pgenDirectory to productType/activity and get the directory of the productType +pgenDirectory=/home/awp2pgen/activities/CONV_SIGMET/xml + + PGEN + productName + + CLOSEST_BEFORE_OR_AFTER + 60 + USE_FRAME_INTERVAL + 10 + 24 + BasicWX_US + diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/PGEN/Convective_Outlook/Convective_Outlook.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/PGEN/Convective_Outlook/Convective_Outlook.xml new file mode 100644 index 0000000000..df2fb362a3 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/PGEN/Convective_Outlook/Convective_Outlook.xml @@ -0,0 +1,21 @@ + + + true + Convective_Outlook + PGEN + + +! the sub-directory under the current PGEN working directory +! TODO : may want to change pgenDirectory to productType/activity and get the directory of the productType +pgenDirectory=/home/awp2pgen/activities/Convective_Outlook/xml + + PGEN + productName + + CLOSEST_BEFORE_OR_AFTER + 60 + USE_FRAME_INTERVAL + 10 + 24 + BasicWX_US + diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/PGEN/Extended_Range/Extended_Range.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/PGEN/Extended_Range/Extended_Range.xml new file mode 100644 index 0000000000..203aeb09ba --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/PGEN/Extended_Range/Extended_Range.xml @@ -0,0 +1,21 @@ + + + true + Extended_Range + PGEN + + +! the sub-directory under the current PGEN working directory +! TODO : may want to change pgenDirectory to productType/activity and get the directory of the productType +pgenDirectory=/home/awp2pgen/activities/Extended_Range/xml + + PGEN + productName + + CLOSEST_BEFORE_OR_AFTER + 60 + USE_FRAME_INTERVAL + 10 + 24 + BasicWX_US + diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/PGEN/G_AIRMET/G_AIRMET.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/PGEN/G_AIRMET/G_AIRMET.xml new file mode 100644 index 0000000000..c22d4e5cff --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/PGEN/G_AIRMET/G_AIRMET.xml @@ -0,0 +1,21 @@ + + + true + G_AIRMET + PGEN + + +! the sub-directory under the current PGEN working directory +! TODO : may want to change pgenDirectory to productType/activity and get the directory of the productType +pgenDirectory=/home/awp2pgen/activities/G_AIRMET/xml + + PGEN + productName + + CLOSEST_BEFORE_OR_AFTER + 60 + USE_FRAME_INTERVAL + 10 + 24 + BasicWX_US + diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/PGEN/HPC_Basic_WX/HPC_Basic_WX.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/PGEN/HPC_Basic_WX/HPC_Basic_WX.xml new file mode 100644 index 0000000000..54ea1a167d --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/PGEN/HPC_Basic_WX/HPC_Basic_WX.xml @@ -0,0 +1,21 @@ + + + true + HPC_Basic_WX + PGEN + + +! the sub-directory under the current PGEN working directory +! TODO : may want to change pgenDirectory to productType/activity and get the directory of the productType +pgenDirectory=/home/awp2pgen/activities/HPC_Basic_WX/xml + + PGEN + productName + + CLOSEST_BEFORE_OR_AFTER + 60 + USE_FRAME_INTERVAL + 10 + 24 + BasicWX_US + \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/PGEN/HPC_QPF/HPC_QPF.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/PGEN/HPC_QPF/HPC_QPF.xml new file mode 100644 index 0000000000..aed8bb1c85 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/PGEN/HPC_QPF/HPC_QPF.xml @@ -0,0 +1,21 @@ + + + true + HPC_QPF + PGEN + + +! the sub-directory under the current PGEN working directory +! TODO : may want to change pgenDirectory to productType/activity and get the directory of the productType +pgenDirectory=/home/awp2pgen/activities/HPC_QPF/xml + + PGEN + productName + + CLOSEST_BEFORE_OR_AFTER + 60 + USE_FRAME_INTERVAL + 10 + 24 + BasicWX_US + \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/PGEN/Hazard_Outlook/Hazard_Outlook.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/PGEN/Hazard_Outlook/Hazard_Outlook.xml new file mode 100644 index 0000000000..bb60ddb84b --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/PGEN/Hazard_Outlook/Hazard_Outlook.xml @@ -0,0 +1,21 @@ + + + true + Hazard_Outlook + PGEN + + +! the sub-directory under the current PGEN working directory +! TODO : may want to change pgenDirectory to productType/activity and get the directory of the productType +pgenDirectory=/home/awp2pgen/activities/Hazard_Outlook/xml + + PGEN + productName + + CLOSEST_BEFORE_OR_AFTER + 60 + USE_FRAME_INTERVAL + 10 + 24 + BasicWX_US + diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/PGEN/International_Sigmet/International_Sigmet.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/PGEN/International_Sigmet/International_Sigmet.xml new file mode 100644 index 0000000000..6d5200a92c --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/PGEN/International_Sigmet/International_Sigmet.xml @@ -0,0 +1,21 @@ + + + true + International_Sigmet + PGEN + + +! the sub-directory under the current PGEN working directory +! TODO : may want to change pgenDirectory to productType/activity and get the directory of the productType +pgenDirectory=/home/awp2pgen/activities/International_Sigmet/xml + + PGEN + productName + + CLOSEST_BEFORE_OR_AFTER + 60 + USE_FRAME_INTERVAL + 10 + 24 + BasicWX_US + diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/PGEN/NONCONV_SIGMET/NONCONV_SIGMET.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/PGEN/NONCONV_SIGMET/NONCONV_SIGMET.xml new file mode 100644 index 0000000000..431088037d --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/PGEN/NONCONV_SIGMET/NONCONV_SIGMET.xml @@ -0,0 +1,21 @@ + + + true + NONCONV_SIGMET + PGEN + + +! the sub-directory under the current PGEN working directory +! TODO : may want to change pgenDirectory to productType/activity and get the directory of the productType +pgenDirectory=/home/awp2pgen/activities/NONCONV_SIGMET/xml + + PGEN + productName + + CLOSEST_BEFORE_OR_AFTER + 60 + USE_FRAME_INTERVAL + 10 + 24 + BasicWX_US + \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/PGEN/SIGWX_High/SIGWX_High.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/PGEN/SIGWX_High/SIGWX_High.xml new file mode 100644 index 0000000000..d1a8e0321d --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/PGEN/SIGWX_High/SIGWX_High.xml @@ -0,0 +1,21 @@ + + + true + SIGWX_High + PGEN + + +! the sub-directory under the current PGEN working directory +! TODO : may want to change pgenDirectory to productType/activity and get the directory of the productType +pgenDirectory=/home/awp2pgen/activities/SIGWX_High/xml + + PGEN + productName + + CLOSEST_BEFORE_OR_AFTER + 60 + USE_FRAME_INTERVAL + 10 + 24 + BasicWX_US + diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/PGEN/SIGWX_Low/SIGWX_Low b/cave/build/static/common/cave/etc/ncep/ResourceDefns/PGEN/SIGWX_Low/SIGWX_Low new file mode 100644 index 0000000000..317cf0b105 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/PGEN/SIGWX_Low/SIGWX_Low @@ -0,0 +1,21 @@ + + + true + SIGWX_Low + PGEN + + +! the sub-directory under the current PGEN working directory +! TODO : may want to change pgenDirectory to productType/activity and get the directory of the productType +pgenDirectory=/home/awp2pgen/activities/SIGWX_Low/xml + + PGEN + productName + + CLOSEST_BEFORE_OR_AFTER + 60 + USE_FRAME_INTERVAL + 10 + 24 + BasicWX_US + diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/PGEN/SIGWX_Medium/SIGWX_Medium.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/PGEN/SIGWX_Medium/SIGWX_Medium.xml new file mode 100644 index 0000000000..e80bc78b1e --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/PGEN/SIGWX_Medium/SIGWX_Medium.xml @@ -0,0 +1,21 @@ + + + true + SIGWX_Medium + PGEN + + +! the sub-directory under the current PGEN working directory +! TODO : may want to change pgenDirectory to productType/activity and get the directory of the productType +pgenDirectory=/home/awp2pgen/activities/SIGWX_Medium/xml + + PGEN + productName + + CLOSEST_BEFORE_OR_AFTER + 60 + USE_FRAME_INTERVAL + 10 + 24 + BasicWX_US + diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/PGEN/Sample/Sample.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/PGEN/Sample/Sample.xml new file mode 100644 index 0000000000..a3e18c94f4 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/PGEN/Sample/Sample.xml @@ -0,0 +1,21 @@ + + + true + Sample + PGEN + + +! the sub-directory under the current PGEN working directory +! TODO : may want to change pgenDirectory to productType/activity and get the directory of the productType +pgenDirectory=/home/awp2pgen/activities/Sample/xml + + PGEN + productName + + CLOSEST_BEFORE_OR_AFTER + 60 + USE_FRAME_INTERVAL + 10 + 24 + BasicWX_US + diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/PGEN/Surface_Analysis/Surface_Analysis.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/PGEN/Surface_Analysis/Surface_Analysis.xml new file mode 100644 index 0000000000..92a28a798b --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/PGEN/Surface_Analysis/Surface_Analysis.xml @@ -0,0 +1,21 @@ + + + true + Surface_Analysis + PGEN + + +! the sub-directory under the current PGEN working directory +! TODO : may want to change pgenDirectory to productType/activity and get the directory of the productType +pgenDirectory=/home/awp2pgen/activities/Surface_Analysis/xml + + PGEN + productName + + CLOSEST_BEFORE_OR_AFTER + 60 + USE_FRAME_INTERVAL + 10 + 24 + BasicWX_US + diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/PGEN/Volcano/Volcano.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/PGEN/Volcano/Volcano.xml new file mode 100644 index 0000000000..785e9c9b9e --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/PGEN/Volcano/Volcano.xml @@ -0,0 +1,21 @@ + + + true + Volcano + PGEN + + +! the sub-directory under the current PGEN working directory +! TODO : may want to change pgenDirectory to productType/activity and get the directory of the productType +pgenDirectory=/home/awp2pgen/activities/Volcano/xml + + PGEN + productName + + CLOSEST_BEFORE_OR_AFTER + 60 + USE_FRAME_INTERVAL + 10 + 24 + BasicWX_US + diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/RADAR/LocalRadar/LocalRadar.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/RADAR/LocalRadar/LocalRadar.xml index d00b1ab752..e729dd6ce6 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/RADAR/LocalRadar/LocalRadar.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/RADAR/LocalRadar/LocalRadar.xml @@ -1,6 +1,7 @@ true + true LocalRadar RADAR diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/RADAR/NatlMosaic/NatlMosaic.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/RADAR/NatlMosaic/NatlMosaic.xml index fedb2ac62e..0bde2c21f1 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/RADAR/NatlMosaic/NatlMosaic.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/RADAR/NatlMosaic/NatlMosaic.xml @@ -1,6 +1,7 @@ true + true NatlMosaic RADAR diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/FYC/FYC.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/FYC/FYC.xml index 41c5837647..b83b342600 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/FYC/FYC.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/FYC/FYC.xml @@ -1,6 +1,6 @@ - true + false FYC SATELLITE diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_DMSP/GINI_DMSP.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_DMSP/GINI_DMSP.xml index 0e0e5cab3e..34029c79fe 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_DMSP/GINI_DMSP.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_DMSP/GINI_DMSP.xml @@ -1,6 +1,6 @@ - true + false GINI_DMSP SATELLITE diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_ERS-QuickSCAT-Scatterometer/GINI_ERS-QuickSCAT-Scatterometer.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_ERS-QuickSCAT-Scatterometer/GINI_ERS-QuickSCAT-Scatterometer.xml index 818c430e2b..98076ff883 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_ERS-QuickSCAT-Scatterometer/GINI_ERS-QuickSCAT-Scatterometer.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_ERS-QuickSCAT-Scatterometer/GINI_ERS-QuickSCAT-Scatterometer.xml @@ -1,6 +1,6 @@ - true + false GINI_ERS-QuickSCAT-Scatterometer SATELLITE diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GMS/GINI_GMS.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GMS/GINI_GMS.xml index df5c8fdb3d..b1f0f28bcb 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GMS/GINI_GMS.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GMS/GINI_GMS.xml @@ -1,6 +1,6 @@ - true + false GINI_GMS SATELLITE diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES10/GINI_GOES10.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES10/GINI_GOES10.xml index bc1ca9a5a7..0c52c4db06 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES10/GINI_GOES10.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES10/GINI_GOES10.xml @@ -1,6 +1,6 @@ - true + false GINI_GOES10 SATELLITE diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/CLOUD_WATER.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/CLOUD_WATER.attr similarity index 63% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/CLOUD_WATER.attr rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/CLOUD_WATER.attr index b44270fa5a..4e62b6105c 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/CLOUD_WATER.attr +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/CLOUD_WATER.attr @@ -1,6 +1,5 @@ -legend_color=RGB {200, 200, 200} colorMapName=lingray -colorBar=@dfltMcidasColorBar.xml +colorBar=@ColorBars/Satellite/dfltMcidasColorBar.xml imageType=Cloud water content displayUnitStr=PrecipPixel alpha=1.0 diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/DERIVED_CAPE.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/DERIVED_CAPE.attr similarity index 70% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/DERIVED_CAPE.attr rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/DERIVED_CAPE.attr index 8058bbe90a..98ba73b6fb 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/DERIVED_CAPE.attr +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/DERIVED_CAPE.attr @@ -1,6 +1,5 @@ -legend_color=RGB {200, 200, 200} colorMapName=lingray -colorBar=@dfltMcidasColorBar.xml +colorBar=@ColorBars/Satellite/dfltMcidasColorBar.xml imageType=Derived Convective Available Potential Energy (CAPE) displayUnitStr=SounderSkinTempPixel alpha=1.0 diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/DERIVED_CONV_INH.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/DERIVED_CONV_INH.attr similarity index 59% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/DERIVED_CONV_INH.attr rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/DERIVED_CONV_INH.attr index be2195eecc..57a4f38069 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/DERIVED_CONV_INH.attr +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/DERIVED_CONV_INH.attr @@ -1,8 +1,7 @@ -legend_color=RGB {200, 200, 200} colorMapName=lingray -colorBar=@dfltMcidasColorBar.xml +colorBar=@ColorBars/Satellite/dfltMcidasColorBar.xml imageType=Derived Convective Inhibition displayUnitStr=GenericPixel alpha=1.0 brightness=1.0 -contrast=1.0 \ No newline at end of file +contrast=1.0 diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/DERIVED_LAND_SEA_TEMP.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/DERIVED_LAND_SEA_TEMP.attr similarity index 56% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/DERIVED_LAND_SEA_TEMP.attr rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/DERIVED_LAND_SEA_TEMP.attr index 7b590e930d..7a23e38f72 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/DERIVED_LAND_SEA_TEMP.attr +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/DERIVED_LAND_SEA_TEMP.attr @@ -1,8 +1,7 @@ -legend_color=RGB {200, 200, 200} colorMapName=lingray -colorBar=@dfltMcidasColorBar.xml +colorBar=@ColorBars/Satellite/dfltMcidasColorBar.xml imageType=Derived land-sea temp displayUnitStr=IRPixel alpha=1.0 brightness=1.0 -contrast=1.0 \ No newline at end of file +contrast=1.0 diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/DERIVED_VOLCANO_IMG.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/DERIVED_VOLCANO_IMG.attr similarity index 58% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/DERIVED_VOLCANO_IMG.attr rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/DERIVED_VOLCANO_IMG.attr index f7b5b4dd45..2229ec1825 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/DERIVED_VOLCANO_IMG.attr +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/DERIVED_VOLCANO_IMG.attr @@ -1,8 +1,7 @@ -legend_color=RGB {200, 200, 200} colorMapName=lingray -colorBar=@dfltMcidasColorBar.xml +colorBar=@ColorBars/Satellite/dfltMcidasColorBar.xml imageType=Derived Volcano Imagery displayUnitStr=GenericPixel alpha=1.0 brightness=1.0 -contrast=1.0 \ No newline at end of file +contrast=1.0 diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/DERIVED_WINDEX.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/DERIVED_WINDEX.attr similarity index 58% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/DERIVED_WINDEX.attr rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/DERIVED_WINDEX.attr index 58458c2353..089564cdb4 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/DERIVED_WINDEX.attr +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/DERIVED_WINDEX.attr @@ -1,8 +1,7 @@ -legend_color=RGB {200, 200, 200} colorMapName=lingray -colorBar=@dfltMcidasColorBar.xml +colorBar=@ColorBars/Satellite/dfltMcidasColorBar.xml imageType=Derived Wind Index(WINDEX) displayUnitStr=GenericPixel alpha=1.0 brightness=1.0 -contrast=1.0 \ No newline at end of file +contrast=1.0 diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/DMPI.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/DMPI.attr similarity index 62% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/DMPI.attr rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/DMPI.attr index f5cb773a9b..a899181e1c 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/DMPI.attr +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/DMPI.attr @@ -1,8 +1,7 @@ -legend_color=RGB {200, 200, 200} colorMapName=lingray -colorBar=@dfltMcidasColorBar.xml +colorBar=@ColorBars/Satellite/dfltMcidasColorBar.xml imageType=Derived Dry Microburst Potential Index (DMPI) displayUnitStr=GenericPixel alpha=1.0 brightness=1.0 -contrast=1.0 \ No newline at end of file +contrast=1.0 diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/GOES13_GINI.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/GINI_GOES15.xml similarity index 80% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/GOES13_GINI.xml rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/GINI_GOES15.xml index 22776c0143..9ddac1a2a8 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/GOES13_GINI.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/GINI_GOES15.xml @@ -1,20 +1,21 @@ true - GOES13_GINI + GINI_GOES15 SATELLITE ! This must match the "creatingEntity" in the ! satellite DB table valid values are -creatingEntity=GOES-13(N) pluginName=satellite +satelliteName=GOES-15(P) +legendColor=RGB {200, 200, 200} GOES,GINI GiniSatellite - ${sectorId} + sectorID CLOSEST_BEFORE_OR_AFTER - 30 + 60 USE_DATA_TIMES 10 48 diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/GRID_CLOUD_AMT.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/GRID_CLOUD_AMT.attr similarity index 59% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/GRID_CLOUD_AMT.attr rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/GRID_CLOUD_AMT.attr index afd993d0bf..8fd34efc0b 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/GRID_CLOUD_AMT.attr +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/GRID_CLOUD_AMT.attr @@ -1,8 +1,7 @@ -legend_color=RGB {200, 200, 200} colorMapName=lingray -colorBar=@dfltMcidasColorBar.xml +colorBar=@ColorBars/Satellite/dfltMcidasColorBar.xml imageType=Gridded Cloud Amount displayUnitStr=SounderCloudAmountPixel alpha=1.0 brightness=1.0 -contrast=1.0 \ No newline at end of file +contrast=1.0 diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/GRID_CTOP_PRES_HGHT.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/GRID_CTOP_PRES_HGHT.attr similarity index 63% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/GRID_CTOP_PRES_HGHT.attr rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/GRID_CTOP_PRES_HGHT.attr index e829c211c4..1c64cd80c4 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/GRID_CTOP_PRES_HGHT.attr +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/GRID_CTOP_PRES_HGHT.attr @@ -1,8 +1,7 @@ -legend_color=RGB {200, 200, 200} colorMapName=lingray -colorBar=@dfltMcidasColorBar.xml +colorBar=@ColorBars/Satellite/dfltMcidasColorBar.xml imageType=Gridded Cloud Top Pressure or Height displayUnitStr=SounderCloudTopHeightPixel alpha=1.0 brightness=1.0 -contrast=1.0 \ No newline at end of file +contrast=1.0 diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/ICE_CONC.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/ICE_CONC.attr similarity index 56% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/ICE_CONC.attr rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/ICE_CONC.attr index 3049afc4ae..9efb75ca77 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/ICE_CONC.attr +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/ICE_CONC.attr @@ -1,8 +1,7 @@ -legend_color=RGB {200, 200, 200} colorMapName=lingray -colorBar=@dfltMcidasColorBar.xml +colorBar=@ColorBars/Satellite/dfltMcidasColorBar.xml imageType=Ice concentrations displayUnitStr=GenericPixel alpha=1.0 brightness=1.0 -contrast=1.0 \ No newline at end of file +contrast=1.0 diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/ICE_EDGE.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/ICE_EDGE.attr similarity index 54% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/ICE_EDGE.attr rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/ICE_EDGE.attr index 8e83852b6a..9379c1e0de 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/ICE_EDGE.attr +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/ICE_EDGE.attr @@ -1,8 +1,7 @@ -legend_color=RGB {200, 200, 200} colorMapName=lingray -colorBar=@dfltMcidasColorBar.xml +colorBar=@ColorBars/Satellite/dfltMcidasColorBar.xml imageType=Ice edge displayUnitStr=GenericPixel alpha=1.0 brightness=1.0 -contrast=1.0 \ No newline at end of file +contrast=1.0 diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/ICE_TYPE.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/ICE_TYPE.attr similarity index 54% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/ICE_TYPE.attr rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/ICE_TYPE.attr index 2841a00197..e8befd0987 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/ICE_TYPE.attr +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/ICE_TYPE.attr @@ -1,8 +1,7 @@ -legend_color=RGB {200, 200, 200} colorMapName=lingray -colorBar=@dfltMcidasColorBar.xml +colorBar=@ColorBars/Satellite/dfltMcidasColorBar.xml imageType=Ice type displayUnitStr=GenericPixel alpha=1.0 brightness=1.0 -contrast=1.0 \ No newline at end of file +contrast=1.0 diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/IMG_LIFTED_INDEX.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/IMG_LIFTED_INDEX.attr similarity index 63% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/IMG_LIFTED_INDEX.attr rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/IMG_LIFTED_INDEX.attr index bfe2be30c8..4ef5aa938c 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/IMG_LIFTED_INDEX.attr +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/IMG_LIFTED_INDEX.attr @@ -1,8 +1,7 @@ -legend_color=RGB {200, 200, 200} colorMapName=lingray -colorBar=@dfltMcidasColorBar.xml +colorBar=@ColorBars/Satellite/dfltMcidasColorBar.xml imageType=Imager Based Derived Lifted Index (LI) displayUnitStr=SounderLiftedIndexPixel alpha=1.0 brightness=1.0 -contrast=1.0 \ No newline at end of file +contrast=1.0 diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/IMG_PRECIP_WATER.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/IMG_PRECIP_WATER.attr similarity index 62% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/IMG_PRECIP_WATER.attr rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/IMG_PRECIP_WATER.attr index 6390522026..646aeffd51 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/IMG_PRECIP_WATER.attr +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/IMG_PRECIP_WATER.attr @@ -1,8 +1,7 @@ -legend_color=RGB {200, 200, 200} colorMapName=lingray -colorBar=@dfltMcidasColorBar.xml +colorBar=@ColorBars/Satellite/dfltMcidasColorBar.xml imageType=Imager Based Derived Precipitable Water (PW) displayUnitStr=PrecipPixel alpha=1.0 brightness=1.0 -contrast=1.0 \ No newline at end of file +contrast=1.0 diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/IMG_SRFC_SKIN_TEMP.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/IMG_SRFC_SKIN_TEMP.attr similarity index 64% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/IMG_SRFC_SKIN_TEMP.attr rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/IMG_SRFC_SKIN_TEMP.attr index b48aa72720..bdd4ad59a5 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/IMG_SRFC_SKIN_TEMP.attr +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/IMG_SRFC_SKIN_TEMP.attr @@ -1,8 +1,7 @@ -legend_color=RGB {200, 200, 200} colorMapName=lingray -colorBar=@dfltMcidasColorBar.xml +colorBar=@ColorBars/Satellite/dfltMcidasColorBar.xml imageType=Imager Based Derived Surface Skin Temp (SFC Skin) displayUnitStr=SounderSkinTempPixel alpha=1.0 brightness=1.0 -contrast=1.0 \ No newline at end of file +contrast=1.0 diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/IR.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/IR.attr new file mode 100644 index 0000000000..ab8d27b7e8 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/IR.attr @@ -0,0 +1,8 @@ +colorMapName=lingray +colorBar=@ColorBars/Satellite/dfltMcidasColorBar.xml +! The DB values have spaces but imageType must use " "s. +imageType=Imager 11 micron IR +displayUnitStr=IRPixel +alpha=1.0 +brightness=1.0 +contrast=1.0 diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/IR13.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/IR13.attr new file mode 100644 index 0000000000..43b1bf4b32 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/IR13.attr @@ -0,0 +1,8 @@ +colorMapName=lingray +colorBar=@ColorBars/Satellite/dfltMcidasColorBar.xml +! The DB values have spaces but imageType must use " "s. +imageType=Imager 13 micron (IR) +displayUnitStr=IRPixel +alpha=1.0 +brightness=1.0 +contrast=1.0 diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/LOW_CLOUD_IMG.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/LOW_CLOUD_IMG.attr similarity index 57% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/LOW_CLOUD_IMG.attr rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/LOW_CLOUD_IMG.attr index 2efd9d0a5b..d7926c72dd 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/LOW_CLOUD_IMG.attr +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/LOW_CLOUD_IMG.attr @@ -1,8 +1,7 @@ -legend_color=RGB {200, 200, 200} colorMapName=lingray -colorBar=@dfltMcidasColorBar.xml +colorBar=@ColorBars/Satellite/dfltMcidasColorBar.xml imageType=Low cloud base imagery displayUnitStr=GenericPixel alpha=1.0 brightness=1.0 -contrast=1.0 \ No newline at end of file +contrast=1.0 diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/MDPI.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/MDPI.attr similarity index 62% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/MDPI.attr rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/MDPI.attr index f0a0c60b33..cef6535f0e 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/MDPI.attr +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/MDPI.attr @@ -1,8 +1,7 @@ -legend_color=RGB {200, 200, 200} colorMapName=lingray -colorBar=@dfltMcidasColorBar.xml +colorBar=@ColorBars/Satellite/dfltMcidasColorBar.xml imageType=Derived Microburst Day Potential Index (MDPI) displayUnitStr=GenericPixel alpha=1.0 brightness=1.0 -contrast=1.0 \ No newline at end of file +contrast=1.0 diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/NORMAL_TPW_PERCENT.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/NORMAL_TPW_PERCENT.attr similarity index 60% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/NORMAL_TPW_PERCENT.attr rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/NORMAL_TPW_PERCENT.attr index 20a8689892..6bd99b6f42 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/NORMAL_TPW_PERCENT.attr +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/NORMAL_TPW_PERCENT.attr @@ -1,8 +1,7 @@ -legend_color=RGB {200, 200, 200} colorMapName=lingray -colorBar=@dfltMcidasColorBar.xml +colorBar=@ColorBars/Satellite/dfltMcidasColorBar.xml imageType=Percent of Normal TPW displayUnitStr=PercentOfNormalTPWPixel alpha=1.0 brightness=1.0 -contrast=1.0 \ No newline at end of file +contrast=1.0 diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/POLAR_3.7u.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/POLAR_3.7u.attr similarity index 53% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/POLAR_3.7u.attr rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/POLAR_3.7u.attr index 28ffbabd01..4d633f1530 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/POLAR_3.7u.attr +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/POLAR_3.7u.attr @@ -1,8 +1,7 @@ -legend_color=RGB {200, 200, 200} colorMapName=lingray -colorBar=@dfltMcidasColorBar.xml +colorBar=@ColorBars/Satellite/dfltMcidasColorBar.xml imageType=Polar 3.7u displayUnitStr=IRPixel alpha=1.0 brightness=1.0 -contrast=1.0 \ No newline at end of file +contrast=1.0 diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/POLAR_3.9u.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/POLAR_3.9u.attr similarity index 53% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/POLAR_3.9u.attr rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/POLAR_3.9u.attr index 02d1c3ae4c..06854db01e 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/POLAR_3.9u.attr +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/POLAR_3.9u.attr @@ -1,8 +1,7 @@ -legend_color=RGB {200, 200, 200} colorMapName=lingray -colorBar=@dfltMcidasColorBar.xml +colorBar=@ColorBars/Satellite/dfltMcidasColorBar.xml imageType=Polar 3.9u displayUnitStr=IRPixel alpha=1.0 brightness=1.0 -contrast=1.0 \ No newline at end of file +contrast=1.0 diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/POLAR_IR.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/POLAR_IR.attr similarity index 53% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/POLAR_IR.attr rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/POLAR_IR.attr index 3af4b4afd1..6a20f7d566 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/POLAR_IR.attr +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/POLAR_IR.attr @@ -1,8 +1,7 @@ -legend_color=RGB {200, 200, 200} colorMapName=lingray -colorBar=@dfltMcidasColorBar.xml +colorBar=@ColorBars/Satellite/dfltMcidasColorBar.xml imageType=Polar IR displayUnitStr=IRPixel alpha=1.0 brightness=1.0 -contrast=1.0 \ No newline at end of file +contrast=1.0 diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/POLAR_VIS.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/POLAR_VIS.attr similarity index 53% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/POLAR_VIS.attr rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/POLAR_VIS.attr index df8f97b6ca..d6578a334f 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/POLAR_VIS.attr +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/POLAR_VIS.attr @@ -1,8 +1,7 @@ -legend_color=RGB {200, 200, 200} colorMapName=lingray -colorBar=@dfltMcidasColorBar.xml +colorBar=@ColorBars/Satellite/dfltMcidasColorBar.xml imageType=Polar Vis displayUnitStr=IRPixel alpha=1.0 brightness=1.0 -contrast=1.0 \ No newline at end of file +contrast=1.0 diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/RAIN_RATE.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/RAIN_RATE.attr similarity index 57% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/RAIN_RATE.attr rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/RAIN_RATE.attr index 771661f07c..7305eb7685 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/RAIN_RATE.attr +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/RAIN_RATE.attr @@ -1,8 +1,7 @@ -legend_color=RGB {200, 200, 200} colorMapName=lingray -colorBar=@dfltMcidasColorBar.xml +colorBar=@ColorBars/Satellite/dfltMcidasColorBar.xml imageType=Rain fall rate displayUnitStr=RainfallRatePixel alpha=1.0 brightness=1.0 -contrast=1.0 \ No newline at end of file +contrast=1.0 diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SCATTEROMETER.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SCATTEROMETER.attr similarity index 55% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SCATTEROMETER.attr rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SCATTEROMETER.attr index 0ede7c2b83..a05f578deb 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SCATTEROMETER.attr +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SCATTEROMETER.attr @@ -1,8 +1,7 @@ -legend_color=RGB {200, 200, 200} colorMapName=lingray -colorBar=@dfltMcidasColorBar.xml +colorBar=@ColorBars/Satellite/dfltMcidasColorBar.xml imageType=Scatterometer Data displayUnitStr=IRPixel alpha=1.0 brightness=1.0 -contrast=1.0 \ No newline at end of file +contrast=1.0 diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SFC_WETNESS.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SFC_WETNESS.attr similarity index 56% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SFC_WETNESS.attr rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SFC_WETNESS.attr index e34ffc32dc..9753cf44db 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SFC_WETNESS.attr +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SFC_WETNESS.attr @@ -1,8 +1,7 @@ -legend_color=RGB {200, 200, 200} colorMapName=lingray -colorBar=@dfltMcidasColorBar.xml +colorBar=@ColorBars/Satellite/dfltMcidasColorBar.xml imageType=Surface wetness displayUnitStr=GenericPixel alpha=1.0 brightness=1.0 -contrast=1.0 \ No newline at end of file +contrast=1.0 diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SFC_WIND_SPD.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SFC_WIND_SPD.attr similarity index 62% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SFC_WIND_SPD.attr rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SFC_WIND_SPD.attr index 522ab94a29..04808eb1b9 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SFC_WIND_SPD.attr +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SFC_WIND_SPD.attr @@ -1,8 +1,7 @@ -legend_color=RGB {200, 200, 200} colorMapName=lingray -colorBar=@dfltMcidasColorBar.xml +colorBar=@ColorBars/Satellite/dfltMcidasColorBar.xml imageType=Surface wind speeds over oceans and Great Lakes displayUnitStr=GenericPixel alpha=1.0 brightness=1.0 -contrast=1.0 \ No newline at end of file +contrast=1.0 diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SND_11.03.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SND_11.03.attr similarity index 58% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SND_11.03.attr rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SND_11.03.attr index 8b89faecbe..547dd6e061 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SND_11.03.attr +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SND_11.03.attr @@ -1,8 +1,7 @@ -legend_color=RGB {200, 200, 200} colorMapName=lingray -colorBar=@dfltMcidasColorBar.xml +colorBar=@ColorBars/Satellite/dfltMcidasColorBar.xml imageType=Sounder 11.03 micron imagery displayUnitStr=IRPixel alpha=1.0 brightness=1.0 -contrast=1.0 \ No newline at end of file +contrast=1.0 diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SND_12.02.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SND_12.02.attr similarity index 58% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SND_12.02.attr rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SND_12.02.attr index a3c4fa464f..244de73617 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SND_12.02.attr +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SND_12.02.attr @@ -1,8 +1,7 @@ -legend_color=RGB {200, 200, 200} colorMapName=lingray -colorBar=@dfltMcidasColorBar.xml +colorBar=@ColorBars/Satellite/dfltMcidasColorBar.xml imageType=Sounder 12.02 micron imagery displayUnitStr=IRPixel alpha=1.0 brightness=1.0 -contrast=1.0 \ No newline at end of file +contrast=1.0 diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SND_12.66.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SND_12.66.attr similarity index 58% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SND_12.66.attr rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SND_12.66.attr index e80be61384..462e666f93 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SND_12.66.attr +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SND_12.66.attr @@ -1,8 +1,7 @@ -legend_color=RGB {200, 200, 200} colorMapName=lingray -colorBar=@dfltMcidasColorBar.xml +colorBar=@ColorBars/Satellite/dfltMcidasColorBar.xml imageType=Sounder 12.66 micron imagery displayUnitStr=IRPixel alpha=1.0 brightness=1.0 -contrast=1.0 \ No newline at end of file +contrast=1.0 diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SND_13.37.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SND_13.37.attr similarity index 58% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SND_13.37.attr rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SND_13.37.attr index 8e3cfad72c..9cb1aa9c5e 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SND_13.37.attr +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SND_13.37.attr @@ -1,8 +1,7 @@ -legend_color=RGB {200, 200, 200} colorMapName=lingray -colorBar=@dfltMcidasColorBar.xml +colorBar=@ColorBars/Satellite/dfltMcidasColorBar.xml imageType=Sounder 13.37 micron imagery displayUnitStr=IRPixel alpha=1.0 brightness=1.0 -contrast=1.0 \ No newline at end of file +contrast=1.0 diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SND_13.64.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SND_13.64.attr similarity index 58% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SND_13.64.attr rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SND_13.64.attr index cbde7b18bd..9f58a6bac2 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SND_13.64.attr +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SND_13.64.attr @@ -1,8 +1,7 @@ -legend_color=RGB {200, 200, 200} colorMapName=lingray -colorBar=@dfltMcidasColorBar.xml +colorBar=@ColorBars/Satellite/dfltMcidasColorBar.xml imageType=Sounder 13.64 micron imagery displayUnitStr=IRPixel alpha=1.0 brightness=1.0 -contrast=1.0 \ No newline at end of file +contrast=1.0 diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SND_14.06.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SND_14.06.attr similarity index 58% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SND_14.06.attr rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SND_14.06.attr index 5f4bd7a335..de2a6e2798 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SND_14.06.attr +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SND_14.06.attr @@ -1,8 +1,7 @@ -legend_color=RGB {200, 200, 200} colorMapName=lingray -colorBar=@dfltMcidasColorBar.xml +colorBar=@ColorBars/Satellite/dfltMcidasColorBar.xml imageType=Sounder 14.06 micron imagery displayUnitStr=IRPixel alpha=1.0 brightness=1.0 -contrast=1.0 \ No newline at end of file +contrast=1.0 diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SND_14.37.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SND_14.37.attr similarity index 58% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SND_14.37.attr rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SND_14.37.attr index 5e2e487083..da7800808b 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SND_14.37.attr +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SND_14.37.attr @@ -1,8 +1,7 @@ -legend_color=RGB {200, 200, 200} colorMapName=lingray -colorBar=@dfltMcidasColorBar.xml +colorBar=@ColorBars/Satellite/dfltMcidasColorBar.xml imageType=Sounder 14.37 micron imagery displayUnitStr=IRPixel alpha=1.0 brightness=1.0 -contrast=1.0 \ No newline at end of file +contrast=1.0 diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SND_14.71.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SND_14.71.attr similarity index 58% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SND_14.71.attr rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SND_14.71.attr index 41f8893fa7..b4f2c87ea2 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SND_14.71.attr +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SND_14.71.attr @@ -1,8 +1,7 @@ -legend_color=RGB {200, 200, 200} colorMapName=lingray -colorBar=@dfltMcidasColorBar.xml +colorBar=@ColorBars/Satellite/dfltMcidasColorBar.xml imageType=Sounder 14.71 micron imagery displayUnitStr=IRPixel alpha=1.0 brightness=1.0 -contrast=1.0 \ No newline at end of file +contrast=1.0 diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SND_3.74.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SND_3.74.attr similarity index 57% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SND_3.74.attr rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SND_3.74.attr index 16ba1870e1..4b0e26bda5 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SND_3.74.attr +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SND_3.74.attr @@ -1,8 +1,7 @@ -legend_color=RGB {200, 200, 200} colorMapName=lingray -colorBar=@dfltMcidasColorBar.xml +colorBar=@ColorBars/Satellite/dfltMcidasColorBar.xml imageType=Sounder 3.74 micron imagery displayUnitStr=IRPixel alpha=1.0 brightness=1.0 -contrast=1.0 \ No newline at end of file +contrast=1.0 diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SND_3.98.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SND_3.98.attr similarity index 57% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SND_3.98.attr rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SND_3.98.attr index 895f7ac259..db0e925130 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SND_3.98.attr +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SND_3.98.attr @@ -1,8 +1,7 @@ -legend_color=RGB {200, 200, 200} colorMapName=lingray -colorBar=@dfltMcidasColorBar.xml +colorBar=@ColorBars/Satellite/dfltMcidasColorBar.xml imageType=Sounder 3.98 micron imagery displayUnitStr=IRPixel alpha=1.0 brightness=1.0 -contrast=1.0 \ No newline at end of file +contrast=1.0 diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SND_4.13.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SND_4.13.attr similarity index 57% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SND_4.13.attr rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SND_4.13.attr index c27cdadd35..8e3484d48e 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SND_4.13.attr +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SND_4.13.attr @@ -1,8 +1,7 @@ -legend_color=RGB {200, 200, 200} colorMapName=lingray -colorBar=@dfltMcidasColorBar.xml +colorBar=@ColorBars/Satellite/dfltMcidasColorBar.xml imageType=Sounder 4.13 micron imagery displayUnitStr=IRPixel alpha=1.0 brightness=1.0 -contrast=1.0 \ No newline at end of file +contrast=1.0 diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SND_4.45.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SND_4.45.attr similarity index 57% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SND_4.45.attr rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SND_4.45.attr index 3e643b713e..4f0b9bce68 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SND_4.45.attr +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SND_4.45.attr @@ -1,8 +1,7 @@ -legend_color=RGB {200, 200, 200} colorMapName=lingray -colorBar=@dfltMcidasColorBar.xml +colorBar=@ColorBars/Satellite/dfltMcidasColorBar.xml imageType=Sounder 4.45 micron imagery displayUnitStr=IRPixel alpha=1.0 brightness=1.0 -contrast=1.0 \ No newline at end of file +contrast=1.0 diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SND_4.52.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SND_4.52.attr similarity index 57% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SND_4.52.attr rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SND_4.52.attr index 23e56c2814..54e31f291f 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SND_4.52.attr +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SND_4.52.attr @@ -1,8 +1,7 @@ -legend_color=RGB {200, 200, 200} colorMapName=lingray -colorBar=@dfltMcidasColorBar.xml +colorBar=@ColorBars/Satellite/dfltMcidasColorBar.xml imageType=Sounder 4.52 micron imagery displayUnitStr=IRPixel alpha=1.0 brightness=1.0 -contrast=1.0 \ No newline at end of file +contrast=1.0 diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SND_4.57.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SND_4.57.attr similarity index 57% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SND_4.57.attr rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SND_4.57.attr index a592840934..f8c6a6c828 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SND_4.57.attr +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SND_4.57.attr @@ -1,8 +1,7 @@ -legend_color=RGB {200, 200, 200} colorMapName=lingray -colorBar=@dfltMcidasColorBar.xml +colorBar=@ColorBars/Satellite/dfltMcidasColorBar.xml imageType=Sounder 4.57 micron imagery displayUnitStr=IRPixel alpha=1.0 brightness=1.0 -contrast=1.0 \ No newline at end of file +contrast=1.0 diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SND_6.51.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SND_6.51.attr similarity index 57% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SND_6.51.attr rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SND_6.51.attr index 7f848ab666..de741eae3a 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SND_6.51.attr +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SND_6.51.attr @@ -1,8 +1,7 @@ -legend_color=RGB {200, 200, 200} colorMapName=lingray -colorBar=@dfltMcidasColorBar.xml +colorBar=@ColorBars/Satellite/dfltMcidasColorBar.xml imageType=Sounder 6.51 micron imagery displayUnitStr=IRPixel alpha=1.0 brightness=1.0 -contrast=1.0 \ No newline at end of file +contrast=1.0 diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SND_7.02.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SND_7.02.attr similarity index 57% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SND_7.02.attr rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SND_7.02.attr index d95d5fab38..ed7f062cf5 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SND_7.02.attr +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SND_7.02.attr @@ -1,8 +1,7 @@ -legend_color=RGB {200, 200, 200} colorMapName=lingray -colorBar=@dfltMcidasColorBar.xml +colorBar=@ColorBars/Satellite/dfltMcidasColorBar.xml imageType=Sounder 7.02 micron imagery displayUnitStr=IRPixel alpha=1.0 brightness=1.0 -contrast=1.0 \ No newline at end of file +contrast=1.0 diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SND_7.43.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SND_7.43.attr similarity index 57% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SND_7.43.attr rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SND_7.43.attr index b61674609d..748ac900d6 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SND_7.43.attr +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SND_7.43.attr @@ -1,8 +1,7 @@ -legend_color=RGB {200, 200, 200} colorMapName=lingray -colorBar=@dfltMcidasColorBar.xml +colorBar=@ColorBars/Satellite/dfltMcidasColorBar.xml imageType=Sounder 7.43 micron imagery displayUnitStr=IRPixel alpha=1.0 brightness=1.0 -contrast=1.0 \ No newline at end of file +contrast=1.0 diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SND_9.71.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SND_9.71.attr similarity index 57% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SND_9.71.attr rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SND_9.71.attr index a9bccb7bad..29d901bdfd 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SND_9.71.attr +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SND_9.71.attr @@ -1,8 +1,7 @@ -legend_color=RGB {200, 200, 200} colorMapName=lingray -colorBar=@dfltMcidasColorBar.xml +colorBar=@ColorBars/Satellite/dfltMcidasColorBar.xml imageType=Sounder 9.71 micron imagery displayUnitStr=IRPixel alpha=1.0 brightness=1.0 -contrast=1.0 \ No newline at end of file +contrast=1.0 diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SND_LIFTED_INDEX.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SND_LIFTED_INDEX.attr similarity index 63% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SND_LIFTED_INDEX.attr rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SND_LIFTED_INDEX.attr index 29c2553f2b..e2cf799bbf 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SND_LIFTED_INDEX.attr +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SND_LIFTED_INDEX.attr @@ -1,8 +1,7 @@ -legend_color=RGB {200, 200, 200} colorMapName=lingray -colorBar=@dfltMcidasColorBar.xml +colorBar=@ColorBars/Satellite/dfltMcidasColorBar.xml imageType=Sounder Based Derived Lifted Index (LI) displayUnitStr=SounderLiftedIndexPixel alpha=1.0 brightness=1.0 -contrast=1.0 \ No newline at end of file +contrast=1.0 diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SND_PRECIP_WATER.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SND_PRECIP_WATER.attr similarity index 64% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SND_PRECIP_WATER.attr rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SND_PRECIP_WATER.attr index 79ea6aff39..2c88a0f5d8 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SND_PRECIP_WATER.attr +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SND_PRECIP_WATER.attr @@ -1,8 +1,7 @@ -legend_color=RGB {200, 200, 200} colorMapName=lingray -colorBar=@dfltMcidasColorBar.xml +colorBar=@ColorBars/Satellite/dfltMcidasColorBar.xml imageType=Sounder Based Derived Precipitable Water (PW) displayUnitStr=SounderPrecipWaterPixel alpha=1.0 brightness=1.0 -contrast=1.0 \ No newline at end of file +contrast=1.0 diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SND_SFC_SKIN_TEMP.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SND_SFC_SKIN_TEMP.attr similarity index 64% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SND_SFC_SKIN_TEMP.attr rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SND_SFC_SKIN_TEMP.attr index 5a81c71663..311972a597 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SND_SFC_SKIN_TEMP.attr +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SND_SFC_SKIN_TEMP.attr @@ -1,8 +1,7 @@ -legend_color=RGB {200, 200, 200} colorMapName=lingray -colorBar=@dfltMcidasColorBar.xml +colorBar=@ColorBars/Satellite/dfltMcidasColorBar.xml imageType=Sounder Based Derived Surface Skin Temp (SFC Skin) displayUnitStr=SounderSkinTempPixel alpha=1.0 brightness=1.0 -contrast=1.0 \ No newline at end of file +contrast=1.0 diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SND_VIS.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SND_VIS.attr similarity index 58% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SND_VIS.attr rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SND_VIS.attr index ec7e8eced0..d99cea7530 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SND_VIS.attr +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SND_VIS.attr @@ -1,8 +1,7 @@ -legend_color=RGB {200, 200, 200} colorMapName=lingray -colorBar=@dfltMcidasColorBar.xml +colorBar=@ColorBars/Satellite/dfltMcidasColorBar.xml imageType=Sounder Visible imagery displayUnitStr=GenericPixel alpha=1.0 brightness=1.0 -contrast=1.0 \ No newline at end of file +contrast=1.0 diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SNOW_IND.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SNOW_IND.attr similarity index 55% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SNOW_IND.attr rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SNOW_IND.attr index 7645b6610f..de51b42452 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SNOW_IND.attr +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SNOW_IND.attr @@ -1,8 +1,7 @@ -legend_color=RGB {200, 200, 200} colorMapName=lingray -colorBar=@dfltMcidasColorBar.xml +colorBar=@ColorBars/Satellite/dfltMcidasColorBar.xml imageType=Snow indicator displayUnitStr=GenericPixel alpha=1.0 brightness=1.0 -contrast=1.0 \ No newline at end of file +contrast=1.0 diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SNOW_WATER.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SNOW_WATER.attr similarity index 56% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SNOW_WATER.attr rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SNOW_WATER.attr index b77f1e5800..4eec894549 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SNOW_WATER.attr +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SNOW_WATER.attr @@ -1,8 +1,7 @@ -legend_color=RGB {200, 200, 200} colorMapName=lingray -colorBar=@dfltMcidasColorBar.xml +colorBar=@ColorBars/Satellite/dfltMcidasColorBar.xml imageType=Snow-water content displayUnitStr=PrecipPixel alpha=1.0 brightness=1.0 -contrast=1.0 \ No newline at end of file +contrast=1.0 diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SURFACE_TYPE.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SURFACE_TYPE.attr similarity index 55% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SURFACE_TYPE.attr rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SURFACE_TYPE.attr index 23426174a4..0cc7cca419 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/SURFACE_TYPE.attr +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/SURFACE_TYPE.attr @@ -1,8 +1,7 @@ -legend_color=RGB {200, 200, 200} colorMapName=lingray -colorBar=@dfltMcidasColorBar.xml +colorBar=@ColorBars/Satellite/dfltMcidasColorBar.xml imageType=Surface type displayUnitStr=GenericPixel alpha=1.0 brightness=1.0 -contrast=1.0 \ No newline at end of file +contrast=1.0 diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/VIS.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/VIS.attr new file mode 100644 index 0000000000..56a43a4d7e --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/VIS.attr @@ -0,0 +1,8 @@ +colorMapName=lingray +colorBar=@ColorBars/Satellite/dfltMcidasColorBar.xml +! The DB values have spaces but imageType must use " "s. +imageType=Imager Visible +displayUnitStr=GenericPixel +alpha=1.0 +brightness=1.0 +contrast=1.0 diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/WV.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/WV.attr new file mode 100644 index 0000000000..e34cef65ef --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/WV.attr @@ -0,0 +1,8 @@ +colorMapName=watvap +colorBar=@ColorBars/Satellite/dfltMcidasColorBar.xml +! The DB values have spaces but imageType must use " "s. +imageType=Imager 6.7-6.5 micron IR (WV) +displayUnitStr=DerivedWVPixel +alpha=1.0 +brightness=1.0 +contrast=1.0 diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/default.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/default.attr similarity index 50% rename from cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/default.attr rename to cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/default.attr index 335f5d3d02..ab8d27b7e8 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/default.attr +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES15/default.attr @@ -1,6 +1,6 @@ -legend_color=RGB {200, 200, 200} colorMapName=lingray -colorBar=@dfltMcidasColorBar.xml +colorBar=@ColorBars/Satellite/dfltMcidasColorBar.xml +! The DB values have spaces but imageType must use " "s. imageType=Imager 11 micron IR displayUnitStr=IRPixel alpha=1.0 diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES7/GINI_GOES7.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES7/GINI_GOES7.xml index bf91194161..4cba599cdd 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES7/GINI_GOES7.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES7/GINI_GOES7.xml @@ -1,6 +1,6 @@ - true + false GINI_GOES7 SATELLITE diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES8/GINI_GOES8.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES8/GINI_GOES8.xml index 090ec2cdf1..df9f23db4c 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES8/GINI_GOES8.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES8/GINI_GOES8.xml @@ -1,6 +1,6 @@ - true + false GINI_GOES8 SATELLITE diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES9/GINI_GOES9.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES9/GINI_GOES9.xml index fb21115544..94bca93c37 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES9/GINI_GOES9.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_GOES9/GINI_GOES9.xml @@ -1,6 +1,6 @@ - true + false GINI_GOES9 SATELLITE diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_JERS/GINI_JERS.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_JERS/GINI_JERS.xml index 6d999e82a5..eec02fdd2a 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_JERS/GINI_JERS.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_JERS/GINI_JERS.xml @@ -1,6 +1,6 @@ - true + false GINI_JERS SATELLITE diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_METEOSAT/GINI_METEOSAT.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_METEOSAT/GINI_METEOSAT.xml index 4ec3b0d69d..43e8e47604 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_METEOSAT/GINI_METEOSAT.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_METEOSAT/GINI_METEOSAT.xml @@ -1,6 +1,6 @@ - true + false GINI_METEOSAT SATELLITE diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_NOAA16/GINI_NOAA16.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_NOAA16/GINI_NOAA16.xml index 2766546933..092689cd5f 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_NOAA16/GINI_NOAA16.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_NOAA16/GINI_NOAA16.xml @@ -1,6 +1,6 @@ - true + false GINI_NOAA16 SATELLITE diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_NOAA17/GINI_NOAA17.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_NOAA17/GINI_NOAA17.xml index 20f092f8c9..40b8f3a077 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_NOAA17/GINI_NOAA17.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_NOAA17/GINI_NOAA17.xml @@ -1,6 +1,6 @@ - true + false GINI_NOAA17 SATELLITE diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_NOAA18/GINI_NOAA18.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_NOAA18/GINI_NOAA18.xml index e59d3f56a9..b8a9c29be9 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_NOAA18/GINI_NOAA18.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_NOAA18/GINI_NOAA18.xml @@ -1,6 +1,6 @@ - true + false GINI_NOAA18 SATELLITE diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_NOAA19/GINI_NOAA19.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_NOAA19/GINI_NOAA19.xml index 4d5fb88126..e948e21977 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_NOAA19/GINI_NOAA19.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GINI_NOAA19/GINI_NOAA19.xml @@ -1,6 +1,6 @@ - true + false GINI_NOAA19 SATELLITE diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GMS/GMS.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GMS/GMS.xml index 7422ea0d4a..3aca545570 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GMS/GMS.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GMS/GMS.xml @@ -1,6 +1,6 @@ - true + false GMS SATELLITE diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES10/GOES10.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES10/GOES10.xml index 38128d6d03..29b1063310 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES10/GOES10.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES10/GOES10.xml @@ -1,6 +1,6 @@ - true + false GOES10 SATELLITE diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES11/GOES11.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES11/GOES11.xml index 5ec07d4a51..cd19ac5b48 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES11/GOES11.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES11/GOES11.xml @@ -1,6 +1,6 @@ - true + false GOES11 SATELLITE diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES12/GOES12.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES12/GOES12.xml index d0ca3ba1e9..3e01b47238 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES12/GOES12.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES12/GOES12.xml @@ -1,6 +1,6 @@ - true + false GOES12 SATELLITE diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/GINI_GOES13.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/GINI_GOES13.xml deleted file mode 100644 index 77cc62db21..0000000000 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/GINI_GOES13.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - true - GINI_GOES13 - SATELLITE - -! This must match the "creatingEntity" in the -! satellite DB table valid values are -creatingEntity=GOES-13(N) -pluginName=satellite - - GOES,GINI - GiniSatellite - ${sector} - - CLOSEST_BEFORE_OR_AFTER - 30 - USE_DATA_TIMES - 10 - 48 - BasicWX_US - diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/IR.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/IR.attr deleted file mode 100644 index 1c6ddfb114..0000000000 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/IR.attr +++ /dev/null @@ -1,8 +0,0 @@ -legend_color=RGB {200, 200, 200} -colorMapName=lingray -colorBar=@dfltMcidasColorBar.xml -imageType=Imager 11 micron IR -displayUnitStr=IRPixel -alpha=1.0 -brightness=1.0 -contrast=1.0 \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/IR13.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/IR13.attr deleted file mode 100644 index 26f770a475..0000000000 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/IR13.attr +++ /dev/null @@ -1,8 +0,0 @@ -legend_color=RGB {200, 200, 200} -colorMapName=lingray -colorBar=@dfltMcidasColorBar.xml -imageType=Imager 13 micron (IR) -displayUnitStr=IRPixel -alpha=1.0 -brightness=1.0 -contrast=1.0 \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/VIS.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/VIS.attr deleted file mode 100644 index 3f898e2ad0..0000000000 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/VIS.attr +++ /dev/null @@ -1,8 +0,0 @@ -legend_color=RGB {200, 200, 200} -colorMapName=lingray -colorBar=@dfltMcidasColorBar.xml -imageType=Imager Visible -displayUnitStr=GenericPixel -alpha=1.0 -brightness=1.0 -contrast=1.0 \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/WV.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/WV.attr deleted file mode 100644 index 18faced3ea..0000000000 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES13_GINI/WV.attr +++ /dev/null @@ -1,8 +0,0 @@ -legend_color=RGB {200, 200, 200} -colorMapName=watvap -colorBar=@dfltMcidasColorBar.xml -imageType=Imager 6.7-6.5 micron IR (WV) -displayUnitStr=DerivedWVPixel -alpha=1.0 -brightness=1.0 -contrast=1.0 \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES6/GOES6.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES6/GOES6.xml index 56f1862362..36895ada07 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES6/GOES6.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES6/GOES6.xml @@ -1,6 +1,6 @@ - true + false GOES6 SATELLITE diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES7/GOES7.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES7/GOES7.xml index 440b5295a0..1ee1d533fc 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES7/GOES7.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES7/GOES7.xml @@ -1,6 +1,6 @@ - true + false GOES7 SATELLITE diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES8/GOES8.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES8/GOES8.xml index fb2b443064..a2986af84b 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES8/GOES8.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES8/GOES8.xml @@ -1,6 +1,6 @@ - true + false GOES8 SATELLITE diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES9/GOES9.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES9/GOES9.xml index 95a29b79fc..d1072da4ce 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES9/GOES9.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/GOES9/GOES9.xml @@ -1,6 +1,6 @@ - true + false GOES9 SATELLITE diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/METEOSAT10/METEOSAT10.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/METEOSAT10/METEOSAT10.xml index dd400ab92f..0887bee8a1 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/METEOSAT10/METEOSAT10.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/METEOSAT10/METEOSAT10.xml @@ -1,6 +1,6 @@ - true + false METEOSAT10 SATELLITE diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/METEOSAT3/METEOSAT3.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/METEOSAT3/METEOSAT3.xml index 4d531a6d3a..b60c1c64f5 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/METEOSAT3/METEOSAT3.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/METEOSAT3/METEOSAT3.xml @@ -1,6 +1,6 @@ - true + false METEOSAT3 SATELLITE diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/METEOSAT5/METEOSAT5.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/METEOSAT5/METEOSAT5.xml index 5ef932c765..a0473d2015 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/METEOSAT5/METEOSAT5.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/METEOSAT5/METEOSAT5.xml @@ -1,6 +1,6 @@ - true + false METEOSAT5 SATELLITE diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/METEOSAT6/METEOSAT6.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/METEOSAT6/METEOSAT6.xml index 29a2a2806e..3e4095cdba 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/METEOSAT6/METEOSAT6.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/METEOSAT6/METEOSAT6.xml @@ -1,6 +1,6 @@ - true + false METEOSAT6 SATELLITE diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/METEOSAT7/METEOSAT7.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/METEOSAT7/METEOSAT7.xml index 589257d8e4..024e91693a 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/METEOSAT7/METEOSAT7.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/METEOSAT7/METEOSAT7.xml @@ -1,6 +1,6 @@ - true + false METEOSAT7 SATELLITE diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/METEOSAT8/METEOSAT8.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/METEOSAT8/METEOSAT8.xml index b26a04018c..1cabcbb6c1 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/METEOSAT8/METEOSAT8.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SATELLITE/METEOSAT8/METEOSAT8.xml @@ -1,6 +1,6 @@ - true + false METEOSAT8 SATELLITE diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SURFACE/ETAMOS/ETAMOS.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SURFACE/ETAMOS/ETAMOS.xml index 0521d30989..6dc9ae0a98 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SURFACE/ETAMOS/ETAMOS.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SURFACE/ETAMOS/ETAMOS.xml @@ -1,6 +1,7 @@ true + true ETAMOS SURFACE @@ -15,8 +16,9 @@ legendColor=RGB {0, 255, 0} CLOSEST_BEFORE_OR_AFTER 60 - USE_FRAME_INTERVAL - 10 - 48 + USE_DATA_TIMES + 999 + + 84 BasicWX_US diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SURFACE/GFSMOS/GFSMOS.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SURFACE/GFSMOS/GFSMOS.xml index fb68a1150c..cdca9966e9 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SURFACE/GFSMOS/GFSMOS.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SURFACE/GFSMOS/GFSMOS.xml @@ -1,6 +1,7 @@ true + true GFSMOS SURFACE @@ -15,8 +16,9 @@ legendColor=RGB {0, 255, 0} CLOSEST_BEFORE_OR_AFTER 60 - USE_FRAME_INTERVAL - 10 - 48 + USE_DATA_TIMES + 999 + + 84 BasicWX_US diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SURFACE/GFSXMOS/GFSXMOS.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SURFACE/GFSXMOS/GFSXMOS.xml index 83abd399df..ae587742ac 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SURFACE/GFSXMOS/GFSXMOS.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SURFACE/GFSXMOS/GFSXMOS.xml @@ -1,6 +1,7 @@ true + true GFSXMOS SURFACE @@ -15,8 +16,9 @@ legendColor=RGB {0, 255, 0} CLOSEST_BEFORE_OR_AFTER 60 - USE_FRAME_INTERVAL - 10 - 48 + USE_DATA_TIMES + 999 + + 198 BasicWX_US diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SURFACE/IDFT/IDFT.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SURFACE/IDFT/IDFT.xml index 9e74faa4fd..6e50d9c282 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SURFACE/IDFT/IDFT.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SURFACE/IDFT/IDFT.xml @@ -14,7 +14,8 @@ reportType=idft CLOSEST_BEFORE_OR_AFTER 1440 USE_DATA_TIMES - 20 - 480 + 999 + + 384 BasicWX_US diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SURFACE/LAMPMOS/LAMPMOS.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SURFACE/LAMPMOS/LAMPMOS.xml index c5876a6c91..30bbee378e 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SURFACE/LAMPMOS/LAMPMOS.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SURFACE/LAMPMOS/LAMPMOS.xml @@ -1,6 +1,7 @@ - true + false + false LAMPMOS SURFACE @@ -15,8 +16,8 @@ legendColor=RGB {0, 255, 0} CLOSEST_BEFORE_OR_AFTER 60 - USE_FRAME_INTERVAL - 10 - 48 + USE_DATA_TIMES + 999 + 25 BasicWX_US diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SURFACE/NGMMOS/NGMMOS.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SURFACE/NGMMOS/NGMMOS.xml deleted file mode 100644 index 6f01c3cf74..0000000000 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SURFACE/NGMMOS/NGMMOS.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - true - NGMMOS - SURFACE - -pluginName=bufrmosNGM -spiFile=MTR.spi -legendString=NGMMOS -legendColor=RGB {0, 255, 0} - - Forecast,MOS - MosPlot - - - CLOSEST_BEFORE_OR_AFTER - 60 - USE_FRAME_INTERVAL - 10 - 48 - BasicWX_US - diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SURFACE/NGMMOS/mxmn12hrpop.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SURFACE/NGMMOS/mxmn12hrpop.attr deleted file mode 100644 index c0eb729af9..0000000000 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SURFACE/NGMMOS/mxmn12hrpop.attr +++ /dev/null @@ -1,5 +0,0 @@ -! Attributes for the NGMMOS resource with "mxmn12hrpop" plot model -! -plotModel=@PlotModels/bufrmosNGM/mxmn12hrpop.xml -plotDensity=10 -conditionalFilter= \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SURFACE/NGMMOS/standard.attr b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SURFACE/NGMMOS/standard.attr deleted file mode 100644 index c8f623840a..0000000000 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SURFACE/NGMMOS/standard.attr +++ /dev/null @@ -1,5 +0,0 @@ -! Attributes for the NGMMOS resource with "standard" plot model -! -plotModel=@PlotModels/bufrmosNGM/standard.xml -plotDensity=10 -conditionalFilter= \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SURFACE/PAFM/PAFM.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SURFACE/PAFM/PAFM.xml index 8f2ee02e7d..c822cc5daf 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SURFACE/PAFM/PAFM.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SURFACE/PAFM/PAFM.xml @@ -1,6 +1,7 @@ true + true PAFM SURFACE @@ -17,7 +18,7 @@ legendColor=RGB {0, 255, 0} CLOSEST_BEFORE_OR_AFTER 180 USE_FRAME_INTERVAL - 10 + 999 168 BasicWX_US diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SURFACE/SYNOP/SYNOP.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SURFACE/SYNOP/SYNOP.xml index 6d0cb0872a..566d5f6fd7 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SURFACE/SYNOP/SYNOP.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SURFACE/SYNOP/SYNOP.xml @@ -1,6 +1,7 @@ true + true SYNOP SURFACE diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SURFACE/TAF/TAF.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SURFACE/TAF/TAF.xml index 8604182f93..3c08eb0772 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/SURFACE/TAF/TAF.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/SURFACE/TAF/TAF.xml @@ -1,6 +1,7 @@ true + true TAF SURFACE @@ -17,7 +18,7 @@ legendColor=RGB {0, 255, 0} CLOSEST_BEFORE_OR_AFTER 60 USE_FRAME_INTERVAL - 30 + 999 30 BasicWX_US diff --git a/cave/build/static/common/cave/etc/ncep/ResourceDefns/UPPER_AIR/NAMSND/NAMSND.xml b/cave/build/static/common/cave/etc/ncep/ResourceDefns/UPPER_AIR/NAMSND/NAMSND.xml index 5990e1f9cf..deb4618bff 100644 --- a/cave/build/static/common/cave/etc/ncep/ResourceDefns/UPPER_AIR/NAMSND/NAMSND.xml +++ b/cave/build/static/common/cave/etc/ncep/ResourceDefns/UPPER_AIR/NAMSND/NAMSND.xml @@ -1,6 +1,7 @@ true + true NAMSND UPPER_AIR @@ -16,8 +17,8 @@ legendColor=RGB {0, 255, 0} CLOSEST_BEFORE_OR_AFTER 60 - USE_FRAME_INTERVAL - 4 - 48 + USE_DATA_TIMES + 999 + 168 BasicWX_US diff --git a/cave/build/static/common/cave/etc/ncep/nsharp/nsharpConfig.xml b/cave/build/static/common/cave/etc/ncep/nsharp/nsharpConfig.xml index d7b1c5942d..8bf2e1678b 100644 --- a/cave/build/static/common/cave/etc/ncep/nsharp/nsharpConfig.xml +++ b/cave/build/static/common/cave/etc/ncep/nsharp/nsharpConfig.xml @@ -1,6 +1,6 @@ - + @@ -17,24 +17,14 @@ RGB {30, 144, 255} - - - RGB {255, 0, 255} - - RGB {155, 0, 220} - - - RGB {255, 255, 0} - - - + - RGB {0, 255, 0} + RGB {255, 0, 255} @@ -42,14 +32,24 @@ RGB {0, 139, 0} + + + RGB {0, 255, 0} + + + + + RGB {255, 255, 0} + + RGB {139, 0, 139} - - - RGB {139, 71, 38} + + + RGB {255, 140, 0} @@ -57,9 +57,9 @@ RGB {144, 238, 144} - + - RGB {0, 255, 0} + RGB {139, 71, 38} @@ -67,16 +67,16 @@ RGB {255, 0, 0} - - - RGB {255, 0, 0} - - - + RGB {255, 174, 185} + + + RGB {145, 44, 238} + + RGB {0, 255, 0} @@ -87,6 +87,11 @@ RGB {255, 0, 0} + + + RGB {255, 174, 185} + + RGB {255, 0, 0} @@ -97,16 +102,16 @@ RGB {0, 255, 255} - - - RGB {255, 0, 255} - - RGB {255, 0, 0} + + + RGB {255, 0, 255} + + RGB {0, 255, 0} @@ -117,5 +122,11 @@ RGB {255, 250, 250} + + + RGB {255, 255, 255} + + + diff --git a/cave/com.raytheon.uf.viz.ncep.displays.feature/feature.xml b/cave/com.raytheon.uf.viz.ncep.displays.feature/feature.xml index 32717cd93c..6720e6148c 100644 --- a/cave/com.raytheon.uf.viz.ncep.displays.feature/feature.xml +++ b/cave/com.raytheon.uf.viz.ncep.displays.feature/feature.xml @@ -333,4 +333,29 @@ version="0.0.0" unpack="false"/> + + + + + + diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/GINI_GOES15.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/GINI_GOES15.xml new file mode 100644 index 0000000000..91763e2c55 --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/GINI_GOES15.xml @@ -0,0 +1,13 @@ + + + GINI_GOES15 + pluginName,sectorID,physicalElement,dataTime + + + + + + + + + diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/LocalRadar.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/LocalRadar.xml index ab80c21d72..63f0fd5eb3 100644 --- a/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/LocalRadar.xml +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/LocalRadar.xml @@ -1,7 +1,7 @@ LocalRadar - pluginName,icao,productCode,elevationNumber,dataTime + pluginName,icao,productCode,elevationNumber,format,dataTime diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NatlMosaic.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NatlMosaic.xml index a4c6dd7800..2a425c3eb5 100644 --- a/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NatlMosaic.xml +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NatlMosaic.xml @@ -1,7 +1,7 @@ NatlMosaic - pluginName,prodName,productCode,dataTime + pluginName,productCode,dataTime diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NcGridSoundingInventory.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NcGridSoundingInventory.xml new file mode 100644 index 0000000000..dde5030b14 --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NcGridSoundingInventory.xml @@ -0,0 +1,13 @@ + + + NcGridSoundingInventory + + + pluginName,modelName,eventName,dataTime + + + + + + + diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/AAA_README.txt b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/AAA_README.txt new file mode 100644 index 0000000000..764a03b75f --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/AAA_README.txt @@ -0,0 +1,4 @@ +This directory contains Inventory Definitions to match current ResourceDefinitions that have +been changed to not query the inventory. (inventoryEnabled=false) + If for some reason we need to enable one of these then move this back up to the NcInventoryDefinitions +directory. diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/AIREP.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/AIREP.xml new file mode 100644 index 0000000000..cc683ff5ca --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/AIREP.xml @@ -0,0 +1,13 @@ + + + AIREP + pluginName,dataTime + + + + + + + + + diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/AIRMET.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/AIRMET.xml new file mode 100644 index 0000000000..3e7b347674 --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/AIRMET.xml @@ -0,0 +1,13 @@ + + + AIRMET + pluginName,dataTime + + + + + + + + + diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/ASCT.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/ASCT.xml new file mode 100644 index 0000000000..aef93f5f43 --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/ASCT.xml @@ -0,0 +1,13 @@ + + + ASCT + pluginName,dataTime + + + + + + + + + diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/CSIG.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/CSIG.xml new file mode 100644 index 0000000000..604fe23194 --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/CSIG.xml @@ -0,0 +1,13 @@ + + + CSIG + pluginName,dataTime + + + + + + + + + diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/EXASCT.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/EXASCT.xml new file mode 100644 index 0000000000..abb5bfd96b --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/EXASCT.xml @@ -0,0 +1,13 @@ + + + EXASCT + pluginName,dataTime + + + + + + + + + diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/FFA.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/FFA.xml new file mode 100644 index 0000000000..37358088cf --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/FFA.xml @@ -0,0 +1,13 @@ + + + FFA + pluginName,reportType,dataTime + + + + + + + + + diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/FFG.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/FFG.xml new file mode 100644 index 0000000000..16e0fefc3a --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/FFG.xml @@ -0,0 +1,13 @@ + + + FFG + pluginName,dataTime + + + + + + + + + diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/FYC.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/FYC.xml new file mode 100644 index 0000000000..0cef20fea3 --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/FYC.xml @@ -0,0 +1,13 @@ + + + FYC + pluginName,areaName,resolution,imageType,dataTime + + + + + + + + + diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/GINI_DMSP.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/GINI_DMSP.xml new file mode 100644 index 0000000000..f000c621f4 --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/GINI_DMSP.xml @@ -0,0 +1,13 @@ + + + GINI_DMSP + pluginName,sectorID,physicalElement,dataTime + + + + + + + + + diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/GINI_ERS-QuickSCAT-Scatterometer.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/GINI_ERS-QuickSCAT-Scatterometer.xml new file mode 100644 index 0000000000..7c3fe88605 --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/GINI_ERS-QuickSCAT-Scatterometer.xml @@ -0,0 +1,13 @@ + + + GINI_ERS-QuickSCAT-Scatterometer + pluginName,sectorID,physicalElement,dataTime + + + + + + + + + diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/GINI_GMS.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/GINI_GMS.xml new file mode 100644 index 0000000000..cc4c671f83 --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/GINI_GMS.xml @@ -0,0 +1,13 @@ + + + GINI_GMS + pluginName,sectorID,physicalElement,dataTime + + + + + + + + + diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/GINI_GOES10.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/GINI_GOES10.xml new file mode 100644 index 0000000000..8faf1124f6 --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/GINI_GOES10.xml @@ -0,0 +1,13 @@ + + + GINI_GOES10 + pluginName,sectorID,physicalElement,dataTime + + + + + + + + + diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/GINI_GOES7.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/GINI_GOES7.xml new file mode 100644 index 0000000000..fc070c6f71 --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/GINI_GOES7.xml @@ -0,0 +1,13 @@ + + + GINI_GOES7 + pluginName,sectorID,physicalElement,dataTime + + + + + + + + + diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/GINI_GOES8.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/GINI_GOES8.xml new file mode 100644 index 0000000000..f0f693061b --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/GINI_GOES8.xml @@ -0,0 +1,13 @@ + + + GINI_GOES8 + pluginName,sectorID,physicalElement,dataTime + + + + + + + + + diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/GINI_GOES9.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/GINI_GOES9.xml new file mode 100644 index 0000000000..adf5c951f5 --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/GINI_GOES9.xml @@ -0,0 +1,13 @@ + + + GINI_GOES9 + pluginName,sectorID,physicalElement,dataTime + + + + + + + + + diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/GINI_JERS.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/GINI_JERS.xml new file mode 100644 index 0000000000..7e11a2311d --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/GINI_JERS.xml @@ -0,0 +1,13 @@ + + + GINI_JERS + pluginName,sectorID,physicalElement,dataTime + + + + + + + + + diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/GINI_METEOSAT.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/GINI_METEOSAT.xml new file mode 100644 index 0000000000..0b1781a3a8 --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/GINI_METEOSAT.xml @@ -0,0 +1,13 @@ + + + GINI_METEOSTAT + pluginName,sectorID,physicalElement,dataTime + + + + + + + + + diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/GINI_NOAA16.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/GINI_NOAA16.xml new file mode 100644 index 0000000000..8d951d81b1 --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/GINI_NOAA16.xml @@ -0,0 +1,13 @@ + + + GINI_NOAA16 + pluginName,sectorID,physicalElement,dataTime + + + + + + + + + diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/GINI_NOAA17.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/GINI_NOAA17.xml new file mode 100644 index 0000000000..4287200d33 --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/GINI_NOAA17.xml @@ -0,0 +1,13 @@ + + + GINI_NOAA17 + pluginName,sectorID,physicalElement,dataTime + + + + + + + + + diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/GINI_NOAA18.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/GINI_NOAA18.xml new file mode 100644 index 0000000000..311c513292 --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/GINI_NOAA18.xml @@ -0,0 +1,13 @@ + + + GINI_NOAA18 + pluginName,sectorID,physicalElement,dataTime + + + + + + + + + diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/GINI_NOAA19.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/GINI_NOAA19.xml new file mode 100644 index 0000000000..71036bf987 --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/GINI_NOAA19.xml @@ -0,0 +1,13 @@ + + + GINI_NOAA19 + pluginName,sectorID,physicalElement,dataTime + + + + + + + + + diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/GMS.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/GMS.xml new file mode 100644 index 0000000000..42770ecdd6 --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/GMS.xml @@ -0,0 +1,13 @@ + + + GMS + pluginName,areaName,resolution,imageType,dataTime + + + + + + + + + diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/GOES10.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/GOES10.xml new file mode 100644 index 0000000000..6ec0f16bb3 --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/GOES10.xml @@ -0,0 +1,13 @@ + + + GOES10 + pluginName,areaName,resolution,imageType,dataTime + + + + + + + + + diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/GOES11.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/GOES11.xml new file mode 100644 index 0000000000..4370576f1b --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/GOES11.xml @@ -0,0 +1,13 @@ + + + GOES11 + pluginName,areaName,resolution,imageType,dataTime + + + + + + + + + diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/GOES12.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/GOES12.xml new file mode 100644 index 0000000000..08f7c09c38 --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/GOES12.xml @@ -0,0 +1,13 @@ + + + GOES12 + pluginName,areaName,resolution,imageType,dataTime + + + + + + + + + diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/GOES6.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/GOES6.xml new file mode 100644 index 0000000000..d3fe8b6e4e --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/GOES6.xml @@ -0,0 +1,13 @@ + + + GOES6 + pluginName,areaName,resolution,imageType,dataTime + + + + + + + + + diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/GOES7.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/GOES7.xml new file mode 100644 index 0000000000..4ec1f2a2a1 --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/GOES7.xml @@ -0,0 +1,13 @@ + + + GOES7 + pluginName,areaName,resolution,imageType,dataTime + + + + + + + + + diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/GOES8.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/GOES8.xml new file mode 100644 index 0000000000..938a9f7637 --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/GOES8.xml @@ -0,0 +1,13 @@ + + + GOES8 + pluginName,areaName,resolution,imageType,dataTime + + + + + + + + + diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/GOES9.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/GOES9.xml new file mode 100644 index 0000000000..d17f4414a1 --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/GOES9.xml @@ -0,0 +1,13 @@ + + + GOES9 + pluginName,areaName,resolution,imageType,dataTime + + + + + + + + + diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/HRCN.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/HRCN.xml new file mode 100644 index 0000000000..96a9415a00 --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/HRCN.xml @@ -0,0 +1,13 @@ + + + HRCN + pluginName,dataTime + + + + + + + + + diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/IDFT.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/IDFT.xml new file mode 100644 index 0000000000..61de0c5898 --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/IDFT.xml @@ -0,0 +1,13 @@ + + + IDFT + pluginName,dataTime + + + + + + + + + diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/ISIG.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/ISIG.xml new file mode 100644 index 0000000000..42e960683f --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/ISIG.xml @@ -0,0 +1,13 @@ + + + ISIG + pluginName,dataTime + + + + + + + + + diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/LTNG.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/LTNG.xml new file mode 100644 index 0000000000..930418ed60 --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/LTNG.xml @@ -0,0 +1,10 @@ + + + LTNG + pluginName,dataTime + + + + + + diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/LTNG2.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/LTNG2.xml new file mode 100644 index 0000000000..9233290ba9 --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/LTNG2.xml @@ -0,0 +1,10 @@ + + + LTNG2 + pluginName,dataTime + + + + + + diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/METAR.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/METAR.xml new file mode 100644 index 0000000000..f38144df53 --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/METAR.xml @@ -0,0 +1,13 @@ + + + METAR + pluginName,dataTime + + + + + + + + + diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/METEOSAT10.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/METEOSAT10.xml new file mode 100644 index 0000000000..58371775ec --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/METEOSAT10.xml @@ -0,0 +1,13 @@ + + + METEOSAT10 + pluginName,areaName,resolution,imageType,dataTime + + + + + + + + + diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/METEOSAT3.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/METEOSAT3.xml new file mode 100644 index 0000000000..95f64df880 --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/METEOSAT3.xml @@ -0,0 +1,13 @@ + + + METEOSAT3 + pluginName,areaName,resolution,imageType,dataTime + + + + + + + + + diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/METEOSAT5.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/METEOSAT5.xml new file mode 100644 index 0000000000..14d33c6d19 --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/METEOSAT5.xml @@ -0,0 +1,13 @@ + + + METEOSAT5 + pluginName,areaName,resolution,imageType,dataTime + + + + + + + + + diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/METEOSAT6.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/METEOSAT6.xml new file mode 100644 index 0000000000..f4fab32e10 --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/METEOSAT6.xml @@ -0,0 +1,13 @@ + + + METEOSAT6 + pluginName,areaName,resolution,imageType,dataTime + + + + + + + + + diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/METEOSAT7.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/METEOSAT7.xml new file mode 100644 index 0000000000..9eff698d0a --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/METEOSAT7.xml @@ -0,0 +1,13 @@ + + + METEOSAT7 + pluginName,areaName,resolution,imageType,dataTime + + + + + + + + + diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/METEOSAT8.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/METEOSAT8.xml new file mode 100644 index 0000000000..62a50d823b --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/METEOSAT8.xml @@ -0,0 +1,13 @@ + + + METEOSAT8 + pluginName,areaName,resolution,imageType,dataTime + + + + + + + + + diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/MTSAT2.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/MTSAT2.xml new file mode 100644 index 0000000000..e8c2a0e56d --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/MTSAT2.xml @@ -0,0 +1,13 @@ + + + MTS + pluginName,areaName,resolution,imageType,dataTime + + + + + + + + + diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/NCON.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/NCON.xml new file mode 100644 index 0000000000..532b050510 --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/NCON.xml @@ -0,0 +1,13 @@ + + + NCON + pluginName,dataTime + + + + + + + + + diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/OSCT.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/OSCT.xml new file mode 100644 index 0000000000..9e7b3e5ed8 --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/OSCT.xml @@ -0,0 +1,13 @@ + + + OSCT + pluginName,dataTime + + + + + + + + + diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/PIREP.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/PIREP.xml new file mode 100644 index 0000000000..5411e2f98c --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/PIREP.xml @@ -0,0 +1,13 @@ + + + PIREP + pluginName,dataTime + + + + + + + + + diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/QSCT.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/QSCT.xml new file mode 100644 index 0000000000..e88b70b40c --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/QSCT.xml @@ -0,0 +1,13 @@ + + + QSCT + pluginName,dataTime + + + + + + + + + diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/SCD.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/SCD.xml new file mode 100644 index 0000000000..1c717822b8 --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/SCD.xml @@ -0,0 +1,13 @@ + + + SCD + pluginName,dataTime + + + + + + + + + diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/SHIP.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/SHIP.xml new file mode 100644 index 0000000000..45890d0497 --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/SHIP.xml @@ -0,0 +1,13 @@ + + + SHIP + pluginName,dataTime + + + + + + + + + diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/SVRL.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/SVRL.xml new file mode 100644 index 0000000000..f47cc4a37f --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/SVRL.xml @@ -0,0 +1,13 @@ + + + SVRL + pluginName,reportType,dataTime + + + + + + + + + diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/UAIR.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/UAIR.xml new file mode 100644 index 0000000000..b9b33c13dd --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/UAIR.xml @@ -0,0 +1,13 @@ + + + UAIR + pluginName,dataTime + + + + + + + + + diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/WARN.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/WARN.xml new file mode 100644 index 0000000000..ac563a202f --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/WARN.xml @@ -0,0 +1,13 @@ + + + WARN + pluginName,reportType,dataTime + + + + + + + + + diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/WATCH.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/WATCH.xml new file mode 100644 index 0000000000..17ed5a8fd2 --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/WATCH.xml @@ -0,0 +1,13 @@ + + + WATCH + pluginName,reportType,dataTime + + + + + + + + + diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/WCN.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/WCN.xml new file mode 100644 index 0000000000..dbcbdce7e7 --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/WCN.xml @@ -0,0 +1,13 @@ + + + WCN + pluginName,dataTime + + + + + + + + + diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/WCP.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/WCP.xml new file mode 100644 index 0000000000..777d6cb04b --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/WCP.xml @@ -0,0 +1,13 @@ + + + WCP + pluginName,dataTime + + + + + + + + + diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/WOU.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/WOU.xml new file mode 100644 index 0000000000..34053fb4a8 --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/WOU.xml @@ -0,0 +1,13 @@ + + + WOU + pluginName,reportType,dataTime + + + + + + + + + diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/WSAT.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/WSAT.xml new file mode 100644 index 0000000000..f5e707051a --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/WSAT.xml @@ -0,0 +1,13 @@ + + + WSAT + pluginName,dataTime + + + + + + + + + diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/WSTM.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/WSTM.xml new file mode 100644 index 0000000000..d1b6ead951 --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/WSTM.xml @@ -0,0 +1,13 @@ + + + WSTM + pluginName,reportType,dataTime + + + + + + + + + diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/WSTM2.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/WSTM2.xml new file mode 100644 index 0000000000..5dde743f03 --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/ncep/hold/NcInventoryDefinitions/NotUsed/WSTM2.xml @@ -0,0 +1,13 @@ + + + WSTM2 + pluginName,dataTime + + + + + + + + + diff --git a/edexOsgi/com.raytheon.edex.plugin.satellite/res/scripts/creatingEntities.sql b/edexOsgi/com.raytheon.edex.plugin.satellite/res/scripts/creatingEntities.sql index 97709856ad..f86ac50abc 100644 --- a/edexOsgi/com.raytheon.edex.plugin.satellite/res/scripts/creatingEntities.sql +++ b/edexOsgi/com.raytheon.edex.plugin.satellite/res/scripts/creatingEntities.sql @@ -24,7 +24,7 @@ INSERT INTO awips.satellite_creating_entities VALUES (5,'POES-NPOESS'); INSERT INTO awips.satellite_creating_entities VALUES (6,'Composite'); INSERT INTO awips.satellite_creating_entities VALUES (7,'DMSP'); INSERT INTO awips.satellite_creating_entities VALUES (8,'GMS'); -INSERT INTO awips.satellite_creating_entities VALUES (9,'METEOSTAT'); +INSERT INTO awips.satellite_creating_entities VALUES (9,'METEOSAT'); INSERT INTO awips.satellite_creating_entities VALUES (10,'GOES-7(H) Reserved for future use.'); INSERT INTO awips.satellite_creating_entities VALUES (11,'GOES-8(I)'); INSERT INTO awips.satellite_creating_entities VALUES (12,'GOES-9(J)'); diff --git a/edexOsgi/com.raytheon.uf.edex.auth/res/spring/auth-request.xml b/edexOsgi/com.raytheon.uf.edex.auth/res/spring/auth-request.xml index 0df8ba14cb..35b4ded906 100644 --- a/edexOsgi/com.raytheon.uf.edex.auth/res/spring/auth-request.xml +++ b/edexOsgi/com.raytheon.uf.edex.auth/res/spring/auth-request.xml @@ -1,27 +1,29 @@ - + http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd + http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd"> + - + - - + + - + - - - + + + \ No newline at end of file diff --git a/ncep/com.raytheon.uf.edex.ncep.feature/feature.xml b/ncep/com.raytheon.uf.edex.ncep.feature/feature.xml index 95003f1fb9..07c315bc7b 100644 --- a/ncep/com.raytheon.uf.edex.ncep.feature/feature.xml +++ b/ncep/com.raytheon.uf.edex.ncep.feature/feature.xml @@ -115,13 +115,6 @@ version="0.0.0" unpack="false"/> - - - - - - diff --git a/ncep/gov.noaa.nws.ncep.common.dataplugin.mcidas/src/gov/noaa/nws/ncep/common/dataplugin/mcidas/McidasRecord.java b/ncep/gov.noaa.nws.ncep.common.dataplugin.mcidas/src/gov/noaa/nws/ncep/common/dataplugin/mcidas/McidasRecord.java index ac263befe3..d6845e7bb1 100644 --- a/ncep/gov.noaa.nws.ncep.common.dataplugin.mcidas/src/gov/noaa/nws/ncep/common/dataplugin/mcidas/McidasRecord.java +++ b/ncep/gov.noaa.nws.ncep.common.dataplugin.mcidas/src/gov/noaa/nws/ncep/common/dataplugin/mcidas/McidasRecord.java @@ -13,6 +13,7 @@ * 12/2009 144 T. Lee Added calType, satelliteId * and imageTypeNumber * 05/2010 144 L. Lin Migration to TO11DR11. + * 09/2012 B. Hebbard Merge out RTS changes from OB12.9.1 * * * @author tlee @@ -201,6 +202,7 @@ public class McidasRecord extends PersistablePluginDataObject implements super(uri); } + /** * Set the time to be used for the persistence time for this object. * @@ -349,5 +351,4 @@ public class McidasRecord extends PersistablePluginDataObject implements public void setImageTypeNumber(Integer imageTypeNumber) { this.imageTypeNumber = imageTypeNumber; } - } \ No newline at end of file diff --git a/ncep/gov.noaa.nws.ncep.common.dataplugin.tcm/src/gov/noaa/nws/ncep/common/dataplugin/tcm/TcmRecord.java b/ncep/gov.noaa.nws.ncep.common.dataplugin.tcm/src/gov/noaa/nws/ncep/common/dataplugin/tcm/TcmRecord.java index 997acca29e..25fd1ccae1 100644 --- a/ncep/gov.noaa.nws.ncep.common.dataplugin.tcm/src/gov/noaa/nws/ncep/common/dataplugin/tcm/TcmRecord.java +++ b/ncep/gov.noaa.nws.ncep.common.dataplugin.tcm/src/gov/noaa/nws/ncep/common/dataplugin/tcm/TcmRecord.java @@ -14,6 +14,8 @@ * 11/2009 128 T. Lee Migrated to TO11D6 * 09/2011 Chin Chen changed to improve purge performance and * removed xml serialization as well + * 07/2012 #606 Greg Huoll added reportType to the dataURI + * * * * @author T.Lee @@ -54,6 +56,7 @@ public class TcmRecord extends PluginDataObject { /** Report type */ @Column(length=32) + @DataURI(position=6) @DynamicSerializeElement private String reportType; diff --git a/ncep/gov.noaa.nws.ncep.common.staticdata/src/gov/noaa/nws/ncep/common/staticdata/Cwa.java b/ncep/gov.noaa.nws.ncep.common.staticdata/src/gov/noaa/nws/ncep/common/staticdata/Cwa.java new file mode 100644 index 0000000000..6b3233e10c --- /dev/null +++ b/ncep/gov.noaa.nws.ncep.common.staticdata/src/gov/noaa/nws/ncep/common/staticdata/Cwa.java @@ -0,0 +1,128 @@ +/* + * gov.noaa.nws.ncep.common.staticData + * + * 24 June 2012 + * + * This code has been developed by the NCEP/SIB for use in the AWIPS2 system. + */ + +package gov.noaa.nws.ncep.common.staticdata; + +import com.vividsolutions.jts.geom.Coordinate; +import com.vividsolutions.jts.geom.Geometry; + +/** + * Class to hold CWA information + * + *
+ * SOFTWARE HISTORY
+ * Date       	Ticket#		Engineer	Description
+ * ------------	----------	-----------	--------------------------
+ * 02/12		?		    B. Yin   	Initial Creation.
+ * 06/12        734         J. Zeng     move from PGEN
+ * 
+ * + * @author B. Yin + */ + +public class Cwa { + + private String cwaName; + private String wfoName; + private Coordinate centriod; + private Geometry shape; + + //constructor + public Cwa(){ + + } + + //constructor + public Cwa( String cwa, + String wfo, + Coordinate centroid, + Geometry shape ){ + + this.setCwaName(cwa); + this.setWfoName(wfo); + this.setCentriod(centroid); + this.setShape(shape); + } + + /** + * Set Centriod + * @param centriod + */ + public void setCentriod(Coordinate centriod) { + this.centriod = centriod; + } + + /** + * Get Centriod + * @return + */ + public Coordinate getCentriod() { + return centriod; + } + + /** + * set shape + * @param shape + */ + public void setShape(Geometry shape) { + this.shape = shape; + } + + /** + * get shape + * @return + */ + public Geometry getShape() { + return shape; + } + + /** + * find the + * @param geo + * @return + */ + public boolean intersectGeometry(Geometry geo){ + if ( shape != null ){ + return shape.intersects(geo); + } + else return false; + } + + + /** + * set cwa name + * @param cwa + */ + public void setCwaName(String cwa) { + this.cwaName = cwa; + } + + /** + * get cwa name + * @return + */ + public String getCwaName() { + return cwaName; + } + + /** + * set wfo name + * @param wfo + */ + public void setWfoName(String wfo) { + this.wfoName = wfo; + } + + /** + * get wfo name + * @return + */ + public String getWfoName() { + return wfoName; + } +} \ No newline at end of file diff --git a/ncep/gov.noaa.nws.ncep.common.staticdata/src/gov/noaa/nws/ncep/common/staticdata/IStaticDataProvider.java b/ncep/gov.noaa.nws.ncep.common.staticdata/src/gov/noaa/nws/ncep/common/staticdata/IStaticDataProvider.java index c04241c936..2fef1455be 100644 --- a/ncep/gov.noaa.nws.ncep.common.staticdata/src/gov/noaa/nws/ncep/common/staticdata/IStaticDataProvider.java +++ b/ncep/gov.noaa.nws.ncep.common.staticdata/src/gov/noaa/nws/ncep/common/staticdata/IStaticDataProvider.java @@ -1,5 +1,5 @@ /* - * gov.noaa.nws.ncep.common.staticData.IStaticDataProvider + * gov.noaa.nws.ncep.staticData.IStaticDataProvider * * 12 March 2012 * @@ -14,6 +14,7 @@ import java.io.File; import java.util.ArrayList; import java.util.HashMap; import java.util.List; +import java.util.Set; import com.raytheon.uf.common.localization.LocalizationContext; import com.raytheon.uf.common.localization.LocalizationFile; @@ -31,7 +32,9 @@ import com.vividsolutions.jts.geom.MultiPolygon; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * 02/12 ? B. Yin Initial Creation. - * + * 05/12 734 J. Zeng add getAllRfcs() and getAllCwas() + * 08/12 #770 Q. Zhou added loadContWatchNum() + * 09/05 ? B. Yin Changed county cluster return type. * * * @author B. Yin @@ -42,12 +45,24 @@ public interface IStaticDataProvider { public StationTable getAnchorTbl(); public StationTable getVorTbl(); public StationTable getVolcanoTbl(); - public HashMap getClstTbl(); + public HashMap> getClstTbl(); public List getSPCCounties(); public SPCCounty findCounty( String fips); public List getCountiesInGeometry(Geometry geo ); public List getAllstates(); + public List loadStateTable(); + public ArrayList statesInGeometry(Geometry geo); + + public List getAllRfcs(); + public List loadRfcTable(); + public ArrayList rfcsInGeometry(Geometry geo); + public boolean isRfcLoaded(); + + public List getAllCwas(); + public List loadCwaTable(); + public ArrayList cwasInGeometry(Geometry geo); + public HashMap getStateAbrvMap(); //localization @@ -80,4 +95,6 @@ public interface IStaticDataProvider { //for g2g public ArrayList getG2GBounds(String tableAlias, String columnName, String columnValue); + //for continuing watches + public List loadContWatchNum(); } diff --git a/ncep/gov.noaa.nws.ncep.common.staticdata/src/gov/noaa/nws/ncep/common/staticdata/Rfc.java b/ncep/gov.noaa.nws.ncep.common.staticdata/src/gov/noaa/nws/ncep/common/staticdata/Rfc.java new file mode 100644 index 0000000000..0d063b4dea --- /dev/null +++ b/ncep/gov.noaa.nws.ncep.common.staticdata/src/gov/noaa/nws/ncep/common/staticdata/Rfc.java @@ -0,0 +1,165 @@ +/* + * gov.noaa.nws.ncep.common.staticData + * + * 24 June 2012 + * + * This code has been developed by the NCEP/SIB for use in the AWIPS2 system. + */ + +package gov.noaa.nws.ncep.common.staticdata; + +import com.vividsolutions.jts.geom.Geometry; + +/** + * Class to hold RFC information + * + *
+ * SOFTWARE HISTORY
+ * Date       	Ticket#		Engineer	Description
+ * ------------	----------	-----------	--------------------------
+ * 02/12		?		    B. Yin   	Initial Creation.
+ * 05/12        734         J. Zeng     move from PGEN 
+ * 
+ * + * @author B. Yin + */ + +public class Rfc { + + private String siteId; + private String state; + private String rfcName; + private String rfcCity; + private String basinId; + private Geometry shape; + + //constructor + public Rfc(){ + + } + + //constructor + public Rfc( String rfcName, + String rfcCity, + String state, + String siteId, + String basinId, + Geometry shape ){ + + this.setRfcName(rfcName); + this.setRfcCity(rfcCity); + this.setBasinId(basinId); + this.setSiteId(siteId); + this.setState(state); + this.setShape(shape); + } + + /** + * Set the site ID + * @param siteId + */ + public void setSiteId(String siteId) { + this.siteId = siteId; + } + + /** + * Get the site ID + * @return + */ + public String getSiteId() { + return siteId; + } + + /** + * Set the state + * @param state + */ + public void setState(String state) { + this.state = state; + } + + /** + * Get the State + * @return + */ + public String getState() { + return state; + } + + /** + * Set RFC name + * @param rfcName + */ + public void setRfcName(String rfcName) { + this.rfcName = rfcName; + } + + /** + * get RFC name + * @return + */ + public String getRfcName() { + return rfcName; + } + + /** + * Set RFC city + * @param rfcCity + */ + public void setRfcCity(String rfcCity) { + this.rfcCity = rfcCity; + } + + /** + * Get RFC city + * @return + */ + public String getRfcCity() { + return rfcCity; + } + + /** + * Set basin ID + * @param basinId + */ + public void setBasinId(String basinId) { + this.basinId = basinId; + } + + /** + * Get basin ID + * @return + */ + public String getBasinId() { + return basinId; + } + + /** + * Get the shape geometry + * @return + */ + public Geometry getShape() { + return shape; + } + + /** + * Set the shape geometry + * @param shape + */ + public void setShape(Geometry shape) { + this.shape = shape; + } + + /** + * Check if the RFC shape intersect with the input geometry. + * @param geo + * @return + */ + public boolean intersectGeometry(Geometry geo){ + if ( shape != null ){ + return shape.intersects(geo); + } + else return false; + } + +} diff --git a/ncep/gov.noaa.nws.ncep.edex.common/src/gov/noaa/nws/ncep/metparameters/util/SelectedFrameTimeUtil.java b/ncep/gov.noaa.nws.ncep.edex.common/src/gov/noaa/nws/ncep/metparameters/util/SelectedFrameTimeUtil.java deleted file mode 100644 index fbdb5e537d..0000000000 --- a/ncep/gov.noaa.nws.ncep.edex.common/src/gov/noaa/nws/ncep/metparameters/util/SelectedFrameTimeUtil.java +++ /dev/null @@ -1,43 +0,0 @@ -package gov.noaa.nws.ncep.metparameters.util; - -import java.util.Calendar; -import java.util.Date; - -public class SelectedFrameTimeUtil { - private static Calendar calendar = Calendar.getInstance(); - - private static int frameTimeMonthValue; - private static int frameTimeDayOfMonthValue; - - public static void setSelectedFrameTime(Date frameDate) { - if(frameDate != null) { - calendar.setTime(frameDate); - frameTimeMonthValue = calendar.get(Calendar.MONTH) + 1; - frameTimeDayOfMonthValue = calendar.get(Calendar.DAY_OF_MONTH); -// displayDateInfo(calendar); - } - } - - public static int getFrameTimeMonthIntValue() { - return frameTimeMonthValue; - } - - public static String getFrameTimeMonthStringValue() { - return String.valueOf(frameTimeMonthValue); - } - - public static int getFrameTimeDayOfMonthIntValue() { - return frameTimeDayOfMonthValue; - } - - public static String getFrameTimeDayOfMonthStringValue() { - return String.valueOf(frameTimeDayOfMonthValue); - } - - private static void displayDateInfo(Calendar cal) { - System.out.println("===after being set in Class SelectedFrameTimeUtil, month=" - + cal.get(Calendar.MONTH)); - System.out.println("===after being set in Class SelectedFrameTimeUtil, dayOfMonth=" - + cal.get(Calendar.DAY_OF_MONTH)); - } -} diff --git a/ncep/gov.noaa.nws.ncep.edex.common/src/gov/noaa/nws/ncep/metparameters/util/TemperatureConverter.java b/ncep/gov.noaa.nws.ncep.edex.common/src/gov/noaa/nws/ncep/metparameters/util/TemperatureConverter.java deleted file mode 100644 index 064e0705ee..0000000000 --- a/ncep/gov.noaa.nws.ncep.edex.common/src/gov/noaa/nws/ncep/metparameters/util/TemperatureConverter.java +++ /dev/null @@ -1,29 +0,0 @@ -package gov.noaa.nws.ncep.metparameters.util; - -public class TemperatureConverter { - public static double convertToCelsiusFromFahrenheit(double degreeInF) { - double degreeInC = (degreeInF - 32)*5/9; - return degreeInC; - } - - public static double convertToFahrenheitFromKelvin(double degreeInK) { - double degreeInF = (degreeInK - 273.15)*9/5 + 32; - return degreeInF; - } - - public static double convertToKelvinFromFahrenheit(double degreeInF) { - double degreeInK = (degreeInF - 32)*5/9 + 273.15; - return degreeInK; - } - - public static double convertToKelvinFromCelsius(double degreeInC) { - double degreeInK = degreeInC + 273.15; - return degreeInK; - } - - public static double convertToFahrenheitFromCelsius(double degreeInC) { - double degreeInF = (degreeInC *9) / 5 + 32; - return degreeInF; - } - -} diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.airmet/utility/edex_static/base/purge/airmetPurgeRules.xml b/ncep/gov.noaa.nws.ncep.edex.plugin.airmet/utility/edex_static/base/purge/airmetPurgeRules.xml new file mode 100644 index 0000000000..231d8d228d --- /dev/null +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.airmet/utility/edex_static/base/purge/airmetPurgeRules.xml @@ -0,0 +1,10 @@ + + + + + airmet + default + + 02-00:00:00 + + \ No newline at end of file diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.convsigmet/gov.noaa.nws.ncep.edex.plugin.convsigmet/utility/edex_static/base/purge/convsigmetPurgeRules.xml b/ncep/gov.noaa.nws.ncep.edex.plugin.convsigmet/gov.noaa.nws.ncep.edex.plugin.convsigmet/utility/edex_static/base/purge/convsigmetPurgeRules.xml new file mode 100644 index 0000000000..607053c111 --- /dev/null +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.convsigmet/gov.noaa.nws.ncep.edex.plugin.convsigmet/utility/edex_static/base/purge/convsigmetPurgeRules.xml @@ -0,0 +1,10 @@ + + + + + convsigmet + default + + 02-00:00:00 + + \ No newline at end of file diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.mosaic/src/gov/noaa/nws/ncep/edex/plugin/mosaic/common/MosaicRecord.java b/ncep/gov.noaa.nws.ncep.edex.plugin.mosaic/src/gov/noaa/nws/ncep/edex/plugin/mosaic/common/MosaicRecord.java index 07c9536e27..acf0f55e19 100644 --- a/ncep/gov.noaa.nws.ncep.edex.plugin.mosaic/src/gov/noaa/nws/ncep/edex/plugin/mosaic/common/MosaicRecord.java +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.mosaic/src/gov/noaa/nws/ncep/edex/plugin/mosaic/common/MosaicRecord.java @@ -1,3 +1,4 @@ + package gov.noaa.nws.ncep.edex.plugin.mosaic.common; import gov.noaa.nws.ncep.edex.plugin.mosaic.util.MosaicConstants; @@ -51,18 +52,25 @@ import com.vividsolutions.jts.geom.Coordinate; /** * Decoder implementation for mosaic plugin * - * Date Ticket# Engineer Description ------------ ---------- ----------- - * -------------------------- 09/2009 143 L. Lin Initial creation 11/2009 143 L. - * Lin Add parameters sourceId and trueElevationAngle in mosaic record. 1/2011 - * 143 T. Lee Add resolution to key for AWC 1km NSSL Extracted prod name from - * mosaicInfo.txt + * Date Ticket# Engineer Description + * ------------ ---------- ----------- -------------------------- + * 09/2009 143 L. Lin Initial creation + * 11/2009 143 L. Lin Add parameters sourceId and + * trueElevationAngle in mosaic record. + * 1/2011 143 T. Lee Add resolution to key for AWC 1km NSSL + * Extracted prod name from mosaicInfo.txt + * 6/2012 825 G. Hull rm prodName from URI. Use prodCode where needed. + * 09/2012 B. Hebbard Merge out RTS changes from OB12.9.1 + * + * + * * * This code has been developed by the SIB for use in the AWIPS2 system. - * * @author L. Lin * @version 1.0 */ + @Entity @Table(name = "mosaic", uniqueConstraints = { @UniqueConstraint(columnNames = { "dataURI" }) }) @Cache(usage = CacheConcurrencyStrategy.TRANSACTIONAL) @@ -75,19 +83,18 @@ public class MosaicRecord extends PersistablePluginDataObject implements private static final long serialVersionUID = 1L; @Column - @DataURI(position = 2) + @DataURI(position = 1) @DynamicSerializeElement @XmlElement(nillable = false) private Integer productCode; @Column - @DataURI(position = 3) + @DataURI(position=2) @DynamicSerializeElement @XmlElement(nillable = false) private Integer resolution; @Column(length = 16) - @DataURI(position = 1) @DynamicSerializeElement @XmlElement(nillable = false) private String prodName; diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.ncgrib/utility/common_static/base/ncgrid/grib2vars.xml b/ncep/gov.noaa.nws.ncep.edex.plugin.ncgrib/utility/common_static/base/ncgrid/grib2vars.xml index b3b3d267a4..4a3b90472d 100644 --- a/ncep/gov.noaa.nws.ncep.edex.plugin.ncgrib/utility/common_static/base/ncgrid/grib2vars.xml +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.ncgrib/utility/common_static/base/ncgrid/grib2vars.xml @@ -2492,7 +2492,7 @@ 3 193 0 - Extra Tropical Storm Surge + Extratropical Storm Surge m ETSRG 0 diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.ncgrib/utility/common_static/base/ncgrid/ncgribModels.xml b/ncep/gov.noaa.nws.ncep.edex.plugin.ncgrib/utility/common_static/base/ncgrid/ncgribModels.xml index 8680a29b4a..231dee2f29 100644 --- a/ncep/gov.noaa.nws.ncep.edex.plugin.ncgrib/utility/common_static/base/ncgrid/ncgribModels.xml +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.ncgrib/utility/common_static/base/ncgrid/ncgribModels.xml @@ -388,11 +388,42 @@ sref_rsm.*[pn][1-9].*|srefRsm; sref_nmm.*ctl.*|srefNmmCtl; sref_nmm.*[pn][1-9].*|srefNmm; + +
3
+ + + + SREF ensemble for WRF_EM (Eulerian Mass-core) + sref +
7
+ 0 + 212 + + 116 + +
3
+ + SREF ensemble for NMB (Non-hydrostatic Multiscale Meteorological Model on Grid B) + sref +
7
+ 0 + 212 + + 111 + + +
3
+
+ ECMWF Global 1x1 Degree ecmwf @@ -401,6 +432,10 @@ 3 141 + 142 + 143 + 144 + 145
3
@@ -414,6 +449,10 @@ 228 141 + 142 + 143 + 144 + 145
3
@@ -426,6 +465,10 @@ 14529 141 + 142 + 143 + 144 + 145
3
@@ -2607,8 +2650,20 @@ - SREF - SREF212 + SREF 3h Mean + srefMean +
7
+ 0 + 212 + + 113 + +
3
+
+ + + SREF 3h Prob + srefProb
7
2 212 diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.ncscat/src/gov/noaa/nws/ncep/edex/plugin/ncscat/decoder/NcscatDecoder.java b/ncep/gov.noaa.nws.ncep.edex.plugin.ncscat/src/gov/noaa/nws/ncep/edex/plugin/ncscat/decoder/NcscatDecoder.java index 24858a314b..a4858ff8d2 100644 --- a/ncep/gov.noaa.nws.ncep.edex.plugin.ncscat/src/gov/noaa/nws/ncep/edex/plugin/ncscat/decoder/NcscatDecoder.java +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.ncscat/src/gov/noaa/nws/ncep/edex/plugin/ncscat/decoder/NcscatDecoder.java @@ -9,6 +9,7 @@ * ------------ ---------- ----------- -------------------------- * 11/2009 Uma Josyula Initial creation * 01/2011 B. Hebbard Handle ambiguity variants + * 07/2012 B. Hebbard Handle OSCAT / OSCAT_HI * * This code has been developed by the SIB for use in the AWIPS2 system. */ @@ -74,7 +75,12 @@ public class NcscatDecoder extends AbstractDecoder { record.setDataTime(new DataTime(sProcess.getStartTime())); if (record.getRecordLength()==688){ + + if(plugin.equalsIgnoreCase("oscat")){ + record.setReportType("oscat-hi"); + }else{ record.setReportType("quikscat"); + } }else if(record.getRecordLength()==1372){ record.setReportType("quikscat-hi"); }else if(record.getRecordLength()==382){ @@ -94,6 +100,8 @@ public class NcscatDecoder extends AbstractDecoder { }else{ record.setReportType("ascat-hi"); } + }else if(record.getRecordLength()==328){ + record.setReportType("oscat"); }else if(record.getRecordLength()==715){ record.setReportType("wscat"); } diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.ncscat/src/gov/noaa/nws/ncep/edex/plugin/ncscat/util/NcscatProcessing.java b/ncep/gov.noaa.nws.ncep.edex.plugin.ncscat/src/gov/noaa/nws/ncep/edex/plugin/ncscat/util/NcscatProcessing.java index 16182ecb44..2a4591280e 100644 --- a/ncep/gov.noaa.nws.ncep.edex.plugin.ncscat/src/gov/noaa/nws/ncep/edex/plugin/ncscat/util/NcscatProcessing.java +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.ncscat/src/gov/noaa/nws/ncep/edex/plugin/ncscat/util/NcscatProcessing.java @@ -6,6 +6,7 @@ * *
  * Uma Josyula                               11/2009         Creation
+ * B. Hebbard                                07/2012         Handle OSCAT / OSCAT_HI
  * 
* * This code has been developed by the SIB for use in the AWIPS system. @@ -14,8 +15,6 @@ package gov.noaa.nws.ncep.edex.plugin.ncscat.util; -//import gov.noaa.nws.ncep.common.dataplugin.ncscat.NcscatPoint; - import gov.noaa.nws.ncep.common.dataplugin.ncscat.NcscatPoint; import java.nio.ByteBuffer; @@ -24,10 +23,15 @@ import java.util.ArrayList; import java.util.Calendar; import java.util.List; import java.util.NoSuchElementException; + +import javax.xml.bind.JAXBException; + import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.log4j.Logger; +import com.raytheon.uf.common.serialization.SerializationUtil; + public class NcscatProcessing { @@ -82,29 +86,42 @@ public class NcscatProcessing { startTime = Calendar.getInstance(); endTime = Calendar.getInstance(); - if ((byteBuffer.getShort(0)== byteBuffer.getShort(1484)) &&(byteBuffer.getShort(2)== byteBuffer.getShort(1486))){ + // Attempt to discriminate type of data by looking for 'period' of repeating date+hour fields. + // TODO !! Guard against false negative which could occur if first 2 times straddle hour boundary, + // !! possibly by checking for match EITHER 1st-&-2nd OR 2nd-&-3rd + if ((byteBuffer.getShort(0) == byteBuffer.getShort(1484)) && (byteBuffer.getShort(2) == byteBuffer.getShort(1486))) { + // ASCAT_HI or EXASCT_HI (...which are big and little endian, respectively) n=1476; scatNumber=82; recordLength=742; } else if((byteBuffer.getShort(0)== byteBuffer.getShort(764)) &&(byteBuffer.getShort(2)== byteBuffer.getShort(766))) { - + // ASCAT or EXASCT (...which are big and little endian, respectively) n=756; scatNumber=42; recordLength=382; } else if ((byteBuffer.getShort(0)== byteBuffer.getShort(1376)) &&(byteBuffer.getShort(2)== byteBuffer.getShort(1378))) { + // QUIKSCAT -OR- OSCAT_HI (...which are big and little endian, respectively) n=1368; scatNumber = 76; recordLength =688; - } else if((byteBuffer.getShort(0)== byteBuffer.getShort(2744)) &&(byteBuffer.getShort(2)== byteBuffer.getShort(2746))){ - + } + else if ((byteBuffer.getShort(0) == byteBuffer.getShort(656)) && (byteBuffer.getShort(2) == byteBuffer.getShort(658))) { + // OSCAT + n=648; + scatNumber = 36; + recordLength = 328; + } + else if ((byteBuffer.getShort(0) == byteBuffer.getShort(2744)) && (byteBuffer.getShort(2) == byteBuffer.getShort(2746))) { + // QUIKSCAT_HI n=2736; recordLength = 1372; scatNumber = 152; } else if((byteBuffer.getShort(56)== byteBuffer.getShort(1486)) &&(byteBuffer.getShort(58)== byteBuffer.getShort(1488))){ + // WSAT n=1422; scatNumber=79; recordLength=715; @@ -135,8 +152,16 @@ public class NcscatProcessing { // getShort(...) calls below will do the byte-flipping for us. We also // remember byteOrder for a bit later... (Part 3) // - ByteOrder byteOrder = (n == 1422)|| "ascatx".equalsIgnoreCase(getInputFileName()) ? - ByteOrder.LITTLE_ENDIAN : ByteOrder.BIG_ENDIAN; + ByteOrder byteOrder; + if ( (n == 1422) || // WSAT + ((n == 1368) && "oscat".equalsIgnoreCase(getInputFileName())) || // OSCAT_HI + "ascatx".equalsIgnoreCase(getInputFileName()) ) { // EXASCT or EXASCT_HI + byteOrder = ByteOrder.LITTLE_ENDIAN; + } + else { + byteOrder = ByteOrder.BIG_ENDIAN; + } + byteBuffer.order(byteOrder); //END of temporary fix by BH - Part 2 (new code added only) @@ -151,6 +176,8 @@ public class NcscatProcessing { min = byteBuffer.getShort(ji+4); sec = byteBuffer.getShort(ji+6); + if (day<0) break; + if(ji<8){ //stTime = endTime; startTime.set(Calendar.DAY_OF_YEAR, day); @@ -158,12 +185,12 @@ public class NcscatProcessing { startTime.set(Calendar.MINUTE, min); startTime.set(Calendar.SECOND, sec); } - else{ + //else{ endTime.set(Calendar.DAY_OF_YEAR, day); endTime.set(Calendar.HOUR_OF_DAY, hour); endTime.set(Calendar.MINUTE, min); endTime.set(Calendar.SECOND, sec); - } + //} ji=ji+scatXLen; @@ -218,16 +245,16 @@ public class NcscatProcessing { } */ //END of temporary fix by BH - Part 4 (compare Part 1) - if((n==1422)||("ascatx".equalsIgnoreCase(getInputFileName()))){//if wsat or exasct swap the bytes + if(byteOrder == ByteOrder.LITTLE_ENDIAN) {// swap the bytes newMessage.add(message[calc+1]); bitNum++; - newMessage.add(message[calc]);//since 2 bits form a byte + newMessage.add(message[calc]);//since 2 bytes form a short bitNum++; } else{ newMessage.add(message[calc]); bitNum++; - newMessage.add(message[calc+1]);//since 2 bits form a byte + newMessage.add(message[calc+1]);//since 2 bytes form a short bitNum++; } @@ -258,13 +285,25 @@ public class NcscatProcessing { + /** + * processHDF5Data -- SHOULD NOT BE USED IN PRESENT FORM + * Please see NcscatResource.processHDF5Data(...) + * + * @return List + * + * @deprecated Please see NcscatResource.processHDF5Data(...) + */ + @Deprecated public List processHDF5Data(byte[] hdf5Msg){ int ji=0, bitNum=0; int day,hour,min,sec; item= new ArrayList(); - startTime = Calendar.getInstance(); ; + // TODO - Caution! Separate startTime Calendar object needs to be allocated + // for each point row, since will be shared by all points + // in that row. See below. + startTime = Calendar.getInstance(); ByteBuffer byteBuffer = null; byteBuffer = ByteBuffer.allocate(hdf5Msg.length); byteBuffer.put(hdf5Msg,0,hdf5Msg.length); @@ -277,12 +316,14 @@ public class NcscatProcessing { sec = byteBuffer.getShort(bitNum+6); ji=ji+8; bitNum=bitNum+8; + // TODO - Caution! Need to allocate new startTime here... startTime.set(Calendar.DAY_OF_YEAR, day); startTime.set(Calendar.HOUR_OF_DAY, hour); startTime.set(Calendar.MINUTE, min); startTime.set(Calendar.SECOND, sec); for(int j=ji;j temp) { - byte[] byteArray = new byte[temp.size()]; int jkl=0; for(Byte current:temp){ @@ -340,9 +378,6 @@ public class NcscatProcessing { return recordLength; } - - - public static void setRecordLength(int recordLength) { NcscatProcessing.recordLength = recordLength; } @@ -354,14 +389,4 @@ public class NcscatProcessing { this.inputFileName = inputFileName; } - } - - - - - - - - - diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.stormtrack/src/gov/noaa/nws/ncep/edex/plugin/stormtrack/decoder/StormTrackDecoder.java b/ncep/gov.noaa.nws.ncep.edex.plugin.stormtrack/src/gov/noaa/nws/ncep/edex/plugin/stormtrack/decoder/StormTrackDecoder.java index 8cff14ab92..376b4d054e 100644 --- a/ncep/gov.noaa.nws.ncep.edex.plugin.stormtrack/src/gov/noaa/nws/ncep/edex/plugin/stormtrack/decoder/StormTrackDecoder.java +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.stormtrack/src/gov/noaa/nws/ncep/edex/plugin/stormtrack/decoder/StormTrackDecoder.java @@ -38,6 +38,7 @@ import com.raytheon.uf.common.dataplugin.PluginException; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * 08/2011 T. Lee ATCF and Ensemble storm tracks + * 06/2012 #606 G. Hull constructDataURI() after setReportType so it gets into the URI * * * @@ -114,7 +115,6 @@ public class StormTrackDecoder extends AbstractDecoder { try { record.setTraceId(traceId); record.setPluginName(pluginName); - record.constructDataURI(); /* * Set report type in record. @@ -124,6 +124,9 @@ public class StormTrackDecoder extends AbstractDecoder { } else { record.setReportType("ATCF"); } + + record.constructDataURI(); + } catch (PluginException e) { throw new DecoderException( "StormTrack WARNING: Unable to construct dataURI--exception: ", diff --git a/ncep/gov.noaa.nws.ncep.edex.uengine/src/gov/noaa/nws/ncep/edex/uengine/tasks/profile/MergeSounding.java b/ncep/gov.noaa.nws.ncep.edex.uengine/src/gov/noaa/nws/ncep/edex/uengine/tasks/profile/MergeSounding.java index 94d9330c8a..a73f05cb1a 100644 --- a/ncep/gov.noaa.nws.ncep.edex.uengine/src/gov/noaa/nws/ncep/edex/uengine/tasks/profile/MergeSounding.java +++ b/ncep/gov.noaa.nws.ncep.edex.uengine/src/gov/noaa/nws/ncep/edex/uengine/tasks/profile/MergeSounding.java @@ -29,6 +29,9 @@ import gov.noaa.nws.ncep.edex.common.sounding.NcSoundingLayer2; * 12/2010 301 T. Lee/NCEP Re-factored for BUFRUA * 5/10/2011 301 C. Chen added rhToDewpoint(), tempToVapr() * 02/28/2012 Chin Chen modify several sounding query algorithms for better performance + * 8/2012 T. Lee/NCEP Removed missing wind interpolation + * 8/2012 T. Lee/NCEP Fixed max wind merging; May fix NSHARP EL calculation + * * * @author T. Lee @@ -298,7 +301,7 @@ public class MergeSounding { // Interpolate missing temperature, dew point and winds. constructMissing(1,sndata); constructMissing(2,sndata); - constructMissing(3,sndata); + //constructMissing(3,sndata); // Return single level or add underground mandatory data to the sounding profile if ( isNumber (level) == 0 ) { @@ -1027,8 +1030,7 @@ public class MergeSounding { * Do nothing if wind report is reported on height surfaces. */ - if (checkWindData(sig_wa) || checkWindData(sig_wc) || - (sig_wa.size() < 1 && sig_wc.size() < 1 )) { + if ( sig_wa.size() < 1 && sig_wc.size() < 1 ) { return; } @@ -1188,8 +1190,7 @@ public class MergeSounding { /* * Do nothing if wind report is not on height surfaces. */ - if (!checkWindData(sig_wa) || !checkWindData(sig_wc) || - (sig_wa.size() < 1 && sig_wc.size() < 1)) { + if ( sig_wa.size() < 1 && sig_wc.size() < 1 ) { return; } diff --git a/ncep/gov.noaa.nws.ncep.edex.uengine/src/gov/noaa/nws/ncep/edex/uengine/tasks/profile/MergeSounding2.java b/ncep/gov.noaa.nws.ncep.edex.uengine/src/gov/noaa/nws/ncep/edex/uengine/tasks/profile/MergeSounding2.java index aa6a25f45a..e47f61b4f8 100644 --- a/ncep/gov.noaa.nws.ncep.edex.uengine/src/gov/noaa/nws/ncep/edex/uengine/tasks/profile/MergeSounding2.java +++ b/ncep/gov.noaa.nws.ncep.edex.uengine/src/gov/noaa/nws/ncep/edex/uengine/tasks/profile/MergeSounding2.java @@ -52,7 +52,8 @@ import gov.noaa.nws.ncep.edex.common.sounding.NcSoundingLayer2; * Used the Amount class to set values for the Met parameters * 02/22/2012 C Chen fixed minor bugs * 02/28/2012 Chin Chen modify several sounding query algorithms for better performance - * + * 8/2012 T. Lee/NCEP Removed missing wind interpolation + * 8/2012 T. Lee/NCEP Fixed max wind merging; May fix NSHARP EL calculation * * * @author T. Lee @@ -319,7 +320,7 @@ public class MergeSounding2 implements ISerializableObject { // Interpolate missing temperature, dew point and winds. constructMissing(1,sndata); constructMissing(2,sndata); - constructMissing(3,sndata); + //constructMissing(3,sndata); // Return single level or add underground mandatory data to the sounding profile if ( isNumber (level) == 0 ) { @@ -1299,8 +1300,7 @@ public class MergeSounding2 implements ISerializableObject { * Do nothing if wind report is reported on height surfaces. */ - if (checkWindData(sig_wa) || checkWindData(sig_wc) || - (sig_wa.size() < 1 && sig_wc.size() < 1 )) { + if ( sig_wa.size() < 1 && sig_wc.size() < 1 ) { return; } @@ -1541,8 +1541,7 @@ public class MergeSounding2 implements ISerializableObject { /* * Do nothing if wind report is not on height surfaces. */ - if (!checkWindData(sig_wa) || !checkWindData(sig_wc) || - (sig_wa.size() < 1 && sig_wc.size() < 1)) { + if ( sig_wa.size() < 1 && sig_wc.size() < 1 ) { return; } diff --git a/ncep/gov.noaa.nws.ncep.gempak.parameters/META-INF/MANIFEST.MF b/ncep/gov.noaa.nws.ncep.gempak.parameters/META-INF/MANIFEST.MF index 548be8fc9c..917f9eda3a 100644 --- a/ncep/gov.noaa.nws.ncep.gempak.parameters/META-INF/MANIFEST.MF +++ b/ncep/gov.noaa.nws.ncep.gempak.parameters/META-INF/MANIFEST.MF @@ -20,6 +20,7 @@ Import-Package: gov.noaa.nws.ncep.gempak.parameters.core.contourinterval, org.junit Export-Package: gov.noaa.nws.ncep.gempak.parameters, gov.noaa.nws.ncep.gempak.parameters.colors, + gov.noaa.nws.ncep.gempak.parameters.colorbar, gov.noaa.nws.ncep.gempak.parameters.discrete, gov.noaa.nws.ncep.gempak.parameters.dlines, gov.noaa.nws.ncep.gempak.parameters.gridlimits, diff --git a/ncep/gov.noaa.nws.ncep.gempak.parameters/src/gov/noaa/nws/ncep/gempak/parameters/colorbar/CLRBAR.java b/ncep/gov.noaa.nws.ncep.gempak.parameters/src/gov/noaa/nws/ncep/gempak/parameters/colorbar/CLRBAR.java new file mode 100644 index 0000000000..50eca4e24d --- /dev/null +++ b/ncep/gov.noaa.nws.ncep.gempak.parameters/src/gov/noaa/nws/ncep/gempak/parameters/colorbar/CLRBAR.java @@ -0,0 +1,157 @@ +/** + * + */ +package gov.noaa.nws.ncep.gempak.parameters.colorbar; + +import gov.noaa.nws.ncep.gempak.parameters.core.util.StringUtil; +import gov.noaa.nws.ncep.viz.common.ui.color.GempakColor; + +/** + * + * * + * + *
+ * SOFTWARE HISTORY
+ *  Date          Ticket#     Engineer     Description
+ * ------------ ---------- ----------- --------------------------
+ *  11-Jun-2012    743       Archana.S   Initial Creation
+ * 
+ * + * @author Archana.S + * @version 1 + * @see $GEMPAK/help/hlx/clrbar.hl2 + */ + +public class CLRBAR { + private ColorBarAttributesBuilder cBarAttributesBuilder; + + private String strToParse; + /** + * @return the cBarAttributesBuilder + */ + public final ColorBarAttributesBuilder getcBarAttributesBuilder() { + return cBarAttributesBuilder; + } + + public CLRBAR(String strToParse) { + cBarAttributesBuilder = new ColorBarAttributesBuilder(); + this.strToParse = strToParse; + parse(strToParse); + } + + private void parse(String strToParse) { + + + if (strToParse == null || strToParse.isEmpty()) + return; + + strToParse = new String(StringUtil.removeBlanksWithinString(strToParse)); + String[] parsedStringArray = strToParse.split("/"); + if (parsedStringArray != null && parsedStringArray.length >= 1 ) { + int color; + try { + color = Integer.parseInt(parsedStringArray[0]); + + if(color == 0) + cBarAttributesBuilder.setDrawColorBar(false); + else + cBarAttributesBuilder.setDrawColorBar(true); + + if (color < 0 ){ + cBarAttributesBuilder.setDrawBoxAroundColorBar(false); + cBarAttributesBuilder.setColor(GempakColor.convertToRGB(color * -1)); + }else{ + cBarAttributesBuilder.setDrawBoxAroundColorBar(true); + cBarAttributesBuilder.setColor(GempakColor.convertToRGB(color)); + } + } catch (NumberFormatException nfe) { + cBarAttributesBuilder.setDrawColorBar(false); + } + if ( parsedStringArray.length >= 2 && parsedStringArray[1] != null && !parsedStringArray[1].isEmpty() ){ + if (parsedStringArray[1].compareTo("H") == 0) + cBarAttributesBuilder.setColorBarOrientation(ColorBarOrientation.Horizontal); + else + cBarAttributesBuilder.setColorBarOrientation(ColorBarOrientation.Vertical); + } + + if (parsedStringArray.length >= 3 && parsedStringArray[2] != null && !parsedStringArray[2].isEmpty()){ + if (parsedStringArray[2].compareTo("UR") == 0){ + cBarAttributesBuilder.setAnchorLocation(ColorBarAnchorLocation.UpperRight); + } + else if (parsedStringArray[2].compareTo("UC") == 0){ + cBarAttributesBuilder.setAnchorLocation(ColorBarAnchorLocation.UpperCenter); + } + else if (parsedStringArray[2].compareTo("CR") == 0){ + cBarAttributesBuilder.setAnchorLocation(ColorBarAnchorLocation.CenterRight); + } + else if (parsedStringArray[2].compareTo("CC") == 0){ + cBarAttributesBuilder.setAnchorLocation(ColorBarAnchorLocation.CenterCenter); + } + else if (parsedStringArray[2].compareTo("CL") == 0){ + cBarAttributesBuilder.setAnchorLocation(ColorBarAnchorLocation.CenterLeft); + } + else if (parsedStringArray[2].compareTo("LR") == 0){ + cBarAttributesBuilder.setAnchorLocation(ColorBarAnchorLocation.LowerRight); + } + else if (parsedStringArray[2].compareTo("LC") == 0){ + cBarAttributesBuilder.setAnchorLocation(ColorBarAnchorLocation.LowerCenter); + } + else if (parsedStringArray[2].compareTo("UL") == 0){ + cBarAttributesBuilder.setAnchorLocation(ColorBarAnchorLocation.UpperLeft); + } + else + cBarAttributesBuilder.setAnchorLocation(ColorBarAnchorLocation.LowerLeft); + } + + + if ( parsedStringArray.length >= 4 && parsedStringArray[3] != null && !parsedStringArray[3].isEmpty()){ + String[] coordArr = parsedStringArray[3].split(";"); + try{ + double x = Double.parseDouble(coordArr[0]); + if(x >= 0 && x <= 1) + cBarAttributesBuilder.setX(x); + }catch(Exception e){ + //Do nothing - there are defaults set for the X view coordinates + } + + try{ + double y = Double.parseDouble(coordArr[1]); + if( y>= 0 && y <= 1 ) + cBarAttributesBuilder.setY(y); + }catch(Exception e){ + //Do nothing - there are defaults set for the Y view coordinates + } + + } + + if ( parsedStringArray.length >= 5 && parsedStringArray[4] != null && !parsedStringArray[4].isEmpty() ){ + String[] dimensionsArray = parsedStringArray[4].split(";"); + try{ + double lengthRatio = Double.parseDouble(dimensionsArray[0]); + if(lengthRatio >= 0 && lengthRatio <= 1) + cBarAttributesBuilder.setLength(lengthRatio); + }catch(Exception e){ + //Do nothing - there are defaults set for the length + } + + try{ + double widthRatio = Double.parseDouble(dimensionsArray[1]); + if(widthRatio >= 0 && widthRatio <= 1) + cBarAttributesBuilder.setWidth(widthRatio); + }catch(Exception e){ + //Do nothing - there are defaults set for the width + } + } + + + } + + } + + /** + * @return the strToParse + */ + public final String getStrToParse() { + return strToParse; + } +} diff --git a/ncep/gov.noaa.nws.ncep.gempak.parameters/src/gov/noaa/nws/ncep/gempak/parameters/colorbar/ColorBarAnchorLocation.java b/ncep/gov.noaa.nws.ncep.gempak.parameters/src/gov/noaa/nws/ncep/gempak/parameters/colorbar/ColorBarAnchorLocation.java new file mode 100644 index 0000000000..8f7d46deb0 --- /dev/null +++ b/ncep/gov.noaa.nws.ncep.gempak.parameters/src/gov/noaa/nws/ncep/gempak/parameters/colorbar/ColorBarAnchorLocation.java @@ -0,0 +1,7 @@ +package gov.noaa.nws.ncep.gempak.parameters.colorbar; + +public enum ColorBarAnchorLocation { + UpperLeft, UpperCenter, UpperRight, + CenterLeft, CenterCenter, CenterRight, + LowerLeft, LowerCenter, LowerRight + } \ No newline at end of file diff --git a/ncep/gov.noaa.nws.ncep.gempak.parameters/src/gov/noaa/nws/ncep/gempak/parameters/colorbar/ColorBarAttributesBuilder.java b/ncep/gov.noaa.nws.ncep.gempak.parameters/src/gov/noaa/nws/ncep/gempak/parameters/colorbar/ColorBarAttributesBuilder.java new file mode 100644 index 0000000000..d583ba8253 --- /dev/null +++ b/ncep/gov.noaa.nws.ncep.gempak.parameters/src/gov/noaa/nws/ncep/gempak/parameters/colorbar/ColorBarAttributesBuilder.java @@ -0,0 +1,190 @@ +/** + * + */ +package gov.noaa.nws.ncep.gempak.parameters.colorbar; + +import gov.noaa.nws.ncep.viz.common.ui.color.GempakColor; + +import org.eclipse.swt.graphics.RGB; + +/** + * Presents the color bar attributes as parsed from CLRBAR (as well as IMCBAR) + * *
+ * SOFTWARE HISTORY
+ *     Date       Ticket#     Engineer       Description
+ * ------------ ---------- ----------- --------------------------
+ *  11-Jun-2012    743        Archana.S    Initial Creation
+ * 
+ * @author Archana.S + * @version 1 + * @see $GEMPAK/help/hlx/clrbar.hl2 + */ + +public class ColorBarAttributesBuilder { + + private ColorBarAnchorLocation anchorLocation; + + private ColorBarOrientation colorBarOrientation; + + private double length; + + private double width; + + /**fraction of PixelCoordinate. Values 0-1*/ + private double x; + + /**fraction of PixelCoordinate. Values 0-1*/ + private double y; + + private boolean drawColorBar; + + private boolean drawBoxAroundColorBar; + + private RGB color; + + /** + * @return the drawColorBar + */ +public final boolean isDrawColorBar() { + return drawColorBar; +} + +/** + * @param drawColorBar the drawColorBar to set + */ +public final void setDrawColorBar(boolean drawColorBar) { + this.drawColorBar = drawColorBar; +} + +/** + * @return the drawBoxAroundColorBar + */ +public final boolean isDrawBoxAroundColorBar() { + return drawBoxAroundColorBar; +} + +/** + * @param drawBoxAroundColorBar the drawBoxAroundColorBar to set + */ +public final void setDrawBoxAroundColorBar(boolean drawBoxAroundColorBar) { + this.drawBoxAroundColorBar = drawBoxAroundColorBar; +} + +/** + * @return the color + */ +public final RGB getColor() { + return color; +} + +/** + * @param color the color to set + */ +public final void setColor(RGB color) { + this.color = color; +} + +/** + * @return the anchorLocation + */ +public final ColorBarAnchorLocation getAnchorLocation() { + return anchorLocation; +} + +/** + * @param anchorLocation the anchorLocation to set + */ +public final void setAnchorLocation(ColorBarAnchorLocation anchorLocation) { + this.anchorLocation = anchorLocation; +} + +/** + * @return the colorBarOrientation + */ +public final ColorBarOrientation getColorBarOrientation() { + return colorBarOrientation; +} + +/** + * @param colorBarOrientation the colorBarOrientation to set + */ +public final void setColorBarOrientation(ColorBarOrientation colorBarOrientation) { + this.colorBarOrientation = colorBarOrientation; +} + +/** + * @return the length + */ +public final double getLength() { + return length; +} + +/** + * @param length the length to set + */ +public final void setLength(double length) { + this.length = length; +} + +/** + * @return the x + */ +public final double getX() { + return x; +} + +/** + * @param x the x to set + */ +public final void setX(double x) { + this.x = x; +} + +/** + * @return the y + */ +public final double getY() { + return y; +} + +/** + * @param y the y to set + */ +public final void setY(double y) { + this.y = y; +} + +/** + * @param width the width to set + */ +public void setWidth(double width) { + this.width = width; +} + +/** + * @return the width + */ +public double getWidth() { + return width; +} + + + + public ColorBarAttributesBuilder() { + initializedefaults(); + } + + private void initializedefaults(){ + length = 0.5; + width = 0.01; + x = 0.005; + y = 0.05; + anchorLocation = ColorBarAnchorLocation.LowerLeft; + colorBarOrientation = ColorBarOrientation.Vertical; + drawColorBar = false; + drawBoxAroundColorBar = false; + color = GempakColor.VANILLA.getRGB(); + + } + +} diff --git a/ncep/gov.noaa.nws.ncep.gempak.parameters/src/gov/noaa/nws/ncep/gempak/parameters/colorbar/ColorBarOrientation.java b/ncep/gov.noaa.nws.ncep.gempak.parameters/src/gov/noaa/nws/ncep/gempak/parameters/colorbar/ColorBarOrientation.java new file mode 100644 index 0000000000..937b6850a4 --- /dev/null +++ b/ncep/gov.noaa.nws.ncep.gempak.parameters/src/gov/noaa/nws/ncep/gempak/parameters/colorbar/ColorBarOrientation.java @@ -0,0 +1,5 @@ +package gov.noaa.nws.ncep.gempak.parameters.colorbar; + +public enum ColorBarOrientation { + Vertical, Horizontal + } \ No newline at end of file diff --git a/ncep/gov.noaa.nws.ncep.gempak.parameters/unit_test/gov/noaa/nws/ncep/gempak/parameters/colorbar/CLRBARTest.java b/ncep/gov.noaa.nws.ncep.gempak.parameters/unit_test/gov/noaa/nws/ncep/gempak/parameters/colorbar/CLRBARTest.java new file mode 100644 index 0000000000..3ef8273bf7 --- /dev/null +++ b/ncep/gov.noaa.nws.ncep.gempak.parameters/unit_test/gov/noaa/nws/ncep/gempak/parameters/colorbar/CLRBARTest.java @@ -0,0 +1,499 @@ +/** + * + */ +package gov.noaa.nws.ncep.gempak.parameters.colorbar; + +import static org.junit.Assert.*; +import gov.noaa.nws.ncep.viz.common.ui.color.GempakColor; + +import org.junit.Test; + + +/**
+*Junit test-case for CLRBAR
+*
+* SOFTWARE HISTORY
+* Date          Ticket#     Engineer     Description
+* ------------ ---------- ----------- --------------------------
+* 19-Jul-2012    743        Archana.S    Initial Creation
+* 
+* @author Archana.S +* @version 1 +*/ +public class CLRBARTest { + + private static int testCaseNumber=1; + /** + * Test method for {@link gov.noaa.nws.ncep.gempak.parameters.colorbar.CLRBAR#CLRBAR(java.lang.String)}. + */ + @Test + public void testCLRBAR() { + System.out.println("------------------Test-case "+ testCaseNumber +"----------------"); + CLRBAR clbar = new CLRBAR("21/H/CC/0.0005;0.003/0.85;0.01"); + System.out.println("CLRBAR = " + clbar.getStrToParse()); + ColorBarAttributesBuilder cbarAttrBuilder = clbar.getcBarAttributesBuilder(); + assertEquals(cbarAttrBuilder.isDrawColorBar(), true); + assertEquals(cbarAttrBuilder.isDrawBoxAroundColorBar(), true); + assertEquals(cbarAttrBuilder.getAnchorLocation().toString(), "CenterCenter"); + assertEquals(cbarAttrBuilder.getColorBarOrientation().toString(), "Horizontal"); + assertEquals(cbarAttrBuilder.getX(), 0.0005); + assertEquals(cbarAttrBuilder.getY(), 0.003); + assertEquals(cbarAttrBuilder.getLength(), 0.85); + assertEquals(cbarAttrBuilder.getWidth(), 0.01); + assertEquals(cbarAttrBuilder.getColor(), GempakColor.LWNGREEN.getRGB()); + System.out.println("Draw the colorbar: " + cbarAttrBuilder.isDrawColorBar()); + System.out.println("Draw the box around the colorbar: " + cbarAttrBuilder.isDrawBoxAroundColorBar()); + System.out.println("Anchor location " + cbarAttrBuilder.getAnchorLocation().toString()); + System.out.println("ColorBar Orientation: " + cbarAttrBuilder.getColorBarOrientation().toString()); + System.out.println("View Coordinate X: " + cbarAttrBuilder.getX()); + System.out.println("View Coordinate Y: " + cbarAttrBuilder.getY()); + System.out.println("ColorBar length as a percentage of screen height: " + cbarAttrBuilder.getLength()*100 + "%"); + System.out.println("ColorBar width as a fraction of the screen width: " + cbarAttrBuilder.getWidth()*1000 + "%"); + testCaseNumber++; + } + + + @Test + public void testCLRBARNoBoundingBox() { + System.out.println("------------------Test-case "+ testCaseNumber +"----------------"); + + CLRBAR clbar = new CLRBAR("-21/H/CC/0.0005;0.003/0.85;0.01"); + System.out.println("CLRBAR = " + clbar.getStrToParse()); + + ColorBarAttributesBuilder cbarAttrBuilder = clbar.getcBarAttributesBuilder(); + + assertEquals(cbarAttrBuilder.isDrawBoxAroundColorBar(), false); + + System.out.println("Draw the box around the colorbar: " + cbarAttrBuilder.isDrawBoxAroundColorBar()); + testCaseNumber++; + } + + + @Test + public void testCLRBARNoColorBar() { + System.out.println("------------------Test-case "+ testCaseNumber +"----------------"); + CLRBAR clbar = new CLRBAR("/H/CC/0.0005;0.003/0.85;0.01"); + System.out.println("CLRBAR = " + clbar.getStrToParse()); + ColorBarAttributesBuilder cbarAttrBuilder = clbar.getcBarAttributesBuilder(); + + assertEquals(cbarAttrBuilder.isDrawColorBar(), false); + + System.out.println("Draw the colorbar: " + cbarAttrBuilder.isDrawColorBar()); + testCaseNumber++; + + System.out.println("------------------Test-case "+ testCaseNumber +"----------------"); + clbar = new CLRBAR("H/CC/0.0005;0.003/0.85;0.01"); + System.out.println("CLRBAR = " + clbar.getStrToParse()); + cbarAttrBuilder = clbar.getcBarAttributesBuilder(); + + assertEquals(cbarAttrBuilder.isDrawColorBar(), false); + + System.out.println("Draw the colorbar: " + cbarAttrBuilder.isDrawColorBar()); + testCaseNumber++; + + System.out.println("------------------Test-case "+ testCaseNumber +"----------------"); + clbar = new CLRBAR("0/H/CC/0.0005;0.003/0.85;0.01"); + System.out.println("CLRBAR = " + clbar.getStrToParse()); + cbarAttrBuilder = clbar.getcBarAttributesBuilder(); + + assertEquals(cbarAttrBuilder.isDrawColorBar(), false); + + System.out.println("Draw the colorbar: " + cbarAttrBuilder.isDrawColorBar()); + testCaseNumber++; + + } + + @Test + public void testCLRBARNoOrientation() { + System.out.println("------------------Test-case "+ testCaseNumber +"----------------"); + + CLRBAR clbar = new CLRBAR("21//CC/0.0005;0.003/0.85;0.01"); + System.out.println("CLRBAR = " + clbar.getStrToParse()); + + ColorBarAttributesBuilder cbarAttrBuilder = clbar.getcBarAttributesBuilder(); + assertEquals(cbarAttrBuilder.getColorBarOrientation().toString(), ColorBarOrientation.Vertical.toString()); + System.out.println("Default orientation: " + cbarAttrBuilder.getColorBarOrientation().toString()); + testCaseNumber++; + } + + @Test + public void testCLRBARNoAnchorLocation() { + System.out.println("------------------Test-case "+ testCaseNumber +"----------------"); + + CLRBAR clbar = new CLRBAR("21/H//0.0005;0.003/0.85;0.01"); + System.out.println("CLRBAR = " + clbar.getStrToParse()); + + ColorBarAttributesBuilder cbarAttrBuilder = clbar.getcBarAttributesBuilder(); + assertEquals(cbarAttrBuilder.getAnchorLocation().toString(), ColorBarAnchorLocation.LowerLeft.toString()); + System.out.println("Default anchor location: " + cbarAttrBuilder.getAnchorLocation().toString()); + testCaseNumber++; + } + + @Test + public void testCLRBARNoXViewCoord() { + System.out.println("------------------Test-case "+ testCaseNumber +"----------------"); + + CLRBAR clbar = new CLRBAR("21/H/CL/;0.003/0.85;0.01"); + System.out.println("CLRBAR = " + clbar.getStrToParse()); + + ColorBarAttributesBuilder cbarAttrBuilder = clbar.getcBarAttributesBuilder(); + assertEquals(cbarAttrBuilder.getX(), 0.005); + assertEquals(cbarAttrBuilder.getY(), 0.003); + System.out.println("Default view coordinate X: " + cbarAttrBuilder.getX()); + System.out.println("View coordinate Y: " + cbarAttrBuilder.getY()); + testCaseNumber++; + } + + @Test + public void testCLRBARNoYViewCoord() { + System.out.println("------------------Test-case "+ testCaseNumber +"----------------"); + + CLRBAR clbar = new CLRBAR("21/H/CL/0.00323/0.85;0.01"); + System.out.println("CLRBAR = " + clbar.getStrToParse()); + + ColorBarAttributesBuilder cbarAttrBuilder = clbar.getcBarAttributesBuilder(); + assertEquals(cbarAttrBuilder.getX(), 0.00323); + assertEquals(cbarAttrBuilder.getY(), 0.05); + System.out.println("View coordinate X: " + cbarAttrBuilder.getX()); + System.out.println("Default view coordinate Y: " + cbarAttrBuilder.getY()); + testCaseNumber++; + + System.out.println("------------------Test-case "+ testCaseNumber +"----------------"); + + clbar = new CLRBAR("21/H/CL/0.01;/0.85;0.01"); + System.out.println("CLRBAR = " + clbar.getStrToParse()); + + cbarAttrBuilder = clbar.getcBarAttributesBuilder(); + assertEquals(cbarAttrBuilder.getX(), 0.01); + assertEquals(cbarAttrBuilder.getY(), 0.05); + System.out.println("View coordinate X: " + cbarAttrBuilder.getX()); + System.out.println("Default view coordinate Y: " + cbarAttrBuilder.getY()); + testCaseNumber++; + + } + + @Test + public void testCLRBARNoXAndY() { + System.out.println("------------------Test-case "+ testCaseNumber +"----------------"); + + CLRBAR clbar = new CLRBAR("21/H/CL//0.85;0.01"); + System.out.println("CLRBAR = " + clbar.getStrToParse()); + + ColorBarAttributesBuilder cbarAttrBuilder = clbar.getcBarAttributesBuilder(); + assertEquals(cbarAttrBuilder.getX(), 0.005); + assertEquals(cbarAttrBuilder.getY(), 0.05); + System.out.println("Default view coordinate X: " + cbarAttrBuilder.getX()); + System.out.println("Default view coordinate Y: " + cbarAttrBuilder.getY()); + testCaseNumber++; + + System.out.println("------------------Test-case "+ testCaseNumber +"----------------"); + clbar = new CLRBAR("21/H/CL/;/0.85;0.01"); + System.out.println("CLRBAR = " + clbar.getStrToParse()); + + cbarAttrBuilder = clbar.getcBarAttributesBuilder(); + assertEquals(cbarAttrBuilder.getX(), 0.005); + assertEquals(cbarAttrBuilder.getY(), 0.05); + System.out.println("Default view coordinate X: " + cbarAttrBuilder.getX()); + System.out.println("Default view coordinate Y: " + cbarAttrBuilder.getY()); + testCaseNumber++; + } + + @Test + public void testCLRBARNoLength() { + System.out.println("------------------Test-case "+ testCaseNumber +"----------------"); + + CLRBAR clbar = new CLRBAR("21/H/CL/0.06;0.007/;0.02"); + System.out.println("CLRBAR = " + clbar.getStrToParse()); + + ColorBarAttributesBuilder cbarAttrBuilder = clbar.getcBarAttributesBuilder(); + assertEquals(cbarAttrBuilder.getLength(), 0.5); + assertEquals(cbarAttrBuilder.getWidth(), 0.02); + System.out.println("Default length: " + cbarAttrBuilder.getLength()*100 + "%"); + System.out.println("Width: " + cbarAttrBuilder.getWidth()); + testCaseNumber++; + + } + + @Test + public void testCLRBARNoWidth() { + System.out.println("------------------Test-case "+ testCaseNumber +"----------------"); + + CLRBAR clbar = new CLRBAR("21/H/CL/0.06;0.007/0.98"); + System.out.println("CLRBAR = " + clbar.getStrToParse()); + + ColorBarAttributesBuilder cbarAttrBuilder = clbar.getcBarAttributesBuilder(); + assertEquals(cbarAttrBuilder.getLength(), 0.98); + assertEquals(cbarAttrBuilder.getWidth(), 0.01); + System.out.println("Length: " + cbarAttrBuilder.getLength()*100 + "%"); + System.out.println("Default Width: " + cbarAttrBuilder.getWidth()); + testCaseNumber++; + + System.out.println("------------------Test-case "+ testCaseNumber +"----------------"); + clbar = new CLRBAR("21/H/CL/0.06;0.007/0.87;"); + System.out.println("CLRBAR = " + clbar.getStrToParse()); + + cbarAttrBuilder = clbar.getcBarAttributesBuilder(); + assertEquals(cbarAttrBuilder.getLength(), 0.87); + assertEquals(cbarAttrBuilder.getWidth(), 0.01); + System.out.println("Length: " + cbarAttrBuilder.getLength()*100 + "%"); + System.out.println("Default Width: " + cbarAttrBuilder.getWidth()); + testCaseNumber++; + } + + + @Test + public void testCLRBARNoLengthAndWidth() { + System.out.println("------------------Test-case "+ testCaseNumber +"----------------"); + + CLRBAR clbar = new CLRBAR("21/H/CL/0.06;0.007"); + System.out.println("CLRBAR = " + clbar.getStrToParse()); + + ColorBarAttributesBuilder cbarAttrBuilder = clbar.getcBarAttributesBuilder(); + assertEquals(cbarAttrBuilder.getLength(), 0.5); + assertEquals(cbarAttrBuilder.getWidth(), 0.01); + System.out.println("Default length: " + cbarAttrBuilder.getLength()*100 + "%"); + System.out.println("Default width: " + cbarAttrBuilder.getWidth()); + testCaseNumber++; + + } + + @Test + public void testDefaultsForColorBar(){ + System.out.println("------------------Test-case "+ testCaseNumber +"----------------"); + + CLRBAR clbar = new CLRBAR("15"); + System.out.println("CLRBAR = " + clbar.getStrToParse()); + + ColorBarAttributesBuilder cbarAttrBuilder = clbar.getcBarAttributesBuilder(); + assertEquals(cbarAttrBuilder.isDrawColorBar(), true); + assertEquals(cbarAttrBuilder.isDrawBoxAroundColorBar(), true); + assertEquals(cbarAttrBuilder.getAnchorLocation().toString(), "LowerLeft"); + assertEquals(cbarAttrBuilder.getColorBarOrientation().toString(), "Vertical"); + assertEquals(cbarAttrBuilder.getX(), 0.005); + assertEquals(cbarAttrBuilder.getY(), 0.05); + assertEquals(cbarAttrBuilder.getLength(), 0.5); + assertEquals(cbarAttrBuilder.getWidth(), 0.01); + assertEquals(cbarAttrBuilder.getColor(), GempakColor.FIREBRIC.getRGB()); + System.out.println("Draw the colorbar : " + cbarAttrBuilder.isDrawColorBar()); + System.out.println("Draw the box around the colorbar: " + cbarAttrBuilder.isDrawBoxAroundColorBar()); + System.out.println("Anchor location :" + cbarAttrBuilder.getAnchorLocation().toString()); + System.out.println("ColorBar Orientation : " + cbarAttrBuilder.getColorBarOrientation().toString()); + System.out.println("View Coordinate X : " + cbarAttrBuilder.getX()); + System.out.println("View Coordinate Y : " + cbarAttrBuilder.getY()); + System.out.println("ColorBar length as a percentage of screen height: " + cbarAttrBuilder.getLength()*100 + "%"); + System.out.println("ColorBar width as a fraction of the screen width: " + cbarAttrBuilder.getWidth()*1000 + "%"); + testCaseNumber++; + } + + @Test + public void testEmptyCLRBAR(){ + System.out.println("------------------Test-case "+ testCaseNumber +"----------------"); + CLRBAR clbar = new CLRBAR(""); + System.out.println("CLRBAR = " + clbar.getStrToParse()); + ColorBarAttributesBuilder cbarAttrBuilder = clbar.getcBarAttributesBuilder(); + assertEquals(cbarAttrBuilder.isDrawColorBar(), false); + System.out.println("Draw the colorbar : " + cbarAttrBuilder.isDrawColorBar()); + testCaseNumber++; + + System.out.println("------------------Test-case "+ testCaseNumber +"----------------"); + clbar = new CLRBAR(" "); + System.out.println("CLRBAR = " + clbar.getStrToParse()); + cbarAttrBuilder = clbar.getcBarAttributesBuilder(); + assertEquals(cbarAttrBuilder.isDrawColorBar(), false); + System.out.println("Draw the colorbar : " + cbarAttrBuilder.isDrawColorBar()); + testCaseNumber++; + } + + + @Test + public void testExtraInputsForColorBar(){ + System.out.println("------------------Test-case "+ testCaseNumber +"----------------"); + + CLRBAR clbar = new CLRBAR("15/H/UR/0.005;0.08/0.45;0.02/abc/@#"); + System.out.println("CLRBAR = " + clbar.getStrToParse()); + + ColorBarAttributesBuilder cbarAttrBuilder = clbar.getcBarAttributesBuilder(); + assertEquals(cbarAttrBuilder.isDrawColorBar(), true); + assertEquals(cbarAttrBuilder.isDrawBoxAroundColorBar(), true); + assertEquals(cbarAttrBuilder.getAnchorLocation().toString(), "UpperRight"); + assertEquals(cbarAttrBuilder.getColorBarOrientation().toString(), "Horizontal"); + assertEquals(cbarAttrBuilder.getX(), 0.005); + assertEquals(cbarAttrBuilder.getY(), 0.08); + assertEquals(cbarAttrBuilder.getLength(), 0.45); + assertEquals(cbarAttrBuilder.getWidth(), 0.02); + assertEquals(cbarAttrBuilder.getColor(), GempakColor.FIREBRIC.getRGB()); + System.out.println("Draw the colorbar : " + cbarAttrBuilder.isDrawColorBar()); + System.out.println("Draw the box around the colorbar: " + cbarAttrBuilder.isDrawBoxAroundColorBar()); + System.out.println("Anchor location :" + cbarAttrBuilder.getAnchorLocation().toString()); + System.out.println("ColorBar Orientation : " + cbarAttrBuilder.getColorBarOrientation().toString()); + System.out.println("View Coordinate X : " + cbarAttrBuilder.getX()); + System.out.println("View Coordinate Y : " + cbarAttrBuilder.getY()); + System.out.println("ColorBar length as a percentage of screen height: " + cbarAttrBuilder.getLength()*100 + "%"); + System.out.println("ColorBar width as a fraction of the screen width: " + cbarAttrBuilder.getWidth()*1000 + "%"); + testCaseNumber++; + } + + + @Test + public void testCLRBARMalformedInput() { + System.out.println("------------------Test-case "+ testCaseNumber +"----------------"); + CLRBAR clbar = new CLRBAR("21/H1234/CC/0.0005*)(;0.003|/0.85asdf;0.01efgh"); + System.out.println("CLRBAR = " + clbar.getStrToParse()); + ColorBarAttributesBuilder cbarAttrBuilder = clbar.getcBarAttributesBuilder(); + assertEquals(cbarAttrBuilder.isDrawColorBar(), true); + assertEquals(cbarAttrBuilder.isDrawBoxAroundColorBar(), true); + assertEquals(cbarAttrBuilder.getAnchorLocation().toString(), "CenterCenter"); + assertEquals(cbarAttrBuilder.getColorBarOrientation().toString(), "Vertical"); + assertEquals(cbarAttrBuilder.getX(), 0.005); + assertEquals(cbarAttrBuilder.getY(), 0.05); + assertEquals(cbarAttrBuilder.getLength(), 0.5); + assertEquals(cbarAttrBuilder.getWidth(), 0.01); + assertEquals(cbarAttrBuilder.getColor(), GempakColor.LWNGREEN.getRGB()); + System.out.println("Draw the colorbar: " + cbarAttrBuilder.isDrawColorBar()); + System.out.println("Draw the box around the colorbar: " + cbarAttrBuilder.isDrawBoxAroundColorBar()); + System.out.println("Anchor location " + cbarAttrBuilder.getAnchorLocation().toString()); + System.out.println("ColorBar Orientation: " + cbarAttrBuilder.getColorBarOrientation().toString()); + System.out.println("View Coordinate X: " + cbarAttrBuilder.getX()); + System.out.println("View Coordinate Y: " + cbarAttrBuilder.getY()); + System.out.println("ColorBar length as a percentage of screen height: " + cbarAttrBuilder.getLength()*100 + "%"); + System.out.println("ColorBar width as a fraction of the screen width: " + cbarAttrBuilder.getWidth()*1000 + "%"); + testCaseNumber++; + } + + + @Test + public void testCLRBARLengthRatioInvalidLowLimit() { + System.out.println("------------------Test-case "+ testCaseNumber +"----------------"); + CLRBAR clbar = new CLRBAR("21/H/CC/0.0005;0.003/-0.85;0.01"); + System.out.println("CLRBAR = " + clbar.getStrToParse()); + ColorBarAttributesBuilder cbarAttrBuilder = clbar.getcBarAttributesBuilder(); + + assertEquals(cbarAttrBuilder.getLength(), 0.5); + + + System.out.println("ColorBar length as a percentage of screen height: " + cbarAttrBuilder.getLength()*100 + "%"); + + testCaseNumber++; + } + + @Test + public void testCLRBARLengthRatioInvalidHighLimit() { + System.out.println("------------------Test-case "+ testCaseNumber +"----------------"); + CLRBAR clbar = new CLRBAR("21/H/CC/0.0005;0.003/10.85;0.01"); + System.out.println("CLRBAR = " + clbar.getStrToParse()); + ColorBarAttributesBuilder cbarAttrBuilder = clbar.getcBarAttributesBuilder(); + + assertEquals(cbarAttrBuilder.getLength(), 0.5); + + + System.out.println("ColorBar length as a percentage of screen height: " + cbarAttrBuilder.getLength()*100 + "%"); + + testCaseNumber++; + } + + + @Test + public void testCLRBARWidthRatioInvalidLowLimit() { + System.out.println("------------------Test-case "+ testCaseNumber +"----------------"); + CLRBAR clbar = new CLRBAR("21/H/CC/0.0005;0.003/0.85;-10.45"); + System.out.println("CLRBAR = " + clbar.getStrToParse()); + ColorBarAttributesBuilder cbarAttrBuilder = clbar.getcBarAttributesBuilder(); + + assertEquals(cbarAttrBuilder.getWidth(), 0.01); + + + System.out.println("ColorBar width as a fraction of screen width: " + cbarAttrBuilder.getWidth()); + + testCaseNumber++; + } + + @Test + public void testCLRBARWidthRatioInvalidHighLimit() { + System.out.println("------------------Test-case "+ testCaseNumber +"----------------"); + CLRBAR clbar = new CLRBAR("21/H/CC/0.0005;0.003/0.85;50.45"); + System.out.println("CLRBAR = " + clbar.getStrToParse()); + ColorBarAttributesBuilder cbarAttrBuilder = clbar.getcBarAttributesBuilder(); + + assertEquals(cbarAttrBuilder.getWidth(), 0.01); + + + System.out.println("ColorBar width as a fraction of screen width: " + cbarAttrBuilder.getWidth()); + + testCaseNumber++; + } + + + @Test + public void testCLRBARXViewCoordInvalidLowLimit() { + System.out.println("------------------Test-case "+ testCaseNumber +"----------------"); + CLRBAR clbar = new CLRBAR("21/H/CC/-0.7855;0.003/0.85;0.04"); + System.out.println("CLRBAR = " + clbar.getStrToParse()); + ColorBarAttributesBuilder cbarAttrBuilder = clbar.getcBarAttributesBuilder(); + + assertEquals(cbarAttrBuilder.getX(), 0.005); + + + System.out.println("View coordinate X: " + cbarAttrBuilder.getX()); + + testCaseNumber++; + } + + + @Test + public void testCLRBARXViewCoordInvalidHighLimit() { + System.out.println("------------------Test-case "+ testCaseNumber +"----------------"); + CLRBAR clbar = new CLRBAR("21/H/CC/7.855;0.003/0.85;0.04"); + System.out.println("CLRBAR = " + clbar.getStrToParse()); + ColorBarAttributesBuilder cbarAttrBuilder = clbar.getcBarAttributesBuilder(); + + assertEquals(cbarAttrBuilder.getX(), 0.005); + + + System.out.println("View coordinate X: " + cbarAttrBuilder.getX()); + + testCaseNumber++; + } + + + @Test + public void testCLRBARYViewCoordInvalidLowLimit() { + System.out.println("------------------Test-case "+ testCaseNumber +"----------------"); + CLRBAR clbar = new CLRBAR("21/H/CC/0.7855;-10.003/0.85;0.04"); + System.out.println("CLRBAR = " + clbar.getStrToParse()); + ColorBarAttributesBuilder cbarAttrBuilder = clbar.getcBarAttributesBuilder(); + + assertEquals(cbarAttrBuilder.getY(), 0.05); + + + System.out.println("View coordinate Y: " + cbarAttrBuilder.getY()); + + testCaseNumber++; + } + + + @Test + public void testCLRBARYViewCoordInvalidHighLimit() { + System.out.println("------------------Test-case "+ testCaseNumber +"----------------"); + CLRBAR clbar = new CLRBAR("21/H/CC/0.7855;1.0001/0.85;0.04"); + System.out.println("CLRBAR = " + clbar.getStrToParse()); + ColorBarAttributesBuilder cbarAttrBuilder = clbar.getcBarAttributesBuilder(); + + assertEquals(cbarAttrBuilder.getY(), 0.05); + + + System.out.println("View coordinate Y: " + cbarAttrBuilder.getY()); + + testCaseNumber++; + } + } + + + + + + + + + + + diff --git a/ncep/gov.noaa.nws.ncep.staticdataprovider/META-INF/MANIFEST.MF b/ncep/gov.noaa.nws.ncep.staticdataprovider/META-INF/MANIFEST.MF index 548b1c666a..81a1a3e966 100644 --- a/ncep/gov.noaa.nws.ncep.staticdataprovider/META-INF/MANIFEST.MF +++ b/ncep/gov.noaa.nws.ncep.staticdataprovider/META-INF/MANIFEST.MF @@ -14,6 +14,9 @@ Bundle-ActivationPolicy: lazy Import-Package: com.vividsolutions.jts.geom, com.vividsolutions.jts.io, com.vividsolutions.jts.operation.valid, + gov.noaa.nws.ncep.common.dataplugin.aww, gov.noaa.nws.ncep.viz.common.dbQuery, - gov.noaa.nws.ncep.viz.localization + gov.noaa.nws.ncep.viz.localization, + gov.noaa.nws.ncep.viz.rsc.wtch.util, + gov.noaa.nws.ncep.viz.resources Export-Package: gov.noaa.nws.ncep.staticdataprovider diff --git a/ncep/gov.noaa.nws.ncep.staticdataprovider/src/gov/noaa/nws/ncep/staticdataprovider/ContinuingWatch.java b/ncep/gov.noaa.nws.ncep.staticdataprovider/src/gov/noaa/nws/ncep/staticdataprovider/ContinuingWatch.java new file mode 100644 index 0000000000..095ee9b382 --- /dev/null +++ b/ncep/gov.noaa.nws.ncep.staticdataprovider/src/gov/noaa/nws/ncep/staticdataprovider/ContinuingWatch.java @@ -0,0 +1,173 @@ +/* + * gov.noaa.nws.ncep.common.staticDataProvider.ContinuingWatch + * + * 2012.8 + * + * This code has been developed by the NCEP/SIB for use in the AWIPS2 system. + */ +package gov.noaa.nws.ncep.staticdataprovider; + +import gov.noaa.nws.ncep.common.dataplugin.aww.AwwRecord; +import gov.noaa.nws.ncep.common.dataplugin.aww.AwwUgc; +import gov.noaa.nws.ncep.common.dataplugin.aww.AwwVtec; +import gov.noaa.nws.ncep.viz.resources.AbstractNatlCntrsResource.IRscDataObject; +import gov.noaa.nws.ncep.viz.rsc.wtch.util.WtchConstant; +import gov.noaa.nws.ncep.viz.rsc.wtch.util.WtchUtil; + +import java.util.ArrayList; +import java.util.Calendar; +import java.util.Collection; +import java.util.GregorianCalendar; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.TimeZone; + +import com.raytheon.uf.common.dataquery.requests.RequestConstraint; +import com.raytheon.uf.common.dataquery.requests.RequestConstraint.ConstraintType; +import com.raytheon.uf.common.time.DataTime; +import com.raytheon.uf.viz.core.catalog.LayerProperty; +import com.raytheon.uf.viz.core.catalog.ScriptCreator; +import com.raytheon.uf.viz.core.comm.Connector; +import com.raytheon.uf.viz.core.exception.VizException; +import com.raytheon.uf.viz.core.rsc.ResourceType; + +/** + * + *
+ * SOFTWARE HISTORY
+ * Date       	Ticket#		Engineer	Description
+ * ------------	----------	-----------	--------------------------
+ * 08/12		#770		Q. Zhou   	Initial Creation.
+ * 09/12		#770		Q. Zhou   	Clean up and change selectedWatch to a collection
+ * 
+ * + * @author Q. Zhou + */ + +public class ContinuingWatch { + + /* + * WtchRscDataObj class + */ + public static class WtchRscDataObj implements IRscDataObject { + String dataUri; + DataTime issueTime; // issue time from bulletin + DataTime eventTime; + String reportType; + + int watchNumber; + String actionType; + String officeId; + String eventTrackingNumber; + String phenomena; + String significance; + + @Override + public DataTime getDataTime() { + return eventTime; + } + } + + /* + * Get individual fields from layers. Then compare endTime + * @return string of watch number + */ + private static Collection getAwwRecord(AwwRecord awwRecord) { + + Collection selectedWatch = new ArrayList(); + GregorianCalendar currCal = new GregorianCalendar(TimeZone.getTimeZone("GMT")); + Calendar endTime = null; + + if(WtchUtil.isWtchRecord(awwRecord)) { + WtchRscDataObj wtchData = new WtchRscDataObj(); + wtchData.issueTime = new DataTime(awwRecord.getIssueTime()); + wtchData.reportType = awwRecord.getReportType(); + + try { + int watchNumber = Integer.parseInt(awwRecord.getWatchNumber()); + wtchData.watchNumber = watchNumber; + } catch(NumberFormatException nfe) { + //do nothing + } + + Set awwUgcSet = awwRecord.getAwwUGC(); + + for (AwwUgc eachAwwUgc : awwUgcSet) { + wtchData.eventTrackingNumber = eachAwwUgc.getEventTrackingNumber(); + + Set awwVtecSet = eachAwwUgc.getAwwVtecLine(); + + for (AwwVtec eachAwwVtec : awwVtecSet) { + wtchData.actionType = eachAwwVtec.getAction(); + + endTime = eachAwwVtec.getEventEndTime(); + + /* if the endtime is not specified, assume the event is still active. + unspecified can occur if the endtime has a missing value indicator + or is set to 0. A 0 value can occur because the time may be NULL in + the database, which is converted to a 0 value by the time conversion functions. */ + if (endTime == null && wtchData.watchNumber != 0) + selectedWatch.add(Integer.toString(wtchData.watchNumber)); + + if (wtchData.actionType != null && !wtchData.actionType.equals("CAN") && !wtchData.actionType.equals("EXP") ) { //&& !wtchData.actionType.equals("COR") + if (endTime != null && endTime.getTime().compareTo(currCal.getTime()) >0 ) + selectedWatch.add( Integer.toString(wtchData.watchNumber)); + } + else if (wtchData.actionType == null) { + if (endTime != null && endTime.getTime().compareTo(currCal.getTime()) >0 ) + selectedWatch.add( Integer.toString(wtchData.watchNumber)); + } + } + } + } + return selectedWatch; + } + + + /* + * Load data from DB, then get the active watch number + * @return: list of watch numbers + */ + public static List loadContWatchNum() throws VizException { + List contWatch = new ArrayList(); + AwwRecord awwRecord = null; + + HashMap metadataMap = new HashMap(); + String wtch[]={WtchConstant.SEVERE_WEATHER_STATUS_REPORT, WtchConstant.SEVERE_WEATHER_THUNDERSTORM_WATCH, WtchConstant.SEVERE_WEATHER_TORNADO_WATCH}; + + RequestConstraint ids = new RequestConstraint(); + ids.setConstraintType(ConstraintType.IN); + ids.setConstraintValueList(wtch); + metadataMap.put("reportType",ids); + metadataMap.put( "pluginName", new RequestConstraint("aww") ); + + HashMap queryList = new HashMap(metadataMap); + + LayerProperty prop = new LayerProperty(); + prop.setDesiredProduct(ResourceType.PLAN_VIEW); + prop.setEntryQueryParameters(queryList, false); + prop.setNumberOfImages(15000); // TODO: max # records ?? should we cap this ? + + String script = null; + script = ScriptCreator.createScript(prop); + if (script == null) + return null; + + Object[] pdoList = Connector.getInstance().connect(script, null, 60000); + for (Object pdo : pdoList) { + awwRecord = (AwwRecord) pdo; + Collection num = getAwwRecord( awwRecord ); + if (num != null && !num.isEmpty()) + contWatch.addAll( num); + } + + //Retrieving unique items from the list + Set set = new HashSet(contWatch); + contWatch = new ArrayList(set); + + return contWatch; + } + +} diff --git a/ncep/gov.noaa.nws.ncep.staticdataprovider/src/gov/noaa/nws/ncep/staticdataprovider/CwaProvider.java b/ncep/gov.noaa.nws.ncep.staticdataprovider/src/gov/noaa/nws/ncep/staticdataprovider/CwaProvider.java new file mode 100644 index 0000000000..902072dffa --- /dev/null +++ b/ncep/gov.noaa.nws.ncep.staticdataprovider/src/gov/noaa/nws/ncep/staticdataprovider/CwaProvider.java @@ -0,0 +1,120 @@ +/* + * gov.noaa.nws.ncep.staticDataProvider.CwaProvider + * + * 24 June 2012 + * + * This code has been developed by the NCEP/SIB for use in the AWIPS2 system. + */ +package gov.noaa.nws.ncep.staticdataprovider; + +import gov.noaa.nws.ncep.viz.common.dbQuery.NcDirectDbQuery; +import gov.noaa.nws.ncep.common.staticdata.Cwa; +import java.util.ArrayList; +import java.util.List; + +import com.raytheon.uf.viz.core.catalog.DirectDbQuery.QueryLanguage; +import com.vividsolutions.jts.geom.Coordinate; +import com.vividsolutions.jts.geom.Geometry; +import com.vividsolutions.jts.io.ParseException; +import com.vividsolutions.jts.io.WKBReader; + +public class CwaProvider { + private static List allCwas; + private static volatile boolean cwaLoaded = false; + + /** + * Get all counties and marine zones from the database + * @return + */ + public static List getAllCwas(){ + if ( !cwaLoaded ){ + loadCwaTable(); + } + + return allCwas; + } + /** + * load cwa table + * @return + */ + public static synchronized List loadCwaTable(){ + + if ( !cwaLoaded ) { + + allCwas = new ArrayList(); + + List cwas; + + String queryStates = "Select AsBinary(the_geom),cwa,wfo,lat, lon FROM mapdata.cwa;"; + + try { + cwas = NcDirectDbQuery.executeQuery( + queryStates, "maps", QueryLanguage.SQL); + + WKBReader wkbReader = new WKBReader(); + + int tt = 0; + for ( Object[] st : cwas ){ + + //read shape + byte[] wkb = (byte[]) st[0]; + Geometry cwaGeo = null; + try { + cwaGeo = wkbReader.read(wkb); + } catch (ParseException e) { + e.printStackTrace(); + } + + String cwa = (String)st[1]; + String wfo = (String)st[2]; + + Coordinate loc = new Coordinate(0,0); + try { + loc.x = ((Number)st[4]).doubleValue(); + loc.y = ((Number)st[3]).doubleValue(); + } + catch ( Exception e ){ + // center location missing in database + } + + + Cwa aCwa = new Cwa(cwa, wfo, loc, cwaGeo); + allCwas.add(aCwa); + tt++; + + } + } + catch (Exception e ){ + System.out.println("db exception reading state tables!"); + e.printStackTrace(); + } + cwaLoaded = true; + + } + return allCwas; + } + + /** + * check the cwa in the polygon + * @param geo + * @return + */ + public static ArrayList cwasInGeometry(Geometry geo){ + getAllCwas(); + ArrayList ret= new ArrayList(); + for ( Cwa oneCwa : allCwas){ + if ( oneCwa.intersectGeometry(geo)){ + ret.add(oneCwa); + } + } + return ret; + } + /** + * check if cwa table loaded or not + * @return + */ + public static boolean isLoaded(){ + return cwaLoaded; + } + +} diff --git a/ncep/gov.noaa.nws.ncep.staticdataprovider/src/gov/noaa/nws/ncep/staticdataprovider/RfcProvider.java b/ncep/gov.noaa.nws.ncep.staticdataprovider/src/gov/noaa/nws/ncep/staticdataprovider/RfcProvider.java new file mode 100644 index 0000000000..3294c1d761 --- /dev/null +++ b/ncep/gov.noaa.nws.ncep.staticdataprovider/src/gov/noaa/nws/ncep/staticdataprovider/RfcProvider.java @@ -0,0 +1,135 @@ +/* + * gov.noaa.nws.ncep.staticDataProvider.RfcProvider + * + * 12 March 2012 + * + * This code has been developed by the NCEP/SIB for use in the AWIPS2 system. + */ + +package gov.noaa.nws.ncep.staticdataprovider; + +import gov.noaa.nws.ncep.common.staticdata.Rfc; +import gov.noaa.nws.ncep.viz.common.dbQuery.NcDirectDbQuery; + +import java.util.ArrayList; +import java.util.List; + +import com.raytheon.uf.viz.core.catalog.DirectDbQuery.QueryLanguage; +import com.vividsolutions.jts.geom.Geometry; +import com.vividsolutions.jts.io.ParseException; +import com.vividsolutions.jts.io.WKBReader; + +/** + * Class to hold RFC information + * + *
+ * SOFTWARE HISTORY
+ * Date       	Ticket#		Engineer	Description
+ * ------------	----------	-----------	--------------------------
+ * 02/12		?	    	B. Yin   	Initial Creation.
+ * 06/12        734         J. Zneg     Move from PGEN
+ * 
+ * + * @author B. Yin + */ + +public class RfcProvider { + + private static List allRfcs; + private static volatile boolean rfcLoaded = false; + + /* + * Get all counties and marine zones from the database + * @return + */ + public static List getAllRfcs(){ + if ( !rfcLoaded ){ + loadRfcTable(); + } + + return allRfcs; + } + /** + * Read from database and load Rfc table + * @return + */ + public static synchronized List loadRfcTable(){ + + if ( !rfcLoaded ) { + + allRfcs = new ArrayList(); + + List rfcs; + + String queryStates = "Select AsBinary(the_geom),site_id,state,rfc_name,rfc_city,basin_id FROM mapdata.rfc"; + + try { + rfcs = NcDirectDbQuery.executeQuery( + queryStates, "maps", QueryLanguage.SQL); + + WKBReader wkbReader = new WKBReader(); + + int tt = 0; + for ( Object[] rfc : rfcs ){ + + //read shape + byte[] wkb = (byte[]) rfc[0]; + Geometry rfcGeo = null; + try { + rfcGeo = wkbReader.read(wkb); + } catch (ParseException e) { + e.printStackTrace(); + } + + String siteId = (String)rfc[1]; + String state = (String)rfc[2]; + String rfcName = (String)rfc[3]; + String rfcCity = (String)rfc[4]; + String basinId = (String)rfc[5]; + + + Rfc aRfc = new Rfc(rfcName, rfcCity, state, siteId, basinId, rfcGeo); + allRfcs.add(aRfc); + tt++; + + } + + + + } + catch (Exception e ){ + System.out.println("db exception reading state tables!"); + e.printStackTrace(); + } + rfcLoaded = true; + + } + return allRfcs; + } + + /** + * Return a list of RFC in the input geometry + * @param geo + * @return + */ + public static ArrayList rfcsInGeometry(Geometry geo){ + getAllRfcs() ; + ArrayList ret= new ArrayList(); + for ( Rfc rfc : allRfcs){ + if ( rfc.intersectGeometry(geo)){ + ret.add(rfc); + } + } + return ret; + } + + /** + * Check if RFC table is loaded. + * @return true if RFC has been loaded + */ + public static boolean isRfcLoaded(){ + + return rfcLoaded; + } + +} diff --git a/ncep/gov.noaa.nws.ncep.staticdataprovider/src/gov/noaa/nws/ncep/staticdataprovider/StaticDataProvider.java b/ncep/gov.noaa.nws.ncep.staticdataprovider/src/gov/noaa/nws/ncep/staticdataprovider/StaticDataProvider.java index 48edc66cf3..de87ef6561 100644 --- a/ncep/gov.noaa.nws.ncep.staticdataprovider/src/gov/noaa/nws/ncep/staticdataprovider/StaticDataProvider.java +++ b/ncep/gov.noaa.nws.ncep.staticdataprovider/src/gov/noaa/nws/ncep/staticdataprovider/StaticDataProvider.java @@ -13,6 +13,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Set; import com.raytheon.uf.common.dataquery.db.QueryResult; import com.raytheon.uf.common.dataquery.db.QueryResultRow; @@ -26,10 +27,12 @@ import com.vividsolutions.jts.geom.Geometry; import com.vividsolutions.jts.geom.MultiPolygon; import gov.noaa.nws.ncep.common.staticdata.CostalWater; +import gov.noaa.nws.ncep.common.staticdata.Cwa; import gov.noaa.nws.ncep.common.staticdata.FAArea; import gov.noaa.nws.ncep.common.staticdata.FARegion; import gov.noaa.nws.ncep.common.staticdata.GreatLake; import gov.noaa.nws.ncep.common.staticdata.IStaticDataProvider; +import gov.noaa.nws.ncep.common.staticdata.Rfc; import gov.noaa.nws.ncep.common.staticdata.SPCCounty; import gov.noaa.nws.ncep.common.staticdata.USState; import gov.noaa.nws.ncep.edex.common.stationTables.StationTable; @@ -45,7 +48,9 @@ import gov.noaa.nws.ncep.viz.localization.NcPathManager.NcPathConstants; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * 02/12 ? B. Yin Moved from PGEN - * + * 06/12 734 J. Zeng add getAllRfcs() and getAllCwas() + * 08/12 #770 Q. Zhou added loadContWatchNum() + * * * @author B. Yin @@ -88,7 +93,7 @@ public class StaticDataProvider implements IStaticDataProvider { } @Override - public HashMap getClstTbl() { + public HashMap> getClstTbl() { return StationTableProvider.getClstTbl(); } @@ -218,6 +223,46 @@ public class StaticDataProvider implements IStaticDataProvider { return USStateProvider.getAllStates(); } + @Override + public List loadStateTable(){ + return USStateProvider.loadStateTable(); + } + + @Override + public ArrayList statesInGeometry(Geometry geo) { + return USStateProvider.statesInGeometry(geo); + } + + + @Override + public List getAllRfcs() { + return RfcProvider.getAllRfcs(); + } + + @Override + public List loadRfcTable() { + return RfcProvider.loadRfcTable(); + } + + @Override + public ArrayList rfcsInGeometry(Geometry geo) { + return RfcProvider.rfcsInGeometry(geo); + } + + @Override + public List getAllCwas() { + return CwaProvider.getAllCwas(); + } + + @Override + public List loadCwaTable() { + return CwaProvider.loadCwaTable(); + } + @Override + public ArrayList cwasInGeometry(Geometry geo) { + return CwaProvider.cwasInGeometry(geo); + } + @Override public HashMap getStateAbrvMap() { HashMap stMap = new HashMap(); @@ -272,4 +317,24 @@ public class StaticDataProvider implements IStaticDataProvider { String columnName, String columnValue) { return G2GBoundsProvider.getG2GBounds(tableAlias, columnName, columnValue); } + + @Override + public boolean isRfcLoaded() { + return RfcProvider.isRfcLoaded(); + } + + @Override + public List loadContWatchNum() { + // TODO Auto-generated method stub + List watchNum = new ArrayList(); + + try { + watchNum = ContinuingWatch.loadContWatchNum(); + } catch (VizException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + return watchNum; + } + } diff --git a/ncep/gov.noaa.nws.ncep.staticdataprovider/src/gov/noaa/nws/ncep/staticdataprovider/StationTableProvider.java b/ncep/gov.noaa.nws.ncep.staticdataprovider/src/gov/noaa/nws/ncep/staticdataprovider/StationTableProvider.java index e58e11043b..a827b6472d 100644 --- a/ncep/gov.noaa.nws.ncep.staticdataprovider/src/gov/noaa/nws/ncep/staticdataprovider/StationTableProvider.java +++ b/ncep/gov.noaa.nws.ncep.staticdataprovider/src/gov/noaa/nws/ncep/staticdataprovider/StationTableProvider.java @@ -7,8 +7,12 @@ */ package gov.noaa.nws.ncep.staticdataprovider; +import java.util.ArrayList; import java.util.HashMap; +import java.util.HashSet; import java.util.List; +import java.util.Set; +import java.util.StringTokenizer; import com.raytheon.uf.viz.core.catalog.DirectDbQuery.QueryLanguage; @@ -44,7 +48,7 @@ public class StationTableProvider { private static StationTable vorTbl; //merged cluster tables - static private HashMap clstTbl; + static private HashMap> clstTbl; //volcano table private static StationTable volcanoTbl; @@ -112,11 +116,13 @@ public class StationTableProvider { /** * Read and merge the clustering tables. */ - public static HashMap getClstTbl(){ + public static HashMap> getClstTbl(){ if ( clstTbl == null ){ - clstTbl = new HashMap(); + // The key of the map is a fips string, the value is a string that contains all fips + // in the cluster including the key itself in the format of fips1+fips2+... + clstTbl = new HashMap>(); List rows1 = null; List rows2 = null; @@ -126,6 +132,7 @@ public class StationTableProvider { String querySt = "Select cntycitifipscode FROM stns.countycluststate"; String queryPerm = "Select cntyfipscode FROM stns.permclust"; + // Query ncep database to load the optional and permanent cluster tables. try { rows1 = NcDirectDbQuery.executeQuery( queryWfo, "ncep", QueryLanguage.SQL); @@ -141,29 +148,70 @@ public class StationTableProvider { } - if ( rows1 != null ){ - if (rows2 != null ) rows1.addAll(rows2); - if ( rows3 != null ) rows1.addAll(rows3); - for ( Object[] obj : rows1){ + //For optional cluster A+B, two entries are needed. "A: A+B" and "B: A+B" + List optional = new ArrayList< Object[] >(); + if ( rows1 != null ) optional.addAll( rows1 ); + if ( rows2 != null ) optional.addAll( rows2 ); + + for ( Object[] obj : optional ){ String fipsStr = (String)obj[0]; String strNoSpace = fipsStr.replaceAll(" ", ""); - int index = 0; - do { - // System.out.println(obj[0]); - // System.out.println(((String)obj[0]).substring(index, index+5)); - String key = (strNoSpace).substring(index, index+5); - String value = clstTbl.get(key); - if ( value != null ){ //make sure no overwrite - clstTbl.put(key, value + "+" + strNoSpace); + + StringTokenizer token = new StringTokenizer(strNoSpace, "+" ); + + HashSet set = new HashSet(); + + while ( token.hasMoreTokens() ){ + set.add( token.nextToken() ); } - else { - clstTbl.put(key, strNoSpace); + + for ( String fips : set ){ + clstTbl.put( fips , (Set) set.clone()); } - index += 6; - }while (index+5 <= strNoSpace.length()); } + //For permanent cluster A+C and B+C, three entries are needed. + // "A: A+C", "B: B+C", and "C: A+B+C" + if ( rows3 != null ){ + for ( Object[] obj : rows3){ + String fipsStr = (String)obj[0]; + String strNoSpace = fipsStr.replaceAll(" ", ""); + + StringTokenizer token = new StringTokenizer(strNoSpace, "+" ); + + HashSet set = new HashSet(); + + if ( token.hasMoreTokens() ) { + String firstFips = token.nextToken(); + set.add( firstFips); + + while ( token.hasMoreTokens() ){ + set.add( token.nextToken() ); } + + //First FIPS is already in optional cluster table, merge with the permanent table + if ( clstTbl.get( firstFips ) != null ){ + clstTbl.get(firstFips).addAll(set); + } + else { //new entry + clstTbl.put(firstFips, (Set) set.clone()); + } + + //add the remaining FIPS in the set + for ( String fips : set ){ + if ( !fips.equals( firstFips )){ + if ( clstTbl.get( fips ) != null ){ //already in the map + clstTbl.get( fips ).addAll(set); + } + else { //new entry + clstTbl.put(fips, (Set) set.clone()); + } + } + } + } + } + } + } return clstTbl; diff --git a/ncep/gov.noaa.nws.ncep.staticdataprovider/src/gov/noaa/nws/ncep/staticdataprovider/USStateProvider.java b/ncep/gov.noaa.nws.ncep.staticdataprovider/src/gov/noaa/nws/ncep/staticdataprovider/USStateProvider.java index af3d1cf11a..7d2cca25ea 100644 --- a/ncep/gov.noaa.nws.ncep.staticdataprovider/src/gov/noaa/nws/ncep/staticdataprovider/USStateProvider.java +++ b/ncep/gov.noaa.nws.ncep.staticdataprovider/src/gov/noaa/nws/ncep/staticdataprovider/USStateProvider.java @@ -1,5 +1,5 @@ /* - * gov.noaa.nws.ncep.common.staticDataProvider.USStateProvider + * gov.noaa.nws.ncep.staticDataProvider.USStateProvider * * 12 March 2012 * diff --git a/ncep/gov.noaa.nws.ncep.ui.nctextui/META-INF/MANIFEST.MF b/ncep/gov.noaa.nws.ncep.ui.nctextui/META-INF/MANIFEST.MF index 99bf87e5ef..c6eb7fb120 100644 --- a/ncep/gov.noaa.nws.ncep.ui.nctextui/META-INF/MANIFEST.MF +++ b/ncep/gov.noaa.nws.ncep.ui.nctextui/META-INF/MANIFEST.MF @@ -4,6 +4,8 @@ Bundle-Name: Nctextui Plug-in Bundle-SymbolicName: gov.noaa.nws.ncep.ui.nctextui;singleton:=true Bundle-Version: 1.0.0.qualifier Bundle-Activator: gov.noaa.nws.ncep.ui.nctextui.Activator +Eclipse-BuddyPolicy: registered, ext, global +Eclipse-RegisterBuddy: com.raytheon.viz.core, com.raytheon.uf.common.serialization Require-Bundle: org.eclipse.ui, org.eclipse.core.runtime, com.raytheon.viz.ui;bundle-version="1.11.17", @@ -32,3 +34,4 @@ Import-Package: com.raytheon.uf.common.dataplugin, org.geotools.referencing, org.geotools.referencing.datum, org.opengis.referencing.crs +Export-Package: gov.noaa.nws.ncep.ui.nctextui.rsc diff --git a/ncep/gov.noaa.nws.ncep.ui.nctextui/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject b/ncep/gov.noaa.nws.ncep.ui.nctextui/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject new file mode 100644 index 0000000000..cdd0e8c863 --- /dev/null +++ b/ncep/gov.noaa.nws.ncep.ui.nctextui/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject @@ -0,0 +1 @@ +gov.noaa.nws.ncep.ui.nctextui.rsc.NctextuiResourceData \ No newline at end of file diff --git a/ncep/gov.noaa.nws.ncep.ui.nctextui/src/gov/noaa/nws/ncep/ui/nctextui/rsc/NctextuiMouseHandler.java b/ncep/gov.noaa.nws.ncep.ui.nctextui/src/gov/noaa/nws/ncep/ui/nctextui/rsc/NctextuiMouseHandler.java index 86b39bef6d..d11e3bf31b 100644 --- a/ncep/gov.noaa.nws.ncep.ui.nctextui/src/gov/noaa/nws/ncep/ui/nctextui/rsc/NctextuiMouseHandler.java +++ b/ncep/gov.noaa.nws.ncep.ui.nctextui/src/gov/noaa/nws/ncep/ui/nctextui/rsc/NctextuiMouseHandler.java @@ -1,3 +1,13 @@ +/* + * gov.noaa.nws.ncep.ui.nctextui.rsc.NctextuiMouseHandler + * + * Date Ticket# Engineer Description + * ------------ ---------- ----------- -------------------------- + * 07/18/2012 #751 S. Gurung Removed handleMouseDownMove(...) since this functionality + * is handled by NcPanHandler.handleMouseDownMove(...). + * + * + */ package gov.noaa.nws.ncep.ui.nctextui.rsc; import java.util.List; @@ -58,7 +68,7 @@ public class NctextuiMouseHandler extends InputHandlerDefaultImpl { * int, int) * handle left button, so user be able to shift map while it is down */ - @Override + /* @Override public boolean handleMouseDownMove(int x, int y, int button) { if (button == 1 ){ NCMapEditor mapEditor = NctextuiResource.getMapEditor(); @@ -80,7 +90,7 @@ public class NctextuiMouseHandler extends InputHandlerDefaultImpl { } return false; - } + }*/ private String removeCR(String curStr){ int i = ASCII_CR_VAL; char asciiCr = (char)i; diff --git a/ncep/gov.noaa.nws.ncep.ui.nctextui/src/gov/noaa/nws/ncep/ui/nctextui/rsc/NctextuiResource.java b/ncep/gov.noaa.nws.ncep.ui.nctextui/src/gov/noaa/nws/ncep/ui/nctextui/rsc/NctextuiResource.java index 5213136335..2b8fb7fb83 100644 --- a/ncep/gov.noaa.nws.ncep.ui.nctextui/src/gov/noaa/nws/ncep/ui/nctextui/rsc/NctextuiResource.java +++ b/ncep/gov.noaa.nws.ncep.ui.nctextui/src/gov/noaa/nws/ncep/ui/nctextui/rsc/NctextuiResource.java @@ -14,6 +14,7 @@ * 02/15/2012 T627 Archana Updated the call to addRbd() to accept * a NCMapEditor object as one of the arguments * Removed the call to setNcEditor() + * 08/17/2012 T655 B. Hebbard Added paintProps as parameter to IDisplayable draw (2) */ package gov.noaa.nws.ncep.ui.nctextui.rsc; @@ -417,7 +418,7 @@ public class NctextuiResource extends AbstractVizResource= ptop; i -= pinc) { - w1 = i; - usum = usum + (i_wndu(i, I_PRES) * w1); - vsum = vsum + (i_wndv(i, I_PRES) * w1); + p = pbot; + for (i = 0; i <= 20; i++) { + w1 = p; + usum = usum + (i_wndu(p, I_PRES) * w1); + vsum = vsum + (i_wndv(p, I_PRES) * w1); + p -= pinc; wgt = wgt + w1; num++; } @@ -201,8 +204,9 @@ void mean_wind_npw(float pbot, float ptop, float *mnu, float *mnv, /* mnv - V-Component of mean wind (kt) */ /*************************************************************/ { - float pinc, usum, vsum, wgt, w1, num, i, ix1; + float pinc, usum, vsum, wgt, w1, num, p, ix1; float sfctemp, sfcdwpt, sfcpres, lower, upper; + int i; Parcel pcl; *wdir = RMISSD; @@ -242,10 +246,12 @@ void mean_wind_npw(float pbot, float ptop, float *mnu, float *mnv, } else { num = wgt = usum = vsum = 0; - for (i = pbot; i >= ptop; i -= pinc) { - w1 = 1; - usum = usum + i_wndu(i, I_PRES); - vsum = vsum + i_wndv(i, I_PRES); + p = pbot; + for (i = 0; i <= 20; i++) { + w1 = p; + usum = usum + i_wndu(p, I_PRES); + vsum = vsum + i_wndv(p, I_PRES); + p -= pinc; wgt = wgt + w1; num++; } @@ -277,8 +283,9 @@ void sr_wind(float pbot, float ptop, float stdir, float stspd, /* mnv - V-Component of mean wind (kt) */ /*************************************************************/ { - float pinc, usum, vsum, wgt, w1, num, i, ix1, stu, stv; + float pinc, usum, vsum, wgt, w1, num, ix1, stu, stv, p; short idx; + int i; /* ----- Calculate Storm motion vectors ----- */ stu = ucomp(stdir, stspd); @@ -305,20 +312,16 @@ void sr_wind(float pbot, float ptop, float stdir, float stspd, ((i_wndu(ptop, I_PRES) - stu) * ptop); vsum = ((i_wndv(pbot, I_PRES) - stv) * pbot) + ((i_wndv(ptop, I_PRES) - stv) * ptop); - /*usum = ((ucomp(i_wdir(pbot, I_PRES), i_wspd(pbot, I_PRES)) - stu) * pbot) + - ((ucomp(i_wdir(ptop, I_PRES), i_wspd(ptop, I_PRES)) - stu) * ptop); - vsum = ((vcomp(i_wdir(pbot, I_PRES), i_wspd(pbot, I_PRES)) - stv) * pbot) + - ((vcomp(i_wdir(ptop, I_PRES), i_wspd(ptop, I_PRES)) - stv) * ptop);*/ wgt = pbot + ptop; } else { num = wgt = usum = vsum = 0; - for (i = pbot; i >= ptop; i -= pinc) { - w1 = i; - usum = usum + ((i_wndu(i, I_PRES) - stu) * w1); - vsum = vsum + ((i_wndv(i, I_PRES) - stv) * w1); - /*usum = usum + ((ucomp(i_wdir(i, I_PRES), i_wspd(i, I_PRES)) - stu) * w1); - vsum = vsum + ((vcomp(i_wdir(i, I_PRES), i_wspd(i, I_PRES)) - stv) * w1);*/ + p = pbot; + for (i = 0; i <= 20 ; i++) { + w1 = p; + usum = usum + ((i_wndu(p, I_PRES) - stu) * w1); + vsum = vsum + ((i_wndv(p, I_PRES) - stv) * w1); + p -= pinc; wgt = wgt + w1; num++; } @@ -374,10 +377,6 @@ void wind_shear(float pbot, float ptop, float *shu, float *shv, /* 10/9/07 RLT edit */ ubot = i_wndu(pbot, I_PRES); vbot = i_wndv(pbot, I_PRES); - /*ubot = ucomp((i_wdir(pbot, I_PRES)), (i_wspd(pbot, I_PRES))); - vbot = vcomp((i_wdir(pbot, I_PRES)), (i_wspd(pbot, I_PRES))); - printf("\n ubot = %7.1f vbot = %7.1f\n", ubot, vbot);*/ - } if (ptop == -1) { ptop = i_pres(agl(3000.0)); } @@ -388,15 +387,6 @@ void wind_shear(float pbot, float ptop, float *shu, float *shv, /* ----- Calculate Vector Difference ----- */ *shu = i_wndu(ptop, I_PRES) - ubot; *shv = i_wndv(ptop, I_PRES) - vbot; - /* *shu = ucomp((i_wdir(ptop, I_PRES)), (i_wspd(ptop, I_PRES))) - ubot; - *shv = vcomp((i_wdir(ptop, I_PRES)), (i_wspd(ptop, I_PRES))) - vbot; */ - - /*printf( "TOP: %7.1f %7.1f %7.1f %7.1f %7.1f\nBOT: %7.1f %7.1f %7.1f %7.1f %7.1f\nANS: %7.1f %7.1f %7.1f %7.1f\n", - ptop, i_wdir(ptop, I_PRES), i_wspd(ptop, I_PRES), i_wndu(ptop, I_PRES), i_wndv(ptop, I_PRES), pbot, - angle(ubot, vbot), speed(ubot, vbot), i_wndu(pbot, I_PRES), i_wndv(pbot, I_PRES), angle(*shu, *shv), - speed(*shu, *shv), *shu, *shv);*/ - - if (qc(*shu) && qc(*shv)) { *sdir = angle(*shu, *shv); *smag = speed(*shu, *shv); @@ -513,10 +503,12 @@ float helicity(float lower, float upper, float sdir, float sspd, srv2 = kt_to_mps(vcomp(sndg[i][idxd], sndg[i][idxs]) - cy); lyrh = (sru2 * srv1) - (sru1 * srv2); - if (lyrh > 0.0) + if (lyrh > 0.0) { *phel += lyrh; - else + } + else { *nhel += lyrh; + } sru1 = sru2; srv1 = srv2; } @@ -527,15 +519,12 @@ float helicity(float lower, float upper, float sdir, float sspd, srv2 = kt_to_mps(i_wndv(i_pres(msl(upper)), I_PRES) - cy); lyrh = (sru2 * srv1) - (sru1 * srv2); - if (lyrh > 0.0) + if (lyrh > 0.0) { *phel += lyrh; - else + } + else { *nhel += lyrh; - -/* -fprintf(stderr, "helicity: layer: %.1f:%.1f phel: %.1f nhel: %.1f\n", -lower, upper, *phel, *nhel); -*/ + } return (*phel + *nhel); } diff --git a/ncep/gov.noaa.nws.ncep.ui.nsharp/BigNsharp/xwvid2.c b/ncep/gov.noaa.nws.ncep.ui.nsharp/BigNsharp/xwvid2.c index 347a610aa2..b67deef8d0 100644 --- a/ncep/gov.noaa.nws.ncep.ui.nsharp/BigNsharp/xwvid2.c +++ b/ncep/gov.noaa.nws.ncep.ui.nsharp/BigNsharp/xwvid2.c @@ -657,48 +657,53 @@ void bunkers_left_motion(float *ul, float *vl, float *dirl, float *spdl) if (mucape >= 100 && mucin >= -250) { - /* printf( "Determining Effective Surface\n"); */ - /* ----- Begin at surface and search upward for "Effective Surface" ----- */ + // printf( "Determining Effective Surface\n"); + // ----- Begin at surface and search upward for "Effective Surface" ----- for(i=sfc();i<=numlvl-1;i++) { ix1 = parcel( -1, -1, sndg[i][pIndex], sndg[i][tIndex], sndg[i][tdIndex], &pcl); if((pcl.bplus >= ecape) && (pcl.bminus >= ecinh)) { *bot = sndg[i][pIndex]; - /* printf( "EFFSFC = %f\n", *bot); */ + // printf( "EFFSFC = %f\n", *bot); break; } } if (*bot == RMISSD) return; -/* printf( "Determining Effective Top\n"); */ - /* ----- Keep searching upward for the "Effective Top" ----- */ + // printf( "Determining Effective Top\n"); + // ----- Keep searching upward for the "Effective Top" ----- for(i=sfc();i<=numlvl-1;i++) { if (sndg[i][pIndex] <= *bot) { if ((sndg[i][tIndex] != RMISSD) && (sndg[i][tdIndex] != RMISSD)) { ix1 = parcel( -1, -1, sndg[i][pIndex], sndg[i][tIndex], sndg[i][tdIndex], &pcl); - /*printf("%.2f %.2f %.2f - %.2f %.2f\n", sndg[i][pIndex], sndg[i][tIndex], sndg[i][tdIndex], pcl.bplus, pcl.bminus);*/ + //printf("%.2f %.2f %.2f - %.2f %.2f\n", sndg[i][pIndex], sndg[i][tIndex], sndg[i][tdIndex], pcl.bplus, pcl.bminus); if((pcl.bplus <= ecape) || (pcl.bminus <= ecinh)) - /* check for missing T/Td data with significant wind levels in obs soundings */ + //check for missing T/Td data with significant wind levels in obs soundings { ok = 0; j=1; - while (!ok) { + + while (!ok && i-j >=0 && i-j <= numlvl-1) { if ((sndg[i-j][tIndex] != RMISSD) && (sndg[i-j][tdIndex] != RMISSD)) { ok=1; } else { j++; } } + if(i-j >=0 && i-j <= numlvl-1) *top = sndg[i-j][pIndex]; - /*printf("inflow top = %f\n", *top);*/ + //printf("inflow top = %f\n", *top); break; } } } } + + } + // printf( "EIL - %f\n", *bot); + + } -/* printf( "EIL - %f\n", *bot); -*/ } float scp(float stdir, float stspd) /***************************************************************/ diff --git a/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/NsharpConfigStore.java b/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/NsharpConfigStore.java index eecd44b370..fb0601a5a4 100644 --- a/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/NsharpConfigStore.java +++ b/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/NsharpConfigStore.java @@ -54,7 +54,7 @@ public class NsharpConfigStore implements ISerializableObject{ for(String lnName: NsharpConstants.lineNameArray){ if(linePropertyMap.get(lnName) == null){ NsharpLineProperty lp = NsharpConstants.defaultLineProperty[i]; - + linePropertyMap.put(lnName, lp); } i++; diff --git a/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/NsharpConstants.java b/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/NsharpConstants.java index 9902e18d01..65ffba0b69 100644 --- a/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/NsharpConstants.java +++ b/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/NsharpConstants.java @@ -460,7 +460,7 @@ public class NsharpConstants { public static final float HODO_CENTER_Y_ = HODO_Y_ORIG + (float)(1.00/2.00) * HODO_HEIGHT; public static final int HODO_COORDINATE_X1 = -50; public static final int HODO_COORDINATE_X1_STD = -90; - public static final int HODO_COORDINATE_Y1 = 75; + public static final int HODO_COORDINATE_Y1 = 75; public static final int HODO_COORDINATE_X2 = 70; public static final int HODO_COORDINATE_Y2 = -95; diff --git a/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/NsharpGridInventory.java b/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/NsharpGridInventory.java index 816011eea2..cd7247a5d1 100644 --- a/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/NsharpGridInventory.java +++ b/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/NsharpGridInventory.java @@ -47,7 +47,7 @@ public class NsharpGridInventory { * will have to change as well. */ inventoryParamNames.add( "pluginName" ); - inventoryParamNames.add( "info.datasetId" ); + inventoryParamNames.add( "modelInfo.modelName" ); inventoryParamNames.add( "dataTime.refTime" ); //inventoryParamNames.add( "dataTime.fcstTime"); } @@ -79,7 +79,7 @@ public class NsharpGridInventory { HashMap baseConstraints = new HashMap(); - baseConstraints.put( "pluginName", new RequestConstraint( "grid" ) ); + baseConstraints.put( "pluginName", new RequestConstraint( "ncgrib" ) ); //inventoryConstraints.put( "pluginName", new RequestConstraint( getPluginName() ) ); NcInventoryDefinition invDescr = diff --git a/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/background/NsharpHodoPaneBackground.java b/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/background/NsharpHodoPaneBackground.java index 1a0dd63368..92f11649aa 100644 --- a/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/background/NsharpHodoPaneBackground.java +++ b/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/background/NsharpHodoPaneBackground.java @@ -252,5 +252,5 @@ public class NsharpHodoPaneBackground extends NsharpGenericPaneBackground { public void setPaneConfigurationName(String paneConfigurationName) { this.paneConfigurationName = paneConfigurationName; } - + } diff --git a/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/background/NsharpSkewTPaneBackground.java b/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/background/NsharpSkewTPaneBackground.java index d70188d11f..965f0d7624 100644 --- a/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/background/NsharpSkewTPaneBackground.java +++ b/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/background/NsharpSkewTPaneBackground.java @@ -347,7 +347,7 @@ public class NsharpSkewTPaneBackground extends NsharpGenericPaneBackground { for (int i = 0; i < NsharpConstants.PRESSURE_MARK_LEVELS.length; i++) { //we only care about pressure for this case, temp is no important when calling getSkewTXY Coordinate coor = NsharpWxMath.getSkewTXY(NsharpConstants.PRESSURE_MARK_LEVELS[i],0); - try { + try { int mod = NsharpConstants.PRESSURE_MARK_LEVELS[i] % 100; if(pressureMainList.contains( NsharpConstants.PRESSURE_MARK_LEVELS[i]) || (currentZoomLevel <=0.7 && mod == 0 ) || (currentZoomLevel <=0.4)){ @@ -375,7 +375,7 @@ public class NsharpSkewTPaneBackground extends NsharpGenericPaneBackground { } } - // System.out.println("NUMBER*******************"); + // System.out.println("NUMBER*******************"); /* for (int i = 0; i < NsharpConstants.PRESSURE_NUMBERING_LEVELS.length; i++) { s = NsharpConstants.pressFormat.format(NsharpConstants.PRESSURE_NUMBERING_LEVELS[i]); @@ -486,27 +486,27 @@ public class NsharpSkewTPaneBackground extends NsharpGenericPaneBackground { for (float ratio : mixingRatios) { if(mixRatioMainList.contains( ratio) || (currentZoomLevel <=0.4)){ - p1.temperature = Equations - .invMixingRatio(p1.pressure, ratio / 1000); - p2.temperature = Equations - .invMixingRatio(p2.pressure, ratio / 1000); - Coordinate coor1 = NsharpWxMath.getSkewTXY(p1.pressure, - p1.temperature - 273.15); - Coordinate coor2 = NsharpWxMath.getSkewTXY(p2.pressure, - p2.temperature - 273.15); - double [][] lines = {{world.mapX(coor1.x), world.mapY(coor1.y)},{world.mapX(coor2.x), world.mapY(coor2.y)}}; - mixRatioShape.addLineSegment(lines); - - line2.setLine(world.mapX(coor1.x), world.mapY(coor1.y), - world.mapX(coor2.x), world.mapY(coor2.y)); - num = num + ratio; - Point2D.Double point = null; + p1.temperature = Equations + .invMixingRatio(p1.pressure, ratio / 1000); + p2.temperature = Equations + .invMixingRatio(p2.pressure, ratio / 1000); + Coordinate coor1 = NsharpWxMath.getSkewTXY(p1.pressure, + p1.temperature - 273.15); + Coordinate coor2 = NsharpWxMath.getSkewTXY(p2.pressure, + p2.temperature - 273.15); + double [][] lines = {{world.mapX(coor1.x), world.mapY(coor1.y)},{world.mapX(coor2.x), world.mapY(coor2.y)}}; + mixRatioShape.addLineSegment(lines); + + line2.setLine(world.mapX(coor1.x), world.mapY(coor1.y), + world.mapX(coor2.x), world.mapY(coor2.y)); + num = num + ratio; + Point2D.Double point = null; if ((point = getLineIntersection(ratioLabelLine, line2)) != null) { - double [] lblXy = {point.x, point.y}; - mixRatioShape.addLabel(num, lblXy); - } - num = ""; - } + double [] lblXy = {point.x, point.y}; + mixRatioShape.addLabel(num, lblXy); + } + num = ""; + } } mixRatioShape.compile(); diff --git a/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/display/NsharpAbstractPaneDescriptor.java b/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/display/NsharpAbstractPaneDescriptor.java index 9b521300d0..996c693df1 100644 --- a/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/display/NsharpAbstractPaneDescriptor.java +++ b/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/display/NsharpAbstractPaneDescriptor.java @@ -38,7 +38,7 @@ import com.raytheon.viz.core.graphing.GraphDescriptor; public class NsharpAbstractPaneDescriptor extends GraphDescriptor { @XmlElement protected int paneNumber; - + protected NsharpResourceHandler rscHandler=null; @@ -50,7 +50,7 @@ public class NsharpAbstractPaneDescriptor extends GraphDescriptor { this.rscHandler = rscHandler; } - public int getPaneNumber() { + public int getPaneNumber() { return paneNumber; } diff --git a/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/display/NsharpAbstractPaneDisplay.java b/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/display/NsharpAbstractPaneDisplay.java index 608e27bbae..2e781f1ef7 100644 --- a/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/display/NsharpAbstractPaneDisplay.java +++ b/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/display/NsharpAbstractPaneDisplay.java @@ -136,7 +136,7 @@ public class NsharpAbstractPaneDisplay extends AbstractRenderableDisplay { public String getPaneName() { return paneName; } - + @Override protected void customizeResourceList(ResourceList resourceList) { AbstractResourceData resourceData = new NsharpAbstractPaneResourceData(); diff --git a/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/display/NsharpEditor.java b/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/display/NsharpEditor.java index 0687a8b712..baced2dad2 100644 --- a/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/display/NsharpEditor.java +++ b/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/display/NsharpEditor.java @@ -870,14 +870,14 @@ public class NsharpEditor extends AbstractEditor implements AddListener, super.init(site, edInput); - //System.out.println("SkewtEditor title " + this.getTitle() ); - if (editorNum == 0 ){ - editorNum = EditorManager.getEditorNumber(); - - } - // a new instance, do the registration - EditorManager.registerEditorNumber(editorNum); - this.setTabTitle(editorNum+"-NsharpEditor"); + //System.out.println("SkewtEditor title " + this.getTitle() ); + if (editorNum == 0 ){ + editorNum = EditorManager.getEditorNumber(); + + } + // a new instance, do the registration + EditorManager.registerEditorNumber(editorNum); + this.setTabTitle(editorNum+"-NsharpEditor"); //Note: NsharpResourceHandler should be created after editor is created, so all display pane properties and // pane resource are also constructed @@ -969,9 +969,9 @@ public class NsharpEditor extends AbstractEditor implements AddListener, // bsteffen only dispose the rscHandler if not swapping. if(!displayArray[DISPLAY_SKEWT].isSwapping()){ if(rscHandler!=null){ - rscHandler.disposeInternal(); - } - } + rscHandler.disposeInternal(); + } + } rscHandler = null; } } @@ -1030,10 +1030,10 @@ public class NsharpEditor extends AbstractEditor implements AddListener, displayArray = null; nsharpComp=null; if(displayPane!=null){ - for (VizDisplayPane pane: displayPane){ + for (VizDisplayPane pane: displayPane){ if(pane!=null) - pane.dispose(); - } + pane.dispose(); + } } displayPane = null; rightTopGp= leftTopGp= leftBotGp= leftGp= rightGp= topGp= botGp=null; @@ -1060,10 +1060,10 @@ public class NsharpEditor extends AbstractEditor implements AddListener, @Override public void refresh() { if(displayPane!= null) - for (IDisplayPane pane : displayPane) { + for (IDisplayPane pane : displayPane) { if(pane!=null) - pane.refresh(); - } + pane.refresh(); + } //System.out.println("NsharpEditor refresh called"); } @Override @@ -1093,8 +1093,8 @@ public class NsharpEditor extends AbstractEditor implements AddListener, } if(rscHandler!=null) { if(rscHandler.getWitoPaneRsc()!=null){ - rscHandler.getWitoPaneRsc().createAllWireFrameShapes(); - } + rscHandler.getWitoPaneRsc().createAllWireFrameShapes(); + } //rscHandler.getSkewtPaneRsc().handleZooming(); } } @@ -1252,9 +1252,9 @@ public class NsharpEditor extends AbstractEditor implements AddListener, DISPLAY_FUTURE = -1; DISPLAY_SPC_GRAPHS = -1; } - nsharpComp = new Composite[DISPLAY_TOTAL]; - displayPane = new VizDisplayPane[DISPLAY_TOTAL]; - displayArray = new IRenderableDisplay[DISPLAY_TOTAL]; + nsharpComp = new Composite[DISPLAY_TOTAL]; + displayPane = new VizDisplayPane[DISPLAY_TOTAL]; + displayArray = new IRenderableDisplay[DISPLAY_TOTAL]; } /* * Note: initDisplayPublicParms() should be called before calling this function @@ -1274,7 +1274,7 @@ public class NsharpEditor extends AbstractEditor implements AddListener, displayArray[DISPLAY_DATA]= new NsharpDataPaneDisplay(new PixelExtent(NsharpConstants.DATA_DISPLAY_REC),DISPLAY_DATA); displayArray[DISPLAY_TIMESTN]= new NsharpTimeStnPaneDisplay(new PixelExtent(NsharpConstants.TIMESTN_DISPLAY_REC),DISPLAY_TIMESTN); displayArray[DISPLAY_FUTURE]= new NsharpAbstractPaneDisplay(new PixelExtent(NsharpConstants.FUTURE_DISPLAY_REC),DISPLAY_FUTURE); - } + } else { // case of default1 and default 2 pane configurations displayArray[DISPLAY_SKEWT]= new NsharpSkewTPaneDisplay(new PixelExtent(NsharpConstants.SKEWT_DISPLAY_REC),DISPLAY_SKEWT); displayArray[DISPLAY_WITO]= new NsharpWitoPaneDisplay(new PixelExtent(NsharpConstants.WITO_DISPLAY_REC),DISPLAY_WITO); @@ -1282,76 +1282,76 @@ public class NsharpEditor extends AbstractEditor implements AddListener, displayArray[DISPLAY_DATA]= new NsharpDataPaneDisplay(new PixelExtent(NsharpConstants.DATA_DISPLAY_REC),DISPLAY_DATA); displayArray[DISPLAY_INSET]= new NsharpInsetPaneDisplay(new PixelExtent(NsharpConstants.INSET_DISPLAY_REC),DISPLAY_INSET); displayArray[DISPLAY_TIMESTN]= new NsharpTimeStnPaneDisplay(new PixelExtent(NsharpConstants.TIMESTN_DISPLAY_REC),DISPLAY_TIMESTN); - } + } return displayArray; - } + } /* * Note: initDisplayPublicParms() and createRenderableDisplayArray() should be called before calling this function */ private void createPaneResource(){ - - ResourcePair skewtRscPair = displayArray[DISPLAY_SKEWT].getDescriptor().getResourceList().get(0); + + ResourcePair skewtRscPair = displayArray[DISPLAY_SKEWT].getDescriptor().getResourceList().get(0); NsharpSkewTPaneResource skewtPaneRsc=null; - if (skewtRscPair.getResource() instanceof NsharpSkewTPaneResource){ + if (skewtRscPair.getResource() instanceof NsharpSkewTPaneResource){ skewtPaneRsc = (NsharpSkewTPaneResource)skewtRscPair.getResource() ; - skewtPaneRsc.setRscHandler(rscHandler); - } - ResourcePair dataRscPair = displayArray[DISPLAY_DATA].getDescriptor().getResourceList().get(0); - if (dataRscPair.getResource() instanceof NsharpDataPaneResource){ - NsharpDataPaneResource dataPaneRsc = (NsharpDataPaneResource)dataRscPair.getResource() ; - dataPaneRsc.setRscHandler(rscHandler); - } - - ResourcePair hodoRscPair = displayArray[DISPLAY_HODO].getDescriptor().getResourceList().get(0); - if (hodoRscPair.getResource() instanceof NsharpHodoPaneResource){ - NsharpHodoPaneResource hodoPaneRsc = (NsharpHodoPaneResource)hodoRscPair.getResource() ; - hodoPaneRsc.setRscHandler(rscHandler); - } - - if(paneConfigurationName.equals(NsharpConstants.PANE_SPCWS_CFG_STR)|| - paneConfigurationName.equals(NsharpConstants.PANE_DEF_CFG_1_STR)|| - paneConfigurationName.equals(NsharpConstants.PANE_DEF_CFG_2_STR)){ - ResourcePair witoRscPair = displayArray[DISPLAY_WITO].getDescriptor().getResourceList().get(0); - if (witoRscPair.getResource() instanceof NsharpWitoPaneResource){ - NsharpWitoPaneResource witoPaneRsc = (NsharpWitoPaneResource)witoRscPair.getResource() ; - witoPaneRsc.setRscHandler(rscHandler); + skewtPaneRsc.setRscHandler(rscHandler); + } + ResourcePair dataRscPair = displayArray[DISPLAY_DATA].getDescriptor().getResourceList().get(0); + if (dataRscPair.getResource() instanceof NsharpDataPaneResource){ + NsharpDataPaneResource dataPaneRsc = (NsharpDataPaneResource)dataRscPair.getResource() ; + dataPaneRsc.setRscHandler(rscHandler); + } + + ResourcePair hodoRscPair = displayArray[DISPLAY_HODO].getDescriptor().getResourceList().get(0); + if (hodoRscPair.getResource() instanceof NsharpHodoPaneResource){ + NsharpHodoPaneResource hodoPaneRsc = (NsharpHodoPaneResource)hodoRscPair.getResource() ; + hodoPaneRsc.setRscHandler(rscHandler); } + if(paneConfigurationName.equals(NsharpConstants.PANE_SPCWS_CFG_STR)|| + paneConfigurationName.equals(NsharpConstants.PANE_DEF_CFG_1_STR)|| + paneConfigurationName.equals(NsharpConstants.PANE_DEF_CFG_2_STR)){ + ResourcePair witoRscPair = displayArray[DISPLAY_WITO].getDescriptor().getResourceList().get(0); + if (witoRscPair.getResource() instanceof NsharpWitoPaneResource){ + NsharpWitoPaneResource witoPaneRsc = (NsharpWitoPaneResource)witoRscPair.getResource() ; + witoPaneRsc.setRscHandler(rscHandler); + } - ResourcePair insetRscPair = displayArray[DISPLAY_INSET].getDescriptor().getResourceList().get(0); - if (insetRscPair.getResource() instanceof NsharpInsetPaneResource){ - NsharpInsetPaneResource insetPaneRsc = (NsharpInsetPaneResource)insetRscPair.getResource() ; - insetPaneRsc.setRscHandler(rscHandler); + + ResourcePair insetRscPair = displayArray[DISPLAY_INSET].getDescriptor().getResourceList().get(0); + if (insetRscPair.getResource() instanceof NsharpInsetPaneResource){ + NsharpInsetPaneResource insetPaneRsc = (NsharpInsetPaneResource)insetRscPair.getResource() ; + insetPaneRsc.setRscHandler(rscHandler); + } } - } - if(paneConfigurationName.equals(NsharpConstants.PANE_SPCWS_CFG_STR)){ - ResourcePair spcGraphRscPair = displayArray[DISPLAY_SPC_GRAPHS].getDescriptor().getResourceList().get(0); - if (spcGraphRscPair.getResource() instanceof NsharpSpcGraphsPaneResource){ - NsharpSpcGraphsPaneResource spcPaneRsc = (NsharpSpcGraphsPaneResource)spcGraphRscPair.getResource() ; - spcPaneRsc.setRscHandler(rscHandler); + if(paneConfigurationName.equals(NsharpConstants.PANE_SPCWS_CFG_STR)){ + ResourcePair spcGraphRscPair = displayArray[DISPLAY_SPC_GRAPHS].getDescriptor().getResourceList().get(0); + if (spcGraphRscPair.getResource() instanceof NsharpSpcGraphsPaneResource){ + NsharpSpcGraphsPaneResource spcPaneRsc = (NsharpSpcGraphsPaneResource)spcGraphRscPair.getResource() ; + spcPaneRsc.setRscHandler(rscHandler); + } } - } - if(paneConfigurationName.equals(NsharpConstants.PANE_SIMPLE_D2D_CFG_STR)){ - ResourcePair futureRscPair = displayArray[DISPLAY_FUTURE].getDescriptor().getResourceList().get(0); + if(paneConfigurationName.equals(NsharpConstants.PANE_SIMPLE_D2D_CFG_STR)){ + ResourcePair futureRscPair = displayArray[DISPLAY_FUTURE].getDescriptor().getResourceList().get(0); if (futureRscPair.getResource() instanceof NsharpAbstractPaneResource){ NsharpAbstractPaneResource futurePaneRsc = (NsharpAbstractPaneResource)futureRscPair.getResource() ; - futurePaneRsc.setRscHandler(rscHandler); + futurePaneRsc.setRscHandler(rscHandler); + } } - } - if(paneConfigurationName.equals(NsharpConstants.PANE_SIMPLE_D2D_CFG_STR)|| - paneConfigurationName.equals(NsharpConstants.PANE_DEF_CFG_1_STR)|| - paneConfigurationName.equals(NsharpConstants.PANE_DEF_CFG_2_STR)){ - ResourcePair timeStnRscPair = displayArray[DISPLAY_TIMESTN].getDescriptor().getResourceList().get(0); - if (timeStnRscPair.getResource() instanceof NsharpTimeStnPaneResource){ - NsharpTimeStnPaneResource timeStnPaneRsc = (NsharpTimeStnPaneResource)timeStnRscPair.getResource() ; - timeStnPaneRsc.setRscHandler(rscHandler); + if(paneConfigurationName.equals(NsharpConstants.PANE_SIMPLE_D2D_CFG_STR)|| + paneConfigurationName.equals(NsharpConstants.PANE_DEF_CFG_1_STR)|| + paneConfigurationName.equals(NsharpConstants.PANE_DEF_CFG_2_STR)){ + ResourcePair timeStnRscPair = displayArray[DISPLAY_TIMESTN].getDescriptor().getResourceList().get(0); + if (timeStnRscPair.getResource() instanceof NsharpTimeStnPaneResource){ + NsharpTimeStnPaneResource timeStnPaneRsc = (NsharpTimeStnPaneResource)timeStnRscPair.getResource() ; + timeStnPaneRsc.setRscHandler(rscHandler); + } } - } if(skewtPaneRsc!=null){ skewtPaneRsc.setCurrentGraphMode(rscHandler.getCurrentGraphMode()); //skewtPaneRsc.handleResize(); } - } + } private void updateEditor() { initDisplayPublicParms(); @@ -1797,10 +1797,10 @@ public class NsharpEditor extends AbstractEditor implements AddListener, //System.out.println("Editor="+this.toString()+" renderableDisplayChanged ADD but not swapping"+" newRenderableDisplay="+newRenderableDisplay.toString()); } return; - } - } - } + } + } + } // else // System.out.println("Editor="+this.toString()+" renderableDisplayChanged REMOVE called, pane = " + pane.toString()+" newRenderableDisplay="+newRenderableDisplay.toString()); - } + } } \ No newline at end of file diff --git a/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/display/NsharpSkewTPaneDescriptor.java b/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/display/NsharpSkewTPaneDescriptor.java index 0d12b4a065..bacfad11e9 100644 --- a/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/display/NsharpSkewTPaneDescriptor.java +++ b/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/display/NsharpSkewTPaneDescriptor.java @@ -146,9 +146,9 @@ public class NsharpSkewTPaneDescriptor extends NsharpAbstractPaneDescriptor { //System.out.println("changeFrame"); if(rscHandler == null) return; - // we will have to do conversion here - IFrameCoordinator.FrameChangeOperation dop = IFrameCoordinator.FrameChangeOperation.valueOf(operation.name()); - IFrameCoordinator.FrameChangeMode dmode = IFrameCoordinator.FrameChangeMode.valueOf(mode.name()); + // we will have to do conversion here + IFrameCoordinator.FrameChangeOperation dop = IFrameCoordinator.FrameChangeOperation.valueOf(operation.name()); + IFrameCoordinator.FrameChangeMode dmode = IFrameCoordinator.FrameChangeMode.valueOf(mode.name()); rscHandler.setSteppingTimeLine(dop, dmode); } diff --git a/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/display/NsharpSkewTPaneMouseHandler.java b/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/display/NsharpSkewTPaneMouseHandler.java index 5d88a42705..94cd120e52 100644 --- a/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/display/NsharpSkewTPaneMouseHandler.java +++ b/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/display/NsharpSkewTPaneMouseHandler.java @@ -42,7 +42,7 @@ import com.vividsolutions.jts.geom.Coordinate; public class NsharpSkewTPaneMouseHandler extends NsharpAbstractMouseHandler{ private Cursor editingCursor ; private Cursor movingCursor ; - //private boolean cursorInSkewT = false; + //private boolean cursorInSkewT = false; public NsharpSkewTPaneMouseHandler(NsharpEditor editor, IDisplayPane pane) { super(editor,pane); editingCursor = new Cursor( display, SWT.CURSOR_CROSS); @@ -269,7 +269,7 @@ public class NsharpSkewTPaneMouseHandler extends NsharpAbstractMouseHandler{ if(anchoredPtC.x != 0 || anchoredPtC.y!=0){ //cursor is within editing range ( i.e within 2 degree range from temp/dew line) if(currentSkewTEditMode == NsharpConstants.SKEWT_EDIT_MODE_EDITPOINT) - display.getCursorControl().setCursor(editingCursor); + display.getCursorControl().setCursor(editingCursor); else if(currentSkewTEditMode == NsharpConstants.SKEWT_EDIT_MODE_MOVELINE) display.getCursorControl().setCursor(movingCursor); } @@ -298,8 +298,8 @@ public class NsharpSkewTPaneMouseHandler extends NsharpAbstractMouseHandler{ return false; } if(editor!=null){ - NsharpSkewTPaneResource skewRsc = (NsharpSkewTPaneResource)getDescriptor().getPaneResource(); - // button 1 is left mouse button + NsharpSkewTPaneResource skewRsc = (NsharpSkewTPaneResource)getDescriptor().getPaneResource(); + // button 1 is left mouse button if (mouseButton == 1 ){ Coordinate c = editor.translateClick(x, y); if(skewRsc.getSkewTBackground().contains(c) == true && this.mode == Mode.SKEWT_DOWN) {// && mouseDownMove == true) { @@ -307,7 +307,7 @@ public class NsharpSkewTPaneMouseHandler extends NsharpAbstractMouseHandler{ skewRsc.getRscHandler().setPlotInteractiveTemp(false); int currentSkewTEditMode = skewRsc.getCurrentSkewTEditMode(); if(currentSkewTEditMode == NsharpConstants.SKEWT_EDIT_MODE_EDITPOINT) - skewRsc.getRscHandler().applyInteractiveTempPoint(); + skewRsc.getRscHandler().applyInteractiveTempPoint(); else if(currentSkewTEditMode == NsharpConstants.SKEWT_EDIT_MODE_MOVELINE) skewRsc.getRscHandler().applyMovingTempLine(); NsharpShowTextDialog osDia = NsharpShowTextDialog.getAccess( ); @@ -319,7 +319,7 @@ public class NsharpSkewTPaneMouseHandler extends NsharpAbstractMouseHandler{ //right mouse button boolean graphEditOn = skewRsc.getRscHandler().isEditGraphOn(); if(!graphEditOn) - NsharpMapResource.bringMapEditorToTop(); + NsharpMapResource.bringMapEditorToTop(); else { Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(); Menu menu = new Menu(shell, SWT.POP_UP); diff --git a/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/display/map/NsharpMapMouseHandler.java b/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/display/map/NsharpMapMouseHandler.java index 7fbf55634f..82d37b1331 100644 --- a/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/display/map/NsharpMapMouseHandler.java +++ b/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/display/map/NsharpMapMouseHandler.java @@ -118,6 +118,7 @@ public class NsharpMapMouseHandler extends InputHandlerDefaultImpl { */ @Override public boolean handleMouseUp(int x, int y, int button) { + if ( !NsharpMapResource.getOrCreateNsharpMapResource().isEditable()) return false; //System.out.println("NsharpMapMouseHandler handleMouseUp called"); // button 1 is left mouse button if (button == 1 ){ diff --git a/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/display/map/NsharpMapResource.java b/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/display/map/NsharpMapResource.java index 4ae58bc272..177b2ebd10 100644 --- a/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/display/map/NsharpMapResource.java +++ b/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/display/map/NsharpMapResource.java @@ -445,7 +445,7 @@ public class NsharpMapResource extends AbstractVizResourcetotalStnIdPage) - curStnIdPage=1; + curStnIdPage++; + if(curStnIdPage>totalStnIdPage) + curStnIdPage=1; } else { curStnIdPage--; if(curStnIdPage <=0) @@ -1695,9 +1695,9 @@ public class NsharpResourceHandler { if( totalTimeLinePage == 1) return; if((c.x - dtXOrig) < (dtWidth/2)){ - curTimeLinePage++; - if(curTimeLinePage>totalTimeLinePage) - curTimeLinePage=1; + curTimeLinePage++; + if(curTimeLinePage>totalTimeLinePage) + curTimeLinePage=1; } else { curTimeLinePage--; if(curTimeLinePage <=0) @@ -2177,28 +2177,28 @@ public class NsharpResourceHandler { NsharpAbstractPaneResource absPaneRsc = (NsharpAbstractPaneResource)rscP.getResource(); if (absPaneRsc instanceof NsharpSkewTPaneResource){ skewtPaneRsc = (NsharpSkewTPaneResource)absPaneRsc ; - skewtPaneRsc.setLinePropertyMap(linePropertyMap); - skewtPaneRsc.setGraphConfigProperty(graphConfigProperty); - skewtPaneRsc.setNsharpNative(nsharpNative); - } + skewtPaneRsc.setLinePropertyMap(linePropertyMap); + skewtPaneRsc.setGraphConfigProperty(graphConfigProperty); + skewtPaneRsc.setNsharpNative(nsharpNative); + } else if (absPaneRsc instanceof NsharpDataPaneResource){ dataPaneRsc = (NsharpDataPaneResource)absPaneRsc; - dataPaneRsc.setLinePropertyMap(linePropertyMap); - dataPaneRsc.setGraphConfigProperty(graphConfigProperty); - dataPaneRsc.setNsharpNative(nsharpNative); - dataPaneRsc.setPageDisplayOrderNumberArray(pageDisplayOrderNumberArray); - } + dataPaneRsc.setLinePropertyMap(linePropertyMap); + dataPaneRsc.setGraphConfigProperty(graphConfigProperty); + dataPaneRsc.setNsharpNative(nsharpNative); + dataPaneRsc.setPageDisplayOrderNumberArray(pageDisplayOrderNumberArray); + } else if (absPaneRsc instanceof NsharpHodoPaneResource){ hodoPaneRsc = (NsharpHodoPaneResource)absPaneRsc; - hodoPaneRsc.setLinePropertyMap(linePropertyMap); - hodoPaneRsc.setGraphConfigProperty(graphConfigProperty); - hodoPaneRsc.setNsharpNative(nsharpNative); - } + hodoPaneRsc.setLinePropertyMap(linePropertyMap); + hodoPaneRsc.setGraphConfigProperty(graphConfigProperty); + hodoPaneRsc.setNsharpNative(nsharpNative); + } else if (absPaneRsc instanceof NsharpWitoPaneResource && (paneConfigurationName.equals(NsharpConstants.PANE_SPCWS_CFG_STR)|| - paneConfigurationName.equals(NsharpConstants.PANE_DEF_CFG_1_STR)|| + paneConfigurationName.equals(NsharpConstants.PANE_DEF_CFG_1_STR)|| paneConfigurationName.equals(NsharpConstants.PANE_DEF_CFG_2_STR))){ - + witoPaneRsc = (NsharpWitoPaneResource)absPaneRsc; witoPaneRsc.setLinePropertyMap(linePropertyMap); witoPaneRsc.setGraphConfigProperty(graphConfigProperty); @@ -2214,7 +2214,7 @@ public class NsharpResourceHandler { insetPaneRsc.setLinePropertyMap(linePropertyMap); insetPaneRsc.setGraphConfigProperty(graphConfigProperty); insetPaneRsc.setNsharpNative(nsharpNative); - + } else if (absPaneRsc instanceof NsharpSpcGraphsPaneResource && paneConfigurationName.equals(NsharpConstants.PANE_SPCWS_CFG_STR)){ spcGraphsPaneRsc = (NsharpSpcGraphsPaneResource)absPaneRsc; @@ -2231,7 +2231,7 @@ public class NsharpResourceHandler { } else if (absPaneRsc instanceof NsharpTimeStnPaneResource && (paneConfigurationName.equals(NsharpConstants.PANE_SIMPLE_D2D_CFG_STR)|| - paneConfigurationName.equals(NsharpConstants.PANE_DEF_CFG_1_STR)|| + paneConfigurationName.equals(NsharpConstants.PANE_DEF_CFG_1_STR)|| paneConfigurationName.equals(NsharpConstants.PANE_DEF_CFG_2_STR))){ timeStnPaneRsc = (NsharpTimeStnPaneResource)absPaneRsc ; timeStnPaneRsc.setLinePropertyMap(linePropertyMap); diff --git a/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/display/rsc/NsharpSkewTPaneResource.java b/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/display/rsc/NsharpSkewTPaneResource.java index 610fd08a2d..865999c40d 100644 --- a/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/display/rsc/NsharpSkewTPaneResource.java +++ b/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/display/rsc/NsharpSkewTPaneResource.java @@ -615,7 +615,7 @@ public class NsharpSkewTPaneResource extends NsharpAbstractPaneResource{ } return gap; } - @SuppressWarnings("deprecation") + @SuppressWarnings("deprecation") private void plotNsharpMovingTempLine(IGraphicsTarget target, WGraphics world, RGB color) throws VizException{ float currentLayerTemp, currentLayerDewP; @@ -1129,7 +1129,7 @@ public class NsharpSkewTPaneResource extends NsharpAbstractPaneResource{ str6.setCoordinates(dispX, dispY); str6.horizontalAlignment = HorizontalAlignment.LEFT; str6.verticallAlignment = VerticalAlignment.TOP; - + //column 3: Theta, ThetaW, ThetaE dispX = dispX +target.getStringsBounds(str5).getWidth()*hRatio; dispY = ymin + 35 * zoomLevel* yRatio+target.getStringsBounds(str).getHeight()*vRatio ; @@ -1155,7 +1155,7 @@ public class NsharpSkewTPaneResource extends NsharpAbstractPaneResource{ else { boxExt = new PixelExtent(dispX,dispX+(rect.getWidth()+1)*hRatio,dispY-1*vRatio, dispY+rect.getHeight()*vRatio); target.drawShadedRect(boxExt, NsharpConstants.color_black, 1f, null); //blank out box - } + } target.drawStrings(str); target.drawRect(boxExt, wwTypeColor, 2f, 1f); // box border line colored with "Psbl Watch Type" color } @@ -1255,22 +1255,22 @@ public class NsharpSkewTPaneResource extends NsharpAbstractPaneResource{ // parcel trace curve if(graphConfigProperty.isParcel() == true && !compareStnIsOn && !compareTmIsOn){ if(soundingLys.size() > 0){ - NsharpLineProperty lp =linePropertyMap.get(NsharpConstants.lineNameArray[NsharpConstants.LINE_PARCEL]); + NsharpLineProperty lp =linePropertyMap.get(NsharpConstants.lineNameArray[NsharpConstants.LINE_PARCEL]); target.drawWireframeShape(parcelTraceRscShape, lp.getLineColor(),lp.getLineWidth(),lp.getLineStyle(),font10); + } } - } if(graphConfigProperty.isParcelAscent() == true && !compareStnIsOn && !compareTmIsOn){ if(soundingLys.size() > 0){ NsharpLineProperty lp =linePropertyMap.get(NsharpConstants.lineNameArray[NsharpConstants.LINE_PARCEL_ASCENT]); target.drawWireframeShape(parcelAscentRscShape, lp.getLineColor(),lp.getLineWidth(),lp.getLineStyle(),font10); - } + } } if(graphConfigProperty.isDcape() == true && dacpeTraceRscShape != null && !compareStnIsOn && !compareTmIsOn){ if(soundingLys.size() > 0){ NsharpLineProperty lp =linePropertyMap.get(NsharpConstants.lineNameArray[NsharpConstants.LINE_DCAPE]); target.drawWireframeShape(dacpeTraceRscShape, lp.getLineColor(),lp.getLineWidth(),lp.getLineStyle(),font10); - + } } if(graphConfigProperty.isEffLayer() == true && !compareStnIsOn && !compareTmIsOn ){ @@ -1314,7 +1314,7 @@ public class NsharpSkewTPaneResource extends NsharpAbstractPaneResource{ target.drawWireframeShape(vtempTraceCurveRscShape,lp.getLineColor(),lp.getLineWidth(),lp.getLineStyle(),font10); // parcel trace curve - lp =linePropertyMap.get(NsharpConstants.lineNameArray[NsharpConstants.LINE_PARCEL]); + lp =linePropertyMap.get(NsharpConstants.lineNameArray[NsharpConstants.LINE_PARCEL]); target.drawWireframeShape(parcelTraceRscShape, lp.getLineColor(),lp.getLineWidth(),lp.getLineStyle(),font10); lp =linePropertyMap.get(NsharpConstants.lineNameArray[NsharpConstants.LINE_PARCEL_ASCENT]); target.drawWireframeShape(parcelAscentRscShape, lp.getLineColor(),lp.getLineWidth(),lp.getLineStyle(),font10); @@ -1499,7 +1499,7 @@ public class NsharpSkewTPaneResource extends NsharpAbstractPaneResource{ double [][] lines = {{c1.x, c1.y},{c2.x, c2.y}}; parcelTraceRscShape.addLineSegment(lines); c1 = c2; - + Coordinate a1 = NsharpWxMath.getSkewTXY(sfcpres, sfctemp); a1.x = world.mapX(a1.x); a1.y = world.mapY(a1.y); @@ -1571,7 +1571,7 @@ public class NsharpSkewTPaneResource extends NsharpAbstractPaneResource{ } } } - + /* ----- Find min ThetaE layer ----- */ mine=1000; minep=-999; @@ -1601,7 +1601,7 @@ public class NsharpSkewTPaneResource extends NsharpAbstractPaneResource{ if(layer.getPressure() > upper){ uptr = i; break; - } + } } @@ -2635,12 +2635,12 @@ public class NsharpSkewTPaneResource extends NsharpAbstractPaneResource{ omegaYEnd = omegaYOrig + omegaHeight; createRscWireFrameShapes(); if(currentGraphMode== NsharpConstants.GRAPH_SKEWT) - skewTBackground.handleResize(ext); + skewTBackground.handleResize(ext); else if(currentGraphMode == NsharpConstants.GRAPH_ICING) - icingBackground.handleResize(ext); + icingBackground.handleResize(ext); else if(currentGraphMode == NsharpConstants.GRAPH_TURB) turbBackground.handleResize(ext); - + //System.out.println(descriptor.getPaneNumber()+":calling wito handle resize"); if(rscHandler != null && rscHandler.getWitoPaneRsc()!=null ) //simple D2D pane does not display WITO pane diff --git a/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/display/rsc/NsharpSpcGraphsPaneResource.java b/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/display/rsc/NsharpSpcGraphsPaneResource.java index e8f7c477a1..1a311c28b9 100644 --- a/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/display/rsc/NsharpSpcGraphsPaneResource.java +++ b/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/display/rsc/NsharpSpcGraphsPaneResource.java @@ -135,7 +135,7 @@ public class NsharpSpcGraphsPaneResource extends NsharpAbstractPaneResource{ if(side == left ){ xstart = spcLeftXOrig+ 0.5*charWidth; xend = spcLeftXOrig + spcFrameWidth; - } + } else{ xstart = spcRightXOrig + 0.5*charWidth; xend = spcRightXOrig + spcFrameWidth; @@ -202,7 +202,7 @@ public class NsharpSpcGraphsPaneResource extends NsharpAbstractPaneResource{ subTStr2.setCoordinates(xpos, ypos); strList.add(subTStr2); //target.drawStrings(subTStr1, subTStr2); - + ypos = ypos + 1.5* charHeight; //----- Plot Y-Coordinate hash marks, 0 - 70 kt ----- int maxval = 70; diff --git a/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/display/rsc/NsharpTimeStnPaneResource.java b/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/display/rsc/NsharpTimeStnPaneResource.java index c3da6bbc6d..9fd5ca4795 100644 --- a/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/display/rsc/NsharpTimeStnPaneResource.java +++ b/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/display/rsc/NsharpTimeStnPaneResource.java @@ -147,7 +147,7 @@ public class NsharpTimeStnPaneResource extends NsharpAbstractPaneResource{ y = dtYOrig; target.drawLine(dtXOrig, y, 0.0,dtXEnd , y, 0.0,NsharpConstants.color_white,1, LineStyle.SOLID); //System.out.println("drawNsharpDataTimelines picked stn info: "+ pickedStnInfoStr); - + x = dtXOrig +dtWidth/2; // line divide nextPage and prevPage strings target.drawLine(x, y, 0.0, @@ -274,7 +274,7 @@ public class NsharpTimeStnPaneResource extends NsharpAbstractPaneResource{ target.drawLine(x, y, 0.0, x , y+1.2*charHeight*yRatio, 0.0, NsharpConstants.color_white,1, LineStyle.SOLID); - + x = stnXOrig + 5; y = y+1.2*charHeight*yRatio; s = "nextPage"; diff --git a/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/display/rsc/NsharpWitoPaneResource.java b/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/display/rsc/NsharpWitoPaneResource.java index 6bc8c5f598..12ba133737 100644 --- a/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/display/rsc/NsharpWitoPaneResource.java +++ b/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/display/rsc/NsharpWitoPaneResource.java @@ -574,7 +574,7 @@ public class NsharpWitoPaneResource extends NsharpAbstractPaneResource{ font10 = target.initializeFont("Monospace", font10Size, null); */ } - + public boolean isInSidePane() { //System.out.println("isInSidePane returned="+inSidePane + this.toString()); return inSidePane; diff --git a/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/maprsc/NsharpMapResource.java b/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/maprsc/NsharpMapResource.java index 615dc65b07..84aa086cbb 100644 --- a/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/maprsc/NsharpMapResource.java +++ b/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/maprsc/NsharpMapResource.java @@ -431,7 +431,7 @@ public class NsharpMapResource extends AbstractVizResource queryRsltsList1 = NsharpGridInventory.getInstance().searchInventory( @@ -138,7 +138,7 @@ public class ModelSoundingDialogContents { * grid file name like this "2012-01-17 16". */ char fileSep = File.pathSeparatorChar; - String header = "grid"+fileSep+ selectedModel +fileSep; + String header = "ncgrib"+fileSep+ selectedModel +fileSep; if( queryRsltsList1 != null && !queryRsltsList1.isEmpty() ) { Collections.sort(queryRsltsList1, String.CASE_INSENSITIVE_ORDER); Collections.reverse(queryRsltsList1); @@ -348,11 +348,11 @@ public class ModelSoundingDialogContents { NsharpGraphProperty graphConfigProperty = configStore.getGraphProperty(); cfgList = graphConfigProperty.getGribModelTypeList(); HashMap rcMap = new HashMap(); - rcMap.put( "pluginName", new RequestConstraint("grid") ); + rcMap.put( "pluginName", new RequestConstraint("ncgrib") ); ArrayList queryRsltsList = NsharpGridInventory.getInstance().searchInventory( - rcMap, "info.datasetId" ); + rcMap, "modelInfo.modelName" ); /* * Chin Note: with this query, the returned string has this format, "ncgrib/gfsP5" @@ -363,7 +363,7 @@ public class ModelSoundingDialogContents { Collections.sort(queryRsltsList, String.CASE_INSENSITIVE_ORDER); for(String queryRslt : queryRsltsList ) { System.out.println("model name:"+queryRslt ); - String modelName = queryRslt.substring( "grid/".length() ); + String modelName = queryRslt.substring( "ncgrib/".length() ); if(cfgList!=null && cfgList.size()>0){ if(cfgList.contains(modelName)) modelTypeList.add(modelName); @@ -371,7 +371,7 @@ public class ModelSoundingDialogContents { else modelTypeList.add(modelName); } - } + } ldDia.stopWaitCursor(); } @@ -455,7 +455,7 @@ public class ModelSoundingDialogContents { createModelTypeListOld(); } } ); */ - + //bottomGp = new Group(topGp,SWT.SHADOW_ETCHED_IN); //bottomGp.setLayout( new GridLayout( 2, false ) ); @@ -706,7 +706,7 @@ public class ModelSoundingDialogContents { } */ if(modelTypeList!=null){ if(modelTypeList.getListeners(SWT.Selection).length >0) - modelTypeList.removeListener(SWT.Selection, modelTypeList.getListeners(SWT.Selection)[0]); + modelTypeList.removeListener(SWT.Selection, modelTypeList.getListeners(SWT.Selection)[0]); modelTypeList.dispose(); modelTypeList = null; } diff --git a/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/view/NsharpConfigDialog.java b/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/view/NsharpConfigDialog.java index c1e7091450..a8df852947 100644 --- a/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/view/NsharpConfigDialog.java +++ b/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/view/NsharpConfigDialog.java @@ -35,7 +35,7 @@ import org.eclipse.ui.PlatformUI; public class NsharpConfigDialog extends Dialog { - private Button parameterBtn, dataDisplayBtn,dataPageBtn, timeLineBtn, stnBtn, paneCfgBtn; + private Button parameterBtn, dataDisplayBtn,dataPageBtn, timeLineBtn, stnBtn, paneCfgBtn, mdlCfgBtn; private static NsharpConfigDialog thisDialog=null; private static NsharpParametersSelectionConfigDialog parameterSelDialog = null; private static NsharpDataDisplayConfigDialog dataDislpayDialog = null; @@ -43,6 +43,7 @@ public class NsharpConfigDialog extends Dialog { private static NsharpTimeLineConfigDialog timelineDialog = null; private static NsharpStnConfigDialog stnDialog = null; private static NsharpPaneConfigDialog paneCfgDialog = null; + private static NsharpGribModelTypeConfigDialog mdlCfgDialog = null; public NsharpConfigDialog(Shell parentShell) { super(parentShell); // TODO Auto-generated constructor stub @@ -77,12 +78,14 @@ public class NsharpConfigDialog extends Dialog { stnBtn.setEnabled( false ); dataPageBtn.setEnabled( false ); paneCfgBtn.setEnabled( false ); + mdlCfgBtn.setEnabled( false ); parameterSelDialog.open(); dataDisplayBtn.setEnabled(true); timeLineBtn.setEnabled( true ); stnBtn.setEnabled( true ); dataPageBtn.setEnabled( true ); paneCfgBtn.setEnabled( true ); + mdlCfgBtn.setEnabled( true ); } } } ); @@ -100,12 +103,14 @@ public class NsharpConfigDialog extends Dialog { stnBtn.setEnabled( false ); dataPageBtn.setEnabled( false ); paneCfgBtn.setEnabled( false ); + mdlCfgBtn.setEnabled( false ); dataDislpayDialog.open(); parameterBtn.setEnabled(true); timeLineBtn.setEnabled( true ); stnBtn.setEnabled( true ); dataPageBtn.setEnabled( true ); paneCfgBtn.setEnabled( true ); + mdlCfgBtn.setEnabled( true ); } } } ); @@ -123,12 +128,14 @@ public class NsharpConfigDialog extends Dialog { stnBtn.setEnabled( false ); dataDisplayBtn.setEnabled(false); paneCfgBtn.setEnabled( false ); + mdlCfgBtn.setEnabled( false ); dataPageDialog.open(); parameterBtn.setEnabled(true); timeLineBtn.setEnabled( true ); stnBtn.setEnabled( true ); dataDisplayBtn.setEnabled(true); paneCfgBtn.setEnabled( true ); + mdlCfgBtn.setEnabled( true ); } } } ); @@ -146,12 +153,14 @@ public class NsharpConfigDialog extends Dialog { stnBtn.setEnabled( false ); dataPageBtn.setEnabled( false ); paneCfgBtn.setEnabled( false ); + mdlCfgBtn.setEnabled( false ); timelineDialog.open(); parameterBtn.setEnabled(true); dataDisplayBtn.setEnabled(true); stnBtn.setEnabled( true ); dataPageBtn.setEnabled( true ); paneCfgBtn.setEnabled( true ); + mdlCfgBtn.setEnabled( true ); } } } ); @@ -169,12 +178,14 @@ public class NsharpConfigDialog extends Dialog { timeLineBtn.setEnabled( false ); dataPageBtn.setEnabled( false ); paneCfgBtn.setEnabled( false ); + mdlCfgBtn.setEnabled( false ); stnDialog.open(); parameterBtn.setEnabled(true); dataDisplayBtn.setEnabled(true); timeLineBtn.setEnabled( true ); dataPageBtn.setEnabled( true ); paneCfgBtn.setEnabled( true ); + mdlCfgBtn.setEnabled( true ); } } } ); @@ -193,13 +204,40 @@ public class NsharpConfigDialog extends Dialog { timeLineBtn.setEnabled( false ); dataPageBtn.setEnabled( false ); stnBtn.setEnabled( false ); + mdlCfgBtn.setEnabled( false ); paneCfgDialog.open(); parameterBtn.setEnabled(true); dataDisplayBtn.setEnabled(true); timeLineBtn.setEnabled( true ); dataPageBtn.setEnabled( true ); stnBtn.setEnabled( true ); + mdlCfgBtn.setEnabled( true ); + } + } + } ); + mdlCfgBtn = new Button(parent, SWT.PUSH); + mdlCfgBtn.setText("Grid Model Type Configuration"); + mdlCfgBtn.setEnabled( true ); + //lineBtn.setSize(btnWidth,pushbtnHeight); + mdlCfgBtn.addListener( SWT.MouseUp, new Listener() { + public void handleEvent(Event event) { + Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(); + mdlCfgDialog = NsharpGribModelTypeConfigDialog.getInstance(shell); + if ( mdlCfgDialog != null ) { + dataDisplayBtn.setEnabled(false); + parameterBtn.setEnabled(false); + timeLineBtn.setEnabled( false ); + dataPageBtn.setEnabled( false ); + stnBtn.setEnabled( false ); + paneCfgBtn.setEnabled( false ); + mdlCfgDialog.open(); + parameterBtn.setEnabled(true); + dataDisplayBtn.setEnabled(true); + timeLineBtn.setEnabled( true ); + dataPageBtn.setEnabled( true ); + stnBtn.setEnabled( true ); + paneCfgBtn.setEnabled(true); } } } ); @@ -238,7 +276,7 @@ public class NsharpConfigDialog extends Dialog { protected void configureShell( Shell shell ) { super.configureShell( shell ); shell.setText( "Nsharp Configuration" ); - shell.setSize(250, 300); + shell.setSize(250, 350); } @Override public int open( ) { diff --git a/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/view/NsharpGribModelTypeConfigDialog.java b/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/view/NsharpGribModelTypeConfigDialog.java index df360ed11d..d0a582a81d 100644 --- a/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/view/NsharpGribModelTypeConfigDialog.java +++ b/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/view/NsharpGribModelTypeConfigDialog.java @@ -98,16 +98,16 @@ public class NsharpGribModelTypeConfigDialog extends Dialog { } private List createAvailableModelTypeList(boolean returnNeeded){ HashMap rcMap = new HashMap(); - rcMap.put( "pluginName", new RequestConstraint("grid") ); + rcMap.put( "pluginName", new RequestConstraint("ncgrib") ); ArrayList queryRsltsList = NsharpGridInventory.getInstance().searchInventory( - rcMap, "info.datasetId" ); + rcMap, "modelInfo.modelName" ); List modelTypeList = new ArrayList(); if( queryRsltsList != null && !queryRsltsList.isEmpty() ) { for(String queryRslt : queryRsltsList ) { System.out.println("model name:"+queryRslt ); - String modelName = queryRslt.substring( "grid/".length() ); + String modelName = queryRslt.substring( "ncgrib/".length() ); if(returnNeeded) modelTypeList.add(modelName); else diff --git a/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/view/NsharpPaletteWindow.java b/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/view/NsharpPaletteWindow.java index 4fe59c8133..798d98be86 100644 --- a/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/view/NsharpPaletteWindow.java +++ b/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/view/NsharpPaletteWindow.java @@ -23,6 +23,7 @@ import gov.noaa.nws.ncep.ui.nsharp.NsharpConfigManager; import gov.noaa.nws.ncep.ui.nsharp.NsharpConfigStore; import gov.noaa.nws.ncep.ui.nsharp.NsharpConstants; import gov.noaa.nws.ncep.ui.nsharp.NsharpGraphProperty; +import gov.noaa.nws.ncep.ui.nsharp.NsharpGridInventory; import gov.noaa.nws.ncep.ui.nsharp.display.NsharpEditor; import gov.noaa.nws.ncep.ui.nsharp.display.map.NsharpMapResource; import gov.noaa.nws.ncep.ui.nsharp.display.rsc.NsharpResourceHandler; @@ -59,1322 +60,1252 @@ import org.eclipse.ui.part.ViewPart; import com.raytheon.uf.viz.core.drawables.IRenderableDisplay; import com.raytheon.uf.viz.core.drawables.ResourcePair; +import com.raytheon.uf.viz.core.exception.VizException; import com.raytheon.uf.viz.d2d.ui.perspectives.D2D5Pane; import com.raytheon.viz.ui.UiUtil; import com.raytheon.viz.ui.perspectives.VizPerspectiveListener; + public class NsharpPaletteWindow extends ViewPart implements SelectionListener, - DisposeListener, IPartListener { - private MessageBox mb; - - protected Button loadBtn, unloadBtn, overlayBtn, interpBtn, dataEditBtn, - compareStnBtn, compareTmBtn, graphEditBtn, graphModeBtnSkew, - graphModeBtnIcing, graphModeBtnTurb, effBulkShearBtn, stpBtn, - shipBtn, winterBtn, fireBtn, hailBtn, sarsBtn; - - private Shell shell; - - private Label spcGplbl; - - private Composite parent; - - private Group spcGp; - - private boolean overlayIsOn = false, compareStnIsOn = false, - compareTmIsOn = false; - - protected boolean interpolateIsOn = false, editGraphOn = false; - - private static String INTP_OFF = " Interp(off) "; - - private static String INTP_ON = " Interp(on) "; - - private static String COMP_STN_OFF = "CompStn(off)"; - - private static String COMP_STN_ON = "CompStn(on) "; - - private static String COMP_TM_OFF = "CompTm(off)"; - - private static String COMP_TM_ON = "CompTm(on) "; - - private static String OVLY_OFF = "Ovrlay2(off) "; - - private static String OVLY_ON = "Ovrlay2(on) "; - - protected static String EDIT_GRAPH_OFF = "EditGraph(off)"; - - protected static String EDIT_GRAPH_ON = "EditGraph(on) "; - - private IWorkbenchPage page; - - private NsharpPrintHandle printHandle; - - private Font newFont; - - private boolean isEditorVisible = true; - - private static NsharpPaletteWindow instance = null; - - // one instance per perspective. To avoid cross reference. - private static NsharpPaletteWindow ncpInstance = null; - - private static NsharpPaletteWindow d2dInstance = null; - - private int currentGraphMode = NsharpConstants.GRAPH_SKEWT; - - private String paneConfigurationName; - - private static NsharpConstants.SPCGraph leftGraph = NsharpConstants.SPCGraph.EBS; - - private static NsharpConstants.SPCGraph rightGraph = NsharpConstants.SPCGraph.STP; - - private boolean spcGpCreated = false; - - public static NsharpPaletteWindow getInstance() { - if (VizPerspectiveListener.getCurrentPerspectiveManager() != null) { - if (VizPerspectiveListener.getCurrentPerspectiveManager() - .getPerspectiveId().equals(D2D5Pane.ID_PERSPECTIVE)) - return d2dInstance; - else if (VizPerspectiveListener.getCurrentPerspectiveManager() - .getPerspectiveId() - .equals(NmapCommon.NatlCntrsPerspectiveID)) - return ncpInstance; - } - return instance; - } - - public int getCurrentGraphMode() { - return currentGraphMode; - } - - public void restorePaletteWindow(String paneConfigurationName, - int currentGraphMode, boolean interpolateIsOn, boolean overlayIsOn, - boolean compareStnIsOn, boolean compareTmIsOn, boolean editGraphOn) { - // System.out.println("restorePaletteWindow "+ this.toString()); - updateSpcGraphBtn(paneConfigurationName); - this.currentGraphMode = currentGraphMode; - this.interpolateIsOn = interpolateIsOn; - this.overlayIsOn = overlayIsOn; - this.compareStnIsOn = compareStnIsOn; - this.compareTmIsOn = compareTmIsOn; - this.editGraphOn = editGraphOn; - graphModeBtnSkew.setEnabled(true); - graphModeBtnIcing.setEnabled(true); - graphModeBtnTurb.setEnabled(true); - if (currentGraphMode == NsharpConstants.GRAPH_SKEWT) { - graphModeBtnSkew.setBackground(colorBlue); - graphModeBtnTurb.setBackground(colorGrey); - graphModeBtnIcing.setBackground(colorGrey); - graphEditBtn.setEnabled(true); - dataEditBtn.setEnabled(true); - compareTmBtn.setEnabled(true); - compareStnBtn.setEnabled(true); - overlayBtn.setEnabled(true); - interpBtn.setEnabled(true); - overlayBtn.setText(OVLY_OFF); - interpBtn.setText(INTP_OFF); - graphEditBtn.setText(EDIT_GRAPH_OFF); - compareTmBtn.setText(COMP_TM_OFF); - compareStnBtn.setText(COMP_STN_OFF); - if (interpolateIsOn) { - graphEditBtn.setEnabled(false); - dataEditBtn.setEnabled(false); - compareTmBtn.setEnabled(false); - compareStnBtn.setEnabled(false); - overlayBtn.setEnabled(false); - interpBtn.setText(INTP_ON); - } else if (overlayIsOn) { - overlayBtn.setText(OVLY_ON); - graphEditBtn.setEnabled(false); - dataEditBtn.setEnabled(false); - compareTmBtn.setEnabled(false); - compareStnBtn.setEnabled(false); - interpBtn.setEnabled(false); - graphModeBtnIcing.setEnabled(false); - graphModeBtnTurb.setEnabled(false); - } else if (compareStnIsOn) { - compareStnBtn.setText(COMP_STN_ON); - graphEditBtn.setEnabled(false); - dataEditBtn.setEnabled(false); - compareTmBtn.setEnabled(false); - overlayBtn.setEnabled(false); - interpBtn.setEnabled(false); - graphModeBtnIcing.setEnabled(false); - graphModeBtnTurb.setEnabled(false); - } else if (compareTmIsOn) { - compareTmBtn.setText(COMP_TM_ON); - graphEditBtn.setEnabled(false); - dataEditBtn.setEnabled(false); - compareStnBtn.setEnabled(false); - overlayBtn.setEnabled(false); - interpBtn.setEnabled(false); - graphModeBtnIcing.setEnabled(false); - graphModeBtnTurb.setEnabled(false); - } else if (editGraphOn) { - graphEditBtn.setText(EDIT_GRAPH_ON); - dataEditBtn.setEnabled(false); - compareStnBtn.setEnabled(false); - compareTmBtn.setEnabled(false); - overlayBtn.setEnabled(false); - interpBtn.setEnabled(false); - graphModeBtnIcing.setEnabled(false); - graphModeBtnTurb.setEnabled(false); - } - - } else if (currentGraphMode == NsharpConstants.GRAPH_TURB) { - graphModeBtnTurb.setBackground(colorBlue); - graphModeBtnSkew.setBackground(colorGrey); - graphModeBtnIcing.setBackground(colorGrey); - graphEditBtn.setEnabled(false); - dataEditBtn.setEnabled(false); - compareTmBtn.setEnabled(false); - compareStnBtn.setEnabled(false); - overlayBtn.setEnabled(false); - if (interpolateIsOn) - interpBtn.setText(INTP_ON); - else - interpBtn.setText(INTP_OFF); - - } else if (currentGraphMode == NsharpConstants.GRAPH_ICING) { - graphModeBtnIcing.setBackground(colorBlue); - graphModeBtnSkew.setBackground(colorGrey); - graphModeBtnTurb.setBackground(colorGrey); - graphEditBtn.setEnabled(false); - dataEditBtn.setEnabled(false); - compareTmBtn.setEnabled(false); - compareStnBtn.setEnabled(false); - overlayBtn.setEnabled(false); - if (interpolateIsOn) - interpBtn.setText(INTP_ON); - else - interpBtn.setText(INTP_OFF); - } - } - - public static NsharpConstants.SPCGraph getLeftGraph() { - return leftGraph; - } - - public static NsharpConstants.SPCGraph getRightGraph() { - return rightGraph; - } - - private Color colorGrey = new Color(Display.getDefault(), 211, 211, 211); - - private Color colorBlue = new Color(Display.getDefault(), 135, 206, 235); - - // private Color colorButtonOriginalBg; // will be initialized later - private void updateSPCGraphs() { - if (leftGraph == NsharpConstants.SPCGraph.EBS - || rightGraph == NsharpConstants.SPCGraph.EBS) { - effBulkShearBtn.setBackground(colorBlue); - } else { - effBulkShearBtn.setBackground(colorGrey); - } - if (leftGraph == NsharpConstants.SPCGraph.STP - || rightGraph == NsharpConstants.SPCGraph.STP) { - stpBtn.setBackground(colorBlue); - } else { - stpBtn.setBackground(colorGrey); - } - if (leftGraph == NsharpConstants.SPCGraph.SHIP - || rightGraph == NsharpConstants.SPCGraph.SHIP) { - shipBtn.setBackground(colorBlue); - } else { - shipBtn.setBackground(colorGrey); - } - if (leftGraph == NsharpConstants.SPCGraph.WINTER - || rightGraph == NsharpConstants.SPCGraph.WINTER) { - winterBtn.setBackground(colorBlue); - } else { - winterBtn.setBackground(colorGrey); - } - if (leftGraph == NsharpConstants.SPCGraph.FIRE - || rightGraph == NsharpConstants.SPCGraph.FIRE) { - fireBtn.setBackground(colorBlue); - } else { - fireBtn.setBackground(colorGrey); - } - if (leftGraph == NsharpConstants.SPCGraph.HAIL - || rightGraph == NsharpConstants.SPCGraph.HAIL) { - hailBtn.setBackground(colorBlue); - } else { - hailBtn.setBackground(colorGrey); - } - if (leftGraph == NsharpConstants.SPCGraph.SARS - || rightGraph == NsharpConstants.SPCGraph.SARS) { - sarsBtn.setBackground(colorBlue); - } else { - sarsBtn.setBackground(colorGrey); - } - NsharpResourceHandler rsc = getRscHandler(); - if (rsc != null && rsc.getSpcGraphsPaneRsc() != null) { - rsc.getSpcGraphsPaneRsc().setGraphs(leftGraph, rightGraph); - } - - } - - public void setAndOpenMb(String msg) { - if (mb != null) { - mb.setMessage(msg); - try { - mb.open(); - } catch (Exception e) { - - // e.printStackTrace(); - } - } - } - - public NsharpPaletteWindow() { - super(); - instance = this; - if (VizPerspectiveListener.getCurrentPerspectiveManager() != null) { - if (VizPerspectiveListener.getCurrentPerspectiveManager() - .getPerspectiveId().equals(D2D5Pane.ID_PERSPECTIVE)) - d2dInstance = this; - else if (VizPerspectiveListener.getCurrentPerspectiveManager() - .getPerspectiveId() - .equals(NmapCommon.NatlCntrsPerspectiveID)) - ncpInstance = this; - } - // System.out.println("view NsharpPaletteWindow constructed!! "+ - // this.toString()); - printHandle = NsharpPrintHandle.getPrintHandle(); - shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(); - - mb = new MessageBox(shell, SWT.ICON_WARNING | SWT.OK); - mb.setMessage("Data is not loaded yet!"); - NsharpConfigManager configMgr = NsharpConfigManager.getInstance(); - NsharpConfigStore configStore = configMgr - .retrieveNsharpConfigStoreFromFs(); - NsharpGraphProperty graphConfigProperty = configStore - .getGraphProperty(); - paneConfigurationName = graphConfigProperty.getPaneConfigurationName(); - - } - - /** - * Invoked by the workbench to initialize this View. - */ - public void init(IViewSite site) { - // System.out.println("NsharpPaletteWindow inited!!"+ this.toString()); - try { - - super.init(site); - - } catch (PartInitException pie) { - - pie.printStackTrace(); - - } - - page = site.getPage(); - page.addPartListener(this); - - NsharpMapResource.registerMouseHandler(); - // Chin : to fix Ticket#11034:::: - // get several control information back from SkewT resource, in the case - // that - // NsharpPaletteWindow view was disposed and re-constructed while SkewT - // resource is still alive. - // This case applied to D2D implementation. - NsharpResourceHandler rsc = getRscHandler(); - if (rsc != null) { - interpolateIsOn = rsc.isInterpolateIsOn(); - overlayIsOn = rsc.isOverlayIsOn(); - compareStnIsOn = rsc.isCompareStnIsOn(); - editGraphOn = rsc.isEditGraphOn(); - } - - } - - /** - * Disposes resource. invoked by the workbench - */ - public void dispose() { - // System.out.println("NsharpPaletteWindow "+this.toString()+" dispose() called!! isEditorVisible="+ - // isEditorVisible); - if (!isEditorVisible) { - NsharpMapResource.unregisterMouseHandler(); - instance = null; - d2dInstance = null; - ncpInstance = null; - return; - } else { - super.dispose(); - currentGraphMode = NsharpConstants.GRAPH_SKEWT; - isEditorVisible = false; - NCMapEditor editor = NsharpMapResource.getMapEditor(); - if (editor != null) { - for (IRenderableDisplay display : UiUtil - .getDisplaysFromContainer(editor)) { - // System.out.println("display " + display.toString()); - for (ResourcePair rp : display.getDescriptor() - .getResourceList()) { - if (rp.getResource() instanceof NsharpMapResource) { - NsharpMapResource rsc = (NsharpMapResource) rp - .getResource(); - rsc.unload(); - display.getDescriptor().getResourceList() - .removePreRemoveListener(rsc); - - } - } - } - } - if (newFont != null) { - newFont.dispose(); - newFont = null; - } /* - * remove the workbench part listener - */ - page.removePartListener(this); - - try { - if (NsharpLoadDialog.getAccess() != null) { - NsharpLoadDialog.getAccess().close(); - } - } catch (Exception e) { - - } - instance = null; - d2dInstance = null; - ncpInstance = null; - } - } - - protected boolean checkLoadedData() { - NsharpEditor editor = NsharpEditor.getActiveNsharpEditor(); - if (editor == null) { - mb.open(); - return false; - } - NsharpResourceHandler rsc = editor.getRscHandler(); - if (rsc == null) { - mb.open(); - return false; - } - return true; - } - - protected NsharpResourceHandler getRscHandler() { - NsharpEditor editor = NsharpEditor.getActiveNsharpEditor(); - if (editor == null) { - - return null; - } - NsharpResourceHandler rsc = editor.getRscHandler(); - if (rsc == null) - return null; - - return rsc; - } - - public void createDataControlGp(Composite parent) { - this.parent = parent; - Group textModeGp = new Group(parent, SWT.SHADOW_OUT); - textModeGp.setLayout(new RowLayout(SWT.HORIZONTAL)); - textModeGp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); - Font font = textModeGp.getFont(); - FontData[] fontData = font.getFontData(); - for (int i = 0; i < fontData.length; i++) { - fontData[i].setHeight(7); - // fontData[i].setName("courier"); - } - newFont = new Font(font.getDevice(), fontData); - - loadBtn = new Button(textModeGp, SWT.PUSH); - loadBtn.setFont(newFont); - loadBtn.setText(" Load "); - loadBtn.setEnabled(true); - // loadBtn.setSize(btnWidth,pushbtnHeight); - loadBtn.addListener(SWT.MouseUp, new Listener() { - public void handleEvent(Event event) { - Shell shell = PlatformUI.getWorkbench() - .getActiveWorkbenchWindow().getShell(); - - NsharpLoadDialog loadDia = NsharpLoadDialog.getInstance(shell); - - if (loadDia != null) { - // System.out.println("Load Button is calling dialog open()"); - loadDia.open(); - } - } - }); - - unloadBtn = new Button(textModeGp, SWT.PUSH); - unloadBtn.setFont(newFont); - unloadBtn.setText(" UnLoad "); - unloadBtn.setEnabled(true); - // loadBtn.setSize(btnWidth,pushbtnHeight); - unloadBtn.addListener(SWT.MouseUp, new Listener() { - public void handleEvent(Event event) { - if (checkLoadedData()) { - Shell shell = PlatformUI.getWorkbench() - .getActiveWorkbenchWindow().getShell(); - - NsharpUnloadDialog unloadDia = NsharpUnloadDialog - .getInstance(shell); - - if (unloadDia != null) { - // System.out.println("Load Button is calling dialog open()"); - unloadDia.open(); - - } - } - } - }); - // Push buttons for SAVE - Button saveBtn = new Button(textModeGp, SWT.PUSH); - saveBtn.setFont(newFont); - saveBtn.setText(" Save "); - saveBtn.setEnabled(true); - // saveBtn.setSize(btnWidth,pushbtnHeight); - saveBtn.addListener(SWT.MouseUp, new Listener() { - public void handleEvent(Event event) { - - if (checkLoadedData()) { - // Action to save text report - NsharpSaveHandle.saveFile(shell); - } - } - - }); - - // Push buttons for CONFIGURE - Button cfgBtn = new Button(textModeGp, SWT.PUSH); - cfgBtn.setFont(newFont); - cfgBtn.setText(" Configure "); - cfgBtn.setEnabled(true); - // cfgBtn.setSize(btnWidth,pushbtnHeight); - cfgBtn.addListener(SWT.MouseUp, new Listener() { - public void handleEvent(Event event) { - Shell shell = PlatformUI.getWorkbench() - .getActiveWorkbenchWindow().getShell(); - // CHin, new develop if(checkLoadedData()) { - // NsharpParametersSelectionConfigDialog dia = - // NsharpParametersSelectionConfigDialog.getInstance(shell); - NsharpConfigDialog dia = NsharpConfigDialog.getInstance(shell); - if (dia != null) { - dia.open(); - } - // } - - } - }); - - Button resetBtn = new Button(textModeGp, SWT.PUSH); - resetBtn.setFont(newFont); - resetBtn.setText(" Reset "); - resetBtn.setEnabled(true); - resetBtn.addListener(SWT.MouseUp, new Listener() { - public void handleEvent(Event event) { - // RESET should turn off everything... - shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow() - .getShell(); - - overlayIsOn = false; - overlayBtn.setText(OVLY_OFF); - overlayBtn.setEnabled(true); - compareStnIsOn = false; - compareStnBtn.setText(COMP_STN_OFF); - compareStnBtn.setEnabled(true); - compareTmIsOn = false; - compareTmBtn.setText(COMP_TM_OFF); - compareTmBtn.setEnabled(true); - interpolateIsOn = false; - interpBtn.setText(INTP_OFF); - interpBtn.setEnabled(true); - editGraphOn = false; - graphEditBtn.setEnabled(true); - dataEditBtn.setEnabled(true); - graphModeBtnIcing.setEnabled(true); - graphModeBtnTurb.setEnabled(true); - graphEditBtn.setText(EDIT_GRAPH_OFF); - currentGraphMode = NsharpConstants.GRAPH_SKEWT; - NsharpEditor editor = NsharpEditor.getActiveNsharpEditor(); - if (editor != null) { - // note: resetRsc will reset currentPage, overlay, compare, - // interpolate flag in Resource - editor.getRscHandler().resetRsc(); - // editor.getNsharpSkewTDescriptor().getSkewtResource().resetRsc();// - // need to called it twice to make refresh worked...dont - // know why - // know that current editor is NsharpSkewT editor, refresh - // it. - editor.refresh(); - NsharpShowTextDialog textarea = NsharpShowTextDialog - .getAccess(); - if (textarea != null) { - textarea.refreshTextData(); - } - } - if (NsharpParcelDialog.getAccess() != null) { - NsharpParcelDialog.getAccess().resetUserDefParcel(); - } - } - }); - Button resetGfBtn = new Button(textModeGp, SWT.PUSH); - resetGfBtn.setFont(newFont); - resetGfBtn.setText("Reset Display"); - resetGfBtn.setEnabled(true); - resetGfBtn.addListener(SWT.MouseUp, new Listener() { - public void handleEvent(Event event) { - NsharpEditor editor = NsharpEditor.getActiveNsharpEditor(); - editor.resetGraph(); - } - }); - - Button parcelBtn = new Button(textModeGp, SWT.PUSH); - parcelBtn.setFont(newFont); - parcelBtn.setText(" Parcel "); - parcelBtn.setEnabled(true); - // parcelBtn.setSize(btnWidth,pushbtnHeight); - parcelBtn.addListener(SWT.MouseUp, new Listener() { - public void handleEvent(Event event) { - Shell shell = PlatformUI.getWorkbench() - .getActiveWorkbenchWindow().getShell(); - if (checkLoadedData()) { - NsharpParcelDialog parcelDia = NsharpParcelDialog - .getInstance(shell); - - if (parcelDia != null) { - // System.out.println("calling parcel dialog open()"); - parcelDia.open(); - - } - } - } - }); - - // Push buttons for NEXT PAGE info - Button nextpageBtn = new Button(textModeGp, SWT.PUSH); - nextpageBtn.setFont(newFont); - nextpageBtn.setText(" Next Data "); - nextpageBtn.setEnabled(true); - nextpageBtn.addListener(SWT.MouseUp, new Listener() { - public void handleEvent(Event event) { - shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow() - .getShell(); - if (checkLoadedData()) { - NsharpResourceHandler rsc = getRscHandler(); - if (rsc != null) { - rsc.setNextTextChapter(); - rsc.refreshPane(); - } - } - } - }); - - // Push buttons for NEXT INSET PAGE info - Button nextInsetBtn = new Button(textModeGp, SWT.PUSH); - nextInsetBtn.setFont(newFont); - nextInsetBtn.setText(" Next Inset "); - nextInsetBtn.setEnabled(true); - nextInsetBtn.addListener(SWT.MouseUp, new Listener() { - public void handleEvent(Event event) { - shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow() - .getShell(); - if (checkLoadedData()) { - NsharpResourceHandler rsc = getRscHandler(); - if (rsc != null) { - rsc.setNextInsetPage(); - rsc.refreshPane(); - } - } - } - }); - - // Push buttons for interpolate - interpBtn = new Button(textModeGp, SWT.PUSH); - interpBtn.setFont(newFont); - interpBtn.setEnabled(true); - if (interpolateIsOn) { - interpBtn.setText(INTP_ON); - } else { - interpBtn.setText(INTP_OFF); - } - interpBtn.addListener(SWT.MouseUp, new Listener() { - public void handleEvent(Event event) { - shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow() - .getShell(); - if (checkLoadedData()) { - if (interpolateIsOn == false) { - interpolateIsOn = true; - interpBtn.setText(INTP_ON); - graphEditBtn.setEnabled(false); - dataEditBtn.setEnabled(false); - compareTmBtn.setEnabled(false); - compareStnBtn.setEnabled(false); - overlayBtn.setEnabled(false); - } else { - interpolateIsOn = false; - interpBtn.setText(INTP_OFF); - if (currentGraphMode == NsharpConstants.GRAPH_SKEWT) { - graphEditBtn.setEnabled(true); - dataEditBtn.setEnabled(true); - compareTmBtn.setEnabled(true); - compareStnBtn.setEnabled(true); - overlayBtn.setEnabled(true); - } - } - // note:call resetInfoOnInterpolate() and pass interpolate - // flag to Resource - NsharpEditor editor = NsharpEditor.getActiveNsharpEditor(); - if (editor != null) { - try { - editor.getRscHandler().resetInfoOnInterpolate( - interpolateIsOn); - } catch (CloneNotSupportedException e) { - e.printStackTrace(); - } - // know that current editor is NsharpSkewT editor, - // refresh it. - editor.refresh(); - - NsharpShowTextDialog textarea = NsharpShowTextDialog - .getAccess(); - if (textarea != null) { - textarea.refreshTextData(); - } - } - } - } - }); - - NsharpResourceHandler rscHandler = getRscHandler(); - - // Push buttons for OVERLAY info - overlayBtn = new Button(textModeGp, SWT.PUSH); - overlayBtn.setFont(newFont); - if (overlayIsOn) { - overlayBtn.setText(OVLY_ON); - overlayBtn.setEnabled(true); - } else { - overlayBtn.setText(OVLY_OFF); - // comparison and overlay is mutual exclusive - if ((rscHandler != null) - && (rscHandler.isCompareStnIsOn() || rscHandler - .isCompareTmIsOn())) - overlayBtn.setEnabled(false); - else - overlayBtn.setEnabled(true); - } - overlayBtn.addListener(SWT.MouseUp, new Listener() { - public void handleEvent(Event event) { - shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow() - .getShell(); - if (overlayIsOn == false) { - - overlayIsOn = true; - overlayBtn.setText(OVLY_ON); - compareStnBtn.setEnabled(false); - compareTmBtn.setEnabled(false); - graphEditBtn.setEnabled(false); - dataEditBtn.setEnabled(false); - graphModeBtnTurb.setEnabled(false); - graphModeBtnIcing.setEnabled(false); - interpBtn.setEnabled(false); - } else { - overlayIsOn = false; - overlayBtn.setText(OVLY_OFF); - compareStnBtn.setEnabled(true); - compareTmBtn.setEnabled(true); - graphEditBtn.setEnabled(true); - dataEditBtn.setEnabled(true); - graphModeBtnTurb.setEnabled(true); - graphModeBtnIcing.setEnabled(true); - interpBtn.setEnabled(true); - } - NsharpResourceHandler rsc = getRscHandler(); - if (rsc != null) { - rsc.setOverlayIsOn(overlayIsOn); - rsc.refreshPane(); - } - } - }); - // Push buttons for CompByStn info - compareStnBtn = new Button(textModeGp, SWT.PUSH); - compareStnBtn.setFont(newFont); - if (compareStnIsOn) { - compareStnBtn.setText(COMP_STN_ON); - compareStnBtn.setEnabled(true); - } else { - // comparison and overlay is mutual exclusive - compareStnBtn.setText(COMP_STN_OFF); - if ((rscHandler != null) - && (rscHandler.isOverlayIsOn() || rscHandler - .isCompareTmIsOn())) - compareStnBtn.setEnabled(false); - else - compareStnBtn.setEnabled(true); - } - compareStnBtn.addListener(SWT.MouseUp, new Listener() { - public void handleEvent(Event event) { - shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow() - .getShell(); - if (compareStnIsOn == false) { - - compareStnIsOn = true; - compareStnBtn.setText(COMP_STN_ON); - overlayBtn.setEnabled(false); - compareTmBtn.setEnabled(false); - graphEditBtn.setEnabled(false); - dataEditBtn.setEnabled(false); - graphModeBtnTurb.setEnabled(false); - graphModeBtnIcing.setEnabled(false); - interpBtn.setEnabled(false); - } else { - compareStnIsOn = false; - compareStnBtn.setText(COMP_STN_OFF); - overlayBtn.setEnabled(true); - compareTmBtn.setEnabled(true); - graphEditBtn.setEnabled(true); - dataEditBtn.setEnabled(true); - graphModeBtnTurb.setEnabled(true); - graphModeBtnIcing.setEnabled(true); - interpBtn.setEnabled(true); - } - NsharpResourceHandler rsc = getRscHandler(); - if (rsc != null) { - rsc.setCompareStnIsOn(compareStnIsOn); - rsc.refreshPane(); - } - - } - }); - // Push buttons for CompByTm info - compareTmBtn = new Button(textModeGp, SWT.PUSH); - compareTmBtn.setFont(newFont); - if (compareTmIsOn) { - compareTmBtn.setText(COMP_TM_ON); - compareTmBtn.setEnabled(true); - } else { - // comparison and overlay is mutual exclusive - compareTmBtn.setText(COMP_TM_OFF); - if ((rscHandler != null) - && (rscHandler.isOverlayIsOn() || rscHandler - .isCompareStnIsOn())) - compareTmBtn.setEnabled(false); - else - compareTmBtn.setEnabled(true); - } - compareTmBtn.addListener(SWT.MouseUp, new Listener() { - public void handleEvent(Event event) { - shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow() - .getShell(); - if (compareTmIsOn == false) { - - compareTmIsOn = true; - compareTmBtn.setText(COMP_TM_ON); - overlayBtn.setEnabled(false); - compareStnBtn.setEnabled(false); - graphEditBtn.setEnabled(false); - dataEditBtn.setEnabled(false); - graphModeBtnTurb.setEnabled(false); - graphModeBtnIcing.setEnabled(false); - interpBtn.setEnabled(false); - } else { - compareTmIsOn = false; - compareTmBtn.setText(COMP_TM_OFF); - overlayBtn.setEnabled(true); - compareStnBtn.setEnabled(true); - graphEditBtn.setEnabled(true); - dataEditBtn.setEnabled(true); - graphModeBtnTurb.setEnabled(true); - graphModeBtnIcing.setEnabled(true); - interpBtn.setEnabled(true); - } - NsharpResourceHandler rsc = getRscHandler(); - if (rsc != null) { - rsc.setCompareTmIsOn(compareTmIsOn); - rsc.refreshPane(); - } - - } - }); - dataEditBtn = new Button(textModeGp, SWT.PUSH); - dataEditBtn.setFont(newFont); - dataEditBtn.setText(" Edit Data "); - if (interpolateIsOn || editGraphOn) - dataEditBtn.setEnabled(false); - else - dataEditBtn.setEnabled(true); - dataEditBtn.addListener(SWT.MouseUp, new Listener() { - public void handleEvent(Event event) { - if (checkLoadedData()) { - Shell shell = PlatformUI.getWorkbench() - .getActiveWorkbenchWindow().getShell(); - NsharpEditDataDialog editDia = NsharpEditDataDialog - .getInstance(shell); - if (editDia != null) { - editDia.open(); - } - } - } - }); - - graphEditBtn = new Button(textModeGp, SWT.PUSH); - graphEditBtn.setFont(newFont); - graphEditBtn.setEnabled(true); - if (editGraphOn) { - graphEditBtn.setText(EDIT_GRAPH_ON); - dataEditBtn.setEnabled(false); - interpBtn.setEnabled(false); - } else { - graphEditBtn.setText(EDIT_GRAPH_OFF); - dataEditBtn.setEnabled(true); - interpBtn.setEnabled(true); - } - graphEditBtn.addListener(SWT.MouseUp, new Listener() { - public void handleEvent(Event event) { - if (checkLoadedData()) { - if (editGraphOn) { - editGraphOn = false; - graphEditBtn.setText(EDIT_GRAPH_OFF); - graphModeBtnIcing.setEnabled(true); - graphModeBtnTurb.setEnabled(true); - dataEditBtn.setEnabled(true); - interpBtn.setEnabled(true); - compareTmBtn.setEnabled(true); - compareStnBtn.setEnabled(true); - overlayBtn.setEnabled(true); - } else { - editGraphOn = true; - graphEditBtn.setText(EDIT_GRAPH_ON); - graphModeBtnIcing.setEnabled(false); - graphModeBtnTurb.setEnabled(false); - dataEditBtn.setEnabled(false); - interpBtn.setEnabled(false); - compareTmBtn.setEnabled(false); - compareStnBtn.setEnabled(false); - overlayBtn.setEnabled(false); - } - NsharpResourceHandler rsc = getRscHandler(); - if (rsc != null) { - rsc.setEditGraphOn(editGraphOn); - rsc.refreshPane(); - } - } - } - }); - /* - * Button bndryMotionBtn = new Button(textModeGp, SWT.PUSH); - * bndryMotionBtn.setText("BoundaryMotion"); bndryMotionBtn.setEnabled( - * true ); bndryMotionBtn.addListener( SWT.MouseUp, new Listener() { - * public void handleEvent(Event event) { shell = - * PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(); - * if(checkLoadedData()) { NsharpShowTextDialog osDia = - * NsharpShowTextDialog.getInstance( shell ); if(osDia != null) - * osDia.open(); } } } ); - */ - - // Push buttons for show text info - Button showtextBtn = new Button(textModeGp, SWT.PUSH); - showtextBtn.setFont(newFont); - showtextBtn.setText(" Show Text "); - showtextBtn.setEnabled(true); - showtextBtn.addListener(SWT.MouseUp, new Listener() { - public void handleEvent(Event event) { - shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow() - .getShell(); - if (checkLoadedData()) { - NsharpShowTextDialog osDia = NsharpShowTextDialog - .getInstance(shell); - if (osDia != null) - osDia.open(); - } - } - }); - Group graphModeGp = new Group(textModeGp, SWT.SHADOW_ETCHED_IN); - graphModeGp.setLayout(new RowLayout(SWT.HORIZONTAL));// new GridLayout( - // 2, false ) ); - - // Push buttons for graphMode - graphModeBtnSkew = new Button(graphModeGp, SWT.PUSH); - graphModeBtnSkew.setFont(newFont); - graphModeBtnSkew.setText("S"); - graphModeBtnSkew.setEnabled(true); - // colorButtonOriginalBg= graphModeBtnSkew.getBackground(); - rscHandler = getRscHandler(); - if (rscHandler != null) { - currentGraphMode = rscHandler.getCurrentGraphMode(); - } - graphModeBtnSkew.addListener(SWT.MouseUp, new Listener() { - public void handleEvent(Event event) { - if (currentGraphMode != NsharpConstants.GRAPH_SKEWT) { - currentGraphMode = NsharpConstants.GRAPH_SKEWT; - graphModeBtnSkew.setBackground(colorBlue); - graphModeBtnTurb.setBackground(colorGrey); - graphModeBtnIcing.setBackground(colorGrey); - if (!interpolateIsOn) { - graphEditBtn.setEnabled(true); - dataEditBtn.setEnabled(true); - compareTmBtn.setEnabled(true); - compareStnBtn.setEnabled(true); - overlayBtn.setEnabled(true); - } else { - graphEditBtn.setEnabled(false); - dataEditBtn.setEnabled(false); - compareTmBtn.setEnabled(false); - compareStnBtn.setEnabled(false); - overlayBtn.setEnabled(false); - } - NsharpResourceHandler rsc = getRscHandler(); - if (rsc != null) { - rsc.setCurrentGraphMode(currentGraphMode); - // rsc.getSkewtPaneRsc().handleResize(); - } - - } - } - }); - graphModeBtnTurb = new Button(graphModeGp, SWT.PUSH); - graphModeBtnTurb.setFont(newFont); - graphModeBtnTurb.setText("T"); - graphModeBtnTurb.setEnabled(true); - graphModeBtnTurb.addListener(SWT.MouseUp, new Listener() { - public void handleEvent(Event event) { - if (currentGraphMode != NsharpConstants.GRAPH_TURB) { - currentGraphMode = NsharpConstants.GRAPH_TURB; - graphModeBtnTurb.setBackground(colorBlue); - graphModeBtnSkew.setBackground(colorGrey); - graphModeBtnIcing.setBackground(colorGrey); - graphEditBtn.setEnabled(false); - dataEditBtn.setEnabled(false); - compareTmBtn.setEnabled(false); - compareStnBtn.setEnabled(false); - overlayBtn.setEnabled(false); - NsharpResourceHandler rsc = getRscHandler(); - if (rsc != null) { - rsc.setCurrentGraphMode(currentGraphMode); - rsc.getSkewtPaneRsc().handleResize(); - } - } - } - }); - graphModeBtnIcing = new Button(graphModeGp, SWT.PUSH); - graphModeBtnIcing.setFont(newFont); - graphModeBtnIcing.setText("I"); - graphModeBtnIcing.setEnabled(true); - graphModeBtnIcing.addListener(SWT.MouseUp, new Listener() { - public void handleEvent(Event event) { - if (currentGraphMode != NsharpConstants.GRAPH_ICING) { - currentGraphMode = NsharpConstants.GRAPH_ICING; - graphModeBtnIcing.setBackground(colorBlue); - graphModeBtnSkew.setBackground(colorGrey); - graphModeBtnTurb.setBackground(colorGrey); - graphEditBtn.setEnabled(false); - dataEditBtn.setEnabled(false); - compareTmBtn.setEnabled(false); - compareStnBtn.setEnabled(false); - overlayBtn.setEnabled(false); - NsharpResourceHandler rsc = getRscHandler(); - if (rsc != null) { - rsc.setCurrentGraphMode(currentGraphMode); - rsc.getSkewtPaneRsc().handleResize(); - } - } - } - }); - if (currentGraphMode == NsharpConstants.GRAPH_SKEWT) { - graphModeBtnSkew.setBackground(colorBlue); - graphModeBtnTurb.setBackground(colorGrey); - graphModeBtnIcing.setBackground(colorGrey); - } else if (currentGraphMode == NsharpConstants.GRAPH_TURB) { - graphModeBtnTurb.setBackground(colorBlue); - graphModeBtnSkew.setBackground(colorGrey); - graphModeBtnIcing.setBackground(colorGrey); - } else if (currentGraphMode == NsharpConstants.GRAPH_ICING) { - graphModeBtnIcing.setBackground(colorBlue); - graphModeBtnSkew.setBackground(colorGrey); - graphModeBtnTurb.setBackground(colorGrey); - } - - // Push buttons for Print - Button printBtn = new Button(textModeGp, SWT.PUSH); - printBtn.setFont(newFont); - printBtn.setText(" Print "); - printBtn.setEnabled(true); - printBtn.addListener(SWT.MouseUp, new Listener() { - public void handleEvent(Event event) { - shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow() - .getShell(); - // 12.7.1 testing if(checkLoadedData()) { - if (true) { - printHandle.handlePrint(""); - } - } - }); - - if (paneConfigurationName.equals(NsharpConstants.PANE_SPCWS_CFG_STR)) - createSPCGp(); - - if (rscHandler != null) { - restorePaletteWindow(paneConfigurationName, - rscHandler.getCurrentGraphMode(), - rscHandler.isInterpolateIsOn(), rscHandler.isOverlayIsOn(), - rscHandler.isCompareStnIsOn(), - rscHandler.isCompareTmIsOn(), rscHandler.isEditGraphOn()); - } - parent.redraw(); - } - - private void createSPCGp() { - // System.out.println("createSPCGp.........................................."); - spcGp = new Group(parent, SWT.SHADOW_OUT); - spcGp.setLayout(new RowLayout(SWT.HORIZONTAL)); - spcGp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); - spcGplbl = new Label(spcGp, SWT.NO); - spcGplbl.setText("SPC Graphs"); - if (paneConfigurationName.equals(NsharpConstants.PANE_SPCWS_CFG_STR)) { - spcGplbl.setEnabled(true); - } else { - spcGplbl.setEnabled(false); - } - effBulkShearBtn = new Button(spcGp, SWT.PUSH); - effBulkShearBtn.setFont(newFont); - effBulkShearBtn.setText("EBS Stats "); - if (paneConfigurationName.equals(NsharpConstants.PANE_SPCWS_CFG_STR)) { - effBulkShearBtn.setEnabled(true); - } else { - effBulkShearBtn.setEnabled(false); - } - effBulkShearBtn.addListener(SWT.MouseUp, new Listener() { - public void handleEvent(Event event) { - if (leftGraph != NsharpConstants.SPCGraph.EBS - && rightGraph != NsharpConstants.SPCGraph.EBS) { - rightGraph = leftGraph; - leftGraph = NsharpConstants.SPCGraph.EBS; - updateSPCGraphs(); - } - } - }); - - stpBtn = new Button(spcGp, SWT.PUSH); - stpBtn.setFont(newFont); - stpBtn.setText("STP Stats "); - if (paneConfigurationName.equals(NsharpConstants.PANE_SPCWS_CFG_STR)) { - stpBtn.setEnabled(true); - } else { - stpBtn.setEnabled(false); - } - stpBtn.addListener(SWT.MouseUp, new Listener() { - public void handleEvent(Event event) { - if (leftGraph != NsharpConstants.SPCGraph.STP - && rightGraph != NsharpConstants.SPCGraph.STP) { - rightGraph = leftGraph; - leftGraph = NsharpConstants.SPCGraph.STP; - updateSPCGraphs(); - } - } - }); - - shipBtn = new Button(spcGp, SWT.PUSH); - shipBtn.setFont(newFont); - shipBtn.setText("SHIP Stats"); - if (paneConfigurationName.equals(NsharpConstants.PANE_SPCWS_CFG_STR)) { - shipBtn.setEnabled(true); - } else { - shipBtn.setEnabled(false); - } - shipBtn.addListener(SWT.MouseUp, new Listener() { - public void handleEvent(Event event) { - if (leftGraph != NsharpConstants.SPCGraph.SHIP - && rightGraph != NsharpConstants.SPCGraph.SHIP) { - rightGraph = leftGraph; - leftGraph = NsharpConstants.SPCGraph.SHIP; - updateSPCGraphs(); - } - } - }); - winterBtn = new Button(spcGp, SWT.PUSH); - winterBtn.setFont(newFont); - winterBtn.setText(" WINTER "); - if (paneConfigurationName.equals(NsharpConstants.PANE_SPCWS_CFG_STR)) { - winterBtn.setEnabled(true); - } else { - winterBtn.setEnabled(false); - } - winterBtn.addListener(SWT.MouseUp, new Listener() { - public void handleEvent(Event event) { - if (leftGraph != NsharpConstants.SPCGraph.WINTER - && rightGraph != NsharpConstants.SPCGraph.WINTER) { - rightGraph = leftGraph; - leftGraph = NsharpConstants.SPCGraph.WINTER; - updateSPCGraphs(); - } - } - }); - fireBtn = new Button(spcGp, SWT.PUSH); - fireBtn.setFont(newFont); - fireBtn.setText(" FIRE "); - if (paneConfigurationName.equals(NsharpConstants.PANE_SPCWS_CFG_STR)) { - fireBtn.setEnabled(true); - } else { - fireBtn.setEnabled(false); - } - fireBtn.addListener(SWT.MouseUp, new Listener() { - public void handleEvent(Event event) { - if (leftGraph != NsharpConstants.SPCGraph.FIRE - && rightGraph != NsharpConstants.SPCGraph.FIRE) { - rightGraph = leftGraph; - leftGraph = NsharpConstants.SPCGraph.FIRE; - updateSPCGraphs(); - } - } - }); - hailBtn = new Button(spcGp, SWT.PUSH); - hailBtn.setFont(newFont); - hailBtn.setText(" HAIL "); - if (paneConfigurationName.equals(NsharpConstants.PANE_SPCWS_CFG_STR)) { - hailBtn.setEnabled(true); - } else { - hailBtn.setEnabled(false); - } - hailBtn.addListener(SWT.MouseUp, new Listener() { - public void handleEvent(Event event) { - if (leftGraph != NsharpConstants.SPCGraph.HAIL - && rightGraph != NsharpConstants.SPCGraph.HAIL) { - rightGraph = leftGraph; - leftGraph = NsharpConstants.SPCGraph.HAIL; - updateSPCGraphs(); - } - } - }); - sarsBtn = new Button(spcGp, SWT.PUSH); - sarsBtn.setFont(newFont); - sarsBtn.setText(" SARS "); - if (paneConfigurationName.equals(NsharpConstants.PANE_SPCWS_CFG_STR)) { - sarsBtn.setEnabled(true); - } else { - sarsBtn.setEnabled(false); - } - sarsBtn.addListener(SWT.MouseUp, new Listener() { - public void handleEvent(Event event) { - if (leftGraph != NsharpConstants.SPCGraph.SARS - && rightGraph != NsharpConstants.SPCGraph.SARS) { - rightGraph = leftGraph; - leftGraph = NsharpConstants.SPCGraph.SARS; - updateSPCGraphs(); - } - } - }); - updateSPCGraphs(); - spcGpCreated = true; - parent.layout(); - } - - private void disposeSpcGp() { - spcGplbl.dispose(); - effBulkShearBtn.dispose(); - stpBtn.dispose(); - shipBtn.dispose(); - winterBtn.dispose(); - fireBtn.dispose(); - hailBtn.dispose(); - sarsBtn.dispose(); - spcGp.dispose(); - - spcGplbl = null; - effBulkShearBtn = null; - stpBtn = null; - shipBtn = null; - winterBtn = null; - fireBtn = null; - hailBtn = null; - sarsBtn = null; - spcGp = null; - } - - public boolean isEditorVisible() { - return isEditorVisible; - } - - public void setEditorVisible(boolean isEditorVisible) { - this.isEditorVisible = isEditorVisible; - } - - public void updateSpcGraphBtn(String paneConfigurationName) { - this.paneConfigurationName = paneConfigurationName; - if (paneConfigurationName.equals(NsharpConstants.PANE_SPCWS_CFG_STR)) { - if (spcGpCreated == false) { - createSPCGp(); - } - } else { - if (spcGpCreated) { - spcGpCreated = false; - if (spcGp != null) { - disposeSpcGp(); - parent.layout(); - } - - } - } - - } - - /** - * Invoked by the workbench, this method sets up the SWT controls for the - * nsharp palette - */ - - @Override - public void createPartControl(Composite parent) { - // System.out.println("nlist @"+NsharpConstants.getNlistFile()); - parent.setLayout(new GridLayout(1, true)); - createDataControlGp(parent); - } - - @Override - public void widgetDefaultSelected(SelectionEvent e) { - // TODO Auto-generated method stub - - } - - @Override - public void widgetSelected(SelectionEvent e) { - // TODO Auto-generated method stub - - } - - @Override - public void widgetDisposed(DisposeEvent e) { - - } - - @Override - public void partActivated(IWorkbenchPart part) { - // TODO Auto-generated method stub - - } - - @Override - public void partBroughtToTop(IWorkbenchPart part) { - // TODO Auto-generated method stub - - } - - @Override - public void partClosed(IWorkbenchPart part) { - } - - @Override - public void partDeactivated(IWorkbenchPart part) { - // TODO Auto-generated method stub - - } - - @Override - public void partOpened(IWorkbenchPart part) { - // TODO Auto-generated method stub - - } - - @Override - public void setFocus() { - // TODO Auto-generated method stub - - } +DisposeListener, IPartListener{ + private MessageBox mb ; + protected Button loadBtn, unloadBtn, overlayBtn, interpBtn,dataEditBtn, + compareStnBtn,compareTmBtn, graphEditBtn,graphModeBtnSkew, graphModeBtnIcing, + graphModeBtnTurb, effBulkShearBtn, stpBtn, shipBtn, winterBtn, fireBtn,hailBtn,sarsBtn; + private Shell shell; + private Label spcGplbl; + private Composite parent; + private Group spcGp; + private boolean overlayIsOn=false, compareStnIsOn=false, compareTmIsOn=false; + protected boolean interpolateIsOn=false, editGraphOn=false; + private static String INTP_OFF = " Interp(off) "; + private static String INTP_ON = " Interp(on) "; + private static String COMP_STN_OFF= "CompStn(off)"; + private static String COMP_STN_ON= "CompStn(on) "; + private static String COMP_TM_OFF= "CompTm(off)"; + private static String COMP_TM_ON= "CompTm(on) "; + private static String OVLY_OFF= "Ovrlay2(off) "; + private static String OVLY_ON= "Ovrlay2(on) "; + protected static String EDIT_GRAPH_OFF= "EditGraph(off)"; + protected static String EDIT_GRAPH_ON= "EditGraph(on) "; + private IWorkbenchPage page; + private NsharpPrintHandle printHandle; + private Font newFont ; + private boolean isEditorVisible=true; + private static NsharpPaletteWindow instance=null; + //one instance per perspective. To avoid cross reference. + private static NsharpPaletteWindow ncpInstance=null; + private static NsharpPaletteWindow d2dInstance=null; + private int currentGraphMode= NsharpConstants.GRAPH_SKEWT; + private String paneConfigurationName; + private static NsharpConstants.SPCGraph leftGraph = NsharpConstants.SPCGraph.EBS; + private static NsharpConstants.SPCGraph rightGraph = NsharpConstants.SPCGraph.STP; + private boolean spcGpCreated = false; + public static NsharpPaletteWindow getInstance() { + if( VizPerspectiveListener.getCurrentPerspectiveManager()!= null){ + if(VizPerspectiveListener.getCurrentPerspectiveManager().getPerspectiveId().equals(D2D5Pane.ID_PERSPECTIVE)) + return d2dInstance; + else if(VizPerspectiveListener.getCurrentPerspectiveManager().getPerspectiveId().equals(NmapCommon.NatlCntrsPerspectiveID)) + return ncpInstance; + } + return instance; + } + public int getCurrentGraphMode() { + return currentGraphMode; + } + + public void restorePaletteWindow( String paneConfigurationName,int currentGraphMode, boolean interpolateIsOn, boolean overlayIsOn, boolean compareStnIsOn, + boolean compareTmIsOn, boolean editGraphOn) { + //System.out.println("restorePaletteWindow "+ this.toString()); + updateSpcGraphBtn(paneConfigurationName); + this.currentGraphMode = currentGraphMode; + this.interpolateIsOn = interpolateIsOn; + this.overlayIsOn = overlayIsOn; + this.compareStnIsOn = compareStnIsOn; + this.compareTmIsOn = compareTmIsOn; + this.editGraphOn = editGraphOn; + graphModeBtnSkew.setEnabled(true); + graphModeBtnIcing.setEnabled(true); + graphModeBtnTurb.setEnabled(true); + if(currentGraphMode== NsharpConstants.GRAPH_SKEWT){ + graphModeBtnSkew.setBackground(colorBlue); + graphModeBtnTurb.setBackground(colorGrey); + graphModeBtnIcing.setBackground(colorGrey); + graphEditBtn.setEnabled(true); + dataEditBtn.setEnabled(true); + compareTmBtn.setEnabled( true ); + compareStnBtn.setEnabled( true ); + overlayBtn.setEnabled( true ); + interpBtn.setEnabled(true); + overlayBtn.setText(OVLY_OFF); + interpBtn.setText(INTP_OFF); + graphEditBtn.setText(EDIT_GRAPH_OFF); + compareTmBtn.setText(COMP_TM_OFF); + compareStnBtn.setText(COMP_STN_OFF); + if(interpolateIsOn) { + graphEditBtn.setEnabled(false); + dataEditBtn.setEnabled(false); + compareTmBtn.setEnabled( false ); + compareStnBtn.setEnabled( false ); + overlayBtn.setEnabled( false ); + interpBtn.setText(INTP_ON); + } + else if(overlayIsOn){ + overlayBtn.setText(OVLY_ON); + graphEditBtn.setEnabled(false); + dataEditBtn.setEnabled(false); + compareTmBtn.setEnabled( false ); + compareStnBtn.setEnabled( false ); + interpBtn.setEnabled(false); + graphModeBtnIcing.setEnabled(false); + graphModeBtnTurb.setEnabled(false); + } + else if(compareStnIsOn){ + compareStnBtn.setText(COMP_STN_ON); + graphEditBtn.setEnabled(false); + dataEditBtn.setEnabled(false); + compareTmBtn.setEnabled( false ); + overlayBtn.setEnabled( false ); + interpBtn.setEnabled(false); + graphModeBtnIcing.setEnabled(false); + graphModeBtnTurb.setEnabled(false); + } + else if(compareTmIsOn){ + compareTmBtn.setText(COMP_TM_ON); + graphEditBtn.setEnabled(false); + dataEditBtn.setEnabled(false); + compareStnBtn.setEnabled( false ); + overlayBtn.setEnabled( false ); + interpBtn.setEnabled(false); + graphModeBtnIcing.setEnabled(false); + graphModeBtnTurb.setEnabled(false); + } + else if(editGraphOn){ + graphEditBtn.setText(EDIT_GRAPH_ON); + dataEditBtn.setEnabled(false); + compareStnBtn.setEnabled( false ); + compareTmBtn.setEnabled( false ); + overlayBtn.setEnabled( false ); + interpBtn.setEnabled(false); + graphModeBtnIcing.setEnabled(false); + graphModeBtnTurb.setEnabled(false); + } + + } + else if(currentGraphMode== NsharpConstants.GRAPH_TURB){ + graphModeBtnTurb.setBackground(colorBlue); + graphModeBtnSkew.setBackground(colorGrey); + graphModeBtnIcing.setBackground(colorGrey); + graphEditBtn.setEnabled(false); + dataEditBtn.setEnabled(false); + compareTmBtn.setEnabled( false ); + compareStnBtn.setEnabled( false ); + overlayBtn.setEnabled( false ); + if(interpolateIsOn) + interpBtn.setText(INTP_ON); + else + interpBtn.setText(INTP_OFF); + + } + else if(currentGraphMode== NsharpConstants.GRAPH_ICING){ + graphModeBtnIcing.setBackground(colorBlue); + graphModeBtnSkew.setBackground(colorGrey); + graphModeBtnTurb.setBackground(colorGrey); + graphEditBtn.setEnabled(false); + dataEditBtn.setEnabled(false); + compareTmBtn.setEnabled( false ); + compareStnBtn.setEnabled( false ); + overlayBtn.setEnabled( false ); + if(interpolateIsOn) + interpBtn.setText(INTP_ON); + else + interpBtn.setText(INTP_OFF); + } + } + public static NsharpConstants.SPCGraph getLeftGraph() { + return leftGraph; + } + public static NsharpConstants.SPCGraph getRightGraph() { + return rightGraph; + } + + private Color colorGrey = new Color(Display.getDefault(), 211,211,211); + private Color colorBlue = new Color(Display.getDefault(),135,206,235); + //private Color colorButtonOriginalBg; // will be initialized later + private void updateSPCGraphs(){ + if(leftGraph == NsharpConstants.SPCGraph.EBS || rightGraph == NsharpConstants.SPCGraph.EBS){ + effBulkShearBtn.setBackground(colorBlue); + } + else { + effBulkShearBtn.setBackground(colorGrey); + } + if(leftGraph == NsharpConstants.SPCGraph.STP || rightGraph == NsharpConstants.SPCGraph.STP){ + stpBtn.setBackground(colorBlue); + } + else { + stpBtn.setBackground(colorGrey); + } + if(leftGraph == NsharpConstants.SPCGraph.SHIP || rightGraph == NsharpConstants.SPCGraph.SHIP){ + shipBtn.setBackground(colorBlue); + } + else { + shipBtn.setBackground(colorGrey); + } + if(leftGraph == NsharpConstants.SPCGraph.WINTER || rightGraph == NsharpConstants.SPCGraph.WINTER){ + winterBtn.setBackground(colorBlue); + } + else { + winterBtn.setBackground(colorGrey); + } + if(leftGraph == NsharpConstants.SPCGraph.FIRE || rightGraph == NsharpConstants.SPCGraph.FIRE){ + fireBtn.setBackground(colorBlue); + } + else { + fireBtn.setBackground(colorGrey); + } + if(leftGraph == NsharpConstants.SPCGraph.HAIL || rightGraph == NsharpConstants.SPCGraph.HAIL){ + hailBtn.setBackground(colorBlue); + } + else { + hailBtn.setBackground(colorGrey); + } + if(leftGraph == NsharpConstants.SPCGraph.SARS || rightGraph == NsharpConstants.SPCGraph.SARS){ + sarsBtn.setBackground(colorBlue); + } + else { + sarsBtn.setBackground(colorGrey); + } + NsharpResourceHandler rsc = getRscHandler(); + if(rsc!= null && rsc.getSpcGraphsPaneRsc()!=null) { + rsc.getSpcGraphsPaneRsc().setGraphs(leftGraph, rightGraph); + } + + } + public void setAndOpenMb(String msg) { + if (mb != null) { + mb.setMessage(msg); + try { + mb.open(); + }catch (Exception e) { + + //e.printStackTrace(); + } + } + } + public NsharpPaletteWindow() { + super(); + instance = this; + if( VizPerspectiveListener.getCurrentPerspectiveManager()!= null){ + if(VizPerspectiveListener.getCurrentPerspectiveManager().getPerspectiveId().equals(D2D5Pane.ID_PERSPECTIVE)) + d2dInstance = this; + else if(VizPerspectiveListener.getCurrentPerspectiveManager().getPerspectiveId().equals(NmapCommon.NatlCntrsPerspectiveID)) + ncpInstance = this; + } + //System.out.println("view NsharpPaletteWindow constructed!! "+ this.toString()); + printHandle = NsharpPrintHandle.getPrintHandle(); + shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(); + + mb = new MessageBox(shell, SWT.ICON_WARNING + | SWT.OK ); + mb.setMessage( "Data is not loaded yet!"); + NsharpConfigManager configMgr = NsharpConfigManager.getInstance(); + NsharpConfigStore configStore = configMgr.retrieveNsharpConfigStoreFromFs(); + NsharpGraphProperty graphConfigProperty = configStore.getGraphProperty(); + paneConfigurationName = graphConfigProperty.getPaneConfigurationName(); + try { + NsharpGridInventory.getInstance().initInventory(false); + } catch (VizException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + } + + /** + * Invoked by the workbench to initialize this View. + */ + public void init( IViewSite site ) { + //System.out.println("NsharpPaletteWindow inited!!"+ this.toString()); + try { + + super.init( site ); + + } catch ( PartInitException pie ) { + + pie.printStackTrace(); + + } + + page = site.getPage(); + page.addPartListener(this); + + NsharpMapResource.registerMouseHandler(); + //Chin : to fix Ticket#11034:::: + //get several control information back from SkewT resource, in the case that + //NsharpPaletteWindow view was disposed and re-constructed while SkewT resource is still alive. + //This case applied to D2D implementation. + NsharpResourceHandler rsc = getRscHandler(); + if(rsc!= null) { + interpolateIsOn = rsc.isInterpolateIsOn(); + overlayIsOn = rsc.isOverlayIsOn(); + compareStnIsOn = rsc.isCompareStnIsOn(); + editGraphOn = rsc.isEditGraphOn(); + } + + } + + /** + * Disposes resource. invoked by the workbench + */ + public void dispose() { + //System.out.println("NsharpPaletteWindow "+this.toString()+" dispose() called!! isEditorVisible="+ isEditorVisible); + if ( ! isEditorVisible ) { + NsharpMapResource.unregisterMouseHandler(); + instance = null; + d2dInstance = null; + ncpInstance = null; + return; + } + else { + super.dispose(); + currentGraphMode= NsharpConstants.GRAPH_SKEWT; + isEditorVisible = false; + NCMapEditor editor = NsharpMapResource.getMapEditor(); + if(editor!=null){ + for ( IRenderableDisplay display : UiUtil.getDisplaysFromContainer(editor) ) { + //System.out.println("display " + display.toString()); + for ( ResourcePair rp : display.getDescriptor().getResourceList() ) { + if ( rp.getResource() instanceof NsharpMapResource ) { + NsharpMapResource rsc = (NsharpMapResource)rp.getResource(); + rsc.unload(); + display.getDescriptor().getResourceList().removePreRemoveListener(rsc); + + } + } + } + } + if(newFont!= null){ + newFont.dispose(); + newFont=null; + } /* + * remove the workbench part listener + */ + page.removePartListener(this); + + try{ + if(NsharpLoadDialog.getAccess()!= null){ + NsharpLoadDialog.getAccess().close(); + } + }catch (Exception e) { + + } + instance= null; + d2dInstance = null; + ncpInstance = null; + } + } + protected boolean checkLoadedData() { + NsharpEditor editor = NsharpEditor.getActiveNsharpEditor(); + if (editor == null) { + mb.open(); + return false; + } + NsharpResourceHandler rsc = editor.getRscHandler(); + if (rsc == null ) { + mb.open(); + return false; + } + return true; + } + protected NsharpResourceHandler getRscHandler(){ + NsharpEditor editor = NsharpEditor.getActiveNsharpEditor(); + if (editor == null) { + + return null; + } + NsharpResourceHandler rsc = editor.getRscHandler(); + if (rsc == null) + return null; + + return rsc; + } + + public void createDataControlGp(Composite parent){ + this.parent = parent; + Group textModeGp = new Group(parent,SWT.SHADOW_OUT); + textModeGp.setLayout( new RowLayout(SWT.HORIZONTAL) ); + textModeGp.setLayoutData( new GridData(GridData.FILL_HORIZONTAL) ); + Font font = textModeGp.getFont(); + FontData[] fontData = font.getFontData(); + for (int i = 0; i < fontData.length; i++) { + fontData[i].setHeight(7); + //fontData[i].setName("courier"); + } + newFont = new Font(font.getDevice(), fontData); + + loadBtn = new Button(textModeGp, SWT.PUSH); + loadBtn.setFont(newFont); + loadBtn.setText(" Load "); + loadBtn.setEnabled( true ); + //loadBtn.setSize(btnWidth,pushbtnHeight); + loadBtn.addListener( SWT.MouseUp, new Listener() { + public void handleEvent(Event event) { + Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(); + + NsharpLoadDialog loadDia = NsharpLoadDialog.getInstance(shell); + + if ( loadDia != null ) { + //System.out.println("Load Button is calling dialog open()"); + loadDia.open(); + } + } + } ); + + unloadBtn = new Button(textModeGp, SWT.PUSH); + unloadBtn.setFont(newFont); + unloadBtn.setText(" UnLoad "); + unloadBtn.setEnabled( true ); + //loadBtn.setSize(btnWidth,pushbtnHeight); + unloadBtn.addListener( SWT.MouseUp, new Listener() { + public void handleEvent(Event event) { + if(checkLoadedData()) { + Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(); + + NsharpUnloadDialog unloadDia = NsharpUnloadDialog.getInstance(shell); + + if ( unloadDia != null ) { + //System.out.println("Load Button is calling dialog open()"); + unloadDia.open(); + + } + } + } + } ); + // Push buttons for SAVE + Button saveBtn = new Button(textModeGp, SWT.PUSH); + saveBtn.setFont(newFont); + saveBtn.setText(" Save "); + saveBtn.setEnabled( true ); + //saveBtn.setSize(btnWidth,pushbtnHeight); + saveBtn.addListener( SWT.MouseUp, new Listener() { + public void handleEvent(Event event) { + + if(checkLoadedData()) { + // Action to save text report + NsharpSaveHandle.saveFile(shell); + } + } + + } ); + + // Push buttons for CONFIGURE + Button cfgBtn = new Button(textModeGp, SWT.PUSH); + cfgBtn.setFont(newFont); + cfgBtn.setText(" Configure "); + cfgBtn.setEnabled(true); + //cfgBtn.setSize(btnWidth,pushbtnHeight); + cfgBtn.addListener( SWT.MouseUp, new Listener() { + public void handleEvent(Event event) { + Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(); + //CHin, new develop if(checkLoadedData()) { + //NsharpParametersSelectionConfigDialog dia = NsharpParametersSelectionConfigDialog.getInstance(shell); + NsharpConfigDialog dia = NsharpConfigDialog.getInstance(shell); + if ( dia != null ) { + dia.open(); + } + //} + + } + } ); + + Button resetBtn = new Button(textModeGp, SWT.PUSH); + resetBtn.setFont(newFont); + resetBtn.setText(" Reset "); + resetBtn.setEnabled( true ); + resetBtn.addListener( SWT.MouseUp, new Listener() { + public void handleEvent(Event event) { + //RESET should turn off everything... + shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(); + + overlayIsOn = false; + overlayBtn.setText(OVLY_OFF); + overlayBtn.setEnabled(true); + compareStnIsOn = false; + compareStnBtn.setText(COMP_STN_OFF); + compareStnBtn.setEnabled(true); + compareTmIsOn = false; + compareTmBtn.setText(COMP_TM_OFF); + compareTmBtn.setEnabled(true); + interpolateIsOn = false; + interpBtn.setText(INTP_OFF); + interpBtn.setEnabled(true); + editGraphOn = false; + graphEditBtn.setEnabled(true); + dataEditBtn.setEnabled(true); + graphModeBtnIcing.setEnabled(true); + graphModeBtnTurb.setEnabled(true); + graphEditBtn.setText(EDIT_GRAPH_OFF); + currentGraphMode= NsharpConstants.GRAPH_SKEWT; + NsharpEditor editor = NsharpEditor.getActiveNsharpEditor(); + if(editor != null){ + //note: resetRsc will reset currentPage, overlay, compare, interpolate flag in Resource + editor.getRscHandler().resetRsc(); + //editor.getNsharpSkewTDescriptor().getSkewtResource().resetRsc();// need to called it twice to make refresh worked...dont know why + //know that current editor is NsharpSkewT editor, refresh it. + editor.refresh(); + NsharpShowTextDialog textarea = NsharpShowTextDialog.getAccess(); + if(textarea != null){ + textarea.refreshTextData(); + } + } + if(NsharpParcelDialog.getAccess() != null){ + NsharpParcelDialog.getAccess().resetUserDefParcel(); + } + } + } ); + Button resetGfBtn = new Button(textModeGp, SWT.PUSH); + resetGfBtn.setFont(newFont); + resetGfBtn.setText("Reset Display"); + resetGfBtn.setEnabled( true ); + resetGfBtn.addListener( SWT.MouseUp, new Listener() { + public void handleEvent(Event event) { + NsharpEditor editor = NsharpEditor.getActiveNsharpEditor(); + editor.resetGraph(); + } + }); + + Button parcelBtn = new Button(textModeGp, SWT.PUSH); + parcelBtn.setFont(newFont); + parcelBtn.setText(" Parcel "); + parcelBtn.setEnabled( true ); + //parcelBtn.setSize(btnWidth,pushbtnHeight); + parcelBtn.addListener( SWT.MouseUp, new Listener() { + public void handleEvent(Event event) { + Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(); + if(checkLoadedData()) { + NsharpParcelDialog parcelDia = NsharpParcelDialog.getInstance(shell); + + if ( parcelDia != null ) { + //System.out.println("calling parcel dialog open()"); + parcelDia.open(); + + } + } + } + } ); + + // Push buttons for NEXT PAGE info + Button nextpageBtn = new Button(textModeGp, SWT.PUSH); + nextpageBtn.setFont(newFont); + nextpageBtn.setText(" Next Data "); + nextpageBtn.setEnabled(true); + nextpageBtn.addListener( SWT.MouseUp, new Listener() { + public void handleEvent(Event event) { + shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(); + if(checkLoadedData()) { + NsharpResourceHandler rsc = getRscHandler(); + if(rsc!= null){ + rsc.setNextTextChapter(); + rsc.refreshPane(); + } + } + } + } ); + + // Push buttons for NEXT INSET PAGE info + Button nextInsetBtn = new Button(textModeGp, SWT.PUSH); + nextInsetBtn.setFont(newFont); + nextInsetBtn.setText(" Next Inset "); + nextInsetBtn.setEnabled(true); + nextInsetBtn.addListener( SWT.MouseUp, new Listener() { + public void handleEvent(Event event) { + shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(); + if(checkLoadedData()) { + NsharpResourceHandler rsc = getRscHandler(); + if(rsc!= null){ + rsc.setNextInsetPage(); + rsc.refreshPane(); + } + } + } + } ); + + + // Push buttons for interpolate + interpBtn = new Button(textModeGp, SWT.PUSH); + interpBtn.setFont(newFont); + interpBtn.setEnabled( true ); + if(interpolateIsOn) { + interpBtn.setText(INTP_ON); + } + else{ + interpBtn.setText(INTP_OFF); + } + interpBtn.addListener( SWT.MouseUp, new Listener() { + public void handleEvent(Event event) { + shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(); + if(checkLoadedData()) { + if(interpolateIsOn == false){ + interpolateIsOn = true; + interpBtn.setText(INTP_ON); + graphEditBtn.setEnabled(false); + dataEditBtn.setEnabled(false); + compareTmBtn.setEnabled( false ); + compareStnBtn.setEnabled( false ); + overlayBtn.setEnabled( false ); + } + else { + interpolateIsOn = false; + interpBtn.setText(INTP_OFF); + if(currentGraphMode == NsharpConstants.GRAPH_SKEWT){ + graphEditBtn.setEnabled(true); + dataEditBtn.setEnabled(true); + compareTmBtn.setEnabled( true ); + compareStnBtn.setEnabled( true ); + overlayBtn.setEnabled( true ); + } + } + //note:call resetInfoOnInterpolate() and pass interpolate flag to Resource + NsharpEditor editor = NsharpEditor.getActiveNsharpEditor(); + if(editor != null){ + try { + editor.getRscHandler().resetInfoOnInterpolate(interpolateIsOn); + } catch (CloneNotSupportedException e) { + e.printStackTrace(); + } + //know that current editor is NsharpSkewT editor, refresh it. + editor.refresh(); + + NsharpShowTextDialog textarea = NsharpShowTextDialog.getAccess(); + if(textarea != null){ + textarea.refreshTextData(); + } + } + } + } + } ); + + NsharpResourceHandler rscHandler = getRscHandler(); + + // Push buttons for OVERLAY info + overlayBtn = new Button(textModeGp, SWT.PUSH); + overlayBtn.setFont(newFont); + if(overlayIsOn){ + overlayBtn.setText(OVLY_ON); + overlayBtn.setEnabled( true ); + } + else{ + overlayBtn.setText(OVLY_OFF); + //comparison and overlay is mutual exclusive + if((rscHandler!= null) && (rscHandler.isCompareStnIsOn() || rscHandler.isCompareTmIsOn())) + overlayBtn.setEnabled( false ); + else + overlayBtn.setEnabled( true ); + } + overlayBtn.addListener( SWT.MouseUp, new Listener() { + public void handleEvent(Event event) { + shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(); + if(overlayIsOn == false){ + + overlayIsOn = true; + overlayBtn.setText(OVLY_ON); + compareStnBtn.setEnabled(false); + compareTmBtn.setEnabled(false); + graphEditBtn.setEnabled(false); + dataEditBtn.setEnabled(false); + graphModeBtnTurb.setEnabled( false ); + graphModeBtnIcing.setEnabled( false ); + interpBtn.setEnabled( false ); + } + else { + overlayIsOn = false; + overlayBtn.setText(OVLY_OFF); + compareStnBtn.setEnabled(true); + compareTmBtn.setEnabled(true); + graphEditBtn.setEnabled(true); + dataEditBtn.setEnabled(true); + graphModeBtnTurb.setEnabled( true ); + graphModeBtnIcing.setEnabled( true ); + interpBtn.setEnabled( true ); + } + NsharpResourceHandler rsc = getRscHandler(); + if(rsc!= null){ + rsc.setOverlayIsOn(overlayIsOn); + rsc.refreshPane(); + } + } + } ); + // Push buttons for CompByStn info + compareStnBtn = new Button(textModeGp, SWT.PUSH); + compareStnBtn.setFont(newFont); + if(compareStnIsOn){ + compareStnBtn.setText(COMP_STN_ON); + compareStnBtn.setEnabled( true ); + } + else{ + //comparison and overlay is mutual exclusive + compareStnBtn.setText(COMP_STN_OFF); + if((rscHandler!= null) && (rscHandler.isOverlayIsOn() || rscHandler.isCompareTmIsOn())) + compareStnBtn.setEnabled( false ); + else + compareStnBtn.setEnabled( true ); + } + compareStnBtn.addListener( SWT.MouseUp, new Listener() { + public void handleEvent(Event event) { + shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(); + if(compareStnIsOn == false){ + + compareStnIsOn = true; + compareStnBtn.setText(COMP_STN_ON); + overlayBtn.setEnabled(false); + compareTmBtn.setEnabled( false ); + graphEditBtn.setEnabled(false); + dataEditBtn.setEnabled(false); + graphModeBtnTurb.setEnabled( false ); + graphModeBtnIcing.setEnabled( false ); + interpBtn.setEnabled( false ); + } + else { + compareStnIsOn = false; + compareStnBtn.setText(COMP_STN_OFF); + overlayBtn.setEnabled(true); + compareTmBtn.setEnabled( true ); + graphEditBtn.setEnabled(true); + dataEditBtn.setEnabled(true); + graphModeBtnTurb.setEnabled( true ); + graphModeBtnIcing.setEnabled( true ); + interpBtn.setEnabled( true ); + } + NsharpResourceHandler rsc = getRscHandler(); + if(rsc!= null){ + rsc.setCompareStnIsOn(compareStnIsOn); + rsc.refreshPane(); + } + + } + } ); + // Push buttons for CompByTm info + compareTmBtn = new Button(textModeGp, SWT.PUSH); + compareTmBtn.setFont(newFont); + if(compareTmIsOn){ + compareTmBtn.setText(COMP_TM_ON); + compareTmBtn.setEnabled( true ); + } + else{ + //comparison and overlay is mutual exclusive + compareTmBtn.setText(COMP_TM_OFF); + if((rscHandler!= null) && (rscHandler.isOverlayIsOn() || rscHandler.isCompareStnIsOn())) + compareTmBtn.setEnabled( false ); + else + compareTmBtn.setEnabled( true ); + } + compareTmBtn.addListener( SWT.MouseUp, new Listener() { + public void handleEvent(Event event) { + shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(); + if(compareTmIsOn == false){ + + compareTmIsOn = true; + compareTmBtn.setText(COMP_TM_ON); + overlayBtn.setEnabled(false); + compareStnBtn.setEnabled( false ); + graphEditBtn.setEnabled(false); + dataEditBtn.setEnabled(false); + graphModeBtnTurb.setEnabled( false ); + graphModeBtnIcing.setEnabled( false ); + interpBtn.setEnabled( false ); + } + else { + compareTmIsOn = false; + compareTmBtn.setText(COMP_TM_OFF); + overlayBtn.setEnabled(true); + compareStnBtn.setEnabled( true ); + graphEditBtn.setEnabled(true); + dataEditBtn.setEnabled(true); + graphModeBtnTurb.setEnabled( true ); + graphModeBtnIcing.setEnabled( true ); + interpBtn.setEnabled( true ); + } + NsharpResourceHandler rsc = getRscHandler(); + if(rsc!= null){ + rsc.setCompareTmIsOn(compareTmIsOn); + rsc.refreshPane(); + } + + } + } ); + dataEditBtn = new Button(textModeGp, SWT.PUSH); + dataEditBtn.setFont(newFont); + dataEditBtn.setText(" Edit Data "); + if(interpolateIsOn || editGraphOn) + dataEditBtn.setEnabled( false ); + else + dataEditBtn.setEnabled( true ); + dataEditBtn.addListener( SWT.MouseUp, new Listener() { + public void handleEvent(Event event) { + if(checkLoadedData() ) { + Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(); + NsharpEditDataDialog editDia = NsharpEditDataDialog.getInstance(shell); + if ( editDia != null ) { + editDia.open(); + } + } + } + } ); + + graphEditBtn = new Button(textModeGp, SWT.PUSH); + graphEditBtn.setFont(newFont); + graphEditBtn.setEnabled( true ); + if(editGraphOn) { + graphEditBtn.setText(EDIT_GRAPH_ON); + dataEditBtn.setEnabled(false); + interpBtn.setEnabled( false ); + } + else{ + graphEditBtn.setText(EDIT_GRAPH_OFF); + dataEditBtn.setEnabled(true); + interpBtn.setEnabled( true ); + } + graphEditBtn.addListener( SWT.MouseUp, new Listener() { + public void handleEvent(Event event) { + if(checkLoadedData()) { + if(editGraphOn){ + editGraphOn=false; + graphEditBtn.setText(EDIT_GRAPH_OFF); + graphModeBtnIcing.setEnabled(true); + graphModeBtnTurb.setEnabled(true); + dataEditBtn.setEnabled( true ); + interpBtn.setEnabled( true ); + compareTmBtn.setEnabled( true ); + compareStnBtn.setEnabled( true ); + overlayBtn.setEnabled( true ); + } + else{ + editGraphOn= true; + graphEditBtn.setText(EDIT_GRAPH_ON); + graphModeBtnIcing.setEnabled(false); + graphModeBtnTurb.setEnabled(false); + dataEditBtn.setEnabled( false ); + interpBtn.setEnabled( false ); + compareTmBtn.setEnabled( false ); + compareStnBtn.setEnabled( false ); + overlayBtn.setEnabled( false ); + } + NsharpResourceHandler rsc = getRscHandler(); + if(rsc!= null) { + rsc.setEditGraphOn(editGraphOn); + rsc.refreshPane(); + } + } + } + } ); + /*Button bndryMotionBtn = new Button(textModeGp, SWT.PUSH); + bndryMotionBtn.setText("BoundaryMotion"); + bndryMotionBtn.setEnabled( true ); + bndryMotionBtn.addListener( SWT.MouseUp, new Listener() { + public void handleEvent(Event event) { + shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(); + if(checkLoadedData()) { + NsharpShowTextDialog osDia = NsharpShowTextDialog.getInstance( shell ); + if(osDia != null) + osDia.open(); + } + } + } );*/ + + // Push buttons for show text info + Button showtextBtn = new Button(textModeGp, SWT.PUSH); + showtextBtn.setFont(newFont); + showtextBtn.setText(" Show Text "); + showtextBtn.setEnabled( true ); + showtextBtn.addListener( SWT.MouseUp, new Listener() { + public void handleEvent(Event event) { + shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(); + if(checkLoadedData()) { + NsharpShowTextDialog osDia = NsharpShowTextDialog.getInstance( shell ); + if(osDia != null) + osDia.open(); + } + } + } ); + Group graphModeGp = new Group(textModeGp,SWT.SHADOW_ETCHED_IN); + graphModeGp.setLayout(new RowLayout(SWT.HORIZONTAL) );//new GridLayout( 2, false ) ); + + // Push buttons for graphMode + graphModeBtnSkew = new Button(graphModeGp, SWT.PUSH ); + graphModeBtnSkew.setFont(newFont); + graphModeBtnSkew.setText("S"); + graphModeBtnSkew.setEnabled( true ); + //colorButtonOriginalBg= graphModeBtnSkew.getBackground(); + rscHandler = getRscHandler(); + if(rscHandler!= null ){ + currentGraphMode = rscHandler.getCurrentGraphMode(); + } + graphModeBtnSkew.addListener( SWT.MouseUp, new Listener() { + public void handleEvent(Event event) { + if(currentGraphMode!= NsharpConstants.GRAPH_SKEWT){ + currentGraphMode= NsharpConstants.GRAPH_SKEWT; + graphModeBtnSkew.setBackground(colorBlue); + graphModeBtnTurb.setBackground(colorGrey); + graphModeBtnIcing.setBackground(colorGrey); + if(!interpolateIsOn) { + graphEditBtn.setEnabled(true); + dataEditBtn.setEnabled(true); + compareTmBtn.setEnabled( true ); + compareStnBtn.setEnabled( true ); + overlayBtn.setEnabled( true ); + } + else { + graphEditBtn.setEnabled(false); + dataEditBtn.setEnabled(false); + compareTmBtn.setEnabled( false ); + compareStnBtn.setEnabled( false ); + overlayBtn.setEnabled( false ); + } + NsharpResourceHandler rsc = getRscHandler(); + if(rsc!= null ) { + rsc.setCurrentGraphMode(currentGraphMode); + //rsc.getSkewtPaneRsc().handleResize(); + } + + } + } + } ); + graphModeBtnTurb = new Button(graphModeGp, SWT.PUSH); + graphModeBtnTurb.setFont(newFont); + graphModeBtnTurb.setText("T"); + graphModeBtnTurb.setEnabled( true ); + graphModeBtnTurb.addListener( SWT.MouseUp, new Listener() { + public void handleEvent(Event event) { + if(currentGraphMode != NsharpConstants.GRAPH_TURB){ + currentGraphMode= NsharpConstants.GRAPH_TURB; + graphModeBtnTurb.setBackground(colorBlue); + graphModeBtnSkew.setBackground(colorGrey); + graphModeBtnIcing.setBackground(colorGrey); + graphEditBtn.setEnabled(false); + dataEditBtn.setEnabled(false); + compareTmBtn.setEnabled( false ); + compareStnBtn.setEnabled( false ); + overlayBtn.setEnabled( false ); + NsharpResourceHandler rsc = getRscHandler(); + if(rsc!= null ) { + rsc.setCurrentGraphMode(currentGraphMode); + rsc.getSkewtPaneRsc().handleResize(); + } + } + } + } ); + graphModeBtnIcing = new Button(graphModeGp, SWT.PUSH); + graphModeBtnIcing.setFont(newFont); + graphModeBtnIcing.setText("I"); + graphModeBtnIcing.setEnabled( true ); + graphModeBtnIcing.addListener( SWT.MouseUp, new Listener() { + public void handleEvent(Event event) { + if(currentGraphMode != NsharpConstants.GRAPH_ICING){ + currentGraphMode= NsharpConstants.GRAPH_ICING; + graphModeBtnIcing.setBackground(colorBlue); + graphModeBtnSkew.setBackground(colorGrey); + graphModeBtnTurb.setBackground(colorGrey); + graphEditBtn.setEnabled(false); + dataEditBtn.setEnabled(false); + compareTmBtn.setEnabled( false ); + compareStnBtn.setEnabled( false ); + overlayBtn.setEnabled( false ); + NsharpResourceHandler rsc = getRscHandler(); + if(rsc!= null ) { + rsc.setCurrentGraphMode(currentGraphMode); + rsc.getSkewtPaneRsc().handleResize(); + } + } + } + } ); + if(currentGraphMode== NsharpConstants.GRAPH_SKEWT){ + graphModeBtnSkew.setBackground(colorBlue); + graphModeBtnTurb.setBackground(colorGrey); + graphModeBtnIcing.setBackground(colorGrey); + } + else if(currentGraphMode== NsharpConstants.GRAPH_TURB){ + graphModeBtnTurb.setBackground(colorBlue); + graphModeBtnSkew.setBackground(colorGrey); + graphModeBtnIcing.setBackground(colorGrey); + } + else if(currentGraphMode== NsharpConstants.GRAPH_ICING){ + graphModeBtnIcing.setBackground(colorBlue); + graphModeBtnSkew.setBackground(colorGrey); + graphModeBtnTurb.setBackground(colorGrey); + } + + // Push buttons for Print + Button printBtn = new Button(textModeGp, SWT.PUSH); + printBtn.setFont(newFont); + printBtn.setText(" Print "); + printBtn.setEnabled( true ); + printBtn.addListener( SWT.MouseUp, new Listener() { + public void handleEvent(Event event) { + shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(); + //12.7.1 testing if(checkLoadedData()) { + if(true){ + printHandle.handlePrint(""); + } + } + } ); + + if(paneConfigurationName.equals(NsharpConstants.PANE_SPCWS_CFG_STR)) + createSPCGp(); + + + if(rscHandler!= null){ + restorePaletteWindow(paneConfigurationName, rscHandler.getCurrentGraphMode(), + rscHandler.isInterpolateIsOn(), rscHandler.isOverlayIsOn(), + rscHandler.isCompareStnIsOn(),rscHandler.isCompareTmIsOn(),rscHandler.isEditGraphOn()); + } + parent.redraw(); + } + + private void createSPCGp(){ + //System.out.println("createSPCGp.........................................."); + spcGp = new Group(parent,SWT.SHADOW_OUT); + spcGp.setLayout( new RowLayout(SWT.HORIZONTAL) ); + spcGp.setLayoutData( new GridData(GridData.FILL_HORIZONTAL) ); + spcGplbl = new Label(spcGp, SWT.NO); + spcGplbl.setText("SPC Graphs"); + if(paneConfigurationName.equals(NsharpConstants.PANE_SPCWS_CFG_STR)){ + spcGplbl.setEnabled( true ); + } + else{ + spcGplbl.setEnabled( false ); + } + effBulkShearBtn = new Button(spcGp, SWT.PUSH); + effBulkShearBtn.setFont(newFont); + effBulkShearBtn.setText("EBS Stats "); + if(paneConfigurationName.equals(NsharpConstants.PANE_SPCWS_CFG_STR)){ + effBulkShearBtn.setEnabled( true ); + } + else{ + effBulkShearBtn.setEnabled( false ); + } + effBulkShearBtn.addListener( SWT.MouseUp, new Listener() { + public void handleEvent(Event event) { + if(leftGraph != NsharpConstants.SPCGraph.EBS && rightGraph != NsharpConstants.SPCGraph.EBS){ + rightGraph = leftGraph; + leftGraph = NsharpConstants.SPCGraph.EBS; + updateSPCGraphs(); + } + } + } ); + + stpBtn = new Button(spcGp, SWT.PUSH); + stpBtn.setFont(newFont); + stpBtn.setText("STP Stats "); + if(paneConfigurationName.equals(NsharpConstants.PANE_SPCWS_CFG_STR)){ + stpBtn.setEnabled( true ); + } + else{ + stpBtn.setEnabled( false ); + } + stpBtn.addListener( SWT.MouseUp, new Listener() { + public void handleEvent(Event event) { + if(leftGraph != NsharpConstants.SPCGraph.STP && rightGraph != NsharpConstants.SPCGraph.STP){ + rightGraph = leftGraph; + leftGraph = NsharpConstants.SPCGraph.STP; + updateSPCGraphs(); + } + } + } ); + + shipBtn = new Button(spcGp, SWT.PUSH); + shipBtn.setFont(newFont); + shipBtn.setText("SHIP Stats"); + if(paneConfigurationName.equals(NsharpConstants.PANE_SPCWS_CFG_STR)){ + shipBtn.setEnabled( true ); + } + else{ + shipBtn.setEnabled( false ); + } + shipBtn.addListener( SWT.MouseUp, new Listener() { + public void handleEvent(Event event) { + if(leftGraph != NsharpConstants.SPCGraph.SHIP && rightGraph != NsharpConstants.SPCGraph.SHIP){ + rightGraph = leftGraph; + leftGraph = NsharpConstants.SPCGraph.SHIP; + updateSPCGraphs(); + } + } + } ); + winterBtn = new Button(spcGp, SWT.PUSH); + winterBtn.setFont(newFont); + winterBtn.setText(" WINTER "); + if(paneConfigurationName.equals(NsharpConstants.PANE_SPCWS_CFG_STR)){ + winterBtn.setEnabled( true ); + } + else{ + winterBtn.setEnabled( false ); + } + winterBtn.addListener( SWT.MouseUp, new Listener() { + public void handleEvent(Event event) { + if(leftGraph != NsharpConstants.SPCGraph.WINTER && rightGraph != NsharpConstants.SPCGraph.WINTER){ + rightGraph = leftGraph; + leftGraph = NsharpConstants.SPCGraph.WINTER; + updateSPCGraphs(); + } + } + } ); + fireBtn = new Button(spcGp, SWT.PUSH); + fireBtn.setFont(newFont); + fireBtn.setText(" FIRE "); + if(paneConfigurationName.equals(NsharpConstants.PANE_SPCWS_CFG_STR)){ + fireBtn.setEnabled( true ); + } + else{ + fireBtn.setEnabled( false ); + } + fireBtn.addListener( SWT.MouseUp, new Listener() { + public void handleEvent(Event event) { + if(leftGraph != NsharpConstants.SPCGraph.FIRE && rightGraph != NsharpConstants.SPCGraph.FIRE){ + rightGraph = leftGraph; + leftGraph = NsharpConstants.SPCGraph.FIRE; + updateSPCGraphs(); + } + } + } ); + hailBtn = new Button(spcGp, SWT.PUSH); + hailBtn.setFont(newFont); + hailBtn.setText(" HAIL "); + if(paneConfigurationName.equals(NsharpConstants.PANE_SPCWS_CFG_STR)){ + hailBtn.setEnabled( true ); + } + else{ + hailBtn.setEnabled( false ); + } + hailBtn.addListener( SWT.MouseUp, new Listener() { + public void handleEvent(Event event) { + if(leftGraph != NsharpConstants.SPCGraph.HAIL && rightGraph != NsharpConstants.SPCGraph.HAIL){ + rightGraph = leftGraph; + leftGraph = NsharpConstants.SPCGraph.HAIL; + updateSPCGraphs(); + } + } + } ); + sarsBtn = new Button(spcGp, SWT.PUSH); + sarsBtn.setFont(newFont); + sarsBtn.setText(" SARS "); + if(paneConfigurationName.equals(NsharpConstants.PANE_SPCWS_CFG_STR)){ + sarsBtn.setEnabled( true ); + } + else{ + sarsBtn.setEnabled( false ); + } + sarsBtn.addListener( SWT.MouseUp, new Listener() { + public void handleEvent(Event event) { + if(leftGraph != NsharpConstants.SPCGraph.SARS && rightGraph != NsharpConstants.SPCGraph.SARS){ + rightGraph = leftGraph; + leftGraph = NsharpConstants.SPCGraph.SARS; + updateSPCGraphs(); + } + } + } ); + updateSPCGraphs(); + spcGpCreated = true; + parent.layout(); + } + private void disposeSpcGp(){ + spcGplbl.dispose(); + effBulkShearBtn.dispose(); + stpBtn.dispose(); + shipBtn.dispose(); + winterBtn.dispose(); + fireBtn.dispose(); + hailBtn.dispose(); + sarsBtn.dispose(); + spcGp.dispose(); + + spcGplbl = null; + effBulkShearBtn = null; + stpBtn = null; + shipBtn = null; + winterBtn = null; + fireBtn = null; + hailBtn = null; + sarsBtn = null; + spcGp = null; + } + public boolean isEditorVisible() { + return isEditorVisible; + } + public void setEditorVisible(boolean isEditorVisible) { + this.isEditorVisible = isEditorVisible; + } + + public void updateSpcGraphBtn( String paneConfigurationName) { + this.paneConfigurationName = paneConfigurationName; + if(paneConfigurationName.equals(NsharpConstants.PANE_SPCWS_CFG_STR)){ + if(spcGpCreated== false){ + createSPCGp(); + } + } + else{ + if(spcGpCreated){ + spcGpCreated = false; + if(spcGp!= null){ + disposeSpcGp(); + parent.layout(); + } + + } + } + + } + + /** + * Invoked by the workbench, this method sets up the SWT controls for the nsharp palette + */ + + @Override + public void createPartControl(Composite parent) { + //System.out.println("nlist @"+NsharpConstants.getNlistFile()); + parent.setLayout( new GridLayout( 1, true ) ); + createDataControlGp(parent); + } + + @Override + public void widgetDefaultSelected(SelectionEvent e) { + // TODO Auto-generated method stub + + } + @Override + public void widgetSelected(SelectionEvent e) { + // TODO Auto-generated method stub + + } + @Override + public void widgetDisposed(DisposeEvent e) { + + + } + @Override + public void partActivated(IWorkbenchPart part) { + // TODO Auto-generated method stub + + } + @Override + public void partBroughtToTop(IWorkbenchPart part) { + // TODO Auto-generated method stub + + } + @Override + public void partClosed(IWorkbenchPart part) { + } + @Override + public void partDeactivated(IWorkbenchPart part) { + // TODO Auto-generated method stub + + } + @Override + public void partOpened(IWorkbenchPart part) { + // TODO Auto-generated method stub + + } + @Override + public void setFocus() { + // TODO Auto-generated method stub + + } } diff --git a/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/view/NsharpPaneConfigDialog.java b/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/view/NsharpPaneConfigDialog.java index 2dbc2786c2..7d8fcb593f 100644 --- a/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/view/NsharpPaneConfigDialog.java +++ b/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/view/NsharpPaneConfigDialog.java @@ -23,8 +23,6 @@ import gov.noaa.nws.ncep.ui.nsharp.NsharpConfigManager; import gov.noaa.nws.ncep.ui.nsharp.NsharpConfigStore; import gov.noaa.nws.ncep.ui.nsharp.NsharpConstants; import gov.noaa.nws.ncep.ui.nsharp.display.NsharpEditor; -import gov.noaa.nws.ncep.ui.nsharp.display.NsharpSkewTPaneDisplay; -import gov.noaa.nws.ncep.viz.ui.display.NCLoopProperties; import org.eclipse.jface.dialogs.Dialog; import org.eclipse.jface.dialogs.IDialogConstants; @@ -42,14 +40,9 @@ import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Listener; import org.eclipse.swt.widgets.MessageBox; import org.eclipse.swt.widgets.Shell; -import org.eclipse.ui.PartInitException; import org.eclipse.ui.PlatformUI; -import com.raytheon.uf.viz.core.IDisplayPane; -import com.raytheon.uf.viz.core.PixelExtent; -import com.raytheon.uf.viz.core.drawables.IRenderableDisplay; import com.raytheon.uf.viz.core.exception.VizException; -import com.raytheon.viz.ui.editor.EditorInput; public class NsharpPaneConfigDialog extends Dialog { private static NsharpPaneConfigDialog thisDialog=null; diff --git a/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/view/NsharpParcelDialog.java b/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/view/NsharpParcelDialog.java index 0039ce6c53..47ca8c41c8 100644 --- a/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/view/NsharpParcelDialog.java +++ b/ncep/gov.noaa.nws.ncep.ui.nsharp/src/gov/noaa/nws/ncep/ui/nsharp/view/NsharpParcelDialog.java @@ -153,7 +153,7 @@ public class NsharpParcelDialog extends Dialog { //addParcelToList(mupPar); }*/ - } + } //private void addParcelToList(ParcelData parcel){ // if(parcel!=null){ // parcelList.add(parcel); diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/META-INF/MANIFEST.MF b/ncep/gov.noaa.nws.ncep.ui.pgen/META-INF/MANIFEST.MF index b48db1d709..a5b5978152 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/META-INF/MANIFEST.MF +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/META-INF/MANIFEST.MF @@ -20,9 +20,9 @@ Require-Bundle: org.eclipse.ui, org.junit;bundle-version="1.0.0", gov.noaa.nws.ncep.edex.common;bundle-version="1.0.0", gov.noaa.nws.ncep.viz.common;bundle-version="1.0.0", - gov.noaa.nws.ncep.viz.localization;bundle-version="1.0.0", gov.noaa.nws.ncep.gempak.parameters.core;bundle-version="1.0.0", - gov.noaa.nws.ncep.viz.customprojection;bundle-version="1.0.0" + gov.noaa.nws.ncep.viz.customprojection;bundle-version="1.0.0", + gov.noaa.nws.ncep.viz.gempak.nativelib;bundle-version="1.0.0" Bundle-ActivationPolicy: lazy Export-Package: gov.noaa.nws.ncep.ui.pgen, gov.noaa.nws.ncep.ui.pgen.attrdialog, @@ -39,7 +39,6 @@ Export-Package: gov.noaa.nws.ncep.ui.pgen, gov.noaa.nws.ncep.ui.pgen.tca, gov.noaa.nws.ncep.ui.pgen.tools Import-Package: com.raytheon.edex.meteoLib, - gov.noaa.nws.ncep.viz.localization, com.raytheon.viz.core.gl, com.raytheon.viz.core.gl.images, gov.noaa.nws.ncep.common.staticdata, diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject b/ncep/gov.noaa.nws.ncep.ui.pgen/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject index e6ad965381..1fbe89aafe 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject @@ -6,4 +6,4 @@ gov.noaa.nws.ncep.ui.pgen.tca.IslandBreakpointList gov.noaa.nws.ncep.ui.pgen.tca.WaterBreakpointList gov.noaa.nws.ncep.ui.pgen.tca.CoastBreakpointList gov.noaa.nws.ncep.ui.pgen.file.Products -gov.noaa.nws.ncep.ui.pgen.producttypes.ProductTypes \ No newline at end of file +gov.noaa.nws.ncep.ui.pgen.producttypes.ProductTypesgov.noaa.nws.ncep.ui.pgen.rsc.PgenResourceData \ No newline at end of file diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/localization/ncep/pgen/settings_tbl.xml b/ncep/gov.noaa.nws.ncep.ui.pgen/localization/ncep/pgen/settings_tbl.xml index 17589c04e3..97ab55b1e0 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/localization/ncep/pgen/settings_tbl.xml +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/localization/ncep/pgen/settings_tbl.xml @@ -826,6 +826,21 @@ + + + + + + + + + + + + + true + true + true true true diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/localization/ncep/pgen/xslt/airmet/zulu.xsl b/ncep/gov.noaa.nws.ncep.ui.pgen/localization/ncep/pgen/xslt/airmet/zulu.xsl index 2fcc1669e4..ed9c3b80f2 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/localization/ncep/pgen/xslt/airmet/zulu.xsl +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/localization/ncep/pgen/xslt/airmet/zulu.xsl @@ -25,7 +25,10 @@ - + + + + @@ -91,7 +94,7 @@ - + @@ -369,6 +372,7 @@ + 3 MULT FRZLVL @@ -586,32 +590,60 @@ - area - + + area + + + - + ; - + + + + + + + + + + - area + + area + + + - + + + + + + + + + + + + diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/localization/ncep/pgen/xslt/watchbox/SAW.xlt b/ncep/gov.noaa.nws.ncep.ui.pgen/localization/ncep/pgen/xslt/watchbox/SAW.xlt index 74d8810120..6ad6bc3898 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/localization/ncep/pgen/xslt/watchbox/SAW.xlt +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/localization/ncep/pgen/xslt/watchbox/SAW.xlt @@ -142,6 +142,14 @@ . + + + WW + + .. + + + diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/localization/ncep/pgen/xslt/watchbox/SEL.xlt b/ncep/gov.noaa.nws.ncep.ui.pgen/localization/ncep/pgen/xslt/watchbox/SEL.xlt index 1d888eaf59..35a8eacd57 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/localization/ncep/pgen/xslt/watchbox/SEL.xlt +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/localization/ncep/pgen/xslt/watchbox/SEL.xlt @@ -206,6 +206,19 @@ THREATENING WEATHER CONDITIONS AND LISTEN FOR LATER STATEMENTS AND POSSIBLE WARNINGS. + + + + + OTHER WATCH INFORMATION... WATCH NUMBER WILL NOT BE IN EFFECT + + AFTER + + . CONTINUE...WW + + ... + + DISCUSSION... diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/plugin.xml b/ncep/gov.noaa.nws.ncep.ui.pgen/plugin.xml index 60eca78c5a..e5d096383a 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/plugin.xml +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/plugin.xml @@ -273,6 +273,10 @@ id="gov.noaa.nws.ncep.ui.pgen.rsc.PgenTCMtool" name="Pgen TCM Create"> + + @@ -500,6 +504,10 @@ class="gov.noaa.nws.ncep.ui.pgen.tools.PgenTcmDrawingTool" commandId="gov.noaa.nws.ncep.ui.pgen.rsc.PgenTCMtool"> + + + + category="gov.noaa.nws.ncep.viz.common.nceppreferences"> params = new HashMap(); params.put("editor", part); - params.put("name", "Gfa"); + params.put("name", "GFA"); params.put("className", "MET"); StringBuilder sb = new StringBuilder(""); diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/attrdialog/AttrDlg.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/attrdialog/AttrDlg.java index 980022da90..9444df6c74 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/attrdialog/AttrDlg.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/attrdialog/AttrDlg.java @@ -17,6 +17,7 @@ import org.eclipse.swt.graphics.Rectangle; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; +import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Shell; import org.eclipse.jface.dialogs.Dialog; @@ -56,6 +57,7 @@ import gov.noaa.nws.ncep.ui.pgen.attrdialog.vaadialog.*; * 01/10 #182 G. Zhang Added DrawableElement and mousehandlerName for CONVSIGMET * 10/10 #? B. Yin Changed DrawableElement de to AbstractDrawableComponent * 04/11 #? B. Yin Re-factor IAttribute + * 08/12 #? B. Yin Fixed the mouse-over issue for PGEN palette. * * * @@ -278,8 +280,29 @@ public abstract class AttrDlg extends Dialog implements IAttribute { getShell().setLocation(shellLocation); } - return super.open(); + final Shell shell = this.getShell(); + // When the editor pane is activated, the tool manager will re-activate all tools and thus + // the PGEN attribute dialog will re-open. However if the PGEN palette gets activated by a mouse + // click (or mouse over) before the attribute dialog is open, you will get an exception that + // activates PGEN palette in the middle of activating the editor. The reason why this happens is that + // the shell open() method forces the display to dispatch the click event on PGEN palette, which + // activates the PGEN palette. + // To prevent this happens, the super.open() method must be invoked after the editor has been activated. + // We put super.open() in the UI thread, which is the same thread the activation is running, so that + // it is invoked after the activation. --bingfan 8/10/12 + Display.getDefault().asyncExec(new Runnable() { + @Override + public void run() { + // while (Display.getDefault().readAndDispatch()) { + //wait for events to finish before continue + // } + if (!( shell == null || shell.isDisposed() )) { // make sure the dialog is not closed + AttrDlg.super.open(); + } + } + }); + return OK; } /** diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/attrdialog/AttrDlgFactory.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/attrdialog/AttrDlgFactory.java index 83276592e7..cd397fa937 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/attrdialog/AttrDlgFactory.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/attrdialog/AttrDlgFactory.java @@ -39,6 +39,7 @@ import org.eclipse.swt.widgets.Shell; * 09/10 #305/306 B. Yin Added Cloud and Turbulence * 02/11 #318 S. Gilbert Added Distance Display Options Dialog * 08/11 #? B. Yin Added Pgen Inc/Dec + * 06/12 #734 J. Zeng Add SPENES * * * @author B. Yin @@ -175,6 +176,10 @@ public class AttrDlgFactory { return WatchBoxAttrDlg.getInstance( parShell ); } + else if ((pgenType != null) && pgenType.equalsIgnoreCase("SPENES")) { + return SpenesAttrDlg.getInstance( parShell ); + + } else if ( pgenType != null && pgenType.equalsIgnoreCase("TCM") ) { return TcmAttrDlg.getInstance( parShell ); diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/attrdialog/AttrSettings.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/attrdialog/AttrSettings.java index c245ef0214..090780ca16 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/attrdialog/AttrSettings.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/attrdialog/AttrSettings.java @@ -40,6 +40,7 @@ import com.raytheon.uf.viz.core.exception.VizException; * 07/11 450 G. Hull settings tbl from NcPathManager * 08/11 ? B. Yin Put current time for Storm Track * 11/11 ? B. Yin Load settings for different Activity Type. + * 09/12 B. Hebbard Merge changes by RTS OB12.9.1 (format only, this file) * * * diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/attrdialog/GfaAttrDlg.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/attrdialog/GfaAttrDlg.java index b89ba56cd8..0d0c9fdae9 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/attrdialog/GfaAttrDlg.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/attrdialog/GfaAttrDlg.java @@ -62,6 +62,7 @@ import com.raytheon.uf.viz.core.exception.VizException; * 05/12 #637 Archana.S Updated the code to update the filter hr in PgenFilterDlg * based on the current Fcst hr selected. * 05/12 #808 J. Wu update vor text. + * 07/12 #663 Q. Zhou Add selected Gfa in movetext listener. Added get/set for MoveTextBtn * * * @author mlaryukhin @@ -236,7 +237,10 @@ public class GfaAttrDlg extends LineAttrDlg implements IGfa { moveTextBtn.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { - PgenUtil.setDrawingGfaTextMode(lastUsedGfa); + + PgenUtil.setDrawingGfaTextMode((Gfa) de); + moveTextBtn.setEnabled(true); + } }); @@ -1082,6 +1086,7 @@ public class GfaAttrDlg extends LineAttrDlg implements IGfa { if(iattr instanceof Gfa) { // update the points to be use for "Move Text" button lastUsedGfa = (Gfa)iattr; + de = lastUsedGfa; moveTextBtn.setEnabled(true); Color c = lastUsedGfa.getColors() == null ? null:lastUsedGfa.getColors()[0]; if (c != null){ @@ -1428,6 +1433,7 @@ public class GfaAttrDlg extends LineAttrDlg implements IGfa { if (newEl instanceof Gfa) { ((Gfa)newEl).snap(); lastUsedGfa = (Gfa)newEl; + de = lastUsedGfa; lastUsedGfa.setGfaValues(values); } } @@ -1938,9 +1944,23 @@ public class GfaAttrDlg extends LineAttrDlg implements IGfa { * @param vorText */ public void setVorText( String vorText ){ - textVOR.setText( vorText ); + //vorText maybe null when multi-selecting + if ( vorText != null ) textVOR.setText( vorText ); } - + /** + * check if the MoveText button is enabled. + * @return + */ + public boolean isMoveTextEnable(){ + return moveTextBtn.isEnabled(); + } + /** + * Enable/Disable the move text button + * @param flag + */ + public void enableMoveTextBtn( boolean flag ){ + moveTextBtn.setEnabled(flag); + } } diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/attrdialog/LineAttrDlg.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/attrdialog/LineAttrDlg.java index 10a38f5211..0e5c7af9d6 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/attrdialog/LineAttrDlg.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/attrdialog/LineAttrDlg.java @@ -58,6 +58,8 @@ import gov.noaa.nws.ncep.viz.common.ui.color.ColorButtonSelector; * selected color instead of displaying * the complete color matrix . * 04/11 #? B. Yin Re-factor IAttribute + * 07/12 #610(TTR419) B. Yin Melti-Select GFA does not need check boxes for + * every attributes * * * @author B. Yin @@ -787,7 +789,8 @@ public class LineAttrDlg extends AttrDlg implements ILine { this.create(); if ( PgenSession.getInstance().getPgenPalette().getCurrentAction() - .equalsIgnoreCase("MultiSelect")){ + .equalsIgnoreCase("MultiSelect") + && !(this instanceof GfaAttrDlg) ){ enableChkBoxes(true); enableAllWidgets(false); } diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/attrdialog/OutlookAttrDlg.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/attrdialog/OutlookAttrDlg.java index 15eab5cf83..f474f4f6ae 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/attrdialog/OutlookAttrDlg.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/attrdialog/OutlookAttrDlg.java @@ -1419,7 +1419,7 @@ public class OutlookAttrDlg extends AttrDlg implements IContours, ILine{ public void setOtlkType( String type ){ outlookCombo.select( outlookCombo.indexOf(type.toUpperCase())); setDefaultLabels( this.getOutlookType()); - // setDefaultLineAttr( outlookCombo.getText() + txtCombo.getText()); + setDefaultLineAttr( outlookCombo.getText() + txtCombo.getText()); } /** diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/attrdialog/OutlookFormatDlg.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/attrdialog/OutlookFormatDlg.java index 79373b6684..d7d2c810a9 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/attrdialog/OutlookFormatDlg.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/attrdialog/OutlookFormatDlg.java @@ -38,6 +38,8 @@ import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.swt.SWT; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.layout.FormAttachment; +import org.eclipse.swt.layout.FormData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Composite; @@ -64,6 +66,7 @@ import com.raytheon.viz.ui.dialogs.CaveJFACEDialog; * 07/11 #450 G. Hull NcPathManager * 03/12 $703 B. Yin Generate product text from style sheet * 05/12 #710 B. Yin Format HAIL outlook first + * 07/12 #789 B. Yin Change all time to UTC. * * * @@ -94,11 +97,11 @@ public class OutlookFormatDlg extends CaveJFACEDialog{ //initial date and time private DateTime initDate; - private DateTime initTime; + private Text initTime; //expiration check box and date/time widgets private DateTime expDate; - private DateTime expTime; + private Text expTime; //forecaster name private Text forecaster; @@ -169,7 +172,14 @@ public class OutlookFormatDlg extends CaveJFACEDialog{ Composite initDt = new Composite(top, SWT.NONE); initDt.setLayout( new GridLayout(2, false) ); initDate = new DateTime(initDt, SWT.BORDER | SWT.DATE ); - initTime = new DateTime(initDt, SWT.BORDER | SWT.TIME | SWT.SHORT ); + initTime = new Text(initDt, SWT.SINGLE | SWT.BORDER | SWT.CENTER); + + FormData fd = new FormData(); + fd.top = new FormAttachment(dayGrp,2, SWT.BOTTOM); + fd.left = new FormAttachment(initDate, 5, SWT.RIGHT); + initTime.setLayoutData(fd); + PgenUtil.setUTCTimeTextField(initDt, initTime, + this.getDefaultInitDT(this.getDays().replaceAll(" Fire", "")),dayGrp, 5); setInitDt(this.getDefaultInitDT(this.getDays().replaceAll(" Fire", ""))); @@ -179,7 +189,15 @@ public class OutlookFormatDlg extends CaveJFACEDialog{ Composite expDt = new Composite(top, SWT.NONE); expDt.setLayout( new GridLayout(2, false) ); expDate = new DateTime(expDt, SWT.BORDER | SWT.DATE ); - expTime = new DateTime(expDt, SWT.BORDER | SWT.TIME | SWT.SHORT ); + expTime = new Text(expDt, SWT.SINGLE | SWT.BORDER | SWT.CENTER); + + FormData fd2 = new FormData(); + fd2.top = new FormAttachment(initTime, 2, SWT.BOTTOM); + fd2.left = new FormAttachment(expDate, 5, SWT.RIGHT); + expTime.setLayoutData(fd2); + + PgenUtil.setUTCTimeTextField(expDt, expTime, + this.getDefaultExpDT(this.getDays().replaceAll(" Fire", "")),dayGrp, 5); setExpDt(this.getDefaultExpDT(this.getDays().replaceAll(" Fire", ""))); @@ -285,7 +303,8 @@ public class OutlookFormatDlg extends CaveJFACEDialog{ Calendar expiration = Calendar.getInstance( TimeZone.getTimeZone("GMT") ); expiration.set(expDate.getYear(), expDate.getMonth(), expDate.getDay(), - expTime.getHours(), expTime.getMinutes(), 0); + this.getHourFromTextField( expTime ), + this.getMinuteFromTextField( expTime ), 0); expiration.set(Calendar.MILLISECOND, 0); return expiration; } @@ -297,7 +316,9 @@ public class OutlookFormatDlg extends CaveJFACEDialog{ public Calendar getInitTime(){ Calendar init = Calendar.getInstance( TimeZone.getTimeZone("GMT") ); init.set(initDate.getYear(), initDate.getMonth(), initDate.getDay(), - initTime.getHours(), initTime.getMinutes(), 0); + this.getHourFromTextField(initTime), + this.getMinuteFromTextField(initTime), 0); + init.set(Calendar.MILLISECOND, 0); return init; @@ -642,8 +663,7 @@ public class OutlookFormatDlg extends CaveJFACEDialog{ initDate.setYear(cal.get(Calendar.YEAR)); initDate.setMonth(cal.get(Calendar.MONTH)); initDate.setDay(cal.get(Calendar.DAY_OF_MONTH)); - initTime.setHours(cal.get(Calendar.HOUR_OF_DAY)); - initTime.setMinutes(cal.get(Calendar.MINUTE)); + initTime.setText(String.format("%1$tH%1$tM", cal)); } /** @@ -654,8 +674,7 @@ public class OutlookFormatDlg extends CaveJFACEDialog{ expDate.setYear(cal.get(Calendar.YEAR)); expDate.setMonth(cal.get(Calendar.MONTH)); expDate.setDay(cal.get(Calendar.DAY_OF_MONTH)); - expTime.setHours(cal.get(Calendar.HOUR_OF_DAY)); - expTime.setMinutes(cal.get(Calendar.MINUTE)); + expTime.setText(String.format("%1$tH%1$tM", cal)); } /** @@ -678,4 +697,35 @@ public class OutlookFormatDlg extends CaveJFACEDialog{ public void setOtlkDlg(OutlookAttrDlg otlkDlg) { this.otlkDlg = otlkDlg; } + + + /** + * Get the expiration hour from the validTime text widget + */ + private int getHourFromTextField( Text txt ){ + int ret =0; + try { + String hm = txt.getText(); + ret = Integer.parseInt(hm.substring(0, hm.length()== 4 ? 2:1 )); + } + catch (Exception e ){ + + } + return ret; + } + + /** + * Get the expiration minute from the validTime text widget + */ + private int getMinuteFromTextField( Text txt ){ + int ret =0; + try { + String hm = txt.getText(); + ret = Integer.parseInt(hm.substring(hm.length()== 4 ? 2:1 ), hm.length()-1); + } + catch (Exception e ){ + + } + return ret; + } } diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/attrdialog/OutlookFormatMsgDlg.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/attrdialog/OutlookFormatMsgDlg.java index 79024e240b..4d4c17c19a 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/attrdialog/OutlookFormatMsgDlg.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/attrdialog/OutlookFormatMsgDlg.java @@ -46,7 +46,8 @@ import com.raytheon.viz.ui.dialogs.CaveJFACEDialog; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * 02/10 ? B. Yin Initial Creation. - * 03/12 $703 B. Yin Generate product text from style sheet + * 03/12 #703 B. Yin Generate product text from style sheet + * 06/12 #786 B. Yin Close all dialogs after text is saved. * * * @@ -186,6 +187,15 @@ public class OutlookFormatMsgDlg extends CaveJFACEDialog { } otlk.saveToFile( dirPath + getFileName(otlk)+".xml"); + + //clean up + this.close(); + ofd.close(); + ofd.getOtlkDlg().drawingLayer.removeSelected(); + ofd.getOtlkDlg().mapEditor.refresh(); + ofd.getOtlkDlg().close(); + PgenUtil.setSelectingMode(); + } } diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/attrdialog/SigmetAttrDlg.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/attrdialog/SigmetAttrDlg.java index c19a0a76db..f41dca2b8c 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/attrdialog/SigmetAttrDlg.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/attrdialog/SigmetAttrDlg.java @@ -95,6 +95,7 @@ import com.vividsolutions.jts.geom.Polygon; * Change KZOA to KZAK. * 03/12 #611 S. Gurung Fixed ability to change SIGMET type (from Area to Line/Isolated and back and forth) * 03/12 #676 Q. Zhou Added Issue Office dropdown list. + * 08/12 #612 S. Gurung Fixed issue related to conversion of phenom Lat/Lon to prepended format * * * @author gzhang @@ -663,6 +664,8 @@ GridData gdText = new GridData(); gdText.widthHint=66; String phenomLat = getPhenomLatLon(txtPheLat.getText().trim(), true); if(!"".equals(phenomLat)) SigmetAttrDlg.this.setEditableAttrPhenomLat(phenomLat); + else + SigmetAttrDlg.this.setEditableAttrPhenomLat(null); } }); txtPheLat.addFocusListener(new FocusListener() { @@ -674,6 +677,8 @@ GridData gdText = new GridData(); gdText.widthHint=66; public void focusLost(FocusEvent e) { if (SigmetAttrDlg.this.getEditableAttrPhenomLat() != null) txtPheLat.setText(SigmetAttrDlg.this.getEditableAttrPhenomLat()); + else + txtPheLat.setText("???"); } }); @@ -687,9 +692,10 @@ GridData gdText = new GridData(); gdText.widthHint=66; txtPheLon.addListener(SWT.Modify, new Listener(){ public void handleEvent(Event e){ String phenomLon = getPhenomLatLon(txtPheLon.getText().trim(), false); - if(!"".equals(phenomLon)) { + if(!"".equals(phenomLon)) SigmetAttrDlg.this.setEditableAttrPhenomLon(phenomLon); - } + else + SigmetAttrDlg.this.setEditableAttrPhenomLon(null); } }); txtPheLon.addFocusListener(new FocusListener() { @@ -701,6 +707,8 @@ GridData gdText = new GridData(); gdText.widthHint=66; public void focusLost(FocusEvent e) { if (SigmetAttrDlg.this.getEditableAttrPhenomLon() != null) txtPheLon.setText(SigmetAttrDlg.this.getEditableAttrPhenomLon()); + else + txtPheLon.setText("???"); } }); @@ -2554,7 +2562,8 @@ GridData gdText = new GridData(); gdText.widthHint=66; private String getPhenomLatLon(String input, boolean isLat) { - if (input.startsWith("S") || input.startsWith("W")) + if (input.startsWith("S") || input.startsWith("s") || input.startsWith("W") || input.startsWith("w") + || input.endsWith("S") || input.endsWith("s") || input.endsWith("W") || input.endsWith("w")) input = "-" + input; input = input.replaceAll("[^-0-9.]",""); diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/attrdialog/SpenesAttrDlg.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/attrdialog/SpenesAttrDlg.java new file mode 100644 index 0000000000..13deec5461 --- /dev/null +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/attrdialog/SpenesAttrDlg.java @@ -0,0 +1,373 @@ +/* + * SpenesAttrDlg + * + * Date created: June 2012 + * + * This code has been developed by the NCEP/SIB for use in the AWIPS2 system. + */ + +package gov.noaa.nws.ncep.ui.pgen.attrdialog; + +import java.awt.Color; + +import gov.noaa.nws.ncep.ui.pgen.PgenStaticDataProvider; +import gov.noaa.nws.ncep.ui.pgen.display.IAttribute; +import gov.noaa.nws.ncep.ui.pgen.elements.Spenes; +import gov.noaa.nws.ncep.viz.common.ui.color.ColorButtonSelector; + +import org.eclipse.jface.dialogs.IDialogConstants; +import org.eclipse.jface.dialogs.MessageDialog; +import org.eclipse.swt.SWT; +import org.eclipse.swt.graphics.RGB; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Combo; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Group; +import org.eclipse.swt.widgets.Label; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.swt.widgets.Button; +import org.eclipse.ui.PlatformUI; + +import com.raytheon.uf.viz.core.exception.VizException; + + +/** + * Singleton attribute dialog for a spenes. + * + *
+ * SOFTWARE HISTORY
+ * Date       	Ticket#		Engineer	Description
+ * ------------	----------	-----------	--------------------------
+ * **           **          B. Yin      Initial Creation
+ * 05/04        734         J. Zeng     Add calling method to create/edit a spenes
+ * 
+ * + */ + +public class SpenesAttrDlg extends LineAttrDlg { + + private static final int CREATE_ID = 201206+0; + private static final int EDIT_ID = 201206+1; + /** + * single instance + */ + private static SpenesAttrDlg INSTANCE = null; + private static SpenesFormatDlg sfDlg = null; + //private Spenes spenes = null; + + private SpenesAttrDlg(Shell parShell) throws VizException { + super(parShell); + } + + /** + * Creates a spenes attribute dialog if the dialog does not exist + * and returns the instance. If the dialog exists, return the instance. + * + * @param parShell + * @return + */ + public static SpenesAttrDlg getInstance( Shell parShell){ + + if ( INSTANCE == null ){ + + try { + + INSTANCE = new SpenesAttrDlg( parShell ); + + } catch (VizException e) { + + e.printStackTrace(); + + } + } + + return INSTANCE; + + } + + /** + * initialize components + */ + protected void initializeComponents() { + + this.getShell().setText("SPENES Attributes"); + + //Panel to hold line attributes + Composite panel0 = new Composite(top, SWT.NONE); + + // layout for the line attributes + GridLayout p0Layout = new GridLayout(2, false); + p0Layout.marginHeight = 3; + p0Layout.marginWidth = 3; + panel0.setLayout(p0Layout); + + createColorAttr(panel0); + createWidthAttr(panel0); + createSmoothAttr(panel0); + + + } + + /** + * Create the button bar for this dialog + * override from the super class + * @param Composite: parent of the dialog + */ + @Override + public void createButtonsForButtonBar(Composite parent){ + createButton(parent, IDialogConstants.OK_ID, "Apply", true); + createButton(parent, CREATE_ID, "Create", true); + createButton(parent, EDIT_ID, "Edit", true); + createButton(parent, IDialogConstants.CANCEL_ID, "Cancel", true); + + getButton(IDialogConstants.OK_ID).setEnabled(false); + getButton(IDialogConstants.CANCEL_ID).setEnabled(false); + getButton(CREATE_ID).setEnabled(true); + getButton(EDIT_ID).setEnabled(true); + } + + @Override + protected Button createButton(Composite parent, int id, String label, + boolean defaultButton) { + Button button = super.createButton(parent,id,label,defaultButton); + button.setLayoutData(new GridData(60,30)); + return button; + } + + /** + * button listener method override from super class. + * @param int button id for button. + */ + @Override + protected void buttonPressed(int buttonId){ + if(IDialogConstants.OK_ID == buttonId) { + okPressed(); + } else if (CANCEL == buttonId){ + cancelPressed(); + } else if (CREATE_ID == buttonId){ + createPressed(); + }else if (EDIT_ID == buttonId){ + editPressed(); + } + } + + /** + * Sets values of all attributes of the dialog. + */ + @Override + public void setAttrForDlg( IAttribute iattr ){ + + //if ( iattr instanceof Spenes ){ + Spenes attr = (Spenes)iattr; + Color[] clr = attr.getColors(); + if ( clr != null ) this.setColor(clr); + + float lw = attr.getLineWidth(); + if ( lw > 0 ) + this.widthSpinnerSlider.setSelection((int)lw); + + double ps = attr.getSmoothFactor(); + if ( ps > 0 ) + this.smoothLvlCbo.select((int)ps); + + this.setSpenes(attr); + + //} + } + + /** + * Create widgets for the Color attribute + */ + private void createColorAttr(Composite comp){ + + colorLbl = new Label( comp, SWT.LEFT ); + colorLbl.setText("Color:"); + cs = new ColorButtonSelector( comp ); + cs.setColorValue( new RGB( 255,0,0 ) ); + } + + /** + * Create widgets for the Line Width attribute + */ + private void createWidthAttr(Composite comp){ + + widthLbl = new Label(comp, SWT.LEFT); + widthLbl.setText("Line Width:"); + + GridLayout gl = new GridLayout( 3, false ); + Group widthGrp = new Group( comp, SWT.NONE ) ; + widthGrp.setLayout( gl ); + + widthSpinnerSlider = + new gov.noaa.nws.ncep.ui.pgen.attrdialog.vaadialog.SpinnerSlider(widthGrp, SWT.HORIZONTAL,1); + widthSpinnerSlider.setLayoutData(new GridData(180,30)); + widthSpinnerSlider.setMinimum(1); + widthSpinnerSlider.setMaximum(10); + widthSpinnerSlider.setIncrement(1); + widthSpinnerSlider.setPageIncrement(3); + widthSpinnerSlider.setDigits(0); + } + + /** + * Create widgets for the smooth Level attribute + */ + private void createSmoothAttr(Composite comp){ + + smoothLbl = new Label(comp, SWT.LEFT); + smoothLbl.setText("Smooth Level:"); + + smoothLvlCbo = new Combo( comp, SWT.DROP_DOWN | SWT.READ_ONLY ); + + smoothLvlCbo.add("0"); + smoothLvlCbo.add("1"); + smoothLvlCbo.add("2"); + + smoothLvlCbo.select( 0 ); + } + + /** + * Return color from the color picker of the dialog + */ + @Override + public Color[] getColors(){ + // IAttribute requires to return an array of colors + // Only the first color is used at this time. + Color[] colors = new Color[2]; + + colors[0] =new java.awt.Color( cs.getColorValue().red, + cs.getColorValue().green, cs.getColorValue().blue ); + + colors[1] = Color.green; + + return colors; + } + /** + * Sets the color of the color picker of the dialog. + * @param clr + */ + @Override + public void setColor( Color clr[] ){ + + cs.setColorValue(new RGB(clr[0].getRed(), clr[0].getGreen(), clr[0].getBlue())); + + } + + /** + * Return line with from the attribute dialog + */ + public float getLineWidth(){ + return widthSpinnerSlider.getSelection(); + } + + /** + * Return smooth level from the attribute dialog + */ + public int getSmoothFactor(){ + return smoothLvlCbo.getSelectionIndex(); + } + /** + * Get the size scale. + */ + public double getSizeScale(){ + return 0; + } + /** + * Return false because jet cannot be closed line. + */ + public Boolean isClosedLine(){ + return true; + } + + /** + * Return false because jet cannot be filled. + */ + public Boolean isFilled(){ + return false; + } + + /** + * @see org.eclipse.jface.dialogs.Dialog#buttonPressed(int) + */ + @Override + public void okPressed(){ + super.okPressed(); + if(de != null) { + Spenes spenes = (Spenes)de; + MessageDialog infoDlg = null; + if ( ! PgenStaticDataProvider.getProvider().isRfcLoaded()){ + infoDlg = new MessageDialog( + PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), + "Information", null, "Loading state, cwa, and rfc maps.\nPlease wait.", + MessageDialog.INFORMATION, new String[]{"OK"}, 0); + infoDlg.setBlockOnOpen(false); + infoDlg.open(); + } + spenes.generateStatesWfosRfcs(); + spenes.setStateZ000(spenes.getStates()); + spenes.setLocation(spenes.getStates()); + spenes.setAttnWFOs(spenes.getCwas()); + spenes.setAttnRFCs(spenes.getRfcs()); + spenes.setLatLon(spenes.getLinePoints()); + + if ( infoDlg !=null && infoDlg.getShell() != null) infoDlg.close(); + } + } + + /** + * @see org.eclipse.jface.dialogs.Dialog#buttonPressed(int) + */ + public void createPressed(){ + if ( de != null ){ + + okPressed(); + + ((Spenes)de).setInitTime(); + sfDlg = SpenesFormatDlg.getInstance(SpenesAttrDlg.this.getShell(), SpenesAttrDlg.INSTANCE, (Spenes)de ); + + sfDlg.setBlockOnOpen(false); + + sfDlg.open(); + + } + + } + + /** + * button for editing spenes + */ + public void editPressed(){ + + if ( de != null ){ + sfDlg = SpenesFormatDlg.getInstance(SpenesAttrDlg.this.getShell(), SpenesAttrDlg.INSTANCE, (Spenes)de ); + sfDlg.setBlockOnOpen(false); + + sfDlg.open(); + // sfDlg.setAttrForDlg(spenes); + } else { + MessageDialog infoDlg = null; + infoDlg = new MessageDialog( + PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), + "Information", null, "No drawing element to edit.", + MessageDialog.INFORMATION, new String[]{"OK"}, 0); + infoDlg.setBlockOnOpen(false); + infoDlg.open(); + } + } + + /** + * set spenes + * @param elem + */ + public void setSpenes(Spenes elem) { + de = elem; + } + + /** + * get spenes + * @return + */ + public Spenes getSpenes(){ + return (Spenes)de; + } +} diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/attrdialog/SpenesFormatDlg.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/attrdialog/SpenesFormatDlg.java new file mode 100644 index 0000000000..a6000aa678 --- /dev/null +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/attrdialog/SpenesFormatDlg.java @@ -0,0 +1,1025 @@ +/* + * SpenesFormatDlg + * + * Date created: June 2012 + * + * This code has been developed by the NCEP/SIB for use in the AWIPS2 system. + */ +package gov.noaa.nws.ncep.ui.pgen.attrdialog; + +import gov.noaa.nws.ncep.ui.pgen.PgenStaticDataProvider; +import gov.noaa.nws.ncep.ui.pgen.elements.DrawableElement; +import gov.noaa.nws.ncep.ui.pgen.elements.Spenes; + +import java.util.ArrayList; +import java.util.List; + +import org.dom4j.Document; +import org.dom4j.Node; +import org.dom4j.io.SAXReader; +import org.eclipse.jface.dialogs.IDialogConstants; +import org.eclipse.jface.dialogs.MessageDialog; +import org.eclipse.swt.SWT; +import org.eclipse.swt.events.ModifyEvent; +import org.eclipse.swt.events.ModifyListener; +import org.eclipse.swt.graphics.Font; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Button; +import org.eclipse.swt.widgets.Combo; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; +import org.eclipse.swt.widgets.DateTime; +import org.eclipse.swt.widgets.Event; +import org.eclipse.swt.widgets.Group; +import org.eclipse.swt.widgets.Label; +import org.eclipse.swt.widgets.Listener; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.swt.widgets.Text; +import org.eclipse.ui.PlatformUI; + +import com.raytheon.uf.viz.core.exception.VizException; +import com.raytheon.viz.ui.dialogs.CaveJFACEDialog; + +/** +* Singleton for a Spenes format dialog. +* +*
+* SOFTWARE HISTORY
+* Date       	Ticket#		Engineer	Description
+* ------------	----------	-----------	--------------------------
+* 05/12		    #734		J. Zeng   	Initial Creation.
+* 
+* +* @author J. Zeng +*/ + +public class SpenesFormatDlg extends CaveJFACEDialog { + /** + * instance of text dialog + */ + private SpenesFormatMsgDlg sfMsgDlg = null; + + /** + * instance of Spenes format dialog + */ + private static SpenesFormatDlg INSTANCE = null; + + /** + * instance of spenes + */ + private static Spenes spenes = null; + + /** + * instance of spenes attr dialog + */ + private SpenesAttrDlg spDlg = null; + + /** + * top level container of all widgets + */ + private Composite top; + + /** + * id for format button + */ + private static int FORMAT_ID = 20120508+0; + + /** + * id of reset button + */ + private static int RESET_ID = 20120508+1; + + /** + * Combo widget for latestDate + */ + private Combo comboLatestData = null; + + /** + * Combo widget for forecaster name + */ + private Combo comboForecaster = null; + + /** + * Combo widget for Outlook level + */ + private Combo comboOutlookLevel = null; + + /** + * text area for state abbreviation + */ + private Text txtAbrv; + + /** + * text area for state information + */ + private Text txtLocation = null; + + /** + * text area for AttnWFOs + */ + private Text txtAttnWFOs = null; + + /** + * text area for AttnRFCs + */ + private Text txtAttnRFCs = null; + + /** + * text area for Event title + */ + private Text txtEvent = null; + + /** + * text area for analysis + */ + private Text txtSatAnaTre = null; + + /** + * text area for addionation precipitation + */ + private Text txtAddlInfo = null; + + /** + * date time for observation hour + */ + private DateTime dtObsHr; + + /** + * gridData for layout of this dialog parts + */ + private GridData singleTxtGridData = new GridData(300,36); + + /** + * button for Satellite Analysis and Trend + */ + private Button btnSatAnaTre = null; + /** + * button for additional precipitation + */ + private Button btnAddlInfo = null; + + /** + * hour for the beginning of the short term + */ + private DateTime dtTermsHr; + + /** + * hour for the ending of the short term + */ + private DateTime dtTerms2Hr; + /** + * DataType name + */ + private static String DATATYPEARRAY[] = new String[] {"GOES-11", "GOES-12", "GOES-13", "GOES-15", "DPD", "IND", "Meteosat", "VAAC"}; + /** + * Variables to retrieve forecasters + */ + private static Document forecasterTbl = null; + private static String FORECASTERS[] = null; + private static String FORECASTER_XPATH = "/forecasters/forecaster"; + private static final String PGEN_FORECASTER = "forecasters.xml"; + + /** + * Array for outlook level + */ + private static String OUTLOOKLEVEL[] = {"HIGH", "MEDIUM", "LOW"}; + + + /** + * Protector constructor for this class + * @param Shell: parent shell for this dialog + * @throws VizException + */ + private SpenesFormatDlg(Shell parentShell, SpenesAttrDlg spDlg) throws VizException{ + super(parentShell); + this.setShellStyle(SWT.TITLE | SWT.MODELESS | SWT.CLOSE); + + this.setSpDlg(spDlg); + readForecasterTbl(); + FORECASTERS = getForecasters(); + } + + /** + * Return the instance of the singleton. + * @param parShell + * @return + */ + public static SpenesFormatDlg getInstance( Shell parentShell, SpenesAttrDlg spenesDlg, Spenes sp){ + if ( INSTANCE == null) { + try { + INSTANCE = new SpenesFormatDlg(parentShell, spenesDlg); + + } catch (VizException e){ + e.printStackTrace(); + } + } + spenes = sp; + + return INSTANCE; + } + + /** + * Creates the dialog area + */ + //@Override + public Control createDialogArea(Composite parent){ + top = (Composite) super.createDialogArea(parent); + + this.getShell().setText( "SPENES FORMAT"); + + //Create the main layout for the shell + GridLayout mainLayout = new GridLayout(2, false); + mainLayout.marginHeight = 3; + mainLayout.marginWidth = 3; + mainLayout.verticalSpacing = 3; + top.setLayout(mainLayout); + + + // Initialize all of the menus, controls, and layouts + //this.initializeComponents(); + + Group top1 = new Group(top,SWT.LEFT); + top1.setLayoutData(new GridData(SWT.FILL,SWT.CENTER,true,true,2,1)); + top1.setLayout(new GridLayout(2,false)); + createArea1(top1); + + Group top2 = new Group(top,SWT.LEFT); + top2.setLayoutData(new GridData(SWT.FILL,SWT.CENTER,true,true,2,1)); + top2.setLayout(new GridLayout(2,false)); + createArea2(top2); + + Group top3 = new Group(top,SWT.LEFT); + top3.setLayoutData(new GridData(SWT.FILL,SWT.CENTER,true,true,2,1)); + top3.setLayout(new GridLayout(2,false)); + createArea3(top3); + + Group top4 = new Group(top,SWT.LEFT); + top4.setLayoutData(new GridData(SWT.FILL,SWT.CENTER,true,true,2,1)); + top4.setLayout(new GridLayout(2,false)); + createArea4(top4); + + + Group top5 = new Group(top,SWT.LEFT); + top5.setLayoutData(new GridData(SWT.FILL,SWT.CENTER,true,true,2,1)); + top5.setLayout(new GridLayout(2,false)); + createArea5(top5); + + return top; + } + + /** + * Open the dialog and initialize the widgets + */ + @Override + public int open(){ + + if ( this.getShell() == null ){ + this.create(); + } + /*if(shellLocation == null){ + this.getShell().setLocation(this.getShell().getParent().getLocation()); + } else { + getShell().setLocation(shellLocation); + }*/ + + return super.open(); + + } + + /** + * get spenes + * @return + */ + public Spenes getSpenes(){ + return spenes; + } + + /** + * set spenes + * @param sp + */ + public void setSpenes(Spenes sp) { + spenes = sp; + } + + /** + * button listener method override from super class. + * @param int button id for button. + */ + @Override + protected void buttonPressed(int buttonId){ + if(IDialogConstants.OK_ID == buttonId) { + okPressed(); + } else if (CANCEL == buttonId){ + cancelPressed(); + } else if (FORMAT_ID == buttonId) { + formatPressed(); + } else if (RESET_ID == buttonId){ + resetPressed(); + } + } + + /** + * button listener for "Format" + */ + public void formatPressed(){ + copyAttrToSpenes(); + + SpenesFormatMsgDlg sfmDlg = new SpenesFormatMsgDlg(this.getParentShell(), SpenesFormatDlg.this); + sfmDlg.setBlockOnOpen(false); + sfmDlg.open(); + } + + /** + * button listener for "Apply" + */ + @Override + public void okPressed(){ + String err= checkErr(); + if ( !err.isEmpty() ){ + MessageDialog infoDlg = new MessageDialog( + PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), + "Warning!", null, err, + MessageDialog.INFORMATION, new String[]{"OK"}, 0); + infoDlg.open(); + } + else { + copyAttrToSpenes(); + spDlg.drawingLayer.resetElement(spenes); + spDlg.mapEditor.refresh(); + } + } + + /** + * Check if all required info are filled in. + * @return string of the error message + */ + private String checkErr(){ + boolean showErr = false; + String err = "The following Problems have not been identified:\n\n"; + System.out.println("Latest Data Used: " + comboLatestData.getText()); + if (comboLatestData.getText().isEmpty()) { + showErr = true; + err += "\nEntry of Latest Data is empty.\n"; + } + + if (comboForecaster.getText().isEmpty()) { + showErr = true; + err += "\nEntry of Forecaster is empty.\n"; + } + if ( txtEvent.getText().isEmpty() ){ + showErr = true; + err += "\nEvent is empty.\n"; + + } + + if ( txtSatAnaTre.getText().isEmpty() ) { + err += "\nSatellite Analysis and Trends is empty.\n"; + } + + if ( showErr ) + return err; + else + return ""; + + } + + /** + * button listener helper for "Reset" + */ + public void resetPressed(){ + txtEvent.setText(""); + txtSatAnaTre.setText(""); + txtAddlInfo.setText(""); + + comboLatestData.deselectAll(); + comboForecaster.deselectAll(); + comboOutlookLevel.deselectAll(); + } + + /** + * Create the button bar for this dialog + * override from the super class + * @param Composite: parent of the dialog + */ + @Override + public void createButtonsForButtonBar(Composite parent){ + + createButton(parent, IDialogConstants.OK_ID, "Apply", true); + createButton(parent, FORMAT_ID, "Format SPENES", true); + createButton(parent, RESET_ID, "Reset", true); + createButton(parent, IDialogConstants.CANCEL_ID, "Cancel", true); + + getButton(IDialogConstants.OK_ID).setEnabled(true); + getButton(FORMAT_ID).setEnabled(true); + getButton(RESET_ID).setEnabled(true); + getButton(IDialogConstants.CANCEL_ID).setEnabled(true); + } + + /** + * helper method for creating dialog area 1 + */ + private void createArea1(Group top) { + + Label lblTime = new Label(top,SWT.LEFT); + lblTime.setText("ESTIMATE...DATA/TIME "); + + Label lblTimeTxt = new Label(top, SWT.LEFT); + if (spenes.getInitDateTime() == null ) spenes.setInitTime(); + lblTimeTxt.setText(spenes.getInitDateTime()); + + Label lblLtsData = new Label(top,SWT.LEFT | SWT.SCROLL_LINE); + lblLtsData.setText("LATEST DATA USED: "); + + comboLatestData = new Combo(top, SWT.DROP_DOWN); + if(DATATYPEARRAY != null) { + for(String str : DATATYPEARRAY){ + comboLatestData.add(str); + } + comboLatestData.select(1); + } + if (spenes.getLatestDataUsed() != null ) + comboLatestData.setText(spenes.getLatestDataUsed()); + + comboLatestData.addListener(SWT.Selection, new Listener(){ + + @Override + public void handleEvent(Event e) { + } + + }); + + Label lblObsHr = new Label(top,SWT.LEFT); + lblObsHr.setText("Observation Time: "); + Composite dt = new Composite(top, SWT.NONE); + GridLayout dtGL = new GridLayout(1,false); + dt.setLayout(dtGL); + dtObsHr = new DateTime(dt, SWT.BORDER | SWT.TIME | SWT.SHORT); + if (spenes.getObsHr() >= 0 ) + dtObsHr.setHours(spenes.getObsHr()); + dtObsHr.setMinutes(0); + dtObsHr.addListener(SWT.Selection, new Listener(){ + @Override + public void handleEvent(Event event) { + + }}); + + Label lblForecaster = new Label(top, SWT.LEFT); + lblForecaster.setText("Forecaster: "); + comboForecaster = new Combo(top, SWT.DROP_DOWN); + if (FORECASTERS != null) { + for (String str : FORECASTERS) { + comboForecaster.add(str); + } + } + if (spenes.getForecasters() != null) + comboForecaster.setText(spenes.getForecasters()); + + comboForecaster.addListener(SWT.Selection, new Listener(){ + + @Override + public void handleEvent(Event e) { + //String fcst = comboForecaster.getText().trim(); + } + + }); + } + + + /** + * helper method for creating dialog area 2 + */ + private void createArea2(Group top){ + + Label lblAbrv = new Label(top, SWT.LEFT); + lblAbrv.setText("States Abrv: "); + + txtAbrv = new Text(top, SWT.LEFT | SWT.BORDER | SWT.WRAP | SWT.V_SCROLL); + txtAbrv.setLayoutData(singleTxtGridData); + //if ( spenes.getStateZ000() != null ) + System.out.println("State Z000: " + spenes.getStateZ000()); + txtAbrv.setText(spenes.getStateZ000()); + txtAbrv.addModifyListener(new TxtModifyListener()); + + Label lblLocation = new Label(top, SWT.LEFT); + lblLocation.setText("Location: "); + + txtLocation = new Text(top, SWT.LEFT | SWT.BORDER | SWT.WRAP | SWT.V_SCROLL); + txtLocation.setLayoutData(singleTxtGridData); + txtLocation.setText(spenes.getLocation()); + txtLocation.addModifyListener(new TxtModifyListener()); + + Label lblAttnWFOs = new Label(top, SWT.LEFT); + lblAttnWFOs.setText("Attn WFOs: "); + txtAttnWFOs = new Text(top, SWT.LEFT | SWT.BORDER | SWT.WRAP | SWT.V_SCROLL); + txtAttnWFOs.setLayoutData(singleTxtGridData); + txtAttnWFOs.setText(spenes.getAttnWFOs()); + txtAttnWFOs.addModifyListener(new TxtModifyListener()); + + Label lblAttnRFCs = new Label(top, SWT.LEFT); + lblAttnRFCs.setText("Attn RFCs: "); + txtAttnRFCs = new Text(top, SWT.LEFT | SWT.BORDER | SWT.WRAP | SWT.V_SCROLL); + txtAttnRFCs.setLayoutData(singleTxtGridData); + txtAttnRFCs.setText(spenes.getAttnRFCs()); + txtAttnRFCs.addModifyListener(new TxtModifyListener()); + } + + /** + * helper method for creating dialog area 3 + */ + private void createArea3(Group top) { + Label lblEvent = new Label(top, SWT.LEFT); + lblEvent.setText("Event: "); + + //txtEvent.setText("");//spenes.getEvent()); + txtEvent = new Text(top,SWT.LEFT | SWT.BORDER | SWT.WRAP | SWT.V_SCROLL); + txtEvent.setLayoutData(singleTxtGridData); + if (spenes.getEvent() != null) + txtEvent.setText(spenes.getEvent()); + txtEvent.addModifyListener(new TxtModifyListener()); + + btnSatAnaTre = new Button( top, SWT.PUSH); + btnSatAnaTre.setText("S.A.T."); + //btnSatAnaTre.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false,2,1)); + btnSatAnaTre.setLayoutData(new GridData(60,26)); + btnSatAnaTre.addListener(SWT.Selection, new Listener(){ + + @Override + public void handleEvent(Event event) { + try { + SpenesSATDlg SATDlg = new SpenesSATDlg(SpenesFormatDlg.this.getShell()); + SATDlg.setBlockOnOpen(false); + SATDlg.open(); + } catch (VizException e) { + e.printStackTrace(); + } + } + + }); + + txtSatAnaTre = new Text(top, SWT.BORDER | SWT.MULTI | SWT.WRAP | SWT.V_SCROLL); + GridData gData1 = new GridData(300,96); + gData1.horizontalAlignment = 7; + txtSatAnaTre.setLayoutData(gData1); + if (spenes.getSatAnalysisTrend() != null) + txtSatAnaTre.setText(spenes.getSatAnalysisTrend()); + txtSatAnaTre.addModifyListener(new TxtModifyListener()); + } + + /** + * helper method for creating dialog area 4 + */ + private void createArea4(Group top) { + + Composite dt = new Composite(top, SWT.NONE); + GridLayout dtGL = new GridLayout(3,false); + dt.setLayout(dtGL); + + Label lblShortTermFrom = new Label(dt,SWT.NONE); + lblShortTermFrom.setText("ShortTerm: "); + + + dtTermsHr = new DateTime(dt, SWT.BORDER | SWT.TIME | SWT.SHORT); + if(spenes.getShortTermBegin() >= 0 ) + dtTermsHr.setHours(spenes.getShortTermBegin()); + dtTermsHr.setMinutes(0); + dtTermsHr.addListener(SWT.Selection, new Listener(){ + @Override + public void handleEvent(Event event) { + }}); + dtTerms2Hr = new DateTime(dt, SWT.BORDER | SWT.TIME | SWT.SHORT); + if(spenes.getShortTermEnd() >= 0 ) + dtTerms2Hr.setHours(spenes.getShortTermEnd()); + dtTerms2Hr.setMinutes(0); + dtTerms2Hr.addListener(SWT.Selection, new Listener(){ + @Override + public void handleEvent(Event event) { + }}); + } + + /** + * helper method for creating dialog area 5 + */ + private void createArea5(Group top) { + Label lblOutlookLevel = new Label(top, SWT.LEFT); + lblOutlookLevel.setText("Confidence: "); + + comboOutlookLevel = new Combo(top, SWT.DROP_DOWN); + if (spenes.getOutlookLevel() != null ) + comboOutlookLevel.setText(spenes.getOutlookLevel()); + if (OUTLOOKLEVEL != null) { + for(String str : OUTLOOKLEVEL){ + comboOutlookLevel.add(str); + } + comboOutlookLevel.select(2); + } + + if (spenes.getOutlookLevel() != null ) + comboOutlookLevel.setText(spenes.getOutlookLevel()); + comboOutlookLevel.addListener(SWT.Selection, new Listener(){ + + @Override + public void handleEvent(Event e) { + + } + }); + + btnAddlInfo = new Button( top, SWT.PUSH); + btnAddlInfo.setText("H.P."); + btnAddlInfo.setLayoutData(new GridData(60,26)); + btnAddlInfo.addListener(SWT.Selection, new Listener(){ + + @Override + public void handleEvent(Event event) { + + try { + SpenesHPDlg HPDlg = new SpenesHPDlg(SpenesFormatDlg.this.getShell()); + HPDlg.setBlockOnOpen(false); + HPDlg.open(); + } catch (VizException e) { + + e.printStackTrace(); + } + } + + }); + + //txtAddlInfo.setText(spenes.getAddlInfo()); + txtAddlInfo = new Text(top, SWT.BORDER | SWT.MULTI | SWT.WRAP | SWT.V_SCROLL); + GridData gData2 = new GridData(300,96); + gData2.horizontalAlignment = 7; + txtAddlInfo.setLayoutData(gData2); + if (spenes.getAddlInfo() != null ) + txtAddlInfo.setText(spenes.getAddlInfo()); + txtAddlInfo.addModifyListener(new TxtModifyListener()); + + } + + /** + * listener for modifying text + */ + public class TxtModifyListener implements ModifyListener{ + @Override + public void modifyText(ModifyEvent e){ + + if(e.widget instanceof Text){ + + }else if(e.widget instanceof Combo){ + + } + } + } + + /** + * read Forecaster table + * @return + */ + public static Document readForecasterTbl() { + if (FORECASTERS == null) { + try { + String forecasterFile = PgenStaticDataProvider.getProvider().getFileAbsolutePath( + PgenStaticDataProvider.getProvider().getPgenLocalizationRoot() + PGEN_FORECASTER ); + + SAXReader reader = new SAXReader(); + forecasterTbl = reader.read(forecasterFile); + } catch (Exception e) { + e.printStackTrace(); + } + } + + return forecasterTbl; + } + + /** + * get forecaster name + * @return + */ + public static String[] getForecasters() { + if (forecasterTbl == null) + FORECASTERS = new String[] {"BALDWIN", "BIRCH", "EVANS", "GALLINA"}; + else { + List list = new ArrayList(); + List nodes = forecasterTbl.selectNodes(FORECASTER_XPATH); + + for (Node node : nodes) { + list.add( node.valueOf("@name").toString()); + } + + FORECASTERS = new String[list.size()]; + FORECASTERS = list.toArray(FORECASTERS); + } + + return FORECASTERS; + } + + /** + * get spenesAttrDlg + * @return + */ + public SpenesAttrDlg getSpDlg(){ + return spDlg; + } + + /** + * set spenesAttrDlg + * @param spDlg + */ + public void setSpDlg(SpenesAttrDlg spDlg){ + this.spDlg = spDlg; + } + + + + /** + * Close the format dialog and the message dialog + */ + @Override + public boolean close(){ + if (sfMsgDlg != null ) sfMsgDlg.close(); + return super.close(); + } + + /** + * method to copy dialog attributes to the Spenes + */ + public void copyAttrToSpenes(){ + spenes.setInitDateTime(spenes.getInitDateTime()); + spenes.setStateZ000(txtAbrv.getText()); + spenes.setLatestData(comboLatestData.getText()); + spenes.setObsHr(dtObsHr.getHours()); + spenes.setForecasters(comboForecaster.getText()); + spenes.setLocation(txtLocation.getText()); + spenes.setAttnWFOs(txtAttnWFOs.getText()); + spenes.setAttnRFCs(txtAttnRFCs.getText()); + spenes.setEvent(txtEvent.getText()); + spenes.setSatAnalysisTrend(txtSatAnaTre.getText()); + spenes.setShortTermBegin(dtTermsHr.getHours()); + spenes.setShortTermEnd(dtTerms2Hr.getHours()); + spenes.setOutlookLevel(comboOutlookLevel.getText()); + spenes.setAddlInfo(txtAddlInfo.getText()); + } + + /** + * Dialog to edit satellite analysis and trends + * @author jzeng + * + */ + private class SpenesSATDlg extends CaveJFACEDialog { + private int RESETSAT_ID = 2012062601; + + /* + * the single instance of this type + */ + private Composite top = null; + + private Text txtSAT; + private String message = ""; + + //SpenesFormatDlg sfDlg = null; + + protected SpenesSATDlg(Shell parShell) throws VizException { + super(parShell); + } + + /** + * create the dialog area for this dialog type + */ + @Override + public Control createDialogArea(Composite parent) { + getShell().setText("Edit Satellite Analysis and Trends ..."); + + top = (Composite) super.createDialogArea(parent); + + /** + * Create the main layout for the dialog area. + */ + GridLayout mainLayout = new GridLayout(1, true); + mainLayout.marginHeight = 3; + mainLayout.marginWidth = 3; + top.setLayout(mainLayout); + + + txtSAT = new Text(top, SWT.BORDER | SWT.MULTI | SWT.WRAP | SWT.V_SCROLL); + txtSAT.setFont( new Font(txtSAT.getDisplay(), "Courier", 12, SWT.NORMAL)); + txtSAT.setLayoutData(new GridData(500,600)); + txtSAT.setText(txtSatAnaTre.getText()); + txtSAT.addModifyListener(new TxtModifyListener()); + + return top; + } + + /*@Override + public void setAttrForDlg(IAttribute ia) { + + }*/ + + /** + * Create the button bar for this dialog + * override from the super class + * @param Composite: parent of the dialog + */ + @Override + public void createButtonsForButtonBar(Composite parent){ + createButton(parent, IDialogConstants.OK_ID, "Ok", true); + createButton(parent, RESETSAT_ID, "Reset", true); + createButton(parent, IDialogConstants.CANCEL_ID, "Cancel", true); + + this.getButton(IDialogConstants.OK_ID).setEnabled(true); + this.getButton(RESETSAT_ID).setEnabled(true); + this.getButton(IDialogConstants.CANCEL_ID).setEnabled(true); + + + } + + /** + * button listener method override from super class. + * @param int button id for button. + */ + @Override + protected void buttonPressed(int buttonId){ + if(IDialogConstants.OK_ID == buttonId) { + okPressed(); + } else if(RESETSAT_ID == buttonId){ + resetPressed(); + } else if (CANCEL == buttonId){ + cancelPressed(); + } + + + } + + /** + * clean all the texts for next open up + */ + private void resetSAT(){ + txtSAT.setText(""); + message = ""; + } + + /* + * @see org.eclipse.jface.dialogs.Dialog#buttonPressed(int) + */ + @Override + public void okPressed(){ + message = txtSAT.getText(); + if (message != null){ + txtSatAnaTre.setText(message); + } + close(); + } + + @Override + public void cancelPressed(){ + super.cancelPressed(); + } + + /** + * Reset the text + */ + public void resetPressed(){ + resetSAT(); + } + + @Override + /** + * Set the location of the dialog + */ + public int open(){ + + if ( this.getShell() == null ){ + this.create(); + } + // this.getShell().setLocation(this.getShell().getParent().getLocation()); + + this.getButtonBar().pack(); + return super.open(); + + } + } + + /** + * dialog for heavy precipitation + * @author jzeng + * + */ + private class SpenesHPDlg extends CaveJFACEDialog { + + private int RESETHP_ID = 2012062602; + + /* + * the single instance of this type + */ + private Composite top = null; + + private Text txtHP; + private String message = ""; + + //SpenesFormatDlg sfDlg = null; + + protected SpenesHPDlg(Shell parShell) throws VizException { + super(parShell); + } + + /** + * create the dialog area for this dialog type + */ + @Override + public Control createDialogArea(Composite parent) { + getShell().setText("Edit Heavy Precipitation..."); + + top = (Composite) super.createDialogArea(parent); + + /** + * Create the main layout for the dialog area. + */ + GridLayout mainLayout = new GridLayout(1, true); + mainLayout.marginHeight = 3; + mainLayout.marginWidth = 3; + top.setLayout(mainLayout); + + + txtHP = new Text(top, SWT.BORDER | SWT.MULTI | SWT.WRAP | SWT.V_SCROLL); + txtHP.setFont( new Font(txtHP.getDisplay(), "Courier", 12, SWT.NORMAL)); + txtHP.setLayoutData(new GridData(500,600)); + txtHP.setText(txtAddlInfo.getText()); + txtHP.addModifyListener(new TxtModifyListener()); + + return top; + } + + /** + * Create the button bar for this dialog + * override from the super class + * @param Composite: parent of the dialog + */ + @Override + public void createButtonsForButtonBar(Composite parent){ + createButton(parent, IDialogConstants.OK_ID, "Ok", true); + createButton(parent, RESETHP_ID, "Reset", true); + createButton(parent, IDialogConstants.CANCEL_ID, "Cancel", true); + + getButton(IDialogConstants.OK_ID).setEnabled(true); + getButton(RESETHP_ID).setEnabled(true); + getButton(IDialogConstants.CANCEL_ID).setEnabled(true); + + } + + /** + * button listener method override from super class. + * @param int button id for button. + */ + @Override + protected void buttonPressed(int buttonId){ + if(IDialogConstants.OK_ID == buttonId) { + okPressed(); + } else if(RESETHP_ID == buttonId){ + resetPressed(); + } else if (CANCEL == buttonId){ + cancelPressed(); + } + } + /** + * clean all the texts for next open up + */ + private void resetHP(){ + txtHP.setText(""); + message = ""; + } + + /* + * @see org.eclipse.jface.dialogs.Dialog#buttonPressed(int) + */ + @Override + public void okPressed(){ + message = txtHP.getText(); + if (message != null){ + txtAddlInfo.setText(message); + } + close(); + } + + /** + * Reset Heavy Precipitation + */ + public void resetPressed(){ + resetHP(); + } + + @Override + /** + * Set the location of the dialog + */ + public int open(){ + + if ( this.getShell() == null ){ + this.create(); + } + this.getButtonBar().pack(); + return super.open(); + + } + } + + +} diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/attrdialog/SpenesFormatMsgDlg.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/attrdialog/SpenesFormatMsgDlg.java new file mode 100644 index 0000000000..fe5128b99a --- /dev/null +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/attrdialog/SpenesFormatMsgDlg.java @@ -0,0 +1,282 @@ +/* + * SpenesFormatMsgDlg + * + * Date created: June 2012 + * + * This code has been developed by the NCEP/SIB for use in the AWIPS2 system. + */ + +package gov.noaa.nws.ncep.ui.pgen.attrdialog; + +import gov.noaa.nws.ncep.ui.pgen.PgenUtil; +import java.io.File; +import java.io.FileWriter; + +import org.eclipse.jface.dialogs.IDialogConstants; + +import org.eclipse.swt.SWT; +import org.eclipse.swt.events.DisposeEvent; +import org.eclipse.swt.events.DisposeListener; +import org.eclipse.swt.events.ModifyEvent; +import org.eclipse.swt.events.ModifyListener; +import org.eclipse.swt.graphics.Font; +import org.eclipse.swt.graphics.FontMetrics; +import org.eclipse.swt.graphics.GC; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Combo; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; +import org.eclipse.swt.widgets.Label; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.swt.widgets.Text; + +import com.raytheon.viz.ui.dialogs.CaveJFACEDialog; + +import gov.noaa.nws.ncep.ui.pgen.elements.Spenes; +/** +* Singleton for a Spenes format message dialog. +* +*
+* SOFTWARE HISTORY
+* Date       	Ticket#		Engineer	Description
+* ------------	----------	-----------	--------------------------
+* 05/12		    #734		J. Zeng   	Initial Creation.
+* 
+* +* @author J. Zeng +*/ +public class SpenesFormatMsgDlg extends CaveJFACEDialog{ + + //top level container for all widgets + private Composite top; + + //text message to display + private String spenesMsg; + + private Spenes spenes; + + private SpenesFormatDlg sfDlg; + private Text txtFileLabel; + + //dialog size + private final int NUM_LINES = 25; + private final int NUM_COLUMNS = 68; + + + /** + * constructor + */ + protected SpenesFormatMsgDlg(Shell parentShell, SpenesFormatDlg sfd){ + super(parentShell); + sfDlg = sfd; + spenes = sfDlg.getSpenes(); + } + + /** + * get the file name + * @return + */ + private String getTxtFileName() { + String connector = "_"; + StringBuilder sb = new StringBuilder(); + sb.append(PgenUtil.getWorkingDirectory()+ File.separator); + sb.append( spenes.getName()); + sb.append(connector); + String initDataTime = spenes.getInitDateTime().replace(" ", connector).replace("/", connector); + sb.append(initDataTime); + sb.append(".txt"); + String spenesTxtFileName = sb.toString(); + return spenesTxtFileName; + } + + /** + * Creates the dialog area + */ + @Override + public Control createDialogArea(Composite parent){ + getShell().setText("SPENES TEXT"); + + top = (Composite) super.createDialogArea(parent); + + /** + * Create the main layout for the dialog area. + */ + GridLayout mainLayout = new GridLayout(1, true); + mainLayout.marginHeight = 3; + mainLayout.marginWidth = 3; + top.setLayout(mainLayout); + + /* + * Create a text box for the WCL message + */ + Text messageBox = new Text(top, SWT.MULTI | SWT.BORDER | SWT.V_SCROLL | SWT.WRAP); + messageBox.setFont(new Font(messageBox.getDisplay(),"Courier",12, SWT.NORMAL) ); + GridData gd = new GridData(GridData.FILL_HORIZONTAL); + + // Calculate approximate size of text box to display 25 lines at 80 characters each + gd.heightHint = NUM_LINES * messageBox.getLineHeight(); + GC gc = new GC (messageBox); + FontMetrics fm = gc.getFontMetrics (); + gd.widthHint = NUM_COLUMNS * fm.getAverageCharWidth (); + + messageBox.setLayoutData(gd); + if (spenes != null ){ + setMessage( generateSpenesText(spenes)); + } + messageBox.setText(spenesMsg); + + // Make sure to dispose of font + messageBox.addDisposeListener(new DisposeListener() { + + @Override + public void widgetDisposed(DisposeEvent e) { + Text w = (Text)e.widget; + w.getFont().dispose(); + } + + }); + + /* + * Add horizontal separator + */ + Label sep = new Label(top, SWT.HORIZONTAL | SWT.SEPARATOR); + sep.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); + + /* + * Set label to display output file name + */ + Label filelabel = new Label(top, SWT.NONE ); + filelabel.setText("SPENES File Name: " ); + + txtFileLabel = new Text(top, SWT.LEFT | SWT.BORDER | SWT.WRAP ); + GridData gData1 = new GridData(400,16); + gData1.horizontalAlignment = 7; + txtFileLabel.setLayoutData(gData1); + txtFileLabel.setText(getTxtFileName()); + txtFileLabel.addModifyListener(new TxtModifyListener()); + + return top; + } + + /** + * To listen text modification + */ + private class TxtModifyListener implements ModifyListener{ + @Override + public void modifyText(ModifyEvent e){ + //String txt = ""; + if(e.widget instanceof Text){ + //txt =((Text)e.widget).getText(); + }else if(e.widget instanceof Combo){ + } + + } + } + + /* + * + * (non-Javadoc) + * @see org.eclipse.jface.dialogs.Dialog#buttonPressed(int) + */ + @Override + protected void okPressed() { + String txtFileName = txtFileLabel.getText(); + System.out.println("File saved: " + txtFileName); + /* + * Save SPENES button pressed. Save SPENES Message to a file + */ + File out = new File(txtFileName); + try { + FileWriter fw = new FileWriter(out); + fw.write(spenesMsg); + fw.close(); + } + catch (Exception e) { + System.out.println("Problem writing to file "+out.getAbsolutePath()); + } + + super.okPressed(); + } + + /** + * Set spenes text + * @param spenes message + */ + public void setMessage(String spenesMessage) { + spenesMsg = spenesMessage; + } + + @Override + /** + * Set the location of the dialog + */ + public int open(){ + + if ( this.getShell() == null ){ + this.create(); + } + // this.getShell().setLocation(this.getShell().getParent().getLocation()); + this.getButton(IDialogConstants.OK_ID).setText("Save"); + this.getButtonBar().pack(); + return super.open(); + + } + + /** + * generate spenes text message + * @param sp + * @return + */ + private String generateSpenesText( Spenes sp){ + + sp.generateStatesWfosRfcs(); + + StringBuilder sb = new StringBuilder(); + sb.append("ZCZC NFDSPENES ALL\n\nSPENES\n\n"); + + sb.append(sp.getStateZ000()); + //issue time + sb.append("\n.\n\nSATELLITE PRECIPITATION ESTIMATES..DATE/TIME "); + //sb.append(String.format("%1$tm/%1$td/%1$ty %1$tH%1$tMZ", getInitTime())); + sb.append(sp.getInitDateTime()); + + sb.append("\n\nSATELLITE ANALYSIS BRANCH/NESDIS---NPPU---TEL.301-763-8678\n\nLATEST DATA USED:"); + sb.append(sp.getLatestDataUsed()); + sb.append(" " + sp.getObsHr() + "00Z" ); + sb.append(" " + sp.getForecasters()); + sb.append("\n\n.\n\nLOCATION..."); + sb.append(sp.getLocation()); + + sb.append("\n\n.\n\nATTN WFOS..."); + sb.append(sp.getAttnWFOs()); + sb.append("\n\n.\n\nATTN RFCS..."); + sb.append(sp.getAttnRFCs()); + + sb.append("\n\n.\nEVENT..."); + sb.append(sp.getEvent()); + + sb.append("\n\n.\n\nSATELLITE ANALYSIS AND TRENDS..." ); + sb.append(" " + sp.getSatAnalysisTrend() ); + sb.append("\n\n.\n\n"); + sb.append("AN ANNOTATED SATELLITE GRAPHIC SHOWING THE HEAV PERCIPITATION THREAT AREA\n\n"); + sb.append("SHOULD BE AVAILABLE ON THE INTERNET ADDRESS LISTED BELOW IN APPROXIMATELY\n\n10-15 MINUTES.\n\n.\n\n"); + sb.append("SHORT TERM OUTLOOK VALID "); + sb.append(sp.getShortTermBegin() +"00-"+ sp.getShortTermEnd()+"00Z"); + sb.append("... " + sp.getOutlookLevel()); + sb.append(" CONFIDENCE FACTOR IN SHORT TERM OUTLOOK..."); + sb.append(sp.getAddlInfo()); + sb.append("\n\n.\n\n"); + sb.append("SEE NCEP HPC DISCUSSION AND QPF/S FOR FORECAST.\n\n....NESDIS IS A MEMBER OF 12 PLANET....\n\n.\n\n"); + sb.append("SSD\\SAB WEB ADDRESS FOR PRECIP ESTIMATES:\n\nHTTP://WWW.SSD.NOAA.GOV/PS/PCPN/\n\n"); + sb.append("...ALL LOWER CASE EXCEPT /PS/PCPN/\n\n.\n\n"); + + //lat/lon + sb.append("LAT...LON "); + sb.append(sp.getLatLon()); + sb.append("\n\n.\n\nNNNN"); + + return sb.toString(); + } + +} diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/attrdialog/TcmAttrDlg.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/attrdialog/TcmAttrDlg.java index 729a334387..12c0c3b565 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/attrdialog/TcmAttrDlg.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/attrdialog/TcmAttrDlg.java @@ -60,6 +60,7 @@ import com.vividsolutions.jts.geom.Coordinate; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * 09/11 ? B. Yin Initial Creation. + * 08/21 626 B. Yin Change quadrants to the correct order * * * @@ -475,8 +476,9 @@ public class TcmAttrDlg extends AttrDlg implements ITcm, SelectionListener { fd.top = new FormAttachment(validTime,5, SWT.TOP); fd.left = new FormAttachment(validTime, 5, SWT.RIGHT); utcLabel.setLayoutData(fd); + /* - * 12ft label + * NE 12ft label */ Label ne12ftLabel = new Label(g1,SWT.NONE); ne12ftLabel.setText("NE12FT:"); @@ -486,7 +488,7 @@ public class TcmAttrDlg extends AttrDlg implements ITcm, SelectionListener { ne12ftLabel.setLayoutData(fd); /* - * 12ft text field + * NE 12ft text field */ ne12ftField = new Text(g1,SWT.SINGLE | SWT.BORDER); fd = new FormData(); @@ -494,37 +496,39 @@ public class TcmAttrDlg extends AttrDlg implements ITcm, SelectionListener { fd.left = new FormAttachment(0, 10); ne12ftField.setLayoutData(fd); + /* - * 12ft label + * SE 12ft label */ - Label nw12ftLabel = new Label(g1,SWT.NONE); - nw12ftLabel.setText("NW12FT:"); + Label se12ftLabel = new Label(g1,SWT.NONE); + se12ftLabel.setText("SE12FT:"); fd = new FormData(); fd.top = new FormAttachment(ne12ftLabel,0, SWT.TOP); fd.left = new FormAttachment(ne12ftLabel,50, SWT.RIGHT); - nw12ftLabel.setLayoutData(fd); + se12ftLabel.setLayoutData(fd); /* - * 12ft text field + * SE 12ft text field */ - nw12ftField = new Text(g1,SWT.SINGLE | SWT.BORDER); + se12ftField = new Text(g1,SWT.SINGLE | SWT.BORDER); fd = new FormData(); - fd.top = new FormAttachment(nw12ftLabel,5, SWT.BOTTOM); - fd.left = new FormAttachment(nw12ftLabel,0, SWT.LEFT); - nw12ftField.setLayoutData(fd); + fd.top = new FormAttachment(se12ftLabel,5, SWT.BOTTOM); + fd.left = new FormAttachment(se12ftLabel,0, SWT.LEFT); + se12ftField.setLayoutData(fd); + /* - * 12ft label + * SW 12ft label */ Label sw12ftLabel = new Label(g1,SWT.NONE); sw12ftLabel.setText("SW12FT:"); fd = new FormData(); - fd.top = new FormAttachment(nw12ftLabel,0, SWT.TOP); - fd.left = new FormAttachment(nw12ftLabel,50, SWT.RIGHT); + fd.top = new FormAttachment(se12ftLabel,0, SWT.TOP); + fd.left = new FormAttachment(se12ftLabel,50, SWT.RIGHT); sw12ftLabel.setLayoutData(fd); /* - * 12ft text field + * SW 12ft text field */ sw12ftField = new Text(g1,SWT.SINGLE | SWT.BORDER); fd = new FormData(); @@ -533,23 +537,24 @@ public class TcmAttrDlg extends AttrDlg implements ITcm, SelectionListener { sw12ftField.setLayoutData(fd); /* - * 12ft label + * NW 12ft label */ - Label se12ftLabel = new Label(g1,SWT.NONE); - se12ftLabel.setText("SE12FT:"); + Label nw12ftLabel = new Label(g1,SWT.NONE); + nw12ftLabel.setText("NW12FT:"); fd = new FormData(); fd.top = new FormAttachment(sw12ftLabel,0, SWT.TOP); fd.left = new FormAttachment(sw12ftLabel,50, SWT.RIGHT); - se12ftLabel.setLayoutData(fd); + nw12ftLabel.setLayoutData(fd); /* - * 12ft text field + * NW 12ft text field */ - se12ftField = new Text(g1,SWT.SINGLE | SWT.BORDER); + nw12ftField = new Text(g1,SWT.SINGLE | SWT.BORDER); fd = new FormData(); - fd.top = new FormAttachment(se12ftLabel,5, SWT.BOTTOM); - fd.left = new FormAttachment(se12ftLabel,0, SWT.LEFT); - se12ftField.setLayoutData(fd); + fd.top = new FormAttachment(nw12ftLabel,5, SWT.BOTTOM); + fd.left = new FormAttachment(nw12ftLabel,0, SWT.LEFT); + nw12ftField.setLayoutData(fd); + } @@ -658,32 +663,34 @@ public class TcmAttrDlg extends AttrDlg implements ITcm, SelectionListener { lonField = new Text(comp2, SWT.SINGLE | SWT.BORDER); /* - * Breakpoint 1 label + * WindMax + */ + Label windMaxLabel = new Label(comp2,SWT.NONE); + windMaxLabel.setText("WindMax:"); + windMaxField = new Text(comp2, SWT.SINGLE | SWT.BORDER); + + /* + * Gust */ Label gustLabel = new Label(comp2,SWT.NONE); gustLabel.setText("Gust:"); gustField = new Text(comp2, SWT.SINGLE | SWT.BORDER); - // bkpt1Field.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL)); /* - * Breakpoint 2 label - */ - Label windMaxLabel = new Label(comp2,SWT.NONE); - windMaxLabel.setText("WindMax:"); - windMaxField = new Text(comp2, SWT.SINGLE | SWT.BORDER); - - Label spdLabel = new Label(comp2,SWT.NONE); - spdLabel.setText("StormSpd:"); - spdField = new Text(comp2, SWT.SINGLE | SWT.BORDER); - - // bkpt1Field.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL)); - /* - * Breakpoint 2 label + * StormDir */ Label dirLabel = new Label(comp2,SWT.NONE); dirLabel.setText("StormDir:"); dirField = new Text(comp2, SWT.SINGLE | SWT.BORDER); + /* + * StormSpd + */ + Label spdLabel = new Label(comp2,SWT.NONE); + spdLabel.setText("StormSpd:"); + spdField = new Text(comp2, SWT.SINGLE | SWT.BORDER); + + Composite comp3 = new Composite(fcstInfo, SWT.NONE); GridLayout gdl1 = new GridLayout(5, true); comp3.setLayout(gdl1); @@ -693,36 +700,37 @@ public class TcmAttrDlg extends AttrDlg implements ITcm, SelectionListener { Label neLabel = new Label(comp3,SWT.NONE); neLabel.setText("NorthEast"); - Label nwLabel = new Label(comp3,SWT.NONE); - nwLabel.setText("NorthWest"); - Label seLabel = new Label(comp3,SWT.NONE); - seLabel.setText("SouthWest"); Label swLabel = new Label(comp3,SWT.NONE); swLabel.setText("SouthEast"); + Label seLabel = new Label(comp3,SWT.NONE); + seLabel.setText("SouthWest"); + Label nwLabel = new Label(comp3,SWT.NONE); + nwLabel.setText("NorthWest"); + Label spd34Label = new Label(comp3,SWT.NONE); spd34Label.setText("34 Knots"); ne34Field = new Text(comp3, SWT.SINGLE | SWT.BORDER); - nw34Field = new Text(comp3, SWT.SINGLE | SWT.BORDER); - sw34Field = new Text(comp3, SWT.SINGLE | SWT.BORDER); se34Field = new Text(comp3, SWT.SINGLE | SWT.BORDER); + sw34Field = new Text(comp3, SWT.SINGLE | SWT.BORDER); + nw34Field = new Text(comp3, SWT.SINGLE | SWT.BORDER); Label spd50Label = new Label(comp3,SWT.NONE); spd50Label.setText("50 Knots"); ne50Field = new Text(comp3, SWT.SINGLE | SWT.BORDER); - nw50Field = new Text(comp3, SWT.SINGLE | SWT.BORDER); - sw50Field = new Text(comp3, SWT.SINGLE | SWT.BORDER); se50Field = new Text(comp3, SWT.SINGLE | SWT.BORDER); + sw50Field = new Text(comp3, SWT.SINGLE | SWT.BORDER); + nw50Field = new Text(comp3, SWT.SINGLE | SWT.BORDER); Label spd64Label = new Label(comp3,SWT.NONE); spd64Label.setText("64 Knots"); ne64Field = new Text(comp3, SWT.SINGLE | SWT.BORDER); - nw64Field = new Text(comp3, SWT.SINGLE | SWT.BORDER); - sw64Field = new Text(comp3, SWT.SINGLE | SWT.BORDER); se64Field = new Text(comp3, SWT.SINGLE | SWT.BORDER); + sw64Field = new Text(comp3, SWT.SINGLE | SWT.BORDER); + nw64Field = new Text(comp3, SWT.SINGLE | SWT.BORDER); /* * Composite used to group Apply, delete segment, and new segment buttons diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/attrdialog/TrackAttrDlg.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/attrdialog/TrackAttrDlg.java index 0010d44eab..ad2f481a7e 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/attrdialog/TrackAttrDlg.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/attrdialog/TrackAttrDlg.java @@ -57,6 +57,8 @@ import gov.noaa.nws.ncep.viz.common.ui.color.ColorButtonSelector; * 04/11 #? B. Yin Re-factor IAttribute * 08/11 #? TTR58 B. Yin Made the time factors editable. * 02/12 TTR456 Q.Zhou Added speed units combo, roundTo combo and roundDirTo combo. + * 06/12 #777 Q.Zhou Modified DEFAULT_NUMBER_OF_TIMES. + * Added isNewTrack flag to make the FirstTime(/SecondTime) current time when create a Track * * * @author M. Gao @@ -74,7 +76,7 @@ public class TrackAttrDlg extends AttrDlg implements ITrack{ public static String[] BoxName = new String[]{ "Normal", "Boxed", "Blanked", "Outline" }; - private final int DEFAULT_NUMBER_OF_TIMES = 2; + private final int DEFAULT_NUMBER_OF_TIMES = 5; private final int DEFAULT_HOUR_SHIFT_FOR_FIRST_TIME = 4; private final int DEFAULT_HOUR_SHIFT_BEYOND_FIRST_TIME = 1; @@ -130,12 +132,14 @@ public class TrackAttrDlg extends AttrDlg implements ITrack{ private Calendar firstTimeCalendar; private Calendar secondTimeCalendar; - private int numberOfTimes = DEFAULT_NUMBER_OF_TIMES; //set the default to 2 + private int numberOfTimes = DEFAULT_NUMBER_OF_TIMES; //set the default to 5 TrackExtrapPointInfoDlg trackExtrapPointInfoDlg; private static TrackAttrDlg INSTANCE = null; + public boolean isNewTrack = false; + /** * Private constructor * @param parShell @@ -263,9 +267,18 @@ public class TrackAttrDlg extends AttrDlg implements ITrack{ /* * 2. restore first time and second time text values */ + if (isNewTrack == true) { + String[] firstSecondTimeValueArray = getFirstSecondTimeInitialTimeValueForSetTimeButton(); + getFirstTimeText().setText(firstSecondTimeValueArray[0]); + getSecondTimeText().setText(firstSecondTimeValueArray[1]); + } + else { + getFirstTimeText().setText(getFirstOrSecondTimeStringValue(track.getFirstTimeCalendar(), true, track.getInitialPoints())); getSecondTimeText().setText(getFirstOrSecondTimeStringValue(track.getSecondTimeCalendar(), false, track.getInitialPoints())); + } + //isNewTrack = false; /* * 3. restore Number of times value */ @@ -375,6 +388,8 @@ public class TrackAttrDlg extends AttrDlg implements ITrack{ * @param listener */ private void initializeComponents(Composite topComposite) { + isNewTrack = true; + int textWidth = 120; //160; int textHeight = 15; //40; @@ -715,6 +730,42 @@ public class TrackAttrDlg extends AttrDlg implements ITrack{ setSecondTimeCalendar(calendar); timeValueResult[1] = getDateTimeStringValue(calendar); +// Calendar calendar = Calendar.getInstance(TimeZone.getTimeZone("GMT")); +// //calendar.add(Calendar.HOUR_OF_DAY, DEFAULT_HOUR_SHIFT_FOR_FIRST_TIME); +// setFirstTimeCalendar(calendar); +// timeValueResult[0] = getDateTimeStringValue(calendar); +// +// String intervalStr = getPreviousIntervalTimeValue(); //intervalTimeValue; +// System.out.println("intervalStr "+intervalStr); +// +// if (intervalStr == null || intervalStr.equalsIgnoreCase("")) +// intervalStr = "1:00"; +// String[] intervalString = intervalStr.split(":"); +// +// int day = 0; +// int hr = 0; +// int min = 0; +// if (intervalString.length == 1){ +// try { +// hr = Integer.parseInt(intervalString[0]); +// } +// catch (NumberFormatException e) { +// } +// } +// else if (intervalString.length == 2){ +// try { +// hr = Integer.parseInt(intervalString[0]); +// min = Integer.parseInt(intervalString[1]); +// } +// catch (NumberFormatException e) { +// } +// } +// +// calendar.add(Calendar.HOUR_OF_DAY, hr); +// calendar.add(Calendar.MINUTE, min); +// setSecondTimeCalendar(calendar); +// timeValueResult[1] = getDateTimeStringValue(calendar); + return timeValueResult; } diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/attrdialog/WatchBoxAttrDlg.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/attrdialog/WatchBoxAttrDlg.java index fff8e0a97c..00a43857df 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/attrdialog/WatchBoxAttrDlg.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/attrdialog/WatchBoxAttrDlg.java @@ -14,6 +14,7 @@ import java.awt.Color; import org.eclipse.jface.dialogs.IDialogConstants; import org.eclipse.swt.SWT; +import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Event; import org.eclipse.swt.widgets.Listener; import org.eclipse.swt.widgets.Shell; @@ -556,15 +557,25 @@ public class WatchBoxAttrDlg extends AttrDlg implements IWatchBox{ */ public void openSpecDlg(){ if (dispBtn.getText().equalsIgnoreCase("Show Display")){ + final Shell shell = this.getShell(); + //make sure the spec dialog is on top + Display.getDefault().asyncExec(new Runnable() { + @Override + public void run() { + if (!( shell == null || shell.isDisposed() )) { // make sure the dialog is not closed dispBtn.setText("Hide Display"); if ( infoDlg == null ){ infoDlg = WatchInfoDlg.getInstance(WatchBoxAttrDlg.this.getParentShell(), INSTANCE); } infoDlg.setBlockOnOpen(false); + infoDlg.open(); infoDlg.clearCwaPane(); infoDlg.createCWAs(wb.getWFOs()); infoDlg.setStatesWFOs(); + } + } + }); } else { diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/attrdialog/WatchFormatDlg.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/attrdialog/WatchFormatDlg.java index 6d1e17e522..101d8e94dc 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/attrdialog/WatchFormatDlg.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/attrdialog/WatchFormatDlg.java @@ -8,11 +8,13 @@ package gov.noaa.nws.ncep.ui.pgen.attrdialog; +import gov.noaa.nws.ncep.ui.pgen.PgenStaticDataProvider; import gov.noaa.nws.ncep.ui.pgen.PgenUtil; import gov.noaa.nws.ncep.ui.pgen.elements.WatchBox; import java.awt.Color; import java.util.Calendar; +import java.util.List; import java.util.TimeZone; import org.eclipse.jface.dialogs.IDialogConstants; @@ -33,7 +35,6 @@ import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.DateTime; import org.eclipse.swt.widgets.Display; -import org.eclipse.swt.widgets.Group; import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Text; @@ -52,6 +53,7 @@ import com.raytheon.viz.ui.dialogs.CaveJFACEDialog; * 03/06/11 #707 Q.Zhou Changed FORECASTER text to combo. Load from forecaster.xml. * 03/12 #703 B. Yin Create SEL, SAW, WOU, etc. * 05/12 #776, 769 B. Yin Added UTC time. Carry ove info from WCC/WCL dialogs. + * 08/12 #770 Q. Zhou added continuing Watch. * * * @author B. Yin @@ -397,17 +399,36 @@ public class WatchFormatDlg extends CaveJFACEDialog { }); //Create continue watch number text + List contWatch = PgenStaticDataProvider.getProvider().loadContWatchNum();//loadContWatchNum(); + String cont = ""; + if (contWatch != null && !contWatch.isEmpty()) { + for (int i=0; i< contWatch.size(); i++) + cont += contWatch.get(i) +" "; + + if (cont.endsWith(" ")) + cont = cont.substring(0, cont.length()-1); + + } + else { + cont = "0000"; + } + Label continueLbl = new Label(top, SWT.LEFT); continueLbl.setText("Continue Watch#:"); cText = new Text(top, SWT.SINGLE | SWT.RIGHT | SWT.BORDER ); - cText.addVerifyListener(new VerifyListener(){ - @Override - public void verifyText(VerifyEvent e) { - e.doit = PgenUtil.validatePositiveInteger(e); - if ( ! e.doit ) Display.getCurrent().beep(); - } - }); + cText.setText(cont); + cText.setEditable(true); + + // Continue watch number can be a string like "510,512". + // cText.addVerifyListener(new VerifyListener(){ + + // @Override + // public void verifyText(VerifyEvent e) { + // e.doit = PgenUtil.validatePositiveInteger(e); + // if ( ! e.doit ) Display.getCurrent().beep(); + // } + // }); //Create forecaster list Label forecasterLbl = new Label(top, SWT.LEFT); @@ -703,7 +724,7 @@ public class WatchFormatDlg extends CaveJFACEDialog { * @return int - watch number */ public int getWatchNumber(){ - if ( watchNumber.getText() == null ){ + if ( watchNumber.getText() == null || watchNumber.getText().isEmpty() ){ return 0; } else { @@ -711,6 +732,23 @@ public class WatchFormatDlg extends CaveJFACEDialog { } } + private String getContNumber(){ + if ( cText.getText() == null || cText.getText().isEmpty() ){ + return ""; + } + else { + return cText.getText(); + } + } + + private int getReplaceNumber(){ + if ( rText.getText() == null || rText.getText().isEmpty() ){ + return 0; + } + else { + return Integer.valueOf(rText.getText()); + } + } /** * Apply attributes from the format dialog to the watch box element * @param wb @@ -747,6 +785,9 @@ public class WatchFormatDlg extends CaveJFACEDialog { else if ( wb.getWatchType().equalsIgnoreCase(TORNADO)){ wb.setColors(new Color[]{TORNADO_COLOR, TORNADO_COLOR}); } + + wb.setContWatch( this.getContNumber()); + wb.setReplWatch(this.getReplaceNumber()); } /** diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/attrdialog/WatchInfoDlg.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/attrdialog/WatchInfoDlg.java index 687ed2904f..1ff2a01514 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/attrdialog/WatchInfoDlg.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/attrdialog/WatchInfoDlg.java @@ -139,6 +139,9 @@ public class WatchInfoDlg extends CaveJFACEDialog { //CWA pane, holding CWAs private Composite cwaPane; + //Bottom buttons + private Composite wccGrp; + //List of CWAs.Each CwaComposite contains a label, and in/out buttons private List cwaComp; @@ -273,7 +276,7 @@ public class WatchInfoDlg extends CaveJFACEDialog { // toggleAnchorsBtn.setText("Toggle Anchor Points"); // AttrDlg.addSeparator(top); - Composite wccGrp = new Composite(top, SWT.None); + wccGrp = new Composite(top, SWT.None); GridLayout wccGl = new GridLayout(4, false); wccGl.marginLeft = 15; wccGrp.setLayout(wccGl); @@ -720,6 +723,10 @@ public class WatchInfoDlg extends CaveJFACEDialog { cwaGrp.pack(true); cwaGrp.layout(); + wccGrp.layout(); + wccGrp.pack(true); + wccGrp.layout(); + top.pack(true); top.layout(); diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/controls/DeletePartCommand.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/controls/DeletePartCommand.java index fd2dadd360..2236b7f9c7 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/controls/DeletePartCommand.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/controls/DeletePartCommand.java @@ -18,7 +18,9 @@ import com.vividsolutions.jts.linearref.LinearLocation; import com.vividsolutions.jts.linearref.LocationIndexedLine; import gov.noaa.nws.ncep.ui.pgen.PGenException; +import gov.noaa.nws.ncep.ui.pgen.elements.AbstractDrawableComponent; import gov.noaa.nws.ncep.ui.pgen.elements.DECollection; +import gov.noaa.nws.ncep.ui.pgen.elements.Jet; import gov.noaa.nws.ncep.ui.pgen.elements.Line; import gov.noaa.nws.ncep.ui.pgen.elements.MultiPointElement; import gov.noaa.nws.ncep.ui.pgen.elements.Product; @@ -37,6 +39,7 @@ import gov.noaa.nws.ncep.ui.pgen.gfa.Gfa; * 04/11 ? B. Yin Changed element from MulitPoint to Line * (Re-factor IAttribute) * 05/11 #808 J. Wu Update Gfa vor text + * 06/12 TTR102 B. Yin Make it work for Jet * * * @@ -53,18 +56,18 @@ public class DeletePartCommand extends PgenCommand { * layer from which element should be modfified */ // private Layer layer; - private DECollection layer; + private DECollection parent; /* * drawable element to modified */ - private Line element; + private AbstractDrawableComponent element; /* * elements after deleting */ - private MultiPointElement element1 = null; - private MultiPointElement element2 = null; + private AbstractDrawableComponent element1 = null; + private AbstractDrawableComponent element2 = null; /* * Two end point and locations of the deleting part @@ -135,8 +138,8 @@ public class DeletePartCommand extends PgenCommand { // if ( currLayer.getDrawables().contains(element) ) { // layer = currLayer; - layer = (DECollection)element.getParent(); - if (element.isClosedLine()){ + parent = (DECollection)element.getParent(); + if (((Line)element).isClosedLine()){ deleteClosedPart(); @@ -163,7 +166,7 @@ public class DeletePartCommand extends PgenCommand { @Override public void undo() throws PGenException { - if ( element.isClosedLine() ){ + if ( !(element instanceof Jet) && ((Line)element).isClosedLine() ){ undeleteClosedPart(); } else { @@ -186,7 +189,7 @@ public class DeletePartCommand extends PgenCommand { * Both points selected were endpoints, remove whole element */ removeAll = true; - layer.removeElement( element ); + parent.removeElement( element ); } else if ( lil.getStartIndex().compareTo( firstLoc ) == 0 || @@ -208,10 +211,10 @@ public class DeletePartCommand extends PgenCommand { newPts.add(firstPt); } - element1.setPoints(newPts); + ((MultiPointElement)element1).setPoints(newPts); - layer.addElement(element1); - layer.removeElement(element); + parent.addElement(element1); + parent.removeElement(element); } else { @@ -223,18 +226,46 @@ public class DeletePartCommand extends PgenCommand { element1 = (MultiPointElement)element.copy(); ArrayList new1 = new ArrayList( points.subList(0, firstLoc.getSegmentIndex()+1 )); new1.add( firstPt ); - element1.setPoints( new1 ); + ((MultiPointElement)element1).setPoints( new1 ); element2 = (MultiPointElement)element.copy(); ArrayList new2 = new ArrayList(); new2.add( secondPt ); new2.addAll( points.subList( secondLoc.getSegmentIndex()+1, points.size())); - element2.setPoints( new2 ); + ((MultiPointElement)element2).setPoints( new2 ); } - layer.addElement( element1 ); - layer.addElement( element2 ); - layer.removeElement(element); + if ( parent instanceof Jet ){ + Jet jet1 = new Jet(); + jet1.clear(); + jet1.addElement(element1); + jet1.setPgenCategory(parent.getPgenCategory()); + jet1.setPgenType(parent.getPgenType()); + + jet1.setSnapTool(((Jet)parent).getSnapTool()); + + Jet jet2 = new Jet(); + jet2.clear(); + jet2.addElement(element2); + jet2.setSnapTool(((Jet)parent).getSnapTool()); + jet2.setPgenCategory(parent.getPgenCategory()); + jet2.setPgenType(parent.getPgenType()); + + jet1.getSnapTool().addBarbHashFromAnotherJet(jet1, (Jet)parent); + jet2.getSnapTool().addBarbHashFromAnotherJet(jet2, (Jet)parent); + + jet1.getSnapTool().snapJet(jet1); + jet2.getSnapTool().snapJet(jet2); + + element = parent; + parent = (DECollection) parent.getParent(); + element1 = jet1; + element2 = jet2; + } + + parent.addElement( element1 ); + parent.addElement( element2 ); + parent.removeElement(element); } } @@ -252,28 +283,28 @@ public class DeletePartCommand extends PgenCommand { //if there are more points between pt1 and pt2, remove the other part. element1 = (MultiPointElement)element.copy(); if ( element1 instanceof Gfa ) { - element1.setClosed( true ); + ((MultiPointElement)element1).setClosed( true ); } else { - element1.setClosed( false); + ((MultiPointElement)element1).setClosed( false); } element1.getPoints().clear(); element1.getPoints().add( firstPt ); element1.getPoints().addAll(points.subList( firstLoc.getSegmentIndex()+1, secondLoc.getSegmentIndex()+1 )); element1.getPoints().add( secondPt ); - layer.addElement(element1); - layer.removeElement(element); + parent.addElement(element1); + parent.removeElement(element); } else { element1 = (MultiPointElement)element.copy(); if ( element1 instanceof Gfa ) { - element1.setClosed( true ); + ((MultiPointElement)element1).setClosed( true ); } else { - element1.setClosed( false); + ((MultiPointElement)element1).setClosed( false); } element1.getPoints().clear(); element1.getPoints().add( secondPt ); @@ -281,8 +312,8 @@ public class DeletePartCommand extends PgenCommand { element1.getPoints().addAll(points.subList(0, firstLoc.getSegmentIndex()+1 )); element1.getPoints().add( firstPt ); - layer.addElement(element1); - layer.removeElement(element); + parent.addElement(element1); + parent.removeElement(element); } @@ -300,22 +331,29 @@ public class DeletePartCommand extends PgenCommand { if ( removeAll ){ - layer.addElement(element); + parent.addElement(element); removeAll = false; } else if ( removeOneEnd ) { - layer.addElement(element); - layer.removeElement(element1); + parent.addElement(element); + parent.removeElement(element1); removeOneEnd = false; } else if ( removeMiddle ){ - layer.removeElement(element1); - layer.removeElement(element2); - layer.addElement(element); + parent.removeElement(element1); + parent.removeElement(element2); + parent.addElement(element); + + if ( element instanceof Jet ){ + parent = (Jet) element; + element = ((Jet)parent).getJetLine(); + element1 = ((Jet)element1).getJetLine(); + element2 = ((Jet)element2).getJetLine(); + } removeMiddle = false; @@ -327,8 +365,8 @@ public class DeletePartCommand extends PgenCommand { */ private void undeleteClosedPart(){ - layer.removeElement( element1); - layer.addElement( element ); + parent.removeElement( element1); + parent.addElement( element ); } diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/controls/PgenFileManageDialog1.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/controls/PgenFileManageDialog1.java new file mode 100644 index 0000000000..c34ce1664d --- /dev/null +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/controls/PgenFileManageDialog1.java @@ -0,0 +1,1500 @@ +/* + * gov.noaa.nws.ncep.ui.pgen.controls.PgenFileManageDialog + * + * 11 February 2009 + * + * This code has been developed by the NCEP/SIB for use in the AWIPS2 system. + */ +package gov.noaa.nws.ncep.ui.pgen.controls; + +import java.io.File; +import java.io.IOException; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.LinkedHashMap; +import java.util.Scanner; + +import org.eclipse.swt.SWT; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.swt.widgets.Button; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; +import org.eclipse.swt.widgets.Event; +import org.eclipse.swt.widgets.Label; +import org.eclipse.swt.widgets.List; +import org.eclipse.swt.widgets.Listener; +import org.eclipse.swt.widgets.Text; +import org.eclipse.swt.widgets.FileDialog; +import org.eclipse.swt.events.ModifyListener; +import org.eclipse.swt.events.ModifyEvent; +import org.eclipse.swt.events.SelectionAdapter; +import org.eclipse.swt.events.SelectionEvent; + +import org.eclipse.jface.viewers.ListViewer; +import org.eclipse.jface.dialogs.IDialogConstants; +import org.eclipse.jface.dialogs.MessageDialog; +import org.eclipse.jface.viewers.ISelectionChangedListener; +import org.eclipse.jface.viewers.SelectionChangedEvent; + +import org.eclipse.swt.layout.FormLayout; +import org.eclipse.swt.layout.FormAttachment; +import org.eclipse.swt.layout.FormData; +import org.eclipse.ui.PlatformUI; + +import com.raytheon.uf.viz.core.exception.VizException; +import com.raytheon.viz.ui.dialogs.CaveJFACEDialog; + +import gov.noaa.nws.ncep.viz.common.ui.*; + +import gov.noaa.nws.ncep.ui.pgen.elements.AbstractDrawableComponent; +import gov.noaa.nws.ncep.ui.pgen.elements.Jet; +import gov.noaa.nws.ncep.ui.pgen.elements.Layer; +import gov.noaa.nws.ncep.ui.pgen.elements.Product; +import gov.noaa.nws.ncep.ui.pgen.elements.ProductInfo; +import gov.noaa.nws.ncep.ui.pgen.elements.ProductTime; +import gov.noaa.nws.ncep.ui.pgen.file.*; +import gov.noaa.nws.ncep.ui.pgen.PgenSession; +import gov.noaa.nws.ncep.ui.pgen.PgenUtil; +import gov.noaa.nws.ncep.ui.pgen.rsc.PgenResource; +import gov.noaa.nws.ncep.ui.pgen.sigmet.VaaInfo; +import gov.noaa.nws.ncep.ui.pgen.tools.PgenSnapJet; + +import gov.noaa.nws.ncep.ui.pgen.productmanage.ProductConfigureDialog; +import gov.noaa.nws.ncep.ui.pgen.producttypes.ProductType; + + +/** + * Create a dialog to Open/Save PGEN product files. + * + *
+ * SOFTWARE HISTORY
+ * Date       	Ticket#		Engineer	Description
+ * ------------	----------	-----------	-----------------------------------
+ * 02/09		#63			Jun Wu		Initial creation
+ * 09/09		#151		Jun Wu		Allow multiple save (one product per
+ *                                      file when having multiple products 
+ *                                      in PgenResource
+ * 03/10        #228        Archana     Added logic to sort files by name and date
+ *                                      Removed the Booleans sortByName and sortByDate                          
+ * 03/10        #226        Greg Hull   Change dirLIst to ListViewer with a SubDirContentProvider
+ * 04/10		#165		Gang Zhang	Add Non-drawable Volcano Product handling
+ * 08/10        #273        Greg Hull   ResourceDefnsMngr to get PGEN resources.
+ * 08/10		#63			Jun Wu	    Roll back to the original design - Local will be the
+ * 										location where the application starts and no "PRM" files
+ * 										for PGEN product files.	
+ * 10/10		#151		Jun Wu	    Allow open/save for multiple layers defined through 
+ * 										product	configuration
+ * 10/10		#151		Jun Wu	    Redefined "Append" and added "Merge"
+ * 09/11		#335		Jun Wu	    Implemented the file structure to organize PGEN files.
+ * 08/11        #450        Greg Hull   Call ResourceDefnsMngr to get list of PGEN Resource Defns
+ * 10/11		?			B. Yin		Fixed the problem of jet flight level text location 
+ * 										when zooming after loading file.
+ * 10/11		?			Jun Wu	    Add capability to load legacy layer product file (LPF).
+ * 12/11		#540		Jun Wu	    Enhanced the capability to load layer product file (LPF).
+ * 08/12		#593		Jun Wu	    Add "Advanced" capability to import layers selectively.
+ * 										
+ * 
+ * + * @author + * @version 1 + */ +public class PgenFileManageDialog1 extends CaveJFACEDialog { + + public static enum PgenFileMode { OPEN, SAVE, SAVE_AS, SAVE_ALL }; + + private String title = null; + + private Shell shell; + + private Button sortByNameBtn = null; + private Button sortByDateBtn = null; + + private List dirList = null; + private ListViewer fileListViewer= null; + private static Text fileNameText = null; + + private Button browseBtn = null; + private FileDialog browseDlg = null; + + private Button autoSaveOffBtn = null; + private Button autoSaveOnBtn = null; + + private static final int ADD_ID = IDialogConstants.CLIENT_ID + 7587; + private static final String ADD_LABEL = "Add"; + private static final int REPLACE_ID = IDialogConstants.CLIENT_ID + 7586; + private static final String REPLACE_LABEL = "Replace"; + private static final int ADVANCE_ID = IDialogConstants.CLIENT_ID + 7588; + private static final String ADVANCE_LABEL = "Advanced"; + private static final int SAVE_ID = IDialogConstants.CLIENT_ID + 7589; + private static final String SAVE_LABEL = "Save"; + private static final int CLOSE_ID = IDialogConstants.CLIENT_ID + 7590; + private static final String CLOSE_LABEL = "Close"; + + private Button replaceBtn = null; + private Button addBtn = null; + private Button appendBtn = null; + private Button cancelBtn = null; + private Button saveBtn = null; + + private static LinkedHashMap dirTableMap = null; + private String dirLocal = "."; + + private static String selectedDir = null; + private static String fileName = null; + private static String fullName = null; + + // Attributes' names defined in a legacy Layer Product File + private static final String LPF_LAYER_NAME = "name"; + private static final String LPF_LAYER_INPUT_FILE = "file"; + private static final String LPF_LAYER_OUTPUT_FILE = "output_file"; + private static final String LPF_LAYER_COLOR_MODE = "color_mode"; + private static final String LPF_LAYER_COLOR_ID = "color_id"; + private static final String LPF_LAYER_FILL_MODE = "fill_mode"; +// private static final String LPF_LAYER_GROUP_TYPE = "group_type"; + private static final String LPF_LAYER_DISPLAY_MODE = "display_mode"; + + private static PgenFileMode fileMode = PgenFileMode.OPEN; + + private static int lastDirPos = -1; + + /* + * The Color map used in legacy PGEN with 32 colors. + */ + private static HashMap nmapColors = null; + + /* + * Constructor + */ + public PgenFileManageDialog1( Shell parShell, String btnName ) throws VizException { + + super ( parShell ); + + setFileMode( btnName ); + + String currentWorkingDir = PgenUtil.getWorkingDirectory(); + + if ( currentWorkingDir != null ) { + dirLocal = new String( currentWorkingDir ); + } + + loadUserTable(); + } + + /* + * Set up the file mode. + */ + private void setFileMode( String btnName ) { + + if ( btnName.equals( "Open" ) ) { + fileMode = PgenFileMode.OPEN; + title = "Open a PGEN Product file"; + } + else if ( btnName.equals( "Save" ) || btnName.equals( "Save All" )) { + fileMode = PgenFileMode.SAVE; + title = "Save the PGEN Product"; + } + else if ( btnName.equals( "Save As" ) ) { + fileMode = PgenFileMode.SAVE_AS; + title = "Save the PGEN Product as"; + } + + } + + /* + * (non-Javadoc) + * + * @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell) + */ + @Override + protected void configureShell( Shell shell ) { + super.configureShell( shell ); + this.setShellStyle( SWT.RESIZE | SWT.PRIMARY_MODAL ); + + this.shell = shell; + if ( title != null ) { + shell.setText( title ); + } + } + + /** + * (non-Javadoc) + * Create all of the widgets on the Dialog + * + * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite) + */ + @Override + public Control createDialogArea(Composite parent) { + + Composite dlgAreaForm = (Composite) super.createDialogArea(parent); + + Composite topForm = new Composite( dlgAreaForm, SWT.NONE ); + topForm.setLayout( new FormLayout() ); + + /* + * Create a label and two radio buttons - how to sort the files + */ + Composite sortForm = new Composite( topForm, SWT.NONE ); + sortForm.setLayout( new FormLayout() ); + + sortByNameBtn = new Button( sortForm, SWT.RADIO); + sortByNameBtn.setText("Sort Alphabetically"); + + FormData layoutData1 = new FormData( 370, 25 ); + layoutData1.top = new FormAttachment( 0, 0 ); + layoutData1.left = new FormAttachment( 0, 0 ); + + sortByNameBtn.setLayoutData( layoutData1 ); + + sortByNameBtn.setSelection(true); + + /* + * Sort the files by name. when the corresponding radio button is selected + */ + sortByNameBtn.addSelectionListener(new SelectionAdapter() { + public void widgetSelected( SelectionEvent ev ) { + fileListViewer.setContentProvider( NmapCommon.createFileContentProvider(new String[]{".xml" }, new FileNameComparator()) ); + fileListViewer.setLabelProvider( NmapCommon.createFileLabelProvider()); + fileListViewer.refresh(true); + + } + }); + + sortByDateBtn = new Button( sortForm, SWT.RADIO ); + sortByDateBtn.setText("Sort By Date"); + + FormData layoutData3 = new FormData(); + layoutData3.top = new FormAttachment( sortByNameBtn, 5, SWT.BOTTOM ); + layoutData3.left = new FormAttachment( sortByNameBtn, 0, SWT.LEFT ); + sortByDateBtn.setLayoutData( layoutData3 ); + + /* + * Sort the files by date. when the corresponding radio button is selected + */ + sortByDateBtn.addSelectionListener(new SelectionAdapter() { + public void widgetSelected( SelectionEvent ev ) { + fileListViewer.setContentProvider( NmapCommon.createFileContentProvider(new String[]{".xml" }, new FileDateComparator()) ); + fileListViewer.setLabelProvider( NmapCommon.createFileLabelProvider()); + fileListViewer.refresh(true); + + } + }); + + /* + * Create a list of directories to select from + */ + Label dirLbl = new Label(topForm, SWT.NONE); + dirLbl.setText("Select Directory:"); + + FormData layoutData5 = new FormData(); + layoutData5.top = new FormAttachment( sortForm , 15, SWT.BOTTOM ); + layoutData5.left = new FormAttachment( sortForm, 0, SWT.LEFT ); + + dirLbl.setLayoutData( layoutData5 ); + + dirList = new List( topForm, SWT.SINGLE | SWT.BORDER | SWT.V_SCROLL ); + + // TODO : would like to get the list of available pgen resources (ie. subDirectories) + // from the ResourceDefnsMngr but this created some access restriction problems so for now + // just keep with +// try { +// Map pgenRscDefns = ResourceDefnsMngr.getInstance().getPgenResourceDefinitions(); +// } catch (VizException e1) { +// // TODO Auto-generated catch block +// e1.printStackTrace(); +// } + + for ( String str : dirTableMap.keySet() ) { + dirList.add( str ); + } + + if ( lastDirPos < 0 ) { + lastDirPos = (dirList.getItemCount() - 1); + } + + dirList.setSelection( lastDirPos ); + selectedDir = "" + dirTableMap.get( dirList.getSelection()[0] ); + + FormData layoutData6 = new FormData( 350, 200 ); + layoutData6.top = new FormAttachment( dirLbl, 5, SWT.BOTTOM ); + layoutData6.left = new FormAttachment( dirLbl, 0, SWT.LEFT ); + dirList.setLayoutData( layoutData6 ); + + dirList.addListener ( SWT.Selection, new Listener() { + public void handleEvent (Event e) { + if ( dirList.getSelectionCount() > 0 ) { + + selectedDir = "" + dirTableMap.get( dirList.getSelection()[0] ); + + dirList.setToolTipText( selectedDir ); + + fileListViewer.setInput( new File( selectedDir ) ); + lastDirPos = dirList.getSelectionIndex(); + fileListViewer.refresh(); + + //Update the full file name with the new path + fullName = null; + if ( fileMode != PgenFileMode.OPEN ) { + fullName = new String( selectedDir + File.separator + fileNameText.getText() ); + } + } + } + }); + + + /* + * Create a list to display the product files in a selected directory + */ + Label fileLbl = new Label(topForm, SWT.NONE); + fileLbl.setText("Select a Product File:"); + + FormData layoutData8 = new FormData(); + layoutData8.top = new FormAttachment( dirList, 20, SWT.BOTTOM ); + layoutData8.left = new FormAttachment( dirList, 0, SWT.LEFT ); + + fileLbl.setLayoutData( layoutData8 ); + + fileListViewer = new ListViewer(topForm, SWT.SINGLE | SWT.BORDER | SWT.V_SCROLL); + + FormData layoutData9 = new FormData( 350,200 ); + layoutData9.top = new FormAttachment( fileLbl, 5, SWT.BOTTOM ); + layoutData9.left = new FormAttachment( fileLbl, 0, SWT.LEFT ); + + fileListViewer.getList().setLayoutData( layoutData9 ); + + if ( sortByNameBtn.getSelection() ) { + fileListViewer.setContentProvider( NmapCommon.createFileContentProvider(new String[]{".xml", ".lpf" }, new FileNameComparator()) ); + } + else { + fileListViewer.setContentProvider( NmapCommon.createFileContentProvider(new String[]{".xml", ".lpf"}, new FileDateComparator()) ); + } + + fileListViewer.setLabelProvider( NmapCommon.createFileLabelProvider( new String[]{""} ) ); + + fileListViewer.setInput( new File( selectedDir ) ); + fileListViewer.refresh(); + + if ( fileName != null ) { + int selFileInd = fileListViewer.getList().indexOf( fileName ); + if ( selFileInd >= 0 ) { + fileListViewer.getList().select( selFileInd ); + } + else { + fileName = null; + fullName = null; + } + } + + fileListViewer.addSelectionChangedListener(new ISelectionChangedListener() { + public void selectionChanged(SelectionChangedEvent event) { + String[] selectedFile = fileListViewer.getList().getSelection(); + + if( selectedFile.length == 0 ) { + if ( fileMode != PgenFileMode.OPEN ) { + saveBtn.setEnabled(false); + } + else { + replaceBtn.setEnabled(false); + addBtn.setEnabled(false); + } + } + else { + + fileName = "" + selectedFile[0]; + fullName = "" + selectedDir + File.separator + fileName; + + if ( fileMode != PgenFileMode.OPEN ) { + fileNameText.setText( fileName ); + saveBtn.setEnabled( true ); + } + else { + replaceBtn.setEnabled(true); + addBtn.setEnabled(true); + } + } + } + }); + + + /* + * Create a text field to input a file name to save the product + */ + if ( fileMode != PgenFileMode.OPEN ) { + Label fileNameLbl = new Label(topForm, SWT.NONE); + fileNameLbl.setText("Or Enter a File Name"); + + FormData layoutData9_1 = new FormData(); + layoutData9_1.top = new FormAttachment( fileListViewer.getList(), 25, SWT.BOTTOM ); + layoutData9_1.left = new FormAttachment( fileListViewer.getList(), 0, SWT.LEFT ); + fileNameLbl.setLayoutData( layoutData9_1 ); + + fileNameText = new Text (topForm, SWT.SINGLE | SWT.BORDER); + + FormData layoutData9_2 = new FormData(355, 15); + layoutData9_2.top = new FormAttachment( fileNameLbl, 10, SWT.BOTTOM ); + layoutData9_2.left = new FormAttachment( fileNameLbl, 0, SWT.LEFT ); + fileNameText.setLayoutData( layoutData9_2 ); + + fileNameText.setText( "" ); + + //If the current product has not been saved, should use its configured path/filename + //otherwise, use its last saved path/file name. + String curFile = PgenSession.getInstance().getPgenResource().getActiveProduct().getOutputFile(); + String configuredFile = getConfiguredFile(); + if ( curFile == null && configuredFile != null ) { + fileName = new String( configuredFile ); + fullName = new String ( "" + selectedDir + File.separator + fileName ); + } + + if ( fileName != null ) { + fileNameText.setText(fileName ); + } + + + fileNameText.setSize( 310, 10 ); + fileNameText.setEditable( true ); + + fileNameText.addModifyListener( new ModifyListener() { + public void modifyText( ModifyEvent event ) { + + String usrFile = fileNameText.getText().trim(); + + if ( !usrFile.isEmpty() ) { + if ( !usrFile.contains( File.separator ) ) { + usrFile = selectedDir + File.separator + usrFile; + } + } + + if ( !usrFile.endsWith( ".xml" ) ) { + usrFile = usrFile + ".xml"; + } + + fullName = usrFile; + + } + } ); + + } + + /** + * Create a browse button to open a file dialog to navigate & select a file. + */ + browseBtn = new Button( topForm, SWT.PUSH ); + + FormData layoutData10 = new FormData(355, 25); + if ( fileMode != PgenFileMode.OPEN ) { + layoutData10.top = new FormAttachment( fileNameText, 20, SWT.BOTTOM ); + layoutData10.left = new FormAttachment( fileNameText, 0, SWT.LEFT ); + } + else { + layoutData10.top = new FormAttachment( fileListViewer.getList(), 20, SWT.BOTTOM ); + layoutData10.left = new FormAttachment( fileListViewer.getList(), 0, SWT.LEFT ); + } + + browseBtn.setLayoutData( layoutData10 ); + browseBtn.setSize(330, 20); + browseBtn.setText("Browse"); + + browseBtn.addListener( SWT.MouseUp, new Listener() { + public void handleEvent(Event event) { + if ( fileMode != PgenFileMode.OPEN ) { + browseDlg = new FileDialog( shell, SWT.SAVE ); + browseDlg.setFileName( "default.xml"); + } + else { + browseDlg = new FileDialog( shell, SWT.OPEN ); + } + + browseDlg.setFilterNames (new String [] {"Product files (*.xml, *.lpf)" }); + browseDlg.setFilterExtensions (new String [] {"*.xml", "*.lpf"}); + browseDlg.setFilterPath ( dirLocal ); + + String s = browseDlg.open(); + if ( s != null && !s.isEmpty() ) { + if ( !browseDlg.getFileName().isEmpty() ) { + selectedDir = browseDlg.getFilterPath(); + fileName = browseDlg.getFileName(); + fullName = "" + selectedDir + File.separator + fileName; + if ( fileMode != PgenFileMode.OPEN ) { + fileNameText.setText( fullName ); + } + } + } + } + } ); + + /* + * Create a label and two radio buttons to turn "auto save" on or off. + */ + Label autoSaveLbl = new Label(topForm, SWT.NONE); + autoSaveLbl.setText("Auto Save:"); + + FormData layoutData11 = new FormData(); + layoutData11.top = new FormAttachment( browseBtn, 20, SWT.BOTTOM ); + layoutData11.left = new FormAttachment( browseBtn, 0, SWT.LEFT ); + autoSaveLbl.setLayoutData( layoutData11 ); + + autoSaveOffBtn = new Button(topForm, SWT.RADIO ); + autoSaveOffBtn.setText("Off"); + autoSaveOffBtn.setSelection(true); + + FormData layoutData12 = new FormData(); + layoutData12.top = new FormAttachment( autoSaveLbl, 0, SWT.TOP ); + layoutData12.left = new FormAttachment( autoSaveLbl, 10, SWT.RIGHT ); + autoSaveOffBtn.setLayoutData( layoutData12 ); + + autoSaveOnBtn = new Button(topForm, SWT.RADIO ); + autoSaveOnBtn.setText("On"); + + FormData layoutData13 = new FormData(); + layoutData13.top = new FormAttachment( autoSaveOffBtn, 0, SWT.TOP ); + layoutData13.left = new FormAttachment( autoSaveOffBtn, 10, SWT.RIGHT ); + autoSaveOnBtn.setLayoutData( layoutData13 ); + + return dlgAreaForm; + } + + /** + * Create Replace/Append/Cancel button for "Open" a product file or + * Save/Cancel button for "Save" a product file. + */ + @Override + protected void createButtonsForButtonBar(Composite parent) { + + if ( fileMode == PgenFileMode.OPEN ) { + + addBtn = createButton( parent, ADD_ID, ADD_LABEL, true ); + replaceBtn = createButton( parent, REPLACE_ID, REPLACE_LABEL, true ); + appendBtn = createButton( parent, ADVANCE_ID, ADVANCE_LABEL, true ); + + replaceBtn.addListener( SWT.MouseUp, new Listener() { + public void handleEvent(Event event) { + openProducts( true ); + } + }); + + addBtn.addListener( SWT.MouseUp, new Listener() { + public void handleEvent(Event event) { + openProducts( false ); + } + }); + + appendBtn.addListener( SWT.MouseUp, new Listener() { + public void handleEvent(Event event) { + appendProducts(); + } + }); + + } + else { + + saveBtn = createButton( parent, SAVE_ID, SAVE_LABEL, true ); + + saveBtn.addListener( SWT.MouseUp, new Listener() { + public void handleEvent(Event event) { + saveProducts(); + } + }); + + } + + cancelBtn = createButton( parent, CLOSE_ID, CLOSE_LABEL, true ); + cancelBtn.addListener( SWT.MouseUp, new Listener() { + public void handleEvent(Event event) { + close(); + } + }); + + } + + /** + * Load the user-defined directories in old vgf.nmap + */ + private void loadUserTable() { +// dirTableMap = PgenFileOrganizer.getPgenFilePaths(); + dirTableMap = new LinkedHashMap(); +/* + dirTableMap.put( "test_data", "$GEMDATA/vgf" ); + dirTableMap.put( "bawx", "/export/hbawx1/bawx" ); + dirTableMap.put( "eff1", "/export/heff1/eff1" ); + dirTableMap.put( "eff2", "/export/hww1/eff2" ); + dirTableMap.put( "eff3", "/export/lnx159/eff3" ); + dirTableMap.put( "eff4", "/export/lnx162/eff4" ); + dirTableMap.put( "nppu2", "/export/hqpf1/nppu2" ); + dirTableMap.put( "nppu3", "/export/hqpf2/nppu3" ); + dirTableMap.put( "medr", "/export/hmedr2/medr" ); + dirTableMap.put( "medr3", "/export/hmedr1/medr3" ); + dirTableMap.put( "avn3", "/export/hdwm/avn3" ); + dirTableMap.put( "sfc1", "/export/hsfc1/sfc1" ); + dirTableMap.put( "dwm", "/export/hdwm/dwm" ); + dirTableMap.put( "id0", "/export/sgi112/id0" ); + dirTableMap.put( "id1", "/export/lnx114/id1" ); + dirTableMap.put( "id2", "/export/lnx130/id2" ); + dirTableMap.put( "id3", "/export/hp61/id3" ); + dirTableMap.put( "id5", "/export/sgi20/id5" ); + dirTableMap.put( "id6", "/export/sgi112/id6" ); + dirTableMap.put( "prism", "/export-2/hp46/modtdg/joey/prism" ); + dirTableMap.put( "Pac_HS", "/home/hp2/marine" ); + dirTableMap.put( "Atl_HS", "/home/hp12/marine2" ); + dirTableMap.put( "Pac_Reg", "/home/hp41/marine3" ); + dirTableMap.put( "Atl_Reg", "/home/hp49/marine4" ); + dirTableMap.put( "HS_Outlook", "/home/hp68/marine5" ); +*/ + // Load the product types. + String pbase = PgenUtil.getPgenOprDirectory(); + String curPrdType = PgenSession.getInstance().getPgenResource().getActiveProduct().getType(); + + LinkedHashMap prdTypes = ProductConfigureDialog.getProductTypes(); + + ProductType curAct = prdTypes.get( curPrdType ); + if ( curAct != null ) { + curPrdType = new String( curAct.getType() ); + } + + ArrayList uniPrdTypeNames = new ArrayList(); + + for ( String ptypName : prdTypes.keySet() ) { + String mtyp = prdTypes.get( ptypName ).getType(); + if ( !uniPrdTypeNames.contains( mtyp ) ) { + uniPrdTypeNames.add( mtyp ); + } + } + + int ii = 0; + lastDirPos = -1; + for ( String ptypName : uniPrdTypeNames ) { + + String sdir = new String ( pbase + File.separator + + ptypName.replace(' ', '_' ) + + File.separator + "xml" ) ; + + dirTableMap.put( ptypName, sdir ); + + if ( ptypName.equalsIgnoreCase( curPrdType ) ) { + lastDirPos = ii; + } + ii++; + } + + dirTableMap.put( "Local", dirLocal ); + + } + + + /** + * Open a product file to replace or append to the current product list + * in the current PGEN session. + */ + private void openProducts( boolean replace ) { + + if ( !validProductFile( fullName ) ) { + return; + } + + Products products = null; + if ( fullName.endsWith(".lpf") ) { + products = loadLpfFile( fullName ); + } + else { + products = FileTools.read( fullName ); + } + + if ( products == null ) { + MessageDialog confirmDlg = new MessageDialog( + PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), + "Invalid PGEN Product File", null, + "File " + fileName + " is not a valid PGEN product file. \nPlease select another one.", + MessageDialog.INFORMATION, new String[]{"OK"}, 0); + + confirmDlg.open(); + + return; + } + + /* + * some Volcano Products are pure texts: TEST/RESUME + * and cannot be drawn. + */ + if( VaaInfo.isNoneDrawableTxt(products) ){ + VaaInfo.openMsgDlg(VaaInfo.NONE_DRAWABLE_MSG); + return; + } + + /* + * Confirm the action + */ + PgenResource pgen = PgenSession.getInstance().getPgenResource(); + + java.util.List pgenProds = + ProductConverter.convert( products ); + + // Force all product/layer display onOff flag to be false at the start. +/* for ( gov.noaa.nws.ncep.ui.pgen.elements.Product prd : pgenProds ) { + prd.setOnOff( false ); + for ( gov.noaa.nws.ncep.ui.pgen.elements.Layer lyr : prd.getLayers() ) { + lyr.setOnOff( false ); + } + } +*/ + if ( replace ) { + MessageDialog confirmOpen = new MessageDialog( + PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), + "Confirm File Replace", null, + "Replace Activity <" + pgen.getActiveProduct().getType() + + "> with New Activity <" + pgenProds.get(0).getType() + "> ?", + MessageDialog.INFORMATION, new String[]{ "Yes", "No" }, 0 ); + + confirmOpen.open(); + + if ( confirmOpen.getReturnCode() != MessageDialog.OK ) { + return; + } + + } + + pgen.setAutosave( autoSaveOnBtn.getSelection() ); + if ( fullName.endsWith( ".lpf") ) { + pgen.setAutoSaveFilename( fullName.replace( ".lpf", "xml") ); + } + else { + pgen.setAutoSaveFilename( fullName ); + } + + pgenProds.get(0).setInputFile( fullName ); + + this.setJetTool( pgenProds); + + close(); + + /* + * Replace the active product or add the product to the end + */ + if ( replace ) { + //Reset the output file name. + for ( gov.noaa.nws.ncep.ui.pgen.elements.Product pp : pgenProds ) { + pp.setOutputFile( null ); + } + + PgenFileNameDisplay.getInstance().setFileName( fullName ); + + pgen.replaceProduct( pgenProds ); + } + else { + if ( pgen.getActiveProduct() == null ) { + PgenFileNameDisplay.getInstance().setFileName( fullName ); + } + + pgen.addProduct( pgenProds ); + } + + PgenUtil.refresh(); + + } + + /** + * Append the products in a file with those in the current product list. + */ + private void appendProducts() { + + /* + * Validate + */ + if ( !validProductFile( fullName ) ) { + return; + } + + Products products = null; + if ( fullName.endsWith(".lpf") ) { + products = loadLpfFile( fullName ); + } + else { + products = FileTools.read( fullName ); + } + + if ( products == null ) { + MessageDialog confirmDlg = new MessageDialog( + PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), + "Invalid PGEN Product File", null, + "File " + fileName + " is not a valid PGEN product file. \nPlease select another one.", + MessageDialog.INFORMATION, new String[]{"OK"}, 0); + + confirmDlg.open(); + + return; + } + + /* + * some Volcano Products are pure texts: TEST/RESUME + * and cannot be drawn. + */ + if( VaaInfo.isNoneDrawableTxt(products) ){ + VaaInfo.openMsgDlg(VaaInfo.NONE_DRAWABLE_MSG); + return; + } + + PgenResource pgen = PgenSession.getInstance().getPgenResource(); + + java.util.List pgenProds = + ProductConverter.convert( products ); + + PgenLayerMergeDialog layerMergeDlg = null; + try { + layerMergeDlg = new PgenLayerMergeDialog( shell, pgenProds.get(0), fullName ); + } + catch (Exception e) { + e.printStackTrace(); + } + + + /* + PgenResource pgen = PgenSession.getInstance().getPgenResource(); + + java.util.List pgenProds = + ProductConverter.convert( products ); + + MessageDialog confirmOpen = new MessageDialog( + PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), + "Confirm File Append", null, + "Append Contents in Activity <" + pgenProds.get(0).getType() + + "> to Current Activity <" + pgen.getActiveProduct().getType() + "> ?", + MessageDialog.INFORMATION, new String[]{ "Yes", "No" }, 0 ); + + confirmOpen.open(); + + if ( confirmOpen.getReturnCode() != MessageDialog.OK ) { + return; + } + */ + + if ( layerMergeDlg != null ) { + + layerMergeDlg.open(); + if ( layerMergeDlg.getReturnCode() == MessageDialog.OK ) { + + pgen.setAutosave( autoSaveOnBtn.getSelection() ); + if ( fullName.endsWith( ".lpf") ) { + pgen.setAutoSaveFilename( fullName.replace( ".lpf", "xml") ); + } + else { + pgen.setAutoSaveFilename( fullName ); + } + + this.setJetTool( pgenProds); + + close(); + + pgen.getResourceData().startProductManage(); + } + } + + } + + /** + * Save the products to file. + */ + private void saveProducts() { + + if ( !validProductFile( fullName ) ) { + return; + } + + // check and inform duplicate product names. + PgenResource rsc = PgenSession.getInstance().getPgenResource(); + + boolean dup = false; + for ( Product p : rsc.getProducts() ) { + for ( Product p1 : rsc.getProducts() ) { + if ( !p1.equals( p ) && p1.getName().equals( p.getName() ) ) { + dup = true; + break; + } + } + } + + if ( dup ) { + MessageDialog confirmDlg = new MessageDialog( + PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), + "Duplicate Product Name", null, + "There are duplicate product names. \nPlease make them unique before saving!", + MessageDialog.WARNING, new String[]{"OK"}, 0); + + confirmDlg.open(); + + /* + if ( (confirmDlg.getReturnCode() == MessageDialog.OK) ) { + close(); + return; + } + */ + + } + + //Ask for confirmation + boolean saveFile = true; + File infile = new File( fullName ); + String msg = "Are you sure you want to save to: " + fullName + "?"; + if ( infile.exists() ) { + msg = "File " + fullName + " exists. Are you sure you want to overwrite it?"; + } + + MessageDialog confirmDlg = new MessageDialog( + PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), + "Saving a PGEN file", null, msg, + MessageDialog.QUESTION, new String[]{"Yes", "No"}, 0); + + confirmDlg.open(); + + if ( !(confirmDlg.getReturnCode() == MessageDialog.OK) ) { + saveFile = false; + } + + // Save now + if ( saveFile ) { + + rsc.setAutosave( autoSaveOnBtn.getSelection() ); + rsc.setAutoSaveFilename(fullName); + + close(); + PgenSession.getInstance().getPgenPalette().setActiveIcon( "Select" ); + + rsc.getActiveProduct().setInputFile( fullName ); + rsc.getActiveProduct().setOutputFile( fullName ); + + rsc.saveCurrentProduct( fullName ); + + PgenFileNameDisplay.getInstance().setFileName( fullName ); + + PgenUtil.setSelectingMode(); + } + + } + + /** + * Check if the selected file is a valid PGEN product file + */ + private boolean validProductFile( String vfile ) { + + String msg = null; + if ( vfile == null ) { + if ( fileMode == PgenFileMode.OPEN ) { + msg = "Please select a file!"; + } + else { + msg = "Please input a file name!"; + } + } + else { + File infile = new File( vfile ); + if ( fileMode == PgenFileMode.OPEN ) { + if ( !infile.exists() && !infile.canRead() ) { + msg = "File " + vfile + " cannot be read!"; + } + } + else { + //Check write permission + String fpath = fullName.substring( 0 , fullName.lastIndexOf( "/") ); + File indir = new File( fpath ); + if ( indir.exists() && !indir.canWrite() ) { + msg = "No write permission to directory: " + fpath + "!"; + } + } + } + + if ( msg != null ) { + MessageDialog confirmDlg = new MessageDialog( + PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), + "Invalid PGEN Product File", null, msg, + MessageDialog.INFORMATION, new String[]{"OK"}, 0 ); + + confirmDlg.open(); + + return false; + } + + return true; + } + + + /** + * Sets the jet snap tool in order to zoom tghe jet correctly. + * @param prods + */ + private void setJetTool(java.util.List prods){ + +// PgenSnapJet st = new PgenSnapJet(PgenSession.getInstance().getPgenResource().getDescriptor(), +// NmapUiUtils.getActiveNatlCntrsEditor(), null); + PgenSnapJet st = new PgenSnapJet(PgenSession.getInstance().getPgenResource().getDescriptor(), + PgenUtil.getActiveEditor(), null); + + for(gov.noaa.nws.ncep.ui.pgen.elements.Product prod : prods){ + for ( Layer layer : prod.getLayers() ) { + + Iterator iterator = layer.getComponentIterator(); + while ( iterator.hasNext()){ + AbstractDrawableComponent adc = iterator.next(); + if ( adc instanceof Jet ){ + ((Jet)adc).setSnapTool(st); + // st.snapJet((Jet)adc); + } + } + } + } + + } + + + /** + * Retrieved the configured output file for the current product type + * @param prods + */ + private String getConfiguredFile() { + + String filename = PgenSession.getInstance().getPgenResource().buildFileName( + PgenSession.getInstance().getPgenResource().getActiveProduct() ); + + filename = filename.substring( filename.lastIndexOf( File.separator ) + 1 ); + + return filename; + + } + + /* + * Load a full-path LPF file into a PGEN product + * @param prods + */ + private Products loadLpfFile( String fname ) { + + Products pgenFilePrds = null; + + LinkedHashMap prdTypes = ProductConfigureDialog.getProductTypes(); + + HashMap lpfMap = loadLpfParameters( fname ); + + ArrayList layerPrefixes = getLayerPrefixes( lpfMap ); + + String masterType = matchActivityType( lpfMap, prdTypes); + + //Load layers. + if ( layerPrefixes.size() > 0 ) { + pgenFilePrds = new Products(); + for ( String layerPre : layerPrefixes ) { + + Products layerFp = null; + + String layerName = lpfMap.get( layerPre + "_"+ LPF_LAYER_NAME ); + + if ( layerName == null || layerName.trim().length() == 0 ) { + continue; + } + + String layerOutputFile = lpfMap.get( layerPre + "_" + LPF_LAYER_OUTPUT_FILE ); + String layerColorMode = lpfMap.get( layerPre + "_" + LPF_LAYER_COLOR_MODE ); + String layerColorID = lpfMap.get( layerPre + "_" + LPF_LAYER_COLOR_ID ); + String layerFillMode = lpfMap.get( layerPre + "_" + LPF_LAYER_FILL_MODE ); +// String layerGroupType = lpfMap.get( layerPre + "_" + LPF_LAYER_GROUP_TYPE ); + String layerDisplayMode = lpfMap.get( layerPre + "_" + LPF_LAYER_DISPLAY_MODE ); + + String layerFile = lpfMap.get( layerPre + "_" + LPF_LAYER_INPUT_FILE ); + + /* + * Look for a full-path input file for the layer. + * + * If no path provided, first look in the LPF's defined activity path, if any; + * if still not found, look in the same directory where this lpf exists. + */ + String layerInputFile = PgenUtil.parsePgenFileName( layerFile ); + if ( !layerInputFile.contains( File.separator ) ) { + if ( masterType != null && !masterType.equalsIgnoreCase( "Default") ) { + String fnm = new String ( PgenUtil.getPgenOprDirectory() + File.separator + + masterType.replace(" ", "_" ) + File.separator + "xml" + + File.separator + layerInputFile ); + + if ( fnm.endsWith( "vgf" ) ) { + fnm = fnm.replace(".vgf", ".xml" ); + } + + File ff = new File( fnm ); + if ( ff.exists() && ff.canRead() ) { + layerInputFile = new String( fnm ); + } + else { + layerInputFile = new String ( fname.substring( 0, fname.lastIndexOf( File.separator ) )+ + File.separator + layerInputFile ); + } + } + else { + layerInputFile = new String ( fname.substring( 0, fname.lastIndexOf( File.separator ) )+ + File.separator + layerInputFile ); + } + } + + //Read in the contents in the specified file. + if ( layerInputFile != null ) { + if ( layerInputFile.endsWith( "vgf" ) ) { + layerInputFile = layerInputFile.replace(".vgf", ".xml" ); + } + + File ft = new File( layerInputFile ); + if ( ft.exists() && ft.canRead() ) { + layerFp = FileTools.read( layerInputFile ); + } + } + + //Create a default pgen product if there is no file specified for the layer. + if ( layerFp == null ) { + Product dfltp = new Product("Default", "Default", "Default", + new ProductInfo(), new ProductTime(), new ArrayList() ); + + Layer dfltly = new Layer(); + dfltp.addLayer( dfltly ); + + ArrayList dfltPrds = new ArrayList(); + dfltPrds.add( dfltp ); + + layerFp = ProductConverter.convert( dfltPrds ); + } + + //Add to the product list and set the activity type + if ( !VaaInfo.isNoneDrawableTxt( layerFp ) ) { + if ( pgenFilePrds.getProduct().size() == 0 ) { + pgenFilePrds.getProduct().addAll( layerFp.getProduct() ); + if ( masterType != null && !masterType.equalsIgnoreCase( "Default") ) { + pgenFilePrds.getProduct().get(0).setType( masterType ); + pgenFilePrds.getProduct().get(0).setName( masterType ); + } + } + else { + pgenFilePrds.getProduct().get(0).getLayer().addAll( + layerFp.getProduct().get(0).getLayer() ); + } + + /* + * If no activity type found in LPF file, try to update + * from each layer's file. + */ + if ( pgenFilePrds.getProduct().get(0).getType().equalsIgnoreCase("Default") ) { + String ptype = layerFp.getProduct().get(0).getType(); + ptype = matchActivityType( ptype, prdTypes ); + if ( !ptype.equalsIgnoreCase( "Default") ) { + pgenFilePrds.getProduct().get(0).setType( ptype ); + pgenFilePrds.getProduct().get(0).setName( ptype ); + } + } + } + + //Update layer attributes + int nly = pgenFilePrds.getProduct().get(0).getLayer().size(); + gov.noaa.nws.ncep.ui.pgen.file.Layer clayer = + pgenFilePrds.getProduct().get(0).getLayer().get( nly - 1 ); + clayer.setName( layerName ); + + // Color mode + if ( layerColorMode != null && layerColorMode.trim().length() > 0 && + layerColorMode.trim().toUpperCase().startsWith( "A" ) ) { + clayer.setMonoColor( false ); + } + else { + clayer.setMonoColor( true ); + } + + // Fill mode + if ( layerFillMode != null && layerFillMode.trim().length() > 0 && + layerFillMode.trim().equalsIgnoreCase( "On" ) ) { + clayer.setFilled( true ); + } + else { + clayer.setFilled( false ); + } + + // Display mode + if ( layerDisplayMode != null && layerDisplayMode.trim().length() > 0 && + layerDisplayMode.trim().equalsIgnoreCase( "On" ) ) { + clayer.setOnOff( true ); + } + else { + clayer.setOnOff( false ); + } + + // Output file + if ( layerOutputFile != null && layerOutputFile.trim().length() > 0 ) { + clayer.setOutputFile( layerOutputFile ); + } + else { + clayer.setOutputFile( null ); + } + + // layer color + if ( layerColorID != null && layerColorID.trim().length() > 0 ) { + int colorNum = Integer.parseInt( layerColorID ); + if ( colorNum > 0 && colorNum <= 32 ) { + Integer[] nmapColor = getNmapColors().get( colorNum ); + if ( nmapColor != null ) { + if ( clayer.getColor() == null ) { + clayer.setColor( new Color() ); + clayer.getColor().setAlpha( 255 ); + } + + clayer.getColor().setRed( nmapColor[0] ); + clayer.getColor().setGreen( nmapColor[1] ); + clayer.getColor().setBlue( nmapColor[2] ); + } + } + } + } + } + + return pgenFilePrds; + + } + + /* + * Find all layer prefixes in a loaded LPF file (e.g., layer1, layer3, ...) + * @param lpfMap HashMap + * @return ArrayList + */ + private ArrayList getLayerPrefixes( HashMap lpfMap ) { + + ArrayList layerKeys = new ArrayList(); + if ( lpfMap != null && lpfMap.size() > 0 ) { + for ( String key : lpfMap.keySet() ) { + if ( key != null && key.contains( LPF_LAYER_NAME ) ) { + layerKeys.add( new String( key.substring( 0, key.indexOf("_") ) ) ); + } + } + } + + return layerKeys; + + } + + /* + * Load the LPF file contents into a HashMap. + * + * Note: valid entry should be in format of " value" + * + */ + private LinkedHashMap loadLpfParameters( String fname ) { + + LinkedHashMap params = new LinkedHashMap(); + + //Check if the given file exists and readable. + File thisFile = null; + if ( fname != null ) { + thisFile = new File( fname ); + if ( !thisFile.exists() || !thisFile.canRead() ) { + thisFile = null; + } + } + + if ( thisFile == null ) { + return params; + } + + try { + + Scanner fileScanner = new Scanner( thisFile ); + + try { + //first use a Scanner to get each line + while ( fileScanner.hasNextLine() ) { + String nextLine = fileScanner.nextLine().trim(); + + //process each line + if ( !(nextLine.startsWith("!")) ) { + + int start = nextLine.indexOf( "<"); + int end = nextLine.indexOf( ">"); + + if ( start >= 0 && end > 0 && end > start && + nextLine.length() > end ) { + + String name = nextLine.substring( start + 1, end ).trim(); + if ( name.length() > 0 ) { + String value = nextLine.substring( end + 1 ).trim(); + + if ( value.length() > 0 ) { + params.put( name, value ); + } + } + } + } + } + } + finally { + fileScanner.close(); + } + } + catch ( IOException e ) { + e.printStackTrace(); + } + + return params; + } + + /* + * The Color map used in legacy PGEN with 32 colors. + * @return HashMap + */ + private static HashMap getNmapColors() { + if ( nmapColors == null ) { + nmapColors = new HashMap(); + nmapColors.put( 0, new Integer[]{ 0, 0, 0} ); + nmapColors.put( 1, new Integer[]{255, 228, 220} ); + nmapColors.put( 2, new Integer[]{255, 0, 0} ); + nmapColors.put( 3, new Integer[]{ 0, 255, 0} ); + nmapColors.put( 4, new Integer[]{ 0, 0, 255} ); + nmapColors.put( 5, new Integer[]{255, 255, 0} ); + nmapColors.put( 6, new Integer[]{ 0, 255, 255} ); + nmapColors.put( 7, new Integer[]{255, 0, 255} ); + nmapColors.put( 8, new Integer[]{139, 71, 38} ); + nmapColors.put( 9, new Integer[]{255, 130, 71} ); + nmapColors.put( 10, new Integer[]{255, 165, 79} ); + nmapColors.put( 11, new Integer[]{255, 174, 185} ); + nmapColors.put( 12, new Integer[]{255, 106, 106} ); + nmapColors.put( 13, new Integer[]{238, 44, 44} ); + nmapColors.put( 14, new Integer[]{139, 0, 0} ); + nmapColors.put( 15, new Integer[]{205, 0, 0} ); + nmapColors.put( 16, new Integer[]{238, 64, 0} ); + nmapColors.put( 17, new Integer[]{255, 127, 0} ); + nmapColors.put( 18, new Integer[]{205, 133, 0} ); + nmapColors.put( 19, new Integer[]{255, 215, 0} ); + nmapColors.put( 20, new Integer[]{238, 238, 0} ); + nmapColors.put( 21, new Integer[]{127, 255, 0} ); + nmapColors.put( 22, new Integer[]{ 0, 205, 0} ); + nmapColors.put( 23, new Integer[]{ 0, 139, 0} ); + nmapColors.put( 24, new Integer[]{ 16, 78, 139} ); + nmapColors.put( 25, new Integer[]{ 30, 144, 255} ); + nmapColors.put( 26, new Integer[]{ 0, 178, 238} ); + nmapColors.put( 27, new Integer[]{ 0, 238, 238} ); + nmapColors.put( 28, new Integer[]{137, 104, 205} ); + nmapColors.put( 29, new Integer[]{145, 44, 238 } ); + nmapColors.put( 30, new Integer[]{139, 0, 139} ); + nmapColors.put( 31, new Integer[]{255, 255, 255} ); + nmapColors.put( 32, new Integer[]{ 0, 0, 0 } ); + } + + return nmapColors; + } + + /* + * Try to match an activity type name to an existing activity type. + * + * First try to match the alias of an existing type. If not found, then match + * "type(subtype)". If still not found, "Default" is used. + */ + private String matchActivityType( String typeName, HashMap prdTypes) { + + String tpName = typeName; + + boolean matchFound = false; + + // If typeName is a unique ProductType alias, return as is. + for ( String name : prdTypes.keySet() ) { + String palias = prdTypes.get( name ).getName(); + if ( palias != null && typeName.equalsIgnoreCase( palias ) ) { + matchFound = true; + break; + } + } + + if ( !matchFound ) { + for ( String name : prdTypes.keySet() ) { + String fullTypeStr = new String( prdTypes.get( name ).getType() ); + String subtype = prdTypes.get( name ).getSubtype(); + if ( subtype != null && !subtype.equalsIgnoreCase( "None" ) ) { + fullTypeStr = new String( fullTypeStr + "(" + subtype + ")"); + } + + if ( typeName.equalsIgnoreCase( fullTypeStr ) ) { + String st = prdTypes.get( name ).getName(); + if ( st != null && st.trim().length() > 0 ) { + tpName = new String( st ); + } + else { + tpName = fullTypeStr; + } + + matchFound = true; + break; + } + } + } + + if ( !matchFound ) { + tpName = new String( "Default" ); + } + + return tpName; + } + + /* + * Try to find a matching activity defined in LPF file (alias, type, subtype) + * @param lpfMap HashMap + * @param lpfMap HashMap + * @return HashMap + */ + private String matchActivityType( HashMap lpfMap, HashMap prdTypes ) { + + HashMap actMap = getActivityInfoMap( lpfMap ); + + String actType = new String( "Default" ); + + if ( actMap.size() > 0 ) { + String alias = null; + String type = null; + String subtype = null; + + for ( String key : actMap.keySet() ) { + if ( key.contains( "alias") ) { + alias = actMap.get( key ); + } + + if ( key.contains( "type") ) { + type= actMap.get( key ); + } + + if ( key.contains( "subtype") ) { + subtype = actMap.get( key ); + } + } + + if ( alias != null ) { + actType = matchActivityType( alias, prdTypes); + } + + if ( actType == null || actType.equalsIgnoreCase( "Default") ) { + if ( type != null ) { + String fullTypeName = new String( type ); + if ( subtype != null ) { + fullTypeName = new String( fullTypeName + "(" + subtype + ")" ); + } + + actType = matchActivityType( fullTypeName, prdTypes ); + } + } + } + + return actType; + } + + /* + * Find all activity info in a loaded LPF file (e.g., alias, type, subtype) + * @param lpfMap HashMap + * @return HashMap + */ + private HashMap getActivityInfoMap( HashMap lpfMap ) { + + HashMap actInfo = new HashMap(); + if ( lpfMap != null && lpfMap.size() > 0 ) { + for ( String key : lpfMap.keySet() ) { + if ( key != null && key.contains( "activity" ) ) { + actInfo.put( key, lpfMap.get( key ) ); + } + } + } + + return actInfo; + } + +} diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/controls/PgenLayerMergeDialog.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/controls/PgenLayerMergeDialog.java new file mode 100644 index 0000000000..0f0aa3e3d6 --- /dev/null +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/controls/PgenLayerMergeDialog.java @@ -0,0 +1,639 @@ +/* + * gov.noaa.nws.ncep.ui.pgen.controls.PgenLayerMergeDialog + * + * July 2012 + * + * This code has been developed by the NCEP/SIB for use in the AWIPS2 system. + */ + +package gov.noaa.nws.ncep.ui.pgen.controls; + +import java.util.ArrayList; +import java.util.LinkedHashMap; + +import org.eclipse.swt.SWT; +import org.eclipse.swt.events.SelectionAdapter; +import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.graphics.Point; +import org.eclipse.swt.graphics.Rectangle; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Combo; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; +import org.eclipse.swt.widgets.Group; +import org.eclipse.swt.widgets.Label; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.ui.PlatformUI; +import org.eclipse.jface.dialogs.Dialog; +import org.eclipse.jface.dialogs.MessageDialog; + +import com.raytheon.uf.viz.core.exception.VizException; + +import gov.noaa.nws.ncep.ui.pgen.PgenSession; +import gov.noaa.nws.ncep.ui.pgen.PgenUtil; +import gov.noaa.nws.ncep.ui.pgen.rsc.PgenResource; +import gov.noaa.nws.ncep.ui.pgen.elements.Layer; +import gov.noaa.nws.ncep.ui.pgen.elements.Product; + + +/** + * This class creates a dialog to allow the use import/merge layers from a selected + * activity to the current activity's layers. + * + *
+ * SOFTWARE HISTORY
+ * Date       	Ticket#		Engineer	Description
+ * ------------	----------	-----------	--------------------------
+ * 07/12        #593     	J. Wu  		Initial Creation
+ *
+ * 
+ * + * @author J. Wu + */ + +public class PgenLayerMergeDialog extends Dialog { + + private Composite top; + + /* + * Available actions for each layer. + */ + private static enum LayerActions { NO_ACTION, + ADD_AS_NEW_LAYER, + REPLACE_LIKE_NAME_LAYER, + REPLACE_ACTIVE_LAYER, + REPLACE_RENAME_ACTIVE_LAYER, + MERGE_INTO_LIKE_NAME_LAYER, + MERGE_INTO_ACTIVE_LAYER, + MERGE_RENAME_ACTIVE_LAYER }; + + /* + * Bulk actions names and definitions. + */ + private static String[] BulkActionNames = new String[] { + "Take no action", + "Reset all layers to 'Take no action'", + "Set all layers to 'Add as a new layer'", + "Set all layers to 'Replace content of like-named layers', if available", + "Set all layers to 'Merge content into like-named layers', if available", + "Set all layers to 'Merge into ActiveLayer'" }; + + private final static int BULK_NO_ACTION = 0; + private final static int BULK_RESET_ALL_NO_ACTION = 1; + private final static int BULK_ADD_ALL_AS_NEW = 2; + private final static int BULK_REPLACE_ALL_LIKE_NAME_LAYER = 3; + private final static int BULK_MERGE_ALL_LIKE_NAME_LAYER = 4; + private final static int BULK_MERGE_ALL_INTO_ACTIVE_LAYER = 5; + + /* + * Others. + */ + protected PgenResource drawingLayer = null; + protected Product incomingActivity = null; + protected String incomingFile = null; + + private LinkedHashMap layerComboMap = null; + + private static Point shellLocation; + + /** + * AttrDlg constructor + * @param parShell + * @throws VizException + */ + public PgenLayerMergeDialog( Shell parShell, Product prodIn, String fileIn ) throws VizException { + + super(parShell); + this.setShellStyle( SWT.TITLE | SWT.PRIMARY_MODAL ); + + drawingLayer = PgenSession.getInstance().getPgenResource(); + incomingActivity = prodIn; + incomingFile = fileIn; + + layerComboMap = new LinkedHashMap(); + + } + + @Override + public void createButtonsForButtonBar(Composite parent){ + super.createButtonsForButtonBar(parent); + } + + @Override + public Control createButtonBar(Composite parent){ + + Control bar = super.createButtonBar(parent); + GridData gd = new GridData(SWT.CENTER, SWT.DEFAULT, true, false); + bar.setLayoutData(gd); + return bar; + + } + + /* + * Called when "X" button on window is clicked. + * @see org.eclipse.jface.window.Window#handleShellCloseEvent() + */ + @Override + public void handleShellCloseEvent() { + super.handleShellCloseEvent(); + PgenUtil.setSelectingMode(); + } + + + /** + * Set the location of the dialog + */ + public int open(){ + + if ( this.getShell() == null ){ + this.create(); + } + + if ( shellLocation == null ){ + this.getShell().setLocation(this.getShell().getParent().getLocation()); + } else { + getShell().setLocation(shellLocation); + } + + return super.open(); + + } + + /** + * Save location of the dialog. + */ + public boolean close() { + if ( getShell() != null ){ + Rectangle bounds = getShell().getBounds(); + shellLocation = new Point( bounds.x, bounds.y ); + } + return super.close(); + } + + /** + * Creates the dialog area + */ + @Override + public Control createDialogArea(Composite parent) { + + top = (Composite) super.createDialogArea( parent ); + this.getShell().setText("Contours Attributes"); + + // Create the main layout for the dialog. + GridLayout mainLayout = new GridLayout(1, false ); + mainLayout.marginHeight = 5; + mainLayout.marginWidth = 3; + top.setLayout( mainLayout ); + + // Initialize all of the menus, controls, and layouts + initializeComponents(); + + return top; + } + + /** + * Creates buttons, menus, and other controls in the dialog area + */ + private void initializeComponents() { + + this.getShell().setText("Import/Merge Layers"); + + Composite topComp = new Composite( top, SWT.NONE ); + topComp.setLayoutData( new GridData(SWT.CENTER, SWT.DEFAULT, true, false) ); + GridLayout layout0 = new GridLayout( 1, false ); + topComp.setLayout( layout0 ); + + Label advLbl = new Label( topComp, SWT.CENTER ); + advLbl.setText("ADVANCED"); + + //Present basic info for current activity/layer. + Composite curActComp = new Composite( top, SWT.NONE ); + curActComp.setLayoutData( new GridData(SWT.LEFT, SWT.DEFAULT, true, false) ); + + GridLayout layout = new GridLayout( 2, true ); + curActComp.setLayout( layout ); + + Group curActGrp = new Group( curActComp, SWT.SHADOW_ETCHED_OUT ); + GridLayout layout1 = new GridLayout(1, false ); + curActGrp.setLayout( layout1 ); + + curActGrp.setText( "Current Activity" ); + + Label lbl1 = new Label ( curActGrp, SWT.NONE ); + lbl1.setText( drawingLayer.getActiveProduct().getName() ); + + Group curLyrGrp = new Group( curActComp, SWT.SHADOW_ETCHED_OUT ); + GridLayout layout2 = new GridLayout(1, false ); + curLyrGrp.setLayout( layout2 ); + + curLyrGrp.setText( "Active Layer" ); + + Label lbl2 = new Label ( curLyrGrp, SWT.NONE ); + lbl2.setText( drawingLayer.getActiveLayer().getName() ); + + //Present basic info for selected file. + Composite selActComp = new Composite( top, SWT.NONE ); + selActComp.setLayoutData( new GridData(SWT.LEFT, SWT.DEFAULT, true, false) ); + + GridLayout layout3 = new GridLayout( 1, false ); + selActComp.setLayout( layout3 ); + + Group selActGrp = new Group( selActComp, SWT.SHADOW_ETCHED_OUT ); + GridLayout layout4 = new GridLayout(1, false ); + selActGrp.setLayout( layout4 ); + + selActGrp.setText( "Selected File Activity and Filename" ); + + Label lbl3 = new Label ( selActGrp, SWT.NONE ); + lbl3.setText( incomingActivity.getName() + " { " + incomingFile + " }"); + + // Present actions for each incoming layer + Composite layersComp = new Composite( top, SWT.NONE ); + layersComp.setLayoutData( new GridData(SWT.LEFT, SWT.DEFAULT, true, false) ); + + GridLayout layout5 = new GridLayout( 1, false ); + layersComp.setLayout( layout5 ); + + Group layersGrp = new Group( layersComp, SWT.SHADOW_ETCHED_OUT ); + GridLayout layout6 = new GridLayout(2, false ); + layersGrp.setLayout( layout6 ); + + layersGrp.setText( "Incoming Layers" ); + + for ( Layer lyr : incomingActivity.getLayers() ) { + Label lbl4 = new Label ( layersGrp, SWT.NONE ); + lbl4.setText( lyr.getName() ); + + Combo layerActCombo = new Combo(layersGrp , SWT.DROP_DOWN | SWT.READ_ONLY ); + + boolean sameLayerExist = layerExist( lyr.getName() ); + layerActCombo.add( "Take no action " ); + layerActCombo.add( "Add as layer '" + lyr.getName() + "'" ); + + if ( sameLayerExist ) { + layerActCombo.add( "Replace content of '" + lyr.getName() + "'" ); + } + + layerActCombo.add( "Replace content of 'ActiveLayer'"); + layerActCombo.add( "Replace content of 'ActiveLayer' and rename to '" + lyr.getName() + "'" ); + + if ( sameLayerExist ) { + layerActCombo.add( "Merge content into '" + lyr.getName() + "'" ); + } + + layerActCombo.add( "Merge content into 'ActiveLayer'" ); + layerActCombo.add( "Merge content into 'ActiveLayer' and rename to '" + lyr.getName() + "'" ); + + layerActCombo.select( 0 ); + + layerComboMap.put( lyr, layerActCombo ); + } + + // Add bulk actions if there are two or more layers. + if ( incomingActivity.getLayers().size() > 1 ) { + Label lbl4 = new Label ( layersGrp, SWT.NONE ); + lbl4.setText( "Bulk Action" ); + + Combo bulkCombo = new Combo(layersGrp , SWT.DROP_DOWN | SWT.READ_ONLY ); + + for ( String str : BulkActionNames ) { + bulkCombo.add( str ); + } + + bulkCombo.addSelectionListener(new SelectionAdapter(){ + + @Override + public void widgetSelected(SelectionEvent e) { + performBulkActions( ((Combo)e.widget).getSelectionIndex() ); + } + + }); + + bulkCombo.select( 0 ); + } + + } + + /* + * Check if a layer of the given layer existing in the current activity. + */ + private boolean layerExist( String layerName ){ + return (drawingLayer.getActiveProduct().getLayer( layerName )!= null ); + } + + /* + * Perform selected "Bulk" action to each layer. + */ + private void performBulkActions( int actionNum ) { + switch ( actionNum ) { + case BULK_NO_ACTION: + break; + + case BULK_RESET_ALL_NO_ACTION: + for ( Combo cmb : layerComboMap.values() ) { + cmb.select( 0 ); + } + break; + + case BULK_ADD_ALL_AS_NEW: + for ( Combo cmb : layerComboMap.values() ) { + cmb.select( 1 ); + } + + break; + + case BULK_REPLACE_ALL_LIKE_NAME_LAYER: + for ( Combo cmb : layerComboMap.values() ) { + if ( cmb.getItemCount() > 6 ) { + cmb.select( 2 ); + } + } + + break; + case BULK_MERGE_ALL_LIKE_NAME_LAYER: + for ( Combo cmb : layerComboMap.values() ) { + if ( cmb.getItemCount() > 6 ) { + cmb.select( 5 ); + } + } + + break; + case BULK_MERGE_ALL_INTO_ACTIVE_LAYER: + for ( Combo cmb : layerComboMap.values() ) { + if ( cmb.getItemCount() > 6 ) { + cmb.select( 6 ); + } + else { + cmb.select( 4 ); + } + } + + break; + + default: + break; + + } + + } + + /** + * Add a horizontal separator to the display. + */ + public static void addSeparator(Composite top ) { + GridData gd = new GridData(GridData.FILL_HORIZONTAL); + Label sepLbl = new Label(top, SWT.SEPARATOR | SWT.HORIZONTAL); + sepLbl.setLayoutData(gd); + } + + /** + * Perform selected actions for each layer & redraws. + */ + public void okPressed() { + + if ( conflictActions() ) { + return; + } + + Product activeAct = drawingLayer.getActiveProduct(); + Layer activeLayer = drawingLayer.getActiveLayer(); + + for ( Layer lyr : layerComboMap.keySet() ) { + + int index = getLayerActionIndex( layerComboMap.get( lyr ) ); + + switch ( LayerActions.values()[ index ] ) { + + case NO_ACTION: + break; + + case ADD_AS_NEW_LAYER: + addLayer( activeAct, lyr ); + break; + + case REPLACE_LIKE_NAME_LAYER: + replaceMergeLayer( activeAct.getLayer( lyr.getName() ), lyr, true, null ); + break; + + case REPLACE_ACTIVE_LAYER: + replaceMergeLayer( activeLayer, lyr, true, null ); + break; + + case REPLACE_RENAME_ACTIVE_LAYER: + replaceMergeLayer( activeLayer, lyr, true, activeAct ); + break; + + case MERGE_INTO_LIKE_NAME_LAYER: + replaceMergeLayer( activeAct.getLayer( lyr.getName() ), lyr, false, null ); + break; + + case MERGE_INTO_ACTIVE_LAYER: + replaceMergeLayer( drawingLayer.getActiveLayer(), lyr, false, null ); + break; + + case MERGE_RENAME_ACTIVE_LAYER: + replaceMergeLayer( activeLayer, lyr, false, activeAct ); + break; + + default: + break; + + } + + } + + this.close(); + + } + + /** + * closes the dialog + */ + public void cancelPressed(){ + super.cancelPressed(); + } + + /* + * Add input layer to an activity - make sure the layer name won't conflict with + * existing layers. + */ + private void addLayer( Product prd, Layer newLayer ) { + + if ( prd != null && newLayer != null ) { + newLayer.setName( findUniqueLayerName( prd, newLayer ) ); + prd.addLayer( newLayer ); + } + + } + + /* + * Build a layer name that is will unique in the activity. + */ + private String findUniqueLayerName( Product prd, Layer newLayer ) { + + String lyrName = "New Layer"; + + if ( prd != null && newLayer != null ) { + lyrName = newLayer.getName(); + int ii = 1; + while ( prd.getLayer( lyrName ) != null ) { + lyrName = new String( lyrName + " " + ii ); + } + } + + return lyrName; + + } + + + + /* + * Replace or merge the content of one layer with the content from another layer + * + * Note: when "prd" is not null, it means a "rename" is required. + * + */ + private void replaceMergeLayer( Layer existingLayer, Layer newLayer, boolean replace, Product prd ) { + + if ( existingLayer != null && newLayer != null ) { + + if ( replace ) existingLayer.clear(); + + existingLayer.add( newLayer.getDrawables() ); + + if ( prd != null ) { + existingLayer.setName( findUniqueLayerName( prd, newLayer ) ); + } + + } + + } + + /* + * Get the layer action index. + */ + private int getLayerActionIndex( Combo lyrCombo ) { + int index = lyrCombo.getSelectionIndex(); + if ( lyrCombo.getItemCount() < LayerActions.values().length ) { + if ( index == 2 || index == 3 ) { + index++; + } + else if ( index > 3 ) { + index += 2; + } + } + + return index; + } + + + /* + * Check if if there are any conflicts for the user-selected actions: + * + * 1. One existing layer can receive only one "Replace" action from incoming layers. + * 2. One existing layer can receive only one "Rename" action from incoming layers. + * + * Note that only "active layer" might receive such conflicting actions. + * . + */ + private boolean conflictActions() { + + boolean conflict = false; + + ArrayList replacingLayers = new ArrayList(); + ArrayList renamingLayers = new ArrayList(); + + for ( Layer lyr : layerComboMap.keySet() ) { + + int index = getLayerActionIndex( layerComboMap.get( lyr ) ); + + switch ( LayerActions.values()[ index ] ) { + + case NO_ACTION: + break; + + case ADD_AS_NEW_LAYER: + break; + + case REPLACE_LIKE_NAME_LAYER: + if ( drawingLayer.getActiveLayer() == + drawingLayer.getActiveProduct().getLayer( lyr.getName() ) ) { + replacingLayers.add( lyr.getName() ); + } + break; + + case REPLACE_ACTIVE_LAYER: + replacingLayers.add( lyr.getName() ); + + break; + + case REPLACE_RENAME_ACTIVE_LAYER: + + replacingLayers.add( lyr.getName() ); + renamingLayers.add( lyr.getName() ); + + break; + + case MERGE_INTO_LIKE_NAME_LAYER: + break; + case MERGE_INTO_ACTIVE_LAYER: + break; + + case MERGE_RENAME_ACTIVE_LAYER: + renamingLayers.add( lyr.getName() ); + + break; + + default: + break; + + } + + } + + String msg = "The following conflicts have been found for the active layer '" + + drawingLayer.getActiveLayer().getName() + "'. \nPlease fix before proceed:\n\n"; + if ( replacingLayers.size() > 1 ) { + conflict = true; + msg += "1. " + replacingLayers.size() + " layers ("; + for ( String st : replacingLayers ) { + msg += st; + if ( st != replacingLayers.get( replacingLayers.size() - 1) ) { + msg += ", "; + } + } + + msg += ") are selected to replace the content of the active layer.\n\n"; + msg += "But only one layer is allowed and others should use 'Merge'.\n\n"; + } + + if ( renamingLayers.size() > 1 ) { + conflict = true; + msg += "2. Layers ("; + for ( String st : renamingLayers ) { + msg += st; + if ( st != renamingLayers.get( renamingLayers.size() - 1) ) { + msg += ", "; + } + } + + msg += ") are selected to rename the active layer.\n\n"; + msg += "But only one layer is allowed to be selected to do so.\n\n"; + } + + if ( conflict ) { + MessageDialog confirmOpen = new MessageDialog( + PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), + "Conflicting actions to import layers", null, + msg, + MessageDialog.WARNING, new String[]{ "Ok" }, 0 ); + + confirmOpen.open(); + } + + return conflict; + + } + +} diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/display/AbstractElementContainer.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/display/AbstractElementContainer.java index 432d09aadb..cb92d10a4c 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/display/AbstractElementContainer.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/display/AbstractElementContainer.java @@ -37,6 +37,7 @@ import gov.noaa.nws.ncep.ui.pgen.sigmet.ISigmet; * 12/09 #160 G. Zhang Added ISigmet for Sigmet support * 03/10 #223 M.Laryukhin Gfa added. * 04/11 #? B. Yin Re-factor IAttribute + * 09/12 B. Hebbard Merge RTS changes from OB12.9.1 * * * @author sgilbert @@ -151,7 +152,7 @@ public abstract class AbstractElementContainer { displayEls = def.createDisplayElements( (IGfa) element, paintProps ); } else if ( element instanceof ILine ){ - displayEls = def.createDisplayElements( (ILine) element, paintProps ); + displayEls = def.createDisplayElements( (ILine) element, paintProps, true ); } } } diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/display/DefaultElementContainer.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/display/DefaultElementContainer.java index e1514e0980..f00a65ef80 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/display/DefaultElementContainer.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/display/DefaultElementContainer.java @@ -7,7 +7,9 @@ */ package gov.noaa.nws.ncep.ui.pgen.display; +import gov.noaa.nws.ncep.ui.pgen.display.IText.DisplayType; import gov.noaa.nws.ncep.ui.pgen.elements.DrawableElement; +import gov.noaa.nws.ncep.ui.pgen.gfa.IGfa; import com.raytheon.uf.viz.core.IGraphicsTarget; import com.raytheon.uf.viz.core.drawables.PaintProperties; @@ -49,7 +51,7 @@ public class DefaultElementContainer extends AbstractElementContainer { /* * Draws to the given graphics target. Recreates the IDisplayable objects if zooming or - * if the Layer properties change. + * if the Layer properties change * @see gov.noaa.nws.ncep.ui.pgen.display.AbstractTBNL#draw(com.raytheon.uf.viz.core.IGraphicsTarget, com.raytheon.uf.viz.core.drawables.PaintProperties, boolean) */ @Override @@ -67,12 +69,18 @@ public class DefaultElementContainer extends AbstractElementContainer { def.setLayerDisplayAttr(dprops.getLayerMonoColor(), dprops.getLayerColor(), dprops.getLayerFilled()); needsCreate = true; } + else if ( element instanceof IMidCloudText || element instanceof IAvnText || + ( element instanceof IText && + ((IText)element).getDisplayType().equals(DisplayType.BOX) ) || + element instanceof IGfa ) { + needsCreate = true; + } if ( needsCreate ) createDisplayables(paintProps); saveProps = dprops; for ( IDisplayable each : displayEls ) { - each.draw(target); + each.draw(target, paintProps); } } diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/display/DisplayElementFactory.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/display/DisplayElementFactory.java index 9271404b50..cfc6ce7d9a 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/display/DisplayElementFactory.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/display/DisplayElementFactory.java @@ -42,6 +42,7 @@ import gov.noaa.nws.ncep.ui.pgen.display.ArrowHead.ArrowHeadType; import gov.noaa.nws.ncep.ui.pgen.elements.AbstractDrawableComponent; import gov.noaa.nws.ncep.ui.pgen.elements.Arc; import gov.noaa.nws.ncep.ui.pgen.elements.ComboSymbol; +import gov.noaa.nws.ncep.ui.pgen.elements.DECollection; import gov.noaa.nws.ncep.ui.pgen.elements.DrawableElement; import gov.noaa.nws.ncep.ui.pgen.elements.Line; import gov.noaa.nws.ncep.ui.pgen.elements.Symbol; @@ -52,6 +53,7 @@ import gov.noaa.nws.ncep.ui.pgen.elements.tcm.ITcmFcst; import gov.noaa.nws.ncep.ui.pgen.elements.tcm.TcmFcst; import gov.noaa.nws.ncep.ui.pgen.elements.tcm.ITcmWindQuarter; import gov.noaa.nws.ncep.ui.pgen.gfa.Gfa; +import gov.noaa.nws.ncep.ui.pgen.gfa.GfaClip; import gov.noaa.nws.ncep.ui.pgen.gfa.IGfa; import gov.noaa.nws.ncep.ui.pgen.tca.BPGeography; import gov.noaa.nws.ncep.ui.pgen.tca.ITca; @@ -65,6 +67,7 @@ import gov.noaa.nws.ncep.ui.pgen.contours.ContourMinmax; import gov.noaa.nws.ncep.ui.pgen.contours.ContourCircle; import gov.noaa.nws.ncep.viz.common.SnapUtil; +import com.raytheon.uf.common.geospatial.util.WorldWrapCorrector; import com.raytheon.uf.viz.core.DrawableString; import com.raytheon.uf.viz.core.IExtent; import com.raytheon.uf.viz.core.IGraphicsTarget; @@ -122,6 +125,9 @@ import com.vividsolutions.jts.operation.distance.DistanceOp; * 07/11 #? J. Wu Allow more than 1 labels for closed contour lines. * 02/12 #597 S. Gurung Moved snap functionalities to SnapUtil from SigmetInfo. * 03/12 #697 Q. Zhou Fixed line arrow head size for line & gfa + * 07/12 #834 J. Wu Fixed fuzzy text display. + * 08/12 #760 B. Yin Modify line factory to apply world wrap. + * 09/12 B. Hebbard Merge out RTS changes from OB12.9.1 - adds reset() * * * @author sgilbert @@ -216,38 +222,291 @@ public class DisplayElementFactory { * Creates a list of IDisplayable Objects from an IMultiPoint object * @param de A PGEN Drawable Element of a multipoint object * @param paintProps The paint properties associated with the target + * @param worldWrap The flag to apply world wrap for lines * @return A list of IDisplayable elements */ - public ArrayList createDisplayElements(ILine de, PaintProperties paintProps) { - - - - float density; - double[][] pixels; - double[][] smoothpts; + public ArrayList createDisplayElements(ILine de, PaintProperties paintProps, boolean worldWrap) { - setScales(paintProps); - - /* - * save drawable element - */ + if ( worldWrap ) { elem = de; + ArrayList list = new ArrayList(); + + WorldWrapCorrector corrector = new WorldWrapCorrector( + mapDescriptor.getGridGeometry()); + + // put line points in a coordinate array + Coordinate[] coord; + if ( de.isClosedLine() ){ + coord = new Coordinate[de.getLinePoints().length+1]; + for ( int ii = 0; ii < de.getLinePoints().length; ii++ ) { + coord[ ii ] = new Coordinate( de.getLinePoints()[ii].x, de.getLinePoints()[ii].y); + } + coord[ de.getLinePoints().length ] = new Coordinate( de.getLinePoints()[0].x, de.getLinePoints()[0].y); + } + else { + coord = new Coordinate[de.getLinePoints().length]; + + for ( int ii = 0; ii < de.getLinePoints().length; ii++ ) { + coord[ ii ] = new Coordinate( de.getLinePoints()[ii].x, de.getLinePoints()[ii].y); + } + + } + + // apply world wrap. + // pointsToLineString is in GfaClip. It should be put in a common place + Geometry geo = null; + try { + geo = corrector.correct(GfaClip.getInstance().pointsToLineString( coord ) ); + } + catch ( Exception e ){ + System.out.println( "World wrap error: " + e.getMessage() ); + return list; + } + + if ( geo != null && geo.getNumGeometries() > 1 ){ + for ( int ii = 0; ii < geo.getNumGeometries(); ii++ ){ + Geometry geo1 = geo.getGeometryN( ii ); + double[][] pixels = PgenUtil.latlonToPixel( geo1.getCoordinates(), mapDescriptor); + double[][] smoothpts; + float density; + + // Apply parametric smoothing on pixel coordinates, if required + if ( de.getSmoothFactor() > 0 ) { + float devScale = 50.0f; + if ( de.getSmoothFactor() == 1 ) density = devScale / 1.0f; + else density = devScale / 5.0f; + smoothpts = CurveFitter.fitParametricCurve(pixels, density); + } + else { + smoothpts = pixels; + } + + list.addAll( createDisplayElementsForLines( de, smoothpts, paintProps)); + + // Draw labels for contour lines. + //list.addAll( adjustContourLineLabels( elem, paintProps, smoothpts ) ); + + } + + return list; + } + + } + + return createDisplayElements(de, paintProps); + + } + + /** + * Creates display elements for multiple points elements. + * This method gets attributes, such as colors from the input elements, then apply these + * attributes on the smoothed(if needed) points to create a list of displayable. + * @param de A PGEN Drawable Element of a multipoint object + * @param smoothpts points of the multipoint object + * @param paintProps The paint properties associated with the target + * @return + */ + + private ArrayList createDisplayElementsForLines(ILine de, double[][] smoothpts, PaintProperties paintProps){ /* * Get color for creating displayables. */ Color[] dspClr = getDisplayColors( elem.getColors() ); - - /* - * Create the List to be returned, some wireframe shapes and a shaded shape - * to be used for the IDisplayables - */ + + /* + * Find Line Pattern associated with this element, if "Solid Line" was not requested. + */ + LinePattern pattern=null; + LinePatternManager lpl = LinePatternManager.getInstance(); + try { + pattern = lpl.getLinePattern(de.getPatternName()); + //System.out.println("&&&pattern "+pattern.getMaxExtent()); + } + catch (LinePatternException lpe) { + /* + * could not find desired line pattern. Used solid line as default. + */ + System.out.println(lpe.getMessage() + ": Using Solid Line by default."); + pattern = null; + } + + /* + * If pattern has some segments whose length is set + * at runtime based on the desired line width, update the pattern now + */ + if ( (pattern != null) && pattern.needsLengthUpdate() ) { + pattern = pattern.updateLength( screenToExtent * de.getLineWidth() / (de.getSizeScale() * deviceScale) ); + } + + + /* + * Flip the side of the pattern along the spine + */ + if ( (elem instanceof Line) && ((Line)elem).isFlipSide() ) pattern = pattern.flipSide(); + + /* + * If a LinePattern is found for the object, apply it. + * Otherwise, just use solid line. + */ + ScaleType scaleType = null; + if ( (pattern != null) && (pattern.getNumSegments() > 0) ) { + scaleType = ScaleType.SCALE_ALL_SEGMENTS; + if ( elem instanceof Line ) { + Line line = (Line)elem; + // Change scale type for fronts so that only BLANK and LINE segments are scaled. + // This is done so that size of front pips don't vary with length of front. + if ( line.getPgenCategory().equalsIgnoreCase("Front") ) scaleType = ScaleType.SCALE_BLANK_LINE_ONLY; + } + } + + boolean isCCFP = false; + AbstractDrawableComponent adc=((Line)de).getParent(); + isCCFP = (adc!=null && ("CCFP_SIGMET".equals(adc.getPgenType()))); + DECollection ccfp = null; + if ( isCCFP ) { + ccfp = (DECollection)adc; + } + + ArrayList list = new ArrayList(); + + list.addAll(createDisplayElementsFromPts( smoothpts, dspClr, pattern, scaleType, getDisplayFillMode( de.isFilled() ), + ((ILine)de).getLineWidth(), isCCFP, ccfp, paintProps ) ); + + /* + * Draw labels for contour lines. + */ + list.addAll( adjustContourLineLabels( elem, paintProps, smoothpts ) ); + + + return list; + } + + /** + * Creates displayable from the input attributes and points of the line + * @param pts + * @param dspClr + * @param pattern + * @param scaleType + * @param isFilled + * @param lineWidth + * @param isCCFP + * @param ccfp + * @param paintProps + * @return + */ + private ArrayList createDisplayElementsFromPts(double[][] pts, Color[] dspClr, LinePattern pattern, ScaleType scaleType, Boolean isFilled, + float lineWidth, boolean isCCFP, DECollection ccfp, PaintProperties paintProps ){ + ArrayList list = new ArrayList(); wfs = new IWireframeShape[ dspClr.length]; for ( int i=0; i< dspClr.length; i++) { wfs[i] = target.createWireframeShape(false, mapDescriptor); } ss = target.createShadedShape(false, mapDescriptor, true); + + /* + * Create arrow head, if needed + */ + if ( (pattern != null) && pattern.hasArrowHead() ) { + /* + * Get scale size from drawable element. + */ + double scale = elem.getSizeScale(); + if ( scale <= 0.0 ) scale = 1.0; + double sfactor = deviceScale * scale; + + double pointAngle = 60.0; // Angle of arrow point - defining narrowness + double extent = pattern.getMaxExtent(); + + // Consider distance away from center line, the height should be no less than extent * 1.5. + // Currently we only have extent 1 and 2 available. + // 3.5 is what we want the size to be. + double height = sfactor * 3.5; + if(extent * 1.5 > 3.5) + height = sfactor * extent * 1.5; + + int n = pts.length - 1; + // calculate direction of arrow head + double slope = Math.toDegrees(Math.atan2( (pts[n][1]-pts[n-1][1]), (pts[n][0]-pts[n-1][0]) )); + + arrow = new ArrowHead (new Coordinate(pts[n][0],pts[n][1]), + pointAngle, slope, height, pattern.getArrowHeadType() ); + Coordinate[] ahead = arrow.getArrowHeadShape(); + + if ( pattern.getArrowHeadType() == ArrowHeadType.OPEN ) + // Add to wireframe + wfs[0].addLineSegment(toDouble(ahead)); + if ( pattern.getArrowHeadType() == ArrowHeadType.FILLED ) { + // Add to shadedshape + + ss.addPolygonPixelSpace( toLineString(ahead), + new RGB ( dspClr[0].getRed(), dspClr[0].getGreen(), dspClr[0].getBlue() )); + } + } + if ( (pattern != null) && (pattern.getNumSegments() > 0) ) { + handleLinePattern(pattern, pts, scaleType); + } + else { + wfs[0].addLineSegment(pts); + } + + if ( isFilled ){ + list.add( createFill(pts) ); + } + /* + * Compile each IWireframeShape, create its LineDisplayElement, and add to + * IDisplayable return list + */ + for ( int k=0; k < wfs.length; k++ ) { + + wfs[k].compile(); + LineDisplayElement lde = new LineDisplayElement(wfs[k], dspClr[k], lineWidth ); + list.add(lde); + } + + /* + * Compile each IShadedShape, create FillDisplayElement, and add to + * IDisplayable return list + */ + // TODO - This loop may be needed if we ever have to support different alphas + //for ( IShadedShape shade : ss ) { + ss.compile(); + FillDisplayElement fde = new FillDisplayElement(ss, elem.getColors()[0].getAlpha()); + list.add(fde); + + if ( isCCFP ){ + addCcfpSpeed(list, paintProps, ccfp ); + } + + //} + return list; + } + + /** + * Creates a list of IDisplayable Objects from an IMultiPoint object + * @param de A PGEN Drawable Element of a multipoint object + * @param paintProps The paint properties associated with the target + * @return A list of IDisplayable elements + */ + public ArrayList createDisplayElements(ILine de, PaintProperties paintProps) { + + double[][] smoothpts; + double[][] pixels; + float density; + + setScales(paintProps); + + /* + * save drawable element + */ + elem = de; + + /* + * Create the List to be returned, some wireframe shapes and a shaded shape + * to be used for the IDisplayables + */ + ArrayList list = new ArrayList(); /* * Get lat/lon coordinates from drawable element @@ -278,126 +537,9 @@ public class DisplayElementFactory { else { smoothpts = pixels; } - - /* - * Find Line Pattern associated with this element, if "Solid Line" was not requested. - */ - LinePattern pattern=null; - LinePatternManager lpl = LinePatternManager.getInstance(); - try { - pattern = lpl.getLinePattern(de.getPatternName()); - //System.out.println("&&&pattern "+pattern.getMaxExtent()); - } - catch (LinePatternException lpe) { - /* - * could not find desired line pattern. Used solid line as default. - */ - System.out.println(lpe.getMessage() + ": Using Solid Line by default."); - pattern = null; - } - - /* - * If pattern has some segments whose length is set - * at runtime based on the desired line width, update the pattern now - */ - if ( (pattern != null) && pattern.needsLengthUpdate() ) { - pattern = pattern.updateLength( screenToExtent * de.getLineWidth() / (de.getSizeScale() * deviceScale) ); - } - /* - * Create arrow head, if needed - */ - if ( (pattern != null) && pattern.hasArrowHead() ) { - /* - * Get scale size from drawable element. - */ - double scale = elem.getSizeScale(); - if ( scale <= 0.0 ) scale = 1.0; - double sfactor = deviceScale * scale; + list.addAll( createDisplayElementsForLines( de, smoothpts, paintProps)); - double pointAngle = 60.0; // Angle of arrow point - defining narrowness - double extent = pattern.getMaxExtent(); - - // Consider distance away from center line, the height should be no less than extent * 1.5. - // Currently we only have extent 1 and 2 available. - // 3.5 is what we want the size to be. - double height = sfactor * 3.5; - if(extent * 1.5 > 3.5) - height = sfactor * extent * 1.5; - - int n = smoothpts.length - 1; - // calculate direction of arrow head - double slope = Math.toDegrees(Math.atan2( (smoothpts[n][1]-smoothpts[n-1][1]), (smoothpts[n][0]-smoothpts[n-1][0]) )); - - arrow = new ArrowHead (new Coordinate(smoothpts[n][0],smoothpts[n][1]), - pointAngle, slope, height, pattern.getArrowHeadType() ); - Coordinate[] ahead = arrow.getArrowHeadShape(); - - if ( pattern.getArrowHeadType() == ArrowHeadType.OPEN ) - // Add to wireframe - wfs[0].addLineSegment(toDouble(ahead)); - if ( pattern.getArrowHeadType() == ArrowHeadType.FILLED ) { - // Add to shadedshape - - ss.addPolygonPixelSpace( toLineString(ahead), - new RGB ( dspClr[0].getRed(), dspClr[0].getGreen(), dspClr[0].getBlue() )); - } - } - - /* - * Flip the side of the pattern along the spine - */ - if ( (elem instanceof Line) && ((Line)elem).isFlipSide() ) pattern = pattern.flipSide(); - - /* - * If a LinePattern is found for the object, apply it. - * Otherwise, just use solid line. - */ - if ( (pattern != null) && (pattern.getNumSegments() > 0) ) { - ScaleType scaleType = ScaleType.SCALE_ALL_SEGMENTS; - if ( elem instanceof Line ) { - Line line = (Line)elem; - // Change scale type for fronts so that only BLANK and LINE segments are scaled. - // This is done so that size of front pips don't vary with length of front. - if ( line.getPgenCategory().equalsIgnoreCase("Front") ) scaleType = ScaleType.SCALE_BLANK_LINE_ONLY; - } - handleLinePattern(pattern, smoothpts, scaleType); - } - else { - wfs[0].addLineSegment(smoothpts); - } - - /* - * Create ShadedShape for fill, if necessary - */ - if ( getDisplayFillMode( de.isFilled() ) ) { - list.add( createFill(smoothpts) ); - } - - /* - * Compile each IWireframeShape, create its LineDisplayElement, and add to - * IDisplayable return list - */ - for ( int k=0; k < wfs.length; k++ ) { - wfs[k].compile(); - LineDisplayElement lde = new LineDisplayElement(wfs[k], dspClr[k],de.getLineWidth()); - list.add(lde); - } - - /* - * Compile each IShadedShape, create FillDisplayElement, and add to - * IDisplayable return list - */ - // TODO - This loop may be needed if we ever have to support different alphas - //for ( IShadedShape shade : ss ) { - ss.compile(); - FillDisplayElement fde = new FillDisplayElement(ss, elem.getColors()[0].getAlpha()); - list.add(fde); - //} - - AbstractDrawableComponent adc=((Line)de).getParent(); - if(adc!=null&&("CCFP_SIGMET".equals(adc.getPgenType()))) - addCcfpSpeed(list, paintProps, (gov.noaa.nws.ncep.ui.pgen.elements.DECollection)adc); /* * Draw labels for contour lines. */ @@ -1495,7 +1637,7 @@ public class DisplayElementFactory { /* * Create SymbolSetElement and return it */ - slist.add( new SymbolSetElement( pic, paintProps, pts ) ); + slist.add( new SymbolSetElement( pic, pts ) ); return slist; } @@ -3752,7 +3894,16 @@ public class DisplayElementFactory { break; } } - return target.initializeFont(fontName, fontSize, styles); + + /* + * set smoothing and scaleFont to false to disable anti-aliasing (which cause + * the fuzziness of the text). + */ + IFont font = target.initializeFont(fontName, fontSize, styles); + font.setSmoothing(false); + font.setScaleFont(false); + + return font; } /** diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/display/FillDisplayElement.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/display/FillDisplayElement.java index 973756c83c..6bfc604bc5 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/display/FillDisplayElement.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/display/FillDisplayElement.java @@ -9,6 +9,7 @@ package gov.noaa.nws.ncep.ui.pgen.display; import com.raytheon.uf.viz.core.IGraphicsTarget; import com.raytheon.uf.viz.core.drawables.IShadedShape; +import com.raytheon.uf.viz.core.drawables.PaintProperties; import com.raytheon.uf.viz.core.exception.VizException; /** @@ -55,10 +56,11 @@ public class FillDisplayElement implements IDisplayable { /** * Draws the filled shapes to the specified graphics target * @param target Destination graphics target + * @param paintProps PaintProperties * @see gov.noaa.nws.ncep.ui.pgen.display.IDisplayable#draw(com.raytheon.viz.core.IGraphicsTarget) */ @Override - public void draw(IGraphicsTarget target) { + public void draw(IGraphicsTarget target, PaintProperties paintProps) { try { target.drawShadedShape(shape, alpha); diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/display/IDisplayable.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/display/IDisplayable.java index eadd88c0c7..410f66259a 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/display/IDisplayable.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/display/IDisplayable.java @@ -8,6 +8,7 @@ package gov.noaa.nws.ncep.ui.pgen.display; import com.raytheon.uf.viz.core.IGraphicsTarget; +import com.raytheon.uf.viz.core.drawables.PaintProperties; /** * Interface used for all graphic objects in PGEN. @@ -19,10 +20,11 @@ import com.raytheon.uf.viz.core.IGraphicsTarget; public interface IDisplayable { /** - * Draws graphic objects to the specified graphics target. + * Draws graphic objects to the specified graphics target with given paint properties. * @param target + * @param paintProps */ - public void draw(IGraphicsTarget target); + public void draw(IGraphicsTarget target, PaintProperties paintProps); /** * Disposes of any resources held by the graphic objects diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/display/LineDisplayElement.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/display/LineDisplayElement.java index d8dbe03a11..a43a560e4c 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/display/LineDisplayElement.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/display/LineDisplayElement.java @@ -13,6 +13,7 @@ import org.eclipse.swt.graphics.RGB; import com.raytheon.uf.viz.core.IGraphicsTarget; import com.raytheon.uf.viz.core.drawables.IWireframeShape; +import com.raytheon.uf.viz.core.drawables.PaintProperties; import com.raytheon.uf.viz.core.exception.VizException; /** @@ -69,7 +70,7 @@ public class LineDisplayElement implements IDisplayable { * @see gov.noaa.nws.ncep.ui.pgen.display.IDisplayable#draw() */ @Override - public void draw(IGraphicsTarget target) { + public void draw(IGraphicsTarget target, PaintProperties paintProps) { RGB shapeColor = new RGB(color.getRed(), color.getGreen(), color.getBlue()); try { diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/display/RasterElementContainer.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/display/RasterElementContainer.java index b79bb50c8a..12bff9e28c 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/display/RasterElementContainer.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/display/RasterElementContainer.java @@ -66,7 +66,7 @@ public class RasterElementContainer extends AbstractElementContainer { saveProps = dprops; for ( IDisplayable each : displayEls ) { - each.draw(target); + each.draw(target, paintProps); } } diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/display/SymbolSetElement.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/display/SymbolSetElement.java index 649230371d..df617f849e 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/display/SymbolSetElement.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/display/SymbolSetElement.java @@ -7,13 +7,13 @@ */ package gov.noaa.nws.ncep.ui.pgen.display; -import com.raytheon.uf.viz.core.exception.VizException; import com.raytheon.uf.viz.core.IGraphicsTarget; import com.raytheon.uf.viz.core.PixelCoverage; import com.raytheon.uf.viz.core.drawables.IImage; import com.raytheon.uf.viz.core.drawables.PaintProperties; -import com.vividsolutions.jts.geom.Coordinate; +import com.raytheon.uf.viz.core.exception.VizException; import com.raytheon.viz.core.gl.images.GLImage; +import com.vividsolutions.jts.geom.Coordinate; /** * Contains a raster image and information needed to readily display that image on a graphics target * at one or more locations. @@ -25,99 +25,100 @@ import com.raytheon.viz.core.gl.images.GLImage; */ public class SymbolSetElement implements IDisplayable { - /* - * The raster image to be displayed - */ - private IImage raster; - - /* - * targets properties used for zoom and extent info - */ - private PaintProperties paintProps; - - /* - * Array of plot locations in pixel coordinates - */ - private double[][] locations; - private Coordinate ul = new Coordinate(), ur= new Coordinate(), lr= new Coordinate(), ll= new Coordinate(); - - /** - * Constructor used to set an image and its associated locations - * @param raster Rater image to display - * @param paintProps paint properties for the target - * @param locations pixel coordinate locations to display the image - */ - public SymbolSetElement(IImage raster, PaintProperties paintProps, - double[][] locations ) { - this.raster = raster; - this.paintProps = paintProps; - this.locations = locations; - } + /* + * The raster image to be displayed + */ + private final IImage raster; + + /* + * Array of plot locations in pixel coordinates + */ + private final double[][] locations; + + private final Coordinate ul = new Coordinate(), ur = new Coordinate(), + lr = new Coordinate(), ll = new Coordinate(); + + /** + * Constructor used to set an image and its associated locations + * + * @param raster + * Rater image to display + * @param paintProps + * paint properties for the target + * @param locations + * pixel coordinate locations to display the image + */ + public SymbolSetElement(IImage raster, + double[][] locations) { + this.raster = raster; + this.locations = locations; + } /** - * disposes the resources held by the raster image - * @see gov.noaa.nws.ncep.ui.pgen.display.IDisplayable#dispose() - */ - @Override - public void dispose() { + * disposes the resources held by the raster image + * + * @see gov.noaa.nws.ncep.ui.pgen.display.IDisplayable#dispose() + */ + @Override + public void dispose() { raster.dispose(); } /** - * Plots the image to the specified graphics target at the various locations - * @see gov.noaa.nws.ncep.ui.pgen.display.IDisplayable#draw(com.raytheon.viz.core.IGraphicsTarget) - */ - @Override - public void draw(IGraphicsTarget target) { + * Plots the image to the specified graphics target at the various locations + * + * @see gov.noaa.nws.ncep.ui.pgen.display.IDisplayable#draw(com.raytheon.viz.core.IGraphicsTarget) + */ + @Override + public void draw(IGraphicsTarget target, PaintProperties paintProps) { double[] loc = new double[3]; /* - * Scale image - */ - double halfWidth; - double halfHeight; - double screenToWorldRatio = paintProps.getCanvasBounds().width - / paintProps.getView().getExtent().getWidth(); - double scale = 0.5 / screenToWorldRatio ; - if ( raster instanceof GLImage ) { - halfWidth = ((GLImage)raster).getImage().getWidth() * scale; - halfHeight = ((GLImage)raster).getImage().getHeight() * scale; - } - else { - halfWidth = raster.getWidth() * scale; - halfHeight = raster.getHeight() * scale; - } + * Scale image + */ + double halfWidth; + double halfHeight; + double screenToWorldRatio = paintProps.getCanvasBounds().width + / paintProps.getView().getExtent().getWidth(); + double scale = 0.5 / screenToWorldRatio; + if (raster instanceof GLImage) { + halfWidth = ((GLImage) raster).getImage().getWidth() * scale; + halfHeight = ((GLImage) raster).getImage().getHeight() * scale; + } else { + halfWidth = raster.getWidth() * scale; + halfHeight = raster.getHeight() * scale; + } /* - * draw raster image at each location - */ - for (int j=0; j < locations.length; j++) { - loc = locations[j]; - ul.x = loc[0]-halfWidth; - ul.y = loc[1]-halfHeight; - ur.x = loc[0]+halfWidth; - ur.y = loc[1]-halfHeight; - lr.x = loc[0]+halfWidth; - lr.y = loc[1]+halfHeight; - ll.x = loc[0]-halfWidth; - ll.y = loc[1]+halfHeight; - PixelCoverage extent = new PixelCoverage(ul, ur, lr, ll); - /* - PixelCoverage extent = new PixelCoverage(new Coordinate(loc[0]-halfWidth,loc[1]-halfHeight), - new Coordinate(loc[0]+halfWidth,loc[1]-halfHeight), - new Coordinate(loc[0]+halfWidth,loc[1]+halfHeight), - new Coordinate(loc[0]-halfWidth,loc[1]+halfHeight)); - */ - try { - target.drawRaster(raster, extent, paintProps); - } - catch (VizException ve) { - ve.printStackTrace(); - } - } - } + * draw raster image at each location + */ + for (int j = 0; j < locations.length; j++) { + loc = locations[j]; + ul.x = loc[0] - halfWidth; + ul.y = loc[1] - halfHeight; + ur.x = loc[0] + halfWidth; + ur.y = loc[1] - halfHeight; + lr.x = loc[0] + halfWidth; + lr.y = loc[1] + halfHeight; + ll.x = loc[0] - halfWidth; + ll.y = loc[1] + halfHeight; + PixelCoverage extent = new PixelCoverage(ul, ur, lr, ll); + /* + * PixelCoverage extent = new PixelCoverage(new + * Coordinate(loc[0]-halfWidth,loc[1]-halfHeight), new + * Coordinate(loc[0]+halfWidth,loc[1]-halfHeight), new + * Coordinate(loc[0]+halfWidth,loc[1]+halfHeight), new + * Coordinate(loc[0]-halfWidth,loc[1]+halfHeight)); + */ + try { + target.drawRaster(raster, extent, paintProps); + } catch (VizException ve) { + ve.printStackTrace(); + } + } + } } diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/display/TextDisplayElement.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/display/TextDisplayElement.java index 183c5e860e..d57eabb4d1 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/display/TextDisplayElement.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/display/TextDisplayElement.java @@ -21,6 +21,7 @@ import com.raytheon.uf.viz.core.IGraphicsTarget.TextStyle; import com.raytheon.uf.viz.core.IGraphicsTarget.VerticalAlignment; import com.raytheon.uf.viz.core.PixelExtent; import com.raytheon.uf.viz.core.drawables.IFont; +import com.raytheon.uf.viz.core.drawables.PaintProperties; import com.raytheon.uf.viz.core.exception.VizException; import com.raytheon.viz.ui.color.BackgroundColor; import com.raytheon.viz.ui.color.IBackgroundColorChangedListener.BGColorMode; @@ -129,7 +130,7 @@ public class TextDisplayElement implements IDisplayable { * @see gov.noaa.nws.ncep.ui.pgen.display.IDisplayable#draw(com.raytheon.viz.core.IGraphicsTarget) */ @Override - public void draw(IGraphicsTarget target) { + public void draw(IGraphicsTarget target, PaintProperties paintProps) { //target.setRotateTextAroundPoint(true); diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/elements/DrawableElementFactory.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/elements/DrawableElementFactory.java index a801bd68bd..9272e308af 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/elements/DrawableElementFactory.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/elements/DrawableElementFactory.java @@ -58,6 +58,7 @@ import com.vividsolutions.jts.geom.Coordinate; * 09/10 #304 B. Yin Added LabeledLine * 09/11 ? B. Yin Added TCM * 03/12 #625 S. Gurung Make Line and Line(Med) thicker for CCFP_SIGMET + * 04/12 #734 J. Zeng Added SPENES * * * @@ -219,6 +220,11 @@ public class DrawableElementFactory { case TCM_FCST: de = new TcmFcst(locations.get(0), ((ITcm)attr).getFcstHr(), ((ITcm)attr).getWindRadius()); break; + + case SPENES: + de = new Spenes(); + ((Spenes) de).setLinePoints(locations); + break; default: /* * Do nothing. diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/elements/DrawableType.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/elements/DrawableType.java index af9587d664..7439ae81c9 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/elements/DrawableType.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/elements/DrawableType.java @@ -28,6 +28,7 @@ package gov.noaa.nws.ncep.ui.pgen.elements; * 11/10 #182 G. Zhang Added CONVSIGMET * 01/10 #104? S. Gilbert Added MID_CLOUD_TEXT * 03/10 #223 M.Laryukhin Gfa added. + * 04/12 #734 J. Zeng Added Spenes * * * @author J. Wu @@ -36,5 +37,5 @@ package gov.noaa.nws.ncep.ui.pgen.elements; */ public enum DrawableType { LINE, SYMBOL, KINKLINE, TEXT, AVN_TEXT, MID_CLOUD_TEXT, ARC, TRACK, VECTOR, ANY, COMBO_SYMBOL, JET, TCA, GFA, - WATCH_BOX, CONTOURS, SIGMET, CONV_SIGMET, VAA, VAA_CLOUD, TCM_FCST; + WATCH_BOX, CONTOURS, SIGMET, CONV_SIGMET, VAA, VAA_CLOUD, TCM_FCST, SPENES; } diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/elements/IJetTools.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/elements/IJetTools.java index 45fe614069..5365d64c44 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/elements/IJetTools.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/elements/IJetTools.java @@ -26,5 +26,7 @@ public interface IJetTools { public Coordinate latLon2Relative( Coordinate loc, Vector barb); public Coordinate relative2LatLon( Coordinate relative, Vector barb); public java.util.Vector checkHashOnJet(Jet aJet); + //For 'DelPart' + public void addBarbHashFromAnotherJet(Jet jet1, Jet jet2); } diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/elements/MultiPointElement.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/elements/MultiPointElement.java index 9e94115759..6e9fd4e67d 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/elements/MultiPointElement.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/elements/MultiPointElement.java @@ -16,6 +16,10 @@ import gov.noaa.nws.ncep.ui.pgen.display.IMultiPoint; import gov.noaa.nws.ncep.ui.pgen.display.FillPatternList.FillPattern; import com.vividsolutions.jts.geom.Coordinate; +import com.vividsolutions.jts.geom.GeometryFactory; +import com.vividsolutions.jts.geom.LinearRing; +import com.vividsolutions.jts.geom.Polygon; +import com.vividsolutions.jts.geom.impl.CoordinateArraySequence; /** * Class to represent a multiple point element. @@ -299,6 +303,33 @@ public abstract class MultiPointElement extends DrawableElement implements IMult } + /** + * Generate a JTS polygon from a set of points. + * + * It is assumed that the first point is not repeated at the end + * in the input array of point. + * + * @param points array of points + * @return + */ + public Polygon toJTSPolygon() { + GeometryFactory geometryFactory = new GeometryFactory(); + + Coordinate[] coords = new Coordinate[linePoints.size()+1]; + + for (int ii = 0; ii states; + private ArrayList rfcs; + private ArrayList cwas; + + private String stateZ000 = null; + private String initDateTime = null; + private String latestDataUsed = null; + private int obsHr = -1 ; + private String forecasters = null; + private String location = null; + private String attnWFOs = null; + private String attnRFCs = null; + private String event = null; + private String satAnalysisTrend = null; + private int shortTermBegin = -1; + private int shortTermEnd = -1; + private String outlookLevel = null; + private String addlInfo = null; + private String latLon = null; + + public Spenes(){ + super(); + } + + public Spenes(Coordinate[] range, Color[] colors, + float lineWidth, double sizeScale, boolean closed, boolean filled, + List linePoints, int smoothFactor, FillPattern fillPattern, + String pgenCategory, String pgenType) { + super(range, colors, lineWidth, sizeScale, closed, filled, + linePoints, smoothFactor, fillPattern, pgenCategory, pgenType); + } + + /** + * Creates a copy of this object. This is a deep copy and new objects are + * created so that we are not just copying references of objects + */ + @Override + public DrawableElement copy() { + /* + * create a new Line object and initially set its attributes to this one's + */ + Spenes newEl = new Spenes(); + + /* + * new Strings are created for Type and LinePattern + */ + newEl.setPgenCategory(new String(this.getPgenCategory())); + newEl.setPgenType(new String(this.getPgenType())); + newEl.setParent(this.getParent()); + + newEl.update(this); + + /* + * new Coordinates points are created and set, so we don't just set + * references + */ + ArrayList ptsCopy = new ArrayList(); + for (int i=0; i < this.getPoints().size(); i++) { + ptsCopy.add(new Coordinate(this.getPoints().get(i))); + } + newEl.setPoints(ptsCopy); + + /* + * new colors are created and set, so we don't just set + * references + */ + Color[] colorCopy = new Color[this.getColors().length]; + for (int i=0; i states) { + this.states = states; + } + + /** + * Get states + */ + public ArrayList getStates() { + return states; + } + + /** + * Set Rfcs + */ + public void setRfcs(ArrayList rfcs) { + this.rfcs = rfcs; + } + + /** + * Get Rfcs + */ + public ArrayList getRfcs() { + return rfcs; + } + + /** + * Set Cwas + */ + public void setCwas(ArrayList cwas) { + this.cwas = cwas; + } + + /** + * Get Cwas + */ + public ArrayList getCwas() { + return cwas; + } + + /** + * get states abbreviation. + */ + public String getStateZ000(){ + return stateZ000; + } + + /** + * set state abbreviation from a string + */ + public void setStateZ000(String statesZ000){ + this.stateZ000 = statesZ000; + } + + /** + * set state abbreviation from a list + */ + public void setStateZ000(ArrayList states) { + int ii = 0; + StringBuilder sb = new StringBuilder(); + for ( USState st : states) { + sb.append(st.getStateAbrv()); + sb.append("Z000-"); + ii++; + if(ii%9 == 0) sb.append("\n"); + } + + this.stateZ000 = sb.toString(); + } + + /** + * get initial time + */ + public String getInitDateTime(){ + return initDateTime; + } + + /** + * initialize time + * @return + */ + public void setInitTime(){ + + Calendar init = Calendar.getInstance( TimeZone.getTimeZone("GMT") ); + if (init != null) { + initDateTime = String.format("%1$tm/%1$td/%1$ty %1$tH%1$tMZ", init); + } + } + + /** + * set initialization time from string + */ + public void setInitDateTime(String initDateTime){ + if (initDateTime == null ) setInitTime(); + this.initDateTime = initDateTime; + } + + /** + * get lastest data type used + */ + public String getLatestDataUsed(){ + return latestDataUsed; + } + + /** + * set latest data type + */ + public void setLatestData(String latestDataUsed){ + this.latestDataUsed = latestDataUsed; + + } + + /** + * get observation hour + */ + public int getObsHr(){ + return obsHr; + } + + /** + * set observation hour + */ + public void setObsHr(int obsHr){ + this.obsHr = obsHr; + } + + /** + * get forecaster's name + */ + public String getForecasters(){ + return forecasters; + } + + /** + * set forecaster's name + */ + public void setForecasters(String forecasters){ + this.forecasters = forecasters; + } + + /** + * get states information + */ + public String getLocation(){ + return location; + } + + /** + * set states information from string + */ + public void setLocation(String statesName){ + this.location = statesName; + } + + /** + * set state information from list + */ + public void setLocation(ArrayList states) { + int ii = 0; + StringBuilder sb = new StringBuilder(); + for ( USState st : states) { + sb.append(st.getName()); + sb.append("..."); + ii++; + if(ii%6 == 0) sb.append("\n\n"); + } + this.location = sb.toString(); + } + + /** + * get WFOs information + */ + public String getAttnWFOs(){ + return attnWFOs; + } + + /** + * set WFOs information from a string + */ + public void setAttnWFOs(String cwas){ + this.attnWFOs = cwas; + } + + /** + * set WFOs information from a list + */ + public void setAttnWFOs(ArrayList cwas) { + int ii = 0; + StringBuilder sb = new StringBuilder(); + for ( Cwa cwa : cwas) { + sb.append(cwa.getWfoName()); + sb.append("..."); + ii++; + if(ii%11 == 0) sb.append("\n\n"); + } + this.attnWFOs = sb.toString(); + } + + /** + * get RFCs information + */ + public String getAttnRFCs(){ + return attnRFCs; + } + + /** + * set RFCs information from a string + */ + public void setAttnRFCs(String rfcs) { + this.attnRFCs = rfcs; + } + + /** + * set RFCs information from a list + */ + public void setAttnRFCs(ArrayList rfcs){ + int ii = 0; + StringBuilder sb = new StringBuilder(); + for ( Rfc rfc : rfcs) { + sb.append(rfc.getBasinId()); + sb.append("..."); + ii++; + if(ii%6 == 0) sb.append("\n\n"); + } + this.attnRFCs = sb.toString(); + } + + /** + * set an event title + */ + public void setEvent(String event){ + this.event = event; + } + + /** + * get an event title + */ + public String getEvent(){ + return event; + } + + /** + * set info from analysis + */ + public void setSatAnalysisTrend(String satAnalysisTrend){ + this.satAnalysisTrend = satAnalysisTrend; + } + + /** + * set info from analysis + */ + public String getSatAnalysisTrend(){ + return satAnalysisTrend; + } + + /** + * get the beginning time of the short term precipitation + */ + public int getShortTermBegin(){ + return shortTermBegin; + } + + /** + * set the beginning time of the short term precipitation + */ + public void setShortTermBegin(int shortTermBegin){ + this.shortTermBegin = shortTermBegin; + } + + /** + * get the ending time of the precipitation + */ + public int getShortTermEnd(){ + return shortTermEnd; + } + + /** + * set the ending time of the precipitation + */ + public void setShortTermEnd(int shortTermEnd){ + this.shortTermEnd = shortTermEnd; + } + + /** + * get outlook level + */ + public String getOutlookLevel(){ + return outlookLevel; + } + + /** + * set outlook level + */ + public void setOutlookLevel(String outlookLevel){ + this.outlookLevel = outlookLevel; + } + + /** + * set additional information + */ + public void setAddlInfo(String addlInfo){ + this.addlInfo = addlInfo; + } + + /** + * get additional information + */ + public String getAddlInfo(){ + return addlInfo; + } + + /** + * get latlon + */ + public String getLatLon(){ + return latLon; + } + + /** + * set latlon from a list + */ + public void setLatLon(Coordinate[] coords){ + int ii = 0; + StringBuilder sb = new StringBuilder(); + for ( Coordinate coord : coords) { + sb.append((int)(coord.y*100)); + sb.append(" "); + sb.append((int)(coord.x*100)); + sb.append(" "); + ii++; + if(ii%4 == 0) sb.append("\n\n"); + } + this.latLon = sb.toString(); + } + + /** + * set latlon from a string + */ + public void setLatLon(String latlon){ + this.latLon = latlon; + } +} diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/elements/Track.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/elements/Track.java index f24a6c1f2f..0e309e3aa1 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/elements/Track.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/elements/Track.java @@ -36,7 +36,8 @@ import com.vividsolutions.jts.geom.Coordinate; * 04/11 #? B. Yin Re-factor IAttribute * 08/11 ? B. Yin Fixed the no half-hour label bug. * 02/12 TTR456 Q.Zhou Added speed knot, mph. Added combos and roundTo indices for speed & dir . - Modified setSpeed + * Modified setSpeed + * 06/12 #777 Q.Zhou Modified DEFAULT_EXTRA_POINT_NUMBER. * * * @author M. Gao @@ -52,7 +53,7 @@ public class Track extends Line implements ITrack { private final static float DEFAULT_FONT_SIZE = 14.0f; private final static float DEFAULT_LINE_WIDTH = 0.1f; - private final static int DEFAULT_EXTRA_POINT_NUMBER = 2; + private final static int DEFAULT_EXTRA_POINT_NUMBER = 5; // private final static int DEFAULT_INTERVAL_HOUR = 1; private final static String INTERVAL_TIME_FORMAT_PATTERN = "HH:mm"; public void setExtrapMarker(String extrapMarker) { diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/elements/WatchBox.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/elements/WatchBox.java index b8d3f40974..5e3098f4ae 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/elements/WatchBox.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/elements/WatchBox.java @@ -23,11 +23,14 @@ import java.awt.Color; import java.awt.geom.Point2D; import java.io.ByteArrayOutputStream; import java.util.ArrayList; +import java.util.Arrays; import java.util.Calendar; import java.util.Collection; import java.util.HashMap; +import java.util.HashSet; import java.util.Iterator; import java.util.List; +import java.util.Set; import javax.xml.transform.Source; import javax.xml.transform.Transformer; @@ -104,7 +107,7 @@ public class WatchBox extends MultiPointElement implements IWatchBox{ private String statesIncl; private String adjAreas; private int replWatch; - private int contWatch; + private String contWatch; //issue flag: issued = 1; canceled = -1; un-issued = 0; private int issueFlag; private String watchType; @@ -958,11 +961,11 @@ public class WatchBox extends MultiPointElement implements IWatchBox{ FileTools.write( filename, filePrds ); } - public void setContWatch(int contWatch) { + public void setContWatch(String contWatch) { this.contWatch = contWatch; } - public int getContWatch() { + public String getContWatch() { return contWatch; } @@ -1656,30 +1659,11 @@ public class WatchBox extends MultiPointElement implements IWatchBox{ * @param fips * @return */ - private List findCntyInClst(String fips, List rt){ - if ( rt == null ) rt = new ArrayList(); - String value = PgenStaticDataProvider.getProvider().getClstTbl().get(fips); - if ( value != null ){ - int index = 0; - do { - String cluster = value.substring(index, index+5); - if ( cluster.equals(fips) && !rt.contains(cluster)){ - rt.add(cluster); - } - else { - //recursive - if ( !rt.contains(cluster) ){ - rt.addAll( findCntyInClst(cluster, rt)); - } - } - index += 6; - }while (index+5 <= value.length()); - } - else { - rt.add(fips); - } + private Set findCntyInClst(String fips){ + + Set rt = PgenStaticDataProvider.getProvider().getClstTbl().get(fips); + return (rt == null )? new HashSet(Arrays.asList(fips)): rt; - return rt; } /** @@ -1690,7 +1674,7 @@ public class WatchBox extends MultiPointElement implements IWatchBox{ if ( county.getFips().isEmpty() || county.getFips().equalsIgnoreCase("00000")){ removeCounty( county); } - for ( String fips : findCntyInClst(county.getFips(), null)){ + for ( String fips : findCntyInClst(county.getFips())){ removeCounty(PgenStaticDataProvider.getProvider().findCounty(fips)); } } @@ -1704,7 +1688,7 @@ public class WatchBox extends MultiPointElement implements IWatchBox{ addCounty( county); } else { - for ( String fips : findCntyInClst(county.getFips(), null)){ + for ( String fips : findCntyInClst(county.getFips())){ SPCCounty cnty = PgenStaticDataProvider.getProvider().findCounty(fips); if ( cnty != null && !countyList.contains(cnty)) addCounty(cnty); } diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/file/DrawableElement.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/file/DrawableElement.java index 94abdbc2bc..f9d285e54f 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/file/DrawableElement.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/file/DrawableElement.java @@ -38,6 +38,7 @@ import javax.xml.bind.annotation.XmlType; * <element ref="{}Track" maxOccurs="unbounded" minOccurs="0"/> * <element ref="{}Contours" maxOccurs="unbounded" minOccurs="0"/> * <element ref="{}TCA" maxOccurs="unbounded" minOccurs="0"/> + * <element ref="{}Spenes" maxOccurs="unbounded" minOccurs="0"/> * <element ref="{}Sigmet" maxOccurs="unbounded" minOccurs="0"/> * <element ref="{}WatchBox" maxOccurs="unbounded" minOccurs="0"/> * <element ref="{}Gfa" maxOccurs="unbounded" minOccurs="0"/> @@ -68,7 +69,8 @@ import javax.xml.bind.annotation.XmlType; "outlook", "gfa", "volcano", - "tcm" + "tcm", + "spenes" }) @XmlRootElement(name = "DrawableElement") public class DrawableElement { @@ -95,6 +97,8 @@ public class DrawableElement { protected List contours; @XmlElement(name = "TCA") protected List tca; + @XmlElement(name = "Spenes") + protected List spenes; @XmlElement(name = "Sigmet") protected List sigmet; @XmlElement(name = "WatchBox") @@ -427,6 +431,35 @@ public class DrawableElement { return this.tca; } + /** + * Gets the value of the spenes property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the spenes property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getSpenes().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Spenes } + * + * + */ + public List getSpenes() { + if (spenes == null) { + spenes = new ArrayList(); + } + return this.spenes; + } + /** * Gets the value of the sigmet property. * diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/file/ObjectFactory.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/file/ObjectFactory.java index 9d5c3f129d..4be59f5a8e 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/file/ObjectFactory.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/file/ObjectFactory.java @@ -124,6 +124,14 @@ public class ObjectFactory { return new Sigmet(); } + /** + * Create an instance of {@link Spenes } + * + */ + public Spenes createSpenes() { + return new Spenes(); + } + /** * Create an instance of {@link Product } * diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/file/ProductConverter.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/file/ProductConverter.java index 456183a34e..41b9c8ace9 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/file/ProductConverter.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/file/ProductConverter.java @@ -46,6 +46,7 @@ import gov.noaa.nws.ncep.ui.pgen.elements.Product; import gov.noaa.nws.ncep.ui.pgen.elements.Layer; import gov.noaa.nws.ncep.ui.pgen.elements.Line; import gov.noaa.nws.ncep.ui.pgen.elements.Symbol; +import gov.noaa.nws.ncep.ui.pgen.elements.Spenes; import gov.noaa.nws.ncep.ui.pgen.elements.Text; import gov.noaa.nws.ncep.ui.pgen.elements.AvnText; import gov.noaa.nws.ncep.ui.pgen.elements.MidCloudText; @@ -122,7 +123,7 @@ import gov.noaa.nws.ncep.ui.pgen.sigmet.Volcano; * 03/12 #676 Q. Zhou Added Issue Office field. * 03/12 #610 J. Wu Restore issue/until times for GFA smears. * 05/12 #808 J. Wu Remove SnapUtil from converting GFA. - * + * 06/12 #734 J. Zeng Add converter for spenes * * * @author J. Wu @@ -524,6 +525,14 @@ public class ProductConverter { } + if ( !elem.getSpenes().isEmpty() ) { + + for ( gov.noaa.nws.ncep.ui.pgen.file.Spenes fspenes : elem.getSpenes()){ + des.add(convertXML2Spenes(fspenes)); + } + + } + if ( !elem.getDECollection().isEmpty() ) { for ( gov.noaa.nws.ncep.ui.pgen.file.DECollection fdec : elem.getDECollection() ) { @@ -1050,6 +1059,9 @@ public class ProductConverter { fde.getSigmet().add( sigmet ); } + else if ( de instanceof Spenes ) { + fde.getSpenes().add(convertSpenes2XML((Spenes)de)); + } else { gov.noaa.nws.ncep.ui.pgen.file.Line line = new gov.noaa.nws.ncep.ui.pgen.file.Line(); @@ -1761,6 +1773,119 @@ public class ProductConverter { } + /** + * convert a Spenes element to XML file + * @param spenes + * @return + */ + private static gov.noaa.nws.ncep.ui.pgen.file.Spenes convertSpenes2XML(Spenes spenes) { + gov.noaa.nws.ncep.ui.pgen.file.Spenes fspenes = + new gov.noaa.nws.ncep.ui.pgen.file.Spenes(); + //set color + fspenes.setPgenCategory(spenes.getPgenCategory()); + fspenes.setPgenType(spenes.getPgenType()); + fspenes.setLineWidth(spenes.getLineWidth()); + fspenes.setSmoothLevel(spenes.getSmoothFactor()); + fspenes.setInitDateTime(spenes.getInitDateTime()); + fspenes.setStateZ000(spenes.getStateZ000()); + fspenes.setLatestDataUsed(spenes.getLatestDataUsed()); + fspenes.setObsHr(spenes.getObsHr()); + fspenes.setForecasters(spenes.getForecasters()); + fspenes.setLocation(spenes.getLocation()); + fspenes.setAttnWFOs(spenes.getAttnWFOs()); + fspenes.setAttnRFCs(spenes.getAttnRFCs()); + fspenes.setEvent(spenes.getEvent()); + fspenes.setSatAnalysisTrends(spenes.getSatAnalysisTrend()); + fspenes.setShortTermBegin(spenes.getShortTermBegin()); + fspenes.setShortTermEnd(spenes.getShortTermEnd()); + fspenes.setOutLookLevel(spenes.getOutlookLevel()); + fspenes.setAddlInfo(spenes.getAddlInfo()); + fspenes.setLatlon(spenes.getLatLon()); + + //set points + for ( Coordinate crd : spenes.getLinePoints() ) { + + Point fpt = new Point(); + fpt.setLat( crd.y ); + fpt.setLon( crd.x ); + + fspenes.getPoint().add( fpt ); + } + Point fpt = new Point(); + Coordinate crd = new Coordinate(); + crd = spenes.getLinePoints()[0]; + fpt.setLat(crd.y); + fpt.setLon(crd.x); + fspenes.getPoint().add(fpt); + + + //set color + for ( Color clr : spenes.getColors() ) { + + gov.noaa.nws.ncep.ui.pgen.file.Color fclr = + new gov.noaa.nws.ncep.ui.pgen.file.Color(); + + fclr.setRed( clr.getRed() ); + fclr.setGreen( clr.getGreen() ); + fclr.setBlue( clr.getBlue() ); + fclr.setAlpha( clr.getAlpha() ); + fspenes.getColor().add( fclr ); + } + + return fspenes; + } + + /** + * Convert XML to spenes element + * @param fwb + * @return + */ + private static Spenes convertXML2Spenes( gov.noaa.nws.ncep.ui.pgen.file.Spenes fspenes ){ + Spenes sp = new Spenes(); + + sp.setPgenCategory(fspenes.getPgenCategory()); + sp.setPgenType(fspenes.getPgenType()); + sp.setLineWidth(fspenes.getLineWidth()); + sp.setSmoothFactor(fspenes.getSmoothLevel()); + sp.setInitDateTime(fspenes.getInitDateTime()); + sp.setLatestData(fspenes.getLatestDataUsed()); + sp.setObsHr(fspenes.getObsHr()); + sp.setForecasters(fspenes.getForecasters()); + sp.setStateZ000(fspenes.getStateZ0000()); + sp.setLocation(fspenes.getLocation()); + sp.setAttnWFOs(fspenes.getAttnWFOs()); + sp.setAttnRFCs(fspenes.getAttnRFCs()); + sp.setEvent(fspenes.getEvent()); + sp.setSatAnalysisTrend(fspenes.getSatAnalysisTrends()); + sp.setShortTermBegin(fspenes.getShortTermBegin()); + sp.setShortTermEnd(fspenes.getShortTermEnd()); + sp.setOutlookLevel(fspenes.getOutLookLevel()); + sp.setAddlInfo(fspenes.getAddlInfo()); + sp.setLatLon(fspenes.getLatlon()); + //set color + Color[] clr = new Color[ fspenes.getColor().size() ]; + int nn = 0; + for (gov.noaa.nws.ncep.ui.pgen.file.Color fColor : fspenes.getColor() ) { + clr[nn++] = new Color( fColor.getRed(), fColor.getGreen(), + fColor.getBlue(), fColor.getAlpha() ); + } + sp.setColors(clr); + + //set points + ArrayList linePoints = new ArrayList(); + nn = 0; + for ( Point pt : fspenes.getPoint() ) { + linePoints.add( new Coordinate( pt.getLon(), pt.getLat() )); + } + sp.setPointsOnly(linePoints); + + + + return sp; + } + + + /** * Convert a WatchBox element to file * @param wb diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/file/Spenes.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/file/Spenes.java new file mode 100644 index 0000000000..d077cb402c --- /dev/null +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/file/Spenes.java @@ -0,0 +1,642 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2012.05.31 at 03:22:58 PM EDT +// + + +package gov.noaa.nws.ncep.ui.pgen.file; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + +/** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType>
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element ref="{}Color" maxOccurs="unbounded"/>
+ *         <element ref="{}Point" maxOccurs="unbounded"/>
+ *       </sequence>       
+ *       <attribute name="pgenType" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="pgenCategory" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="lineWidth" type="{http://www.w3.org/2001/XMLSchema}float" />
+ *       <attribute name="smoothLevel" type="{http://www.w3.org/2001/XMLSchema}int" />
+ *       <attribute name="initDateTime" type="{http://www.w3.org/2001/XMLSchema}dateTime" />
+ *       <attribute name="latestDataUsed" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="obsHr" type="{http://www.w3.org/2001/XMLSchema}dateTime" />
+ *       <attribute name="forecasters" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="location" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="attnWFOs" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="attnRFCs" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="event" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="satAnalysisTrends" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="shortTerm" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="outLookLevel" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="addlInfo" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="latlon" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "", propOrder = { + "color", + "point" +}) +@XmlRootElement(name = "Spenes") +public class Spenes { + + @XmlElement(name = "Color", required = true) + protected List color; + @XmlElement(name = "Point", required = true) + protected List point; + @XmlAttribute + protected float lineWidth; + @XmlAttribute + protected int smoothLevel; + @XmlAttribute + protected String stateZ000; + @XmlAttribute + protected String initDateTime; + @XmlAttribute + protected String latestDataUsed; + @XmlAttribute + protected int obsHr; + @XmlAttribute + protected String forecasters; + @XmlAttribute + protected String location; + @XmlAttribute + protected String attnWFOs; + @XmlAttribute + protected String attnRFCs; + @XmlAttribute + protected String event; + @XmlAttribute + protected String satAnalysisTrends; + @XmlAttribute + protected int shortTermBegin; + @XmlAttribute + protected int shortTermEnd; + @XmlAttribute + protected String outLookLevel; + @XmlAttribute + protected String addlInfo; + @XmlAttribute + protected String latlon; + @XmlAttribute + protected String product; + @XmlAttribute + protected String pgenType; + @XmlAttribute + protected String pgenCategory; + + /** + * Gets the value of the color property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the color property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getColor().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Color } + * + * + */ + public List getColor() { + if (color == null) { + color = new ArrayList(); + } + return this.color; + } + + /** + * Gets the value of the point property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the point property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getPoint().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Point } + * + * + */ + public List getPoint() { + if (point == null) { + point = new ArrayList(); + } + return this.point; + } + + /** + * Gets the value of the lineWidth property. + * + * @return + * possible object is + * {@link Float } + * + */ + public Float getLineWidth() { + return lineWidth; + } + + /** + * Sets the value of the lineWidth property. + * + * @param value + * allowed object is + * {@link Float } + * + */ + public void setLineWidth(Float value) { + this.lineWidth = value; + } + + /** + * Gets the value of the smoothLevel property. + * + * @return + * possible object is + * {@link Integer } + * + */ + public Integer getSmoothLevel() { + return smoothLevel; + } + + /** + * Sets the value of the smoothLevel property. + * + * @param value + * allowed object is + * {@link Integer } + * + */ + public void setSmoothLevel(Integer value) { + this.smoothLevel = value; + } + + /** + * Gets the value of the initDateTime property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getStateZ0000() { + return stateZ000; + } + + + /** + * Sets the value of the smoothLevel property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setStateZ000(String stateZ000) { + this.stateZ000 = stateZ000; + } + + /** + * Gets the value of the initDateTime property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getInitDateTime() { + return initDateTime; + } + + /** + * Sets the value of the initDateTime property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setInitDateTime(String value) { + this.initDateTime = value; + } + + /** + * Gets the value of the latestDataUsed property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getLatestDataUsed() { + return latestDataUsed; + } + + /** + * Sets the value of the latestDataUsed property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setLatestDataUsed(String value) { + this.latestDataUsed = value; + } + + /** + * Gets the value of the obsHr property. + * + * @return + * possible object is + * {@link int } + * + */ + public int getObsHr() { + return obsHr; + } + + /** + * Sets the value of the obsHr property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setObsHr(int value) { + this.obsHr = value; + } + + /** + * Gets the value of the forecasters property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getForecasters() { + return forecasters; + } + + /** + * Sets the value of the forecasters property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setForecasters(String value) { + this.forecasters = value; + } + + /** + * Gets the value of the location property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getLocation() { + return location; + } + + /** + * Sets the value of the location property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setLocation(String value) { + this.location = value; + } + + /** + * Gets the value of the attnWFOs property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getAttnWFOs() { + return attnWFOs; + } + + /** + * Sets the value of the attnWFOs property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setAttnWFOs(String value) { + this.attnWFOs = value; + } + + /** + * Gets the value of the attnRFCs property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getAttnRFCs() { + return attnRFCs; + } + + /** + * Sets the value of the attnRFCs property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setAttnRFCs(String value) { + this.attnRFCs = value; + } + + /** + * Gets the value of the event property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getEvent() { + return event; + } + + /** + * Sets the value of the event property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setEvent(String value) { + this.event = value; + } + + /** + * Gets the value of the satAnalysisTrends property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getSatAnalysisTrends() { + return satAnalysisTrends; + } + + /** + * Sets the value of the satAnalysisTrends property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setSatAnalysisTrends(String value) { + this.satAnalysisTrends = value; + } + + /** + * Gets the value of the shortTerm property. + * + * @return + * possible object is + * {@link int } + * + */ + public int getShortTermBegin() { + return shortTermBegin; + } + + /** + * Sets the value of the shortTerm property. + * + * @param value + * allowed object is + * {@link int } + * + */ + public void setShortTermBegin(int value) { + this.shortTermBegin = value; + } + + /** + * Gets the value of the shortTerm property. + * + * @return + * possible object is + * {@link int } + * + */ + public int getShortTermEnd() { + return shortTermEnd; + } + + /** + * Sets the value of the shortTerm property. + * + * @param value + * allowed object is + * {@link int } + * + */ + public void setShortTermEnd(int value) { + this.shortTermEnd = value; + } + + + /** + * Gets the value of the outLookLevel property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getOutLookLevel() { + return outLookLevel; + } + + /** + * Sets the value of the outLookLevel property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setOutLookLevel(String value) { + this.outLookLevel = value; + } + + /** + * Gets the value of the addlInfo property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getAddlInfo() { + return addlInfo; + } + + /** + * Sets the value of the addlInfo property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setAddlInfo(String value) { + this.addlInfo = value; + } + + /** + * Gets the value of the latlon. + * + * @return + * possible object is + * {@link String } + * + */ + public String getLatlon() { + return latlon; + } + + /** + * Sets the value of the latlon. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setLatlon(String value) { + this.latlon = value; + } + + public String getProduct() { + return product; + } + + /** + * Sets the value of the product property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setProduct(String value) { + this.product = value; + } + + /** + * Gets the value of the pgenType property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getPgenType() { + return pgenType; + } + + /** + * Sets the value of the pgenType property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setPgenType(String value) { + this.pgenType = value; + } + + /** + * Gets the value of the pgenCategory property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getPgenCategory() { + return pgenCategory; + } + + /** + * Sets the value of the pgenCategory property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setPgenCategory(String value) { + this.pgenCategory = value; + } + +} diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/file/WatchBox.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/file/WatchBox.java index 4eb4e202a3..611bad99d2 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/file/WatchBox.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/file/WatchBox.java @@ -189,7 +189,7 @@ public class WatchBox { @XmlAttribute protected Integer watchNumber; @XmlAttribute - protected Integer contWatch; + protected String contWatch; @XmlAttribute protected String forecaster; @XmlAttribute @@ -997,7 +997,7 @@ public class WatchBox { * {@link Integer } * */ - public Integer getContWatch() { + public String getContWatch() { return contWatch; } @@ -1009,7 +1009,7 @@ public class WatchBox { * {@link Integer } * */ - public void setContWatch(Integer value) { + public void setContWatch(String value) { this.contWatch = value; } diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/filter/CategoryFilter.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/filter/CategoryFilter.java index 36372c3170..94cef6f1ba 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/filter/CategoryFilter.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/filter/CategoryFilter.java @@ -13,6 +13,7 @@ import gov.noaa.nws.ncep.ui.pgen.elements.AbstractDrawableComponent; import gov.noaa.nws.ncep.ui.pgen.elements.DECollection; import gov.noaa.nws.ncep.ui.pgen.elements.Jet; import gov.noaa.nws.ncep.ui.pgen.elements.Outlook; +import gov.noaa.nws.ncep.ui.pgen.elements.Spenes; import gov.noaa.nws.ncep.ui.pgen.elements.Text; import gov.noaa.nws.ncep.ui.pgen.elements.labeledlines.LabeledLine; import gov.noaa.nws.ncep.ui.pgen.elements.tcm.Tcm; @@ -59,8 +60,7 @@ public class CategoryFilter implements ElementFilter { else if ( adc instanceof Text && adc.getParent().getParent() != null && adc.getParent().getParent() instanceof Outlook ){ - //exclude text in outlook - return false; + return true; } else if ( adc.getParent().getPgenCategory() != null && adc.getParent().getPgenCategory().equalsIgnoreCase("MET") ) { @@ -75,7 +75,8 @@ public class CategoryFilter implements ElementFilter { } else if ( adc instanceof Gfa || adc instanceof TCAElement || - adc instanceof Tcm ){ + adc instanceof Tcm || + adc instanceof Spenes ){ return true; } diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/gfa/FrzlFormatter.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/gfa/FrzlFormatter.java index 8010e79ff9..c457390ead 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/gfa/FrzlFormatter.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/gfa/FrzlFormatter.java @@ -44,6 +44,7 @@ import com.vividsolutions.jts.operation.distance.DistanceOp; * ------------ ---------- ----------- -------------------------- * 05/2011 #? B. Yin Initial Creation. * 02/12 #597 S. Gurung Moved snap functionalities to SnapUtil from SigmetInfo. + * 08/12 #? B. Yin Added a cll to build vortest for fzlvl * * * @@ -174,6 +175,7 @@ public class FrzlFormatter { if ( clippedGfa != null ){ GfaRules.assignIssueTime(clippedGfa); clippedGfa.setGfaArea( areaName ); + clippedGfa.setGfaVorText(Gfa.buildVorText( clippedGfa )); ret.add( clippedGfa ); } } @@ -235,6 +237,7 @@ public class FrzlFormatter { if ( clippedGfa != null ){ GfaRules.assignIssueTime(clippedGfa); clippedGfa.setGfaArea( areaName ); + clippedGfa.setGfaVorText(Gfa.buildVorText( clippedGfa )); ret.add( clippedGfa ); } } diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/gfa/GfaFormat.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/gfa/GfaFormat.java index fda082e105..60e1ed6e43 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/gfa/GfaFormat.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/gfa/GfaFormat.java @@ -58,6 +58,9 @@ import com.vividsolutions.jts.geom.impl.CoordinateArraySequence; * 07/11 J. Wu Removed the pre-clipping before snapping. * 07/11 ? B. Yin Added FRZL * 05/12 #808 J. Wu Update vor text for airmets. + * 06/12 #594 J. Wu TTR393 - fixed invalid polygons from clipping. + * 08/12 #610 B. Yin Remove M_FZLVL outlooks + * 08/12 #859 J. Wu Fixed smearing when snapshots is too small. * * * @@ -141,9 +144,18 @@ public class GfaFormat { } } + //make sure M_FZLVL does not generate outlooks + if ( !( ((Gfa)adc).getGfaHazard().equalsIgnoreCase("M_FZLVL") && + ((Gfa)adc ).isSnapshot() && + (Gfa.getHourMinInt(((Gfa)adc).getGfaFcstHr())[0] + + Gfa.getHourMinInt(((Gfa)adc).getGfaFcstHr())[1]/60.0) > 6 )) { oldList.add(adc); + } - if ( ( (Gfa)adc ).isSnapshot() ) { + if ( ( (Gfa)adc ).isSnapshot() + && !( ((Gfa)adc).getGfaHazard().equalsIgnoreCase("M_FZLVL") && + (Gfa.getHourMinInt(((Gfa)adc).getGfaFcstHr())[0] + + Gfa.getHourMinInt(((Gfa)adc).getGfaFcstHr())[1]/60.0) > 6 )) { // oldList.add(adc); newList.add(adc); } @@ -182,7 +194,6 @@ public class GfaFormat { protected void createSmears( List list ) { // System.out.println("Create Smear.....call GfaClip.getInstance().validateGfaBounds"); // GfaClip.getInstance().validateGfaBounds(); -// System.out.println("Create Smear.....finish "); /* * Put snapshots into a tree set and sort them by fcstHr in ascending order. @@ -205,6 +216,12 @@ public class GfaFormat { */ TreeSet splittedSS = splitSnapshots( tree ); + //Get the GFA international bounds + Coordinate[] intlBnds = GfaClip.getInstance().getFaInternationalBound().getGeometryN(0).getCoordinates(); + ArrayList intlBndsPts = new ArrayList(); + for ( Coordinate cc : intlBnds ) { + intlBndsPts.add( cc ); + } /* * Generate smear from each FcstHrListPair. @@ -212,7 +229,6 @@ public class GfaFormat { ArrayList> listOfLists = new ArrayList>(); for ( FcstHrListPair pair : splittedSS ) { - // Find the top/bottom, FZL top/bottom, and subtypes for the pair HashMap values = findGfaTopBots( pair.list ); String type = findGfaSubTypes( pair.list ); @@ -316,10 +332,10 @@ public class GfaFormat { if ( clipAgstIntlBnd == null || clipAgstIntlBnd.getNumGeometries() <= 0 || !GfaClip.getInstance().isBiggerInGrid( clipAgstIntlBnd ) ) { - return; +// return; + continue; } - /* * Snapping (the first point/last point are not the same) * @@ -342,6 +358,37 @@ public class GfaFormat { if ( clippedWithRegions == null || clippedWithRegions.size() == 0 ) continue; + + /* + * Clipping may result in invalid polygons, when intersection points of the smear with + * the international bounds are snapped.... + */ + for ( Gfa gg: clippedWithRegions ) { + if ( !(gg.toPolygon().isValid()) ) { + ArrayList newPts = new ArrayList( gg.getPoints() ); + for ( int ii = 0; ii < gg.getPoints().size(); ii++ ) { + int jj = ii+1; + if ( jj == gg.getPoints().size() ) jj = 0; + + double distance = GfaSnap.getInstance().distance( gg.getPoints().get(ii), gg.getPoints().get(jj) ); + if ( (distance / PgenUtil.NM2M) <= GfaSnap.CLUSTER_DIST ) { + + if ( intlBndsPts.contains( gg.getPoints().get(ii) ) ) { + newPts.remove( gg.getPoints().get( jj ) ); + } + else { + newPts.remove( gg.getPoints().get( ii ) ); + } + } + } + + if ( newPts.size() < gg.getPoints().size() ) { + gg.setPointsOnly( newPts ); + } + } + + } + /* * Add the new smear and its associated snapshots as attributes * to the list for further processing. @@ -377,6 +424,7 @@ public class GfaFormat { } + /* * Apply other GFA rules (area, reduce points, wording ...... */ @@ -812,6 +860,7 @@ public class GfaFormat { // Clone HashMap values = new HashMap(); + for ( String key : g.getGfaValues().keySet() ) { values.put(key, g.getGfaValues().get(key) ); } diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/gfa/GfaRules.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/gfa/GfaRules.java index 86e1365a32..ff5cd796ad 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/gfa/GfaRules.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/gfa/GfaRules.java @@ -53,6 +53,8 @@ import com.vividsolutions.jts.geom.Polygon; * pre-load it when PGEN is activated. * 07/11 J. Wu Remove smears with empty state list. * 03/12 #601 J. Wu Fixed conditional wording for "contgByd". + * 06/12 TTR393 J. Wu Adjust algorithm in "processMaybe" to spped + * up processing by 200 times. * * * @@ -902,15 +904,29 @@ public class GfaRules { // // ratio = (Outlook Area - Intersect Area)/ State Area // - Geometry a = airmetP.intersection(stateP); + // June, 2012 - adjust algorithm to find the ratio due to high-resolution state bounds. + // + // Prevoius - Intersection Area = (A^S) ^ (O^S) + // Now - Intersection Area = (A^O)^S + // + // + Geometry a = airmetP.intersection( outlookP ); + if ( a == null ) continue; + Geometry o = outlookP.intersection(stateP); - Geometry i = a.intersection(o); + + Geometry i = a.intersection( stateP ); + if ( i == null ) continue; double oArea = PgenUtil.getSphPolyArea(o); double iArea = PgenUtil.getSphPolyArea(i); - double sArea = PgenUtil.getSphPolyArea(stateP); - double ratio = (oArea - iArea)/sArea; + double ratio = 0.0; + if ( (oArea - iArea) > 0.0 ) { + double sArea = PgenUtil.getSphPolyArea(stateP); + ratio = (oArea - iArea)/sArea; + } + if (ratio >= gfaOtlkgenRatio) return "YES"; } else { diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/palette/PgenPaletteAction.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/palette/PgenPaletteAction.java index d22c3c8010..23d54da656 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/palette/PgenPaletteAction.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/palette/PgenPaletteAction.java @@ -18,14 +18,17 @@ import org.eclipse.swt.SWT; import org.eclipse.swt.widgets.MessageBox; import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.IViewPart; +import org.eclipse.ui.IViewReference; import org.eclipse.ui.IWorkbenchPage; import org.eclipse.ui.PlatformUI; +import org.eclipse.ui.internal.WorkbenchPage; import com.raytheon.viz.ui.EditorUtil; import com.raytheon.viz.ui.editor.AbstractEditor; public class PgenPaletteAction extends AbstractHandler { + @SuppressWarnings("restriction") @Override public Object execute(ExecutionEvent arg0) throws ExecutionException { @@ -40,16 +43,26 @@ public class PgenPaletteAction extends AbstractHandler { IViewPart vpart = wpage.findView( PgenUtil.VIEW_ID ); + try { if ( vpart == null ){ vpart = wpage.showView( PgenUtil.VIEW_ID ); - + IViewReference pgenViewRef = wpage.findViewReference(PgenUtil.VIEW_ID); + if(pgenViewRef != null&& wpage instanceof WorkbenchPage ){ + ( (WorkbenchPage) wpage ).detachView(pgenViewRef); + } } else { - if ( ! wpage.isPartVisible(vpart) ) vpart = wpage.showView( PgenUtil.VIEW_ID ); + if ( ! wpage.isPartVisible(vpart) ){ + vpart = wpage.showView( PgenUtil.VIEW_ID ); + IViewReference pgenViewRef = wpage.findViewReference(PgenUtil.VIEW_ID); + if(pgenViewRef != null&& wpage instanceof WorkbenchPage ){ + ( (WorkbenchPage) wpage ).detachView(pgenViewRef); + } + } } } diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/palette/PgenPaletteWindow.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/palette/PgenPaletteWindow.java index 2e56f6437c..705bd42858 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/palette/PgenPaletteWindow.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/palette/PgenPaletteWindow.java @@ -66,6 +66,7 @@ import com.raytheon.viz.ui.UiUtil; import com.raytheon.viz.ui.VizWorkbenchManager; import com.raytheon.viz.ui.editor.AbstractEditor; import com.raytheon.viz.ui.editor.ISelectedPanesChangedListener; +import com.raytheon.viz.ui.editor.VizMultiPaneEditor; import com.raytheon.viz.ui.perspectives.AbstractVizPerspectiveManager; import com.raytheon.viz.ui.perspectives.VizPerspectiveListener; import com.raytheon.viz.ui.tools.AbstractModalTool; @@ -83,6 +84,7 @@ import gov.noaa.nws.ncep.ui.pgen.productmanage.ProductDialogStarter; import gov.noaa.nws.ncep.ui.pgen.rsc.PgenResource; import gov.noaa.nws.ncep.ui.pgen.tools.PgenCycleTool; import gov.noaa.nws.ncep.ui.pgen.tools.PgenSelectingTool; +import gov.noaa.nws.ncep.viz.common.AbstractNcEditor; import gov.noaa.nws.ncep.viz.common.ui.NmapCommon; //import gov.noaa.nws.ncep.viz.ui.display.NmapUiUtils; //import gov.noaa.nws.ncep.viz.ui.display.NCMapEditor; @@ -156,6 +158,8 @@ public class PgenPaletteWindow extends ViewPart implements SelectionListener, private Button undoButton = null; private Button redoButton = null; private String currentCategory = null; + private String currentObject = null; + private String currentAction = ""; private HashMap buttonMap = null; // map of buttons currently displayed on palette @@ -561,8 +565,19 @@ public class PgenPaletteWindow extends ViewPart implements SelectionListener, if ( point.equals(OBJECT_SECTION) && currentAction.equalsIgnoreCase("MultiSelect")){ - elem = itemMap.get( "MultiSelect"); + if ( currentCategory != null && currentCategory.equalsIgnoreCase("MET")){ + if ( currentObject != null ){ + resetIcon(currentObject); + } + + currentObject = elem.getAttribute("name"); + setActiveIcon(currentObject); + } + elem = itemMap.get( "MultiSelect"); + } + else if ( currentObject != null ){ + resetIcon(currentObject); } //change front/line type @@ -766,7 +781,9 @@ public class PgenPaletteWindow extends ViewPart implements SelectionListener, IWorkbenchPart part = partRef.getPart(false); //System.out.println("Something Activated: "+part.getClass().getCanonicalName() ); //if ( part instanceof NCMapEditor &&((NCMapEditor) part).getApplicationName().equals("NA")) { - if ( part instanceof AbstractEditor ) { + + //change AbstrcactEditor to VizMultiPaneEditor in order to avoid NSharp editor. + if ( isNCMapEditor( part ) ) { PgenResource rsc = PgenUtil.findPgenResource((AbstractEditor)part); if ( (rsc==null) && (PgenUtil.getPgenMode()==PgenMode.SINGLE) ) rsc = PgenUtil.createNewResource(); @@ -818,7 +835,7 @@ public class PgenPaletteWindow extends ViewPart implements SelectionListener, //System.out.println("Something BroughtToTop: "+part.getClass().getCanonicalName() ); partActivated(partRef); - if ( part instanceof AbstractEditor ) { + if ( isNCMapEditor( part ) ) { AbstractEditor editor = (AbstractEditor)part; PgenResource rsc = PgenUtil.findPgenResource((AbstractEditor)part); @@ -870,7 +887,7 @@ public class PgenPaletteWindow extends ViewPart implements SelectionListener, PgenUtil.removeSelectedPaneChangedListener( currentIsMultiPane, this ); } } - else if ( part instanceof AbstractEditor ) { + else if ( isNCMapEditor( part ) ) { PgenResource pgen = PgenUtil.findPgenResource( (AbstractEditor) part ); if ( pgen != null ){ pgen.closeDialogs(); @@ -883,7 +900,8 @@ public class PgenPaletteWindow extends ViewPart implements SelectionListener, IWorkbenchPart part = partRef.getPart(false); //System.out.println("Something Deactivated: "+part.getClass().getCanonicalName() ); - if ( part instanceof AbstractEditor ) { + //change AbstrcactEditor to VizMultiPaneEditor in order to avoid NSharp editor. + if ( isNCMapEditor( part ) ) { PgenResource pgen = PgenUtil.findPgenResource( (AbstractEditor) part ); if ( pgen != null ){ @@ -929,7 +947,7 @@ public class PgenPaletteWindow extends ViewPart implements SelectionListener, IWorkbenchPart part = partRef.getPart(false); //System.out.println("Something Hidden: "+part.getClass().getCanonicalName() ); - if ( part instanceof AbstractEditor ) { + if ( isNCMapEditor( part ) ) { PgenResource pgen = PgenUtil.findPgenResource( (AbstractEditor) part ); if ( pgen != null ){ pgen.closeDialogs(); @@ -946,7 +964,7 @@ public class PgenPaletteWindow extends ViewPart implements SelectionListener, public void partVisible(IWorkbenchPartReference partRef) { IWorkbenchPart part = partRef.getPart(false); //System.out.println("Something Opened: "+part.getClass().getCanonicalName() ); - if(part instanceof AbstractEditor && !PreloadGfaDataThread.loaded ) { + if( isNCMapEditor( part ) && !PreloadGfaDataThread.loaded ) { // preload the classes to reduce the first GFA format time new PreloadGfaDataThread().start(); } @@ -1254,4 +1272,18 @@ public class PgenPaletteWindow extends ViewPart implements SelectionListener, // } } + /** + * @return the currentObject + */ + public String getCurrentObject() { + return currentObject; + } + + /* + * Check if a workbench part is NCMapEditor + */ + private boolean isNCMapEditor( IWorkbenchPart part ){ + return ( part instanceof VizMultiPaneEditor && part instanceof AbstractNcEditor ); + } + } diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/productmanage/ProductConfigureDialog.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/productmanage/ProductConfigureDialog.java index b389d00bd3..83d5f50252 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/productmanage/ProductConfigureDialog.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/productmanage/ProductConfigureDialog.java @@ -85,6 +85,8 @@ import gov.noaa.nws.ncep.viz.common.ui.color.ColorButtonSelector; * 09/11 #335 J. Wu Added type/subtype/alias/file template * 11/11 ? B. Yin Put settings file in localization * 01/12 TTR463 J. Wu Creating new activity from existing ones + * 07/12 #822 J. Wu Synchronize with the presence of PGEN Palette + * 08/12 #822 J. Wu Make this dialog "APPLICATION_MODAL" * * * @@ -207,8 +209,6 @@ public class ProductConfigureDialog extends ProductDialog { super( parShell ); - retrievePgenPalette(); - } /** @@ -275,6 +275,14 @@ public class ProductConfigureDialog extends ProductDialog { */ public void initializeComponents() { + /* + * Retrieve PGEN pallete info - it may get disposed when palette is deactivated + * so we need to make sure palette is there and retrieve info before starting to + * build this GUI. + */ + retrievePgenPalette(); + + /* * Load product types */ @@ -3497,5 +3505,17 @@ public class ProductConfigureDialog extends ProductDialog { return value == null ? "" : (new String( value ) ); } + /** + * Create a new primary_modal shell for this dialog. + * + * @return Return shell. + */ + @Override + protected Shell createShell( Shell parent ) { + Shell newShell = new Shell( parent, SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL ); + return newShell; + } + + } diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/productmanage/ProductConfigureHandler.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/productmanage/ProductConfigureHandler.java index ee30a6662a..9c83d50330 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/productmanage/ProductConfigureHandler.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/productmanage/ProductConfigureHandler.java @@ -7,9 +7,12 @@ */ package gov.noaa.nws.ncep.ui.pgen.productmanage; +import gov.noaa.nws.ncep.ui.pgen.PgenSession; + import org.eclipse.core.commands.AbstractHandler; import org.eclipse.core.commands.ExecutionEvent; import org.eclipse.core.commands.ExecutionException; +import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.PlatformUI; @@ -21,6 +24,7 @@ import org.eclipse.ui.PlatformUI; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * 08/09 #151 J. Wu Initial creation. + * 07/12 #822 J. Wu Ensure PGEN palette is activated. * * * @@ -37,6 +41,18 @@ public class ProductConfigureHandler extends AbstractHandler { */ public Object execute(ExecutionEvent arg0) throws ExecutionException { + if ( PgenSession.getInstance().getPgenPalette() == null ) { + MessageDialog confirmDlg = new MessageDialog( + PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), + "PGEN Palette Needed", null, + "Please Activate the PGEN Palette First", + MessageDialog.WARNING, new String[]{"OK"}, 0 ); + + confirmDlg.open(); + + return null; + } + Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(); ProductConfigureDialog dlg = ProductConfigureDialog.getInstance( shell ); diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/productmanage/ProductDialog.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/productmanage/ProductDialog.java index 106bcdce60..1babf5a1c6 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/productmanage/ProductDialog.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/productmanage/ProductDialog.java @@ -38,6 +38,8 @@ import org.eclipse.swt.widgets.Shell; * ------------ ---------- ----------- -------------------------- * 08/09 #151 J. Wu Initial creation. * 02/12 #656 J. Wu Retain the last location of the dialog. + * 07/12 #822 J. Wu Add createShell() so it can be overrided + * to create shell with different styles. * * * @@ -95,7 +97,7 @@ public class ProductDialog extends Dialog { // Create the main shell; Shell parent = this.getParent(); - shell = new Shell( parent, SWT.DIALOG_TRIM | SWT.MODELESS ); + shell = createShell( parent ); // Set the title of the dialog. setTitle(); @@ -130,6 +132,16 @@ public class ProductDialog extends Dialog { return returnValue; } + /** + * Create a new modeless hell by default. + * + * @return Return shell. + */ + protected Shell createShell( Shell parent ) { + Shell newShell = new Shell( parent, SWT.DIALOG_TRIM | SWT.MODELESS ); + return newShell; + } + /** * Sets the title of the dialog. */ diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/productmanage/ProductLauncher.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/productmanage/ProductLauncher.java index d8ec74ae45..6fd58b4724 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/productmanage/ProductLauncher.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/productmanage/ProductLauncher.java @@ -45,7 +45,8 @@ import java.util.List; * 09/2010 #151 J. Wu Initial Creation * 09/2011 #335 J. Wu Added type/subtype/alias for * PGEN activities. - * 09/11 #335 J. Wu made cascading menu for activity type/subtype. + * 09/2011 #335 J. Wu made cascading menu for activity type/subtype. + * 08/2012 #? J. Wu Add the activity to the existing ones instead of "Replace" * * * @@ -105,7 +106,6 @@ public class ProductLauncher extends ContributionItem { } else { typeUsed.add( prdType.getType() ); - } MenuItem typeItem = new MenuItem( menu, SWT.CASCADE, ii ); @@ -185,10 +185,13 @@ public class ProductLauncher extends ContributionItem { productList.add( prd ); + /* * Add this product list to the PgenResource to launch the product template */ - PgenSession.getInstance().getPgenResource().replaceProduct( productList ); + List curPrdList = PgenSession.getInstance().getPgenResource().getProducts(); + prd.setName( findUniqueActivityName( curPrdList, prd.getName() ) ); + PgenSession.getInstance().getPgenResource().addProduct( productList ); } @@ -264,4 +267,39 @@ public class ProductLauncher extends ContributionItem { } + /* + * Build an activity name that is unique in the activity list. + */ + private String findUniqueActivityName( List prds, String actName ) { + + String outName = new String( actName ); + + int ii = 1; + while ( !isUniqueActivityName( prds, outName ) ) { + outName = new String( outName + " " + ii ); + ii++; + } + + return outName; + + } + + /* + * Check if an activity name is unique in the activity list. + */ + private boolean isUniqueActivityName( List prds, String actName ) { + + boolean isUnique = true; + + for ( Product prd : prds ) { + if ( prd.getName().equalsIgnoreCase( actName ) ) { + isUnique = false; + break; + } + } + + return isUnique; + + } + } diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/productmanage/ProductManageDialog.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/productmanage/ProductManageDialog.java index 4a670ba28a..9a3bc34403 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/productmanage/ProductManageDialog.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/productmanage/ProductManageDialog.java @@ -11,6 +11,7 @@ import gov.noaa.nws.ncep.ui.pgen.PgenSession; import gov.noaa.nws.ncep.ui.pgen.PgenUtil; import gov.noaa.nws.ncep.ui.pgen.attrdialog.AttrSettings; import gov.noaa.nws.ncep.ui.pgen.attrdialog.GfaAttrDlg; +import gov.noaa.nws.ncep.ui.pgen.attrdialog.OutlookAttrDlg; import gov.noaa.nws.ncep.ui.pgen.controls.PgenFileManageDialog; import gov.noaa.nws.ncep.ui.pgen.elements.Layer; import gov.noaa.nws.ncep.ui.pgen.elements.Product; @@ -68,6 +69,7 @@ import com.raytheon.uf.viz.core.exception.VizException; * 09/11 #335 J. Wu made cascading menu for activity type/subtype. * 06/12 TTR253 J. Wu made layer check boxes to stay de-selected * unless the user selects them. + * 06/12 TTR559 B. Yin Link the layer name to Outlook type * * * @@ -1050,6 +1052,14 @@ public class ProductManageDialog extends ProductDialog { GfaAttrDlg.getInstance( this.getParent() ).switchHazard( currentLayer.getName() ); } } + else if ( OutlookAttrDlg.getInstance( this.getParent()).getShell() !=null ){ + if ( drawingLayer.getSelectedDE() != null ) { + OutlookAttrDlg.getInstance( this.getParent() ).close(); + } + else { + OutlookAttrDlg.getInstance( this.getParent() ).setOtlkType( currentLayer.getName() ); + } + } else { PgenUtil.setSelectingMode(); } diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/rsc/PgenResource.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/rsc/PgenResource.java index e76a5e7e2a..6da60abfef 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/rsc/PgenResource.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/rsc/PgenResource.java @@ -74,8 +74,10 @@ import com.raytheon.uf.viz.core.rsc.AbstractVizResource; import com.raytheon.uf.viz.core.rsc.IResourceDataChanged; import com.raytheon.uf.viz.core.rsc.LoadProperties; import com.raytheon.uf.viz.core.rsc.ResourceList.RemoveListener; +import com.raytheon.uf.viz.core.rsc.capabilities.EditableCapability; import com.raytheon.viz.core.gl.IGLTarget; import com.raytheon.viz.ui.editor.AbstractEditor; +import com.raytheon.viz.ui.input.EditableManager; import com.raytheon.viz.ui.perspectives.AbstractVizPerspectiveManager; import com.raytheon.viz.ui.perspectives.VizPerspectiveListener; import com.raytheon.viz.ui.tools.AbstractModalTool; @@ -129,6 +131,9 @@ import com.vividsolutions.jts.geom.Point; * workaround pending RTS regression fix. * 04/12 #705 J. Wu TTR 542 - Draw elements in specific sequences. * 05/12 #610 J. Wu TTR 397 - Select GFA by text box. + * 07/12 #695 B. Yin TTR 261 - Add Pgen resource editable capability. + * 08/12 #655 B. Hebbard TTR 382 - Add paintProps as parameter to IDisplayable draw + * 09/12 B. Hebbard Merge out RTS changes from OB12.9.1 * * * @@ -182,6 +187,8 @@ public class PgenResource extends AbstractVizResource(); @@ -276,7 +283,8 @@ public class PgenResource extends AbstractVizResource points = new ArrayList(); /** - * An instance of DrawableElementFactory, which is used to - * create new elements. + * An instance of DrawableElementFactory, which is used to create new + * elements. */ private DrawableElementFactory def = new DrawableElementFactory(); @@ -77,10 +77,13 @@ public class PgenContoursTool extends AbstractPgenDrawingTool implements Command * Current Contours element. */ private boolean addContourLine = false; + private Contours elem = null; + private Contours lastElem = null; private int undo = -1; + private int redo = -1; public PgenContoursTool(){ @@ -98,19 +101,19 @@ public class PgenContoursTool extends AbstractPgenDrawingTool implements Command protected void activateTool( ) { super.activateTool(); + LibraryLoader.load("g2g"); /* - * if the ExecutionEvent's trigger has been set, it should be something from - * a Contours to start with. Load it's attributes to the Contours attr Dialog. - * If not. we will start with a new Contours. + * if the ExecutionEvent's trigger has been set, it should be something + * from a Contours to start with. Load it's attributes to the Contours + * attr Dialog. If not. we will start with a new Contours. */ Object de = event.getTrigger(); if ( de instanceof Contours ) { elem = (Contours)de; addContourLine = true; - } - else { + } else { elem = null; } @@ -124,6 +127,7 @@ public class PgenContoursTool extends AbstractPgenDrawingTool implements Command /** * Returns the current mouse handler. + * * @return */ public IInputHandler getMouseHandler() { @@ -150,18 +154,20 @@ public class PgenContoursTool extends AbstractPgenDrawingTool implements Command */ @Override public boolean handleMouseDown(int anX, int aY, int button) { + if (!isResourceEditable()) + return false; // Check if mouse is in geographic extent Coordinate loc = mapEditor.translateClick(anX, aY); - if ( loc == null ) return false; + if (loc == null) + return false; //Drawing Min/Max symbol if ( attrDlg != null && ((ContoursAttrDlg)attrDlg).drawSymbol() ) { if ( button == 1 ) { drawContourMinmax( loc ); - } - else if ( button == 3 ) { + } else if (button == 3) { setDrawingMode(); points.clear(); @@ -171,8 +177,7 @@ public class PgenContoursTool extends AbstractPgenDrawingTool implements Command drawingLayer.removeGhostLine(); return true; - } - else { + } else { return false; } } @@ -186,10 +191,10 @@ public class PgenContoursTool extends AbstractPgenDrawingTool implements Command points.add( 0, loc ); - } - else { + } else { - if ( points.size() > 1 ) points.remove( 1 ); + if (points.size() > 1) + points.remove(1); points.add( 1, loc ); drawContourCircle(); @@ -197,8 +202,7 @@ public class PgenContoursTool extends AbstractPgenDrawingTool implements Command return true; - } - else if ( button == 3 ) { + } else if (button == 3) { setDrawingMode(); points.clear(); @@ -208,36 +212,32 @@ public class PgenContoursTool extends AbstractPgenDrawingTool implements Command drawingLayer.removeGhostLine(); return true; - } - else { + } else { return false; } } - // Drawing line if ( button == 1 ) { - if ( attrDlg != null && !((ContoursAttrDlg)attrDlg).drawSymbol() && - !((ContoursAttrDlg)attrDlg).drawCircle() ) { + if (attrDlg != null + && !((ContoursAttrDlg) attrDlg).drawSymbol() + && !((ContoursAttrDlg) attrDlg).drawCircle()) { points.add( loc ); } return true; - } - else if ( button == 3 ) { + } else if (button == 3) { setDrawingMode(); drawContours(); return true; - } - else if ( button == 2 ) { + } else if (button == 2) { return true; - } - else { + } else { return false; } @@ -251,27 +251,33 @@ public class PgenContoursTool extends AbstractPgenDrawingTool implements Command */ @Override public boolean handleMouseMove(int x, int y) { + if (!isResourceEditable()) + return false; // Check if mouse is in geographic extent Coordinate loc = mapEditor.translateClick(x, y); - if ( loc == null ) return false; + if (loc == null) + return false; // Draw a ghost contour min/max if ( attrDlg != null && ((ContoursAttrDlg)attrDlg).drawSymbol() ) { ContoursAttrDlg dlg = (ContoursAttrDlg)attrDlg; ContourMinmax ghost = null; - ghost = new ContourMinmax( loc, dlg.getActiveSymbolClass(),dlg.getActiveSymbolObjType(), + ghost = new ContourMinmax(loc, dlg.getActiveSymbolClass(), + dlg.getActiveSymbolObjType(), new String[] {dlg.getLabel()} ); - IAttribute mmTemp = ((ContoursAttrDlg)attrDlg).getMinmaxTemplate(); + IAttribute mmTemp = ((ContoursAttrDlg) attrDlg) + .getMinmaxTemplate(); if ( mmTemp != null ) { Symbol oneSymb = (Symbol)(ghost.getSymbol()); oneSymb.update( mmTemp ); } - IAttribute lblTemp = ((ContoursAttrDlg)attrDlg).getLabelTemplate(); + IAttribute lblTemp = ((ContoursAttrDlg) attrDlg) + .getLabelTemplate(); if ( lblTemp != null ) { Text lbl = ghost.getLabel(); String[] oldText = lbl.getText(); @@ -296,16 +302,20 @@ public class PgenContoursTool extends AbstractPgenDrawingTool implements Command if ( points != null && points.size() >= 1 ) { ContourCircle ghost = new ContourCircle( points.get( 0 ), loc, - new String[]{ ((ContoursAttrDlg)attrDlg).getLabel() } , + new String[] { ((ContoursAttrDlg) attrDlg) + .getLabel() }, ((ContoursAttrDlg)attrDlg).hideCircleLabel() ); - IAttribute circleTemp = ((ContoursAttrDlg)attrDlg).getCircleTemplate(); + IAttribute circleTemp = ((ContoursAttrDlg) attrDlg) + .getCircleTemplate(); if ( circleTemp != null ) { ghost.getCircle().setColors( circleTemp.getColors() ); - ((Arc)ghost.getCircle()).setLineWidth( circleTemp.getLineWidth() ); + ((Arc) ghost.getCircle()).setLineWidth(circleTemp + .getLineWidth()); } - IAttribute lblTemp = ((ContoursAttrDlg)attrDlg).getLabelTemplate(); + IAttribute lblTemp = ((ContoursAttrDlg) attrDlg) + .getLabelTemplate(); if ( lblTemp != null ) { Text lbl = ghost.getLabel(); String[] oldText = lbl.getText(); @@ -317,7 +327,6 @@ public class PgenContoursTool extends AbstractPgenDrawingTool implements Command lbl.setAuto( auto ); } - drawingLayer.setGhostLine( ghost ); mapEditor.refresh(); } @@ -329,14 +338,18 @@ public class PgenContoursTool extends AbstractPgenDrawingTool implements Command // Draw a ghost ContourLine if ( points != null && points.size() >= 1) { - ArrayList ghostPts = new ArrayList(points); + ArrayList ghostPts = new ArrayList( + points); ghostPts.add(loc); - ContourLine cline = new ContourLine( ghostPts, ((ILine)attrDlg).isClosedLine(), + ContourLine cline = new ContourLine( + ghostPts, + ((ILine) attrDlg).isClosedLine(), new String[]{ ((ContoursAttrDlg)attrDlg).getLabel() }, ((ContoursAttrDlg)attrDlg).getNumOfLabels() ); - IAttribute lineTemp = ((ContoursAttrDlg)attrDlg).getLineTemplate(); + IAttribute lineTemp = ((ContoursAttrDlg) attrDlg) + .getLineTemplate(); if ( lineTemp != null ) { Line oneLine = cline.getLine(); @@ -350,7 +363,8 @@ public class PgenContoursTool extends AbstractPgenDrawingTool implements Command cline.getLine().setSmoothFactor(0); } - IAttribute lblTemp = ((ContoursAttrDlg)attrDlg).getLabelTemplate(); + IAttribute lblTemp = ((ContoursAttrDlg) attrDlg) + .getLabelTemplate(); if ( lblTemp != null ) { for ( Text lbl : cline.getLabels() ) { String[] oldText = lbl.getText(); @@ -363,11 +377,13 @@ public class PgenContoursTool extends AbstractPgenDrawingTool implements Command } } - Contours el = (Contours)(def.create( DrawableType.CONTOURS, null, - "MET", "Contours", points, drawingLayer.getActiveLayer() ) ); + Contours el = (Contours) (def.create(DrawableType.CONTOURS, + null, "MET", "Contours", points, + drawingLayer.getActiveLayer())); cline.setParent( el ); - cline.getLine().setPgenType ( ((ContoursAttrDlg)attrDlg).getContourLineType() ); + cline.getLine().setPgenType( + ((ContoursAttrDlg) attrDlg).getContourLineType()); el.update( (ContoursAttrDlg)attrDlg ); el.add( cline ); @@ -383,6 +399,9 @@ public class PgenContoursTool extends AbstractPgenDrawingTool implements Command @Override public boolean handleMouseDownMove(int x, int y, int mouseButton) { + if (!isResourceEditable()) + return false; + return true; } @@ -393,13 +412,17 @@ public class PgenContoursTool extends AbstractPgenDrawingTool implements Command if ( points.size() > 1 ) { - ContourLine cline = new ContourLine( points, ((ILine)attrDlg).isClosedLine(), + ContourLine cline = new ContourLine( + points, + ((ILine) attrDlg).isClosedLine(), new String[]{ ((ContoursAttrDlg)attrDlg).getLabel() }, ((ContoursAttrDlg)attrDlg).getNumOfLabels() ); - cline.getLine().setPgenType ( ((ContoursAttrDlg)attrDlg).getContourLineType() ); + cline.getLine().setPgenType( + ((ContoursAttrDlg) attrDlg).getContourLineType()); - IAttribute lineTemp = ((ContoursAttrDlg)attrDlg).getLineTemplate(); + IAttribute lineTemp = ((ContoursAttrDlg) attrDlg) + .getLineTemplate(); if ( lineTemp != null ) { Line oneLine = cline.getLine(); Boolean isClosed = oneLine.isClosedLine(); @@ -412,7 +435,8 @@ public class PgenContoursTool extends AbstractPgenDrawingTool implements Command cline.getLine().setSmoothFactor(0); } - IAttribute lblTemp = ((ContoursAttrDlg)attrDlg).getLabelTemplate(); + IAttribute lblTemp = ((ContoursAttrDlg) attrDlg) + .getLabelTemplate(); if ( lblTemp != null ) { for ( Text lbl : cline.getLabels() ) { String[] oldText = lbl.getText(); @@ -425,31 +449,32 @@ public class PgenContoursTool extends AbstractPgenDrawingTool implements Command } } - //Check if we need to add to existing contours or create a new one + // Check if we need to add to existing contours or create a new + // one elem = checkExistingContours(); - if ( elem == null ) { /* - * create a new element with attributes from the Attr dialog, and add - * it to the PGEN Resource + * create a new element with attributes from the Attr + * dialog, and add it to the PGEN Resource */ elem = (Contours)(def.create( DrawableType.CONTOURS, null, - "MET", "Contours", points, drawingLayer.getActiveLayer() ) ); + "MET", "Contours", points, + drawingLayer.getActiveLayer())); cline.setParent( elem ); elem.update( (ContoursAttrDlg)attrDlg ); elem.add( cline ); drawingLayer.addElement( elem ); - } - else { + } else { /* - * Make a copy of the existing element; update its attributes from - * those in the Attr Dialog; replace the existing element with - * the new one in the pgen resource - (This allows Undo/Redo) + * Make a copy of the existing element; update its + * attributes from those in the Attr Dialog; replace the + * existing element with the new one in the pgen resource - + * (This allows Undo/Redo) */ Contours newElem = (Contours)elem.copy(); @@ -485,18 +510,21 @@ public class PgenContoursTool extends AbstractPgenDrawingTool implements Command if ( loc != null ) { String cls = ((ContoursAttrDlg)attrDlg).getActiveSymbolClass(); - String type = ((ContoursAttrDlg)attrDlg).getActiveSymbolObjType(); + String type = ((ContoursAttrDlg) attrDlg) + .getActiveSymbolObjType(); ContourMinmax cmm = new ContourMinmax( loc, cls, type, new String[]{ ((ContoursAttrDlg)attrDlg).getLabel() } ); - IAttribute mmTemp = ((ContoursAttrDlg)attrDlg).getMinmaxTemplate(); + IAttribute mmTemp = ((ContoursAttrDlg) attrDlg) + .getMinmaxTemplate(); if ( mmTemp != null ) { Symbol oneSymb = (Symbol)(cmm.getSymbol()); oneSymb.update( mmTemp ); } - IAttribute lblTemp = ((ContoursAttrDlg)attrDlg).getLabelTemplate(); + IAttribute lblTemp = ((ContoursAttrDlg) attrDlg) + .getLabelTemplate(); if ( lblTemp != null ) { Text lbl = cmm.getLabel(); String[] oldText = lbl.getText(); @@ -508,16 +536,18 @@ public class PgenContoursTool extends AbstractPgenDrawingTool implements Command lbl.setAuto( auto ); } - //Check if we need to add to existing contours or create a new one + // Check if we need to add to existing contours or create a new + // one elem = checkExistingContours(); if ( elem == null ) { /* - * create a new element with attributes from the Attr dialog, and add - * it to the PGEN Resource + * create a new element with attributes from the Attr + * dialog, and add it to the PGEN Resource */ elem = (Contours)(def.create( DrawableType.CONTOURS, null, - "MET", "Contours", points, drawingLayer.getActiveLayer() ) ); + "MET", "Contours", points, + drawingLayer.getActiveLayer())); cmm.setParent( elem ); elem.update( (ContoursAttrDlg)attrDlg ); @@ -525,13 +555,13 @@ public class PgenContoursTool extends AbstractPgenDrawingTool implements Command drawingLayer.addElement( elem ); - } - else { + } else { /* - * Make a copy of the existing element; update its attributes from - * those in the Attr Dialog; replace the existing element with - * the new one in the pgen resource - (This allows Undo/Redo) + * Make a copy of the existing element; update its + * attributes from those in the Attr Dialog; replace the + * existing element with the new one in the pgen resource - + * (This allows Undo/Redo) */ Contours newElem = (Contours)elem.copy(); @@ -579,15 +609,13 @@ public class PgenContoursTool extends AbstractPgenDrawingTool implements Command addContourLine = false; PgenUtil.setSelectingMode(); - } - else { + } else { // start a new Contours element - new points will be drawn // as new ContourLine in a new Contours element. if ( !addContourLine ) { elem = null; - } - else { //back to selecting + } else { // back to selecting PgenUtil.setSelectingMode(); } } @@ -603,17 +631,22 @@ public class PgenContoursTool extends AbstractPgenDrawingTool implements Command if ( points != null && points.size() > 1 ) { - ContourCircle cmm = new ContourCircle( points.get( 0 ), points.get( 1 ), + ContourCircle cmm = new ContourCircle( + points.get(0), + points.get(1), new String[]{ ((ContoursAttrDlg)attrDlg).getLabel() } , ((ContoursAttrDlg)attrDlg).hideCircleLabel() ); - IAttribute circleTemp = (((ContoursAttrDlg)attrDlg).getCircleTemplate()); + IAttribute circleTemp = (((ContoursAttrDlg) attrDlg) + .getCircleTemplate()); if ( circleTemp != null ) { cmm.getCircle().setColors( circleTemp.getColors() ); - ((Arc)cmm.getCircle()).setLineWidth( circleTemp.getLineWidth() ); + ((Arc) cmm.getCircle()).setLineWidth(circleTemp + .getLineWidth()); } - IAttribute lblTemp = ((ContoursAttrDlg)attrDlg).getLabelTemplate(); + IAttribute lblTemp = ((ContoursAttrDlg) attrDlg) + .getLabelTemplate(); if ( lblTemp != null ) { Text lbl = cmm.getLabel(); String[] oldText = lbl.getText(); @@ -625,16 +658,18 @@ public class PgenContoursTool extends AbstractPgenDrawingTool implements Command lbl.setAuto( auto ); } - //Check if we need to add to existing contours or create a new one + // Check if we need to add to existing contours or create a new + // one elem = checkExistingContours(); if ( elem == null ) { /* - * create a new element with attributes from the Attr dialog, and add - * it to the PGEN Resource + * create a new element with attributes from the Attr + * dialog, and add it to the PGEN Resource */ elem = (Contours)(def.create( DrawableType.CONTOURS, null, - "MET", "Contours", points, drawingLayer.getActiveLayer() ) ); + "MET", "Contours", points, + drawingLayer.getActiveLayer())); cmm.setParent( elem ); elem.update( (ContoursAttrDlg)attrDlg ); @@ -642,13 +677,13 @@ public class PgenContoursTool extends AbstractPgenDrawingTool implements Command drawingLayer.addElement( elem ); - } - else { + } else { /* - * Make a copy of the existing element; update its attributes from - * those in the Attr Dialog; replace the existing element with - * the new one in the pgen resource - (This allows Undo/Redo) + * Make a copy of the existing element; update its + * attributes from those in the Attr Dialog; replace the + * existing element with the new one in the pgen resource - + * (This allows Undo/Redo) */ Contours newElem = (Contours)elem.copy(); @@ -677,30 +712,34 @@ public class PgenContoursTool extends AbstractPgenDrawingTool implements Command } - /* - * Loop through current layer and see if there is an same type of Contours. + * Loop through current layer and see if there is an same type of + * Contours. * - * If yes, show a warning message and ask for confirmation either add to the - * existing contours or draw a new Cnntours. + * If yes, show a warning message and ask for confirmation either add to + * the existing contours or draw a new Cnntours. */ private Contours checkExistingContours() { Contours existingContours = elem; - //Loop through current layer and see if there is an same type of Contours. - //If yes, show a warning message and ask for confirmation either add to the + // Loop through current layer and see if there is an same type of + // Contours. + // If yes, show a warning message and ask for confirmation either + // add to the //existing contours or draw a new Contours. if ( existingContours == null ) { - Iterator it = drawingLayer.getActiveLayer().getComponentIterator(); + Iterator it = drawingLayer + .getActiveLayer().getComponentIterator(); while( it.hasNext() ) { AbstractDrawableComponent adc = it.next(); if ( adc instanceof Contours && !(adc instanceof Outlook) ) { Contours thisContour = (Contours)adc; ContoursAttrDlg thisDlg = (ContoursAttrDlg)attrDlg; - if ( thisContour.getParm().equals( thisDlg.getParm() ) && - thisContour.getLevel().equals( thisDlg.getLevel() ) ) { + if (thisContour.getParm().equals(thisDlg.getParm()) + && thisContour.getLevel().equals( + thisDlg.getLevel())) { existingContours = (Contours)adc; break; } @@ -708,14 +747,16 @@ public class PgenContoursTool extends AbstractPgenDrawingTool implements Command } if ( existingContours != null ) { - MessageDialog msgDlg = new MessageDialog( - PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), - "Warning!", null, "There is another [" + existingContours.getParm() + - "," + existingContours.getLevel() + - "] Contours element in this layer.\n" + - "Do you want to add to it or create a new one?", + MessageDialog msgDlg = new MessageDialog(PlatformUI + .getWorkbench().getActiveWorkbenchWindow() + .getShell(), "Warning!", null, "There is another [" + + existingContours.getParm() + "," + + existingContours.getLevel() + + "] Contours element in this layer.\n" + + "Do you want to add to it or create a new one?", MessageDialog.INFORMATION, - new String[]{ "Add to Existing One", "Create a New One" }, 0 ); + new String[] { "Add to Existing One", + "Create a New One" }, 0); msgDlg.open(); //start a new Contours. diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenCopyElement.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenCopyElement.java index 1c9e1c48b2..ecf9ab1e45 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenCopyElement.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenCopyElement.java @@ -13,7 +13,11 @@ import java.util.Iterator; import org.eclipse.swt.SWT; import org.eclipse.swt.widgets.Event; +import org.geotools.coverage.grid.GridEnvelope2D; +import org.opengis.coverage.grid.GridEnvelope; +import com.raytheon.uf.viz.core.IExtent; +import com.raytheon.uf.viz.core.PixelExtent; import com.raytheon.uf.viz.core.rsc.IInputHandler; import com.vividsolutions.jts.geom.Coordinate; @@ -52,6 +56,7 @@ import gov.noaa.nws.ncep.ui.pgen.sigmet.SigmetInfo; * 04/12 750 Q. Zhou Modified handleMouseDownMove for loc null. * 05/11 #808 J. Wu Update Gfa vor text * 05/12 #610 J. Wu Add warning when GFA FROM lines > 3 + * 08/12 #760 B. Yin Check for world wrap * * * @@ -113,6 +118,7 @@ public class PgenCopyElement extends AbstractPgenTool { */ @Override public boolean handleMouseDown(int anX, int aY, int button) { + if ( !isResourceEditable() ) return false; preempt = false; @@ -174,7 +180,7 @@ public class PgenCopyElement extends AbstractPgenTool { @Override public boolean handleMouseDownMove(int anX, int aY, int button) { - if ( shiftDown ) return false; + if ( shiftDown || !isResourceEditable()) return false; // Check if mouse is in geographic extent Coordinate loc = mapEditor.translateClick(anX, aY); @@ -232,8 +238,26 @@ public class PgenCopyElement extends AbstractPgenTool { scnPt[0] += deltaX; scnPt[1] += deltaY; + GridEnvelope ge = mapEditor.getActiveDisplayPane().getDescriptor().getGridGeometry().getGridRange(); + + double[] world = mapEditor.getActiveDisplayPane().screenToGrid(scnPt[0], scnPt[1], 0); + + if ( world[0] > ((GridEnvelope2D)ge).getWidth() ) { + // System.out.println("idx=" + idx + " Out of Screen " + world[0] +" / " + ((GridEnvelope2D)ge).getWidth() ); + world[0] -= ((GridEnvelope2D)ge).getWidth(); + scnPt = mapEditor.getActiveDisplayPane().gridToScreen( world ); + } + else if ( world[0] < 0 ){ + // System.out.println("idx=" + idx + " Out of Screen " + world[0] +" / " + ((GridEnvelope2D)ge).getWidth() ); + world[0] += ((GridEnvelope2D)ge).getWidth(); + scnPt = mapEditor.getActiveDisplayPane().gridToScreen( world ); + } + + Coordinate cord = mapEditor.translateClick(scnPt[0], scnPt[1]); + if(cord==null) continue; + ghostEl.getPoints().get(idx).x = cord.x; ghostEl.getPoints().get(idx).y = cord.y; @@ -297,7 +321,7 @@ public class PgenCopyElement extends AbstractPgenTool { @Override public boolean handleMouseUp(int x, int y, int button) { - if ( shiftDown || simulate ) return false; + if ( !isResourceEditable()|| shiftDown || simulate ) return false; if ( ghostEl != null ) { diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenCycleTool.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenCycleTool.java index 77b7ca662c..f24941b4f0 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenCycleTool.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenCycleTool.java @@ -107,6 +107,7 @@ public class PgenCycleTool extends AbstractPgenDrawingTool { */ @Override public boolean handleMouseDown(int anX, int aY, int button) { + if ( !isResourceEditable() ) return false; // Check if mouse is in geographic extent Coordinate loc = mapEditor.translateClick(anX, aY); @@ -130,7 +131,7 @@ public class PgenCycleTool extends AbstractPgenDrawingTool { @Override public boolean handleMouseDownMove(int x, int y, int mouseButton) { - if ( shiftDown ) return false; + if ( !isResourceEditable() || shiftDown ) return false; else return true; } diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenDeleteAll.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenDeleteAll.java index 3327fd06d4..fb5c710a87 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenDeleteAll.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenDeleteAll.java @@ -50,6 +50,7 @@ public class PgenDeleteAll extends AbstractPgenTool { protected void activateTool( ) { super.activateTool(); + if ( !isResourceEditable() ) return; /* * Confirm "delete All" request diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenDeleteElement.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenDeleteElement.java index b5e34ff757..4b7421771a 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenDeleteElement.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenDeleteElement.java @@ -8,16 +8,15 @@ package gov.noaa.nws.ncep.ui.pgen.tools; -import com.raytheon.uf.viz.core.rsc.IInputHandler; -import com.vividsolutions.jts.geom.Coordinate; - -//import gov.noaa.nws.ncep.ui.display.InputHandlerDefaultImpl; import gov.noaa.nws.ncep.ui.pgen.PgenUtil; import gov.noaa.nws.ncep.ui.pgen.elements.AbstractDrawableComponent; import gov.noaa.nws.ncep.ui.pgen.elements.DECollection; import gov.noaa.nws.ncep.ui.pgen.elements.Outlook; import gov.noaa.nws.ncep.ui.pgen.filter.AcceptFilter; +import com.raytheon.uf.viz.core.rsc.IInputHandler; +import com.vividsolutions.jts.geom.Coordinate; + /** * Implements a modal map tool for the PGEN selecting element function. * @@ -31,6 +30,7 @@ import gov.noaa.nws.ncep.ui.pgen.filter.AcceptFilter; * 06/09 106 B. Yin Use AbstractDrawableComponent * 03/10 n/a M.Laryukhin bug fix, null pointer exception when * trying to delete a non-existing elememnt + * 07/12 748 B. Yin Delete Outlook line its label together * * * @@ -84,6 +84,7 @@ public class PgenDeleteElement extends AbstractPgenTool { */ @Override public boolean handleMouseDown(int anX, int aY, int button) { + if ( !isResourceEditable() ) return false; preempt = false; @@ -110,7 +111,8 @@ public class PgenDeleteElement extends AbstractPgenTool { elSelected =drawingLayer.getNearestElement(loc); } else if ( elSelected instanceof Outlook && ((Outlook)elSelected).getDEs() > 1){ - elSelected =drawingLayer.getNearestElement(loc); + AbstractDrawableComponent adc = drawingLayer.getNearestElement(loc); + elSelected = adc.getParent(); } if (elSelected != null) { @@ -153,7 +155,8 @@ public class PgenDeleteElement extends AbstractPgenTool { @Override public boolean handleMouseDownMove(int x, int y, int mouseButton) { - return preempt; + if ( !isResourceEditable() || shiftDown ) return false; + else return true; } diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenDeletePart.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenDeletePart.java index 2890973faf..9722fd41a7 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenDeletePart.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenDeletePart.java @@ -8,6 +8,19 @@ package gov.noaa.nws.ncep.ui.pgen.tools; +import gov.noaa.nws.ncep.ui.pgen.annotation.Operation; +import gov.noaa.nws.ncep.ui.pgen.contours.ContourLine; +import gov.noaa.nws.ncep.ui.pgen.contours.Contours; +import gov.noaa.nws.ncep.ui.pgen.display.CurveFitter; +import gov.noaa.nws.ncep.ui.pgen.display.ILine; +import gov.noaa.nws.ncep.ui.pgen.display.IMultiPoint; +import gov.noaa.nws.ncep.ui.pgen.elements.DrawableElement; +import gov.noaa.nws.ncep.ui.pgen.elements.Line; +import gov.noaa.nws.ncep.ui.pgen.elements.MultiPointElement; +import gov.noaa.nws.ncep.ui.pgen.elements.Symbol; +import gov.noaa.nws.ncep.ui.pgen.elements.WatchBox; +import gov.noaa.nws.ncep.ui.pgen.filter.OperationFilter; + import java.awt.Color; import com.raytheon.uf.viz.core.rsc.IInputHandler; @@ -17,21 +30,6 @@ import com.vividsolutions.jts.geom.LineString; import com.vividsolutions.jts.linearref.LinearLocation; import com.vividsolutions.jts.linearref.LocationIndexedLine; -import gov.noaa.nws.ncep.ui.pgen.annotation.Operation; -import gov.noaa.nws.ncep.ui.pgen.contours.ContourLine; -import gov.noaa.nws.ncep.ui.pgen.contours.Contours; -import gov.noaa.nws.ncep.ui.pgen.display.CurveFitter; -import gov.noaa.nws.ncep.ui.pgen.display.ILine; -import gov.noaa.nws.ncep.ui.pgen.display.IMultiPoint; - -import gov.noaa.nws.ncep.ui.pgen.elements.Line; -import gov.noaa.nws.ncep.ui.pgen.elements.MultiPointElement; -import gov.noaa.nws.ncep.ui.pgen.elements.DrawableElement; -import gov.noaa.nws.ncep.ui.pgen.elements.Symbol; -import gov.noaa.nws.ncep.ui.pgen.elements.WatchBox; -import gov.noaa.nws.ncep.ui.pgen.elements.Jet.JetLine; -import gov.noaa.nws.ncep.ui.pgen.filter.OperationFilter; - /** * Implements a modal map tool for PGEN deleting part function. * @@ -44,6 +42,7 @@ import gov.noaa.nws.ncep.ui.pgen.filter.OperationFilter; * 11/10 #332 B. Yin Added cleanup() for handler * 11/17 #343 S. Gilbert Delete where selected. not just vertices * 04/11 #? B. Yin Re-factor IAttribute + * 06/12 TTR102 B. Yin Make it work for Jet * * * @@ -123,6 +122,7 @@ public class PgenDeletePart extends PgenSelectingTool { */ @Override public boolean handleMouseDown(int anX, int aY, int button) { + if ( !isResourceEditable() ) return false; // Check if mouse is in geographic extent Coordinate loc = mapEditor.translateClick(anX, aY); @@ -136,7 +136,6 @@ public class PgenDeletePart extends PgenSelectingTool { // Get the nearest element and set it as the selected element. DrawableElement elSelected = drawingLayer.getNearestElement( loc, delPartFilter ); if ( elSelected instanceof ILine && - !(elSelected instanceof JetLine) && !(elSelected instanceof WatchBox)) { drawingLayer.setSelected( elSelected ); @@ -255,7 +254,7 @@ public class PgenDeletePart extends PgenSelectingTool { */ @Override public boolean handleMouseUp(int x, int y, int button){ - return true; + return false; } /** diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenDeletePoint.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenDeletePoint.java index 4b96fce420..18aab20f61 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenDeletePoint.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenDeletePoint.java @@ -103,6 +103,7 @@ public class PgenDeletePoint extends PgenSelectingTool { */ @Override public boolean handleMouseDown(int anX, int aY, int button) { + if ( !isResourceEditable() ) return false; // Check if mouse is in geographic extent Coordinate loc = mapEditor.translateClick(anX, aY); @@ -197,7 +198,7 @@ public class PgenDeletePoint extends PgenSelectingTool { */ @Override public boolean handleMouseDownMove(int anX, int aY, int button){ - if ( shiftDown ) return false; + if ( !isResourceEditable() || shiftDown ) return false; else return true; } diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenDualPointDrawingTool.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenDualPointDrawingTool.java index 7c8f0dabce..480d42e237 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenDualPointDrawingTool.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenDualPointDrawingTool.java @@ -95,6 +95,7 @@ public class PgenDualPointDrawingTool extends AbstractPgenDrawingTool { */ @Override public boolean handleMouseDown(int anX, int aY, int button) { + if ( !isResourceEditable() ) return false; // Check if mouse is in geographic extent Coordinate loc = mapEditor.translateClick(anX, aY); @@ -173,6 +174,7 @@ public class PgenDualPointDrawingTool extends AbstractPgenDrawingTool { */ @Override public boolean handleMouseMove(int x, int y) { + if ( !isResourceEditable() ) return false; // Check if mouse is in geographic extent Coordinate loc = mapEditor.translateClick(x, y); @@ -210,7 +212,7 @@ public class PgenDualPointDrawingTool extends AbstractPgenDrawingTool { @Override public boolean handleMouseDownMove(int x, int y, int mouseButton) { - if ( shiftDown ) return false; + if ( !isResourceEditable() || shiftDown ) return false; else return true; } diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenExtrapTool.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenExtrapTool.java index f64ad6c73f..d3f6d2d1d9 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenExtrapTool.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenExtrapTool.java @@ -87,6 +87,7 @@ public class PgenExtrapTool extends AbstractPgenDrawingTool { */ @Override public boolean handleMouseDown( int anX, int aY, int button ) { + if ( !isResourceEditable() ) return false; preempt = false; @@ -162,7 +163,7 @@ public class PgenExtrapTool extends AbstractPgenDrawingTool { @Override public boolean handleMouseDownMove(int x, int y, int mouseButton) { - if ( shiftDown ) return false; + if ( !isResourceEditable() || shiftDown ) return false; else return preempt; } diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenFileManageHandler.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenFileManageHandler.java index 2b47368a38..947abc47fd 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenFileManageHandler.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenFileManageHandler.java @@ -9,6 +9,7 @@ package gov.noaa.nws.ncep.ui.pgen.tools; import gov.noaa.nws.ncep.ui.pgen.PgenSession; import gov.noaa.nws.ncep.ui.pgen.controls.PgenFileManageDialog; +import gov.noaa.nws.ncep.ui.pgen.controls.PgenFileManageDialog1; import org.eclipse.core.commands.ExecutionEvent; import org.eclipse.core.commands.ExecutionException; @@ -65,11 +66,12 @@ public class PgenFileManageHandler extends AbstractTool { } } else { // "Save As" - PgenFileManageDialog file_dlg = null; +// PgenFileManageDialog file_dlg = null; + PgenFileManageDialog1 file_dlg = null; if ( file_dlg == null ) { try { - file_dlg = new PgenFileManageDialog( shell, btnClicked ); + file_dlg = new PgenFileManageDialog1( shell, btnClicked ); file_dlg.setBlockOnOpen(true); } catch (VizException e) { diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenFlipDrawingElement.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenFlipDrawingElement.java index 6d63df759e..9cb89e60ad 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenFlipDrawingElement.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenFlipDrawingElement.java @@ -91,6 +91,7 @@ public class PgenFlipDrawingElement extends AbstractPgenTool { */ @Override public boolean handleMouseDown(int anX, int aY, int button) { + if ( !isResourceEditable() ) return false; preempt = false; // Check if mouse is in geographic extent @@ -119,7 +120,7 @@ public class PgenFlipDrawingElement extends AbstractPgenTool { @Override public boolean handleMouseDownMove(int x, int y, int mouseButton) { - if ( shiftDown ) return false; + if ( !isResourceEditable() || shiftDown ) return false; return preempt; } diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenFromTool.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenFromTool.java index 1d03e36ba1..01562f507d 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenFromTool.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenFromTool.java @@ -75,6 +75,7 @@ public class PgenFromTool extends AbstractPgenDrawingTool { */ @Override public boolean handleMouseDown( int anX, int aY, int button ) { + if ( !isResourceEditable() ) return false; preempt = false; // Check if mouse is in geographic extent @@ -127,6 +128,7 @@ public class PgenFromTool extends AbstractPgenDrawingTool { @Override public boolean handleMouseDownMove(int x, int y, int mouseButton) { + if ( !isResourceEditable() ) return false; return preempt; } } diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenGfaDrawingTool.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenGfaDrawingTool.java index 0bdc9b742b..ea38c545bd 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenGfaDrawingTool.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenGfaDrawingTool.java @@ -24,6 +24,7 @@ import gov.noaa.nws.ncep.ui.pgen.gfa.IGfa; import gov.noaa.nws.ncep.viz.common.SnapUtil; import java.util.ArrayList; + import org.eclipse.ui.PlatformUI; import com.raytheon.uf.viz.core.rsc.IInputHandler; @@ -41,7 +42,12 @@ import com.vividsolutions.jts.geom.Coordinate; * 12/11 #? B. Yin Sets vorText * 02/12 #597 S. Gurung Moved snap functionalities to SnapUtil from SigmetInfo. * 05/12 #808 J. Wu Tune GFA performance for vor text - * + * 07/12 #663 Q. Zhou Modified handleMouseDown left btn to add moveText situation. + * Added code to right btn to 1)exit moving text mode. 2)exit selecting mode. + * Modified handleGfaMouseDown to activate moveText btn, and move startGfaText out. + * Modified activateTool to handle non-delete situation. + * Modified handleMouseMove to add moveText situation. + * Create and modified handleGfaTextMouseMove and handleGfaMouseMove * * * @author M.Laryukhin @@ -78,14 +84,18 @@ public class PgenGfaDrawingTool extends AbstractPgenDrawingTool { PgenGfaDrawingHandler handler = (PgenGfaDrawingHandler)getMouseHandler(); if(gfa != null) { handler.points.addAll(gfa.getPoints()); + if ( handler.elem == null ) { //for moving gfa text from selecting mode + handler.elem = gfa; + } GfaAttrDlg dlg = (GfaAttrDlg)attrDlg; dlg.setGfaArea(gfa.getGfaArea()); dlg.setGfaBeginning(gfa.getGfaBeginning()); dlg.setGfaEnding(gfa.getGfaEnding()); dlg.setGfaStates(gfa.getGfaStates()); + drawingLayer.setSelected(gfa); + editor.refresh(); } - drawingLayer.removeElement(gfa); - drawingLayer.setGhostLine(gfa); + } else { startGfaText = false; } @@ -157,19 +167,62 @@ public class PgenGfaDrawingTool extends AbstractPgenDrawingTool { DrawableType drawableType = getDrawableType(pgenType); if ( button == 1 ) { - if (startGfaText && drawableType == DrawableType.GFA){ - return handleGfaMouseDown(loc, drawableType); + if ( startGfaText && ((GfaAttrDlg)attrDlg).isMoveTextEnable() ) { //if moveText button is clicked + + Gfa newGfa = (Gfa)elem.copy(); + drawingLayer.replaceElement(elem, newGfa); + elem = newGfa; + + handleGfaMouseDown(loc, drawableType); + drawingLayer.setSelected((Gfa)elem); + } + + else if (startGfaText && drawableType == DrawableType.GFA){ //after a GFA polygon is created + startGfaText = false; + drawingLayer.addElement(elem); + handleGfaMouseDown(loc, drawableType); + ((GfaAttrDlg)attrDlg).enableMoveTextBtn(true); + } + else { + if ( points.size() == 0 ) { + //When drawing GFA polygon, disable the moveText button in GFA dialog + ((GfaAttrDlg)attrDlg).enableMoveTextBtn(false); } points.add( loc ); + } attrDlg.setAttrForDlg(attrDlg); // update the parameters in GfaAttrDlg return true; } else if ( button == 3 ) { + //exit drawing text mode + if ( startGfaText ) { + startGfaText = false; + + if ( ((Gfa)elem).getGfaTextCoordinate() == null ){ + //if right click before adding the text + ((Gfa)elem).setGfaTextCoordinate(loc); + drawingLayer.addElement(elem); + mapEditor.refresh(); + points.clear(); + } + else { + //change to selecting mode to move points + PgenUtil.setSelectingMode(elem); + elem = null; + return true; + } + } + if ( points.size() == 0 ) { + closeAttrDlg(attrDlg); attrDlg = null; + drawingLayer.removeSelected((Gfa)elem); + elem = null; PgenUtil.setSelectingMode(); + + } else if ( points.size() < 2 ){ removeClearRefresh(); @@ -200,7 +253,6 @@ public class PgenGfaDrawingTool extends AbstractPgenDrawingTool { //set from line String vorText = Gfa.buildVorText( (Gfa)elem ); ((Gfa)elem).setGfaVorText( vorText ); - ((GfaAttrDlg)attrDlg).setVorText( vorText ); startGfaText = true; @@ -222,20 +274,13 @@ public class PgenGfaDrawingTool extends AbstractPgenDrawingTool { } private boolean handleGfaMouseDown(Coordinate loc, DrawableType drawableType) { - if ( elem == null ) { - elem = def.create( drawableType, (IAttribute)attrDlg, - pgenCategory, pgenType, points, drawingLayer.getActiveLayer()); - } ((Gfa)elem).setGfaTextCoordinate(loc); - drawingLayer.addElement(elem); - removeClearRefresh(); ((GfaAttrDlg)attrDlg).populateTagCbo(); - - startGfaText = false; + ((GfaAttrDlg)attrDlg).setDrawableElement((Gfa)elem); return true; } @@ -266,15 +311,21 @@ public class PgenGfaDrawingTool extends AbstractPgenDrawingTool { */ @Override public boolean handleMouseMove(int x, int y) { + if ( !isResourceEditable() ) return false; + // Check if mouse is in geographic extent Coordinate loc = mapEditor.translateClick(x, y); if ( loc == null ) return false; AbstractDrawableComponent ghost = null; - if(startGfaText){ + if(startGfaText && ((GfaAttrDlg)attrDlg).isMoveTextEnable() ){ return handleGfaTextMouseMove(loc); - } else { + } + else if( startGfaText){ + return handleGfaMouseMove(loc); + } + else { ghost = def.create(DrawableType.GFA, (IAttribute)attrDlg, pgenCategory, pgenType, points, drawingLayer.getActiveLayer()); } @@ -297,11 +348,34 @@ public class PgenGfaDrawingTool extends AbstractPgenDrawingTool { @Override public boolean handleMouseDownMove(int x, int y, int mouseButton) { - if ( shiftDown ) return false; + if ( !isResourceEditable() || shiftDown ) return false; else return true; } private boolean handleGfaTextMouseMove(Coordinate loc) { + + AbstractDrawableComponent ghost = null; +// if (drawingLayer.getActiveLayer().getDrawables().contains(elem)) { +// drawingLayer.removeElement(elem); +// } + + if (elem != null && ((Gfa)elem).getGfaTextCoordinate() != null) { + ghost = (Gfa)elem.copy(); + } + else { + ghost = (Gfa)def.create(DrawableType.GFA, (IAttribute)attrDlg, + pgenCategory, pgenType, points, drawingLayer.getActiveLayer()); + } + + ((Gfa)ghost).setGfaTextCoordinate(loc); + + drawingLayer.setGhostLine(ghost); + mapEditor.refresh(); + return false; + } + + private boolean handleGfaMouseMove(Coordinate loc) { + Gfa gfa = (Gfa)def.create(DrawableType.GFA, (IAttribute)attrDlg, pgenCategory, pgenType, points, drawingLayer.getActiveLayer()); gfa.setGfaTextCoordinate(loc); diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenGfaFormatTool.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenGfaFormatTool.java index d4abdf1353..30551e0719 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenGfaFormatTool.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenGfaFormatTool.java @@ -99,6 +99,7 @@ public class PgenGfaFormatTool extends AbstractPgenDrawingTool { */ @Override public boolean handleMouseDown(int anX, int aY, int button) { + if ( !isResourceEditable() ) return false; if ( button == 1) { @@ -118,7 +119,7 @@ public class PgenGfaFormatTool extends AbstractPgenDrawingTool { @Override public boolean handleMouseDownMove(int x, int y, int mouseButton) { - return true; + return false; } } diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenIncDecTool.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenIncDecTool.java index 798384dfb9..42e759246d 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenIncDecTool.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenIncDecTool.java @@ -114,6 +114,7 @@ public class PgenIncDecTool extends AbstractPgenDrawingTool { */ @Override public boolean handleMouseDown(int anX, int aY, int button) { + if ( !isResourceEditable() ) return false; theFirstMouseX = anX; theFirstMouseY = aY; @@ -191,7 +192,7 @@ public class PgenIncDecTool extends AbstractPgenDrawingTool { */ public boolean handleMouseDownMove(int anX, int aY, int button) { - if (button != 1 ) { + if ( !isResourceEditable() || button != 1 ) { return false; } @@ -228,6 +229,7 @@ public class PgenIncDecTool extends AbstractPgenDrawingTool { */ @Override public boolean handleMouseUp(int anX, int aY, int button) { + if ( !isResourceEditable() ) return false; if ( button == 1 ){ @@ -340,6 +342,7 @@ public class PgenIncDecTool extends AbstractPgenDrawingTool { @Override public boolean handleMouseMove(int anX, int aY) { + if ( !isResourceEditable() ) return false; // draw a ghost ploygon if ( polyPoints != null && !polyPoints.isEmpty() ){ @@ -375,6 +378,8 @@ public class PgenIncDecTool extends AbstractPgenDrawingTool { @Override public boolean handleKeyDown(int keyCode) { + if ( !isResourceEditable() ) return false; + if ( keyCode == SWT.SHIFT) { shiftDown = true; } @@ -387,6 +392,8 @@ public class PgenIncDecTool extends AbstractPgenDrawingTool { @Override public boolean handleKeyUp(int keyCode) { + if ( !isResourceEditable() ) return false; + if ( keyCode == SWT.SHIFT) { shiftDown = false; } diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenInterpolationTool.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenInterpolationTool.java index 662461e981..03990c6532 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenInterpolationTool.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenInterpolationTool.java @@ -108,6 +108,7 @@ public class PgenInterpolationTool extends AbstractPgenDrawingTool { */ @Override public boolean handleMouseDown( int anX, int aY, int button ) { + if ( !isResourceEditable() ) return false; // Check if mouse is in geographic extent Coordinate loc = mapEditor.translateClick(anX, aY); diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenJetBarbAddingHandler.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenJetBarbAddingHandler.java index 7d232a443d..8f86ef922e 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenJetBarbAddingHandler.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenJetBarbAddingHandler.java @@ -78,7 +78,7 @@ public class PgenJetBarbAddingHandler extends InputHandlerDefaultImpl { */ @Override public boolean handleMouseDown(int anX, int aY, int button) { - + if (!drawingLayer.isEditable()) return false; // Check if mouse is in geographic extent Coordinate loc = mapEditor.translateClick(anX, aY); if ( loc == null || shiftDown ) return false; @@ -135,6 +135,7 @@ public class PgenJetBarbAddingHandler extends InputHandlerDefaultImpl { */ @Override public boolean handleMouseMove(int x, int y) { + if (!drawingLayer.isEditable()) return false; // Check if mouse is in geographic extent Coordinate loc = mapEditor.translateClick(x, y); @@ -152,7 +153,7 @@ public class PgenJetBarbAddingHandler extends InputHandlerDefaultImpl { @Override public boolean handleMouseDownMove(int x, int y, int mouseButton) { - if ( shiftDown ) return false; + if ( !drawingLayer.isEditable() || shiftDown ) return false; else return true; } diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenJetBarbDeletingHandler.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenJetBarbDeletingHandler.java index 5d342e682d..5875ec5ca4 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenJetBarbDeletingHandler.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenJetBarbDeletingHandler.java @@ -78,6 +78,7 @@ public class PgenJetBarbDeletingHandler extends InputHandlerDefaultImpl { */ @Override public boolean handleMouseDown(int anX, int aY, int button) { + if (!drawingLayer.isEditable()) return false; // Check if mouse is in geographic extent Coordinate loc = mapEditor.translateClick(anX, aY); @@ -152,7 +153,7 @@ public class PgenJetBarbDeletingHandler extends InputHandlerDefaultImpl { @Override public boolean handleMouseDownMove(int x, int y, int mouseButton) { - if ( shiftDown ) return false; + if ( !drawingLayer.isEditable() || shiftDown ) return false; else return true; } diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenJetDrawingTool.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenJetDrawingTool.java index 4cc13fa062..ed611cf8b1 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenJetDrawingTool.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenJetDrawingTool.java @@ -167,6 +167,7 @@ public class PgenJetDrawingTool extends PgenMultiPointDrawingTool */ @Override public boolean handleMouseDown(int anX, int aY, int button) { + if ( !isResourceEditable() ) return false; // Check if mouse is in geographic extent Coordinate loc = mapEditor.translateClick(anX, aY); @@ -248,6 +249,8 @@ public class PgenJetDrawingTool extends PgenMultiPointDrawingTool */ @Override public boolean handleMouseMove(int x, int y) { + if ( !isResourceEditable() ) return false; + // Check if mouse is in geographic extent Coordinate loc = mapEditor.translateClick(x, y); if ( loc == null ) return false; @@ -276,7 +279,7 @@ public class PgenJetDrawingTool extends PgenMultiPointDrawingTool } @Override public boolean handleMouseDownMove(int aX, int aY, int button) { - if ( shiftDown ) return false; + if ( !isResourceEditable() || shiftDown ) return false; else return true; } } diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenJetHashAddingHandler.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenJetHashAddingHandler.java index 26c2866df5..66652e2552 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenJetHashAddingHandler.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenJetHashAddingHandler.java @@ -67,6 +67,7 @@ public class PgenJetHashAddingHandler extends InputHandlerDefaultImpl { */ @Override public boolean handleMouseDown(int anX, int aY, int button) { + if ( !drawingLayer.isEditable() ) return false; // Check if mouse is in geographic extent Coordinate loc = mapEditor.translateClick(anX, aY); @@ -118,6 +119,8 @@ public class PgenJetHashAddingHandler extends InputHandlerDefaultImpl { @Override public boolean handleMouseMove(int x, int y) { + if ( !drawingLayer.isEditable() ) return false; + // Check if mouse is in geographic extent Coordinate loc = mapEditor.translateClick(x, y); if ( loc == null ) return false; @@ -134,7 +137,7 @@ public class PgenJetHashAddingHandler extends InputHandlerDefaultImpl { @Override public boolean handleMouseDownMove(int x, int y, int mouseButton) { - if ( shiftDown ) return false; + if ( !drawingLayer.isEditable() || shiftDown ) return false; else return true; } diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenJetHashDeletingHandler.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenJetHashDeletingHandler.java index a4e5003c03..cc21e8200d 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenJetHashDeletingHandler.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenJetHashDeletingHandler.java @@ -74,7 +74,7 @@ public class PgenJetHashDeletingHandler extends InputHandlerDefaultImpl { */ @Override public boolean handleMouseDown(int anX, int aY, int button) { - + if ( !drawingLayer.isEditable() ) return false; // Check if mouse is in geographic extent Coordinate loc = mapEditor.translateClick(anX, aY); if ( loc == null || shiftDown ) return false; @@ -143,7 +143,7 @@ public class PgenJetHashDeletingHandler extends InputHandlerDefaultImpl { @Override public boolean handleMouseDownMove(int x, int y, int mouseButton) { - if ( shiftDown ) return false; + if ( !drawingLayer.isEditable() || shiftDown ) return false; else return true; } diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenLabeledLineDelHandler.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenLabeledLineDelHandler.java index e9590edc7f..406905ba53 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenLabeledLineDelHandler.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenLabeledLineDelHandler.java @@ -90,7 +90,7 @@ public class PgenLabeledLineDelHandler extends InputHandlerDefaultImpl { */ @Override public boolean handleMouseDown(int anX, int aY, int button) { - + if (!drawingLayer.isEditable()) return false; // Check if mouse is in geographic extent Coordinate loc = mapEditor.translateClick(anX, aY); if ( loc == null || shiftDown ) return false; @@ -164,7 +164,7 @@ public class PgenLabeledLineDelHandler extends InputHandlerDefaultImpl { @Override public boolean handleMouseDownMove(int x, int y, int mouseButton) { - if ( shiftDown ) return false; + if ( !drawingLayer.isEditable() || shiftDown ) return false; else return true; } diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenLabeledLineDrawingTool.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenLabeledLineDrawingTool.java index d452e41f57..bc5e78fe1c 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenLabeledLineDrawingTool.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenLabeledLineDrawingTool.java @@ -21,6 +21,7 @@ import gov.noaa.nws.ncep.ui.pgen.elements.Line; import gov.noaa.nws.ncep.ui.pgen.elements.labeledlines.LabeledLine; import java.util.ArrayList; +import java.util.Iterator; import com.raytheon.uf.viz.core.rsc.IInputHandler; import com.vividsolutions.jts.geom.Coordinate; @@ -35,6 +36,7 @@ import com.vividsolutions.jts.geom.Coordinate; * 09/10 304 B. Yin Initial Creation. * 09/10 305/306 B. Yin Added Cloud and Turbulence * 12/11 ? B. Yin Added open/close line functions + * 08/12 ? B. Yin One Cloud/Turb per layer * * * @@ -149,6 +151,7 @@ public class PgenLabeledLineDrawingTool extends AbstractPgenDrawingTool implemen */ @Override public boolean handleMouseDown(int anX, int aY, int button) { + if ( !isResourceEditable() ) return false; // Check if mouse is in geographic extent Coordinate loc = mapEditor.translateClick(anX, aY); @@ -156,7 +159,10 @@ public class PgenLabeledLineDrawingTool extends AbstractPgenDrawingTool implemen if ( button == 1 ) { + if ( "CCFP_SIGMET".equalsIgnoreCase(pgenType) + || attrDlg.isAddLineMode() ){ points.add( loc ); + } return true; @@ -190,7 +196,13 @@ public class PgenLabeledLineDrawingTool extends AbstractPgenDrawingTool implemen else { // add the labeled line to PGEN resource - if ( attrDlg.isAddLineMode() && labeledLine != null ) { + if ( attrDlg.isAddLineMode()) { + if( labeledLine == null ) { + labeledLine = getLabeledLineInCurrentLayer( pgenType ); + } + + if( labeledLine != null ) { + //add line to labeled line collection LabeledLine newll = labeledLine.copy(); elem = def.createLabeledLine( pgenCategory, pgenType, (IAttribute)attrDlg, @@ -202,14 +214,26 @@ public class PgenLabeledLineDrawingTool extends AbstractPgenDrawingTool implemen //new labeled line elem = def.createLabeledLine( pgenCategory, pgenType, (IAttribute)attrDlg, points, null, drawingLayer.getActiveLayer()); + drawingLayer.addElement( elem ); labeledLine = (LabeledLine)elem; } + } + + if("CCFP_SIGMET".equals(pgenType) ) { + elem = def.createLabeledLine( pgenCategory, pgenType, (IAttribute)attrDlg, + points, null, drawingLayer.getActiveLayer()); + + drawingLayer.addElement( elem ); + labeledLine = (LabeledLine)elem; + + + if ( ccdlg.isAreaType()){//avoid 2 Sigmet elements issue - if("CCFP_SIGMET".equals(pgenType) && ccdlg.isAreaType()){//avoid 2 Sigmet elements issue ccfpTxtFlag = true; setAddingLabelHandler( );//return true;//avoid right click cause no showing issue } + } drawingLayer.removeGhostLine(); if( ! ccfpTxtFlag ) points.clear(); @@ -243,6 +267,8 @@ public class PgenLabeledLineDrawingTool extends AbstractPgenDrawingTool implemen */ @Override public boolean handleMouseMove(int x, int y) { + if ( !isResourceEditable() ) return false; + // Check if mouse is in geographic extent Coordinate loc = mapEditor.translateClick(x, y); if ( loc == null ) return false; @@ -283,7 +309,7 @@ public class PgenLabeledLineDrawingTool extends AbstractPgenDrawingTool implemen @Override public boolean handleMouseDownMove(int x, int y, int mouseButton) { - if ( shiftDown ) return false; + if ( !isResourceEditable() || shiftDown ) return false; else return true; } @@ -291,6 +317,22 @@ public class PgenLabeledLineDrawingTool extends AbstractPgenDrawingTool implemen points.clear(); } + /** + * Returns the Labeled Line in the current layer with input type(Turb/Cloud). + * @param type + * @return + */ + private LabeledLine getLabeledLineInCurrentLayer( String type){ + Iterator it = drawingLayer.getActiveLayer().getComponentIterator(); + while ( it.hasNext() ){ + AbstractDrawableComponent adc = it.next(); + if ( adc instanceof LabeledLine && adc.getPgenType().equalsIgnoreCase(type)){ + return (LabeledLine) adc; + } + } + return null; + } + } public void setLabeledLine(LabeledLine labeledLine) { diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenLabeledLineModifyTool.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenLabeledLineModifyTool.java index 940f5d17af..c035a94995 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenLabeledLineModifyTool.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenLabeledLineModifyTool.java @@ -144,6 +144,7 @@ public class PgenLabeledLineModifyTool extends PgenSelectingTool implements ILab */ @Override public boolean handleMouseDown(int anX, int aY, int button) { + if ( !isResourceEditable() ) return false; // Check if mouse is in geographic extent Coordinate loc = mapEditor.translateClick(anX, aY); @@ -225,6 +226,8 @@ public class PgenLabeledLineModifyTool extends PgenSelectingTool implements ILab */ @Override public boolean handleMouseMove(int x, int y) { + if ( !isResourceEditable() ) return false; + // Check if mouse is in geographic extent Coordinate loc = mapEditor.translateClick(x, y); if ( loc == null || simulate ) return false; @@ -264,7 +267,7 @@ public class PgenLabeledLineModifyTool extends PgenSelectingTool implements ILab */ @Override public boolean handleMouseDownMove(int x, int y, int button) { - if ( shiftDown || simulate ) return false; + if ( !isResourceEditable() || shiftDown || simulate ) return false; if ( button == 1 ){ // Check if mouse is in geographic extent @@ -370,7 +373,7 @@ public class PgenLabeledLineModifyTool extends PgenSelectingTool implements ILab @Override public boolean handleMouseUp(int x, int y, int button) { - if ( shiftDown || simulate ) return false; + if ( !isResourceEditable() || shiftDown || simulate ) return false; // Finish the editing if (button == 1 && drawingLayer != null ){ diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenModifyTool.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenModifyTool.java index f6a6d071fe..ae3976d460 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenModifyTool.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenModifyTool.java @@ -118,6 +118,7 @@ public class PgenModifyTool extends AbstractPgenTool { */ @Override public boolean handleMouseDown( int anX, int aY, int button ) { + if ( !isResourceEditable() ) return false; preempt = false; // Check if mouse is in geographic extent @@ -266,6 +267,7 @@ public class PgenModifyTool extends AbstractPgenTool { */ @Override public boolean handleMouseMove(int x, int y) { + if ( !isResourceEditable() ) return false; // Check if mouse is in geographic extent Coordinate loc = mapEditor.translateClick(x, y); @@ -300,13 +302,13 @@ public class PgenModifyTool extends AbstractPgenTool { @Override public boolean handleMouseUp( int x, int y, int button) { - return true; + return false; } @Override public boolean handleMouseDownMove(int x, int y, int mouseButton) { - if ( shiftDown ) return false; + if ( !isResourceEditable() || shiftDown ) return false; else return preempt; } diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenMoveElement.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenMoveElement.java index d593a5df49..a5b5874ac1 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenMoveElement.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenMoveElement.java @@ -74,7 +74,7 @@ public class PgenMoveElement extends PgenCopyElement { @Override public boolean handleMouseUp(int x, int y, int button) { - if ( shiftDown || simulate ) return false; + if ( !isResourceEditable() || shiftDown || simulate ) return false; if ( ghostEl != null ) { diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenMultiPointDrawingTool.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenMultiPointDrawingTool.java index a786ddaf57..f6cc177c8f 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenMultiPointDrawingTool.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenMultiPointDrawingTool.java @@ -157,6 +157,7 @@ public class PgenMultiPointDrawingTool extends AbstractPgenDrawingTool { */ @Override public boolean handleMouseDown(int anX, int aY, int button) { + if ( !isResourceEditable() ) return false; // Check if mouse is in geographic extent Coordinate loc = mapEditor.translateClick(anX, aY); @@ -250,10 +251,6 @@ public class PgenMultiPointDrawingTool extends AbstractPgenDrawingTool { if(isTrackElement(drawableType)) { - System.out.println( "interval attdlg= "+ ((TrackAttrDlg)attrDlg).getIntervalTimeString() ); - System.out.println( "interval track= " + ((Track)elem).getIntervalComboSelectedIndex() ); - System.out.println( "interval track= " + ((Track)elem).getIntervalTimeString() ); - displayTrackExtrapPointInfoDlg((TrackAttrDlg)attrDlg, (Track)elem); } @@ -284,7 +281,7 @@ public class PgenMultiPointDrawingTool extends AbstractPgenDrawingTool { @Override public boolean handleMouseDownMove(int aX, int aY, int button) { - if ( shiftDown ) return false; + if ( !isResourceEditable() || shiftDown ) return false; else return true; } @@ -373,6 +370,8 @@ public class PgenMultiPointDrawingTool extends AbstractPgenDrawingTool { */ @Override public boolean handleMouseMove(int x, int y) { + if ( !isResourceEditable() ) return false; + // Check if mouse is in geographic extent Coordinate loc = mapEditor.translateClick(x, y); if ( loc == null ) return false; diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenMultiSelectTool.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenMultiSelectTool.java index 2f04559866..441d73d4ff 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenMultiSelectTool.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenMultiSelectTool.java @@ -47,6 +47,7 @@ import com.vividsolutions.jts.geom.Coordinate; * 08/09 #149 B. Yin Initial Creation. * 04/10 #165 G. Zhang add support for VAA. * 10/10 #289 Archana Added logic to handle the delete key + * 07/12 #610 B. Yin Make the multi-select work for GFA. * * * @author B. Yin @@ -88,6 +89,7 @@ public class PgenMultiSelectTool extends AbstractPgenDrawingTool { //Current Pgen Category private String pgenCat; + private String pgenObj; private List polyPoints; /* @@ -98,6 +100,7 @@ public class PgenMultiSelectTool extends AbstractPgenDrawingTool { */ @Override public boolean handleMouseDown(int anX, int aY, int button) { + if ( !isResourceEditable() ) return false; theFirstMouseX = anX; theFirstMouseY = aY; @@ -105,6 +108,7 @@ public class PgenMultiSelectTool extends AbstractPgenDrawingTool { if ( button == 1 ) { pgenCat = PgenSession.getInstance().getPgenPalette().getCurrentCategory(); + pgenObj = PgenSession.getInstance().getPgenPalette().getCurrentObject(); //if no pgen category, pop up a warning box. if ( pgenCat == null ){ @@ -162,7 +166,7 @@ public class PgenMultiSelectTool extends AbstractPgenDrawingTool { */ public boolean handleMouseDownMove(int anX, int aY, int button) { - if (button != 1 || noCat) { + if ( !isResourceEditable() || button != 1 || noCat) { return false; } @@ -200,7 +204,7 @@ public class PgenMultiSelectTool extends AbstractPgenDrawingTool { @Override public boolean handleMouseUp(int anX, int aY, int button) { - if ( noCat) { + if ( !isResourceEditable() || noCat) { return false; } @@ -260,6 +264,28 @@ public class PgenMultiSelectTool extends AbstractPgenDrawingTool { } } } + else if (pgenObj != null && pgenObj.equalsIgnoreCase("GFA")){ + // Get the nearest element and set it as the selected element. + AbstractDrawableComponent adc = drawingLayer.getNearestComponent( loc, new AcceptFilter(), true ); + + if ( adc != null && adc.getPgenType().equalsIgnoreCase("GFA")){ + + if ( pgenType == null || pgenType.equalsIgnoreCase("MultiSelect") ){ + pgenType = adc.getPgenType(); + } + + + // if ( adc.getPgenType().equalsIgnoreCase("GFA")){ + + if(!drawingLayer.getAllSelected().contains(adc)){ + drawingLayer.addSelected(adc); + } + else { + drawingLayer.removeSelected(adc); + } + // } + } + } } } @@ -293,6 +319,10 @@ public class PgenMultiSelectTool extends AbstractPgenDrawingTool { if ( attrDlg == null && drawingLayer.getAllSelected() != null && !drawingLayer.getAllSelected().isEmpty()) { + if ( pgenCat.equalsIgnoreCase("MET")){ + pgenType = pgenObj; + } + attrDlg = AttrDlgFactory.createAttrDlg( pgenCat, pgenType, PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell() ); @@ -378,7 +408,7 @@ public class PgenMultiSelectTool extends AbstractPgenDrawingTool { @Override public boolean handleMouseMove(int anX, int aY) { - if (noCat) { + if ( !isResourceEditable() || noCat) { return false; } @@ -416,6 +446,8 @@ public class PgenMultiSelectTool extends AbstractPgenDrawingTool { @Override public boolean handleKeyDown(int keyCode) { + if ( !isResourceEditable() ) return false; + if ( keyCode == SWT.SHIFT) { shiftDown = true; } diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenOutlookDrawingTool.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenOutlookDrawingTool.java index fbedfe8a91..d83767e185 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenOutlookDrawingTool.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenOutlookDrawingTool.java @@ -153,6 +153,7 @@ public class PgenOutlookDrawingTool extends AbstractPgenDrawingTool { */ @Override public boolean handleMouseDown(int anX, int aY, int button) { + if ( !isResourceEditable() ) return false; DECollection dec = null; @@ -263,11 +264,12 @@ public class PgenOutlookDrawingTool extends AbstractPgenDrawingTool { */ @Override public boolean handleMouseMove(int x, int y) { + if ( !isResourceEditable() ) return false; + // Check if mouse is in geographic extent Coordinate loc = mapEditor.translateClick(x, y); if ( loc == null ) return false; - // create the ghost line and put it in the drawing layer AbstractDrawableComponent ghost = null; if (((OutlookAttrDlg)attrDlg).getOutlookType().equalsIgnoreCase("TROPICAL") @@ -298,7 +300,7 @@ public class PgenOutlookDrawingTool extends AbstractPgenDrawingTool { @Override public boolean handleMouseDownMove(int x, int y, int mouseButton) { - if ( shiftDown ) return false; + if ( !isResourceEditable() || shiftDown ) return false; else return true; } diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenOutlookSetCont.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenOutlookSetCont.java index d799d19d27..c05df93ade 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenOutlookSetCont.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenOutlookSetCont.java @@ -110,7 +110,7 @@ public class PgenOutlookSetCont extends AbstractPgenDrawingTool{ @Override public boolean handleMouseDown(int anX, int aY, int button) { - if ( otlk == null ) return false; + if ( !isResourceEditable() || otlk == null ) return false; // Check if mouse is in geographic extent Coordinate loc = mapEditor.translateClick(anX, aY); @@ -179,6 +179,7 @@ public class PgenOutlookSetCont extends AbstractPgenDrawingTool{ @Override public boolean handleMouseDownMove(int x, int y, int mouseButton) { + if ( !isResourceEditable() ) return false; return true; } } diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenRotateElement.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenRotateElement.java index b72034772c..0eddc3a16d 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenRotateElement.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenRotateElement.java @@ -98,6 +98,7 @@ public class PgenRotateElement extends AbstractPgenDrawingTool { */ @Override public boolean handleMouseDown(int x, int y, int button) { + if ( !isResourceEditable() ) return false; // Check if mouse is in geographic extent Coordinate loc = mapEditor.translateClick(x, y); @@ -154,6 +155,8 @@ public class PgenRotateElement extends AbstractPgenDrawingTool { */ @Override public boolean handleMouseDownMove(int x, int y, int button) { + if ( !isResourceEditable() ) return false; + // Check if mouse is in geographic extent Coordinate loc = mapEditor.translateClick(x, y); if (loc == null || shiftDown ) return false; @@ -234,6 +237,7 @@ public class PgenRotateElement extends AbstractPgenDrawingTool { */ @Override public boolean handleMouseUp(int x, int y, int button) { + if ( !isResourceEditable() ) return false; // Finish the editing if (button == 1 && drawingLayer != null) { diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenSelectingTool.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenSelectingTool.java index 6e10d6e2e9..39cbdb6d25 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenSelectingTool.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenSelectingTool.java @@ -112,7 +112,9 @@ import gov.noaa.nws.ncep.viz.common.SnapUtil; * 05/12 TTR 310 B. Yin added a method to change line type. * 05/12 #808 J. Wu Update Gfa vor text * 05/12 #610 J. Wu Add warning when GFA FROM lines > 3 - * + * 06/12 #777 Q. Zhou Added isNewTrack flag on Track to get first time differently + * 07/12 #663 Q. Zhou Modified handleMouseDown for preselected DE. + * 08/12 #803 Q. Zhou Fixed Front text of 2 lines. Modified handleMouseDownMove. * * * @author B. Yin @@ -169,6 +171,15 @@ public class PgenSelectingTool extends AbstractPgenDrawingTool if ( de instanceof Contours ) { selectInContours = true; selectedContours = (Contours)de; + } + else if ( de instanceof Gfa ) { //Added for gfa move text. + attrDlg = AttrDlgFactory.createAttrDlg( ((Gfa)de).getPgenCategory(), ((Gfa)de).getPgenType(), + PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell() ); + attrDlg.setBlockOnOpen(false); + if (attrDlg.getShell() == null) attrDlg.open(); + ((GfaAttrDlg)attrDlg).enableMoveTextBtn(true); + drawingLayer.setSelected((Gfa)de); + editor.refresh(); } else { selectInContours = false; @@ -392,6 +403,7 @@ public class PgenSelectingTool extends AbstractPgenDrawingTool @Override public boolean handleMouseDown(int anX, int aY, int button) { + if ( !isResourceEditable() ) return false; // Check if mouse is in geographic extent Coordinate loc = mapEditor.translateClick(anX, aY); if ( loc == null || shiftDown || simulate ) return false; @@ -408,7 +420,7 @@ public class PgenSelectingTool extends AbstractPgenDrawingTool preempt = true; if ( drawingLayer.getSelectedDE() instanceof SinglePointElement - && drawingLayer.getDistance(drawingLayer.getSelectedDE(), loc) > 30 ) { + && drawingLayer.getDistance(drawingLayer.getSelectedDE(), loc) > drawingLayer.getMaxDistToSelect() ) { ptSelected = false; //prevent SPE from moving when selecting it and then click far away and hold to move. } @@ -572,6 +584,7 @@ public class PgenSelectingTool extends AbstractPgenDrawingTool } } else if(elSelected instanceof Track) { TrackAttrDlg trackAttrDlg = (TrackAttrDlg)attrDlg; + trackAttrDlg.isNewTrack = false; trackAttrDlg.initializeTrackAttrDlg((Track)elSelected); displayTrackExtrapPointInfoDlg(trackAttrDlg, (Track)elSelected); } @@ -616,6 +629,7 @@ public class PgenSelectingTool extends AbstractPgenDrawingTool } else if(attrDlg instanceof GfaAttrDlg){ ((GfaAttrDlg)attrDlg).redrawHazardSpecificPanel(); attrDlg.setAttrForDlg( elSelected ); + ((GfaAttrDlg)attrDlg).enableMoveTextBtn(true); } } @@ -630,6 +644,10 @@ public class PgenSelectingTool extends AbstractPgenDrawingTool // Close the attribute dialog and do the cleanup. if ( attrDlg != null ) { closeAttrDlg(attrDlg, pgenType); + if ( attrDlg instanceof GfaAttrDlg ){ + //re-set event trigger + PgenUtil.setSelectingMode(); + } } attrDlg = null; @@ -668,6 +686,7 @@ public class PgenSelectingTool extends AbstractPgenDrawingTool */ @Override public boolean handleMouseDownMove(int x, int y, int button) { + if ( !isResourceEditable() ) return false; if ( shiftDown ) return false; if ( dontMove && drawingLayer.getSelectedDE() != null) return true; @@ -684,7 +703,7 @@ public class PgenSelectingTool extends AbstractPgenDrawingTool if (loc != null && inOut == 1) { //make sure the click is close enough to the element - if ( drawingLayer.getDistance(tmpEl, loc) > 30 && !ptSelected ) + if ( drawingLayer.getDistance(tmpEl, loc) > drawingLayer.getMaxDistToSelect() && !ptSelected ) return false; } else if (loc != null && inOut == 0) { @@ -745,13 +764,18 @@ public class PgenSelectingTool extends AbstractPgenDrawingTool tmpEl.getParent() instanceof DECollection && tmpEl.getParent().getPgenCategory() != null && tmpEl.getParent().getPgenCategory().equalsIgnoreCase("Front")){ - if ( ((IText)attrDlg).getString().length > 0 ) { - //add "[" or "]" to front labels - StringBuffer lbl = new StringBuffer(((IText)attrDlg).getString()[0]); + + String[] text = ((IText)attrDlg).getString(); + + //add "[" or "]" to front labels. The rule: If the label is only number and in one line, will be surrounded by [,]. + if ( text.length == 1 ) { + StringBuffer lbl = new StringBuffer(((TextAttrDlg)attrDlg).getString()[0]); + if ( lbl.length() > 0 ){ if ( lbl.charAt(0) == '[') lbl.deleteCharAt(0); if ( lbl.charAt(lbl.length()-1) == ']') lbl.deleteCharAt(lbl.length()-1); - + try { + Integer.parseInt(lbl.toString()); //check if the text is right or left of the front if ( PgenTextDrawingTool.rightOfLine(mapEditor, loc, (Line)tmpEl.getParent().getPrimaryDE()) >= 0 ){ ((TextAttrDlg)attrDlg).setText(new String[]{lbl+"]"}); @@ -759,12 +783,15 @@ public class PgenSelectingTool extends AbstractPgenDrawingTool else { ((TextAttrDlg)attrDlg).setText(new String[]{"[" + lbl}); } + } catch (NumberFormatException e) { + /*do nothing*/} } + } + ((Text)tmpEl).setText(((TextAttrDlg)attrDlg).getString()); ((SinglePointElement)tmpEl).setLocationOnly(loc); } - } else { ((SinglePointElement)tmpEl).setLocationOnly(loc); } @@ -820,7 +847,7 @@ public class PgenSelectingTool extends AbstractPgenDrawingTool Point ptScreen = new GeometryFactory().createPoint(new Coordinate(pt[0], pt[1])); double dist = ptScreen.distance(new GeometryFactory().createPoint(new Coordinate(locScreen[0], locScreen[1]))); dist = 0; - if ( dist <= 30 ){ + if ( dist <= drawingLayer.getMaxDistToSelect() ){ ghostEl.setPoints( points ); setGhostLineColorForTrack(ghostEl, ptIndex); @@ -855,6 +882,7 @@ public class PgenSelectingTool extends AbstractPgenDrawingTool */ @Override public boolean handleMouseUp(int x, int y, int button) { + if ( !isResourceEditable() ) return false; // Finish the editing if (button == 1 && drawingLayer != null ){ @@ -1040,6 +1068,8 @@ public class PgenSelectingTool extends AbstractPgenDrawingTool @Override public boolean handleKeyDown(int keyCode) { + if ( !isResourceEditable() ) return false; + if(keyCode == SWT.DEL){ PgenResource pResource = PgenSession.getInstance().getPgenResource(); pResource.deleteSelectedElements(); diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenSinglePointDrawingTool.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenSinglePointDrawingTool.java index de4a0ecf00..c70b557f0b 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenSinglePointDrawingTool.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenSinglePointDrawingTool.java @@ -133,6 +133,7 @@ public class PgenSinglePointDrawingTool extends AbstractPgenDrawingTool { */ @Override public boolean handleMouseDown(int anX, int aY, int button) { + if ( !isResourceEditable() ) return false; // Check if mouse is in geographic extent Coordinate loc = mapEditor.translateClick(anX, aY); @@ -240,6 +241,7 @@ public class PgenSinglePointDrawingTool extends AbstractPgenDrawingTool { */ @Override public boolean handleMouseMove(int x, int y) { + if ( !isResourceEditable() ) return false; // Check if mouse is in geographic extent Coordinate loc = mapEditor.translateClick(x, y); @@ -267,7 +269,7 @@ public class PgenSinglePointDrawingTool extends AbstractPgenDrawingTool { @Override public boolean handleMouseDownMove(int aX, int aY, int button) { - if ( shiftDown ) return false; + if ( !isResourceEditable() || shiftDown ) return false; else return true; } diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenSnapJet.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenSnapJet.java index 5ee65cc7fb..f2c51fd111 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenSnapJet.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenSnapJet.java @@ -14,6 +14,10 @@ import java.util.Iterator; import com.raytheon.uf.viz.core.map.IMapDescriptor; import com.raytheon.viz.ui.editor.AbstractEditor; import com.vividsolutions.jts.geom.Coordinate; +import com.vividsolutions.jts.geom.GeometryFactory; +import com.vividsolutions.jts.geom.LineString; +import com.vividsolutions.jts.linearref.LinearLocation; +import com.vividsolutions.jts.linearref.LocationIndexedLine; import gov.noaa.nws.ncep.ui.pgen.attrdialog.JetAttrDlg; import gov.noaa.nws.ncep.ui.pgen.display.CurveFitter; @@ -48,6 +52,7 @@ import gov.noaa.nws.ncep.ui.pgen.elements.Jet.JetText; * 04/11 ? B. Yin fixed zoom/unzoom problem in R1G2-9 * 04/11 ? B. Yin Re-factor IAttribute * 10/11 ? B. Yin Fixed the flight level text location issue. + * 06/12 TTR102 B. Yin Added addBarbHashFromAnotherJet() for 'DelPart' * * * @@ -760,4 +765,49 @@ public class PgenSnapJet implements IJetTools{ return ret; } + /** + * Add hashes and barbs that belong to jet2, but lie on jet1, into jet1. + * This method is used to delete a part of one jet. + * @param jet1 + * @param jet2 + */ + @Override + public void addBarbHashFromAnotherJet(Jet jet1, Jet jet2 ){ + if (jet2.size() <=1 ) return; + + double[][] newpts = this.getJetCurve( jet1 ); + Coordinate[] coords = new Coordinate[ newpts.length ]; + + for (int k=0; k it = jet2.createDEIterator(); + + while ( it.hasNext() ){ + DrawableElement adc = it.next(); + + if ( adc instanceof Jet.JetBarb || + adc instanceof Jet.JetHash ){ + + double[] loc = {((SinglePointElement)adc).getLocation().x, ((SinglePointElement)adc).getLocation().y }; + double[] pix = descriptor.worldToPixel( loc ); + Coordinate screenPt = new Coordinate(pix[0], pix[1]); + LinearLocation linloc = lil.project(screenPt); + Coordinate screen2 = lil.extractPoint(linloc); + + if ( screenPt.distance(screen2) < 100 ){ + if ( adc instanceof Jet.JetBarb ){ + //add its parent windInfo which include the flight level text + jet1.add(adc.getParent().copy()); + } + else { + jet1.add(adc.copy()); + } + } + } + } + } } diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenSpenesDrawingTool.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenSpenesDrawingTool.java new file mode 100644 index 0000000000..1129918e9a --- /dev/null +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenSpenesDrawingTool.java @@ -0,0 +1,211 @@ +package gov.noaa.nws.ncep.ui.pgen.tools; + +import gov.noaa.nws.ncep.ui.pgen.PgenStaticDataProvider; +import gov.noaa.nws.ncep.ui.pgen.PgenUtil; +import gov.noaa.nws.ncep.ui.pgen.display.IAttribute; +import gov.noaa.nws.ncep.ui.pgen.elements.AbstractDrawableComponent; +import gov.noaa.nws.ncep.ui.pgen.elements.DrawableElement; +import gov.noaa.nws.ncep.ui.pgen.elements.DrawableElementFactory; +import gov.noaa.nws.ncep.ui.pgen.elements.DrawableType; +import gov.noaa.nws.ncep.ui.pgen.elements.Line; + +import java.util.ArrayList; + +import com.raytheon.uf.viz.core.rsc.IInputHandler; +import com.vividsolutions.jts.geom.Coordinate; + +public class PgenSpenesDrawingTool extends AbstractPgenDrawingTool { + + + public PgenSpenesDrawingTool(){ + + super(); + + } + + /* + * Invoked by the CommandService when starting this tool + * + * @see com.raytheon.viz.ui.tools.AbstractTool#runTool() + */ + @Override + protected void activateTool( ) { + + super.activateTool(); + new Thread(){ + public void run(){ + PgenStaticDataProvider.getProvider().loadCwaTable(); + PgenStaticDataProvider.getProvider().loadStateTable(); + PgenStaticDataProvider.getProvider().loadRfcTable(); + } + }.start(); + + } + /* + * (non-Javadoc) + * + * @see com.raytheon.viz.ui.tools.AbstractModalTool#deactivateTool() + */ + @Override + public void deactivateTool() { + + super.deactivateTool(); + + if ( mouseHandler instanceof PgenSpenesDrawingHandler ){ + PgenSpenesDrawingHandler mph = (PgenSpenesDrawingHandler) mouseHandler; + if (mph != null) mph.clearPoints(); + } + } + + /** + * Returns the current mouse handler. + * @return + */ + public IInputHandler getMouseHandler() { + + if ( this.mouseHandler == null ) { + + this.mouseHandler = new PgenSpenesDrawingHandler(); + + } + + return this.mouseHandler; + } + + private class PgenSpenesDrawingHandler extends InputHandlerDefaultImpl { + + /** + * Points of the new element. + */ + private ArrayList points = new ArrayList(); + + /** + * Current element. + */ + private AbstractDrawableComponent elem; + + /** + * An instance of DrawableElementFactory, which is used to + * create new elements. + */ + private DrawableElementFactory def = new DrawableElementFactory(); + + /* + * (non-Javadoc) + * + * @see com.raytheon.viz.ui.input.IInputHandler#handleMouseDown(int, + * int, int) + */ + @Override + public boolean handleMouseDown(int anX, int aY, int button) { + + // Check if mouse is in geographic extent + Coordinate loc = mapEditor.translateClick(anX, aY); + if ( loc == null || shiftDown ) return false; + + if ( button == 1 ) { + + points.add( loc ); + + return true; + + } + else if ( button == 3 ) { + + if ( points.size() == 0 ) { + + if (attrDlg != null) attrDlg.close(); + attrDlg = null; + PgenUtil.setSelectingMode(); + + } + else if ( points.size() < 2 ){ + + drawingLayer.removeGhostLine(); + points.clear(); + + mapEditor.refresh(); + + } + else { + + // create a line + elem = def.create( DrawableType.SPENES, (IAttribute)attrDlg, + pgenCategory, pgenType, points, drawingLayer.getActiveLayer()); + + attrDlg.setDrawableElement((DrawableElement)elem); + // AttrSettings.getInstance().setSettings((DrawableElement)elem); + + // add the product to PGEN resource + drawingLayer.addElement( elem ); + + //System.out.println(USState.statesInGeometry(((Spenes)elem).toJTSPolygon())); + drawingLayer.removeGhostLine(); + points.clear(); + + mapEditor.refresh(); + + } + + return true; + + } + else if ( button == 2 ){ + + return true; + + } + else{ + + return false; + + } + + } + /* + * (non-Javadoc) + * + * @see com.raytheon.viz.ui.input.IInputHandler#handleMouseMove(int, + * int) + */ + @Override + public boolean handleMouseMove(int x, int y) { + // Check if mouse is in geographic extent + Coordinate loc = mapEditor.translateClick(x, y); + if ( loc == null ) return false; + + // create the ghost element and put it in the drawing layer + AbstractDrawableComponent ghostline = def.create(DrawableType.SPENES, (IAttribute)attrDlg, + pgenCategory, pgenType, points, drawingLayer.getActiveLayer()); + + if ( points != null && points.size() >= 1) { + + ArrayList ghostPts = new ArrayList(points); + ghostPts.add(loc); + Line ln = (Line)ghostline; + ln.setLinePoints( new ArrayList( ghostPts ) ); + + /* + * Ghost distance and direction to starting point, if requested + */ + drawingLayer.setGhostLine(ghostline); + mapEditor.refresh(); + + } + + return false; + + } + + @Override + public boolean handleMouseDownMove(int aX, int aY, int button) { + if ( shiftDown ) return false; + return true; + } + + private void clearPoints(){ + points.clear(); + } + } + +} diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenTcaTool.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenTcaTool.java index 8d94cedce7..f6eea928ce 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenTcaTool.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenTcaTool.java @@ -184,6 +184,7 @@ public class PgenTcaTool extends AbstractPgenDrawingTool { */ @Override public boolean handleMouseDown(int anX, int aY, int button) { + if ( !isResourceEditable() ) return false; String coast; boolean isIsland; @@ -422,6 +423,7 @@ public class PgenTcaTool extends AbstractPgenDrawingTool { */ @Override public boolean handleMouseMove(int x, int y) { + if ( !isResourceEditable() ) return false; String coast; boolean isIsland; diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenTcmDrawingTool.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenTcmDrawingTool.java index 52922f3e44..4cd5de4f28 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenTcmDrawingTool.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenTcmDrawingTool.java @@ -113,18 +113,13 @@ public class PgenTcmDrawingTool extends AbstractPgenDrawingTool { */ @Override public boolean handleMouseDown(int anX, int aY, int button) { + if ( !isResourceEditable() ) return false; // Check if mouse is in geographic extent //Coordinate loc = mapEditor.translateClick(anX, aY); if ( button == 1 ) { - // create an element. - // elem = (DrawableElement)def.create(DrawableType.TCM_QUATRO, (IAttribute)attrDlg, - // pgenCategory, pgenType, loc, - // drawingLayer.getActiveLayer()); - // drawingLayer.addElement(elem); - return false; } diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenTextDrawingTool.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenTextDrawingTool.java index b3c6782973..b62efc6e34 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenTextDrawingTool.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenTextDrawingTool.java @@ -44,7 +44,7 @@ import gov.noaa.nws.ncep.ui.pgen.attrdialog.TextAttrDlg; * 07/10 ? B. Yin Added '[' or ']' for front labels * 02/11 ? B. Yin Fixed Outlook type problem. * 04/11 ? B. Yin Re-factor IAttribute - * + * 08/12 #802 Q. Zhou Fixed Front text of 2 lines. Modified handleMouseMove. * * * @author B. Yin @@ -177,6 +177,7 @@ public class PgenTextDrawingTool extends AbstractPgenDrawingTool { */ @Override public boolean handleMouseDown(int anX, int aY, int button) { + if ( !isResourceEditable() ) return false; // Check if mouse is in geographic extent Coordinate loc = mapEditor.translateClick(anX, aY); @@ -284,6 +285,7 @@ public class PgenTextDrawingTool extends AbstractPgenDrawingTool { */ @Override public boolean handleMouseMove(int x, int y) { + if ( !isResourceEditable() ) return false; // Check if mouse is in geographic extent Coordinate loc = mapEditor.translateClick(x, y); @@ -294,15 +296,20 @@ public class PgenTextDrawingTool extends AbstractPgenDrawingTool { AbstractDrawableComponent ghost = null; if ( ((IText)attrDlg).getString().length > 0 ) { - //add "[" or "]" to front labels + //add "[" or "]" to front labels. The rule: If the label is only number and in one line, will be surrounded by [,]. if (addLabelToSymbol && prevElem.getPgenCategory() != null && prevElem.getPgenCategory().equalsIgnoreCase("Front")){ - StringBuffer lbl = new StringBuffer(((IText)attrDlg).getString()[0]); + + String[] text = ((IText)attrDlg).getString(); + if ( text.length == 1 ) { + StringBuffer lbl = new StringBuffer(((TextAttrDlg)attrDlg).getString()[0]); + if ( lbl.length() > 0 ){ if ( lbl.charAt(0) == '[') lbl.deleteCharAt(0); if ( lbl.charAt(lbl.length()-1) == ']') lbl.deleteCharAt(lbl.length()-1); - + try { + Integer.parseInt(lbl.toString()); //check if the text is right or left of the front if ( rightOfLine(mapEditor, loc, (Line)prevElem.getPrimaryDE()) >= 0 ){ @@ -311,6 +318,9 @@ public class PgenTextDrawingTool extends AbstractPgenDrawingTool { else { ((TextAttrDlg)attrDlg).setText(new String[]{"[" + lbl}); } + } catch (NumberFormatException e) { + /*do nothing*/} + } } ghost = def.create( DrawableType.TEXT, (IAttribute)attrDlg, @@ -334,7 +344,7 @@ public class PgenTextDrawingTool extends AbstractPgenDrawingTool { @Override public boolean handleMouseDownMove(int x, int y, int mouseButton) { - if ( shiftDown ) return false; + if ( !isResourceEditable()|| shiftDown ) return false; else return true; } diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenUndoRedoHandler.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenUndoRedoHandler.java index 2be1b7c372..1a604a66e2 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenUndoRedoHandler.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenUndoRedoHandler.java @@ -13,6 +13,7 @@ import org.eclipse.core.commands.ExecutionException; import gov.noaa.nws.ncep.ui.pgen.PgenSession; import gov.noaa.nws.ncep.ui.pgen.PgenUtil; +import com.raytheon.uf.viz.core.rsc.IInputHandler; import com.raytheon.viz.ui.tools.AbstractTool; /** @@ -30,6 +31,8 @@ public class PgenUndoRedoHandler extends AbstractTool { @Override public Object execute(ExecutionEvent event) throws ExecutionException { + if ( PgenSession.getInstance().getPgenResource() != null && + PgenSession.getInstance().getPgenResource().isEditable() ) { if ( event.getApplicationContext().equals("Undo")) PgenSession.getInstance().getCommandManager().undo(); @@ -50,6 +53,7 @@ public class PgenUndoRedoHandler extends AbstractTool { //de-activate drawing tools PgenUtil.setSelectingMode(); + } return null; } diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenVectorDrawingTool.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenVectorDrawingTool.java index 23cf54bee7..7f7190ada5 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenVectorDrawingTool.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenVectorDrawingTool.java @@ -111,6 +111,7 @@ public class PgenVectorDrawingTool extends AbstractPgenDrawingTool { */ @Override public boolean handleMouseDown(int anX, int aY, int button) { + if ( !isResourceEditable() ) return false; // Check if mouse is in geographic extent Coordinate loc = mapEditor.translateClick(anX, aY); @@ -186,6 +187,7 @@ public class PgenVectorDrawingTool extends AbstractPgenDrawingTool { */ @Override public boolean handleMouseMove(int x, int y) { + if ( !isResourceEditable() ) return false; // Check if mouse is in geographic extent Coordinate loc = mapEditor.translateClick( x, y ); @@ -214,7 +216,7 @@ public class PgenVectorDrawingTool extends AbstractPgenDrawingTool { @Override public boolean handleMouseDownMove(int x, int y, int mouseButton) { - if ( shiftDown ) return false; + if (!isResourceEditable() || shiftDown ) return false; else return true; } diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenWatchBoxAddDelCntyHandler.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenWatchBoxAddDelCntyHandler.java index cad247c054..84f51f2461 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenWatchBoxAddDelCntyHandler.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenWatchBoxAddDelCntyHandler.java @@ -8,9 +8,14 @@ package gov.noaa.nws.ncep.ui.pgen.tools; +import gov.noaa.nws.ncep.common.staticdata.SPCCounty; +import gov.noaa.nws.ncep.ui.pgen.PgenStaticDataProvider; +import gov.noaa.nws.ncep.ui.pgen.attrdialog.WatchBoxAttrDlg; +import gov.noaa.nws.ncep.ui.pgen.elements.WatchBox; +import gov.noaa.nws.ncep.ui.pgen.rsc.PgenResource; + import java.util.List; -import org.eclipse.swt.SWT; import org.geotools.factory.CommonFactoryFinder; import org.geotools.factory.GeoTools; import org.geotools.feature.FeatureCollection; @@ -21,8 +26,8 @@ import org.geotools.feature.simple.SimpleFeatureTypeBuilder; import org.geotools.referencing.crs.DefaultGeographicCRS; import org.opengis.feature.simple.SimpleFeature; import org.opengis.feature.simple.SimpleFeatureType; -import org.opengis.filter.FilterFactory2; import org.opengis.filter.Filter; +import org.opengis.filter.FilterFactory2; import com.raytheon.viz.ui.editor.AbstractEditor; import com.vividsolutions.jts.geom.Coordinate; @@ -30,13 +35,6 @@ import com.vividsolutions.jts.geom.Geometry; import com.vividsolutions.jts.geom.GeometryFactory; import com.vividsolutions.jts.geom.MultiPolygon; import com.vividsolutions.jts.geom.Point; - -import gov.noaa.nws.ncep.common.staticdata.SPCCounty; -import gov.noaa.nws.ncep.ui.pgen.PgenSession; -import gov.noaa.nws.ncep.ui.pgen.PgenStaticDataProvider; -import gov.noaa.nws.ncep.ui.pgen.attrdialog.WatchBoxAttrDlg; -import gov.noaa.nws.ncep.ui.pgen.elements.WatchBox; -import gov.noaa.nws.ncep.ui.pgen.rsc.PgenResource; //import gov.noaa.nws.ncep.viz.ui.display.NCMapEditor; /** @@ -90,7 +88,7 @@ public class PgenWatchBoxAddDelCntyHandler extends InputHandlerDefaultImpl { @Override public boolean handleMouseDown(int anX, int aY, int button) { - if (shiftDown ) return false; + if (!drawingLayer.isEditable()||shiftDown ) return false; // Check if mouse is in geographic extent Coordinate loc = mapEditor.translateClick(anX, aY); @@ -214,7 +212,7 @@ public class PgenWatchBoxAddDelCntyHandler extends InputHandlerDefaultImpl { @Override public boolean handleMouseDownMove(int x, int y, int mouseButton) { - if ( shiftDown ) return false; + if ( !drawingLayer.isEditable() || shiftDown ) return false; else return true; } diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenWatchBoxDrawingTool.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenWatchBoxDrawingTool.java index f5d9bfce33..7ab913e95f 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenWatchBoxDrawingTool.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenWatchBoxDrawingTool.java @@ -136,6 +136,7 @@ public class PgenWatchBoxDrawingTool extends AbstractPgenDrawingTool { */ @Override public boolean handleMouseDown(int anX, int aY, int button) { + if ( !isResourceEditable() ) return false; // Check if mouse is in geographic extent Coordinate loc = mapEditor.translateClick(anX, aY); @@ -198,6 +199,7 @@ public class PgenWatchBoxDrawingTool extends AbstractPgenDrawingTool { */ @Override public boolean handleMouseUp( int x, int y, int button ) { + if ( !isResourceEditable() ) return false; if ( button == 1 ){ if ( points != null && points.size() == 2) { @@ -260,6 +262,8 @@ public class PgenWatchBoxDrawingTool extends AbstractPgenDrawingTool { */ @Override public boolean handleMouseMove(int x, int y) { + if ( !isResourceEditable() ) return false; + // Check if mouse is in geographic extent Coordinate loc = mapEditor.translateClick(x, y); if ( loc == null ) return false; @@ -288,7 +292,7 @@ public class PgenWatchBoxDrawingTool extends AbstractPgenDrawingTool { @Override public boolean handleMouseDownMove(int x, int y, int mouseButton) { - if ( shiftDown ) return false; + if ( !drawingLayer.isEditable() || shiftDown ) return false; else return true; } diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenWatchBoxModifyTool.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenWatchBoxModifyTool.java index e2c3cb2613..af7fa83e8e 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenWatchBoxModifyTool.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenWatchBoxModifyTool.java @@ -108,6 +108,7 @@ public class PgenWatchBoxModifyTool extends PgenSelectingTool { */ @Override public boolean handleMouseDown(int anX, int aY, int button) { + if ( !isResourceEditable() ) return false; // Check if mouse is in geographic extent Coordinate loc = mapEditor.translateClick(anX, aY); @@ -152,7 +153,7 @@ public class PgenWatchBoxModifyTool extends PgenSelectingTool { */ @Override public boolean handleMouseDownMove(int x, int y, int button) { - + if ( !isResourceEditable() ) return false; if ( dontMove ) return true; // Check if mouse is in geographic extent @@ -209,6 +210,7 @@ public class PgenWatchBoxModifyTool extends PgenSelectingTool { */ @Override public boolean handleMouseUp(int x, int y, int button) { + if ( !isResourceEditable() ) return false; // Finish the editing if (button == 1 && drawingLayer != null ){ diff --git a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenWatchStatusLineDrawingTool.java b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenWatchStatusLineDrawingTool.java index c734899564..346a82abd7 100644 --- a/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenWatchStatusLineDrawingTool.java +++ b/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/tools/PgenWatchStatusLineDrawingTool.java @@ -120,6 +120,7 @@ public class PgenWatchStatusLineDrawingTool extends AbstractPgenDrawingTool{ */ @Override public boolean handleMouseDown(int anX, int aY, int button) { + if ( !isResourceEditable() ) return false; // Check if mouse is in geographic extent Coordinate loc = mapEditor.translateClick(anX, aY); @@ -209,6 +210,8 @@ public class PgenWatchStatusLineDrawingTool extends AbstractPgenDrawingTool{ */ @Override public boolean handleMouseMove(int x, int y) { + if ( !isResourceEditable() ) return false; + // Check if mouse is in geographic extent Coordinate loc = mapEditor.translateClick(x, y); if ( loc == null ) return false; @@ -235,7 +238,7 @@ public class PgenWatchStatusLineDrawingTool extends AbstractPgenDrawingTool{ @Override public boolean handleMouseDownMove(int x, int y, int mouseButton) { - if ( shiftDown ) return false; + if ( !drawingLayer.isEditable() || shiftDown ) return false; else return true; } diff --git a/ncep/gov.noaa.nws.ncep.viz.cloudHeight/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject b/ncep/gov.noaa.nws.ncep.viz.cloudHeight/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject new file mode 100644 index 0000000000..2fb09e1f35 --- /dev/null +++ b/ncep/gov.noaa.nws.ncep.viz.cloudHeight/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject @@ -0,0 +1 @@ +gov.noaa.nws.ncep.viz.cloudHeight.CloudHeightResourceData \ No newline at end of file diff --git a/ncep/gov.noaa.nws.ncep.viz.cloudHeight/src/gov/noaa/nws/ncep/viz/cloudHeight/ui/CloudHeightAction.java b/ncep/gov.noaa.nws.ncep.viz.cloudHeight/src/gov/noaa/nws/ncep/viz/cloudHeight/ui/CloudHeightAction.java index 3b13aa18ad..cc4701f7eb 100644 --- a/ncep/gov.noaa.nws.ncep.viz.cloudHeight/src/gov/noaa/nws/ncep/viz/cloudHeight/ui/CloudHeightAction.java +++ b/ncep/gov.noaa.nws.ncep.viz.cloudHeight/src/gov/noaa/nws/ncep/viz/cloudHeight/ui/CloudHeightAction.java @@ -16,6 +16,7 @@ import org.eclipse.ui.PlatformUI; import com.raytheon.uf.viz.core.IDisplayPane; import com.raytheon.uf.viz.core.exception.VizException; import com.raytheon.uf.viz.core.rsc.IInputHandler; +import com.raytheon.uf.viz.core.rsc.IInputHandler.InputPriority; import com.raytheon.viz.ui.editor.ISelectedPanesChangedListener; import com.raytheon.viz.ui.input.InputAdapter; import com.raytheon.viz.ui.perspectives.AbstractVizPerspectiveManager; @@ -37,6 +38,10 @@ import com.vividsolutions.jts.geom.Coordinate; * 03/01/12 524/TTR11 B. Hebbard Various changes to allow mutual operation of * 'Take Control' button with other Modal Tools * 06/01/12 747 B. Yin Made the pan tool work when the shift is held down. + * 06/21/12 826 Archana Updated the activateTool() method to remove the cloudheight tool from the + * tool manager when there is no IR image loaded. + * Instead, the default Pan tool is loaded. + * * * * @@ -91,7 +96,7 @@ public class CloudHeightAction extends AbstractNCModalMapTool { mouseHndlr = new MouseHandler(); } if (mapEditor != null) { - mapEditor.registerMouseHandler( this.mouseHndlr ); + mapEditor.registerMouseHandler( this.mouseHndlr, InputPriority.LOWEST ); } NCDisplayPane[] seldPanes = (NCDisplayPane[]) mapEditor.getSelectedPanes(); @@ -116,6 +121,13 @@ public class CloudHeightAction extends AbstractNCModalMapTool { satResource = cldHghtProcessor.getSatResource(); if ( satResource == null ) { issueAlert(); + AbstractVizPerspectiveManager mgr = VizPerspectiveListener + .getCurrentPerspectiveManager(); + if (mgr != null) { + mgr.getToolManager().deselectModalTool(this); + NmapUiUtils.setPanningMode(); + + } return; } diff --git a/ncep/gov.noaa.nws.ncep.viz.common/META-INF/MANIFEST.MF b/ncep/gov.noaa.nws.ncep.viz.common/META-INF/MANIFEST.MF index a71ecda54b..63d2ae779b 100644 --- a/ncep/gov.noaa.nws.ncep.viz.common/META-INF/MANIFEST.MF +++ b/ncep/gov.noaa.nws.ncep.viz.common/META-INF/MANIFEST.MF @@ -19,6 +19,7 @@ Eclipse-LazyStart: true Export-Package: gov.noaa.nws.ncep.viz.common, gov.noaa.nws.ncep.viz.common.dbQuery, gov.noaa.nws.ncep.viz.common.graphicUtil, + gov.noaa.nws.ncep.viz.common.preferences, gov.noaa.nws.ncep.viz.common.soundingQuery, gov.noaa.nws.ncep.viz.common.ui, gov.noaa.nws.ncep.viz.common.ui.color diff --git a/ncep/gov.noaa.nws.ncep.viz.common/plugin.xml b/ncep/gov.noaa.nws.ncep.viz.common/plugin.xml index d69fd5bf59..c6f662ca05 100644 --- a/ncep/gov.noaa.nws.ncep.viz.common/plugin.xml +++ b/ncep/gov.noaa.nws.ncep.viz.common/plugin.xml @@ -15,13 +15,19 @@ + + diff --git a/ncep/gov.noaa.nws.ncep.viz.common/src/gov/noaa/nws/ncep/viz/common/Activator.java b/ncep/gov.noaa.nws.ncep.viz.common/src/gov/noaa/nws/ncep/viz/common/Activator.java index c43a10d335..23ed302990 100644 --- a/ncep/gov.noaa.nws.ncep.viz.common/src/gov/noaa/nws/ncep/viz/common/Activator.java +++ b/ncep/gov.noaa.nws.ncep.viz.common/src/gov/noaa/nws/ncep/viz/common/Activator.java @@ -17,7 +17,6 @@ public class Activator extends AbstractUIPlugin { // The shared instance private static Activator plugin; - private IPreferenceStore myprefs = null; /** * The constructor */ @@ -52,30 +51,4 @@ public class Activator extends AbstractUIPlugin { public static Activator getDefault() { return plugin; } - - @Override - public IPreferenceStore getPreferenceStore() { - - /* - * First time, set defaults for the Ncgrid preference store - */ - if ( myprefs == null ) { - myprefs = super.getPreferenceStore(); - /* - myprefs.setDefault( NcgridPreferences.LLLAT, ""); - myprefs.setDefault( NcgridPreferences.LLLON, ""); - myprefs.setDefault( NcgridPreferences.URLAT, ""); - myprefs.setDefault( NcgridPreferences.URLON, ""); - - /* - myprefs.setDefault( NcgridPreferences.CLIP_AREA_COM, NcgridPreferences.CLIP_AREA_US); - myprefs.setDefault( NcgridPreferences.GAREA, NcgridPreferences.CLIP_AREA_US); - myprefs.setDefault( NcgridPreferences.PROJ, "STR/90;-97;0"); - myprefs.setDefault( NcgridPreferences.CUSTOM_AREA, false ); - */ - } - - return myprefs; - } - } diff --git a/ncep/gov.noaa.nws.ncep.viz.common/src/gov/noaa/nws/ncep/viz/common/GraphicsAreaPreferences.java b/ncep/gov.noaa.nws.ncep.viz.common/src/gov/noaa/nws/ncep/viz/common/preferences/GraphicsAreaPreferences.java similarity index 93% rename from ncep/gov.noaa.nws.ncep.viz.common/src/gov/noaa/nws/ncep/viz/common/GraphicsAreaPreferences.java rename to ncep/gov.noaa.nws.ncep.viz.common/src/gov/noaa/nws/ncep/viz/common/preferences/GraphicsAreaPreferences.java index 184e279165..f21b3888bb 100644 --- a/ncep/gov.noaa.nws.ncep.viz.common/src/gov/noaa/nws/ncep/viz/common/GraphicsAreaPreferences.java +++ b/ncep/gov.noaa.nws.ncep.viz.common/src/gov/noaa/nws/ncep/viz/common/preferences/GraphicsAreaPreferences.java @@ -1,4 +1,6 @@ -package gov.noaa.nws.ncep.viz.common; +package gov.noaa.nws.ncep.viz.common.preferences; + +import gov.noaa.nws.ncep.viz.common.ui.NmapCommon; import org.eclipse.jface.preference.FieldEditorPreferencePage; import org.eclipse.jface.preference.StringFieldEditor; @@ -38,7 +40,7 @@ public class GraphicsAreaPreferences extends FieldEditorPreferencePage implement public GraphicsAreaPreferences() { super(GRID); - setPreferenceStore(Activator.getDefault().getPreferenceStore()); + setPreferenceStore( NmapCommon.getNcepPreferenceStore() ); // setDescription("Select Data Area preference"); } diff --git a/ncep/gov.noaa.nws.ncep.viz.common/src/gov/noaa/nws/ncep/viz/common/preferences/NcepGeneralPreferencesPage.java b/ncep/gov.noaa.nws.ncep.viz.common/src/gov/noaa/nws/ncep/viz/common/preferences/NcepGeneralPreferencesPage.java new file mode 100644 index 0000000000..2917140d57 --- /dev/null +++ b/ncep/gov.noaa.nws.ncep.viz.common/src/gov/noaa/nws/ncep/viz/common/preferences/NcepGeneralPreferencesPage.java @@ -0,0 +1,74 @@ +package gov.noaa.nws.ncep.viz.common.preferences; + +import gov.noaa.nws.ncep.viz.common.ui.NmapCommon; + +import org.eclipse.jface.preference.BooleanFieldEditor; +import org.eclipse.jface.preference.FieldEditorPreferencePage; +import org.eclipse.jface.preference.StringFieldEditor; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.ui.IWorkbench; +import org.eclipse.ui.IWorkbenchPreferencePage; + +/** + * Specifies Data Area preferences page + * + *

+ * 
+ *     SOFTWARE HISTORY
+ *    
+ *     Date       	Ticket#		Engineer	Description
+ *     ------------	----------	-----------	--------------------------
+ *     July 31, 2012  #631        ghull    	Initial Creation.
+ *     Sept 11, 2012  #860        ghull     added ShowLatestResourceTimes
+ * 
+ * 
+ * + * @author mli + * + */ +public class NcepGeneralPreferencesPage extends FieldEditorPreferencePage implements + IWorkbenchPreferencePage { + + public final static String PromptOnDisplayClose = "PromptOnDisplayClose"; + public final static String ShowLatestResourceTimes = "ShowLatestResourceTimes"; + + private BooleanFieldEditor promptOnDisplayCloseFieldEditor; + + private BooleanFieldEditor showLatestResourceTimesFieldEditor; + + public NcepGeneralPreferencesPage() { + super(GRID); + setPreferenceStore( NmapCommon.getNcepPreferenceStore() ); + } + + + @Override + public void createFieldEditors() { + + Composite composite = getFieldEditorParent(); + + promptOnDisplayCloseFieldEditor = new BooleanFieldEditor( PromptOnDisplayClose, + "Prompt Before Closing Displays", BooleanFieldEditor.SEPARATE_LABEL, // put the check box on the right + composite ); + this.addField(promptOnDisplayCloseFieldEditor); + + showLatestResourceTimesFieldEditor = new BooleanFieldEditor( ShowLatestResourceTimes, + "Show Latest Resource Time", BooleanFieldEditor.SEPARATE_LABEL, // put the check box on the right + composite ); + this.addField(showLatestResourceTimesFieldEditor); + } + + /* + * (non-Javadoc) + * + * @see + * org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench) + */ + public void init(IWorkbench workbench) { + + } + +// @Override +// public void propertyChange(PropertyChangeEvent event) { +// } +} diff --git a/ncep/gov.noaa.nws.ncep.viz.common/src/gov/noaa/nws/ncep/viz/common/NcepPreferences.java b/ncep/gov.noaa.nws.ncep.viz.common/src/gov/noaa/nws/ncep/viz/common/preferences/NcepPreferences.java similarity index 69% rename from ncep/gov.noaa.nws.ncep.viz.common/src/gov/noaa/nws/ncep/viz/common/NcepPreferences.java rename to ncep/gov.noaa.nws.ncep.viz.common/src/gov/noaa/nws/ncep/viz/common/preferences/NcepPreferences.java index 55fdf49e00..fa2b6720de 100644 --- a/ncep/gov.noaa.nws.ncep.viz.common/src/gov/noaa/nws/ncep/viz/common/NcepPreferences.java +++ b/ncep/gov.noaa.nws.ncep.viz.common/src/gov/noaa/nws/ncep/viz/common/preferences/NcepPreferences.java @@ -1,4 +1,4 @@ -package gov.noaa.nws.ncep.viz.common; +package gov.noaa.nws.ncep.viz.common.preferences; /** * NcepPreferences @@ -12,18 +12,20 @@ package gov.noaa.nws.ncep.viz.common; * @author Q. Zhou * @version 1 */ +import gov.noaa.nws.ncep.viz.common.ui.NmapCommon; + import org.eclipse.jface.preference.FieldEditorPreferencePage; import org.eclipse.ui.IWorkbench; import org.eclipse.ui.IWorkbenchPreferencePage; -import com.raytheon.uf.viz.core.Activator; +//import com.raytheon.uf.viz.core.Activator; public class NcepPreferences extends FieldEditorPreferencePage implements IWorkbenchPreferencePage { public NcepPreferences() { super(GRID); - setPreferenceStore(Activator.getDefault().getPreferenceStore()); - setDescription("Preference location for National Centers Perspective"); + setPreferenceStore( NmapCommon.getNcepPreferenceStore() ); + setDescription("Preferences for the National Centers Perspective"); } @Override diff --git a/ncep/gov.noaa.nws.ncep.viz.common/src/gov/noaa/nws/ncep/viz/common/soundingQuery/NcSoundingQuery.java b/ncep/gov.noaa.nws.ncep.viz.common/src/gov/noaa/nws/ncep/viz/common/soundingQuery/NcSoundingQuery.java index 884efcf54f..3bae9053f2 100644 --- a/ncep/gov.noaa.nws.ncep.viz.common/src/gov/noaa/nws/ncep/viz/common/soundingQuery/NcSoundingQuery.java +++ b/ncep/gov.noaa.nws.ncep.viz.common/src/gov/noaa/nws/ncep/viz/common/soundingQuery/NcSoundingQuery.java @@ -72,22 +72,22 @@ public class NcSoundingQuery { return 0; } public static String convertSoundTimeDispStringToRangeStartTimeFormat(String displayStr){ - //Note: time line display string has format of, e.x. 111208/21V003, convert to 2011-12-08 21:00:00. + //Note: time line display string has format of, e.x. 111208/2130V003, convert to 2011-12-08 21:30:00. //first 2 digits is year String rangeStartStr= "20"+displayStr.substring(0, 2); //3rd and 4th digits is month rangeStartStr = rangeStartStr + "-"+ displayStr.substring(2, 4); //5th and 6th digits is day rangeStartStr = rangeStartStr + "-"+ displayStr.substring(4, 6); - //8th and 9th digits is hour, mins and seconds should both be 0s - rangeStartStr = rangeStartStr + " "+ displayStr.substring(7, 9)+ ":00:00"; + //8th and 9th digits is hour, 10th and 11th are min, and seconds should be 0s + rangeStartStr = rangeStartStr + " "+ displayStr.substring(7, 9)+":"+ displayStr.substring(9, 11)+ ":00"; return rangeStartStr; } //return refTimeStr public static String convertSoundTimeDispStringToRefTime(String displayStr){ - //Note: time line display string has format of, e.x. 111208/21V003, convert to 2011-12-08 21:00:00. - String year, mon, day, hour, Vhour; + //Note: time line display string has format of, e.x. 111208/2100V003, convert to 2011-12-08 21:00:00. + String year, mon, day, hour, min, Vhour; Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("GMT")); //first 2 digits is year year ="20"+displayStr.substring(0, 2); @@ -95,16 +95,17 @@ public class NcSoundingQuery { mon =displayStr.substring(2, 4); //5th and 6th digits is day day=displayStr.substring(4, 6); - //8th and 9th digits is hour, mins and seconds should both be 0s + //8th and 9th digits is hour hour= displayStr.substring(7, 9); - - //Vhour - Vhour = displayStr.substring(10); - cal.set(Integer.parseInt(year), Integer.parseInt(mon)-1,Integer.parseInt(day), Integer.parseInt(hour),0); + //10-11 is minutes, second should be 0s + min = displayStr.substring(9, 11); + //Vhour starting digit 13 + Vhour = displayStr.substring(12); + cal.set(Integer.parseInt(year), Integer.parseInt(mon)-1,Integer.parseInt(day), Integer.parseInt(hour),Integer.parseInt(min)); //from VXXX and rangeStart time get referTime long reftimeMs = cal.getTimeInMillis() - (Integer.parseInt(Vhour)*3600000); cal.setTimeInMillis(reftimeMs); - String ref = String.format("%1$tY-%1$tm-%1$td %1$tH:00:00", cal); + String ref = String.format("%1$tY-%1$tm-%1$td %1$tH:%1$tM:00", cal); return ref; @@ -235,7 +236,7 @@ public class NcSoundingQuery { rtStr = rtStr + "]"; query.append("return sndRq.getSoundingDataByRangeTimeArray("+rtStr+")"); - System.out.println(query.toString()); + //System.out.println(query.toString()); Object[] pdoList; try { @@ -289,7 +290,7 @@ public class NcSoundingQuery { } latLonStr = latLonStr + "]"; query.append("return sndRq.getSoundingDataByLatLonArray("+latLonStr+")"); - System.out.println(query.toString()); + //System.out.println(query.toString()); Object[] pdoList; try { @@ -348,7 +349,7 @@ public class NcSoundingQuery { latLonStr = latLonStr + "]"; query.append("return sndRq.getSoundingDataByLatLonArray("+latLonStr+")"); - System.out.println(query.toString()); + //System.out.println(query.toString()); Object[] pdoList; try { @@ -492,7 +493,7 @@ public class NcSoundingQuery { query.append("return sndRq.getSoundingDataByLatLonArray("+latLonStr+")"); //query.append("return sndRq.getModelSoundingData()"); - System.out.println(query.toString()); + //System.out.println(query.toString()); Object[] pdoList; try { @@ -593,7 +594,7 @@ public class NcSoundingQuery { else query.append("return sndRq.getSoundingDataByStnIdArray("+stnStr+")"); - System.out.println(query.toString()); + //System.out.println(query.toString()); Object[] pdoList; try { diff --git a/ncep/gov.noaa.nws.ncep.viz.common/src/gov/noaa/nws/ncep/viz/common/ui/NmapCommon.java b/ncep/gov.noaa.nws.ncep.viz.common/src/gov/noaa/nws/ncep/viz/common/ui/NmapCommon.java index e35a5e6437..230033240c 100644 --- a/ncep/gov.noaa.nws.ncep.viz.common/src/gov/noaa/nws/ncep/viz/common/ui/NmapCommon.java +++ b/ncep/gov.noaa.nws.ncep.viz.common/src/gov/noaa/nws/ncep/viz/common/ui/NmapCommon.java @@ -1,5 +1,8 @@ package gov.noaa.nws.ncep.viz.common.ui; +import gov.noaa.nws.ncep.viz.common.Activator; +import gov.noaa.nws.ncep.viz.common.preferences.NcepGeneralPreferencesPage; + import java.io.File; import java.io.FileFilter; import java.text.NumberFormat; @@ -10,15 +13,13 @@ import java.util.Comparator; import java.util.List; import java.util.TimeZone; +import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.jface.viewers.IStructuredContentProvider; import org.eclipse.jface.viewers.LabelProvider; import org.eclipse.jface.viewers.Viewer; import com.raytheon.uf.common.time.DataTime; -//import com.raytheon.uf.viz.core.localization.LocalizationManager; - -//import gov.noaa.nws.ncep.viz. /** * Common class for constants, utility methods ... * * @@ -72,6 +73,7 @@ import com.raytheon.uf.common.time.DataTime; * 12/20/10 #137 Q. Zhou Modified standalone condition for watch box & volcano * 07/28/11 #450 G. Hull move pgen localization calls to pgen * 08/09/11 #450 G. Hull get/set for pgen working directory. + * 07/31/12 #631 G. Hull getNcepPreferenceStore() * * * @@ -92,6 +94,8 @@ public class NmapCommon { // ? frameTool, looping }; + private static IPreferenceStore ncPrefStore = null; + public final static String NatlCntrsPerspectiveID = "gov.noaa.nws.ncep.viz.ui.NCPerspective"; private static String pgenWorkingDirectory="."; @@ -112,6 +116,34 @@ public class NmapCommon { return new String( DefaultMap ); } + // Added this to make it more clear that this plugin's store is used for + // all Ncep preferences + // + public static IPreferenceStore getNcepPreferenceStore() { + /* + * First time, set defaults for the Ncgrid preference store + */ + if ( ncPrefStore == null ) { + ncPrefStore = Activator.getDefault().getPreferenceStore(); + ncPrefStore.setDefault( NcepGeneralPreferencesPage.PromptOnDisplayClose, false ); + ncPrefStore.setDefault( NcepGeneralPreferencesPage.ShowLatestResourceTimes, true ); + + /* + myprefs.setDefault( NcgridPreferences.LLLAT, ""); + myprefs.setDefault( NcgridPreferences.LLLON, ""); + myprefs.setDefault( NcgridPreferences.URLAT, ""); + myprefs.setDefault( NcgridPreferences.URLON, ""); + /* + myprefs.setDefault( NcgridPreferences.CLIP_AREA_COM, NcgridPreferences.CLIP_AREA_US); + myprefs.setDefault( NcgridPreferences.GAREA, NcgridPreferences.CLIP_AREA_US); + myprefs.setDefault( NcgridPreferences.PROJ, "STR/90;-97;0"); + myprefs.setDefault( NcgridPreferences.CUSTOM_AREA, false ); + */ + } + + return ncPrefStore; + } + /* * This helper method to fix a bug caused the logic of checking environmental "ISCONVERTER" */ diff --git a/ncep/gov.noaa.nws.ncep.viz.gempak.nativelib.linux32/.project b/ncep/gov.noaa.nws.ncep.viz.gempak.nativelib.linux32/.project new file mode 100644 index 0000000000..267aa85a00 --- /dev/null +++ b/ncep/gov.noaa.nws.ncep.viz.gempak.nativelib.linux32/.project @@ -0,0 +1,22 @@ + + + gov.noaa.nws.ncep.viz.gempak.nativelib.linux32 + + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + + diff --git a/ncep/gov.noaa.nws.ncep.viz.gempak.nativelib.linux32/META-INF/MANIFEST.MF b/ncep/gov.noaa.nws.ncep.viz.gempak.nativelib.linux32/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..9d419e0f1b --- /dev/null +++ b/ncep/gov.noaa.nws.ncep.viz.gempak.nativelib.linux32/META-INF/MANIFEST.MF @@ -0,0 +1,8 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: gempak native libs Linux 32-bit +Bundle-SymbolicName: gov.noaa.nws.ncep.viz.gempak.nativelib.linux32 +Bundle-Version: 1.0.0.qualifier +Fragment-Host: gov.noaa.nws.ncep.viz.gempak.nativelib;bundle-version="1.0.0" +Bundle-RequiredExecutionEnvironment: JavaSE-1.6 +Eclipse-PlatformFilter: (& (osgi.os=linux) (osgi.arch=x86)) diff --git a/ncep/gov.noaa.nws.ncep.viz.gempak.nativelib.linux32/build.properties b/ncep/gov.noaa.nws.ncep.viz.gempak.nativelib.linux32/build.properties new file mode 100644 index 0000000000..9eedf83c23 --- /dev/null +++ b/ncep/gov.noaa.nws.ncep.viz.gempak.nativelib.linux32/build.properties @@ -0,0 +1,5 @@ +bin.includes = META-INF/,\ + libgempak.so,\ + libcnflib.so,\ + libaodtv64.so,\ + libg2g.so diff --git a/ncep/gov.noaa.nws.ncep.viz.gempak.nativelib.linux32/gempak.nativelib.tar.gz b/ncep/gov.noaa.nws.ncep.viz.gempak.nativelib.linux32/gempak.nativelib.tar.gz new file mode 100644 index 0000000000..bf1be26484 Binary files /dev/null and b/ncep/gov.noaa.nws.ncep.viz.gempak.nativelib.linux32/gempak.nativelib.tar.gz differ diff --git a/ncep/gov.noaa.nws.ncep.viz.gempak.nativelib.linux32/gov.noaa.nws.ncep.viz.gempak.nativelib.linux32.ecl b/ncep/gov.noaa.nws.ncep.viz.gempak.nativelib.linux32/gov.noaa.nws.ncep.viz.gempak.nativelib.linux32.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/ncep/gov.noaa.nws.ncep.viz.gempak.nativelib.linux32/libaodtv64.so b/ncep/gov.noaa.nws.ncep.viz.gempak.nativelib.linux32/libaodtv64.so new file mode 100644 index 0000000000..c5ebad2240 Binary files /dev/null and b/ncep/gov.noaa.nws.ncep.viz.gempak.nativelib.linux32/libaodtv64.so differ diff --git a/ncep/gov.noaa.nws.ncep.viz.gempak.nativelib.linux32/libcnflib.so b/ncep/gov.noaa.nws.ncep.viz.gempak.nativelib.linux32/libcnflib.so new file mode 100644 index 0000000000..ad46263878 Binary files /dev/null and b/ncep/gov.noaa.nws.ncep.viz.gempak.nativelib.linux32/libcnflib.so differ diff --git a/ncep/gov.noaa.nws.ncep.viz.gempak.nativelib.linux32/libg2g.so b/ncep/gov.noaa.nws.ncep.viz.gempak.nativelib.linux32/libg2g.so new file mode 100644 index 0000000000..bfdab06319 Binary files /dev/null and b/ncep/gov.noaa.nws.ncep.viz.gempak.nativelib.linux32/libg2g.so differ diff --git a/ncep/gov.noaa.nws.ncep.viz.gempak.nativelib.linux32/libgempak.so b/ncep/gov.noaa.nws.ncep.viz.gempak.nativelib.linux32/libgempak.so new file mode 100644 index 0000000000..62ec770343 Binary files /dev/null and b/ncep/gov.noaa.nws.ncep.viz.gempak.nativelib.linux32/libgempak.so differ diff --git a/ncep/gov.noaa.nws.ncep.viz.gempak.nativelib.linux64/.project b/ncep/gov.noaa.nws.ncep.viz.gempak.nativelib.linux64/.project new file mode 100644 index 0000000000..558a62b183 --- /dev/null +++ b/ncep/gov.noaa.nws.ncep.viz.gempak.nativelib.linux64/.project @@ -0,0 +1,22 @@ + + + gov.noaa.nws.ncep.viz.gempak.nativelib.linux64 + + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + + diff --git a/ncep/gov.noaa.nws.ncep.viz.gempak.nativelib.linux64/META-INF/MANIFEST.MF b/ncep/gov.noaa.nws.ncep.viz.gempak.nativelib.linux64/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..9c3e215ddb --- /dev/null +++ b/ncep/gov.noaa.nws.ncep.viz.gempak.nativelib.linux64/META-INF/MANIFEST.MF @@ -0,0 +1,8 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: gempak native libs linux 64-bit +Bundle-SymbolicName: gov.noaa.nws.ncep.viz.gempak.nativelib.linux64 +Bundle-Version: 1.0.0.qualifier +Fragment-Host: gov.noaa.nws.ncep.viz.gempak.nativelib;bundle-version="1.0.0" +Bundle-RequiredExecutionEnvironment: JavaSE-1.6 +Eclipse-PlatformFilter: (& (osgi.os=linux) (osgi.arch=x86_64)) diff --git a/ncep/gov.noaa.nws.ncep.viz.gempak.nativelib.linux64/build.properties b/ncep/gov.noaa.nws.ncep.viz.gempak.nativelib.linux64/build.properties new file mode 100644 index 0000000000..9eedf83c23 --- /dev/null +++ b/ncep/gov.noaa.nws.ncep.viz.gempak.nativelib.linux64/build.properties @@ -0,0 +1,5 @@ +bin.includes = META-INF/,\ + libgempak.so,\ + libcnflib.so,\ + libaodtv64.so,\ + libg2g.so diff --git a/ncep/gov.noaa.nws.ncep.viz.gempak.nativelib.linux64/gov.noaa.nws.ncep.viz.gempak.nativelib.linux64.ecl b/ncep/gov.noaa.nws.ncep.viz.gempak.nativelib.linux64/gov.noaa.nws.ncep.viz.gempak.nativelib.linux64.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/ncep/gov.noaa.nws.ncep.viz.gempak.nativelib.linux64/libaodtv64.so b/ncep/gov.noaa.nws.ncep.viz.gempak.nativelib.linux64/libaodtv64.so new file mode 100644 index 0000000000..2f63193606 Binary files /dev/null and b/ncep/gov.noaa.nws.ncep.viz.gempak.nativelib.linux64/libaodtv64.so differ diff --git a/ncep/gov.noaa.nws.ncep.viz.gempak.nativelib.linux64/libcnflib.so b/ncep/gov.noaa.nws.ncep.viz.gempak.nativelib.linux64/libcnflib.so new file mode 100644 index 0000000000..081bd5d7d1 Binary files /dev/null and b/ncep/gov.noaa.nws.ncep.viz.gempak.nativelib.linux64/libcnflib.so differ diff --git a/ncep/gov.noaa.nws.ncep.viz.gempak.nativelib.linux64/libg2g.so b/ncep/gov.noaa.nws.ncep.viz.gempak.nativelib.linux64/libg2g.so new file mode 100644 index 0000000000..247c8db46a Binary files /dev/null and b/ncep/gov.noaa.nws.ncep.viz.gempak.nativelib.linux64/libg2g.so differ diff --git a/ncep/gov.noaa.nws.ncep.viz.gempak.nativelib.linux64/libgempak.so b/ncep/gov.noaa.nws.ncep.viz.gempak.nativelib.linux64/libgempak.so new file mode 100644 index 0000000000..d0ec988cdd Binary files /dev/null and b/ncep/gov.noaa.nws.ncep.viz.gempak.nativelib.linux64/libgempak.so differ diff --git a/ncep/gov.noaa.nws.ncep.viz.gempak.nativelib/.classpath b/ncep/gov.noaa.nws.ncep.viz.gempak.nativelib/.classpath new file mode 100644 index 0000000000..ad32c83a78 --- /dev/null +++ b/ncep/gov.noaa.nws.ncep.viz.gempak.nativelib/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/ncep/gov.noaa.nws.ncep.viz.gempak.nativelib/.project b/ncep/gov.noaa.nws.ncep.viz.gempak.nativelib/.project new file mode 100644 index 0000000000..d65b413854 --- /dev/null +++ b/ncep/gov.noaa.nws.ncep.viz.gempak.nativelib/.project @@ -0,0 +1,28 @@ + + + gov.noaa.nws.ncep.viz.gempak.nativelib + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/ncep/gov.noaa.nws.ncep.viz.gempak.nativelib/.settings/org.eclipse.jdt.core.prefs b/ncep/gov.noaa.nws.ncep.viz.gempak.nativelib/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000..43e4302c94 --- /dev/null +++ b/ncep/gov.noaa.nws.ncep.viz.gempak.nativelib/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,8 @@ +#Fri Apr 27 12:19:41 EDT 2012 +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 +org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.6 diff --git a/ncep/gov.noaa.nws.ncep.viz.gempak.nativelib/META-INF/MANIFEST.MF b/ncep/gov.noaa.nws.ncep.viz.gempak.nativelib/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..b4e68c6202 --- /dev/null +++ b/ncep/gov.noaa.nws.ncep.viz.gempak.nativelib/META-INF/MANIFEST.MF @@ -0,0 +1,12 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: Gempak Nativelib +Bundle-SymbolicName: gov.noaa.nws.ncep.viz.gempak.nativelib +Bundle-Version: 1.0.0.qualifier +Bundle-Activator: gov.noaa.nws.ncep.viz.gempak.nativelib.Activator +Require-Bundle: org.eclipse.ui, + org.eclipse.core.runtime, + com.raytheon.uf.common.status;bundle-version="1.12.1174" +Bundle-ActivationPolicy: lazy +Bundle-RequiredExecutionEnvironment: JavaSE-1.6 +Export-Package: gov.noaa.nws.ncep.viz.gempak.nativelib diff --git a/ncep/gov.noaa.nws.ncep.viz.gempak.nativelib/build.properties b/ncep/gov.noaa.nws.ncep.viz.gempak.nativelib/build.properties new file mode 100644 index 0000000000..34d2e4d2da --- /dev/null +++ b/ncep/gov.noaa.nws.ncep.viz.gempak.nativelib/build.properties @@ -0,0 +1,4 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + . diff --git a/ncep/gov.noaa.nws.ncep.viz.gempak.nativelib/gov.noaa.nws.ncep.viz.gempak.nativelib.ecl b/ncep/gov.noaa.nws.ncep.viz.gempak.nativelib/gov.noaa.nws.ncep.viz.gempak.nativelib.ecl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/ncep/gov.noaa.nws.ncep.viz.gempak.nativelib/src/gov/noaa/nws/ncep/viz/gempak/nativelib/Activator.java b/ncep/gov.noaa.nws.ncep.viz.gempak.nativelib/src/gov/noaa/nws/ncep/viz/gempak/nativelib/Activator.java new file mode 100644 index 0000000000..5670992d38 --- /dev/null +++ b/ncep/gov.noaa.nws.ncep.viz.gempak.nativelib/src/gov/noaa/nws/ncep/viz/gempak/nativelib/Activator.java @@ -0,0 +1,50 @@ +package gov.noaa.nws.ncep.viz.gempak.nativelib; + +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.osgi.framework.BundleContext; + +/** + * The activator class controls the plug-in life cycle + */ +public class Activator extends AbstractUIPlugin { + + // The plug-in ID + public static final String PLUGIN_ID = "gov.noaa.nws.ncep.viz.gempak.nativelib"; //$NON-NLS-1$ + + // The shared instance + private static Activator plugin; + + /** + * The constructor + */ + public Activator() { + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) + */ + public void start(BundleContext context) throws Exception { + super.start(context); + plugin = this; + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) + */ + public void stop(BundleContext context) throws Exception { + plugin = null; + super.stop(context); + } + + /** + * Returns the shared instance + * + * @return the shared instance + */ + public static Activator getDefault() { + return plugin; + } + +} diff --git a/ncep/gov.noaa.nws.ncep.viz.gempak.nativelib/src/gov/noaa/nws/ncep/viz/gempak/nativelib/LibraryLoader.java b/ncep/gov.noaa.nws.ncep.viz.gempak.nativelib/src/gov/noaa/nws/ncep/viz/gempak/nativelib/LibraryLoader.java new file mode 100644 index 0000000000..3f68c6dcad --- /dev/null +++ b/ncep/gov.noaa.nws.ncep.viz.gempak.nativelib/src/gov/noaa/nws/ncep/viz/gempak/nativelib/LibraryLoader.java @@ -0,0 +1,30 @@ +package gov.noaa.nws.ncep.viz.gempak.nativelib; + +import java.net.URL; + +import org.eclipse.core.runtime.FileLocator; +import org.eclipse.core.runtime.Path; +import org.osgi.framework.Bundle; + +import com.raytheon.uf.common.status.IUFStatusHandler; +import com.raytheon.uf.common.status.UFStatus; +import com.raytheon.uf.common.status.UFStatus.Priority; + +public class LibraryLoader { + private static final transient IUFStatusHandler statusHandler = UFStatus + .getHandler(LibraryLoader.class); + + public static void load(String libName) { + URL url = null; + try { + Bundle b = Activator.getDefault().getBundle(); + url = FileLocator.find(b, new Path(System.mapLibraryName(libName)), + null); + url = FileLocator.resolve(url); + System.load(url.getPath()); + } catch (Exception e) { + String msg = "Could not Load native Library: " + url.getFile(); + statusHandler.handle(Priority.PROBLEM, msg, e); + } + } +} diff --git a/ncep/gov.noaa.nws.ncep.viz.localization/src/gov/noaa/nws/ncep/viz/localization/NcPathManager.java b/ncep/gov.noaa.nws.ncep.viz.localization/src/gov/noaa/nws/ncep/viz/localization/NcPathManager.java index cf4d8dc9b4..db2798218b 100644 --- a/ncep/gov.noaa.nws.ncep.viz.localization/src/gov/noaa/nws/ncep/viz/localization/NcPathManager.java +++ b/ncep/gov.noaa.nws.ncep.viz.localization/src/gov/noaa/nws/ncep/viz/localization/NcPathManager.java @@ -41,6 +41,7 @@ import com.raytheon.uf.viz.core.localization.LocalizationManager; * 06/01/2012 #815 Greg Hull rm NatlCntrsLocalizationAdapter and use CAVELocalizationAdapter * 06/07/2012 #717 Archana Added the constants STYLE_RULES_DIR, * MCIDAS_IMG_STYLE_RULES and GINI_IMG_STYLE_RULES + * 06/21/2012 #825 Greg Hull rm mosaicInfo.txt * * * @author ghull @@ -91,8 +92,6 @@ public class NcPathManager { public static final String CLOUD_HEIGHT_SOUNDING_MODELS = NCEP_ROOT+"CloudHeight"+File.separator+"SoundingModels.xml"; -// NOT USED. CAN REMOVE -// public static final String LCL_RDR_LEGENDS = NCEP_ROOT+"Radar"+ File.separator+"localRadarLegendNames.txt"; public static final String GEOG_TBL = PREDEFINED_AREAS_DIR + File.separator+ "gempak"+File.separator+"geog.xml"; @@ -121,7 +120,7 @@ public class NcPathManager { // assumes the filename. So don't change the fileNames. // the files. public static final String RADAR_INFO = NCEP_ROOT + "Radar"+File.separator+"radarInfo.txt"; - public static final String MOSAIC_INFO = NCEP_ROOT + "Radar"+File.separator+"mosaicInfo.txt"; +// public static final String MOSAIC_INFO = NCEP_ROOT + "Radar"+File.separator+"mosaicInfo.txt"; public static final String MCIDAS_IMG_STYLE_RULES = STYLE_RULES_DIR + "mcidasSatelliteImageryStyleRules.xml"; public static final String GINI_IMG_STYLE_RULES = STYLE_RULES_DIR + "giniSatelliteImageryStyleRules.xml"; // PGEN Files @@ -257,10 +256,10 @@ public class NcPathManager { return lFileMap; } -// public LocalizationFile[] listFiles( LocalizationContext[] contexts, -// String name, String[] filter, boolean recursive, boolean filesOnly) { -// return pathMngr.listFiles( contexts, /* NcepDir+*/name, filter, recursive, filesOnly ); -// } + // convienence method to get all the versions of a file. Assume CAVE_STATIC. + public Map getTieredLocalizationFile( String name) { + return pathMngr.getTieredLocalizationFile( LocalizationType.CAVE_STATIC, name ); + } public LocalizationContext getContext( LocalizationType type, LocalizationLevel level) { diff --git a/ncep/gov.noaa.nws.ncep.viz.overlays/localization/ncep/resourceTemplates/OverlayGroup.xml b/ncep/gov.noaa.nws.ncep.viz.overlays/localization/ncep/resourceTemplates/OverlayGroup.xml index e4fe4d4f9e..f0a740ab5d 100644 --- a/ncep/gov.noaa.nws.ncep.viz.overlays/localization/ncep/resourceTemplates/OverlayGroup.xml +++ b/ncep/gov.noaa.nws.ncep.viz.overlays/localization/ncep/resourceTemplates/OverlayGroup.xml @@ -19,7 +19,9 @@ mapdata.world
name World + @@ -28,7 +30,7 @@ - + mapdata.states
@@ -56,7 +58,7 @@ - + mapdata.mexico
@@ -68,9 +70,10 @@ PLAN_VIEW + - + mapdata.county
diff --git a/ncep/gov.noaa.nws.ncep.viz.overlays/src/gov/noaa/nws/ncep/viz/overlays/MapOverlayAction.java b/ncep/gov.noaa.nws.ncep.viz.overlays/src/gov/noaa/nws/ncep/viz/overlays/MapOverlayAction.java index ae69432ab4..ec03e51ae7 100644 --- a/ncep/gov.noaa.nws.ncep.viz.overlays/src/gov/noaa/nws/ncep/viz/overlays/MapOverlayAction.java +++ b/ncep/gov.noaa.nws.ncep.viz.overlays/src/gov/noaa/nws/ncep/viz/overlays/MapOverlayAction.java @@ -55,7 +55,7 @@ import com.raytheon.viz.ui.UiPlugin; * 02/18/10 #226 Greg Hull new RscBndleTemplate constructor * 08/11/10 #273 Greg Hull bundleName->overlayName and use ResourceFactory to create * the overlay resource. - * + * 09/12/12 #869 Greg Hull call instantiateResources instead of construct(). * * * @author bhebbard @@ -103,7 +103,7 @@ public class MapOverlayAction extends AbstractHandler implements IElementUpdater ResourceSelection rbt = ResourceFactory.createResource( fullRscName ); ResourcePair rscPair = rbt.getResourcePair(); ResourceProperties props = rscPair.getProperties(); - AbstractVizResource ovrlyRsc = rscPair.getResource(); + AbstractResourceData ovrlyRscData = rscPair.getResourceData(); IDisplayPane[] seldPanes = ((NCMapEditor)editor).getSelectedPanes(); @@ -115,16 +115,11 @@ public class MapOverlayAction extends AbstractHandler implements IElementUpdater for (IDisplayPane pane : seldPanes ) { existingMD = pane.getRenderableDisplay().getDescriptor(); - if(ovrlyRsc == null) { - AbstractResourceData resourceData = rscPair.getResourceData(); - if(resourceData != null) - ovrlyRsc = resourceData.construct( - rscPair.getLoadProperties(), existingMD); - } ResourceList resourceList = existingMD.getResourceList(); - resourceList.add(ovrlyRsc, props); - ovrlyRsc.setDescriptor(existingMD); - ovrlyRsc.init( pane.getTarget() ); + ResourcePair rp = new ResourcePair(); + rp.setResourceData( ovrlyRscData ); + resourceList.add( rp ); + resourceList.instantiateResources( existingMD, true ); } editor.refresh(); diff --git a/ncep/gov.noaa.nws.ncep.viz.overlays/src/gov/noaa/nws/ncep/viz/overlays/resources/LPIResource.java b/ncep/gov.noaa.nws.ncep.viz.overlays/src/gov/noaa/nws/ncep/viz/overlays/resources/LPIResource.java index 4980262582..e3baccc3e2 100644 --- a/ncep/gov.noaa.nws.ncep.viz.overlays/src/gov/noaa/nws/ncep/viz/overlays/resources/LPIResource.java +++ b/ncep/gov.noaa.nws.ncep.viz.overlays/src/gov/noaa/nws/ncep/viz/overlays/resources/LPIResource.java @@ -55,6 +55,7 @@ import com.vividsolutions.jts.geom.Coordinate; * 08/10/2010 273 ghull get overlayData dir from * 07/28/2011 450 ghull NcPathManager * 04/23/2012 #744 sgurung Display Marker Text based on user specified zoom level + * 08/17/12 655 B. Hebbard Added paintProps as parameter to IDisplayable draw * * * @@ -281,7 +282,7 @@ public class LPIResource extends AbstractVizResource elements = df.createDisplayElements(symbolSet, paintProps); for (IDisplayable each : elements) { - each.draw(target); + each.draw(target, paintProps); each.dispose(); } } diff --git a/ncep/gov.noaa.nws.ncep.viz.overlays/src/gov/noaa/nws/ncep/viz/overlays/resources/SPIResource.java b/ncep/gov.noaa.nws.ncep.viz.overlays/src/gov/noaa/nws/ncep/viz/overlays/resources/SPIResource.java index 9d73450c1e..a95154aaef 100644 --- a/ncep/gov.noaa.nws.ncep.viz.overlays/src/gov/noaa/nws/ncep/viz/overlays/resources/SPIResource.java +++ b/ncep/gov.noaa.nws.ncep.viz.overlays/src/gov/noaa/nws/ncep/viz/overlays/resources/SPIResource.java @@ -52,6 +52,7 @@ import gov.noaa.nws.ncep.ui.pgen.elements.SymbolLocationSet; * 8/07/09 Greg Hull rm commented out or unused code * 12/1/2009 ghull to11d6 : Reference ncep data directory * 07/28/2011 450 ghull NcPathManager + * 08/17/12 655 B. Hebbard Added paintProps as parameter to IDisplayable draw * * * @@ -222,7 +223,7 @@ public class SPIResource extends AbstractVizResource elements = df.createDisplayElements(symbolSet, paintProps); for (IDisplayable each : elements) { - each.draw(target); + each.draw(target, paintProps); each.dispose(); } } diff --git a/ncep/gov.noaa.nws.ncep.viz.resourceManager/META-INF/MANIFEST.MF b/ncep/gov.noaa.nws.ncep.viz.resourceManager/META-INF/MANIFEST.MF index 747d9f0ec5..b73e56d173 100644 --- a/ncep/gov.noaa.nws.ncep.viz.resourceManager/META-INF/MANIFEST.MF +++ b/ncep/gov.noaa.nws.ncep.viz.resourceManager/META-INF/MANIFEST.MF @@ -10,6 +10,7 @@ Require-Bundle: org.eclipse.ui, org.eclipse.core.runtime, com.raytheon.viz.core, com.raytheon.viz.ui, + org.geotools, gov.noaa.nws.ncep.viz.common, com.raytheon.viz.alerts, gov.noaa.nws.ncep.viz.overlays;bundle-version="1.0.0", diff --git a/ncep/gov.noaa.nws.ncep.viz.resourceManager/src/gov/noaa/nws/ncep/viz/resourceManager/timeline/TimelineControl.java b/ncep/gov.noaa.nws.ncep.viz.resourceManager/src/gov/noaa/nws/ncep/viz/resourceManager/timeline/TimelineControl.java index 8e3d7c7901..350122df04 100644 --- a/ncep/gov.noaa.nws.ncep.viz.resourceManager/src/gov/noaa/nws/ncep/viz/resourceManager/timeline/TimelineControl.java +++ b/ncep/gov.noaa.nws.ncep.viz.resourceManager/src/gov/noaa/nws/ncep/viz/resourceManager/timeline/TimelineControl.java @@ -85,6 +85,8 @@ import com.raytheon.uf.common.time.DataTime; * 10/04/10 #307 Greg Hull add Manual Timeline selection * 01/27/11 #408 Greg Hull add an avail dom rsc without setting the GUI * 02/11/11 #408 Greg Hull combined with Timeline class (now TimelineControl) + * 06/19/12 #657 Greg Hull removeSpinnerListeners() before setting the + * spinner maxvalues. * * * @@ -164,12 +166,6 @@ public class TimelineControl extends Composite { private Combo refTimeCombo; private Label refTimeLbl; - // this flag is set when setting the gui elements (Spinners) for the numFrames, - // skipValue, and timeRange values. This will trigger the ModifyListener which will - // check this flag before continuing... - // (This may not be needed anymore) - private boolean settingTimelineValuesFlag = false; - private int timeRangeHrs = 0; // private String availFrameIntervalStrings[] = { "Data", @@ -610,42 +606,19 @@ public class TimelineControl extends Composite { timeData = new TimelineData( availTimes ); - // removeSpinnerListeners(); - // settingTimelineValuesFlag = true; + removeSpinnerListeners(); + // these can trigger the modify listeners too... numFramesSpnr.setMaximum( availTimes.size() ); numSkipSpnr.setMaximum( availTimes.size()-1 ); hasDifferentMinutes = checkTimeMinutes( availTimes ); - // setNumberofFrames( timeMatcher.getNumFrames() ); - // setSkipValue( timeMatcher.getSkipValue() ); - // setFrameInterval( frameInt ); - // setTimeRangeHrs( tRange ); - - // settingTimelineValuesFlag = false; - // addSpinnerListeners(); - List seldTimes = toCalendar( timeMatcher.getFrameTimes() ); for( Calendar seldTime : seldTimes ) { timeData.select( seldTime ); } -// if( !timeData.isEmpty() ) { -// -// switch(behavior) { -// case APPEND: -// timeData.appendTimes( numFramesSpnr.getSelection(), numSkipSpnr.getSelection() ); -// break; -// case PREPEND: -// timeData.prependTimes( numFramesSpnr.getSelection(), numSkipSpnr.getSelection() ); -// break; -// } -// } - - removeSpinnerListeners(); - settingTimelineValuesFlag = true; - // if this is a forecast dominant resource, the reference time // is not needed since the cycle time is the reference time. refTimeCombo.setVisible( !timeMatcher.isForecast() ); @@ -659,7 +632,7 @@ public class TimelineControl extends Composite { setTimeRangeHrs( timeMatcher.getTimeRange() ); - settingTimelineValuesFlag = false; + addSpinnerListeners(); @@ -718,10 +691,6 @@ public class TimelineControl extends Composite { numFramesSpnr.addModifyListener(new ModifyListener() { @Override public void modifyText(ModifyEvent e) { - if( settingTimelineValuesFlag ) { - return; - } - Spinner spin = (Spinner)e.widget; timeMatcher.setNumFrames( spin.getSelection() ); @@ -751,9 +720,6 @@ public class TimelineControl extends Composite { numSkipSpnr.addModifyListener( new ModifyListener() { @Override public void modifyText(ModifyEvent e) { - if( settingTimelineValuesFlag ) { - return; - } if( timeData == null || timeData.isEmpty() ) return; @@ -777,10 +743,7 @@ public class TimelineControl extends Composite { timeRangeDaysSpnr.addModifyListener( new ModifyListener() { @Override public void modifyText(ModifyEvent e) { - if( settingTimelineValuesFlag ) { - return; - } - else if( timeRangeHrs == timeRangeDaysSpnr.getSelection()*24 + + if( timeRangeHrs == timeRangeDaysSpnr.getSelection()*24 + timeRangeHrsSpnr.getSelection() ) { return; } @@ -803,10 +766,7 @@ public class TimelineControl extends Composite { timeRangeHrsSpnr.addModifyListener( new ModifyListener() { @Override public void modifyText(ModifyEvent e) { - if( settingTimelineValuesFlag ) { - return; - } - else if( timeRangeHrs == timeRangeDaysSpnr.getSelection()*24 + + if( timeRangeHrs == timeRangeDaysSpnr.getSelection()*24 + timeRangeHrsSpnr.getSelection() ) { return; } diff --git a/ncep/gov.noaa.nws.ncep.viz.resourceManager/src/gov/noaa/nws/ncep/viz/resourceManager/ui/ResourceManagerDialog.java b/ncep/gov.noaa.nws.ncep.viz.resourceManager/src/gov/noaa/nws/ncep/viz/resourceManager/ui/ResourceManagerDialog.java index 31838e22f2..04ec4015e1 100644 --- a/ncep/gov.noaa.nws.ncep.viz.resourceManager/src/gov/noaa/nws/ncep/viz/resourceManager/ui/ResourceManagerDialog.java +++ b/ncep/gov.noaa.nws.ncep.viz.resourceManager/src/gov/noaa/nws/ncep/viz/resourceManager/ui/ResourceManagerDialog.java @@ -2,13 +2,14 @@ package gov.noaa.nws.ncep.viz.resourceManager.ui; import gov.noaa.nws.ncep.viz.resourceManager.ui.createRbd.CreateRbdControl; import gov.noaa.nws.ncep.viz.resourceManager.ui.loadRbd.LoadRbdControl; +import gov.noaa.nws.ncep.viz.resourceManager.ui.manageSpf.ManageSpfControl; import gov.noaa.nws.ncep.viz.resourceManager.ui.manageResources.ManageResourceControl; -import gov.noaa.nws.ncep.viz.resourceManager.ui.spf.ManageMultiSPFControl; import gov.noaa.nws.ncep.viz.resources.manager.RbdBundle; import gov.noaa.nws.ncep.viz.resources.manager.RscBundleDisplayMngr; import gov.noaa.nws.ncep.viz.ui.display.NCMapEditor; import gov.noaa.nws.ncep.viz.ui.display.NmapUiUtils; +import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.swt.SWT; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; @@ -43,6 +44,9 @@ import com.raytheon.viz.ui.perspectives.VizPerspectiveListener; * 02/16/11 #408 Greg Hull Change shell to Modeless and have hotkey * bring to the front. * 11/07/11 Chin Chen fixed a null pointer exception bug + * 06/19/12 #624 Greg Hull clone imported RBD and set size based + * on prev width. + * * * * @author @@ -66,9 +70,9 @@ public class ResourceManagerDialog extends Dialog { protected ManageResourceControl manageRscCntrl = null; - protected ManageMultiSPFControl manageMultiSPFControl; + protected ManageSpfControl manageRbdsCntrl; - private Point prevSize = new Point( 750, 860 ); + private static int prevHeight=0; private Point prevLocation = new Point(0,0); public ResourceManagerDialog(Shell parShell, String title, @@ -110,28 +114,42 @@ public class ResourceManagerDialog extends Dialog { if( currEditor != null ) { RbdBundle rbdBndl = new RbdBundle(); -// rbdBndl.setNcEditor( currEditor ); rbdBndl.initFromEditor(currEditor); + try { + rbdBndl = RbdBundle.clone( rbdBndl ); + rbd_mngr.initFromRbdBundle( rbdBndl ); } + catch ( VizException e ) { + MessageDialog errDlg = new MessageDialog( + shell, "Error", null, + "Error importing Rbd from display "+currEditor.getDisplayName()+".\n" + + e.getMessage(), + MessageDialog.ERROR, new String[]{"OK"}, 0); + errDlg.open(); + + rbd_mngr.init(); + } + + } createRbdCntrl = new CreateRbdControl( mngrTabFolder, rbd_mngr ); - + + final TabItem manageSPFTabItem = new TabItem( mngrTabFolder, SWT.NONE ); + manageSPFTabItem.setText( " Manage SPFs " ); + + manageRbdsCntrl = new ManageSpfControl( mngrTabFolder ); + final TabItem cnfgTabItem = new TabItem( mngrTabFolder, SWT.NONE ); cnfgTabItem.setText( " Manage Resources " ); manageRscCntrl = new ManageResourceControl( mngrTabFolder ); - final TabItem manageSPFTabItem = new TabItem( mngrTabFolder, SWT.NONE ); - manageSPFTabItem.setText( " Manage SPFs " ); - - manageMultiSPFControl = new ManageMultiSPFControl( mngrTabFolder ); - mngrTabItem.setControl( createRbdCntrl ); loadTabItem.setControl( loadRbdCntrl ); + manageSPFTabItem.setControl( manageRbdsCntrl ); cnfgTabItem.setControl( manageRscCntrl ); - manageSPFTabItem.setControl( manageMultiSPFControl ); Button closeBtn = new Button( shell, SWT.PUSH ); @@ -146,27 +164,27 @@ public class ResourceManagerDialog extends Dialog { } }); - shell.setMinimumSize(600,550); +// shell.setMinimumSize(600,550); mngrTabFolder.layout(); - shell.pack(); +// shell.pack(); - if( mode == null || mode.equals("LOAD") ) { + if( mode == null || mode.equals("LOAD_RBD") ) { mngrTabFolder.setSelection(0); loadRbdCntrl.updateDialog(); } - else if( mode.equals("CREATE") ) { + else if( mode.equals("CREATE_RBD") ) { mngrTabFolder.setSelection(1); createRbdCntrl.updateDialog(); } - else if( mode.equals("MANAGE") ) { + else if( mode.equals("MANAGE_RBDS") ) { mngrTabFolder.setSelection(2); - manageRscCntrl.updateDialog(); + manageRbdsCntrl.updateDialog(); } - else if( mode.equals("MULTI-SPF") ) { + else if( mode.equals("MANAGE_RESOURCES") ) { mngrTabFolder.setSelection(3); -// manageMultiSPFControl.updateDialog(); + manageRscCntrl.updateDialog(); } else { mngrTabFolder.setSelection(0); @@ -183,10 +201,12 @@ public class ResourceManagerDialog extends Dialog { else if( seldTab[0].getControl() instanceof CreateRbdControl ) { ((CreateRbdControl)seldTab[0].getControl()).updateDialog(); } + else if( seldTab[0].getControl() instanceof ManageSpfControl ) { + ((ManageSpfControl)seldTab[0].getControl()).updateDialog(); + } else if( seldTab[0].getControl() instanceof ManageResourceControl ) { ((ManageResourceControl)seldTab[0].getControl()).updateDialog(); } - } }); } @@ -200,18 +220,13 @@ public class ResourceManagerDialog extends Dialog { Shell parent = getParent(); Display display = parent.getDisplay(); - shell.setSize( prevSize ); + shell.setSize( new Point( shell.getSize().x, + ( prevHeight == 0 ? shell.getSize().y : prevHeight )) ); shell.setLocation( prevLocation ); shell.open(); isOpen = true; -// AbstractVizPerspectiveManager pMngr = VizPerspectiveListener.getInstance().getActivePerspectiveManager(); -// -// if( pMngr instanceof NCPerspectiveManager ) { -// -// } - while( !shell.isDisposed() ) { if( !display.readAndDispatch() ) { display.sleep(); @@ -231,6 +246,7 @@ public class ResourceManagerDialog extends Dialog { // if there is a preview editor up then close it if(shell!=null){ if( !shell.isDisposed() ) { + prevHeight = shell.getSize().y; shell.dispose(); } } diff --git a/ncep/gov.noaa.nws.ncep.viz.resourceManager/src/gov/noaa/nws/ncep/viz/resourceManager/ui/createRbd/CreateRbdControl.java b/ncep/gov.noaa.nws.ncep.viz.resourceManager/src/gov/noaa/nws/ncep/viz/resourceManager/ui/createRbd/CreateRbdControl.java index 617315b923..0c65ae1d4f 100644 --- a/ncep/gov.noaa.nws.ncep.viz.resourceManager/src/gov/noaa/nws/ncep/viz/resourceManager/ui/createRbd/CreateRbdControl.java +++ b/ncep/gov.noaa.nws.ncep.viz.resourceManager/src/gov/noaa/nws/ncep/viz/resourceManager/ui/createRbd/CreateRbdControl.java @@ -10,6 +10,7 @@ import gov.noaa.nws.ncep.viz.resourceManager.ui.createRbd.ResourceSelectionContr import gov.noaa.nws.ncep.viz.resources.AbstractNatlCntrsRequestableResourceData; import gov.noaa.nws.ncep.viz.resources.INatlCntrsResourceData; import gov.noaa.nws.ncep.viz.resources.attributes.EditResourceAttrsAction; +import gov.noaa.nws.ncep.viz.resources.manager.PredefinedAreasMngr; import gov.noaa.nws.ncep.viz.resources.manager.RbdBundle; import gov.noaa.nws.ncep.viz.resources.manager.ResourceBndlLoader; import gov.noaa.nws.ncep.viz.resources.manager.ResourceFactory; @@ -109,6 +110,15 @@ import com.raytheon.viz.ui.UiPlugin; * 05/17/2012 #791 Quan Zhou Added getDefaultRbdRsc() to get name and rsc from original defaultRbd.xml * Modified LoadRBD to check if default editor is empty, then replace it. * findCloseEmptyEdotor() is ready but not used now. + * 06/18/2012 #624 Greg Hull set size correctly when initially importing mult-pane + * 06/18/2012 #713 Greg Hull clone the RbdBundl when importing + * 06/20/2012 #647 Greg Hull dont call selectDominantResource() after importRbd. + * 06/20/2012 S. Gurung Fix for TTR# 539 (Auto-update checkbox gets reset to OFF) + * 06/21/2012 #646 Greg Hull import full PredefinedArea instead of just the name. + * 06/28/2012 #824 Greg Hull update the importRbdCombo in the ActivateListener. + * 08/01/2012 #836 Greg Hull check for paneLayout when using empty editor + * 08/02/2012 #568 Greg Hull Clear Rbd -> Reset Rbd. get the Default RBD + * * * * @author ghull @@ -148,8 +158,6 @@ public class CreateRbdControl extends Composite { private Button custom_area_btn = null; private Group pane_layout_grp = null; - private Spinner num_rows_spnr = null; - private Spinner num_cols_spnr = null; private final int maxPaneRows = 6; private final int maxPaneCols = 6; @@ -181,8 +189,6 @@ public class CreateRbdControl extends Composite { private final String ImportFromSPF = "From SPF..."; - private boolean initialized = false; - private static List defaultRscList = new ArrayList(); private static boolean emptyEditorRemoved = false; @@ -200,7 +206,7 @@ public class CreateRbdControl extends Composite { Composite top_comp = this; top_comp.setLayout( new GridLayout(1,true) ); - top_comp.setSize( 400, 400 ); +// top_comp.setSize( 400, 400 ); sash_form = new SashForm( top_comp, SWT.VERTICAL ); GridData gd = new GridData(); @@ -274,11 +280,11 @@ public class CreateRbdControl extends Composite { loadSaveComp.setLayout( new FormLayout() ); clear_rbd_btn = new Button( loadSaveComp, SWT.PUSH ); - clear_rbd_btn.setText(" Clear RBD "); + clear_rbd_btn.setText(" Reset To Default "); FormData fd = new FormData(); - fd.width = 100; + fd.width = 130; fd.top = new FormAttachment( 0, 7 ); - fd.left = new FormAttachment( 17, -50 ); + fd.left = new FormAttachment( 17, -65 ); clear_rbd_btn.setLayoutData( fd ); save_rbd_btn = new Button( loadSaveComp, SWT.PUSH ); @@ -594,7 +600,7 @@ public class CreateRbdControl extends Composite { pane_layout_grp.setLayoutData( fd ); Composite num_rows_cols_comp = new Composite( pane_layout_grp, SWT.NONE ); - GridLayout gl = new GridLayout(maxPaneCols+1, false); + GridLayout gl = new GridLayout(maxPaneCols, false); // gl.horizontalSpacing = 4; num_rows_cols_comp.setLayout( gl ); @@ -615,33 +621,19 @@ public class CreateRbdControl extends Composite { num_rows_btns[r].setData( new Integer(r+1)); num_rows_btns[r].addSelectionListener( new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { - num_rows_spnr.setSelection( (Integer)e.widget.getData() ); - //updatePaneLayout(); // this will trigger the modifyListener on the spnr + selectPane( + rbdMngr.setPaneLayout( + new PaneLayout( (Integer)e.widget.getData(), + rbdMngr.getPaneLayout().getColumns() ) ) ); + updatePaneLayout(); } }); } - num_rows_spnr = new Spinner( num_rows_cols_comp, SWT.BORDER ); GridData gd = new GridData(); gd.widthHint = 50; gd.grabExcessHorizontalSpace = true; - num_rows_spnr.setDigits( 0 ); - num_rows_spnr.setMinimum( 1 ); - num_rows_spnr.setMaximum( maxPaneRows ); - num_rows_spnr.setIncrement(1); - num_rows_spnr.setSelection( 2 ); - - // THE SPINNERS ARE NOT NECESSARY - num_rows_spnr.setVisible(false); - - num_rows_spnr.addModifyListener(new ModifyListener() { - @Override - public void modifyText(ModifyEvent e) { - updatePaneLayout(); - } - }); - for( int c=0 ; c= rowCnt || - selPane.getColumn() >= colCnt ) { - //rbdMngr.setSelectedPaneId( new PaneID(1,1) ); - selectPane( new PaneID(0,0) ); - pane_sel_btns[0][0].setSelection( true ); - } - rbdMngr.setPaneLayout( new PaneLayout( rowCnt, colCnt ) ); + int colCnt = rbdMngr.getPaneLayout().getColumns(); + int rowCnt = rbdMngr.getPaneLayout().getRows(); for( int r=0 ; r - * SOFTWARE HISTORY - * Date Ticket# Engineer Description - * ------------ ---------- ----------- -------------------------- - * 07/17/09 #139 Greg Hull Initial Creation. - * 09/22/09 #169 Greg Hull Handle Display Panes - * 11/11/09 #180 Greg Hull Select from SPF - * 02/04/10 #226 Greg Hull Import RBDs or single Panes - * 08/04/11 #450 Greg Hull SpfsManager - * - * - * - * @author ghull - * @version 1 - */ - -public class ImportRbdDialog extends Dialog { - - private Shell shell; - private String dlgTitle = null; - - private Boolean oked = new Boolean(false); - - // if true then just allow the user to select one pane from - // one display and if false then the user will select displays - private boolean importSinglePane = false; - - private Combo spf_group_combo = null; - private ListViewer spf_name_lviewer = null; - private ListViewer rbd_lviewer = null; - private ListViewer rsc_lviewer = null; - - private Combo pane_combo = null; - private Label pane_lbl = null; - - private Button ok_btn = null; - - private RbdBundle currRbdSel = null; - - // might be nice one day to save the group and spf name - // so that we can init the SaveRBD dialog with these values?? - private String seldSpfGroup = null; - private String seldSpfName = null; - private String seldRbdName = null; - private PaneID seldPaneId = new PaneID(0,0); - // private PaneID seldPaneID = null; - - public ImportRbdDialog( Shell parShell, boolean singlePane ) { - super(parShell); - importSinglePane = singlePane; - dlgTitle = (importSinglePane ? "Import Pane" : "Import Display" ); - - // seldRbdBndls = new ArrayList(); - } - - public Object open( ) { - Shell parent = getParent(); - Display display = parent.getDisplay(); - - shell = new Shell( parent, SWT.DIALOG_TRIM | SWT.RESIZE | SWT.MODELESS ); - shell.setText(dlgTitle); - shell.setSize( 540, 500 ); // pack later - - GridLayout mainLayout = new GridLayout(1, true); - mainLayout.marginHeight = 1; - mainLayout.marginWidth = 1; - - shell.setLayout(mainLayout); - - createDialog( shell ); - - initWidgets(); - - shell.setLocation( parent.getLocation().x+100, parent.getLocation().y+100); - shell.setMinimumSize(400, 300); - - shell.pack(); - shell.open(); - - while( !shell.isDisposed() ) { - if( !display.readAndDispatch() ) { - display.sleep(); - } - } -// if( oked ) { // -// if( currRbdSel != null ) { -// currRbdSel.resolveLatestCycleTimes(); -// } -// } - return (oked ? currRbdSel : null ); - } - - public void createDialog( Composite parent ) { - Composite top_form = parent; - top_form.setLayout( new FormLayout() ); - - FormData fd = new FormData( ); - - Composite sel_rbds_grp = new Composite( top_form, SWT.NONE ); - sel_rbds_grp.setLayout( new FormLayout() ); - - fd = new FormData(650,400); - fd.top = new FormAttachment( 0, 5 ); - fd.left = new FormAttachment( 0, 5 ); - fd.right = new FormAttachment( 100, -5 ); - fd.bottom = new FormAttachment( 100, -50 ); - sel_rbds_grp.setLayoutData( fd ); - - spf_group_combo = new Combo( sel_rbds_grp, SWT.DROP_DOWN | SWT.READ_ONLY ); - fd = new FormData(); - fd.top = new FormAttachment( 0, 35 ); - fd.left = new FormAttachment( 0, 20 ); - fd.right = new FormAttachment( 25, -20 ); - spf_group_combo.setLayoutData( fd ); - - Label spf_grp_lbl = new Label( sel_rbds_grp, SWT.NONE); - spf_grp_lbl.setText("SPF Group"); - fd = new FormData(); - fd.bottom = new FormAttachment( spf_group_combo, -3, SWT.TOP ); - fd.left = new FormAttachment( spf_group_combo, 0, SWT.LEFT ); - spf_grp_lbl.setLayoutData( fd ); - - spf_name_lviewer = new ListViewer(sel_rbds_grp, SWT.SINGLE | SWT.BORDER | - SWT.V_SCROLL|SWT.H_SCROLL); - fd = new FormData(); - fd.top = new FormAttachment( spf_group_combo, 40, SWT.BOTTOM ); - fd.left = new FormAttachment( 0, 10 ); - fd.right = new FormAttachment( 25, 0 ); - fd.bottom = new FormAttachment( 100, -20 ); - - spf_name_lviewer.getList().setLayoutData( fd ); - - Label spf_name_lbl = new Label(sel_rbds_grp, SWT.NONE); - spf_name_lbl.setText("SPF Name"); - fd = new FormData(); - fd.bottom = new FormAttachment( spf_name_lviewer.getList(), -3, SWT.TOP ); - fd.left = new FormAttachment( spf_name_lviewer.getList(), 0, SWT.LEFT ); - spf_name_lbl.setLayoutData( fd ); - - rbd_lviewer = new ListViewer(sel_rbds_grp, - SWT.SINGLE | SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL ); - fd = new FormData(); - fd.top = new FormAttachment( spf_group_combo, 0, SWT.TOP ); - fd.left = new FormAttachment( spf_name_lviewer.getList(), 15, SWT.RIGHT ); - fd.bottom = new FormAttachment( spf_name_lviewer.getList(), 0, SWT.BOTTOM ); - fd.right = new FormAttachment( 55, 0 ); - rbd_lviewer.getList().setLayoutData( fd ); - - Label rbd_lbl = new Label( sel_rbds_grp, SWT.NONE); - rbd_lbl.setText("RBDs"); - fd = new FormData(); - fd.bottom = new FormAttachment( rbd_lviewer.getList(), -3, SWT.TOP ); - fd.left = new FormAttachment( rbd_lviewer.getList(), 0, SWT.LEFT ); - rbd_lbl.setLayoutData( fd ); - - pane_combo = new Combo( sel_rbds_grp, SWT.DROP_DOWN | SWT.READ_ONLY ); - fd = new FormData(); - fd.width = 60; - fd.top = new FormAttachment( rbd_lviewer.getList(), 0, SWT.TOP ); - fd.left = new FormAttachment( rbd_lviewer.getList(), 70, SWT.RIGHT ); - pane_combo.setLayoutData( fd ); - - pane_lbl = new Label( sel_rbds_grp, SWT.NONE); - pane_lbl.setText("Pane Number"); - fd = new FormData(); - fd.bottom = new FormAttachment( pane_combo, -3, SWT.TOP ); - fd.left = new FormAttachment( pane_combo, 0, SWT.LEFT ); - pane_lbl.setLayoutData( fd ); - - // if importing just a single pane then we need to be able to select - // which pane from the RBD we want, so enable the pane_combo - // - pane_combo.setVisible( importSinglePane ); - pane_lbl.setVisible( importSinglePane ); - - rsc_lviewer = new ListViewer(sel_rbds_grp, SWT.SINGLE | SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL ); - - fd = new FormData(); - if( importSinglePane ) { - fd.top = new FormAttachment( pane_combo, 40, SWT.BOTTOM ); - fd.left = new FormAttachment( rbd_lviewer.getList(), 15, SWT.RIGHT ); - fd.bottom = new FormAttachment( rbd_lviewer.getList(), 0, SWT.BOTTOM ); - fd.right = new FormAttachment( 100, -10 ); - } - else { - fd.top = new FormAttachment( rbd_lviewer.getList(), 0, SWT.TOP ); - fd.left = new FormAttachment( rbd_lviewer.getList(), 15, SWT.RIGHT ); - fd.right = new FormAttachment( 100, -10 ); - fd.bottom = new FormAttachment( rbd_lviewer.getList(), 0, SWT.BOTTOM ); - } - rsc_lviewer.getList().setLayoutData( fd ); - - // do this as an indication that the list is view-only - rsc_lviewer.getList().setBackground( sel_rbds_grp.getBackground() ); - - Label rsc_lbl = new Label( sel_rbds_grp, SWT.NONE); - rsc_lbl.setText("Resources && Overlays"); - fd = new FormData(); - fd.bottom = new FormAttachment( rsc_lviewer.getList(), -3, SWT.TOP ); - fd.left = new FormAttachment( rsc_lviewer.getList(), 0, SWT.LEFT ); - rsc_lbl.setLayoutData( fd ); - - Label sep = new Label( sel_rbds_grp, SWT.SEPARATOR | SWT.HORIZONTAL ); - fd = new FormData(); - fd.top = new FormAttachment( spf_name_lviewer.getList(), 15, SWT.BOTTOM ); - fd.left = new FormAttachment( 0, 5 ); - fd.right = new FormAttachment( 100, -5 ); - - sep.setLayoutData( fd ); - - - Button can_btn = new Button( top_form, SWT.PUSH ); - fd = new FormData(); - fd.width = 80; - can_btn.setText(" Cancel "); - fd.bottom = new FormAttachment( 100, -10 ); - fd.right = new FormAttachment( 100, -20 ); - can_btn.setLayoutData( fd ); - - can_btn.addSelectionListener(new SelectionAdapter() { - public void widgetSelected( SelectionEvent ev ) { - currRbdSel = null; - shell.dispose(); - } - }); - - ok_btn = new Button( top_form, SWT.PUSH ); - fd = new FormData(); - fd.width = 80; - ok_btn.setText(" OK "); - fd.bottom = new FormAttachment( 100, -10 ); - fd.right = new FormAttachment( can_btn, -20, SWT.LEFT ); - ok_btn.setLayoutData( fd ); - - ok_btn.addSelectionListener(new SelectionAdapter() { - public void widgetSelected( SelectionEvent ev ) { - ok(); - } - }); - } - - private void initWidgets() { - spf_group_combo.addSelectionListener(new SelectionAdapter() { - public void widgetSelected(SelectionEvent e) { - setSeldSpfGroup(); - } - }); - - spf_name_lviewer.setContentProvider(new IStructuredContentProvider() { - @Override - public Object[] getElements(Object inputElement) { - - return SpfsManager.getInstance().getSpfNamesForGroup( (String)inputElement ); - } - @Override - public void dispose() { } - - @Override - public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { - } - }); - - spf_name_lviewer.addSelectionChangedListener(new ISelectionChangedListener() { - public void selectionChanged( SelectionChangedEvent event ) { - setSeldSpfName(); - } - }); - - // - rbd_lviewer.setContentProvider( new IStructuredContentProvider() { - @Override - public Object[] getElements(Object inputElement) { - ArrayList rbdBndls = (ArrayList)inputElement; - return rbdBndls.toArray(); - } - @Override - public void dispose() { } - - @Override - public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { - } - }); - - rbd_lviewer.setLabelProvider( new LabelProvider() { - public String getText( Object element ) { - if( element instanceof RbdBundle ) { - return ((RbdBundle)element).getRbdName(); - } - else return "Error: bad RBD element"; - } - }); - - rbd_lviewer.addSelectionChangedListener(new ISelectionChangedListener() { - public void selectionChanged(SelectionChangedEvent event) { - setSelectedRBDs(); - } - }); - - rbd_lviewer.getList().addListener( SWT.MouseDoubleClick, new Listener() { - public void handleEvent(Event event) { - setSelectedRBDs(); - ok(); - } - }); - - pane_combo.addSelectionListener( new SelectionAdapter() { - public void widgetSelected(SelectionEvent e) { - seldPaneId = PaneID.parsePaneId( pane_combo.getText() ); - - if( currRbdSel != null ) { - currRbdSel.setSelectedPaneId( seldPaneId ); - } - rsc_lviewer.setInput( currRbdSel ); - } - }); - - rsc_lviewer.setContentProvider( new IStructuredContentProvider() { - @Override - public Object[] getElements(Object inputElement) { - RbdBundle selRbd = (RbdBundle)inputElement; - if( selRbd == null ) { - return new String[0]; - } - - ArrayList rscNames = new ArrayList(); - boolean isMultiPane = (selRbd.getPaneLayout().getNumberOfPanes() > 1 ); - - // loop thru all of the resources in all of the panes and create the - // list of items for the viewer. These will depend on whether we are - // importing a single pane (in which case only the selected pane's - // resources are displayed) and whole RBDs (in which case all pane's - // resources are displayed) For multi-pane RBDs the format will include - // the name of the pane. - for( int r=0 ; r rbdBndls; - - try { - rbdBndls = SpfsManager.getInstance().getRbdsFromSpf( - seldSpfGroup, seldSpfName, - false ); // don't resolve Latest Cycle Times - - rbd_lviewer.setInput( rbdBndls ); - rbd_lviewer.refresh(); - - rbd_lviewer.getList().select(0); - - setSelectedRBDs(); - - } catch (VizException e) { - } - } - - private void setSelectedRBDs() { - StructuredSelection sel_rbds = (StructuredSelection)rbd_lviewer.getSelection(); - if( sel_rbds.isEmpty() ) { - currRbdSel = null; - seldRbdName = null; - - pane_combo.add("N/A"); - pane_combo.select(0); - seldPaneId = new PaneID(0,0); - pane_combo.setEnabled(false); - pane_lbl.setEnabled(false); - rsc_lviewer.setInput( null ); - rsc_lviewer.refresh(); - } - else { - currRbdSel = (RbdBundle) sel_rbds.getFirstElement(); - - seldPaneId = new PaneID(0,0); - currRbdSel.setSelectedPaneId( seldPaneId ); - seldRbdName = currRbdSel.getRbdName(); - - // set the pane combo items and preselect - //AbstractRenderableDisplay panes[] = currRbdSel.getDisplays(); - -// int paneCount = panes.length; - pane_combo.removeAll(); - - for( int r=0 ; r1 ); - pane_lbl.setEnabled( pane_combo.getItemCount()>1 ); - - rsc_lviewer.setInput( currRbdSel ); - } - - ok_btn.setEnabled( currRbdSel != null ); - } - - public boolean isOpen() { - return shell != null && !shell.isDisposed(); - } - - private void ok() { - oked = true; - shell.dispose(); - } - -} - diff --git a/ncep/gov.noaa.nws.ncep.viz.resourceManager/src/gov/noaa/nws/ncep/viz/resourceManager/ui/createRbd/ResourceSelectionControl.java b/ncep/gov.noaa.nws.ncep.viz.resourceManager/src/gov/noaa/nws/ncep/viz/resourceManager/ui/createRbd/ResourceSelectionControl.java index 67d40c29ee..7ccf2263ae 100644 --- a/ncep/gov.noaa.nws.ncep.viz.resourceManager/src/gov/noaa/nws/ncep/viz/resourceManager/ui/createRbd/ResourceSelectionControl.java +++ b/ncep/gov.noaa.nws.ncep.viz.resourceManager/src/gov/noaa/nws/ncep/viz/resourceManager/ui/createRbd/ResourceSelectionControl.java @@ -1,6 +1,7 @@ package gov.noaa.nws.ncep.viz.resourceManager.ui.createRbd; import static java.lang.System.out; +import gov.noaa.nws.ncep.viz.common.preferences.NcepGeneralPreferencesPage; import gov.noaa.nws.ncep.viz.common.ui.NmapCommon; import gov.noaa.nws.ncep.viz.gempak.util.GempakGrid; import gov.noaa.nws.ncep.viz.resources.manager.ResourceDefinition; @@ -11,6 +12,7 @@ import gov.noaa.nws.ncep.viz.ui.display.NmapUiUtils; import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; +import java.util.Iterator; import java.util.List; import java.util.Set; @@ -70,6 +72,8 @@ import com.raytheon.uf.viz.core.exception.VizException; * 04/08/2012 #606 Greg Hull Don't allow selection for data that is not available * 04/25/2012 #606 Greg Hull allow disabling the inventory, add Check Availability button * 06/06/2012 #816 Greg Hull Alphabetize lists. Change content of listViewer to ResourceDefinitions + * 08/26/2012 # Greg Hull allow for disabling resources + * 08/29/2012 #860 Greg Hull show latest time with attr sets * * * @@ -99,8 +103,6 @@ public class ResourceSelectionControl extends Composite { private Composite sel_rsc_comp = null; - private Button checkAvailBtn = null; - private Text seldRscNameTxt = null; private Label availDataTimeLbl = null; private Label cycleTimeLbl = null; @@ -127,6 +129,9 @@ public class ResourceSelectionControl extends Composite { private final static int rscListViewerHeight = 220; + private Boolean showLatestTimes = false; + private Integer maxLengthOfSelectableAttrSets = 0; // used in justifying the times in the attrSetsList + public interface IResourceSelectedListener { public void resourceSelected( ResourceName rscName, boolean replace, boolean addAllPanes, boolean done ); } @@ -140,6 +145,8 @@ public class ResourceSelectionControl extends Composite { Boolean multiPane ) throws VizException { super(parent, SWT.SHADOW_NONE ); + showLatestTimes = NmapCommon.getNcepPreferenceStore().getBoolean( NcepGeneralPreferencesPage.ShowLatestResourceTimes ); + rscDefnsMngr = ResourceDefnsMngr.getInstance(); replaceBtnVisible =replaceVisible; @@ -188,7 +195,7 @@ public class ResourceSelectionControl extends Composite { rscCatLViewer = new ListViewer( sel_rsc_comp, SWT.SINGLE | SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL ); - FormData fd = new FormData(100, rscListViewerHeight); + FormData fd = new FormData(80, rscListViewerHeight); fd.top = new FormAttachment( 0, 75 ); fd.left = new FormAttachment( 0, 10 ); @@ -254,7 +261,7 @@ public class ResourceSelectionControl extends Composite { rscAttrSetLViewer = new ListViewer( sel_rsc_comp, SWT.SINGLE | SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL ); - fd = new FormData(220,rscListViewerHeight); + fd = new FormData(260,rscListViewerHeight); fd.top = new FormAttachment( rscGroupLViewer.getList(), 0, SWT.TOP ); fd.left = new FormAttachment( rscGroupLViewer.getList(), 10, SWT.RIGHT ); fd.right = new FormAttachment( 100, -10 ); @@ -356,7 +363,7 @@ public class ResourceSelectionControl extends Composite { @Override public Object[] getElements(Object inputElement) { - return rscDefnsMngr.getResourceCategories(); + return rscDefnsMngr.getResourceCategories( false ); // don't show disabled dfns } @Override @@ -368,28 +375,17 @@ public class ResourceSelectionControl extends Composite { // order the Categories according to the -// rscCatLViewer.setComparator( new ViewerComparator() { -// @Override -// public int compare(Viewer viewer, Object e1, Object e2) { -// getAvailResourceCategories -// if( ((String)e1).equals("") ) { -// return -1; -// } -// else { -// return super.compare(viewer, e1, e2); -// } -// } -// }); - - rscTypeLViewer.setContentProvider( new IStructuredContentProvider() { @Override public Object[] getElements(Object inputElement) { //String rscCat = (String)inputElement; if( !seldResourceName.getRscCategory().isEmpty() ) { try { - List rscTypes = rscDefnsMngr.getResourceDefnsForCategory( - seldResourceName.getRscCategory(), seldFilterStr, true ); + List rscTypes = + rscDefnsMngr.getResourceDefnsForCategory( + seldResourceName.getRscCategory(), seldFilterStr, + true, // include generated types + false ); // only include enabled types return rscTypes.toArray(); } @@ -504,10 +500,20 @@ public class ResourceSelectionControl extends Composite { // if an attrSetGroup is selected, return the attrSets in the group if( !seldResourceName.getRscType().isEmpty() ) { - return rscDefnsMngr.getAttrSetsForResource( seldResourceName, + String[] attrSets = rscDefnsMngr.getAttrSetsForResource( seldResourceName, true ); + + maxLengthOfSelectableAttrSets = 0; + + for( String as : attrSets ) { + if( as != null && as.length() > maxLengthOfSelectableAttrSets ) { + maxLengthOfSelectableAttrSets = as.length(); } -// } + } + + return attrSets; + } + return new String[]{}; } @Override @@ -529,7 +535,8 @@ public class ResourceSelectionControl extends Composite { return 1; } else { - return super.compare(viewer, e1, e2); + // super calls getText which can trigger a bunch of inventory queries in some cases + return ((String)e1).compareTo( (String)e2 ); //super.compare(viewer, e1, e2); } } }); @@ -537,15 +544,81 @@ public class ResourceSelectionControl extends Composite { rscAttrSetLViewer.setLabelProvider( new LabelProvider() { public String getText( Object element ) { String attrSetName = (String)element; + if( attrSetName.endsWith(".attr") ) { - return attrSetName.substring(0, attrSetName.length()-5); + attrSetName = attrSetName.substring(0, attrSetName.length()-5); } - else { + + ResourceName rscName = new ResourceName( seldResourceName ); + rscName.setRscAttrSetName( attrSetName ); + + ResourceDefinition rscDefn = rscDefnsMngr.getResourceDefinition( + rscName.getRscType() ); + + // + if( !showLatestTimes || rscDefn.isForecast() ) { return attrSetName; } + + while( attrSetName.length() < maxLengthOfSelectableAttrSets ) { + attrSetName = attrSetName + " "; + } + + // If we aren't using the inventory then the query is too slow for the gui. + // TODO : If the inventory doesn't pan out then we could either + // implement this in another thread and accept the delay or add a + // 'Check Availability' button. + + if( rscName.isValid() && rscDefn != null && + rscDefn.usesInventory() && + rscDefn.getInventoryEnabled() ) { + + try { + // this call will query just for the inventory params needed to instantiate the resource + // (ie imageType, productCode...) and not the actual dataTimes. + // rscDefnsMngr.verifyParametersExist( rscName ); +// if( rscDefn.isForecast() ) { +// List availableTimes = rscDefn.getDataTimes( rscName ); +// if( availableTimes.isEmpty() ) { +// attrSetName = attrSetName + " (No Data)"; +// } +// else { +// DataTime dt = availableTimes.get( availableTimes.size()-1 ); +// DataTime refTime = new DataTime( dt.getRefTime() ); +// String latestTime =NmapCommon.getTimeStringFromDataTime( dt, "_" ); +// +// attrSetName = attrSetName + " ("+latestTime+")"; +// } + DataTime latestTime = rscDefn.getLatestDataTime( rscName ); + + if( latestTime.isNull() ) { + attrSetName = attrSetName + " (No Data)"; + } + else { + DataTime refTime = new DataTime( latestTime.getRefTime() ); + String latestTimeStr = NmapCommon.getTimeStringFromDataTime( latestTime, "_" ); + + attrSetName = attrSetName + " ("+latestTimeStr+")"; + } +// } +// else { +// +// DataTime latestTime = rscDefn.getLatestDataTime( rscName ); +// +// if( latestTime == null ) { +// attrSetName = attrSetName + " (No Data)"; +// } +// else { +// attrSetName = attrSetName + " ("+NmapCommon.getTimeStringFromDataTime( latestTime, "_" )+")"; +// } +// } + } catch ( VizException vizex ) { + out.println( vizex.getMessage() ); + } + } + return attrSetName; } }); - } // add all of the listeners for widgets on this dialog @@ -870,7 +943,7 @@ public class ResourceSelectionControl extends Composite { private void updateResourceAttrSets() { rscAttrSetLViewer.setInput( rscDefnsMngr ); - rscAttrSetLViewer.refresh(); +// rscAttrSetLViewer.refresh(); rscAttrSetLViewer.getList().deselectAll(); @@ -911,7 +984,7 @@ public class ResourceSelectionControl extends Composite { // public void updateSelectedResource( ) { - String availMsg = ""; + String availMsg = "Data Not Available"; // enable/disable the Add Resource Button // and set the name of the Resource @@ -922,7 +995,6 @@ public class ResourceSelectionControl extends Composite { if( !seldResourceName.isValid() || rscDefn == null ) { enableSelections = false; - availMsg = "Data Not Available"; } // @@ -935,35 +1007,30 @@ public class ResourceSelectionControl extends Composite { if( rscDefn.isForecast() ) { if( cycleTimes.isEmpty() ) { - availMsg = "Data Not Available"; enableSelections = false; } } - else if( rscDefn.isRequestable() ) { + else if( !rscDefn.isRequestable() ) { + availMsg = ""; + } + else { // If we aren't using the inventory then the query is too slow for the gui. // TODO : If the inventory doesn't pan out then we could either // implement this in another thread and accept the delay or add a // 'Check Availability' button. - if( rscDefn.getInventoryEnabled() ) { DataTime latestTime = rscDefn.getLatestDataTime( seldResourceName ); - if( latestTime == null ) { - availMsg = "Data Not Available"; + if( latestTime.isNull() ) { enableSelections = false; } else { availMsg = "Latest Data: "+ NmapCommon.getTimeStringFromDataTime( latestTime, "/" ); } } - else { - availMsg = ""; - enableSelections = true; - } - } } catch ( VizException vizex ) { out.println( vizex.getMessage() ); - availMsg = "Error getting data times"; + availMsg = "Error getting latest time."; enableSelections = false; } } diff --git a/ncep/gov.noaa.nws.ncep.viz.resourceManager/src/gov/noaa/nws/ncep/viz/resourceManager/ui/createRbd/ResourceSelectionDialog.java b/ncep/gov.noaa.nws.ncep.viz.resourceManager/src/gov/noaa/nws/ncep/viz/resourceManager/ui/createRbd/ResourceSelectionDialog.java index 333f9edfa8..e62d98b560 100644 --- a/ncep/gov.noaa.nws.ncep.viz.resourceManager/src/gov/noaa/nws/ncep/viz/resourceManager/ui/createRbd/ResourceSelectionDialog.java +++ b/ncep/gov.noaa.nws.ncep.viz.resourceManager/src/gov/noaa/nws/ncep/viz/resourceManager/ui/createRbd/ResourceSelectionDialog.java @@ -77,7 +77,7 @@ public class ResourceSelectionDialog extends Dialog { shell = new Shell( parent, style ); shell.setText( title ); - shell.setSize( 540, 520 ); // pack later + shell.setSize( 600, 520 ); // pack later GridLayout mainLayout = new GridLayout(1, true); mainLayout.marginHeight = 1; diff --git a/ncep/gov.noaa.nws.ncep.viz.resourceManager/src/gov/noaa/nws/ncep/viz/resourceManager/ui/createRbd/SelectRbdsDialog.java b/ncep/gov.noaa.nws.ncep.viz.resourceManager/src/gov/noaa/nws/ncep/viz/resourceManager/ui/createRbd/SelectRbdsDialog.java new file mode 100644 index 0000000000..bcf56aa429 --- /dev/null +++ b/ncep/gov.noaa.nws.ncep.viz.resourceManager/src/gov/noaa/nws/ncep/viz/resourceManager/ui/createRbd/SelectRbdsDialog.java @@ -0,0 +1,673 @@ +package gov.noaa.nws.ncep.viz.resourceManager.ui.createRbd; + +import gov.noaa.nws.ncep.viz.common.ui.NmapCommon; +import gov.noaa.nws.ncep.viz.resourceManager.ui.loadRbd.RbdViewComposite; +import gov.noaa.nws.ncep.viz.resources.INatlCntrsResourceData; +import gov.noaa.nws.ncep.viz.resources.manager.SpfsManager; +import gov.noaa.nws.ncep.viz.resources.manager.RbdBundle; +import gov.noaa.nws.ncep.viz.ui.display.NCMapEditor; +import gov.noaa.nws.ncep.viz.ui.display.NCMapRenderableDisplay; +import gov.noaa.nws.ncep.viz.ui.display.NmapUiUtils; +import gov.noaa.nws.ncep.viz.ui.display.PaneID; + +import java.io.File; +import java.io.FileFilter; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Iterator; +import java.util.List; +import java.util.Vector; + +import org.eclipse.jface.dialogs.MessageDialog; +import org.eclipse.jface.viewers.DoubleClickEvent; +import org.eclipse.jface.viewers.IDoubleClickListener; +import org.eclipse.jface.viewers.ISelectionChangedListener; +import org.eclipse.jface.viewers.IStructuredContentProvider; +import org.eclipse.jface.viewers.LabelProvider; +import org.eclipse.jface.viewers.ListViewer; +import org.eclipse.jface.viewers.SelectionChangedEvent; +import org.eclipse.jface.viewers.StructuredSelection; +import org.eclipse.jface.viewers.Viewer; +import org.eclipse.swt.SWT; +import org.eclipse.swt.events.SelectionAdapter; +import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.layout.FormAttachment; +import org.eclipse.swt.layout.FormData; +import org.eclipse.swt.layout.FormLayout; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Button; +import org.eclipse.swt.widgets.Combo; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Dialog; +import org.eclipse.swt.widgets.Display; +import org.eclipse.swt.widgets.Event; +import org.eclipse.swt.widgets.Group; +import org.eclipse.swt.widgets.Label; +import org.eclipse.swt.widgets.Listener; +import org.eclipse.swt.widgets.Shell; + +import com.raytheon.uf.common.serialization.SerializationException; +import com.raytheon.uf.common.serialization.SerializationUtil; +import com.raytheon.uf.viz.core.drawables.AbstractDescriptor; +import com.raytheon.uf.viz.core.drawables.ResourcePair; +import com.raytheon.uf.viz.core.exception.VizException; + + +/** + * Dialog displayed from RBD Mngr window when the 'Import RBD...' is selected. This lets the user + * choose which RBD or which active editor to modify. + * + *
+ * SOFTWARE HISTORY
+ * Date         Ticket#     Engineer    Description
+ * ------------ ----------  ----------- --------------------------
+ * 07/17/09      #139       Greg Hull    Initial Creation.
+ * 09/22/09      #169       Greg Hull    Handle Display Panes
+ * 11/11/09      #180       Greg Hull    Select from SPF
+ * 02/04/10      #226       Greg Hull    Import RBDs or single Panes  
+ * 08/04/11      #450       Greg Hull    SpfsManager
+ * 07/19/2012    #568       Greg Hull    Use new RbdViewComposite
+ * 07/21/2012    #568       Greg Hull    Changed name to SelectRbdsDialog and allowed
+ *                                       multi-select and select from Displays
+ * 
+ * 
+ * + * @author ghull + * @version 1 + */ + +public class SelectRbdsDialog extends Dialog { + + private Shell shell; + private String dlgTitle = null; + + private Boolean oked = new Boolean(false); + + // if this is true then the user will have the option + // of selecting RBDs from Displays + private boolean selectFromDisplays = false; + + // if true then the user may select more than one RBD + // + private boolean multiSelectEnabled = false; + + // if true then just allow the user to select one pane from + // one display and if false then the user will select displays + private boolean importSinglePane = false; + + // the select Rbds section + private Group selFromGrp = null; + private Button selFromSpfsBtn = null; + private Button selFromDisplaysBtn = null; + private Label spf_grp_lbl = null; + private Label spf_name_lbl = null; + + private Combo spfGroupCombo = null; + private Combo spfNameCombo = null; + private ListViewer rbdLviewer = null; + private RbdViewComposite rscViewer = null; + + private Button selectAllBtn = null; + + private Combo pane_combo = null; + private Label pane_lbl = null; + + private Button ok_btn = null; + + private ArrayList seldRbdsList = null; + + // might be nice one day to save the group and spf name + // so that we can init the SaveRBD dialog with these values?? + private String seldSpfGroup = null; + private String seldSpfName = null; + + public SelectRbdsDialog( Shell parShell, String titleStr, + boolean selDisplays, boolean multiSel, boolean singlePane ) { + super(parShell); + + dlgTitle = titleStr;//(importSinglePane ? "Import Pane" : "Import Display" ); + selectFromDisplays = selDisplays; + multiSelectEnabled = multiSel; + importSinglePane = singlePane; + + seldRbdsList = new ArrayList(); + } + + public Boolean open( ) { + Shell parent = getParent(); + Display display = parent.getDisplay(); + + shell = new Shell( parent, SWT.DIALOG_TRIM | SWT.RESIZE | SWT.MODELESS ); + shell.setText(dlgTitle); + shell.setSize( 600, 450 ); // pack later + + GridLayout mainLayout = new GridLayout(1, true); + mainLayout.marginHeight = 1; + mainLayout.marginWidth = 1; + + shell.setLayout(mainLayout); + + createDialog( shell ); + + initWidgets(); + + shell.setLocation( parent.getLocation().x+100, parent.getLocation().y+100); + shell.setMinimumSize(400, 300); + + shell.pack(); + shell.open(); + + while( !shell.isDisposed() ) { + if( !display.readAndDispatch() ) { + display.sleep(); + } + } +// if( oked ) { // +// if( currRbdSel != null ) { +// currRbdSel.resolveLatestCycleTimes(); +// } +// } + return oked;// ? currRbdSel : null ); + } + + public RbdBundle getSelectedRBD() { + // should have checked the status from open() before calling this. + if( seldRbdsList.isEmpty() ) { + return null; + } + else { + return seldRbdsList.get(0); + } + } + + // should have checked the status from open() before calling this. + public ArrayList getSelectedRBDs() { + return seldRbdsList; + } + + public void createDialog( Composite parent ) { + Composite top_form = parent; + top_form.setLayout( new FormLayout() ); + + FormData fd = new FormData( ); + + Composite sel_rbds_grp = new Composite( top_form, SWT.NONE ); + sel_rbds_grp.setLayout( new FormLayout() ); + + fd = new FormData(650,400); + fd.top = new FormAttachment( 0, 5 ); + fd.left = new FormAttachment( 0, 5 ); + fd.right = new FormAttachment( 100, -5 ); + fd.bottom = new FormAttachment( 100, -50 ); + sel_rbds_grp.setLayoutData( fd ); + + selFromGrp = new Group( sel_rbds_grp, SWT.SHADOW_NONE ); + selFromGrp.setText("Select RBDs "); + fd = new FormData(); + fd.top = new FormAttachment( 0, 20 ); + fd.left = new FormAttachment( 0, 10 ); + fd.right = new FormAttachment( 30, -7 ); + selFromGrp.setLayoutData( fd ); + + selFromGrp.setLayout( new GridLayout( 1, false ) ); + + selFromSpfsBtn = new Button( selFromGrp, SWT.RADIO ); + selFromSpfsBtn.setText( "From SPFs" ); + + selFromDisplaysBtn = new Button( selFromGrp, SWT.RADIO ); + selFromDisplaysBtn.setText( "From Displays" ); + + selFromGrp.setVisible( selectFromDisplays ); + + spfGroupCombo = new Combo( sel_rbds_grp, SWT.DROP_DOWN | SWT.READ_ONLY ); + fd = new FormData(); + + // if the Select From section is visible then put this under it, if not + // then put it at the top. + if( selectFromDisplays ) { + fd.top = new FormAttachment( selFromGrp, 55, SWT.BOTTOM ); + } + else { + fd.top = new FormAttachment( 0, 30 ); + } + + fd.left = new FormAttachment( 0, 10 ); + fd.right = new FormAttachment( 30, -7 ); + spfGroupCombo.setLayoutData( fd ); + + spf_grp_lbl = new Label( sel_rbds_grp, SWT.NONE); + spf_grp_lbl.setText("SPF Group"); + fd = new FormData(); + fd.bottom = new FormAttachment( spfGroupCombo, -3, SWT.TOP ); + fd.left = new FormAttachment( spfGroupCombo, 0, SWT.LEFT ); + spf_grp_lbl.setLayoutData( fd ); + + spfNameCombo = new Combo( sel_rbds_grp, SWT.READ_ONLY | SWT.DROP_DOWN ); + + fd = new FormData(); + fd.top = new FormAttachment( spfGroupCombo, 40, SWT.BOTTOM ); + fd.left = new FormAttachment( 0, 10 ); + fd.right = new FormAttachment( 25, 0 ); + + spfNameCombo.setLayoutData( fd ); + + spf_name_lbl = new Label(sel_rbds_grp, SWT.NONE); + spf_name_lbl.setText("SPF Name"); + fd = new FormData(); + fd.bottom = new FormAttachment( spfNameCombo, -3, SWT.TOP ); + fd.left = new FormAttachment( spfNameCombo, 0, SWT.LEFT ); + spf_name_lbl.setLayoutData( fd ); + + int listStyleBits = SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL; + + listStyleBits |= ( multiSelectEnabled ? SWT.MULTI : SWT.SINGLE ); + + rbdLviewer = new ListViewer(sel_rbds_grp, listStyleBits ); + fd = new FormData(); + fd.top = new FormAttachment( 0, 30 ); + fd.left = new FormAttachment( 30, 7 ); + fd.bottom = new FormAttachment( 100, -20 ); + fd.right = new FormAttachment( 65, 0 ); + rbdLviewer.getList().setLayoutData( fd ); + + Label rbd_lbl = new Label( sel_rbds_grp, SWT.NONE); + rbd_lbl.setText("RBDs"); + fd = new FormData(); + fd.bottom = new FormAttachment( rbdLviewer.getList(), -3, SWT.TOP ); + fd.left = new FormAttachment( rbdLviewer.getList(), 0, SWT.LEFT ); + rbd_lbl.setLayoutData( fd ); + + + selectAllBtn = new Button( sel_rbds_grp, SWT.PUSH ); + selectAllBtn.setText( " Select All " ); + fd = new FormData(); + fd.bottom = new FormAttachment( rbdLviewer.getList(), -5, SWT.BOTTOM ); + fd.right = new FormAttachment( rbdLviewer.getList(), -20, SWT.LEFT ); + + selectAllBtn.setLayoutData( fd ); + + selectAllBtn.setVisible( multiSelectEnabled ); + + pane_combo = new Combo( sel_rbds_grp, SWT.DROP_DOWN | SWT.READ_ONLY ); + fd = new FormData(); + fd.width = 60; + fd.top = new FormAttachment( rbdLviewer.getList(), 0, SWT.TOP ); + fd.left = new FormAttachment( rbdLviewer.getList(), 70, SWT.RIGHT ); + pane_combo.setLayoutData( fd ); + + pane_lbl = new Label( sel_rbds_grp, SWT.NONE); + pane_lbl.setText("Pane Number"); + fd = new FormData(); + fd.bottom = new FormAttachment( pane_combo, -3, SWT.TOP ); + fd.left = new FormAttachment( pane_combo, 0, SWT.LEFT ); + pane_lbl.setLayoutData( fd ); + + // if importing just a single pane then we need to be able to select + // which pane from the RBD we want, so enable the pane_combo + // + pane_combo.setVisible( importSinglePane ); + pane_lbl.setVisible( importSinglePane ); + + rscViewer = new RbdViewComposite( sel_rbds_grp ); + + if( importSinglePane ) { + rscViewer.viewSelectedPane(); + } + + fd = new FormData(); + if( importSinglePane ) { + fd.top = new FormAttachment( pane_combo, 40-20, SWT.BOTTOM ); + fd.left = new FormAttachment( rbdLviewer.getList(), 15, SWT.RIGHT ); + fd.bottom = new FormAttachment( rbdLviewer.getList(), 0, SWT.BOTTOM ); + fd.right = new FormAttachment( 100, -10 ); + } + else { + fd.top = new FormAttachment( rbdLviewer.getList(), -20, SWT.TOP ); + fd.left = new FormAttachment( rbdLviewer.getList(), 15, SWT.RIGHT ); + fd.right = new FormAttachment( 100, -10 ); + fd.bottom = new FormAttachment( rbdLviewer.getList(), 0, SWT.BOTTOM ); + } + rscViewer.setLayoutData( fd ); + + Label sep = new Label( sel_rbds_grp, SWT.SEPARATOR | SWT.HORIZONTAL ); + fd = new FormData(); + fd.top = new FormAttachment( rbdLviewer.getList(), 15, SWT.BOTTOM ); + fd.left = new FormAttachment( 0, 5 ); + fd.right = new FormAttachment( 100, -5 ); + + sep.setLayoutData( fd ); + + + Button can_btn = new Button( top_form, SWT.PUSH ); + fd = new FormData(); + fd.width = 80; + can_btn.setText(" Cancel "); + fd.bottom = new FormAttachment( 100, -10 ); + fd.right = new FormAttachment( 100, -20 ); + can_btn.setLayoutData( fd ); + + can_btn.addSelectionListener(new SelectionAdapter() { + public void widgetSelected( SelectionEvent ev ) { + seldRbdsList.clear(); + shell.dispose(); + } + }); + + ok_btn = new Button( top_form, SWT.PUSH ); + fd = new FormData(); + fd.width = 80; + ok_btn.setText(" OK "); + fd.bottom = new FormAttachment( 100, -10 ); + fd.right = new FormAttachment( can_btn, -20, SWT.LEFT ); + ok_btn.setLayoutData( fd ); + + ok_btn.addSelectionListener(new SelectionAdapter() { + public void widgetSelected( SelectionEvent ev ) { + ok(); + } + }); + } + + private void initWidgets() { + + selFromDisplaysBtn.addSelectionListener(new SelectionAdapter() { + public void widgetSelected(SelectionEvent e) { + if( selFromDisplaysBtn.getSelection() ) { + selectFromChanged(); + } + } + }); + + selFromSpfsBtn.addSelectionListener(new SelectionAdapter() { + public void widgetSelected(SelectionEvent e) { + if( selFromSpfsBtn.getSelection() ) { + selectFromChanged(); + } + } + }); + + spfGroupCombo.addSelectionListener(new SelectionAdapter() { + public void widgetSelected(SelectionEvent e) { + setSeldSpfGroup( spfGroupCombo.getText() ); + } + }); + + spfNameCombo.addSelectionListener( new SelectionAdapter() { + public void widgetSelected(SelectionEvent e) { + setSeldSpfName( spfNameCombo.getText() ); + } + }); + + selectAllBtn.addSelectionListener(new SelectionAdapter() { + public void widgetSelected(SelectionEvent e) { + rbdLviewer.getList().selectAll(); + setSelectedRBDs(); + } + }); + + // + rbdLviewer.setContentProvider( new IStructuredContentProvider() { + @Override + public Object[] getElements(Object inputElement) { + ArrayList rbdBndls = (ArrayList)inputElement; + return rbdBndls.toArray(); + } + @Override + public void dispose() { } + + @Override + public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { + } + }); + + rbdLviewer.setLabelProvider( new LabelProvider() { + public String getText( Object element ) { + if( element instanceof RbdBundle ) { + return ((RbdBundle)element).getRbdName(); + } + else return "Error: bad RBD element"; + } + }); + + rbdLviewer.addSelectionChangedListener(new ISelectionChangedListener() { + public void selectionChanged(SelectionChangedEvent event) { + setSelectedRBDs(); + } + }); + + rbdLviewer.getList().addListener( SWT.MouseDoubleClick, new Listener() { + public void handleEvent(Event event) { + setSelectedRBDs(); + ok(); + } + }); + + pane_combo.addSelectionListener( new SelectionAdapter() { + public void widgetSelected(SelectionEvent e) { + PaneID seldPaneId = PaneID.parsePaneId( pane_combo.getText() ); + + if( seldRbdsList.size() == 1 ) { + // Note that if selecting panes is allowed, multi-select is not + // and so there will only be one RBD in the list + seldRbdsList.get(0).setSelectedPaneId( seldPaneId ); + rscViewer.viewRbd( seldRbdsList.get(0) ); + } + else { + rscViewer.viewRbd( null ); + } + } + }); + + if( selectFromDisplays ) { + selFromDisplaysBtn.setSelection( true ); + } + else { + selFromSpfsBtn.setSelection( true ); + } + + selectFromChanged(); + + } + + private void selectFromChanged( ) { + + if( selFromDisplaysBtn.getSelection() ) { + + spfGroupCombo.setEnabled( false ); + spf_grp_lbl.setEnabled( false ); + spf_name_lbl.setEnabled( false ); + spfNameCombo.setEnabled( false ); + + rbdLviewer.setInput( getRbdsFromAllDisplays() ); + + if( multiSelectEnabled ) { + rbdLviewer.getList().selectAll(); + } + else { + rbdLviewer.getList().select(0); + } + + setSelectedRBDs(); + + rbdLviewer.refresh( true ); + } + else if( selFromSpfsBtn.getSelection() ) { + + spfGroupCombo.setEnabled( true ); + spf_grp_lbl.setEnabled( true ); + spf_name_lbl.setEnabled( true ); + spfNameCombo.setEnabled( true ); + + spfGroupCombo.setEnabled( true ); + spfNameCombo.setEnabled( true ); + + spfGroupCombo.setItems( SpfsManager.getInstance().getAvailSPFGroups() ); + + if( spfGroupCombo.getItemCount() == 0 ) { + spfGroupCombo.add("None Available"); + spfGroupCombo.select(0); + spfGroupCombo.setEnabled(false); + } + else { + if( seldSpfGroup != null && !seldSpfGroup.isEmpty() ) { + for( int g=0 ; g 0 && + spfGroupCombo.getSelectionIndex() == -1 ) { + + spfGroupCombo.select(0); + setSeldSpfGroup( spfGroupCombo.getText() ); + } + } + + if( spfNameCombo.getItemCount() > 0 ) { + setSeldSpfName( spfNameCombo.getText() ); + } + else { + spfGroupCombo.setEnabled( false ); + spfNameCombo.setEnabled( false ); + } + } + } + + private void setSeldSpfGroup( String newSpfGroup ) { + seldSpfGroup = newSpfGroup; + + spfNameCombo.setItems( SpfsManager.getInstance().getSpfNamesForGroup( seldSpfGroup ) ); + + if( spfNameCombo.getItemCount() == 0 ) { + setSeldSpfName( null ); + } + else { + spfNameCombo.select( 0 ); + + setSeldSpfName( spfNameCombo.getText() ); + } + } + + private void setSeldSpfName( String newSpfName ) { + seldSpfName = newSpfName; + + if( seldSpfName == null || seldSpfName.isEmpty() ) { + rbdLviewer.setInput( null ); + rbdLviewer.refresh(); + setSelectedRBDs(); + return; + } + + List rbdBndls; + + try { + rbdBndls = SpfsManager.getInstance().getRbdsFromSpf( + seldSpfGroup, seldSpfName, + false ); // don't resolve Latest Cycle Times + + rbdLviewer.setInput( rbdBndls ); + rbdLviewer.refresh(); + + rbdLviewer.getList().select(0); + + setSelectedRBDs(); + + } catch (VizException e) { + } + } + + private void setSelectedRBDs() { + StructuredSelection sel_rbds = (StructuredSelection)rbdLviewer.getSelection(); + if( sel_rbds.isEmpty() ) { + seldRbdsList.clear(); + + pane_combo.add("N/A"); + pane_combo.select(0); + pane_combo.setEnabled(false); + pane_lbl.setEnabled(false); + + rscViewer.viewRbd( null ); + } + else { + Iterator sel_iter = sel_rbds.iterator(); + seldRbdsList.clear(); + + while( sel_iter.hasNext() ) { + seldRbdsList.add( (RbdBundle)sel_iter.next() ); + } + + // set the pane combo items and preselect + pane_combo.removeAll(); + + if( seldRbdsList.size() == 1 ) { + + RbdBundle seldRbd = seldRbdsList.get(0); + + for( int r=0 ; r1 ); + pane_lbl.setEnabled( pane_combo.getItemCount()>1 ); + + rscViewer.viewRbd( seldRbd ); + } + else { // can view more than one at a time. + pane_combo.setEnabled( false ); + + rscViewer.viewRbd( null ); + } + } + + ok_btn.setEnabled( !seldRbdsList.isEmpty() ); + } + + + private ArrayList getRbdsFromAllDisplays() { + + List allNcDisplays = NmapUiUtils.getAllNCDisplays(); + ArrayList rbdsFromDisplays = new ArrayList(); + + // get RbdBundle from selected display + for( NCMapEditor ncDisplay : allNcDisplays ) { + + RbdBundle rbdFromDisplay = new RbdBundle(); + + try { + rbdFromDisplay.initFromEditor( ncDisplay ); + + rbdsFromDisplays.add( RbdBundle.clone( rbdFromDisplay ) ); + + } catch (VizException e) { + MessageDialog errDlg = new MessageDialog( + shell, "Error", null, + "Error getting Rbd from "+ncDisplay.getDisplayName()+".\n" + + e.getMessage(), + MessageDialog.ERROR, new String[]{"OK"}, 0); + errDlg.open(); + } + } + + return rbdsFromDisplays; + } + + public boolean isOpen() { + return shell != null && !shell.isDisposed(); + } + + private void ok() { + oked = true; + shell.dispose(); + } + +} + diff --git a/ncep/gov.noaa.nws.ncep.viz.resourceManager/src/gov/noaa/nws/ncep/viz/resourceManager/ui/loadRbd/LoadRbdControl.java b/ncep/gov.noaa.nws.ncep.viz.resourceManager/src/gov/noaa/nws/ncep/viz/resourceManager/ui/loadRbd/LoadRbdControl.java index ec31fc0f91..d789286330 100644 --- a/ncep/gov.noaa.nws.ncep.viz.resourceManager/src/gov/noaa/nws/ncep/viz/resourceManager/ui/loadRbd/LoadRbdControl.java +++ b/ncep/gov.noaa.nws.ncep.viz.resourceManager/src/gov/noaa/nws/ncep/viz/resourceManager/ui/loadRbd/LoadRbdControl.java @@ -105,6 +105,12 @@ import com.raytheon.viz.ui.UiPlugin; * 04/27/12 #585 S. Gurung Added code to reorder RBDs using right-click and save the order * so that RBDs are displayed in the sequence specified * 05/17/2012 #791 Quan Zhou Modified LoadRBD to check if default editor is empty, then replace it. + * 06/18/2012 #713 G. Hull replace code with new clone() for the RbdBndl + * 06/26/2012 #568 G. Hull Move "Save Order" functionality to Manage Rbds tab + * 07/19/2012 #568 G. Hull Use new RbdViewComposite + * 07/31/2012 #528 G. Hull back to selecting all when an spf is selected + * 08/01/2012 #836 G. Hull check for paneLayout when using empty editor + * * * * @author ghull @@ -122,11 +128,11 @@ public class LoadRbdControl extends Composite { private Combo spf_group_combo = null; private ListViewer spf_name_lviewer = null; private ListViewer rbd_lviewer = null; - private ListViewer rsc_lviewer = null; + private RbdViewComposite rscViewer = null; private Button edit_rbd_btn = null; private Button sel_all_rbd_btn = null; - private Button save_spf_rbdseq_btn = null; +// private Button save_spf_rbdseq_btn = null; private TimelineControl timelineControl = null; private Button load_btn = null; @@ -139,7 +145,7 @@ public class LoadRbdControl extends Composite { // this is the input for the rbd_lviewr content provider. It is // initially set with the rbds in an spf and is updated with edited rbds. // - private ArrayList availRbdsList = null; + private List availRbdsList = null; private ArrayList seldRbdsList = null; // This is set each time an RBD is edited and cleared when a new SPF is selected. @@ -166,11 +172,6 @@ public class LoadRbdControl extends Composite { Composite top_form = this; top_form.setLayout( new GridLayout(1,true) ); - - top_form.setSize( 750, 400 ); - - //top_form.setLayout( new FormLayout() ); - sash_form = new SashForm( top_form, SWT.VERTICAL ); GridData gd = new GridData(); gd.grabExcessHorizontalSpace = true; @@ -258,54 +259,37 @@ public class LoadRbdControl extends Composite { rbd_lbl.setLayoutData( fd ); edit_rbd_btn = new Button( sel_rbds_grp, SWT.PUSH ); - fd = new FormData();// 80,25 ); + fd = new FormData( 85,27 ); edit_rbd_btn.setText("Edit RBD"); fd.top = new FormAttachment( rbd_lviewer.getList(), 10, SWT.BOTTOM ); - fd.left = new FormAttachment( rbd_lviewer.getList(), 5, SWT.LEFT ); + fd.left = new FormAttachment( rbd_lviewer.getList(), 20, SWT.LEFT ); edit_rbd_btn.setLayoutData( fd ); edit_rbd_btn.setEnabled(false); // Not Implemented sel_all_rbd_btn = new Button( sel_rbds_grp, SWT.PUSH ); - fd = new FormData();// 80,25 ); + fd = new FormData( 85,27 ); sel_all_rbd_btn.setText("Select All"); fd.top = new FormAttachment( rbd_lviewer.getList(), 10, SWT.BOTTOM ); - fd.right = new FormAttachment( rbd_lviewer.getList(), -95, SWT.RIGHT ); + fd.right = new FormAttachment( rbd_lviewer.getList(), -20, SWT.RIGHT ); sel_all_rbd_btn.setLayoutData( fd ); - save_spf_rbdseq_btn = new Button( sel_rbds_grp, SWT.PUSH ); - fd = new FormData();// 80,25 ); - save_spf_rbdseq_btn.setText("Save Order"); - fd.top = new FormAttachment( rbd_lviewer.getList(), 10, SWT.BOTTOM ); - fd.right = new FormAttachment( rbd_lviewer.getList(), -5, SWT.RIGHT ); - save_spf_rbdseq_btn.setLayoutData( fd ); - - rsc_lviewer = new ListViewer( sel_rbds_grp, SWT.SINGLE | SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL ); + rscViewer = new RbdViewComposite( sel_rbds_grp ); fd = new FormData(); - fd.top = new FormAttachment( rbd_lviewer.getList(), 0, SWT.TOP ); + fd.top = new FormAttachment( rbd_lviewer.getList(), -20, SWT.TOP ); fd.left = new FormAttachment( 66, 7 ); fd.right = new FormAttachment( 100, -5 ); fd.bottom = new FormAttachment( 100, -120 ); - rsc_lviewer.getList().setLayoutData( fd ); - - // do this as an indication that the list is view-only - rsc_lviewer.getList().setBackground( sel_rbds_grp.getBackground() ); - - Label rsc_lbl = new Label( sel_rbds_grp, SWT.NONE); - rsc_lbl.setText("Resources && Overlays"); - fd = new FormData(); - fd.bottom = new FormAttachment( rsc_lviewer.getList(), -3, SWT.TOP ); - fd.left = new FormAttachment( rsc_lviewer.getList(), 0, SWT.LEFT ); - rsc_lbl.setLayoutData( fd ); + rscViewer.setLayoutData( fd ); load_opts_grp = new Group( sel_rbds_grp, SWT.SHADOW_NONE ); load_opts_grp.setText("Display Options"); load_opts_grp.setLayout( new FormLayout() ); fd = new FormData(); - fd.top = new FormAttachment( rsc_lviewer.getList(), 20, SWT.BOTTOM ); - fd.left = new FormAttachment( rsc_lviewer.getList(), 0, SWT.LEFT ); - fd.right = new FormAttachment( rsc_lviewer.getList(), 0, SWT.RIGHT ); + fd.top = new FormAttachment( rscViewer, 20, SWT.BOTTOM ); + fd.left = new FormAttachment( rscViewer, 0, SWT.LEFT ); + fd.right = new FormAttachment( rscViewer, 0, SWT.RIGHT ); fd.bottom = new FormAttachment( 100, -5 ); load_opts_grp.setLayoutData( fd ); @@ -380,7 +364,7 @@ public class LoadRbdControl extends Composite { public void widgetSelected(SelectionEvent e) { String spfGroupName = spf_group_combo.getText(); spf_name_lviewer.setInput( spfGroupName ); - + //spf_name_lviewer.getList().select(0); setSeldSpfName(); } }); @@ -406,15 +390,6 @@ public class LoadRbdControl extends Composite { } }); -// spf_name_lviewer.getList().addListener( SWT.MouseDoubleClick, new Listener() { -// public void handleEvent(Event event) { -// setSeldSpfName(); -// loadRBD(); -//// double click will leave the dialog up while "Load" will dispose it -//// shell.dispose(); -// } -// }); - // the input is the availRbdsList rbd_lviewer.setContentProvider( new IStructuredContentProvider() { @Override @@ -451,70 +426,6 @@ public class LoadRbdControl extends Composite { } }); - // Input is an RbdBundle and return is a list of the resource names. For - // multi-pane RBDs the paneLayout is given and each pane is labeled - // - rsc_lviewer.setContentProvider( new IStructuredContentProvider() { - @Override - public Object[] getElements(Object inputElement) { - RbdBundle selRbd = (RbdBundle)inputElement; - if( selRbd == null ) { - return new String[0]; - } - - ArrayList rscNames = new ArrayList(); - boolean isMultiPane = (selRbd.getPaneLayout().getNumberOfPanes() > 1 ); - - // loop thru all of the resources in all of the panes and create the - // list of items for the viewer. These will depend on whether we are - // importing a single pane (in which case only the selected pane's - // resources are displayed) and whole RBDs (in which case all pane's - // resources are displayed) For multi-pane RBDs the format will include - // the name of the pane. - for( int r=0 ; r 1); @@ -811,7 +720,7 @@ public class LoadRbdControl extends Composite { auto_update_btn.setEnabled( false ); auto_update_btn.setSelection( false ); - rsc_lviewer.setInput( null ); + rscViewer.viewRbd( null ); timelineControl.clearTimeline(); } @@ -831,18 +740,15 @@ public class LoadRbdControl extends Composite { for( int i=0 ; i map = new HashMap(); - - for (int i=0; i orderedRbdList = new ArrayList(); - TreeSet keys = new TreeSet(map.keySet()); - - for (Integer key : keys) { - orderedRbdList.add(map.get(key)); - } - - if (orderedRbdList.size() > 0) - availRbdsList = orderedRbdList; - } - - private void saveSpfRbdsSequence() { - - try{ - int seq = 1; - for (RbdBundle rbdBundle: availRbdsList) { - rbdBundle.setRbdSequence(seq++); - StructuredSelection seldSpfs = (StructuredSelection)spf_name_lviewer.getSelection(); - String seldSpfName = (String)seldSpfs.getFirstElement(); - SpfsManager.getInstance().saveRbdToSpf( spf_group_combo.getText(), seldSpfName, rbdBundle ); - } - } - catch( VizException e ) { - final String msg = e.getMessage(); - VizApp.runSync(new Runnable() { - public void run() { - Status status = new Status(Status.ERROR, UiPlugin.PLUGIN_ID, 0, msg, null ); - ErrorDialog.openError(Display.getCurrent().getActiveShell(), - "ERROR", "Error.", status); - } - }); - } - - } } \ No newline at end of file diff --git a/ncep/gov.noaa.nws.ncep.viz.resourceManager/src/gov/noaa/nws/ncep/viz/resourceManager/ui/loadRbd/RbdViewComposite.java b/ncep/gov.noaa.nws.ncep.viz.resourceManager/src/gov/noaa/nws/ncep/viz/resourceManager/ui/loadRbd/RbdViewComposite.java new file mode 100644 index 0000000000..7d09c17d9d --- /dev/null +++ b/ncep/gov.noaa.nws.ncep.viz.resourceManager/src/gov/noaa/nws/ncep/viz/resourceManager/ui/loadRbd/RbdViewComposite.java @@ -0,0 +1,203 @@ +package gov.noaa.nws.ncep.viz.resourceManager.ui.loadRbd; + +import gov.noaa.nws.ncep.viz.resources.INatlCntrsResourceData; + +import gov.noaa.nws.ncep.viz.resources.manager.RbdBundle; +import gov.noaa.nws.ncep.viz.ui.display.NCMapRenderableDisplay; +import gov.noaa.nws.ncep.viz.ui.display.PaneID; + +import java.util.ArrayList; + +import org.eclipse.jface.viewers.DoubleClickEvent; +import org.eclipse.jface.viewers.IDoubleClickListener; +import org.eclipse.jface.viewers.ISelectionChangedListener; +import org.eclipse.jface.viewers.IStructuredContentProvider; +import org.eclipse.jface.viewers.ListViewer; +import org.eclipse.jface.viewers.SelectionChangedEvent; +import org.eclipse.jface.viewers.Viewer; +import org.eclipse.swt.SWT; +import org.eclipse.swt.layout.FormAttachment; +import org.eclipse.swt.layout.FormData; +import org.eclipse.swt.layout.FormLayout; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Label; + +import com.raytheon.uf.common.localization.LocalizationFile; +import com.raytheon.uf.viz.core.drawables.AbstractDescriptor; +import com.raytheon.uf.viz.core.drawables.ResourcePair; + +/** + * + *
+ * SOFTWARE HISTORY
+ * Date       	Ticket#		Engineer	Description
+ * ------------	----------	-----------	--------------------------
+ * 06/26/12      #568       G. Hull     Created to replace separate code in 
+ * 										LoadControl, SelectRbd and ManageSpfControl
+ * 
+ * 
+ * + * @author + * @version 1 + */ +public class RbdViewComposite extends Composite { + + private ListViewer rscLviewer = null; + private Label rbdNameLabel = null; + private Label rbdLocationLabel = null; + private Boolean viewSelectedPane = false; + + public RbdViewComposite( Composite parent ) { + super( parent, SWT.SHADOW_NONE ); + + Composite topComp = this; + + topComp.setLayout( new FormLayout() ); + + rscLviewer = new ListViewer( topComp, SWT.SINGLE | SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL ); + + FormData fd = new FormData(); + fd.top = new FormAttachment( 0, 20 ); + fd.left = new FormAttachment(0, 0); + fd.right = new FormAttachment( 100, 0 ); + fd.bottom = new FormAttachment( 100, -20 ); + rscLviewer.getList().setLayoutData( fd ); + + // do this as an indication that the list is view-only + rscLviewer.getList().setBackground( parent.getBackground() ); + + rbdNameLabel = new Label( topComp, SWT.NONE); + rbdNameLabel.setText("View RBD"); + fd = new FormData(); + fd.bottom = new FormAttachment( rscLviewer.getList(), -3, SWT.TOP ); + fd.left = new FormAttachment( rscLviewer.getList(), 0, SWT.LEFT ); + fd.right = new FormAttachment( rscLviewer.getList(), 0, SWT.RIGHT ); + rbdNameLabel.setLayoutData( fd ); + + rbdLocationLabel = new Label( topComp, SWT.NONE); + rbdLocationLabel.setText(""); + fd = new FormData(); + fd.top = new FormAttachment( rscLviewer.getList(), 3, SWT.BOTTOM ); + fd.left = new FormAttachment( rscLviewer.getList(), 0, SWT.LEFT ); + fd.right = new FormAttachment( rscLviewer.getList(), 0, SWT.RIGHT ); + rbdLocationLabel.setLayoutData( fd ); + + rscLviewer.setContentProvider( new IStructuredContentProvider() { + @Override + public Object[] getElements(Object inputElement) { + RbdBundle selRbd = (RbdBundle)inputElement; + if( selRbd == null ) { + return new String[0]; + } + + ArrayList rscNames = new ArrayList(); + boolean isMultiPane = (selRbd.getPaneLayout().getNumberOfPanes() > 1 ); + + // loop thru all of the resources in all of the panes and create the + // list of items for the viewer. These will depend on whether we are + // importing a single pane (in which case only the selected pane's + // resources are displayed) and whole RBDs (in which case all pane's + // resources are displayed) For multi-pane RBDs the format will include + // the name of the pane. + for( int r=0 ; r * @@ -74,6 +76,8 @@ class EditResourceTypeComp extends Composite implements IEditResourceComposite { ResourceName seldRscName=null; ResourceDefinition seldRscDefn; + Button enableRscTypeBtn = null; + Text rscTypeTxt; Combo timeMatchMethodCombo; Spinner dfltNumFramesSpnr; @@ -159,17 +163,24 @@ class EditResourceTypeComp extends Composite implements IEditResourceComposite { dfltNumFramesLbl.setLayoutData( fd ); dfltNumFramesSpnr.setMinimum(1); -// dfltNumFramesSpnr.setMaximum(99); + dfltNumFramesSpnr.setMaximum(999); dfltNumFramesSpnr.setDigits(0); dfltNumFramesSpnr.setIncrement(1); - dfltNumFramesSpnr.setTextLimit(3); + dfltNumFramesSpnr.setTextLimit(4); + enableRscTypeBtn = new Button( top_form, SWT.CHECK ); + enableRscTypeBtn.setText( "Enabled" ); + + fd = new FormData(); + fd.top = new FormAttachment( dfltNumFramesSpnr, -20, SWT.TOP ); + fd.left = new FormAttachment( 50, 0); + enableRscTypeBtn.setLayoutData( fd ); editParamsTxt = new Text( top_form, SWT.MULTI | SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL ); fd = new FormData(); fd.height = 100; - fd.left = new FormAttachment( 50, 0); - fd.top = new FormAttachment( dfltNumFramesSpnr, -10, SWT.TOP ); + fd.left = new FormAttachment( enableRscTypeBtn, 0, SWT.LEFT ); + fd.top = new FormAttachment( enableRscTypeBtn, 35, SWT.BOTTOM ); fd.right = new FormAttachment( 100, -10 ); // fd.bottom = new FormAttachment( 65, 0 ); editParamsTxt.setLayoutData( fd ); @@ -418,6 +429,12 @@ class EditResourceTypeComp extends Composite implements IEditResourceComposite { // Add listeners // + enableRscTypeBtn.addSelectionListener( new SelectionAdapter() { + public void widgetSelected( SelectionEvent ev ) { + + } + }); + rscTypeTxt.addModifyListener(new ModifyListener() { @Override public void modifyText(ModifyEvent e) { @@ -578,6 +595,8 @@ class EditResourceTypeComp extends Composite implements IEditResourceComposite { return; } + enableRscTypeBtn.setSelection( seldRscDefn.getIsEnabled() ); + String rscTypeGen = seldRscDefn.getRscTypeGenerator(); if( rscTypeGen != null && !rscTypeGen.isEmpty() ) { @@ -989,7 +1008,8 @@ class EditResourceTypeComp extends Composite implements IEditResourceComposite { // private void setSelectedRscDefnFromGUI( ResourceDefinition rscDefn ) { - rscDefn.setEnabled( true ); + rscDefn.setEnabled( enableRscTypeBtn.getSelection() ); + rscDefn.setDfltFrameCount( dfltNumFramesSpnr.getSelection() ); for( TimeMatchMethod tmm : TimeMatchMethod.values() ) { diff --git a/ncep/gov.noaa.nws.ncep.viz.resourceManager/src/gov/noaa/nws/ncep/viz/resourceManager/ui/manageResources/ManageResourceControl.java b/ncep/gov.noaa.nws.ncep.viz.resourceManager/src/gov/noaa/nws/ncep/viz/resourceManager/ui/manageResources/ManageResourceControl.java index 1e8f9e7fdc..acdbf0394b 100644 --- a/ncep/gov.noaa.nws.ncep.viz.resourceManager/src/gov/noaa/nws/ncep/viz/resourceManager/ui/manageResources/ManageResourceControl.java +++ b/ncep/gov.noaa.nws.ncep.viz.resourceManager/src/gov/noaa/nws/ncep/viz/resourceManager/ui/manageResources/ManageResourceControl.java @@ -12,11 +12,13 @@ import gov.noaa.nws.ncep.viz.resources.manager.ResourceName; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.swt.SWT; import org.eclipse.swt.custom.SashForm; +import org.eclipse.swt.graphics.Point; import org.eclipse.swt.layout.FormLayout; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Group; +import org.eclipse.swt.widgets.Shell; import com.raytheon.uf.viz.core.exception.VizException; @@ -33,6 +35,7 @@ import com.raytheon.uf.viz.core.exception.VizException; * 12/17/10 #365 Greg Hull add updateDialog * 06/07/11 #445 Xilin Guo Data Manager Performance Improvements * 07/25/11 #450 Greg Hull Save to User Localization + * 07/03/12 #568 Greg Hull Set size on updateDialog * * * @@ -41,12 +44,16 @@ import com.raytheon.uf.viz.core.exception.VizException; */ public class ManageResourceControl extends Composite { + private Shell shell; + private ResourceDefnsMngr rscDefnMngr; private SashForm sashForm = null; private Group selRscGrp = null; private Group editRscGrp = null; + private Point initDlgSize = new Point( 750, 860 ); + private ResourceEditSelectionComposite selectResourceComp = null; public interface IEditResourceComposite { @@ -81,10 +88,8 @@ public class ManageResourceControl extends Composite { super(parent, SWT.NONE); rscDefnMngr = ResourceDefnsMngr.getInstance(); - // query the database to generate dynamic resource names. -// xguo,06/02/11. To enhance the system performance, move -// data resource query into NC-Perspective initialization -// rscDefnMngr.generateDynamicResources(); + + shell = parent.getShell(); Composite top_comp = this; top_comp.setLayout( new GridLayout(1,true) ); @@ -452,11 +457,7 @@ public class ManageResourceControl extends Composite { } } - // requery for subTypes and grids. public void updateDialog() { -// xguo,06/02/11. To enhance the system performance, move -// data resource query into NC-Perspective initialization -// rscDefnMngr.generateDynamicResources(); - // To do: implement update Manage Resources Tab + shell.setSize( initDlgSize ); } } \ No newline at end of file diff --git a/ncep/gov.noaa.nws.ncep.viz.resourceManager/src/gov/noaa/nws/ncep/viz/resourceManager/ui/manageResources/ResourceEditSelectionComposite.java b/ncep/gov.noaa.nws.ncep.viz.resourceManager/src/gov/noaa/nws/ncep/viz/resourceManager/ui/manageResources/ResourceEditSelectionComposite.java index 7ad737f905..70ce5c76bd 100644 --- a/ncep/gov.noaa.nws.ncep.viz.resourceManager/src/gov/noaa/nws/ncep/viz/resourceManager/ui/manageResources/ResourceEditSelectionComposite.java +++ b/ncep/gov.noaa.nws.ncep.viz.resourceManager/src/gov/noaa/nws/ncep/viz/resourceManager/ui/manageResources/ResourceEditSelectionComposite.java @@ -59,10 +59,6 @@ public class ResourceEditSelectionComposite extends Composite { private ResourceDefnsMngr rscDefnsMngr; -// private Button fcstRscCatBtn; -// private Button obsAnlRscCatBtn; -// private Boolean fcstCatSelected = false; - private ResourceName seldResourceName = null; private String prevSeldCat = ""; @@ -326,7 +322,7 @@ public class ResourceEditSelectionComposite extends Composite { @Override public Object[] getElements(Object inputElement) { - return rscDefnsMngr.getResourceCategories( ); + return rscDefnsMngr.getResourceCategories( true ); // include disabled defns } @Override @@ -352,8 +348,11 @@ public class ResourceEditSelectionComposite extends Composite { } try { - List rscTypes = rscDefnsMngr.getResourceDefnsForCategory( - seldResourceName.getRscCategory(), null, false ); + List rscTypes = + rscDefnsMngr.getResourceDefnsForCategory( + seldResourceName.getRscCategory(), null, + false, true ); // no generated types and all disabled types + return rscTypes.toArray(new ResourceDefinition[0]); } catch ( VizException e ) { diff --git a/ncep/gov.noaa.nws.ncep.viz.resourceManager/src/gov/noaa/nws/ncep/viz/resourceManager/ui/manageSpf/ManageSpfControl.java b/ncep/gov.noaa.nws.ncep.viz.resourceManager/src/gov/noaa/nws/ncep/viz/resourceManager/ui/manageSpf/ManageSpfControl.java new file mode 100644 index 0000000000..2b0a4e409a --- /dev/null +++ b/ncep/gov.noaa.nws.ncep.viz.resourceManager/src/gov/noaa/nws/ncep/viz/resourceManager/ui/manageSpf/ManageSpfControl.java @@ -0,0 +1,1144 @@ +package gov.noaa.nws.ncep.viz.resourceManager.ui.manageSpf; + +import gov.noaa.nws.ncep.viz.resourceManager.ui.createRbd.SelectRbdsDialog; +import gov.noaa.nws.ncep.viz.resourceManager.ui.loadRbd.RbdViewComposite; +import gov.noaa.nws.ncep.viz.resources.manager.RbdBundle; +import gov.noaa.nws.ncep.viz.resources.manager.SpfsManager; + +import java.io.File; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; + +import org.eclipse.jface.dialogs.MessageDialog; +import org.eclipse.jface.viewers.ISelectionChangedListener; +import org.eclipse.jface.viewers.IStructuredContentProvider; +import org.eclipse.jface.viewers.LabelProvider; +import org.eclipse.jface.viewers.ListViewer; +import org.eclipse.jface.viewers.SelectionChangedEvent; +import org.eclipse.jface.viewers.StructuredSelection; +import org.eclipse.jface.viewers.Viewer; +import org.eclipse.swt.SWT; +import org.eclipse.swt.custom.SashForm; +import org.eclipse.swt.events.ModifyEvent; +import org.eclipse.swt.events.ModifyListener; +import org.eclipse.swt.events.MouseEvent; +import org.eclipse.swt.events.MouseListener; +import org.eclipse.swt.events.SelectionAdapter; +import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.events.VerifyEvent; +import org.eclipse.swt.events.VerifyListener; +import org.eclipse.swt.graphics.Point; +import org.eclipse.swt.layout.FormAttachment; +import org.eclipse.swt.layout.FormData; +import org.eclipse.swt.layout.FormLayout; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Button; +import org.eclipse.swt.widgets.Combo; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Display; +import org.eclipse.swt.widgets.Event; +import org.eclipse.swt.widgets.Group; +import org.eclipse.swt.widgets.Label; +import org.eclipse.swt.widgets.Listener; +import org.eclipse.swt.widgets.Menu; +import org.eclipse.swt.widgets.MenuItem; +import org.eclipse.swt.widgets.MessageBox; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.swt.widgets.Text; +import org.eclipse.swt.widgets.Widget; + +import com.raytheon.uf.common.localization.LocalizationContext; +import com.raytheon.uf.common.localization.LocalizationContext.LocalizationLevel; +import com.raytheon.uf.common.localization.LocalizationFile; +import com.raytheon.uf.viz.core.VizApp; +import com.raytheon.uf.viz.core.exception.VizException; +import com.raytheon.viz.ui.UiPlugin; + +import static java.lang.System.out; + +/** + * + *
+ * SOFTWARE HISTORY
+ * Date       	Ticket#		Engineer	Description
+ * ------------	----------	-----------	--------------------------
+ * 04/29/11		  #416		 M. Gao      Created
+ * 07/11/11                  Greg Hull   Get Displays instead of storing RscBundleDisplayMngr
+ * 08/04/11      #450        Greg Hull   SpfsManager
+ * 02/15/2012     627        Archana    Removed the call to setNcEditor() and updated initFromEditor(0
+ *                                      to take an editor as one of the arguments  
+ * 04/30/12       #585       S. Gurung   Save RBDs in the order in which they are displayed;
+ * 										 Removed unwanted options ("Sort Alphabetically" and "Sort By Date")  
+ * 06/25/12       #568       G. Hull     Changed name to Manage RBDs. 
+ * 06/26/12       #568       G. Hull     Reworked to add Select Rbd section, Delete, Edit, ReOrder functionality
+ * 
+ * 
+ * + * @author + * @version 1 + */ +public class ManageSpfControl extends Composite { + + private Shell shell; + + private SashForm sash_form = null; + private Group mngRbdsGrp = null; + private Group unusedSectionGrp = null; + + private Group actionGroup = null; + private Button modifyActionBtn = null; + private Button createActionBtn = null; + private Button deleteActionBtn = null; + private Button currActionBtn = null; // set to one of the above + + private ListViewer seldRbdsLviewer = null; + private RbdViewComposite rscLviewer = null; + + private Button addRbdsBtn = null; + private Button removeRbdsBtn = null; // remove from the list + private Button renameRbdBtn = null; + + private Button moveUpBtn = null; + private Button moveDownBtn = null; + + private String seldSpfGroup = ""; + private String seldSpfName = ""; + private String prevSeldSpfGroup = ""; + private String prevSeldSpfName = ""; + + // These will be editable and visible when in create mode + // + private Composite selSpfComp = null; + private Combo createSpfGroupCombo = null; + private Text createSpfNameTxt = null; + + // if Modifying or Deleting then these will be visible + // + private Combo modifySpfGroupCombo = null; + private Combo modifySpfNameCombo = null; + + private Combo currSpfGroupCombo = null; + private Widget currSpfNameWidget = null; + + private Label spfLocationLbl = null; + + private Button saveRefTimeBtn = null; + + // Modify, Create, or Delete depending on the action selected + private Button spfActionBtn = null; + // this will become visible only when deleteSpf is selected and + // when there are no spfs to delete. + private Button deleteSpfGroupBtn = null; + + private List seldRbdsList = null; // RBDs to + + private Point initDlgSize = new Point( 750, 860 ); + + public ManageSpfControl(Composite parent) { + super(parent, SWT.NONE); + + shell = parent.getShell(); + + seldRbdsList = new ArrayList(); + + Composite top_comp = this; + top_comp.setLayout( new GridLayout(1,true) ); + + sash_form = new SashForm( top_comp, SWT.VERTICAL ); + GridData gd = new GridData(); + gd.grabExcessHorizontalSpace = true; + gd.grabExcessVerticalSpace = true; + gd.horizontalAlignment = SWT.FILL; + gd.verticalAlignment = SWT.FILL; + + sash_form.setLayoutData( gd ); + sash_form.setSashWidth(10); + + mngRbdsGrp = new Group( sash_form, SWT.SHADOW_NONE ); + mngRbdsGrp.setText( "Manage RBDs" ); + gd = new GridData(); + gd.grabExcessHorizontalSpace = true; + gd.grabExcessVerticalSpace = true; + gd.horizontalAlignment = SWT.FILL; + gd.verticalAlignment = SWT.FILL; + + mngRbdsGrp.setLayoutData( gd ); + + mngRbdsGrp.setLayout( new FormLayout() ); + + + createManageRbdsGroup(); + + unusedSectionGrp = new Group( sash_form, SWT.SHADOW_NONE ); + //unusedSectionGrp.setText( "Select RBDs" ); + gd = new GridData(); + gd.grabExcessHorizontalSpace = true; + gd.grabExcessVerticalSpace = true; + gd.horizontalAlignment = SWT.FILL; + gd.verticalAlignment = SWT.FILL; + + unusedSectionGrp.setLayoutData( gd ); + + unusedSectionGrp.setLayout( new FormLayout() ); + + // createUnusedwidgets(); + + sash_form.setWeights( new int[] { 3, 1 } ); + + createViewersAndListeners(); + + initWidgets(); + } + + + private void createManageRbdsGroup() { + + actionGroup = new Group( mngRbdsGrp, SWT.SHADOW_NONE ); + actionGroup.setText( "Action" ); + + FormData fd = new FormData(); + fd.top = new FormAttachment( 0, 20 ); + fd.left = new FormAttachment( 0, 15 ); + fd.right = new FormAttachment( 30, -7 ); + actionGroup.setLayoutData( fd ); + + actionGroup.setLayout( new FormLayout() ); + + modifyActionBtn = new Button( actionGroup, SWT.RADIO ); + modifyActionBtn.setText( " Modify SPF " ); + + fd = new FormData(); + fd.top = new FormAttachment( 0, 15 ); + fd.left = new FormAttachment( 0, 25 ); + fd.right = new FormAttachment( 100, -15 ); + modifyActionBtn.setLayoutData( fd ); + + createActionBtn = new Button( actionGroup, SWT.RADIO ); + createActionBtn.setText( " Create SPF " ); + + fd = new FormData(); + fd.top = new FormAttachment( modifyActionBtn, 15, SWT.BOTTOM ); + fd.left = new FormAttachment( modifyActionBtn, 0, SWT.LEFT ); + fd.right = new FormAttachment( 100, -15 ); + createActionBtn.setLayoutData( fd ); + + deleteActionBtn = new Button( actionGroup, SWT.RADIO ); + deleteActionBtn.setText( " Delete SPF " ); + + fd = new FormData(); + fd.top = new FormAttachment( createActionBtn, 20, SWT.BOTTOM ); + fd.left = new FormAttachment( modifyActionBtn, 0, SWT.LEFT ); + fd.right = new FormAttachment( 100, -15 ); + fd.bottom = new FormAttachment( 100, -15 ); + deleteActionBtn.setLayoutData( fd ); + + + selSpfComp = new Composite( mngRbdsGrp, SWT.SHADOW_NONE ); + + fd = new FormData(); + fd.top = new FormAttachment( actionGroup, 30, SWT.BOTTOM ); + fd.left = new FormAttachment( actionGroup, 0, SWT.LEFT ); + selSpfComp.setLayoutData( fd ); + + selSpfComp.setLayout( new FormLayout() ); + + createSpfGroupCombo = new Combo( selSpfComp, SWT.DROP_DOWN ); + fd = new FormData(); + fd.top = new FormAttachment( 0, 20 ); + fd.left = new FormAttachment( 0, 0 ); + fd.right = new FormAttachment( 100, 0 ); + createSpfGroupCombo.setLayoutData( fd ); + + modifySpfGroupCombo = new Combo( selSpfComp, SWT.READ_ONLY | SWT.DROP_DOWN ); + modifySpfGroupCombo.setLayoutData( fd ); + + + Label spf_grp_lbl = new Label( selSpfComp, SWT.NONE); + spf_grp_lbl.setText("SPF Group"); + fd = new FormData(); + fd.bottom = new FormAttachment( createSpfGroupCombo, -3, SWT.TOP ); + fd.left = new FormAttachment( createSpfGroupCombo, 0, SWT.LEFT ); + spf_grp_lbl.setLayoutData( fd ); + + + createSpfNameTxt = new Text( selSpfComp, SWT.SINGLE | SWT.BORDER ); + fd = new FormData(); + fd.top = new FormAttachment( createSpfGroupCombo, 35, SWT.BOTTOM ); + fd.left = new FormAttachment( createSpfGroupCombo, 0, SWT.LEFT ); + fd.right = new FormAttachment( createSpfGroupCombo, 0, SWT.RIGHT ); + createSpfNameTxt.setLayoutData( fd ); + + modifySpfNameCombo = new Combo( selSpfComp, SWT.READ_ONLY | SWT.DROP_DOWN ); + modifySpfNameCombo.setLayoutData( fd ); + + + Label spf_name_lbl = new Label( selSpfComp, SWT.NONE); + spf_name_lbl.setText("SPF Name"); + fd = new FormData(); + fd.bottom = new FormAttachment( createSpfNameTxt, -3, SWT.TOP ); + fd.left = new FormAttachment( createSpfNameTxt, 0, SWT.LEFT ); + spf_name_lbl.setLayoutData( fd ); + + spfLocationLbl = new Label( selSpfComp, SWT.NONE); + spfLocationLbl.setText("Localization="); + fd = new FormData(); + fd.top = new FormAttachment( createSpfNameTxt, 8, SWT.BOTTOM ); + fd.left = new FormAttachment( createSpfNameTxt, 0, SWT.LEFT ); + spfLocationLbl.setLayoutData( fd ); + + spfActionBtn = new Button( selSpfComp, SWT.PUSH ); + + fd = new FormData(100, 30); + fd.top = new FormAttachment( createSpfNameTxt, 60, SWT.BOTTOM ); + fd.left = new FormAttachment( 50, -50 ); + spfActionBtn.setLayoutData( fd ); + + // this will become visible (on top of the Delete SPF button) + // only when deleteSpf is selected and when there are no spfs to delete. + deleteSpfGroupBtn = new Button( selSpfComp, SWT.PUSH ); + deleteSpfGroupBtn.setText( " Delete SPF Group " ); + fd = new FormData(140, 30); + fd.top = new FormAttachment( spfActionBtn, 0, SWT.TOP ); + fd.left = new FormAttachment( spfActionBtn, -20, SWT.LEFT ); + deleteSpfGroupBtn.setLayoutData( fd ); + deleteSpfGroupBtn.setVisible( false ); + + + saveRefTimeBtn = new Button( selSpfComp, SWT.CHECK ); + fd = new FormData(); + saveRefTimeBtn.setText("Save Reference Time"); + fd.top = new FormAttachment( spfActionBtn, 20, SWT.BOTTOM ); + fd.left = new FormAttachment( createSpfNameTxt, 0, SWT.LEFT ); + fd.bottom = new FormAttachment( 100, -20 ); + saveRefTimeBtn.setLayoutData( fd ); + + saveRefTimeBtn.setSelection( false ); + + + seldRbdsLviewer = new ListViewer( mngRbdsGrp, + SWT.MULTI | SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL ); + fd = new FormData(); + fd.top = new FormAttachment( 0, 30 ); + fd.left = new FormAttachment( 30, 7 ); + fd.bottom = new FormAttachment( 75, 0 ); + fd.right = new FormAttachment( 66, -7 ); + seldRbdsLviewer.getList().setLayoutData( fd ); + + Label rbd_lbl = new Label( mngRbdsGrp, SWT.NONE); + rbd_lbl.setText("RBDs"); + fd = new FormData(); + fd.bottom = new FormAttachment( seldRbdsLviewer.getList(), -3, SWT.TOP ); + fd.left = new FormAttachment( seldRbdsLviewer.getList(), 0, SWT.LEFT ); + rbd_lbl.setLayoutData( fd ); + + + rscLviewer = new RbdViewComposite( mngRbdsGrp ); + + fd = new FormData(); + fd.top = new FormAttachment( seldRbdsLviewer.getList(), -20, SWT.TOP ); + fd.left = new FormAttachment( 66, 7 ); + fd.right = new FormAttachment( 100, -10 ); + fd.bottom = new FormAttachment( seldRbdsLviewer.getList(), -130, SWT.BOTTOM ); + rscLviewer.setLayoutData( fd ); + + + addRbdsBtn = new Button( mngRbdsGrp, SWT.PUSH ); + addRbdsBtn.setText( "Add RBDs..." ); + + fd = new FormData(110, 30); + fd.top = new FormAttachment( seldRbdsLviewer.getList(), 20, SWT.BOTTOM ); + fd.left = new FormAttachment( seldRbdsLviewer.getList(), 0, SWT.LEFT ); + addRbdsBtn.setLayoutData( fd ); + + renameRbdBtn = new Button( mngRbdsGrp, SWT.PUSH ); + renameRbdBtn.setText( "Rename RBD..." ); + + fd = new FormData(110, 30); + fd.top = new FormAttachment( addRbdsBtn, 0, SWT.TOP ); + fd.left = new FormAttachment( addRbdsBtn, 20, SWT.RIGHT ); + renameRbdBtn.setLayoutData( fd ); + + + removeRbdsBtn = new Button( mngRbdsGrp, SWT.PUSH ); + removeRbdsBtn.setText( "Remove RBD" ); + + fd = new FormData(110, 30); + fd.top = new FormAttachment( addRbdsBtn, 15, SWT.BOTTOM ); + fd.left = new FormAttachment( addRbdsBtn, 0, SWT.LEFT ); + removeRbdsBtn.setLayoutData( fd ); + + moveDownBtn = new Button( mngRbdsGrp, SWT.PUSH ); + moveDownBtn.setText( "Move Down" ); + + fd = new FormData(90, 30); + fd.bottom = new FormAttachment( seldRbdsLviewer.getList(), 0, SWT.BOTTOM ); + fd.left = new FormAttachment( seldRbdsLviewer.getList(), 20, SWT.RIGHT ); + moveDownBtn.setLayoutData( fd ); + + moveUpBtn = new Button( mngRbdsGrp, SWT.PUSH ); + moveUpBtn.setText( "Move Up" ); + + fd = new FormData(90, 30); + fd.bottom = new FormAttachment( moveDownBtn, -13, SWT.TOP ); + fd.left = new FormAttachment( moveDownBtn, 0, SWT.LEFT ); + moveUpBtn.setLayoutData( fd ); + } + + private void createViewersAndListeners() { + + SelectionAdapter actionBtnListener = new SelectionAdapter() { + public void widgetSelected(SelectionEvent e) { + Button btnWid = (Button) e.widget; + + if( btnWid.getSelection() && + currActionBtn != btnWid ) { + setCurrentAction( btnWid ); + } + } + }; + + modifyActionBtn.addSelectionListener( actionBtnListener ); + + createActionBtn.addSelectionListener( actionBtnListener ); + + deleteActionBtn.addSelectionListener( actionBtnListener ); + + createSpfGroupCombo.addModifyListener(new ModifyListener() { + @Override + public void modifyText(ModifyEvent e) { + setSeldSpfGroup( createSpfGroupCombo.getText() ); + } + }); + + modifySpfGroupCombo.addSelectionListener( new SelectionAdapter() { + public void widgetSelected(SelectionEvent e) { + setSeldSpfGroup( modifySpfGroupCombo.getText() ); + } + }); + + createSpfNameTxt.addModifyListener(new ModifyListener() { + @Override + public void modifyText(ModifyEvent e) { + seldSpfName = createSpfNameTxt.getText(); + spfActionBtn.setEnabled( !seldSpfGroup.isEmpty() && !seldSpfName.isEmpty() ); + } + }); + + modifySpfNameCombo.addSelectionListener( new SelectionAdapter() { + public void widgetSelected(SelectionEvent e) { + + setSeldSpfName( modifySpfNameCombo.getText() ); + } + }); + + // pop up the Select RBDs dialog + addRbdsBtn.addSelectionListener(new SelectionAdapter() { + public void widgetSelected(SelectionEvent e) { + + SelectRbdsDialog selRbdsDlg = + new SelectRbdsDialog( shell, "Select RBDs", + true, true, false ); + + if( !selRbdsDlg.open() ) { + return; + } + + ArrayList rbdsToAdd = selRbdsDlg.getSelectedRBDs(); + + for( RbdBundle rbd : rbdsToAdd ) { + rbd.resolveLatestCycleTimes(); + + try { + RbdBundle newRbd = RbdBundle.clone( rbd ); + + // if in create mode, this will be + newRbd.setLocalizationFile( null ); + + seldRbdsList.add( newRbd ); + + } catch (VizException e1) { + out.println("???Error Cloning rbd "); + } + } + seldRbdsLviewer.setInput( seldRbdsList ); + seldRbdsLviewer.refresh(true); + } + }); + + + // ignore the imput and return the managedRbdsList + seldRbdsLviewer.setContentProvider( new IStructuredContentProvider() { + @Override + public Object[] getElements(Object inputElement) { + if( currActionBtn == createActionBtn && seldRbdsList.isEmpty() ) { + spfActionBtn.setEnabled( false ); + } + else { + spfActionBtn.setEnabled( true ); + } + + seldRbdsLviewer.getList().deselectAll(); + + rscLviewer.viewRbd( null ); + + return seldRbdsList.toArray(); + } + @Override + public void dispose() { } + + @Override + public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { + } + }); + + seldRbdsLviewer.setLabelProvider( new LabelProvider() { + public String getText( Object element ) { + if( element instanceof RbdBundle ) { + RbdBundle rbd = (RbdBundle)element; + if( rbd.isEdited() ) { + return rbd.getRbdName() + "(E)"; + } + else { + return rbd.getRbdName(); + } + } + else return "Error: bad RBD element"; + } + }); + + seldRbdsLviewer.addSelectionChangedListener(new ISelectionChangedListener() { + @Override + public void selectionChanged(SelectionChangedEvent event) { + rbdVierwSelectionChanged( event ); + } + }); + + removeRbdsBtn.addSelectionListener(new SelectionAdapter() { + public void widgetSelected(SelectionEvent e) { + int seldIndxs[] = seldRbdsLviewer.getList().getSelectionIndices(); + + if( seldIndxs.length == 0 ) { + return; + } + + // remove the selected RBDs from the list of seld rbds + // + for( int i=seldIndxs.length-1 ; i >= 0 ; i-- ) { + // sanity check (since the button should be disabled if not User Level), + // + if( currActionBtn == modifyActionBtn ) { + LocalizationFile lFile = seldRbdsList.get(seldIndxs[i]).getLocalizationFile(); + + if( lFile != null && + lFile.getContext().getLocalizationLevel() != LocalizationLevel.USER ) { + + MessageDialog errDlg = new MessageDialog( + shell, "Error", null, + "You do not have permissions to delete a "+ + lFile.getContext().getLocalizationLevel().toString() + " Level Rbd.", + MessageDialog.ERROR, new String[]{"OK"}, 0); + errDlg.open(); + continue; + } + } + + seldRbdsList.remove( seldIndxs[i] ); + } + + seldRbdsLviewer.refresh(); + } + }); + + renameRbdBtn.addSelectionListener( new SelectionAdapter() { + public void widgetSelected(SelectionEvent e) { + renameRbd(); + } + }); + + + moveUpBtn.addSelectionListener(new SelectionAdapter() { + public void widgetSelected(SelectionEvent e) { + moveRbdsUp(); + } + }); + + moveDownBtn.addSelectionListener(new SelectionAdapter() { + public void widgetSelected(SelectionEvent e) { + moveRbdsDown(); + } + }); + + spfActionBtn.addSelectionListener(new SelectionAdapter() { + public void widgetSelected( SelectionEvent ev ) { + if( currActionBtn == modifyActionBtn ) { + saveSpf(); + } + else if( currActionBtn == createActionBtn ) { + createSpf(); + } + else if( currActionBtn == deleteActionBtn ) { + deleteSpf(); + } + } + }); + + deleteSpfGroupBtn.addSelectionListener(new SelectionAdapter() { + public void widgetSelected( SelectionEvent ev ) { + if( currActionBtn == deleteActionBtn ) { // sanity check + deleteSpfGroup(); + } + } + }); + + saveRefTimeBtn.addSelectionListener(new SelectionAdapter() { + public void widgetSelected( SelectionEvent ev ) { + } + }); + + + seldRbdsLviewer.getList().addMouseListener(new MouseListener() { + + @Override + public void mouseDown(MouseEvent e) { + + if (e.button == 3) { + Menu menu = new Menu(shell, SWT.POP_UP); + MenuItem item1 = new MenuItem(menu, SWT.PUSH); + item1.setText("Move Up"); + item1.addListener(SWT.Selection, new Listener() { + @Override + public void handleEvent(Event event) { + moveRbdsUp(); + } + }); + + MenuItem item2 = new MenuItem(menu, SWT.PUSH); + item2.setText("Move Down"); + item2.addListener(SWT.Selection, new Listener() { + @Override + public void handleEvent(Event event) { + moveRbdsDown(); + } + }); + + MenuItem item3 = new MenuItem(menu, SWT.PUSH); + item3.setText("Rename..."); + item3.addListener(SWT.Selection, new Listener() { + @Override + public void handleEvent(Event event) { + renameRbd(); + } + }); + +// MenuItem item4 = new MenuItem(menu, SWT.PUSH); +// item4.setText("Remove RBD..."); +// item4.addListener(SWT.Selection, new Listener() { +// @Override +// public void handleEvent(Event event) { +// renameRbd(); +// } +// }); + + seldRbdsLviewer.getList().setMenu( menu ); + } + } + + @Override + public void mouseUp(MouseEvent e) { } + + @Override + public void mouseDoubleClick(MouseEvent e) {} + }); + + } + + private void initWidgets() { + + // Initialize to the Modify Action + modifyActionBtn.setSelection( true ); + + setCurrentAction( modifyActionBtn ); + } + + private void setCurrentAction( Button currBtn ) { + currActionBtn = currBtn; + + boolean createSpfSeld = (currActionBtn == createActionBtn); + boolean deleteSpfSeld = (currActionBtn == deleteActionBtn); + + currSpfGroupCombo = ( createSpfSeld ? createSpfGroupCombo : modifySpfGroupCombo ); + currSpfNameWidget = ( createSpfSeld ? createSpfNameTxt : modifySpfNameCombo ); + + createSpfGroupCombo.setVisible( createSpfSeld ); + createSpfNameTxt.setVisible( createSpfSeld ); + + modifySpfGroupCombo.setVisible( !createSpfSeld ); + modifySpfNameCombo.setVisible( !createSpfSeld ); + + spfActionBtn.setText( + (currActionBtn == modifyActionBtn ? "Save SPF" : + (currActionBtn == createActionBtn ? "Create SPF" : + (currActionBtn == deleteActionBtn ? "Delete SPF" : "" )))); + + spfActionBtn.setVisible( true ); + spfActionBtn.setEnabled( !createSpfSeld ); + deleteSpfGroupBtn.setVisible( false ); + + saveRefTimeBtn.setVisible( !deleteSpfSeld ); + addRbdsBtn.setEnabled( !deleteSpfSeld ); + removeRbdsBtn.setEnabled( !deleteSpfSeld ); + renameRbdBtn.setEnabled( !deleteSpfSeld ); + moveUpBtn.setEnabled( !deleteSpfSeld ); + moveDownBtn.setEnabled( !deleteSpfSeld ); + + // Make the rbd list appear read-only if deleting the SPF + seldRbdsLviewer.getList().setBackground( (deleteSpfSeld ? + modifySpfNameCombo.getParent().getBackground() : createSpfNameTxt.getBackground() )); + + + currSpfGroupCombo.setItems( SpfsManager.getInstance().getAvailSPFGroups() ); + + // if the user has pre selected a group then select it + // + if( createSpfSeld ) { + currSpfGroupCombo.setText( "" ); + seldRbdsList.clear(); + seldRbdsLviewer.setInput( seldRbdsList ); + seldRbdsLviewer.refresh(); + rscLviewer.viewRbd( null ); + rscLviewer.refresh(); + setSeldSpfGroup( currSpfGroupCombo.getText() ); + } + else if( seldSpfGroup != null && !seldSpfGroup.isEmpty() ) { + int g=0; + for( g=0 ; g 0 ) { + currSpfGroupCombo.select(0); + setSeldSpfGroup( currSpfGroupCombo.getText() ); + } + else { + currSpfGroupCombo.setEnabled( false ); + currSpfGroupCombo.setEnabled( false ); + } + + } + + private void setSeldSpfGroup(String spfGroup) { + + // don't reset it if it hasn't changed + if( seldSpfGroup.equals( spfGroup ) ) { + return; + } + + prevSeldSpfGroup = seldSpfGroup; + + seldSpfGroup = spfGroup; + + if( currSpfNameWidget instanceof Combo ) { + + ((Combo)currSpfNameWidget).setItems( SpfsManager.getInstance().getSpfNamesForGroup( seldSpfGroup ) ); + + if( ((Combo)currSpfNameWidget).getItemCount() == 0 ) { + setSeldSpfName( null ); + } + else { + ((Combo)currSpfNameWidget).select( 0 ); + + setSeldSpfName( ((Combo)currSpfNameWidget).getText() ); + } + } + else if( currSpfNameWidget instanceof Text ) { + ((Text)currSpfNameWidget).setText(""); + setSeldSpfName( ((Text)currSpfNameWidget).getText() ); + } + } + + private void setSeldSpfName( String spfName ) { +// if( seldSpfName.equals( spfName ) ) { +// return; +// } + + prevSeldSpfName = seldSpfName; + + seldSpfName = spfName; + + if( seldSpfName == null || seldSpfName.isEmpty() ) { + if( currActionBtn != createActionBtn ) { + seldRbdsList.clear(); + seldRbdsLviewer.setInput( seldRbdsList ); + seldRbdsLviewer.refresh(); + rscLviewer.viewRbd( null ); + rscLviewer.refresh(); + + removeRbdsBtn.setEnabled( false ); + renameRbdBtn.setEnabled( false ); + + // if delete is selected and there are no spfs in the selected group + // then we will allow the user to delete the spf group. + // + if( currActionBtn == deleteActionBtn ) { + spfActionBtn.setVisible( false ); + deleteSpfGroupBtn.setVisible( true ); + } + + spfLocationLbl.setText(""); + } + + return; + } + + spfActionBtn.setVisible( true ); + deleteSpfGroupBtn.setVisible( false ); + + Boolean isUserLevel = false; + + try { + seldRbdsList = SpfsManager.getInstance().getRbdsFromSpf( + seldSpfGroup, seldSpfName, false ); // don't resolve Latest Cycle Times + + isUserLevel = SpfsManager.getInstance().isUserLevelSpf( seldSpfGroup, seldSpfName ); + + if( isUserLevel ) { + + } + LocalizationContext cntxt = SpfsManager.getInstance().getSpfContext(seldSpfGroup, seldSpfName); + spfLocationLbl.setText( "Localization="+cntxt.getLocalizationLevel().toString()+":"+ + cntxt.getContextName() ); + } catch (VizException e) { + System.out.println("Error getting Rbds from SPF: "+e.getMessage() ); + seldRbdsList.clear(); + } + + seldRbdsLviewer.setInput( seldRbdsList ); + seldRbdsLviewer.refresh(); + + if( !seldRbdsList.isEmpty() ) { + StructuredSelection rbdsel = new StructuredSelection( seldRbdsList.get(0) ); + + seldRbdsLviewer.setSelection( rbdsel ); + + if( currActionBtn == deleteActionBtn || + currActionBtn == modifyActionBtn ) { + + spfActionBtn.setEnabled( isUserLevel ); + } + } + else { + renameRbdBtn.setEnabled( false ); + removeRbdsBtn.setEnabled( false ); + moveDownBtn.setEnabled( false ); + moveUpBtn.setEnabled( false ); + } + } + + private void rbdVierwSelectionChanged( SelectionChangedEvent event ) { + StructuredSelection sel_rbds = (StructuredSelection)event.getSelection(); + rscLviewer.viewRbd( sel_rbds.size() == 1 ? + (RbdBundle)sel_rbds.getFirstElement() : null ); + rscLviewer.refresh(); + + Iterator sel_iter = sel_rbds.iterator(); + + Boolean isUserLevelSpf; + + if( currActionBtn == createActionBtn ) { + isUserLevelSpf = true; + } + else { + isUserLevelSpf = SpfsManager.getInstance().isUserLevelSpf( seldSpfGroup, seldSpfName ); + } + + // if deleting then disable all RBD buttons + // + if( currActionBtn == deleteActionBtn ) { + + spfActionBtn.setEnabled( isUserLevelSpf ); + + addRbdsBtn.setEnabled( false ); + + moveDownBtn.setEnabled( false ); + moveUpBtn.setEnabled( false ); + + removeRbdsBtn.setEnabled( false ); + renameRbdBtn.setEnabled( false ); + } + else if( currActionBtn == createActionBtn ) { + + spfActionBtn.setEnabled( + !sel_rbds.isEmpty() && + !seldSpfGroup.isEmpty() && + !seldSpfName.isEmpty() ); + + addRbdsBtn.setEnabled( true ); + + moveDownBtn.setEnabled( true ); + moveUpBtn.setEnabled( true ); + + removeRbdsBtn.setEnabled( sel_rbds.size() > 0 ); + renameRbdBtn.setEnabled( sel_rbds.size() == 1 ); + } + // If modifying an SPF, check to see if the rbd is in a + // non-user level + else if( currActionBtn == modifyActionBtn ) { + + spfActionBtn.setEnabled( isUserLevelSpf ); + + addRbdsBtn.setEnabled( isUserLevelSpf ); + + moveDownBtn.setEnabled( isUserLevelSpf ); + moveUpBtn.setEnabled( isUserLevelSpf ); + + removeRbdsBtn.setEnabled( isUserLevelSpf && sel_rbds.size() > 0 ); + renameRbdBtn.setEnabled( isUserLevelSpf && sel_rbds.size() == 1 ); + } + } + + + private void moveRbdsUp() { + int seldIndxs[] = seldRbdsLviewer.getList().getSelectionIndices(); + + if( seldIndxs.length == 0 ) { + return; + } + + for( int i=0 ; i=0 ; i-- ) { + if( seldIndxs[i] == seldRbdsList.size()-seldIndxs.length+i ) { + continue; + } + RbdBundle rbdSel = seldRbdsList.get( seldIndxs[i] ); + + if( rbdSel != null ) { + seldRbdsList.remove( seldIndxs[i] ); + seldRbdsList.add( seldIndxs[i] + 1, rbdSel ); + } + } + + seldRbdsLviewer.refresh(); + } + + + public boolean isOpen() { + return shell != null && !shell.isDisposed(); + } + + private void renameRbd() { + StructuredSelection rbdsel = (StructuredSelection)seldRbdsLviewer.getSelection(); + + if( rbdsel.isEmpty() ) { + return; + } + RbdBundle selRbd = (RbdBundle)rbdsel.getFirstElement(); + + // sanity check (since the button should be disabled if not User Level), + // + if( currActionBtn == modifyActionBtn ) { + LocalizationFile lFile = selRbd.getLocalizationFile(); + + if( lFile != null && + lFile.getContext().getLocalizationLevel() != LocalizationLevel.USER ) { + MessageDialog errDlg = new MessageDialog( + shell, "Error", null, + "You do not have permissions to rename a "+ + lFile.getContext().getLocalizationLevel().toString() + " Level Rbd.", + MessageDialog.ERROR, new String[]{"OK"}, 0); + errDlg.open(); + return; + } + } + + RenameRbdDialog newSpfFileNameDialog = new RenameRbdDialog( shell, selRbd ); + + newSpfFileNameDialog.open(); + + seldRbdsLviewer.refresh( true ); + } + + // Modify an existing SPF. + // + private void saveSpf() { + + try { + if( seldRbdsList.isEmpty() ) { + throw new VizException( "No RBDs are selected" ); + } + else if( seldSpfGroup.isEmpty() || seldSpfName.isEmpty() ) { + throw new VizException( "Select an SPF Name and Group." ); + } + else { // check for duplicate names + for( RbdBundle rbd1 : seldRbdsList ) { + for( RbdBundle rbd2 : seldRbdsList ) { + if( rbd1 != rbd2 ) { + if( rbd1.getRbdName().equals( rbd2.getRbdName() ) ) { + throw new VizException("There are duplicate RBD Names in the SPF\n"+ + "Rename one of the RBDs named "+ rbd1.getRbdName() ); + } + } + } + } + } + + // loop thru the Rbds and set the sequence number + // TODO: This should be changed later to save the ordering in a + // separate SPF file. One reason is that simply adding an rbd to a SITE level file + // will now require that all/most of the SITE level files will need to be overridden + // just because their sequence number changes. + // + for( int seqNum=1 ; seqNum <= seldRbdsList.size() ; seqNum++ ) { + + seldRbdsList.get( seqNum-1).setRbdSequence( seqNum ); + } + + SpfsManager.getInstance().saveSpf( seldSpfGroup, seldSpfName, seldRbdsList, + saveRefTimeBtn.getSelection(), false ); + + MessageBox mb = new MessageBox( shell, SWT.OK ); + mb.setText( "SPF Saved" ); + mb.setMessage( "\nSPF "+ seldSpfGroup+File.separator+seldSpfName+ + " has been saved."); + mb.open(); + } + catch( VizException e ) { + MessageDialog errDlg = new MessageDialog( + shell, "Error", null, + "Error Saving SPF "+ seldSpfGroup+File.separator+seldSpfName+":\n\n"+ + e.getMessage(), + MessageDialog.ERROR, new String[]{"OK"}, 0); + errDlg.open(); + } + } + + private void createSpf() { + try { + SpfsManager.getInstance().createSpf( seldSpfGroup, seldSpfName, seldRbdsList, + saveRefTimeBtn.getSelection(), false ); + + MessageBox mb = new MessageBox( shell, SWT.OK ); + mb.setText( "SPF Created" ); + mb.setMessage( "\nSPF "+ seldSpfGroup+File.separator+seldSpfName+ + " has been created."); + mb.open(); + + // reset the gui after creating the SPF + currActionBtn.setSelection( false ); + modifyActionBtn.setSelection( true ); + + setCurrentAction( modifyActionBtn ); + + } catch (VizException e) { + MessageDialog errDlg = new MessageDialog( + shell, "Error", null, + "Error Creating Spf "+ seldSpfGroup+File.separator+seldSpfName+":\n\n"+ + e.getMessage(), + MessageDialog.ERROR, new String[]{"OK"}, 0); + errDlg.open(); + } + } + + private void deleteSpf() { + try { + SpfsManager.getInstance().deleteSpf( seldSpfGroup, seldSpfName ); + + MessageBox mb = new MessageBox( shell, SWT.OK ); + mb.setText( "SPF Deleted" ); + mb.setMessage( "\nSPF "+ seldSpfGroup+File.separator+seldSpfName+ + " has been deleted."); + mb.open(); + + currActionBtn.setSelection( false ); + modifyActionBtn.setSelection( true ); + setCurrentAction( modifyActionBtn ); + + } catch (VizException e) { + MessageDialog errDlg = new MessageDialog( + shell, "Info", null, + "Error Deleting Spf "+ seldSpfName+":\n"+ + e.getMessage(), + MessageDialog.ERROR, new String[]{"OK"}, 0); + errDlg.open(); + } + + setSeldSpfGroup( seldSpfGroup ); + } + + private void deleteSpfGroup() { + try { + SpfsManager.getInstance().deleteSpfGroup( seldSpfGroup ); + + currActionBtn.setSelection( false ); + modifyActionBtn.setSelection( true ); + setCurrentAction( modifyActionBtn ); + + } catch (VizException e) { + MessageDialog errDlg = new MessageDialog( + shell, "Info", null, + "Error Deleting Spf Group "+ seldSpfGroup+":\n"+ + e.getMessage(), + MessageDialog.ERROR, new String[]{"OK"}, 0); + errDlg.open(); + return; + } + } + + public void updateDialog() { + shell.setSize( initDlgSize ); + String saveSpfGroup = seldSpfGroup; + String saveSpfName = seldSpfName; + + currSpfGroupCombo.setItems( SpfsManager.getInstance().getAvailSPFGroups() ); + + // if the user has pre selected a group then select it + // + if( saveSpfGroup != null && !saveSpfGroup.isEmpty() ) { + for( int g=0 ; g 0 ) { + currSpfGroupCombo.select(0); + setSeldSpfGroup( currSpfGroupCombo.getText() ); + } + else { + currSpfGroupCombo.setEnabled( false ); + currSpfGroupCombo.setEnabled( false ); + } + } +} diff --git a/ncep/gov.noaa.nws.ncep.viz.resourceManager/src/gov/noaa/nws/ncep/viz/resourceManager/ui/manageSpf/RenameRbdDialog.java b/ncep/gov.noaa.nws.ncep.viz.resourceManager/src/gov/noaa/nws/ncep/viz/resourceManager/ui/manageSpf/RenameRbdDialog.java new file mode 100644 index 0000000000..6bb6b6bae4 --- /dev/null +++ b/ncep/gov.noaa.nws.ncep.viz.resourceManager/src/gov/noaa/nws/ncep/viz/resourceManager/ui/manageSpf/RenameRbdDialog.java @@ -0,0 +1,189 @@ +package gov.noaa.nws.ncep.viz.resourceManager.ui.manageSpf; + +import gov.noaa.nws.ncep.viz.resources.manager.RbdBundle; +import gov.noaa.nws.ncep.viz.resources.manager.SpfsManager; + +import java.io.File; + +import org.eclipse.swt.SWT; +import org.eclipse.swt.events.ModifyEvent; +import org.eclipse.swt.events.ModifyListener; +import org.eclipse.swt.events.SelectionAdapter; +import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.events.SelectionListener; +import org.eclipse.swt.events.VerifyEvent; +import org.eclipse.swt.events.VerifyListener; +import org.eclipse.swt.layout.FormAttachment; +import org.eclipse.swt.layout.FormData; +import org.eclipse.swt.layout.FormLayout; +import org.eclipse.swt.widgets.Button; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Dialog; +import org.eclipse.swt.widgets.Display; +import org.eclipse.swt.widgets.Label; +import org.eclipse.swt.widgets.MessageBox; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.swt.widgets.Text; + + +public class RenameRbdDialog extends Dialog { + + private String dialogTitle = "Rename Rbd"; + private Shell myShell; + private Text newRbdNameText; + + private RbdBundle rbdToRename; + + public RenameRbdDialog(Shell parentShell, RbdBundle rbd ) { + super(parentShell); + myShell = parentShell; + rbdToRename = rbd; + } + + protected Object open() { + Shell parentShell = getParent(); + Display display = parentShell.getDisplay(); + + myShell = new Shell(parentShell, SWT.DIALOG_TRIM | SWT.RESIZE | SWT.APPLICATION_MODAL ); + + myShell.setText(dialogTitle); + + /* + * Start to Create the main layout for the shell. + */ + myShell.setLayout( new FormLayout() ); + myShell.setLocation( parentShell.getLocation().x+100, + parentShell.getLocation().y+300 ); + + initializeComponents(myShell); + + myShell.pack(); + + myShell.open(); + + while (!myShell.isDisposed()) { + if (!display.readAndDispatch()) { + display.sleep(); + } + } + + return null; + } + + protected void initializeComponents(Shell shell) { + + Composite topComp = new Composite( shell, SWT.NONE ); + topComp.setLayout(new FormLayout() ); + + FormData fd = new FormData( 350, 160 ); + fd.top = new FormAttachment( 0, 0 ); + fd.left = new FormAttachment( 0, 0 ); + fd.right = new FormAttachment( 100, 0 ); + fd.bottom = new FormAttachment( 100, 0 ); + topComp.setLayoutData( fd ); + + newRbdNameText = new Text(topComp, SWT.BORDER ); + newRbdNameText.setText( rbdToRename.getRbdName() ); + newRbdNameText.setSelection(0, rbdToRename.getRbdName().length() ); + + fd = new FormData(); + fd.top = new FormAttachment( 0, 50); + fd.left = new FormAttachment( 0, 25 ); + fd.right = new FormAttachment( 100, -25 ); + + newRbdNameText.setLayoutData( fd ); + + Label newRbdNameLabel = new Label(topComp, SWT.NONE); + newRbdNameLabel.setText("Enter New RBD Name:"); + + fd = new FormData(); + fd.bottom = new FormAttachment( newRbdNameText, -3, SWT.TOP ); + fd.left = new FormAttachment( newRbdNameText, 0, SWT.LEFT ); + newRbdNameLabel.setLayoutData( fd ); + + Label sep = new Label( topComp, SWT.SEPARATOR | SWT.HORIZONTAL ); + fd = new FormData(); + fd.top = new FormAttachment( newRbdNameText, 30, SWT.BOTTOM ); + fd.left = new FormAttachment( 0, 5 ); + fd.right = new FormAttachment( 100, -5 ); + + sep.setLayoutData( fd ); + + final Button renameRbdBtn = new Button(topComp, SWT.NONE); + renameRbdBtn.setText(" Rename "); + + fd = new FormData(); + fd.bottom = new FormAttachment( 100, -10 ); + fd.right = new FormAttachment( 100, -20 ); + + renameRbdBtn.setLayoutData( fd ); + + Button cancelBtn = new Button(topComp, SWT.NONE); + cancelBtn.setText(" Cancel "); + + fd = new FormData(); + fd.top = new FormAttachment( renameRbdBtn, 0, SWT.TOP ); + fd.right = new FormAttachment( renameRbdBtn, -20, SWT.LEFT ); + + cancelBtn.setLayoutData( fd ); + + // TODO : should we allow spaces? + newRbdNameText.addVerifyListener( new VerifyListener() { + @Override + public void verifyText(VerifyEvent e) { + if( e.text.contains( File.separator ) ) { + e.doit = false; + } + } + }); + + newRbdNameText.addModifyListener( new ModifyListener() { + @Override + public void modifyText(ModifyEvent e) { + renameRbdBtn.setEnabled( + !rbdToRename.getRbdName().equals( newRbdNameText.getText().trim() ) ); + } + }); + + newRbdNameText.addSelectionListener(new SelectionAdapter() { + @Override + public void widgetDefaultSelected(SelectionEvent e) { + renameRbd(); + } + }); + + renameRbdBtn.addSelectionListener(new SelectionAdapter() { + @Override + public void widgetSelected(SelectionEvent e) { + renameRbd(); + } + }); + + cancelBtn.addSelectionListener(new SelectionAdapter() { + @Override + public void widgetSelected(SelectionEvent e) { + if( myShell != null ) { + myShell.dispose(); + } + } + }); + } + + private void renameRbd() { + String newRbdName = newRbdNameText.getText().trim(); + + if( !SpfsManager.getInstance().isValidRbdName( newRbdName ) ) { + MessageBox mb = new MessageBox(myShell, SWT.ICON_ERROR); + mb.setMessage("Invalid RBD name."); + mb.setText("Error"); + mb.open(); + return; + } + + rbdToRename.setRbdName( newRbdName ); + + if( myShell != null ) { + myShell.dispose(); + } + } +} diff --git a/ncep/gov.noaa.nws.ncep.viz.resourceManager/src/gov/noaa/nws/ncep/viz/resourceManager/ui/spf/ManageMultiSPFControl.java b/ncep/gov.noaa.nws.ncep.viz.resourceManager/src/gov/noaa/nws/ncep/viz/resourceManager/ui/spf/ManageMultiSPFControl.java deleted file mode 100644 index 02dd5d734c..0000000000 --- a/ncep/gov.noaa.nws.ncep.viz.resourceManager/src/gov/noaa/nws/ncep/viz/resourceManager/ui/spf/ManageMultiSPFControl.java +++ /dev/null @@ -1,400 +0,0 @@ -package gov.noaa.nws.ncep.viz.resourceManager.ui.spf; - -import gov.noaa.nws.ncep.viz.common.ui.FileDateComparator; -import gov.noaa.nws.ncep.viz.common.ui.FileNameComparator; -import gov.noaa.nws.ncep.viz.common.ui.NmapCommon; -//import gov.noaa.nws.ncep.viz.resource.manager.util.OpenedNcMapEditorInfoManager; -import gov.noaa.nws.ncep.viz.resources.manager.SpfsManager; -import gov.noaa.nws.ncep.viz.resources.manager.RbdBundle; -import gov.noaa.nws.ncep.viz.resources.manager.RscBundleDisplayMngr; -import gov.noaa.nws.ncep.viz.resources.manager.SpfsManager; -import gov.noaa.nws.ncep.viz.ui.display.NCMapEditor; -import gov.noaa.nws.ncep.viz.ui.display.NCPaneManager.PaneLayout; -import gov.noaa.nws.ncep.viz.ui.display.NmapUiUtils; - -import java.io.File; -import java.util.List; - -import org.eclipse.core.runtime.Status; -import org.eclipse.jface.dialogs.ErrorDialog; -import org.eclipse.jface.dialogs.MessageDialog; -import org.eclipse.jface.viewers.ISelectionChangedListener; -import org.eclipse.jface.viewers.IStructuredContentProvider; -import org.eclipse.jface.viewers.ListViewer; -import org.eclipse.jface.viewers.SelectionChangedEvent; -import org.eclipse.jface.viewers.StructuredSelection; -import org.eclipse.jface.viewers.Viewer; -import org.eclipse.swt.SWT; -//import org.eclipse.swt.custom.SashForm; -import org.eclipse.swt.events.ModifyEvent; -import org.eclipse.swt.events.ModifyListener; -import org.eclipse.swt.events.SelectionAdapter; -import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.events.SelectionListener; -import org.eclipse.swt.layout.FormAttachment; -import org.eclipse.swt.layout.FormData; -import org.eclipse.swt.layout.FormLayout; -import org.eclipse.swt.widgets.Button; -import org.eclipse.swt.widgets.Combo; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Display; -import org.eclipse.swt.widgets.Group; -import org.eclipse.swt.widgets.Label; -import org.eclipse.swt.widgets.MessageBox; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.swt.widgets.Text; - -import com.raytheon.uf.common.serialization.SerializationException; -import com.raytheon.uf.common.serialization.SerializationUtil; -import com.raytheon.uf.viz.core.VizApp; -import com.raytheon.uf.viz.core.exception.VizException; -import com.raytheon.viz.ui.UiPlugin; - - - -/** - * - * - *
- * SOFTWARE HISTORY
- * Date       	Ticket#		Engineer	Description
- * ------------	----------	-----------	--------------------------
- * 04/29/11		  #416		 M. Gao      Created
- * 07/11/11                  Greg Hull   Get Displays instead of storing RscBundleDisplayMngr
- * 08/04/11      #450        Greg Hull   SpfsManager
- * 02/15/2012     627        Archana    Removed the call to setNcEditor() and updated initFromEditor(0
- *                                      to take an editor as one of the arguments  
- * 04/30/12       #585       S. Gurung   Save RBDs in the order in which they are displayed;
- * 										 Removed unwanted options ("Sort Alphabetically" and "Sort By Date")  
- * 
- * - * @author - * @version 1 - */ - -public class ManageMultiSPFControl extends Composite { - - private Shell shell; - - private final int YES_TO_ALL_INT_VALUE = 0; - private final int NO_SKIP_INT_VALUE = 1; - private final int NO_NEW_NAME_INT_VALUE = 2; - private final int YES_INT_VALUE = 3; - - private boolean yesToAll = false; - - private Button display_by_name = null; - private Button display_by_date = null; - - private Combo spf_group_combo = null; - - private Text spf_name_text; - - private Button save_ref_time_btn = null; - - private ListViewer spf_name_lviewer = null; - - private Button save_btn = null; - - private String seldSpfGroup = null; - - private boolean saveRefTime; - - private String savedRbdName; - - public ManageMultiSPFControl(Composite parent) { - super(parent, SWT.NONE); - - shell = parent.getShell(); - - Composite topComposite = this; - - topComposite.setLayout( new FormLayout() ); - - FormData fd = new FormData( ); - - Group save_display_grp = new Group( topComposite, SWT.SHADOW_NONE ); - save_display_grp.setText("Save Displays to SPF"); - save_display_grp.setLayout( new FormLayout() ); - fd.top = new FormAttachment( 0, 10 ); - fd.left = new FormAttachment( 0, 10 ); - fd.right = new FormAttachment( 40, 0 ); - fd.bottom = new FormAttachment(70, 0); - save_display_grp.setLayoutData( fd ); - - spf_group_combo = new Combo( save_display_grp, SWT.DROP_DOWN ); - fd = new FormData(); - fd.top = new FormAttachment( 5, 10 ); - fd.left = new FormAttachment( 9, 10 ); - fd.right = new FormAttachment( 85, 0 ); - spf_group_combo.setLayoutData( fd ); - - Label spf_grp_lbl = new Label( save_display_grp, SWT.NONE); - spf_grp_lbl.setText("SPF Group"); - fd = new FormData(); - fd.bottom = new FormAttachment( spf_group_combo, -3, SWT.TOP ); - fd.left = new FormAttachment( spf_group_combo, 0, SWT.LEFT ); - spf_grp_lbl.setLayoutData( fd ); - - Group spf_name_grp = new Group( save_display_grp, SWT.SHADOW_NONE ); - spf_name_grp.setText("Available SPFs "); - spf_name_grp.setLayout( new FormLayout() ); - fd = new FormData(260,300); - fd.top = new FormAttachment( spf_group_combo, 20, SWT.BOTTOM ); - fd.left = new FormAttachment( 0, 10 ); - fd.right = new FormAttachment(97, 0); - spf_name_grp.setLayoutData( fd ); - - spf_name_lviewer = new ListViewer(spf_name_grp, - SWT.SINGLE | SWT.BORDER | SWT.V_SCROLL| SWT.H_SCROLL); - fd = new FormData(); - fd.height = 250; - fd.top = new FormAttachment( 0, 5 ); - fd.left = new FormAttachment( 0, 10 ); - fd.right = new FormAttachment( 100, -10 ); - fd.bottom = new FormAttachment( 100, -65 ); - spf_name_lviewer.getList().setLayoutData( fd ); - - - spf_name_text = new Text(spf_name_grp, SWT.SINGLE | SWT.BORDER ); - fd = new FormData(); - fd.top = new FormAttachment( spf_name_lviewer.getList(), 30, SWT.BOTTOM ); - fd.left = new FormAttachment( spf_name_lviewer.getList(), 0, SWT.LEFT ); - fd.right = new FormAttachment( spf_name_lviewer.getList(), 0, SWT.RIGHT ); - spf_name_text.setLayoutData( fd ); - - Label spf_name_lbl = new Label( spf_name_grp, SWT.NONE); - spf_name_lbl.setText("SPF Name"); - fd = new FormData(); - fd.bottom = new FormAttachment( spf_name_text, -3, SWT.TOP ); - fd.left = new FormAttachment( spf_name_text, 0, SWT.LEFT ); - spf_name_lbl.setLayoutData( fd ); - - save_ref_time_btn = new Button( save_display_grp, SWT.CHECK ); - fd = new FormData(); - save_ref_time_btn.setText("Save Reference Time"); - fd.top = new FormAttachment( spf_name_grp, 15, SWT.BOTTOM ); - fd.left = new FormAttachment( spf_name_grp, 0, SWT.LEFT ); - save_ref_time_btn.setLayoutData( fd ); - - save_ref_time_btn.setSelection( saveRefTime ); - - save_ref_time_btn.addSelectionListener(new SelectionAdapter() { - public void widgetSelected( SelectionEvent ev ) { - saveRefTime = save_ref_time_btn.getSelection(); - } - }); - - save_btn = new Button( save_display_grp, SWT.PUSH ); - save_btn.setText(" Save All RBDs "); - fd = new FormData(); - fd.top = new FormAttachment(save_ref_time_btn, 15, SWT.BOTTOM); - fd.left = new FormAttachment( save_ref_time_btn, 0, SWT.LEFT); - save_btn.setLayoutData( fd ); - - save_btn.addSelectionListener(new SelectionAdapter() { - public void widgetSelected( SelectionEvent ev ) { - saveAllRBD(); - } - }); - - initWidgets(); - } - - - private void initWidgets() { - - spf_group_combo.addSelectionListener(new SelectionListener() { - public void widgetSelected(SelectionEvent e) { - setSeldSpfGroup( spf_group_combo.getText() ); - } - - @Override - public void widgetDefaultSelected(SelectionEvent e) { - setSeldSpfGroup( spf_group_combo.getText() ); - } - }); - - spf_name_text.addSelectionListener(new SelectionListener() { - public void widgetSelected(SelectionEvent e) { - setSeldSpfName( spf_name_text.getText() ); - } - - @Override - public void widgetDefaultSelected(SelectionEvent e) { - setSeldSpfName( spf_name_text.getText() ); - } - }); - - - spf_group_combo.addModifyListener(new ModifyListener() { - @Override - public void modifyText(ModifyEvent e) { - save_btn.setEnabled( - !spf_name_text.getText().isEmpty() && - !spf_group_combo.getText().isEmpty() ); - } - }); - - spf_name_text.addModifyListener(new ModifyListener() { - @Override - public void modifyText(ModifyEvent e) { - save_btn.setEnabled( - !spf_name_text.getText().isEmpty() && - !spf_group_combo.getText().isEmpty() ); - } - }); - - spf_name_lviewer.setContentProvider(new IStructuredContentProvider() { - @Override - public Object[] getElements(Object inputElement) { - - // TODO : check display_by_name selection and order appropriately. - // (add support in SpfsManager to get the time. Not sure how to do this - // now that it is possible to have the SPF in 2 contexts?) - return SpfsManager.getInstance().getSpfNamesForGroup( (String)inputElement ); - } - @Override - public void dispose() { } - - @Override - public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { - } - }); - -// spf_name_lviewer.setLabelProvider( NmapCommon.createFileLabelProvider( ) ); - - spf_name_lviewer.addSelectionChangedListener(new ISelectionChangedListener() { - public void selectionChanged( SelectionChangedEvent event ) { - StructuredSelection seldSpfs = (StructuredSelection)spf_name_lviewer.getSelection(); - - setSeldSpfName( (String)seldSpfs.getFirstElement() ); - } - }); - - spf_group_combo.setItems( SpfsManager.getInstance().getAvailSPFGroups() ); - - // if the user has pre selected a group then select it - // - if( seldSpfGroup != null ) { - for( int g=0 ; g 0 ) { - spf_group_combo.select(0); - setSeldSpfGroup( spf_group_combo.getText() ); - } - } - - - private void setSeldSpfGroup(String spfGroup) { - seldSpfGroup = spfGroup; - - String spfGroupName = spf_group_combo.getText(); - - spf_name_lviewer.setInput( spfGroupName ); - } - - private void setSeldSpfName( String spfName ) { - spf_name_text.setText( spfName ); - - } - - public boolean isOpen() { - return shell != null && !shell.isDisposed(); - } - - private void saveAllRBD() { - try { - String spfGroup = spf_group_combo.getText(); - String spfName = spf_name_text.getText(); - - //????? do we still need saveRefTime flag ???? - - List displayList = NmapUiUtils.getAllNCDisplays(); - Integer numRBDs = 0; - - // loop thru all the active Displays and create an RbdBundle for each. - int seq = 1; - for( NCMapEditor display : displayList) { - RbdBundle rbd = new RbdBundle(); - rbd.setRbdSequence(seq++); - - // rbd.setNcEditor( display ); - - rbd.initFromEditor( display ); - - savedRbdName = rbd.getRbdName(); - - if( !yesToAll ) { - if( SpfsManager.getInstance().doesRbdExistInUserContext( - spfGroup, spfName, savedRbdName ) ) { - - MessageDialog confirmDlg = new MessageDialog( - getShell(), - "Create RBD", null, - "RBD " +rbd.getRbdName()+" already exists in this SPF.\n\n"+ - "Do you want to overwrite it?", - MessageDialog.QUESTION, new String[] - {"Yes to All", "No, Skip", "No, New Name", "Yes"}, 0); - confirmDlg.open(); - - int returnCode = confirmDlg.getReturnCode(); - - if(returnCode == YES_TO_ALL_INT_VALUE) { - yesToAll = true; - } - else if(returnCode == NO_SKIP_INT_VALUE) { - savedRbdName = null; - } - else if(returnCode == NO_NEW_NAME_INT_VALUE) { - NewRbdNameDialog newSpfFileNameDialog = - new NewRbdNameDialog( shell, - spfGroup, spfName, rbd.getRbdName() ); - newSpfFileNameDialog.open(); - savedRbdName = newSpfFileNameDialog.getNewRbdName(); - newSpfFileNameDialog = null; - - rbd.setRbdName( savedRbdName ); - } - } - } - - try { - if( savedRbdName != null ) { // if null assume duplicate name and user choose to skip - SpfsManager.getInstance().saveRbdToSpf(spfGroup, spfName, rbd ); - numRBDs++; - } - } catch ( VizException e ) { - throw e; - } - } - - final Integer createdRBDs = numRBDs; - - VizApp.runSync(new Runnable() { - public void run() { - MessageBox mb = new MessageBox( shell, SWT.OK ); - mb.setText( "SPF Created" ); - mb.setMessage( "SPF Created with "+ createdRBDs + " RBDs" ); - mb.open(); - } - }); - } - catch( VizException e ) { - final String msg = e.getMessage(); - VizApp.runSync(new Runnable() { - public void run() { - Status status = new Status(Status.ERROR, UiPlugin.PLUGIN_ID, 0, msg, null ); - ErrorDialog.openError(Display.getCurrent().getActiveShell(), - "ERROR", "Error.", status); - } - }); - } - } - -} diff --git a/ncep/gov.noaa.nws.ncep.viz.resourceManager/src/gov/noaa/nws/ncep/viz/resourceManager/ui/spf/NewRbdNameDialog.java b/ncep/gov.noaa.nws.ncep.viz.resourceManager/src/gov/noaa/nws/ncep/viz/resourceManager/ui/spf/NewRbdNameDialog.java deleted file mode 100644 index e6736804d7..0000000000 --- a/ncep/gov.noaa.nws.ncep.viz.resourceManager/src/gov/noaa/nws/ncep/viz/resourceManager/ui/spf/NewRbdNameDialog.java +++ /dev/null @@ -1,192 +0,0 @@ -package gov.noaa.nws.ncep.viz.resourceManager.ui.spf; - -import gov.noaa.nws.ncep.viz.resources.manager.SpfsManager; - -import java.io.File; - -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.SelectionAdapter; -import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Button; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Dialog; -import org.eclipse.swt.widgets.Display; -import org.eclipse.swt.widgets.Label; -import org.eclipse.swt.widgets.Layout; -import org.eclipse.swt.widgets.MessageBox; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.swt.widgets.Text; - - -public class NewRbdNameDialog extends Dialog { - - private String dialogTitle = "New Rbd Name"; - - /** - * Dialog shell. - */ - private Shell myShell; - - private Composite dialogComp; - - private Text newRbdNameText; - - private Label newRbdNameLabel; - - private Button submitButton; - - private String spfGroup, spfName;// not changable, just for validation - - private String newRbdName; - - public String getNewRbdName() { - return newRbdName; - } - - /** - * @param parentShell - */ - public NewRbdNameDialog(Shell parentShell, - String gName, String sName, String origRbdName ) { - super(parentShell); - myShell = parentShell; - newRbdName = origRbdName; - spfGroup = gName; - spfName = sName; - } - - /** - * closes the New Rbd Name Dialog - */ - public void close() { - if ( myShell != null ) myShell.dispose(); - } - - /* - * (non-Javadoc) - * - * @see - * com.raytheon.viz.ui.dialogs.CaveJFACEDialog#createDialogArea(org.eclipse - * .swt.widgets.Composite) - */ - protected Object open() { - Shell parentShell = getParent(); - Display display = parentShell.getDisplay(); - - /* - * create myShell for the NewRbdName dialog only - */ - myShell = new Shell(parentShell, SWT.DIALOG_TRIM); - - myShell.setText(dialogTitle); - - /* - * Start to Create the main layout for the shell. - */ - GridLayout mainLayout = new GridLayout(1, true); - mainLayout.marginHeight = 1; - mainLayout.marginWidth = 1; - myShell.setLayout(mainLayout); - myShell.setLocation(450, 450); - - /* - * Initialize all of the controls and layouts - */ - initializeComponents(myShell); - - myShell.pack(); - - myShell.open(); - while (!myShell.isDisposed()) { - if (!display.readAndDispatch()) { - display.sleep(); - } - } - - return null; - } - - protected void initializeComponents(Shell shell) { - int textWidth = 220; - int textHeight = 15; - int labelWidth = 120; - int labelHeight = 15; - - createNewRbdNameFields(shell, textWidth, textHeight, - labelWidth, labelHeight); - createSubmitButton(dialogComp, textHeight); - } - - private void createNewRbdNameFields(Shell shell, int textWidth, - int textHeight, int labelWidth, int labelHeight) { - dialogComp = new Composite(shell, SWT.NONE); - GridLayout gridLayout = new GridLayout(1, true); - dialogComp.setLayout(gridLayout); - - /* - * set up new RBD name fields - */ - Composite newRbdNameComp = new Composite(dialogComp, SWT.NONE); - GridLayout gl = new GridLayout(2, false); - newRbdNameComp.setLayout(gl); - - newRbdNameLabel = new Label(newRbdNameComp, SWT.NONE); - newRbdNameLabel.setLayoutData( new GridData( labelWidth, labelHeight ) ); - newRbdNameLabel.setText("New RBD Name:"); - newRbdNameText = new Text(newRbdNameComp, SWT.BORDER); - newRbdNameText.setLayoutData( new GridData( textWidth, textHeight ) ); - - } - - private void createSubmitButton(Composite parentComposite, int textHeight) { - Composite submitButtonComp = new Composite(parentComposite, SWT.NONE); - Layout layout = new GridLayout(1, false); - submitButtonComp.setLayout(layout); - - submitButton = new Button(submitButtonComp, SWT.NONE); - submitButton.setText("Submit"); - submitButton.setLayoutData(new GridData(100, textHeight + 15)); - submitButtonSelectionListenerAction(submitButton); - } - - - /** - * Add selection listener to submitButton - */ - private void submitButtonSelectionListenerAction(Button submitButton) { - submitButton.addSelectionListener(new SelectionAdapter() { - - @Override - public void widgetSelected(SelectionEvent e) { - doRbdNameValidate(); - } - }); - } - - protected void doRbdNameValidate() { - String newRBDnameString = null; - newRbdName = newRbdNameText.getText(); - - if(!SpfsManager.getInstance().isValidRbdName( newRbdName ) ) { - MessageBox mb = new MessageBox(myShell, SWT.ICON_ERROR); - mb.setMessage("Invalid RBD name."); - mb.setText("Error"); - mb.open(); - return; - } - else { - if( SpfsManager.getInstance().doesRbdExistInUserContext( spfGroup, spfName, newRbdName ) ) { - MessageBox mb = new MessageBox(myShell, SWT.ICON_ERROR); - mb.setMessage("The Rbd "+ newRBDnameString + " already used\nEnter a different RBD name."); - mb.setText("Error"); - mb.open(); - newRbdName = null; - return; - } - - close(); - } - } -} diff --git a/ncep/gov.noaa.nws.ncep.viz.resources/META-INF/MANIFEST.MF b/ncep/gov.noaa.nws.ncep.viz.resources/META-INF/MANIFEST.MF index d240a4b125..13b7c04a57 100644 --- a/ncep/gov.noaa.nws.ncep.viz.resources/META-INF/MANIFEST.MF +++ b/ncep/gov.noaa.nws.ncep.viz.resources/META-INF/MANIFEST.MF @@ -74,8 +74,10 @@ Import-Package: com.raytheon.uf.common.message.response, com.raytheon.uf.common.pointdata, com.raytheon.uf.viz.core.maps, com.raytheon.viz.alerts.observers, + com.raytheon.viz.core.gl, gov.noaa.nws.ncep.common.dataplugin.mcidas, gov.noaa.nws.ncep.common.dataplugin.ncgrib.ncdatatree, gov.noaa.nws.ncep.edex.common.ncinventory, gov.noaa.nws.ncep.edex.plugin.mosaic.common, + gov.noaa.nws.ncep.gempak.parameters.colorbar, gov.noaa.nws.ncep.viz.gempak.grid.inv diff --git a/ncep/gov.noaa.nws.ncep.viz.resources/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject b/ncep/gov.noaa.nws.ncep.viz.resources/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject index 13db995c5d..7c6442a235 100644 --- a/ncep/gov.noaa.nws.ncep.viz.resources/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject +++ b/ncep/gov.noaa.nws.ncep.viz.resources/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject @@ -1,4 +1,4 @@ gov.noaa.nws.ncep.viz.resources.time_match.NCTimeMatcher gov.noaa.nws.ncep.viz.resources.manager.RbdBundle gov.noaa.nws.ncep.viz.resources.manager.ResourceDefinition -gov.noaa.nws.ncep.viz.resources.manager.AttrSetGroup \ No newline at end of file +gov.noaa.nws.ncep.viz.resources.manager.AttrSetGroupgov.noaa.nws.ncep.viz.resources.colorBar.ColorBarResourceData \ No newline at end of file diff --git a/ncep/gov.noaa.nws.ncep.viz.resources/plugin.xml b/ncep/gov.noaa.nws.ncep.viz.resources/plugin.xml index 32349426ed..fdd4829866 100644 --- a/ncep/gov.noaa.nws.ncep.viz.resources/plugin.xml +++ b/ncep/gov.noaa.nws.ncep.viz.resources/plugin.xml @@ -30,5 +30,16 @@ extensionFilter=".xml">
+ + + + diff --git a/ncep/gov.noaa.nws.ncep.viz.resources/src/gov/noaa/nws/ncep/viz/resources/attributes/AbstractEditResourceAttrsInteractiveDialog.java b/ncep/gov.noaa.nws.ncep.viz.resources/src/gov/noaa/nws/ncep/viz/resources/attributes/AbstractEditResourceAttrsInteractiveDialog.java index eb3f8166b6..48b2916209 100644 --- a/ncep/gov.noaa.nws.ncep.viz.resources/src/gov/noaa/nws/ncep/viz/resources/attributes/AbstractEditResourceAttrsInteractiveDialog.java +++ b/ncep/gov.noaa.nws.ncep.viz.resources/src/gov/noaa/nws/ncep/viz/resources/attributes/AbstractEditResourceAttrsInteractiveDialog.java @@ -1,6 +1,7 @@ package gov.noaa.nws.ncep.viz.resources.attributes; import gov.noaa.nws.ncep.viz.resources.INatlCntrsResourceData; +import gov.noaa.nws.ncep.viz.ui.display.NCMapEditor; import gov.noaa.nws.ncep.viz.ui.display.NmapUiUtils; import org.eclipse.swt.SWT; @@ -23,6 +24,7 @@ import org.eclipse.swt.widgets.Shell; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * 03/29/2012 #651 S. Gurung Initial Creation. + * 06/21/2012 #569 G. Hull call refreshGUIElements() to update the Fade Display * * * @@ -107,6 +109,11 @@ public class AbstractEditResourceAttrsInteractiveDialog extends AbstractEditReso canBtn.addSelectionListener( new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { rscData.setRscAttrSet( new ResourceAttrSet(editedRscAttrSet)); + + // This is to update the Fade Display with a possible change in brightness + // which could have occured even though we are cancelling. + NmapUiUtils.getActiveNatlCntrsEditor().refreshGUIElements(); + ok=false; shell.dispose(); } @@ -133,6 +140,9 @@ public class AbstractEditResourceAttrsInteractiveDialog extends AbstractEditReso okBtn.addSelectionListener( new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { + // This is to update the Fade Display with a possible change in brightness. + NmapUiUtils.getActiveNatlCntrsEditor().refreshGUIElements(); + ok=true; // get the shell.dispose(); diff --git a/ncep/gov.noaa.nws.ncep.viz.resources/src/gov/noaa/nws/ncep/viz/resources/colorBar/ColorBarEditor.java b/ncep/gov.noaa.nws.ncep.viz.resources/src/gov/noaa/nws/ncep/viz/resources/colorBar/ColorBarEditor.java index ca97866b65..79cb2e53b5 100644 --- a/ncep/gov.noaa.nws.ncep.viz.resources/src/gov/noaa/nws/ncep/viz/resources/colorBar/ColorBarEditor.java +++ b/ncep/gov.noaa.nws.ncep.viz.resources/src/gov/noaa/nws/ncep/viz/resources/colorBar/ColorBarEditor.java @@ -1,16 +1,12 @@ package gov.noaa.nws.ncep.viz.resources.colorBar; import gov.noaa.nws.ncep.viz.common.ui.color.ColorButtonSelector; -import gov.noaa.nws.ncep.viz.ui.display.ColorBarFromColormap; import gov.noaa.nws.ncep.viz.ui.display.IColorBar; -import gov.noaa.nws.ncep.viz.ui.display.IColorBar.ColorBarAnchorLocation; -import gov.noaa.nws.ncep.viz.ui.display.IColorBar.ColorBarOrientation; +import gov.noaa.nws.ncep.gempak.parameters.colorbar.ColorBarAnchorLocation; +import gov.noaa.nws.ncep.gempak.parameters.colorbar.ColorBarOrientation; import java.util.ArrayList; -import javax.measure.unit.Unit; - -import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.util.IPropertyChangeListener; import org.eclipse.jface.util.PropertyChangeEvent; import org.eclipse.swt.SWT; @@ -22,7 +18,6 @@ import org.eclipse.swt.events.PaintEvent; import org.eclipse.swt.events.PaintListener; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.events.SelectionListener; import org.eclipse.swt.graphics.Color; import org.eclipse.swt.graphics.Cursor; import org.eclipse.swt.graphics.Font; @@ -44,12 +39,11 @@ import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Listener; import org.eclipse.swt.widgets.Spinner; import org.eclipse.swt.widgets.Text; -import org.eclipse.ui.PlatformUI; + /** -// This widget is used to edit ColorBars. ColorBars can be used on image based resources or on non-image -// resources and the behaviour is slightly different in each case. For non-images, a colorMap is used to create -// the intervals and associated colors while for images the colors are taken from the colorMap. + * This widget is used to edit ColorBars for non-imagery resources. + * * *
  * SOFTWARE HISTORY
@@ -57,6 +51,15 @@ import org.eclipse.ui.PlatformUI;
  * ------------ ----------  ----------- --------------------------
  * 03/21/10      #259        Greg Hull    Initial Creation.
  * 09/29/11      #248        Greg Hull    dispose()
+ * 07/17/12      #743        Archana      Refactored the packages for 
+ *                                        ColorBarAnchorLocation and ColorBarOrientation
+ * 07/26/12      #797        Archana      Removed the boolean updatingIntervals,
+ *                                        added the methods addModifyListenersForSpinners()
+ *                                        and removeModifyListenersForSpinners()
+ *                                        Updated the modifyEvent() for both max/min interval spinners to
+ *                                        exit if the spinners are set to the MAX/MIN Integer values respectively. 
+ *                                           
+ *                                           
  * 
  * 
* @@ -66,9 +69,9 @@ import org.eclipse.ui.PlatformUI; public class ColorBarEditor extends Composite { private final int CBAR_XOFF = 15; - private final int CBAR_YOFF = 50; +// private final int CBAR_YOFF = 50; private ArrayList colorBarRects = null; - private ArrayList intrvlsToLabel = null; +// private ArrayList intrvlsToLabel = null; private int seldIntrvl = 0; private int dragXvalue = 0; @@ -83,13 +86,20 @@ public class ColorBarEditor extends Composite { private Point canvasSize = null; - private ArrayList> availUnits; +// private ArrayList> availUnits; private Float pixPerUnit = 1.0f; private ColorBarAnchorLocation[] availAnchorLocs = new ColorBarAnchorLocation[] { - ColorBarAnchorLocation.UpperLeft, ColorBarAnchorLocation.UpperRight, - ColorBarAnchorLocation.LowerLeft, ColorBarAnchorLocation.LowerRight + ColorBarAnchorLocation.UpperLeft, +// ColorBarAnchorLocation.UpperCenter, + ColorBarAnchorLocation.UpperRight, +// ColorBarAnchorLocation.CenterLeft, +// ColorBarAnchorLocation.CenterCenter, +// ColorBarAnchorLocation.CenterRight, + ColorBarAnchorLocation.LowerLeft, +// ColorBarAnchorLocation.LowerCenter, + ColorBarAnchorLocation.LowerRight }; final Combo orientationCombo; @@ -124,13 +134,13 @@ public class ColorBarEditor extends Composite { // If the colorbar applies to a color mappable image. // In this case the - private Boolean applyToImage = false; // this +// private Boolean applyToImage = false; // this private Display colorDevice; private double scaleMult = 1.0; - private boolean updatingIntervals = false; +// private boolean updatingIntervals = false; private final Listener mouseLstnr = new Listener() { @@ -153,7 +163,7 @@ public class ColorBarEditor extends Composite { // first check to see if clicking on the edge of an interval // (give them a little room for error) // (can't drag the last interval) - if( !applyToImage && colorBar.getDrawToScale() ) { + if( colorBar.getDrawToScale() ) { if( intrvlIndx != colorBarRects.size()-1 && Math.abs( e.x - rect.x-rect.width ) <= 1 ) { @@ -423,21 +433,21 @@ public class ColorBarEditor extends Composite { // (Some widgets need to be 'final' since they are access by listers // but java complains if they are not set in the constructor so I'm // creating them here. Don't like it but don't know a prefered way around it.) - if( applyToImage ) { - pixelNumTxt = new Text( topForm, SWT.BORDER | SWT.READ_ONLY ); - labelPixelBtn = new Button( topForm, SWT.CHECK ); - createImageCbarWidgets( ); - - intrvlMinSpnr = null; - intrvlMaxSpnr = null; - negInfIntrvlBtn = null; - posInfIntrvlBtn = null; - negInfIntrvlTxt = null; - posInfIntrvlTxt = null; - - intrvlColorSelector.getButton().setEnabled(false); - } - else { +// if( applyToImage ) { +// pixelNumTxt = new Text( topForm, SWT.BORDER | SWT.READ_ONLY ); +// labelPixelBtn = new Button( topForm, SWT.CHECK ); +// createImageCbarWidgets( ); +// +// intrvlMinSpnr = null; +// intrvlMaxSpnr = null; +// negInfIntrvlBtn = null; +// posInfIntrvlBtn = null; +// negInfIntrvlTxt = null; +// posInfIntrvlTxt = null; +// +// intrvlColorSelector.getButton().setEnabled(false); +// } +// else { //labelColorComp.setVisible( false ); labelPixelBtn = null; pixelNumTxt = null; @@ -448,7 +458,7 @@ public class ColorBarEditor extends Composite { negInfIntrvlTxt = new Text( topForm, SWT.BORDER | SWT.READ_ONLY ); posInfIntrvlTxt = new Text( topForm, SWT.BORDER | SWT.READ_ONLY ); createNonImageCbarWidgets(); - } +// } initWidgets(); @@ -458,78 +468,78 @@ public class ColorBarEditor extends Composite { updateSelectedInterval(); } - private void createImageCbarWidgets() { - Composite topForm = this; - FormData fd; - Button prevIntrvl = new Button( topForm, SWT.PUSH ); - fd = new FormData(); - prevIntrvl.setText(" < "); - fd.top = new FormAttachment( colorComp, 0, SWT.TOP ); - fd.right = new FormAttachment( colorComp, -30, SWT.LEFT ); - prevIntrvl.setLayoutData( fd ); - - Button nextIntrvl = new Button( topForm, SWT.PUSH ); - fd = new FormData(); - nextIntrvl.setText(" > "); - fd.top = new FormAttachment( colorComp, 0, SWT.TOP ); - fd.left = new FormAttachment( colorComp, 30, SWT.RIGHT ); - nextIntrvl.setLayoutData( fd ); - - fd = new FormData(); - fd.top = new FormAttachment( prevIntrvl, 0, SWT.TOP ); - fd.right = new FormAttachment( prevIntrvl, -30, SWT.LEFT ); - fd.width = 30; - pixelNumTxt.setLayoutData( fd ); - pixelNumTxt.setBackground( getParent().getBackground() ); - - Label pixNumLbl = new Label( topForm, SWT.None ); - pixNumLbl.setText("Pixel"); - fd = new FormData(); - fd.bottom = new FormAttachment( pixelNumTxt, 0, SWT.TOP ); - fd.left = new FormAttachment( pixelNumTxt, 0, SWT.LEFT ); - pixNumLbl.setLayoutData( fd ); - - labelPixelBtn.setText("Label Pixel"); - fd = new FormData(); - fd.top = new FormAttachment( nextIntrvl, 2, SWT.TOP ); - fd.left = new FormAttachment( nextIntrvl, 30, SWT.RIGHT ); - labelPixelBtn.setLayoutData( fd ); - - prevIntrvl.addSelectionListener( new SelectionAdapter() { - @Override - public void widgetSelected(SelectionEvent e) { - if( seldIntrvl > 0 ) { - seldIntrvl--; - computeColorBarRectangles(); - updateSelectedInterval(); - } - } - }); - - nextIntrvl.addSelectionListener( new SelectionAdapter() { - @Override - public void widgetSelected(SelectionEvent e) { - if( seldIntrvl < colorBar.getNumIntervals()-1 ) { - seldIntrvl++; - computeColorBarRectangles(); - updateSelectedInterval(); - } - } - }); - - labelPixelBtn.addSelectionListener( new SelectionAdapter() { - @Override - public void widgetSelected(SelectionEvent e) { - if( labelPixelBtn.getSelection() ) { - colorBar.labelInterval(seldIntrvl, Integer.toString(seldIntrvl)); - } - else { - colorBar.labelInterval(seldIntrvl, null); - } - canvas.redraw(); - } - }); - } +// private void createImageCbarWidgets() { +// Composite topForm = this; +// FormData fd; +// Button prevIntrvl = new Button( topForm, SWT.PUSH ); +// fd = new FormData(); +// prevIntrvl.setText(" < "); +// fd.top = new FormAttachment( colorComp, 0, SWT.TOP ); +// fd.right = new FormAttachment( colorComp, -30, SWT.LEFT ); +// prevIntrvl.setLayoutData( fd ); +// +// Button nextIntrvl = new Button( topForm, SWT.PUSH ); +// fd = new FormData(); +// nextIntrvl.setText(" > "); +// fd.top = new FormAttachment( colorComp, 0, SWT.TOP ); +// fd.left = new FormAttachment( colorComp, 30, SWT.RIGHT ); +// nextIntrvl.setLayoutData( fd ); +// +// fd = new FormData(); +// fd.top = new FormAttachment( prevIntrvl, 0, SWT.TOP ); +// fd.right = new FormAttachment( prevIntrvl, -30, SWT.LEFT ); +// fd.width = 30; +// pixelNumTxt.setLayoutData( fd ); +// pixelNumTxt.setBackground( getParent().getBackground() ); +// +// Label pixNumLbl = new Label( topForm, SWT.None ); +// pixNumLbl.setText("Pixel"); +// fd = new FormData(); +// fd.bottom = new FormAttachment( pixelNumTxt, 0, SWT.TOP ); +// fd.left = new FormAttachment( pixelNumTxt, 0, SWT.LEFT ); +// pixNumLbl.setLayoutData( fd ); +// +// labelPixelBtn.setText("Label Pixel"); +// fd = new FormData(); +// fd.top = new FormAttachment( nextIntrvl, 2, SWT.TOP ); +// fd.left = new FormAttachment( nextIntrvl, 30, SWT.RIGHT ); +// labelPixelBtn.setLayoutData( fd ); +// +// prevIntrvl.addSelectionListener( new SelectionAdapter() { +// @Override +// public void widgetSelected(SelectionEvent e) { +// if( seldIntrvl > 0 ) { +// seldIntrvl--; +// computeColorBarRectangles(); +// updateSelectedInterval(); +// } +// } +// }); +// +// nextIntrvl.addSelectionListener( new SelectionAdapter() { +// @Override +// public void widgetSelected(SelectionEvent e) { +// if( seldIntrvl < colorBar.getNumIntervals()-1 ) { +// seldIntrvl++; +// computeColorBarRectangles(); +// updateSelectedInterval(); +// } +// } +// }); +// +// labelPixelBtn.addSelectionListener( new SelectionAdapter() { +// @Override +// public void widgetSelected(SelectionEvent e) { +// if( labelPixelBtn.getSelection() ) { +// colorBar.labelInterval(seldIntrvl, Integer.toString(seldIntrvl)); +// } +// else { +// colorBar.labelInterval(seldIntrvl, null); +// } +// canvas.redraw(); +// } +// }); +// } private void createNonImageCbarWidgets() { Composite topForm = this; @@ -694,45 +704,18 @@ public class ColorBarEditor extends Composite { } }); - intrvlMinSpnr.addModifyListener( new ModifyListener() { - @Override - public void modifyText(ModifyEvent e) { - if( updatingIntervals ) { - return; - } - Float minVal = (float)intrvlMinSpnr.getSelection() / (float)scaleMult; -//// This should not happen since -// if( seldIntrvl != 0 && minVal <= colorBar.getIntervalMin(seldIntrvl-1 )) { -// System.out.println("Can't set Interval min value to be less than the prev interval"); -// return; -// } - colorBar.setIntervalMin(seldIntrvl, minVal); - computeColorBarRectangles(); - } - }); + intrvlMinSpnr.addModifyListener( minSpnrListener); - intrvlMaxSpnr.addModifyListener(new ModifyListener() { - @Override - public void modifyText(ModifyEvent e) { - if( updatingIntervals ) { - return; - } - - Float maxVal = (float)intrvlMaxSpnr.getSelection() / (float)scaleMult; + intrvlMaxSpnr.addModifyListener(maxSpnrListener); - colorBar.setIntervalMax(seldIntrvl, maxVal); - computeColorBarRectangles(); - } - }); - - updatingIntervals = true; + removeModifyListenersForSpinners(); intrvlMinSpnr.setDigits( colorBar.getNumDecimals() ); intrvlMinSpnr.setIncrement(1); intrvlMaxSpnr.setDigits( colorBar.getNumDecimals() ); intrvlMaxSpnr.setIncrement(1); - updatingIntervals = false; + addModifyListenersForSpinners(); // intrvlMinSpnr.addSelectionListener( new SelectionListener() { // @Override @@ -792,7 +775,7 @@ public class ColorBarEditor extends Composite { // if there is a colorMap then this is for images and this widget will // be taylored to image colorBars. - applyToImage = (colorBar instanceof ColorBarFromColormap == true); +// applyToImage = (colorBar instanceof ColorBarFromColormap == true); colorBar.setColorDevice( colorDevice ); @@ -888,10 +871,10 @@ public class ColorBarEditor extends Composite { } }); - if( applyToImage ) { - drawToScaleBtn.setVisible( false ); - } - else { +// if( applyToImage ) { +// drawToScaleBtn.setVisible( false ); +// } +// else { drawToScaleBtn.setSelection( colorBar.getDrawToScale() ); drawToScaleBtn.addSelectionListener( new SelectionAdapter() { @@ -900,7 +883,7 @@ public class ColorBarEditor extends Composite { computeColorBarRectangles(); } }); - } +// } canvas.setFont(font); canvas.setBackground( canvasColor ); @@ -1051,13 +1034,13 @@ public class ColorBarEditor extends Composite { } // for image cmaps draw a border around the colorbar - if( applyToImage ) { - gc.setForeground( labelColor ); - Rectangle r1 = colorBarRects.get(0); - Rectangle r2 = colorBarRects.get(colorBarRects.size()-1); - - gc.drawRectangle(r1.x-1, r1.y-1, r2.x+r2.width+1-r1.x, r2.height+1 ); - } +// if( applyToImage ) { +// gc.setForeground( labelColor ); +// Rectangle r1 = colorBarRects.get(0); +// Rectangle r2 = colorBarRects.get(colorBarRects.size()-1); +// +// gc.drawRectangle(r1.x-1, r1.y-1, r2.x+r2.width+1-r1.x, r2.height+1 ); +// } Rectangle seldRect=colorBarRects.get(seldIntrvl); @@ -1077,12 +1060,12 @@ public class ColorBarEditor extends Composite { seldRect.y-textHeight*2, true ); } else { - if( applyToImage ) { - gc.drawRectangle(seldRect.x, seldRect.y-2, seldRect.width, seldRect.height+3 ); - } - else { +// if( applyToImage ) { +// gc.drawRectangle(seldRect.x, seldRect.y-2, seldRect.width, seldRect.height+3 ); +// } +// else { gc.drawRectangle(seldRect.x, seldRect.y-1, seldRect.width, seldRect.height+2 ); - } +// } } // if showing the labels, draw them based on whether this for an image or not @@ -1090,20 +1073,20 @@ public class ColorBarEditor extends Composite { gc.setForeground( labelColor ); - if( applyToImage ) { - for( int pix=0 ; pix * * @author archana @@ -97,8 +99,15 @@ public class ColorBarFromColorMapAttrsEditorComposite extends Composite { private ColorBarAnchorLocation[] availAnchorLocs = new ColorBarAnchorLocation[] { ColorBarAnchorLocation.UpperLeft, +// ColorBarAnchorLocation.UpperCenter, ColorBarAnchorLocation.UpperRight, - ColorBarAnchorLocation.LowerLeft, ColorBarAnchorLocation.LowerRight }; +// ColorBarAnchorLocation.CenterLeft, +// ColorBarAnchorLocation.CenterCenter, +// ColorBarAnchorLocation.CenterRight, + ColorBarAnchorLocation.LowerLeft, +// ColorBarAnchorLocation.LowerCenter, + ColorBarAnchorLocation.LowerRight, + }; private static final transient IUFStatusHandler statusHandler = UFStatus .getHandler(ColorBarFromColorMapAttrsEditorComposite.class); diff --git a/ncep/gov.noaa.nws.ncep.viz.resources/src/gov/noaa/nws/ncep/viz/resources/colorBar/ColorBarResource.java b/ncep/gov.noaa.nws.ncep.viz.resources/src/gov/noaa/nws/ncep/viz/resources/colorBar/ColorBarResource.java index a97aa5852e..7e2acb7c73 100644 --- a/ncep/gov.noaa.nws.ncep.viz.resources/src/gov/noaa/nws/ncep/viz/resources/colorBar/ColorBarResource.java +++ b/ncep/gov.noaa.nws.ncep.viz.resources/src/gov/noaa/nws/ncep/viz/resources/colorBar/ColorBarResource.java @@ -1,22 +1,20 @@ package gov.noaa.nws.ncep.viz.resources.colorBar; - import gov.noaa.nws.ncep.viz.ui.display.IColorBar; - -import gov.noaa.nws.ncep.viz.ui.display.IColorBar.ColorBarAnchorLocation; -import gov.noaa.nws.ncep.viz.ui.display.IColorBar.ColorBarOrientation; -//import gov.noaa.nws.ncep.viz.ui.display.ColorBar.ColorBarAnchorLocation; -//import gov.noaa.nws.ncep.viz.ui.display.ColorBar.ColorBarOrientation; - +import gov.noaa.nws.ncep.gempak.parameters.colorbar.ColorBarAnchorLocation; +import gov.noaa.nws.ncep.gempak.parameters.colorbar.ColorBarOrientation; import com.raytheon.uf.viz.core.DrawableString; import com.raytheon.uf.viz.core.IExtent; import com.raytheon.uf.viz.core.IGraphicsTarget; + import com.raytheon.uf.viz.core.PixelExtent; import com.raytheon.uf.viz.core.IGraphicsTarget.HorizontalAlignment; import com.raytheon.uf.viz.core.IGraphicsTarget.VerticalAlignment; import com.raytheon.uf.viz.core.drawables.IDescriptor; + import com.raytheon.uf.viz.core.drawables.PaintProperties; import com.raytheon.uf.viz.core.exception.VizException; + import com.raytheon.uf.viz.core.rsc.AbstractVizResource; import com.raytheon.uf.viz.core.rsc.LoadProperties; @@ -38,6 +36,10 @@ import org.eclipse.swt.graphics.Rectangle; * display its unit * 06/07/12 #794 Archana Updated paintInternal() to reverse * the color order in the color-bar. +* 07/10/12 #743 Archana Updated paintInternal() to accommodate GEMPAK CLRBAR parameter +* Updated paintInternal() to fix label displacement while changing the +* zoom or the underlying area. +* * * * @author ghull @@ -64,6 +66,7 @@ public class ColorBarResource extends AbstractVizResource pixExtentsMinX + pixExtentsWidth ){ + cbarPixLength = pixExtentsMaxX - minX; + maxX = minX + cbarPixLength; + } } else { maxX = minX + cbarPixWidth; maxY = minY + cbarPixLength; + if(maxY > pixExtentsMinY + pixExtentsHeight ){ + cbarPixLength = pixExtentsMaxY - pixExtentsHeight*yViewCoord; + maxY = minY + cbarPixLength; } } - else if( colorBar.getAnchorLoc() == ColorBarAnchorLocation.UpperRight ) { - maxX = pixExtents.getMaxX() - xMargin; - minY = pixExtents.getMinY() + yMargin + 50; - textY = minY-yMargin - 5; - if( colorBar.getOrientation() == ColorBarOrientation.Horizontal ) { + + + } + else if( anchorLocation == ColorBarAnchorLocation.UpperRight ) { + maxX = pixExtentsMaxX - pixExtentsWidth*xViewCoord; + minY = pixExtentsMinY + pixExtentsHeight*yViewCoord ; + if( colorBarOrientation == ColorBarOrientation.Horizontal ) { minX = maxX - cbarPixLength; maxY = minY + cbarPixWidth; - textX = minX; + + if(minX < pixExtentsMinX ){ + cbarPixLength = maxX - pixExtentsMinX; + minX = maxX - cbarPixLength; + } } else { minX = maxX - cbarPixWidth; maxY = minY + cbarPixLength; - if ( unitStr != null ) - textX = minX - 15* unitStr.length(); + if(maxY > pixExtentsMinY + pixExtentsHeight ){ + cbarPixLength = pixExtentsMaxY - pixExtentsHeight*yViewCoord; + maxY = minY + cbarPixLength; + } } } - else if( colorBar.getAnchorLoc() == ColorBarAnchorLocation.LowerLeft ) { - minX = pixExtents.getMinX() + xMargin; - maxY = pixExtents.getMaxY() - yMargin; - textX = minX + 10; + else if( anchorLocation == ColorBarAnchorLocation.LowerLeft ) { + + minX = pixExtentsMinX + pixExtentsWidth*xViewCoord; + maxY = pixExtentsMaxY - pixExtentsHeight*yViewCoord; - if( colorBar.getOrientation() == ColorBarOrientation.Horizontal ) { + + if( colorBarOrientation == ColorBarOrientation.Horizontal ) { maxX = minX + cbarPixLength; minY = maxY - cbarPixWidth; - textX = minX; - textY = minY - 50; + + if( maxX > pixExtentsMaxX ){ + cbarPixLength = pixExtentsMaxX - minX; + maxX = minX + cbarPixLength*0.999; + + } } else { + maxX = minX + cbarPixWidth; minY = maxY - cbarPixLength; - textY = minY+yMargin-8; + if( (minY -yMargin*3) < pixExtentsMinY ){ + minY = pixExtentsMinY + yMargin*11; + cbarPixLength = maxY - minY; } + } - else if( colorBar.getAnchorLoc() == ColorBarAnchorLocation.LowerRight ) { - maxX = pixExtents.getMaxX() - xMargin; - maxY = pixExtents.getMaxY() - yMargin; -// textX = maxX-130; - if( colorBar.getOrientation() == ColorBarOrientation.Horizontal ) { + + + } + else if( anchorLocation == ColorBarAnchorLocation.LowerRight ) { + + maxX = pixExtentsMaxX - pixExtentsWidth*xViewCoord; + maxY = pixExtentsMaxY - pixExtentsHeight*yViewCoord; + + if( colorBarOrientation == ColorBarOrientation.Horizontal ) { minX = maxX - cbarPixLength; minY = maxY - cbarPixWidth; - textX = minX; - textY = minY - 50; - + if(minX < pixExtentsMinX){ + cbarPixLength = maxX - pixExtentsMinX; + minX = maxX - cbarPixLength; + } } else { minX = maxX - cbarPixWidth; minY = maxY - cbarPixLength; - textY = minY-10; - if ( unitStr != null ) - textX = minX - 15* unitStr.length(); + + if( (minY -yMargin*3) < pixExtentsMinY ){ + minY = pixExtentsMinY + yMargin*11; + cbarPixLength = maxY - minY; + } + } + + } + else if(anchorLocation == ColorBarAnchorLocation.CenterLeft){ + minX = pixExtentsMinX + pixExtentsWidth*xViewCoord ; + if(colorBarOrientation == ColorBarOrientation.Vertical){ + maxX = minX+cbarPixWidth; + minY = pixExtentsMinY + pixExtentsHeight/2 -cbarPixLength/2; + maxY = pixExtentsMinY + pixExtentsHeight/2 +cbarPixLength/2; + + if( (minY - yMargin*11) < pixExtentsMinY ){ + minY = pixExtentsMinY + yMargin*11; + cbarPixLength = pixExtentsMaxY - minY; + maxY = minY+cbarPixLength; + } + + }else{ + maxX = minX + cbarPixLength; + minY = pixExtentsMinY + pixExtentsHeight/2 - cbarPixWidth/2 ; + maxY = minY + cbarPixWidth; + if(maxX >= pixExtentsMaxX) + maxX = minX + cbarPixLength*0.998; + } + + } + else if(anchorLocation == ColorBarAnchorLocation.CenterRight){ + + maxX = pixExtentsMaxX - pixExtentsWidth*xViewCoord ; + + + if(colorBarOrientation == ColorBarOrientation.Vertical){ + minX = maxX - cbarPixWidth; + minY = pixExtentsMinY + pixExtentsHeight/2 -cbarPixLength/2; + maxY = pixExtentsMinY + pixExtentsHeight/2 +cbarPixLength/2; + if( (minY -yMargin*11) < pixExtentsMinY ){ + minY = pixExtentsMinY + yMargin*11; + cbarPixLength = pixExtentsMaxY - minY; + maxY = minY+cbarPixLength; + } + + }else{ + minX = maxX - cbarPixLength; + minY = pixExtentsMinY + pixExtentsHeight/2 - cbarPixWidth/2 ; + maxY = minY + cbarPixWidth; + if(minX < pixExtentsMinX) + minX = maxX - cbarPixLength*0.998; + } + + + } + else if(anchorLocation == ColorBarAnchorLocation.CenterCenter){ + if(colorBarOrientation == ColorBarOrientation.Vertical){ + minX = pixExtentsMinX + pixExtentsWidth/2 - cbarPixWidth/2; + maxX = minX + cbarPixWidth; + minY = pixExtentsMinY + pixExtentsHeight/2 -cbarPixLength/2; + maxY = pixExtentsMinY + pixExtentsHeight/2 +cbarPixLength/2; + + if( (minY -yMargin*11) < pixExtentsMinY ){ + minY = pixExtentsMinY + yMargin*11; + cbarPixLength = pixExtentsMaxY - minY; + maxY = minY+cbarPixLength; + } + + }else{ + minY = pixExtentsMinY + pixExtentsHeight/2 -cbarPixWidth/2; + maxY = pixExtentsMinY + pixExtentsHeight/2 +cbarPixWidth/2; + minX = pixExtentsMinX + pixExtentsWidth/2 - cbarPixLength/2; + maxX = minX + cbarPixLength; + } + + + } + else if(anchorLocation == ColorBarAnchorLocation.UpperCenter){ + if(colorBarOrientation == ColorBarOrientation.Vertical){ + minX = pixExtentsMinX + pixExtentsWidth/2 - cbarPixWidth/2; + maxX = minX+cbarPixWidth; + minY = pixExtentsMinY + pixExtentsHeight*yViewCoord; + maxY = minY + cbarPixLength; + //If the color bar overshoots the boundary, it is brought back inside. + if(maxY > pixExtentsMinY + pixExtentsHeight ){ + cbarPixLength = pixExtentsMaxY - pixExtentsHeight*(yViewCoord); + maxY = minY + cbarPixLength; + } + + }else{ + minX = pixExtentsMinX + pixExtentsWidth/2 - cbarPixLength/2; + maxX = minX + cbarPixLength; + minY = pixExtentsMinY + pixExtentsHeight*yViewCoord; + maxY = minY + cbarPixWidth; + if(maxX > pixExtentsMinX + pixExtentsWidth ){ + cbarPixWidth = pixExtentsMaxX - pixExtentsWidth; + maxX = minX + cbarPixWidth; + } + } + + + }else if (anchorLocation == ColorBarAnchorLocation.LowerCenter){ + if(colorBarOrientation == ColorBarOrientation.Vertical){ + minX = pixExtentsMinX + pixExtentsWidth/2 - cbarPixWidth/2; + maxX = minX+cbarPixWidth; + maxY = pixExtentsMaxY- pixExtentsHeight*yViewCoord; + minY = maxY - cbarPixLength; + + if( (minY -yMargin*11) < pixExtentsMinY ){ + minY = pixExtentsMinY + yMargin*11; + cbarPixLength = pixExtentsMaxY - minY; + maxY = minY+cbarPixLength; + } + + }else{ + minX = pixExtentsMinX + pixExtentsWidth/2 - cbarPixLength/2; + maxX = minX + cbarPixLength; + maxY = pixExtentsMaxY- pixExtentsHeight*yViewCoord; + minY = maxY - cbarPixWidth; } } @@ -185,11 +363,10 @@ public class ColorBarResource extends AbstractVizResource 0){ + DrawableString unitStrToDraw = new DrawableString(unitStr, colorOfAllLabels); + textX = minX; + textY = minY - yMargin*3; unitStrToDraw.setCoordinates(textX, textY); + if(colorBarOrientation == ColorBarOrientation.Vertical + &&( anchorLocation == ColorBarAnchorLocation.LowerRight + || anchorLocation == ColorBarAnchorLocation.CenterRight + || anchorLocation == ColorBarAnchorLocation.UpperRight)) + unitStrToDraw.horizontalAlignment = HorizontalAlignment.RIGHT; + target.drawStrings(unitStrToDraw); } @@ -236,7 +421,7 @@ public class ColorBarResource extends AbstractVizResource 0) //check gets rid of the ghost outline if the colormap was cleared - target.drawRect(colorBarExtent, labelColor, 1.0f, 1.0d); + if (numIntrvls > 0 && colorBar.isDrawBoxAroundColorBar()) { + //check for 'numIntrvls' gets rid of the ghost outline if the colormap was cleared + colorBarExtent = new PixelExtent( minX, maxX, minY, maxY ); + target.drawRect(colorBarExtent, colorOfAllLabels, 1.0f, 1.0d); + } } } catch (VizException e) { @@ -397,9 +621,14 @@ public class ColorBarResource extends AbstractVizResource + * SOFTWARE HISTORY + * Date Ticket# Engineer Description + * ------------ ---------- ----------- -------------------------- + * 09/05/12 #860 Greg Hull Created for the ResourceDefinitions time cache + * + * + * + * @author ghull + * @version 1 + */ + +public class DataTimesCacheEntry implements IURIRefreshCallback { + + // TODO : picked 30 seconds out of my ?#*@!. We can use whatever makes the most sense. + private static final long cacheHoldTime = 30*1000; // 30 seconds + + // set to true when we are added to the URICatalog + private Boolean inUriCatalog = false; + + private Map resourceConstraints; + + private DataTime latestTime; // may be set separately from dataTimes + + private List dataTimes; + private long cacheTime; // the time the dataTimes were queried or 0 if not set yet + + public DataTimesCacheEntry( Map reqCon ) { + resourceConstraints = reqCon; + cacheTime = 0; + dataTimes = new ArrayList(); + latestTime = null; + } + + // if this is added to the URI Catalog then Raytheon's MenuUpdater will + // call updateTime() to update the latest time. + // + public void addToUriCatalog() { + if( !inUriCatalog ) { + URICatalog.getInstance().catalogAndQueryDataURI( resourceConstraints, this ); + inUriCatalog = true; + } + } + + // return the latest time, or a Null dataTime if no data, or a null value + // if either the cache has expired or a time has not been set yet. + // + // if in the catalog this will be up to date and no query is needed. + // if not and the cache is still valid, then use the stored time, + // if out of date then query all the times. + // TODO (do we need to check if the inventory is being utilized and if not + // possibly not do the query since it may(?) take too long?) + // + public DataTime getLatestTime() { + if( inUriCatalog ) { + return latestTime; + } + else if( System.currentTimeMillis()-cacheTime < cacheHoldTime ) { + return latestTime; + } + else { + return null; + } +// // sanity check +// if( latestTime != null && +// !latestTime.isNull() ) { +// +// if( !dataTimes.isEmpty() && +// latestTime.getValidTime().getTimeInMillis() != +// dataTimes.get( dataTimes.size()-1 ).getValidTime().getTimeInMillis() ) { +// out.println("??latestTime and lastTime in availTimes list don't match"); +// } +// } + } + + // return null to indicate not set + + public List getAvailableTimes( ) { + if( cacheTime == 0 ) { + return null; + } + else if( System.currentTimeMillis()-cacheTime < cacheHoldTime ) { +// out.println("returning cached times from "+ +// (System.currentTimeMillis()-cacheTime) + " msecs ago"); + return dataTimes; + } + return null; + } + + public List getAvailableTimes( Boolean ignoreCacheTime ) { + if( ignoreCacheTime ) { + return dataTimes; + } + return getAvailableTimes(); + } + + // Set the cache time to the current time assuming that the times were + // just queried. + public void setAvailableTimes( List dtlist ) { + cacheTime = System.currentTimeMillis(); + dataTimes = new ArrayList( dtlist ); + + // if the latestTime has not been set yet, set it. + if( latestTime == null ) { + if( dataTimes.isEmpty() ) { + synchronized ( this ) { + latestTime = new DataTime(new Date(0)); + } + } + else { + updateTime( dataTimes.get( dataTimes.size()-1 ) ); + } + } + } + + // this is called by Raytheon's MenuUpdater class which processes DataURI + // notifications and updates the URICatalog to which this has been added. + // + @Override + public void updateTime(DataTime newTime) { + synchronized ( this ) { + if( newTime == null ) { + if( latestTime == null ) { + latestTime = new DataTime(new Date(0)); + } + else if( !latestTime.isNull() ) { + out.println("Sanity check: updateTIme for "+ resourceConstraints.toString() +" with null time when the latestTime is already set" ); + /// ??? what does this mean? Shouldn't happen. + } + } + else if( latestTime == null ) { + latestTime = newTime; + } + // NOTE : I think this will rarely, if ever, matter, but in the case where the valid time is newer but the reftime is older, + // and choose the time with the most recent refTime. + // + else if( newTime.getRefTime().getTime() >= + latestTime.getRefTime().getTime() && + newTime.getValidTime().getTimeInMillis() > + latestTime.getValidTime().getTimeInMillis() ) { + +// out.println("updateTime() for RscName "+ resourceConstraints.toString()+ +// "from :"+ latestTime.toString() + ") -> newTime ("+newTime.toString() ); + + latestTime = newTime; + } + } + } + +} diff --git a/ncep/gov.noaa.nws.ncep.viz.resources/src/gov/noaa/nws/ncep/viz/resources/manager/PredefinedAreasMngr.java b/ncep/gov.noaa.nws.ncep.viz.resources/src/gov/noaa/nws/ncep/viz/resources/manager/PredefinedAreasMngr.java index d741c76023..8395a00215 100644 --- a/ncep/gov.noaa.nws.ncep.viz.resources/src/gov/noaa/nws/ncep/viz/resources/manager/PredefinedAreasMngr.java +++ b/ncep/gov.noaa.nws.ncep.viz.resources/src/gov/noaa/nws/ncep/viz/resources/manager/PredefinedAreasMngr.java @@ -7,7 +7,11 @@ import java.util.TreeMap; import java.util.TreeSet; import java.util.Vector; import java.io.File; +import java.io.FileReader; import java.io.FilenameFilter; +import java.io.IOException; + +import javax.xml.bind.JAXBException; import com.raytheon.uf.common.localization.LocalizationFile; import com.raytheon.uf.common.serialization.SerializationException; @@ -17,6 +21,7 @@ import com.raytheon.uf.viz.core.exception.VizException; import gov.noaa.nws.ncep.viz.common.ui.NmapCommon; import gov.noaa.nws.ncep.viz.localization.NcPathManager; import gov.noaa.nws.ncep.viz.localization.NcPathManager.NcPathConstants; +import gov.noaa.nws.ncep.viz.ui.display.NCMapRenderableDisplay; import gov.noaa.nws.ncep.viz.ui.display.PredefinedArea; /** @@ -29,7 +34,7 @@ import gov.noaa.nws.ncep.viz.ui.display.PredefinedArea; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * 07/28/11 #450 Greg Hull Created / broke out from NmapResourceUtils. Use NcPathManager - * + * 07/10/12 #646 Greg Hull createPredefinedArea * * * @author @@ -138,4 +143,40 @@ public class PredefinedAreasMngr { throw new VizException( e ); } } + + public static PredefinedArea createPredefinedArea( + NCMapRenderableDisplay display ) throws VizException { + PredefinedArea pArea = new PredefinedArea(); + pArea.setPredefinedArea( display ); + + return clonePredefinedArea( pArea ); + } + + public static PredefinedArea clonePredefinedArea( PredefinedArea pArea ) throws VizException { + + try { + File tempRbdFile = File.createTempFile("tempArea-", ".xml"); + + SerializationUtil.jaxbMarshalToXmlFile( pArea, + tempRbdFile.getAbsolutePath() ); + String s = null; + FileReader fr = new FileReader( tempRbdFile ); + char[] b = new char[ (int)tempRbdFile.length() ]; + fr.read(b); + fr.close(); + s = new String(b); + + pArea = (PredefinedArea)SerializationUtil.unmarshalFromXml( s ); + tempRbdFile.delete(); + + return pArea; + + } catch (SerializationException e) { + throw new VizException( e ); + } catch (IOException e) { // from createTempFile + throw new VizException( e ); + } catch (JAXBException e) { + throw new VizException( e ); + } + } } diff --git a/ncep/gov.noaa.nws.ncep.viz.resources/src/gov/noaa/nws/ncep/viz/resources/manager/RbdBundle.java b/ncep/gov.noaa.nws.ncep.viz.resources/src/gov/noaa/nws/ncep/viz/resources/manager/RbdBundle.java index bbdadb25f2..b037c77444 100644 --- a/ncep/gov.noaa.nws.ncep.viz.resources/src/gov/noaa/nws/ncep/viz/resources/manager/RbdBundle.java +++ b/ncep/gov.noaa.nws.ncep.viz.resources/src/gov/noaa/nws/ncep/viz/resources/manager/RbdBundle.java @@ -31,6 +31,8 @@ import gov.noaa.nws.ncep.viz.ui.display.PaneID; import java.io.File; import java.io.FileReader; +import java.io.IOException; +import java.util.Date; import java.util.Map; import javax.xml.bind.JAXBException; @@ -43,6 +45,7 @@ import javax.xml.bind.annotation.XmlRootElement; import com.raytheon.uf.common.localization.LocalizationFile; import com.raytheon.uf.common.serialization.ISerializableObject; +import com.raytheon.uf.common.serialization.SerializationException; import com.raytheon.uf.common.serialization.SerializationUtil; import com.raytheon.uf.viz.core.VariableSubstitutionUtil; import com.raytheon.uf.viz.core.drawables.AbstractRenderableDisplay; @@ -64,6 +67,8 @@ import com.raytheon.uf.viz.core.rsc.ResourceList; * 11/15/11 ghull add resolveLatestCycleTimes * 04/26/12 #585 sgurung Added rbdSequence * 06/13/12 #817 Greg Hull add resolveDominantResource() + * 06/20/12 #647 Greg Hull add clone() + * 06/29/12 #568 Greg Hull implement Comparable * * * @@ -72,7 +77,7 @@ import com.raytheon.uf.viz.core.rsc.ResourceList; */ @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) -public class RbdBundle implements ISerializableObject { +public class RbdBundle implements ISerializableObject, Comparable { @XmlElement protected PaneLayout paneLayout = new PaneLayout(1, 1); @@ -103,11 +108,16 @@ public class RbdBundle implements ISerializableObject { @XmlAttribute protected String rbdName; -// private NCMapEditor ncEditor; - // true if edited from the LoadRbd dialog private Boolean isEdited = false; +// @XmlAttribute +// protected Date dateCreated = null; +// +// @XmlAttribute +// protected String createdBy = null; + + // private HashMap displayPaneMap = // new HashMap @@ -192,6 +202,33 @@ public class RbdBundle implements ISerializableObject { displays = new NCMapRenderableDisplay[paneLayout.getNumberOfPanes()];// numPaneRows*numPaneColumns]; } + public static RbdBundle clone( RbdBundle rbdBndl ) throws VizException { + try { + NCTimeMatcher tm = new NCTimeMatcher( rbdBndl.getTimeMatcher() ); + + File tempRbdFile = File.createTempFile("tempRBD-", ".xml"); + + SerializationUtil.jaxbMarshalToXmlFile( rbdBndl, + tempRbdFile.getAbsolutePath() ); + + RbdBundle clonedRbd = RbdBundle.unmarshalRBD( tempRbdFile, null ); + + clonedRbd.setTimeMatcher( tm ); + + clonedRbd.setLocalizationFile( rbdBndl.getLocalizationFile() ); + + tempRbdFile.delete(); + + return clonedRbd; + + } catch (SerializationException e) { + throw new VizException( e ); + } catch (VizException e) { + throw new VizException("Error loading rbd "+rbdBndl.rbdName+" :"+e.getMessage() ); + } catch (IOException e) { // from createTempFile + throw new VizException( e ); + } + } // public NCMapEditor getNcEditor() { // return ncEditor; // } @@ -232,8 +269,9 @@ public class RbdBundle implements ISerializableObject { } } - timeMatcher = (NCTimeMatcher) displays[0].getDescriptor() - .getTimeMatcher(); + setTimeMatcher( + new NCTimeMatcher( + (NCTimeMatcher) displays[0].getDescriptor().getTimeMatcher() ) ); } /** @@ -543,4 +581,14 @@ public class RbdBundle implements ISerializableObject { return timeMatcher.loadTimes(true); } + + @Override + public int compareTo(RbdBundle rbd) { + if( rbdSequence == rbd.rbdSequence ) { + return rbdName.compareTo( rbd.rbdName ); + } + else { + return rbdSequence - rbd.rbdSequence; + } + } } diff --git a/ncep/gov.noaa.nws.ncep.viz.resources/src/gov/noaa/nws/ncep/viz/resources/manager/ResourceBndlLoader.java b/ncep/gov.noaa.nws.ncep.viz.resources/src/gov/noaa/nws/ncep/viz/resources/manager/ResourceBndlLoader.java index 8ff06b20f8..83405d50e7 100644 --- a/ncep/gov.noaa.nws.ncep.viz.resources/src/gov/noaa/nws/ncep/viz/resources/manager/ResourceBndlLoader.java +++ b/ncep/gov.noaa.nws.ncep.viz.resources/src/gov/noaa/nws/ncep/viz/resources/manager/ResourceBndlLoader.java @@ -24,9 +24,11 @@ import com.raytheon.uf.viz.core.datastructure.DataCubeContainer; import com.raytheon.uf.viz.core.drawables.AbstractRenderableDisplay; import com.raytheon.uf.viz.core.drawables.IDescriptor; import com.raytheon.uf.viz.core.drawables.ResourcePair; +import com.raytheon.uf.viz.core.exception.VizException; import com.raytheon.uf.viz.core.map.MapDescriptor; import com.raytheon.uf.viz.core.rsc.AbstractVizResource; import com.raytheon.uf.viz.core.rsc.ResourceList; +import com.raytheon.viz.ui.UiPlugin; /** * Resource Bundle Loader will load RBDs into new or existing map editors. @@ -110,10 +112,6 @@ public class ResourceBndlLoader implements Runnable { // extends Job { seldRBDs.clear(); } -// public void addRBD( RbdBundle newRBD ) { -// seldRBDs.add( newRBD ); -// } -// public void addRBD( RbdBundle newRBD, NCMapEditor theEditor ) { seldRBDs.add( new RbdBundleEditorWrapper ( newRBD, theEditor ) ); @@ -130,8 +128,9 @@ public class ResourceBndlLoader implements Runnable { // extends Job { errMsg = em; } public void run() { + Status status = new Status(Status.ERROR, UiPlugin.PLUGIN_ID, 0, errMsg, null ); ErrorDialog.openError(Display.getCurrent().getActiveShell(), - "ERROR", errMsg, null); + "ERROR", errMsg, status); } } @@ -140,30 +139,10 @@ public class ResourceBndlLoader implements Runnable { // extends Job { return true; } - // @Override // protected IStatus run(IProgressMonitor monitor) { //public void loadRBDs() { public void run() { - - // wait for the system to init - /* - for( int i=0 ; i<15 ; i++ ) { - if( DataCubeContainer.isInitFinished() ) { -// System.out.println("DataCubeContainer isinitialized"); - break; - } - try { -// System.out.println("DataCubeContainer is not initialized yet?"); - Thread.sleep(1000); - } catch (InterruptedException e) { - } - } - */ - - -// RbdBundle[] rbdList = (RbdBundle[])seldRBDs.toArray( new RbdBundle[0] ); - RbdBundleEditorWrapper[] wrapperClassArray= ( RbdBundleEditorWrapper[] ) seldRBDs.toArray ( new RbdBundleEditorWrapper[0] ); if( loadSelectedPaneOnly ) { @@ -175,21 +154,15 @@ public class ResourceBndlLoader implements Runnable { // extends Job { for ( RbdBundleEditorWrapper thisWrapper : wrapperClassArray ) { + try { RbdBundle rbdBndl = thisWrapper.getRbdBundle(); -// for( RbdBundle rbdBndl : rbdList ) { - // initialize the timeline if it has not already - // been initialized - // xguo,06/02/11. Not initialize time-line until the user selects it -// rbdBndl.initTimeline(); - // the editor should have already be created with the right // number of displays and matching paneLayouts NCMapEditor editor = thisWrapper.getMapEditor(); if( editor == null ) { - System.out.println("??editor is null in rbdLoader?"); - continue; + throw new VizException("??editor is null in rbdLoader?"); } // If this editor currently has resources loaded, clear them out except for PGEN @@ -199,6 +172,11 @@ public class ResourceBndlLoader implements Runnable { // extends Job { PaneID paneid = new PaneID(r,c); IDisplayPane pane = editor.getDisplayPane( paneid ); + if( pane == null ) { + throw new VizException("Could not get pane "+paneid.toString() + + " from the editor."); + } + // don't clear this pane if we are only loading the selected pane and // this isn't it if( loadSelectedPaneOnly && @@ -207,6 +185,9 @@ public class ResourceBndlLoader implements Runnable { // extends Job { } List rlist = ((NCDisplayPane)pane).getRenderableDisplay().getDescriptor().getResourceList(); + if( rlist == null ) { + throw new VizException("The ResourceList is empty?"); + } Iterator it = rlist.iterator(); while( it.hasNext() ){ @@ -217,6 +198,7 @@ public class ResourceBndlLoader implements Runnable { // extends Job { } } } + editor.setAutoUpdate(rbdBndl.isAutoUpdate() ); editor.setGeoSyncPanesEnabled( rbdBndl.isGeoSyncedPanes() ); editor.setHideShow(false); //init to false, means rsc on @@ -228,14 +210,13 @@ public class ResourceBndlLoader implements Runnable { // extends Job { if( editor.getPaneLayout().getRows() <= rbdBndl.getSelectedPaneId().getRow() || editor.getPaneLayout().getColumns() <= rbdBndl.getSelectedPaneId().getColumn() ) { - System.out.println("Error: The Active Display doesn't have enough Panes"+ + throw new VizException("Error: The Active Display doesn't have enough Panes"+ " for the selected Pane: "); - break; +// break; } } else if( !editor.getPaneLayout().equals( rbdBndl.getPaneLayout() ) ) { - System.out.println("PaneLayouts of the RBD and Editor don't match?"); - continue; + throw new VizException("PaneLayouts of the RBD and Editor don't match?"); } // loop thru the panes in the RBD @@ -260,20 +241,22 @@ public class ResourceBndlLoader implements Runnable { // extends Job { (NCMapRenderableDisplay) mapDisp, rbdBndl.getTimeMatcher() ) == false ) { - VizApp.runAsync(new ErrorMsg("Error Loading Pane "+paneid.toString()+ - " for RBD "+ rbdBndl.getRbdName() ) ); + throw new VizException("Error Loading Pane "+paneid.toString()+ + " for RBD "+ rbdBndl.getRbdName() ); } } } editor.refresh(); editor.refreshGUIElements(); -// } - - removeAllSeldRBDs(); + } + catch ( VizException vizex ) { + VizApp.runAsync( + new ErrorMsg( vizex.getMessage() ) ); + } } - // update Menu Elements for the editor + removeAllSeldRBDs(); // this.cancel(); if a Job // return null; @@ -301,9 +284,8 @@ public class ResourceBndlLoader implements Runnable { // extends Job { } else { descr.setDataTimes( dataTimes ); - ResourceName domRscName = timeMatcher.getDominantResourceName(); - if( domRscName != null && domRscName.isForecastResource() ) { + if( timeMatcher.isForecast() ) { descr.setFrame( 0 ); } else { diff --git a/ncep/gov.noaa.nws.ncep.viz.resources/src/gov/noaa/nws/ncep/viz/resources/manager/ResourceDefinition.java b/ncep/gov.noaa.nws.ncep.viz.resources/src/gov/noaa/nws/ncep/viz/resources/manager/ResourceDefinition.java index bbdf6a3c5b..874346a1b9 100644 --- a/ncep/gov.noaa.nws.ncep.viz.resources/src/gov/noaa/nws/ncep/viz/resources/manager/ResourceDefinition.java +++ b/ncep/gov.noaa.nws.ncep.viz.resources/src/gov/noaa/nws/ncep/viz/resources/manager/ResourceDefinition.java @@ -30,6 +30,8 @@ import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; +import org.hibernate.ejb.AvailableSettings; + import com.raytheon.uf.common.dataplugin.satellite.SatelliteRecord; import com.raytheon.uf.common.dataquery.requests.RequestConstraint; import com.raytheon.uf.common.dataquery.requests.RequestConstraint.ConstraintType; @@ -45,6 +47,8 @@ import com.raytheon.uf.viz.core.exception.VizException; import com.raytheon.uf.viz.core.localization.LocalizationManager; import com.raytheon.uf.viz.core.requests.ThriftClient; import com.raytheon.uf.viz.core.rsc.ResourceType; +import com.raytheon.uf.viz.core.rsc.URICatalog; +import com.raytheon.uf.viz.core.rsc.URICatalog.IURIRefreshCallback; import com.raytheon.viz.alerts.IAlertObserver; import com.raytheon.viz.alerts.observers.ProductAlertObserver; @@ -70,6 +74,10 @@ import gov.noaa.nws.ncep.edex.common.ncinventory.NcInventoryRequestMsg; * 05/27/12 #606 Greg Hull createNcInventoryDefinition() * 05/31/12 #606 Greg Hull save the name/alias of the inventory to query * 06/05/12 #816 Greg Hull rm definitionIndex + * 08/29/12 #556 Greg Hull check isRequestable() before adding as an AlertObserver (for PGEN) + * 09/01/12 #860 Greg Hull Add smarter caching (for all constraints) of available times. + * 09/05/12 #860 Greg Hull Add this to the URICatalog for storing the latest time. + * 09/13/12 #860 Greg Hull set default for inventoryEnabled to false. * * * @@ -80,8 +88,8 @@ import gov.noaa.nws.ncep.edex.common.ncinventory.NcInventoryRequestMsg; @XmlAccessorType(XmlAccessType.NONE) public class ResourceDefinition implements ISerializableObject, IAlertObserver, Comparable { - // Currently not implemented but this would allow a resource to be defined - // but not visible on the resource Selection Dialog + // if false this will only show up in the Manage resources gui but not + // on the resource Selection Dialog. @XmlElement private boolean isEnabled; @@ -91,7 +99,6 @@ public class ResourceDefinition implements ISerializableObject, IAlertObserver, @XmlElement private String resourceCategory; - // @XmlElement @XmlJavaTypeAdapter(StringListAdapter.class) private ArrayList filterLabels; @@ -99,6 +106,8 @@ public class ResourceDefinition implements ISerializableObject, IAlertObserver, private String localizationName; // the path private LocalizationFile localizationFile; + // must match the name in an extention point which defines the java class + // that implementes the resource. @XmlElement private String rscImplementation; @@ -121,7 +130,6 @@ public class ResourceDefinition implements ISerializableObject, IAlertObserver, @XmlElement private TimeMatchMethod timeMatchMethod; - // This can be @XmlElement private int frameSpan; // if 0 then the intervals are data-driven @@ -153,39 +161,34 @@ public class ResourceDefinition implements ISerializableObject, IAlertObserver, private boolean resourceParametersModified; - // Default to enabled so it must be explicitly disabled. + // Default to disnabled so it must be explicitly enabled. @XmlElement - private Boolean inventoryEnabled = true; - -// private Boolean inventoryInitialized = false; + private Boolean inventoryEnabled = false; private String inventoryAlias = null; - // the names of the parameters which are stored in the inventory; + // the names of the parameters which are stored in the inventory for this RD; // private ArrayList inventoryParamNames = new ArrayList(); - // we could save off the inventoryDescription if we need to.... -// private HashMap inventoryConstraints = -// new HashMap(); -// public static enum InventoryLoadStrategy { -// STARTUP, ON_DEMAND, NO_INVENTORY -// } -// @XmlElement -// private InventoryLoadStrategy inventoryLoadStrategy = InventoryLoadStrategy.NO_INVENTORY; - // this is the list of avail data times for the currently select resource. - // the times are read from the inventory. - // - private List availTimesCache = new ArrayList(); - // For many/most resources, we don't need to requery when a new attrSet (or group) - // is selected and so we won't. This will store the name of the seld rsc used - // to query the seldRscAvailTimes. - private HashMap constraintsUsedForTimeCache = null; + // a map from the resource Constraints to a cache of the availableTimes and the + // latest time. The availableTimes may come from an inventory query or a db query and + // the latest time may be determined from the latest time or it may be updated + // via Raytheon's MenuUpdater via the URICatalog by processing alery notifications.. + // + private Map, DataTimesCacheEntry> availTimesCache=null; - private long timesCacheQueryTime = 0; - private static final long cacheHoldTime = 20*1000; // 20 seconds + // set this to true and store the latestTimes in the URICatalog. + // Some RscDefns have alot of possible constraints (ie radar and some satellites...) which + // means that the inventory queries can get hit all at once and cause a slight (1 second?) + // delay. In this case we will leverage Raytheon's URICatalog which listens for the URI + // Notifications and stores the latest times. + // NOTE : this is currently only used for the latestTimes in the attr set list. The + // actual times are still coming from the NcInventory. + // +// private Boolean addToURICatalog = false; public ResourceDefinition() { @@ -203,13 +206,10 @@ public class ResourceDefinition implements ISerializableObject, IAlertObserver, dfltGeogArea = NmapCommon.getDefaultMap(); timeMatchMethod = TimeMatchMethod.CLOSEST_BEFORE_OR_AFTER; timelineGenMethod = timelineGenMethod.USE_DATA_TIMES; - //inventoryInitialized = false; inventoryAlias = null; - constraintsUsedForTimeCache = new HashMap(); - availTimesCache = new ArrayList(); - timesCacheQueryTime = 0; + availTimesCache = new HashMap,DataTimesCacheEntry>(); - inventoryEnabled = true; + inventoryEnabled = false; generatedTypesList = new ArrayList(); @@ -244,12 +244,9 @@ public class ResourceDefinition implements ISerializableObject, IAlertObserver, setLocalizationFile( rscDefn.getLocalizationFile() ); -// inventoryInitialized = false; inventoryAlias = null; - constraintsUsedForTimeCache = new HashMap(); - availTimesCache = new ArrayList(); - timesCacheQueryTime = 0; + availTimesCache = new HashMap,DataTimesCacheEntry>(); inventoryEnabled = rscDefn.inventoryEnabled; @@ -519,14 +516,6 @@ public class ResourceDefinition implements ISerializableObject, IAlertObserver, this.resourceDefnName = rName; } -// public InventoryLoadStrategy getInventoryLoadStrategy() { -// return inventoryLoadStrategy; -// } -// -// public void setInventoryLoadStrategy(InventoryLoadStrategy inventoryLoadStrategy) { -// this.inventoryLoadStrategy = inventoryLoadStrategy; -// } - public boolean isPgenResource() { return resourceCategory.equals(ResourceName.PGENRscCategory); } @@ -666,9 +655,6 @@ public class ResourceDefinition implements ISerializableObject, IAlertObserver, public void setInventoryAlias( String invAlias ) { inventoryAlias = invAlias; } -// public void setInventoryInitialized( boolean ii ) { -// inventoryInitialized = ii; -// } public Boolean getInventoryEnabled() { return inventoryEnabled; @@ -699,8 +685,9 @@ public class ResourceDefinition implements ISerializableObject, IAlertObserver, // if we need to initialize and maintain any generated types or subTypes // - if( getSubTypeGenParamsList().length > 0 || - !getRscTypeGenerator().isEmpty() ) { + if( isRequestable() && + ( getSubTypeGenParamsList().length > 0 || + !getRscTypeGenerator().isEmpty() ) ) { queryGeneratedTypes(); @@ -1045,8 +1032,8 @@ public class ResourceDefinition implements ISerializableObject, IAlertObserver, String[] rsltsArray = (String[])rslts; - out.println("Inventory Query for RscTypes for "+ resourceDefnName + - " took "+ (t02-t01)+ "msecs for "+ rsltsArray.length + " results." ); +// out.println("Inventory Query for RscTypes for "+ resourceDefnName + +// " took "+ (t02-t01)+ "msecs for "+ rsltsArray.length + " results." ); // out.println(" RscTypes = "+ (rsltsArray.toString() ) ); for( String rsltStr : rsltsArray ) { @@ -1202,8 +1189,8 @@ public class ResourceDefinition implements ISerializableObject, IAlertObserver, List rsltsArray = Arrays.asList( (String[])rslts ); - out.println("Inventory Query for "+ resourceDefnName+" for "+ invPrm+ - " took "+ (t02-t01)+ "msecs for "+ rsltsArray.size() + " results." ); +// out.println("Inventory Query for "+ resourceDefnName+" for "+ invPrm+ +// " took "+ (t02-t01)+ "msecs for "+ rsltsArray.size() + " results." ); return rsltsArray; } @@ -1227,14 +1214,106 @@ public class ResourceDefinition implements ISerializableObject, IAlertObserver, return normalizedDataTimes; } - public DataTime getLatestDataTime( ResourceName rscName ) throws VizException { - List availTimes = getDataTimes( rscName ); - if( availTimes != null && !availTimes.isEmpty() ) { - return availTimes.get( availTimes.size()-1 ); + private void addTimesCacheEntry( ResourceName rscName ) throws VizException { + + List rscNamesList = new ArrayList(); + rscNamesList.add( rscName ); +// if the cache is empty go ahead and initialize entries for all +// possible resources. +// rscNamesList = ResourceDefnsMngr.getInstance().getAllSelectableResourceNamesForResourcDefn( this ); + +// for( ResourceName rName : rscNamesList ) { + ResourceName rName = rscName; + + Map resourceConstraints = + getInventoryConstraintsFromParameters( + ResourceDefnsMngr.getInstance().getAllResourceParameters( rName ) ); + + // many resourceNames will have the same set of constraints so only + // store the unique ones. + // + if( !availTimesCache.containsKey( resourceConstraints ) ) { + availTimesCache.put( resourceConstraints, + new DataTimesCacheEntry( resourceConstraints ) ); + } +// } + + // I pulled 12 out of my arse. Not sure what the best number is. + // Even though the inventory is very quick, getLatestTime() can get called + // many times by the LabelProvider when showing the attrSet List and there can + // be a slight delay for example with all (40) radar products. + // + if( availTimesCache.size() == 12 ) { + for( DataTimesCacheEntry uriRefreshCallback : availTimesCache.values() ) { + uriRefreshCallback.addToUriCatalog( ); + } + } + else if( availTimesCache.size() > 12 ) { + availTimesCache.get( resourceConstraints ).addToUriCatalog(); + } } + + // Return the latest time or if there either is NoData or if the time hasn't been + // set yet, return a Null DataTime. + // + public DataTime getLatestDataTime( ResourceName rscName ) throws VizException { + + if( !isRequestable() ) { return null; } + Map resourceConstraints = + getInventoryConstraintsFromParameters( + ResourceDefnsMngr.getInstance().getAllResourceParameters( rscName ) ); + + // if times are cached for these constraints, and if the times haven't expired, + // then just return the cached times. + // + DataTime latestTime = null; + + if( availTimesCache.containsKey( resourceConstraints ) ) { + latestTime = availTimesCache.get( resourceConstraints ).getLatestTime(); + +// if( latestTime != null ) { +// if( latestTime.isNull() ) { +// out.println("Returning NO_DATA for "+rscName.toString() ); +// } +// else { +// out.println("returning latestTime "+latestTime.toString() +" for "+rscName.toString()+" from cache."); +// } +// } + } + + // if not found then force a query to be made to get the times/latestTime. + // ( ??? Do we still want to do this if the inventory is not enabled?) + // + if( latestTime == null ) { + long t0 = System.currentTimeMillis(); + + getDataTimes( rscName ); + + if( availTimesCache.containsKey( resourceConstraints ) ) { + latestTime = availTimesCache.get( resourceConstraints ).getLatestTime(); + +// if( latestTime == null ) { +// out.println("latestTime still null even after times query??? : "+rscName.toString() ); +// } +// else { +// out.println("querying latestTime "+latestTime.toString() +" for "+rscName.toString()+" from cache."); +// } + + // if the query took a long time, then go ahead and add this to the URI Catalog. + // + if( System.currentTimeMillis()-t0 > 2000 ) { + availTimesCache.get( resourceConstraints ).addToUriCatalog(); + } + } + } + + // if 'not set' still return a 'Null' dataTime. + return (latestTime == null ? new DataTime(new Date(0)) : latestTime); + } + // update this to optionally either return all times or only matching cycle times // public List getDataTimes( ResourceName rscName ) throws VizException { @@ -1246,40 +1325,42 @@ public class ResourceDefinition implements ISerializableObject, IAlertObserver, throw new VizException("Inventory Not Initialized."); } - HashMap searchConstraints = + Map resourceConstraints = getInventoryConstraintsFromParameters( ResourceDefnsMngr.getInstance().getAllResourceParameters( rscName ) ); - // if the previous constraints used to get the cached times are the same - // as the searchconstraints that will be used for this resourceName and - // if the cache has not expired, then we can just return the cached dataTimes. + // if times are cached for these constraints, and if the times haven't expired, + // then just return the cached times. // - if( constraintsUsedForTimeCache.toString().equals( - searchConstraints.toString() ) ) { + if( availTimesCache.containsKey( resourceConstraints ) ) { + DataTimesCacheEntry cachedTimesEntry = availTimesCache.get( resourceConstraints ); - if( System.currentTimeMillis()-timesCacheQueryTime < cacheHoldTime ) { -// out.println("returning cached times from "+ (System.currentTimeMillis()-timesCacheQueryTime) + " msecs ago"); - return availTimesCache; + List availTimes = cachedTimesEntry.getAvailableTimes(); + + if( availTimes != null ) { + return availTimes; } + // (Do not remove the entry in the cache since this may be being refreshed + // with the latestTimes from the URICatalog. + } + else { + // if there is no entry in the cache for this resourceName, add an entry + // and possibly add it to the URICatalog + addTimesCacheEntry( rscName ); } - - timesCacheQueryTime = 0; - availTimesCache.clear(); - constraintsUsedForTimeCache = searchConstraints; try { DataTime dataTimeArr[] = null; - // if the inventory is not disabled + // if the inventory is enabled + // if( inventoryEnabled ) { NcInventoryRequestMsg reqMsg = NcInventoryRequestMsg.makeQueryRequest(); - -// String inventoryName = LocalizationManager.getInstance().getCurrentUser() + ":" + -// getResourceDefnName(); reqMsg.setInventoryName( inventoryAlias ); reqMsg.setRequestedParam( "dataTime" ); - reqMsg.setReqConstraintsMap( constraintsUsedForTimeCache ); + reqMsg.setReqConstraintsMap( + (HashMap)resourceConstraints ); Object rslts; @@ -1287,8 +1368,6 @@ public class ResourceDefinition implements ISerializableObject, IAlertObserver, rslts = ThriftClient.sendRequest( reqMsg ); -// out.println("inv request returned "+rslts.getClass().getCanonicalName() ); - if( !(rslts instanceof String[]) ) { out.println("Inventory Request Failed:"+rslts.toString() ); @@ -1311,7 +1390,7 @@ public class ResourceDefinition implements ISerializableObject, IAlertObserver, String rsltStr = (String)rsltsList[i]; if( rsltStr == null ) { - dataTimeArr[i] = new DataTime(); // ??? shouldn't happen but what to do here? + dataTimeArr[i] = new DataTime(new Date(0)); // ??? shouldn't happen but what to do here? } else { String[] queryResults = rsltStr.split("/"); @@ -1325,18 +1404,17 @@ public class ResourceDefinition implements ISerializableObject, IAlertObserver, property.setDesiredProduct( ResourceType.PLAN_VIEW ); property.setEntryQueryParameters( - constraintsUsedForTimeCache, true, null); + resourceConstraints, true, null); dataTimeArr = property.getEntryTimes(); } Arrays.sort( dataTimeArr ); - // set the cached avail times, the query time. Already set the - timesCacheQueryTime = System.currentTimeMillis(); -// rscUsedForTimesCache = rscName; - availTimesCache = new ArrayList( Arrays.asList( dataTimeArr ) ); + List availTimesList = Arrays.asList( dataTimeArr ); + + availTimesCache.get( resourceConstraints ).setAvailableTimes( availTimesList ); - return availTimesCache; + return availTimesList; } catch (VizException e) { // out.println("Inventory failed query for "+ resourceDefnName+ @@ -1392,6 +1470,16 @@ public class ResourceDefinition implements ISerializableObject, IAlertObserver, ProductAlertObserver.removeObserver( getPluginName(), this ); + // clean up the availTimesCache + // (note that if the cache is being updated with latest times from + // the URI catalog, the DataTimesCacheEntry objects may stick around and + // still get updated. But we can't remove them and it won't hurt anything + // + for( Map rCon : availTimesCache.keySet() ) { + availTimesCache.get(rCon).getAvailableTimes( true ).clear(); + } + availTimesCache.clear(); + // TODO: do we need to remove the inventory alias? Shouldn't need to. } diff --git a/ncep/gov.noaa.nws.ncep.viz.resources/src/gov/noaa/nws/ncep/viz/resources/manager/ResourceDefnsMngr.java b/ncep/gov.noaa.nws.ncep.viz.resources/src/gov/noaa/nws/ncep/viz/resources/manager/ResourceDefnsMngr.java index 353a15c79c..7a441ef3be 100644 --- a/ncep/gov.noaa.nws.ncep.viz.resources/src/gov/noaa/nws/ncep/viz/resources/manager/ResourceDefnsMngr.java +++ b/ncep/gov.noaa.nws.ncep.viz.resources/src/gov/noaa/nws/ncep/viz/resources/manager/ResourceDefnsMngr.java @@ -265,7 +265,10 @@ public class ResourceDefnsMngr implements ILocalizationFileObserver { rd.setInventoryAlias( invDefnsMap.get( invDefn ).getInventoryName() ); } - if( rd.usesInventory() && !rd.isInventoryInitialized() ) { + if( rd.usesInventory() && + rd.getInventoryEnabled() && + !rd.isInventoryInitialized() ) { + createInvDefns.add( rd.createNcInventoryDefinition() ); } } @@ -398,6 +401,10 @@ public class ResourceDefnsMngr implements ILocalizationFileObserver { else { rscDefn.validateResourceParameters(); + if( resourceDefnsMap.containsKey( rscDefn.getResourceDefnName() ) ) { + throw new VizException("Failed to create Rsc Defn '"+rscDefn.getResourceDefnName()+ + "' from file: "+rscDefnFile.getAbsolutePath()+ " because there is another Rsc Defn with this name."); + } resourceDefnsMap.put( rscDefn.getResourceDefnName(), rscDefn ); if( rscImpl.equals( "Locator" ) ) { @@ -744,8 +751,8 @@ public class ResourceDefnsMngr implements ILocalizationFileObserver { if( !rd.getRscTypeGenerator().isEmpty() ) { if( rscName.getRscType().indexOf( ResourceName.generatedTypeDelimiter ) == -1 ) { - out.println("ResourceName "+rscName.toString() + " is expecting a "+ - "generated type from the "+ rd.getRscTypeGenerator() ); +// out.println("ResourceName "+rscName.toString() + " is expecting a "+ +// "generated type from the "+ rd.getRscTypeGenerator() ); return false; } } @@ -754,8 +761,8 @@ public class ResourceDefnsMngr implements ILocalizationFileObserver { rscName.getRscGroup().isEmpty() ) { if( rd.applyAttrSetGroups() || !rd.getSubTypeGenerator().isEmpty() ) { - out.println("ResourceName "+rscName.toString() + " is expecting a "+ - "generated sub-type from "+ rd.getSubTypeGenerator() ); +// out.println("ResourceName "+rscName.toString() + " is expecting a "+ +// "generated sub-type from "+ rd.getSubTypeGenerator() ); return false; } } @@ -990,11 +997,11 @@ public class ResourceDefnsMngr implements ILocalizationFileObserver { return null; } - public String[] getResourceCategories( ) { + public String[] getResourceCategories( boolean includeDisabled ) { ArrayList catsList = new ArrayList(); for( ResourceDefinition rscDefn : resourceDefnsMap.values() ) { - if( rscDefn.getIsEnabled() ) { + if( includeDisabled || rscDefn.getIsEnabled() ) { String rscCat = rscDefn.getResourceCategory(); if( !catsList.contains( rscCat ) ) { @@ -1352,20 +1359,23 @@ public class ResourceDefnsMngr implements ILocalizationFileObserver { } public List getResourceDefnsForCategory( String rscCat ) throws VizException { - return getResourceDefnsForCategory(rscCat, "", false ); + return getResourceDefnsForCategory(rscCat, "", false, true ); } public List getResourceDefnsForCategory( - String rscCat, String filterStr, Boolean includeGeneratedTypes ) + String rscCat, String filterStr, + Boolean includeGeneratedTypes, + Boolean includeDisabledRscDefns ) throws VizException { List resourceDefnsList = new ArrayList(); // for other resources, get all of the resources in the given category. // for( ResourceDefinition rscDefn : resourceDefnsMap.values() ) { -// if( !rscDefn.getIsEnabled() ) { -// continue; -// } + + if( !includeDisabledRscDefns && !rscDefn.getIsEnabled() ) { + continue; + } if( filterStr == null || filterStr.isEmpty() || rscDefn.getFilterLabels().contains( filterStr ) ) { @@ -1592,75 +1602,83 @@ public class ResourceDefnsMngr implements ILocalizationFileObserver { } return new String[0]; } + else { + // if there is supposed to be a generated group but there is none + // then + if( matchGroup && + rscName.getRscGroup().isEmpty() && + !rscDefn.getSubTypeGenerator().isEmpty() ) { + return new String[0]; + } + else { + return getAvailAttrSets( rscDefn ).toArray( new String[0] ); + } + } + } -// if( matchGroup && -// ( rscName.getRscCategory().equals( ResourceName.SatelliteRscCategory ) ) ) { //|| -//// rscName.getRscCategory().equals( ResourceName.RadarRscCategory ) ) ) { -// -// String rscGrp = rscName.getRscGroup(); -// // map from the subType to a list of 'keys' for available attributes. -// HashMap> subTypesMap = rscDefn.getSubTypesMap(); -// -// if( rscGrp == null || rscGrp.isEmpty() ) { -// if( rscName.getRscCategory().equals( ResourceName.SatelliteRscCategory ) ) { -//// out.println("Sanity Check: Satellite resource should have a group. " ); -// return new String[0]; // -// } -// else { // Radar Mosaic -// return getAvailAttrSets( rscDefn ).toArray( new String[0] ); -// } -// } -// -// ArrayList attrSets = new ArrayList(); -// -// ArrayList availAttrSetKeys = subTypesMap.get( rscGrp ); -// if( availAttrSetKeys == null ) { -// out.println("Sanity Check: Satellite subType is not in the subTypeMap?? " ); -// return new String[0]; // -// } -// -// for( String asName : getAvailAttrSets( rscDefn ) ) { -//// try { -// ResourceName fullRscName = new ResourceName( rscName ); -// fullRscName.setRscAttrSetName(asName); + public List getAllSelectableResourceNamesForResourcDefn( + ResourceDefinition rscDefn ) throws VizException { + List rscNamesList = new ArrayList(); + + // build a list of all the possible requestable resourceNames // -// AttributeSet aset = getAttrSet( fullRscName ); -// HashMap attrsMap = aset.getAttributes(); -// //readAttrSetFile( getAttrSet( fullRscName ).getFile() ); + ResourceName rscName = new ResourceName(); + String rscCat = rscDefn.getResourceCategory(); + rscName.setRscCategory( rscCat ); + + // TODO : need to improve the way this works. Never liked it. // -// if( rscName.getRscCategory().equals( ResourceName.SatelliteRscCategory ) ) { -// if( !attrsMap.containsKey("imageType") ) { -// out.println("Sanity Check: Satellite attrSets must have an "+ -// " 'imageType' parameter." ); -// } -// else { -// if( availAttrSetKeys.contains( attrsMap.get( "imageType" ) ) ) { -// attrSets.add( asName ); -// } -// } -// } -// else if( rscName.getRscCategory().equals( ResourceName.RadarRscCategory ) ) { -// if( !attrsMap.containsKey("productName") ) { -// out.println("Sanity Check: Radar attrSets must have an "+ -// " 'productName' parameter." ); -// } -// else { -// if( availAttrSetKeys.contains( attrsMap.get( "productName" ) ) ) { -// attrSets.add( asName ); -// } -// } -// } -//// } catch (VizException e) { -//// out.println("Error parsing AttrSet "+asName+" : "+e.getMessage() ); -//// } -// } -// return attrSets.toArray( new String[0] ); + List rscTypes = new ArrayList(); + +// if( rscDefn.getRscTypeGenerator().isEmpty() ) { +// rscTypes.add( rscDefn.getResourceDefnName() ); // } // else { - return getAvailAttrSets( rscDefn ).toArray( new String[0] ); +// rscTypes = rscDefn.getGeneratedTypesList(); // } + + rscTypes.add( rscName.getRscType() ); + + for( String rscType : rscTypes ) { + ResourceDefinition rd = getResourceDefinition( rscType ); //: getResourceDefnsForCategory( rscCat, "", true, false ) ) { + +// // check that this is +// String rscType = rd.getResourceDefnName(); + + rscName.setRscType( rscType ); + + List asgList; + + if( rd.applyAttrSetGroups() ) { + asgList = getAttrSetGroupNamesForResource( rscType ); + } + else { + asgList = rd.generatedSubTypesList(); } + if( asgList.isEmpty() ) { + rscName.setRscGroup( "" ); + + for( String attrSet : getAttrSetsForResource(rscName, false ) ) { + rscName.setRscAttrSetName( attrSet ); + rscNamesList.add( new ResourceName( rscName ) ); + } + } + else { + for( String rscGroup : asgList ) { + + rscName.setRscGroup( rscGroup ); + + for( String attrSet : getAttrSetsForResource(rscName, false ) ) { + rscName.setRscAttrSetName( attrSet ); + rscNamesList.add( new ResourceName( rscName ) ); + } + } + } + } + + return rscNamesList; + } public String getResourceImplementation( String rscType ) { ResourceDefinition rscDefn = getResourceDefinition( rscType ); @@ -2140,7 +2158,7 @@ public class ResourceDefnsMngr implements ILocalizationFileObserver { if( invDefnsMap.containsKey( invDefn ) ) { rscDefn.setInventoryAlias( invDefnsMap.get( invDefn ).getInventoryName() ); } - else { + else if( rscDefn.usesInventory() ) { InventoryLoaderJob invLoader = new InventoryLoaderJob( invDefn, false ); invLoader.schedule(); @@ -2161,9 +2179,13 @@ public class ResourceDefnsMngr implements ILocalizationFileObserver { } rscDefn.setInventoryAlias( invDefn.getInventoryName() );//Initialized( true ); - } rscDefn.enableInventoryUse(); + } + else { + rscDefn.disableInventoryUse(); + } + } catch (SerializationException e) { throw new VizException("Error Serializing AttrSetGroup file:"+e.getMessage() ); diff --git a/ncep/gov.noaa.nws.ncep.viz.resources/src/gov/noaa/nws/ncep/viz/resources/manager/ResourceName.java b/ncep/gov.noaa.nws.ncep.viz.resources/src/gov/noaa/nws/ncep/viz/resources/manager/ResourceName.java index 038ddfa3c7..7a7db3816e 100644 --- a/ncep/gov.noaa.nws.ncep.viz.resources/src/gov/noaa/nws/ncep/viz/resources/manager/ResourceName.java +++ b/ncep/gov.noaa.nws.ncep.viz.resources/src/gov/noaa/nws/ncep/viz/resources/manager/ResourceName.java @@ -25,6 +25,7 @@ import com.raytheon.uf.viz.core.exception.VizException; * 10/20/10 Xilin Guo Rename getCycleTimeStringFromDataTime to getTimeStringFromDataTime * 02/16/11 #408 Greg Hull add 'backup' categories for obs/fcst surface/uair * 01/09/11 #561 Greg Hull generated equals() + * 09/13/12 #860 Greg Hull trim() * * * @@ -131,19 +132,13 @@ public class ResourceName { public ResourceName( String cat, String type, String group, String attrSet ) { - setFullResourceName( cat + File.separator + - type + File.separator + - group + File.separator + - (attrSet == null ? dfltAttrSetName : attrSet ) ); + setFullResourceName( cat.trim() + File.separator + + type.trim() + File.separator + + group.trim() + File.separator + + (attrSet == null ? dfltAttrSetName : attrSet.trim() ) ); } -// public String getFullResourceName() { -// return toString(); -// } - public void setFullResourceName(String rscName) { -// this.rscName = rscName; - String[] parts = rscName.split( File.separator ); // at minimum we need a c if( parts == null || parts.length < 3 ) { @@ -151,9 +146,9 @@ public class ResourceName { return; } - rscCategory = parts[0]; - rscType = parts[1]; - rscAttrSetName = parts[ parts.length-1 ]; + rscCategory = parts[0].trim(); + rscType = parts[1].trim(); + rscAttrSetName = parts[ parts.length-1 ].trim(); // forecast resources have the cycle time after the attrSet without a separator // @@ -165,13 +160,14 @@ public class ResourceName { setCycleTimeFromString( cycleTimeStr ); rscAttrSetName = rscAttrSetName.substring(0, parenIndx ); + rscAttrSetName = rscAttrSetName.trim(); } else { cycleTime = null; } if( parts.length > 3 ) { - rscGroup = parts[2]; + rscGroup = parts[2].trim(); } else { rscGroup = ""; @@ -198,7 +194,7 @@ public class ResourceName { } public void setRscCategory(String rscCategory) { - this.rscCategory = rscCategory; + this.rscCategory = (rscCategory == null ? "" : rscCategory.trim() ); } public String getRscType() { @@ -206,7 +202,7 @@ public class ResourceName { } public void setRscType(String rscType) { - this.rscType = rscType; + this.rscType = (rscType == null ? "" : rscType.trim() ); } public String getRscGroup() { @@ -214,23 +210,15 @@ public class ResourceName { } public void setRscGroup(String rscGroup) { - this.rscGroup = rscGroup; + this.rscGroup = (rscGroup == null ? "" : rscGroup.trim()); } -// public String getRscSecondaryGroup() { -// return rscSecondaryGroup; -// } -// -// public void setRscSecondaryGroup(String rscSecondaryGroup) { -// this.rscSecondaryGroup = rscSecondaryGroup; -// } - public String getRscAttrSetName() { return (rscAttrSetName == null ? "" : rscAttrSetName); } public void setRscAttrSetName(String rscAttrSetName) { - this.rscAttrSetName = rscAttrSetName; + this.rscAttrSetName = (rscAttrSetName == null ? "" : rscAttrSetName.trim() ); } public DataTime getCycleTime() { diff --git a/ncep/gov.noaa.nws.ncep.viz.resources/src/gov/noaa/nws/ncep/viz/resources/manager/RscBundleDisplayMngr.java b/ncep/gov.noaa.nws.ncep.viz.resources/src/gov/noaa/nws/ncep/viz/resources/manager/RscBundleDisplayMngr.java index 438c251cee..3c9e42baf4 100644 --- a/ncep/gov.noaa.nws.ncep.viz.resources/src/gov/noaa/nws/ncep/viz/resources/manager/RscBundleDisplayMngr.java +++ b/ncep/gov.noaa.nws.ncep.viz.resources/src/gov/noaa/nws/ncep/viz/resources/manager/RscBundleDisplayMngr.java @@ -22,6 +22,7 @@ import java.util.Vector; import org.eclipse.jface.dialogs.MessageDialog; +import com.raytheon.uf.viz.core.IDisplayPane; import com.raytheon.uf.viz.core.drawables.ResourcePair; import com.raytheon.uf.viz.core.exception.VizException; @@ -54,6 +55,8 @@ import com.raytheon.uf.viz.core.exception.VizException; * 07/11/11 Greg Hull Back out #416 changes supporting SPF Mngr. * 10/22/11 #467 Greg Hull replace selected resource * 01/05/11 #561 Greg Hull add Locator as default selected resource + * 06/21/12 #646 Greg Hull save PredefinedArea obj so we can save the + * mapCenter/extents/zoomLevel * * * @@ -67,7 +70,7 @@ public class RscBundleDisplayMngr { private Vector seldResources = new Vector(); - private String seldGeoArea = null; + private PredefinedArea predefinedArea = null; // we could use this if we want to be able to reset the area's if // the user accidently changes all of them with the geoSync button. @@ -75,7 +78,13 @@ public class RscBundleDisplayMngr { public PaneSelectionData( ) { seldResources = new Vector(); - seldGeoArea = NmapCommon.getDefaultMap(); + String areaName = NmapCommon.getDefaultMap(); + + try { + predefinedArea = PredefinedAreasMngr.getPredefinedArea(areaName); + } catch (VizException e1) { + System.out.println("Error getting default PredefinedArea, "+areaName); + } if( baseOverlayRBT == null ) { // add the 'Base' (ie geoPolitical) overlay to the list of selected Resources @@ -96,36 +105,28 @@ public class RscBundleDisplayMngr { } seldResources.add( baseOverlayRBT ); - } - - public String getGeoAreaName() { - return seldGeoArea; + public PredefinedArea getPredefinedArea() { + return predefinedArea; } - public void setGeoAreaName( String area ) { - seldGeoArea = area; + public void setPredefinedArea( PredefinedArea pArea ) throws VizException { + predefinedArea = PredefinedAreasMngr.clonePredefinedArea( pArea ); + } + + public void setPredefinedArea( String areaName ) { + try { + predefinedArea = PredefinedAreasMngr.getPredefinedArea(areaName); + } catch (VizException e1) { + System.out.println("Error getting default PredefinedArea, "+areaName); + } } public ResourceSelection[] getSelectedResources() { return seldResources.toArray( new ResourceSelection[0] ); } -// public boolean addSelectedResource( ResourceName rscName ) throws VizException { -// for( ResourceSelection r : seldResources ) { -// if( rscName.equals( r.getResourceName() ) ) { -// return false; -// } -// } -// -// ResourceSelection rbt = ResourceFactory.createResource( rscName ); -// -// seldResources.add( 0, rbt ); -// -// return true; -// } - public boolean addSelectedResource( ResourceSelection rbt ) { for( ResourceSelection r : seldResources ) { if( rbt.getResourceName().toString().equals( r.getResourceName().toString() ) ) { @@ -163,21 +164,6 @@ public class RscBundleDisplayMngr { public void resetPane() { seldResources.clear(); - // Add the default Locator - try { - ResourceDefinition locRscDefn = - ResourceDefnsMngr.getInstance().getLocatorResourceDefinition(); - if( locRscDefn != null ) { - ResourceName rscName = new ResourceName( - ResourceName.OverlayRscCategory, - locRscDefn.getResourceDefnName(), null ); // 'default' attrSet - - seldResources.add( ResourceFactory.createResource( rscName ) ); - } - } catch (VizException e) { - System.out.println( "Error creating the Default Locator Overlay Resource?" ); - } - // if clearing all resources we will remove any edits made to the base overlay. if( baseOverlayRBT == null || baseOverlayRBT.getResourceData().getIsEdited() ) { @@ -210,7 +196,6 @@ public class RscBundleDisplayMngr { } } } - } // the currently selected layout (numRows,numColumns) @@ -275,20 +260,23 @@ public class RscBundleDisplayMngr { return paneLayout; } - public void setPaneLayout(PaneLayout paneLayout) { + // return the selected paneId so the caller may tell if it changed. + public PaneID setPaneLayout(PaneLayout paneLayout) { if( this.paneLayout.equals( paneLayout ) ) { - return; + return selectedPaneId; } rbdModified = true; - if( paneLayout.getRows() <= selectedPaneId.getRow() || - paneLayout.getColumns() <= selectedPaneId.getColumn() ) { - - System.out.println("Attempting to set a paneLayout ("+paneLayout.toString()+ - ") smaller than the current selected pane: "+ selectedPaneId.toString() ); - selectedPaneId = new PaneID(0,0); + if( paneLayout.getRows() <= selectedPaneId.getRow() ) { + selectedPaneId = new PaneID( selectedPaneId.getRow()-1, + selectedPaneId.getColumn() ); } + if( paneLayout.getColumns() <= selectedPaneId.getColumn() ) { + selectedPaneId = new PaneID( selectedPaneId.getRow(), + selectedPaneId.getColumn()-1 ); + } + this.paneLayout = paneLayout; setMultiPane( paneLayout.getNumberOfPanes() > 1 ); @@ -299,12 +287,13 @@ public class RscBundleDisplayMngr { // make sure there is an entry in the map for each pane for( int r=0 ; r getHiddenPaneIds() { - ArrayList hiddenPanes = new ArrayList(); - - // loop thru all of the panes in the map and if it is not - // in the current layout, add it to the list - for( String paneIdStr : paneSelectionDataMap.keySet() ) { - PaneID paneId = PaneID.parsePaneId( paneIdStr ); - - if( paneId.getRow() >= paneLayout.getRows() || - paneId.getColumn() >= paneLayout.getColumns() ) { +// public ArrayList getHiddenPaneIds() { +// ArrayList hiddenPanes = new ArrayList(); +// +// // loop thru all of the panes in the map and if it is not +// // in the current layout, add it to the list +// for( String paneIdStr : paneSelectionDataMap.keySet() ) { +// PaneID paneId = PaneID.parsePaneId( paneIdStr ); +// +// if( paneId.getRow() >= paneLayout.getRows() || +// paneId.getColumn() >= paneLayout.getColumns() ) { +// +// hiddenPanes.add( paneId ); +// } +// } +// +// return hiddenPanes; +// } - hiddenPanes.add( paneId ); - } - } - - return hiddenPanes; + public String getGeoAreaName() { + return selectedPaneData.getPredefinedArea().getPredefinedAreaName();//GeoAreaName(); } - public String getGeoAreaName() { - return selectedPaneData.getGeoAreaName(); + public PredefinedArea getPredefinedArea() { + return selectedPaneData.getPredefinedArea(); } // If multi-pane and if geoSync is set then we will need to update all of the @@ -520,11 +522,11 @@ public class RscBundleDisplayMngr { if( isMultiPane() && isGeoSyncPanes() ) { for( PaneSelectionData paneData : paneSelectionDataMap.values() ) { - paneData.setGeoAreaName( areaName ); + paneData.setPredefinedArea( areaName ); } } else { - selectedPaneData.setGeoAreaName( areaName ); + selectedPaneData.setPredefinedArea( areaName ); } return true; @@ -538,7 +540,8 @@ public class RscBundleDisplayMngr { for( int r=0 ; r * @@ -58,19 +63,21 @@ public class SpfsManager implements ILocalizationFileObserver { private static SpfsManager instance = null; - private static long rbdCount = 0; + private static long rbdCount = 0; // Might not want to rely on these counts for anything critical. private static long spfCount = 0; private static long spfGrpCount = 0; // TODO : do we want to store the RbdBundle or just the LocalizationFile // (Store the RbdBundle but don't give it out unless we are making a copy - // of it (by unmarshalling the file in LFIle.) + // of it (by unmarshalling the file in LFile.) private Map>> spfsMap = null; public static SpfsManager getInstance() { + if( instance == null ) { instance = new SpfsManager(); } + return instance; } @@ -97,6 +104,8 @@ public class SpfsManager implements ILocalizationFileObserver { String[] dirs = lFile.getName().split( File.separator ); // if this is a SPF Group or SPF directory + // NOTE: Wait to add the Group/SPF so that only directories + // that have RBDs in them get added to the map. if( lFile.getFile().isDirectory() ) { // if an SPF Group if( dirs.length < 3 ) { @@ -105,12 +114,11 @@ public class SpfsManager implements ILocalizationFileObserver { else if( dirs.length == 3 ) { // this will be redundant if there are actually SPFs in the SPF group since // the SPF directory will create the group too. - addSpfGroup( dirs[2] );// , lFile ); // don't know if we need the lFile here or not - //spfGroupsMap.put( dirs[2], lFile ); +// addSpfGroup( dirs[2] );// , lFile ); // don't know if we need the lFile here or not } else if( dirs.length == 4 ) { //addSpfGroup( dirs[2] ); // don't know if we need the lFile here or not - addSpf( dirs[2], dirs[3] );//, lFile );// store the lFile? +// addSpf( dirs[2], dirs[3] );//, lFile );// store the lFile? //spfsMap.put( dirs[3], lFile ); } else { @@ -149,13 +157,17 @@ public class SpfsManager implements ILocalizationFileObserver { // we will need to store the context for each group though.?? // public void addSpfGroup( String grpName ) { //, LocalizationFile lFile ) { + synchronized ( spfsMap ) { if( !spfsMap.containsKey( grpName ) ) { spfsMap.put( grpName, new TreeMap>() ); spfGrpCount++; } } + } - public void addSpf( String grpName, String spfName ) {//, LocalizationFile lFile ) { + public void addSpf( String grpName, String spfName ) { + + synchronized ( spfsMap ) { addSpfGroup( grpName ); Map> grpMap = spfsMap.get( grpName ); @@ -164,17 +176,17 @@ public class SpfsManager implements ILocalizationFileObserver { grpMap.put( spfName, new TreeMap() ); spfCount++; } - + } } public void addRbd( String grpName, String spfName, RbdBundle rbd ) { - // can we allow an RBD at this point without a LocalizationFile? // if( rbd.getLocalizationFile() == null ) { } + synchronized ( spfsMap ) { addSpfGroup( grpName ); addSpf( grpName, spfName ); @@ -182,9 +194,10 @@ public class SpfsManager implements ILocalizationFileObserver { Map sMap = gMap.get( spfName ); if( !sMap.containsKey( rbd.getRbdName() ) ) { - sMap.put( rbd.getRbdName(), rbd ); rbdCount++; } + sMap.put( rbd.getRbdName(), rbd ); + } } // return an array of all the sub directories in the spf groups dir. @@ -224,15 +237,21 @@ public class SpfsManager implements ILocalizationFileObserver { return new String[]{}; } - String[] rbdNames = sMap.keySet().toArray( new String[0] ); - - Arrays.sort( rbdNames ); +// String[] rbdNames = sMap.keySet().toArray( new String[0] ); +// Arrays.sort( rbdNames ); + // Sort according to the sequence number in the RBD. + RbdBundle[] rbds = sMap.values().toArray( new RbdBundle[0] ); + Arrays.sort( rbds ); + String rbdNames[] = new String[ rbds.length ]; + for( int i=0 ; i getRbdsFromSpf( String grpName, String spfName, + public List getRbdsFromSpf( String grpName, String spfName, boolean resolveLatestCycleTimes ) throws VizException { if( grpName == null || spfName == null ) { @@ -249,25 +268,29 @@ public class SpfsManager implements ILocalizationFileObserver { throw new VizException("SPF "+ spfName+" doesn't exist."); } - ArrayList rbdsList = new ArrayList(); + RbdBundle rbdsList[] = new RbdBundle[ sMap.values().size() ]; + int r=0; for( RbdBundle rbd : sMap.values() ) { - RbdBundle newRbd = RbdBundle.unmarshalRBD( - rbd.getLocalizationFile().getFile(), null ); - newRbd.resolveDominantResource(); + rbdsList[r] = RbdBundle.clone( rbd ); + + rbdsList[r].resolveDominantResource(); if( resolveLatestCycleTimes ) { - newRbd.resolveLatestCycleTimes(); + rbdsList[r].resolveLatestCycleTimes(); // if unable to resolve the cycle time then leave as Latest and // resources will have to gracefully handle NoData. } - rbdsList.add( newRbd ); + r++; } - return rbdsList; + Arrays.sort( rbdsList ); + + // make a copy to allow the user to modify the list. + return new ArrayList( Arrays.asList( rbdsList ) ); } // TODO : decide what is/isn't a valid rbd name ... @@ -283,40 +306,89 @@ public class SpfsManager implements ILocalizationFileObserver { return false; } // - public boolean doesRbdExistInUserContext( - String spfGroup, String spfName, String rbdName ) { - - if( spfsMap.containsKey( spfGroup ) ) { - Map> grpMap = spfsMap.get( spfGroup ); - - if( grpMap.containsKey( spfName ) ) { - Map sMap = grpMap.get( spfName ); - - if( sMap.containsKey( rbdName ) ) { - RbdBundle rbd = sMap.get( rbdName ); - return (rbd.getLocalizationFile().getContext().getLocalizationLevel() == - LocalizationLevel.USER ); - } - } - } - - return false; - } - +// // private Map getRbdList( String grpName, String spfName, RbdBundle rbd ) { // addSpfGroup( grpName ); // // addSpf( grpName, spfName ); // // } + + // create a new SPF with the given rbds. The rbdsList should be in order and the + // SPF should not exist yet. + // + public void createSpf( String grpName, String spfName, List rbdsList, + Boolean saveRefTime, Boolean saveCycleTime ) throws VizException { + // make sure the spf doesn't exist. + if( rbdsList.isEmpty() || grpName == null || grpName.isEmpty() || + spfName == null || spfName.isEmpty() ) { + throw new VizException("Error creating SPF. Null spf name or no rbds are selected." ); + } + + Map> grpMap = spfsMap.get( grpName ); + + if( grpMap != null ) { + Map sMap = grpMap.get( spfName ); + + if( sMap != null ) { + throw new VizException("The SPF "+grpName+File.separator+spfName+" already exists." ); + } + } + + for( RbdBundle rbd : rbdsList ) { + saveRbdToSpf( grpName, spfName, rbd, saveRefTime, saveCycleTime ); + } + + // The updating of the SpfManager is done in the Notification thread to give it time to update + // before refetching the rbds again. + try { Thread.sleep(300); } catch (InterruptedException e) { } + } + // the SPF should already exist. This will delete any existing Rbds that aren't in the given list. +// + public void saveSpf( String grpName, String spfName, List rbdsList, + Boolean saveRefTime, Boolean saveCycleTime ) throws VizException { + if( rbdsList.isEmpty() || + grpName == null || grpName.isEmpty() || + spfName == null || spfName.isEmpty() ) { + throw new VizException("Error saving SPF. Null spf name or no rbds are selected." ); + } + + // get the current Rbds so we can delete those that have been removed. +// + List existingRbds = getRbdsFromSpf( grpName, spfName, false ); + + boolean deleteRbdFlag = true; + + for( RbdBundle existingRbd : existingRbds ) { + deleteRbdFlag = true; + + for( RbdBundle rbd : rbdsList ) { + if( existingRbd.getRbdName().equals( rbd.getRbdName() ) ) { + deleteRbdFlag = false; + break; + } + } + if( deleteRbdFlag ) { + deleteRbd( existingRbd ); + } + } + + // TODO : it would be nice if we could determine if the spf has + // changed so that we don't have to override BASE/SITE level rbds that haven't changed. // - public void saveRbdToSpf( String grpName, String spfName, RbdBundle rbd ) throws VizException { - saveRbdToSpf( grpName, spfName, rbd, false ); // default save cycle time as LATEST + for( RbdBundle rbd : rbdsList ) { + saveRbdToSpf( grpName, spfName, rbd, saveRefTime, saveCycleTime ); + } + + // The updating of the SpfManager is done in the Notification thread to give it time to update + // before refetching the rbds again. + try { Thread.sleep(300); } catch (InterruptedException e) { } } // - public void saveRbdToSpf( String grpName, String spfName, RbdBundle rbd, boolean saveTimeAsConstant ) throws VizException { + public void saveRbdToSpf( String grpName, String spfName, RbdBundle rbd, + boolean saveRefTime, boolean saveCycleTime ) throws VizException { // The localization code will handle creating the group and spf directories if needed // @@ -334,11 +406,22 @@ public class SpfsManager implements ILocalizationFileObserver { } File rbdFile = lFile.getFile(); + // if the user elects not to save out the refTime then don't marshal it out. + // + DataTime savedRefTime = rbd.getTimeMatcher().getRefTime(); + + if( !saveRefTime ) { + rbd.getTimeMatcher().setCurrentRefTime(); + } + // If user requested saving cycle times as LATEST (as opposed to Constant), then for each // requestable forecast resource in the RBD, make it so -- before marshaling out to XML. // But first, save the 'real' cycle time in a map, for restoration later (below). + // + // TODO : do we still have to do this now that we can clone the RBDs? + // Map resourceNameToCycleTimeMap = new HashMap(); - if (!saveTimeAsConstant) { + if( !saveCycleTime ) { for (AbstractRenderableDisplay display : rbd.getDisplays()) { for (ResourcePair rp : display.getDescriptor().getResourceList()) { AbstractResourceData ard = rp.getResourceData(); @@ -373,9 +456,13 @@ public class SpfsManager implements ILocalizationFileObserver { } catch (SerializationException e) { throw new VizException(e); } finally { + if( !saveRefTime ) { + rbd.getTimeMatcher().setRefTime( savedRefTime ); + } + // If we saved cycle times as LATEST (as opposed to Constant), then restore the 'real' // cycle times in each requestable forecast resource in the RBD. (See above.) - if (!saveTimeAsConstant) { + if (!saveCycleTime) { for (AbstractRenderableDisplay display : rbd.getDisplays()) { for (ResourcePair rp : display.getDescriptor().getResourceList()) { AbstractResourceData ard = rp.getResourceData(); @@ -389,7 +476,229 @@ public class SpfsManager implements ILocalizationFileObserver { } } } + } + } + + public void deleteSpfGroup( String delGroup ) throws VizException { + LocalizationFile groupLocDir = NcPathManager.getInstance().getStaticLocalizationFile( + NcPathConstants.SPFS_DIR + File.separator + delGroup ); + + if( groupLocDir == null ) { + throw new VizException( "Could not find Localization File for:\n"+ + NcPathConstants.SPFS_DIR + File.separator + delGroup); + } + else if( groupLocDir.getContext().getLocalizationLevel() != LocalizationContext.LocalizationLevel.USER ) { + throw new VizException( "Can not delete a non-user defined SPF." ); + } + else if( getSpfNamesForGroup( delGroup ).length > 0 ) { + throw new VizException( "Can't delete non-empty SPF:\n"+delGroup); + } + else if( !groupLocDir.isDirectory() ) { // sanity check + throw new VizException( "Localization File for SPF is not a directory:\n"+ delGroup ); + } + + // Note that this will trigger the fileUpdated which will remove the group from the map + try { + if( !groupLocDir.delete() ) { + throw new VizException("Error deleting file:"+groupLocDir.getFile().getAbsolutePath() ); + } + } catch (LocalizationOpFailedException e) { + throw new VizException(e); + } + } + + // use this to check to see if the given User-level SPF has a superceding SPF. + // + public LocalizationContext getSpfContext( String spfGroup, String spfName ) throws VizException { + LocalizationFile spfLocDir = NcPathManager.getInstance().getStaticLocalizationFile( + NcPathConstants.SPFS_DIR + File.separator + spfGroup + File.separator + spfName ); + return ( spfLocDir == null ? null : spfLocDir.getContext() ); + } + + // Ideally we could just check that the SPF dir is in User-Level Context. The SPF Manager GUI + // should enforce this but it may be possible for the Localization perspective to be used to + // create USER level SPFs with SITE or DESK level RBDs. + // This method will return false if the SPF dir or any of its RBDs have a non USER level file. + // + public Boolean isUserLevelSpf( String spfGroup, String spfName ) { + try { + LocalizationContext spfCntx = getSpfContext( spfGroup, spfName ); + for( RbdBundle rbd : getRbdsFromSpf( spfGroup, spfName, false ) ) { + // TODO : should we look for the File if the LocalizationFile is not set? + // Just assum that the RBD hasn't been created yet.... + if( rbd.getLocalizationFile() != null ) { + + if( rbd.getLocalizationFile().getContext().getLocalizationLevel() != LocalizationLevel.USER ) { + return false; + } + } + } + } catch (VizException e) { + System.out.println("error getting Spf Localization Dir.???"); + // assume it hasn't been created yet + } + + return true; + } + + + // This assumes that all the RBDs and the SPF all are in the USER's Localization. + + // This will delete all the user-level RBDs in the SPF as well as the SPF. + // If there are SITE, or Base level files in the SPF then we will 'revert' back to + // + public void deleteSpf( String spfGroup, String delSpfName ) throws VizException { + + LocalizationFile spfLocDir = NcPathManager.getInstance().getStaticLocalizationFile( + NcPathConstants.SPFS_DIR + File.separator + spfGroup + File.separator + delSpfName ); + + if( spfLocDir == null ) { + throw new VizException( "Could not find Localization File for:\n"+ + NcPathConstants.SPFS_DIR + File.separator + spfGroup + File.separator + delSpfName ); + } + else if( !isUserLevelSpf(spfGroup, delSpfName ) ) { + throw new VizException("Either the SPF Localization Dir or one of the RBD " + + "Localization Files is not in the User-Level Context."); + } + else if( !spfLocDir.isDirectory() ) { // sanity check + throw new VizException( "Localization File for SPF is not a directory:\n"+ + spfGroup + File.separator + delSpfName ); + } + + // get a list of the RBDs in this spf and delete them + List existingRbds = getRbdsFromSpf( spfGroup, delSpfName, false ); + + for( RbdBundle delRbd : existingRbds ) { +// check to see if this RBD supercedes a SITE or DESK level RBD +// LocalizationFile rbdLocFiles[] = NcPathManager.getInstance().getTieredLocalizationFile( +// NcPathConstants.SPFS_DIR + File.separator + spfGroup + File.separator + delSpfName+File.separator+rbd.getR ); + + deleteRbd( delRbd ); + } + + + // Note that this will trigger the fileUpdated which will remove the spf from the map + try { + spfLocDir.delete(); + + // The updating of the SpfManager is done in the Notification thread to give it time to update + // before refetching the rbds again. + try { Thread.sleep(300); } catch (InterruptedException e) { } + + } catch (LocalizationOpFailedException e) { + throw new VizException(e); + } + } + + public void deleteRbd( RbdBundle rbd ) throws VizException { + LocalizationFile lFile = rbd.getLocalizationFile(); + + if( lFile == null ) { + throw new VizException("Rbd, "+rbd.getRbdName()+" has no Localization File to delete."); + } + else if( lFile.getContext().getLocalizationLevel() != + LocalizationLevel.USER ) { + throw new VizException("Can not delete a non-USER level RBD: "+rbd.getRbdName() ); + } + + // this will trigger the fileUpdated method which will + // remove the Rbd from the map + try { + lFile.delete(); + } catch (LocalizationOpFailedException e) { + throw new VizException(e); + } + + rbd.setLocalizationFile( null ); + } + + public void removeEntryByFile( LocalizationFile lFile ) { + +// + Map superFiles = + NcPathManager.getInstance().getTieredLocalizationFile( lFile.getName() ); + superFiles.remove( LocalizationLevel.USER ); + + if( !superFiles.isEmpty() ) { + System.out.println("Removing FIle "+lFile.getName()+ + " that has a lower level File. Need to Revert." ); + } + + + String spfPaths[] = lFile.getName().split(File.separator); + int i = NcPathConstants.SPFS_DIR.split(File.pathSeparator).length; + int pathCount = spfPaths.length-i-1; + + String spfGroup = spfPaths[i+1]; + + Map> grpMap = spfsMap.get( spfGroup ); + + if( grpMap == null ) { + System.out.println("Could not find Group "+spfGroup+" for RBD "+ + lFile.getName() ); + return; + } + + // if this is an Spf Group then remove it and return + if( pathCount == 1 ) { + // sanity check that the group is empty + // + if( spfsMap.containsKey( spfGroup ) ) { + if( !spfsMap.get( spfGroup ).isEmpty() ) { + System.out.println("???deleting non-empty SPF Group: "+ spfGroup ); + } + } + + spfsMap.remove( spfGroup ); + + return; + } + + String spfName = spfPaths[i+2]; + + Map sMap = grpMap.get( spfName ); + + if( sMap == null ) { + System.out.println("Could not find SPF "+spfName+" for RBD "+ + lFile.getName() ); + return; + } + + // if this is an Spf then remove it and return + if( pathCount == 2 ) { + if( grpMap.containsKey( spfName ) ) { + if( !grpMap.get( spfName ).isEmpty() ) { + System.out.println("???deleting non-empty SPF : "+ spfName ); + } + } + + grpMap.remove( spfName ); + + if( grpMap.isEmpty() ) { + spfsMap.remove( spfGroup ); + } + return; + } + + long saveRbdCount = rbdCount; + + String rbdFileName = spfPaths[i+3]; + + for( String rbdName : sMap.keySet() ) { + LocalizationFile lf = sMap.get( rbdName ).getLocalizationFile(); + if( lf != null && + lf.getName().equals( lFile.getName() ) ) { + + sMap.remove( rbdName ); + + rbdCount--; + break; + } + } + + if( saveRbdCount == rbdCount ) { + System.out.println("Could not find rbd to remove for File:"+lFile.getName() ); } } @@ -399,13 +708,15 @@ public class SpfsManager implements ILocalizationFileObserver { FileChangeType chgType = message.getChangeType(); LocalizationContext chgContext = message.getContext(); - // TODO : need to handle the UPDATED (and DELETED when delete is implemented) cases + // TODO : need to handle the UPDATED cases // - - if (chgType == FileChangeType.ADDED) { - + LocalizationFile lFile = NcPathManager.getInstance().getLocalizationFile( + chgContext, chgFile ); String[] dirsf = chgFile.split( File.separator); + try { + if( chgType == FileChangeType.ADDED ) { + // if( !chgFile.endsWith(".xml" ) ) { System.out.println("Non-xmlfile found under SPFs dir???:"+ chgFile ); } @@ -413,14 +724,21 @@ public class SpfsManager implements ILocalizationFileObserver { System.out.println("xml file found in non-SPF directory? "+ chgFile ); } else { - try { - LocalizationFile lFile = NcPathManager.getInstance().getLocalizationFile( - chgContext, chgFile ); RbdBundle rbd = RbdBundle.unmarshalRBD( lFile.getFile(), null ); //System.out.println("Add Rbd name is " + rbd.rbdName ); rbd.setLocalizationFile( lFile ); addRbd( dirsf[2], dirsf[3], rbd ); } + } + else if( chgType == FileChangeType.DELETED ) { + + removeEntryByFile( lFile ); + } + // TODO + else if( chgType == FileChangeType.UPDATED ) { + System.out.println("SpfsManager recieved FileUpdated msg but not handleing"); + } + } catch (VizException e ) { // log error System.out.println("Error unmarshalling rbd: "+ chgFile @@ -428,5 +746,3 @@ public class SpfsManager implements ILocalizationFileObserver { } } } - } -} \ No newline at end of file diff --git a/ncep/gov.noaa.nws.ncep.viz.resources/src/gov/noaa/nws/ncep/viz/resources/time_match/NCTimeMatcher.java b/ncep/gov.noaa.nws.ncep.viz.resources/src/gov/noaa/nws/ncep/viz/resources/time_match/NCTimeMatcher.java index c00d6ae846..b455930e9b 100644 --- a/ncep/gov.noaa.nws.ncep.viz.resources/src/gov/noaa/nws/ncep/viz/resources/time_match/NCTimeMatcher.java +++ b/ncep/gov.noaa.nws.ncep.viz.resources/src/gov/noaa/nws/ncep/viz/resources/time_match/NCTimeMatcher.java @@ -51,6 +51,8 @@ import com.raytheon.uf.viz.core.rsc.LoadProperties; * to allow for initialization without timelineControl * 03/07/11 migration Greg Hull rm notifyResourceAdd and change defn of initialLoad * 11/29/11 518 Greg Hull add dfltFrameTimes + * 06/17/12 713 Greg Hull typo in copy constr for skipValue + * 08/27/12 851 Greg Hull ignore dataTime level when creating new frame Times * * * @@ -138,7 +140,7 @@ public class NCTimeMatcher extends AbstractTimeMatcher implements frameTimes = new ArrayList(tm.frameTimes); timesLoaded = tm.timesLoaded; numFrames = tm.numFrames; - skipValue = tm.dfltSkipFrames; + skipValue = tm.skipValue; timeRange = tm.timeRange; refTime = (tm.refTime == null ? null : new DataTime( tm.refTime.getRefTime(), tm.refTime.getFcstTime())); @@ -516,14 +518,18 @@ public class NCTimeMatcher extends AbstractTimeMatcher implements // auto-update // occurs. public ArrayList determineNewFrameTimes(DataTime newDataTime) { + // in somecases the dataTime from the data can have a level set which + // can mess up the equals() method. + DataTime newFrameTime = new DataTime( newDataTime.getValidTime() ); + ArrayList newFrameTimes = new ArrayList(1); // if the timeline was created using DATA_TIMES then the new time is the // new frame time unless // it is already in the frameTimes. if (frameInterval == -1) { - if (!frameTimes.contains(newDataTime)) { - newFrameTimes.add(newDataTime); + if (!frameTimes.contains(newFrameTime)) { + newFrameTimes.add(newFrameTime); } } else if (frameInterval != 0) { // if MANUAL or FRAME_TIMES // TODO : we could add forecast updates but right now it doesn't @@ -543,7 +549,7 @@ public class NCTimeMatcher extends AbstractTimeMatcher implements // possible if no updates are received for a complete frame. // (TODO : is this what we want or should we only update to the // given data?) - while (nextFrameTimeMs + frameInterval * 1000 * 60 < newDataTime + while (nextFrameTimeMs + frameInterval * 1000 * 60 < newFrameTime .getValidTime().getTime().getTime()) { nextFrameTimeMs += frameInterval * 1000 * 60; newFrameTimes.add(new DataTime(new Date(nextFrameTimeMs))); diff --git a/ncep/gov.noaa.nws.ncep.viz.rsc.airmet/src/gov/noaa/nws/ncep/viz/rsc/airmet/rsc/AirmetResource.java b/ncep/gov.noaa.nws.ncep.viz.rsc.airmet/src/gov/noaa/nws/ncep/viz/rsc/airmet/rsc/AirmetResource.java index 6285ea6b53..a51c1fd287 100644 --- a/ncep/gov.noaa.nws.ncep.viz.rsc.airmet/src/gov/noaa/nws/ncep/viz/rsc/airmet/rsc/AirmetResource.java +++ b/ncep/gov.noaa.nws.ncep.viz.rsc.airmet/src/gov/noaa/nws/ncep/viz/rsc/airmet/rsc/AirmetResource.java @@ -46,6 +46,7 @@ import com.vividsolutions.jts.geom.Coordinate; * 09/30/10 307 Greg Hull AirmetRscDataObject implements IRscDataObject * 08/05/11 n/a B. Hebbard In preProcessFrameUpdate(), preserve newRscDataObjsQueue * 05/23/12 785 Q. Zhou Added getName for legend. + * 08/17/12 655 B. Hebbard Added paintProps as parameter to IDisplayable draw * * * @author ghull @@ -399,7 +400,7 @@ public class AirmetResource extends AbstractNatlCntrsResource displayEls = df.createDisplayElements( symbol , paintProps ); for( IDisplayable each : displayEls ) { - each.draw(target); + each.draw(target, paintProps); each.dispose(); } } diff --git a/ncep/gov.noaa.nws.ncep.viz.rsc.ffa/src/gov/noaa/nws/ncep/viz/rsc/ffa/rsc/FFAResource.java b/ncep/gov.noaa.nws.ncep.viz.rsc.ffa/src/gov/noaa/nws/ncep/viz/rsc/ffa/rsc/FFAResource.java index a693db066c..3d2869e1b8 100644 --- a/ncep/gov.noaa.nws.ncep.viz.rsc.ffa/src/gov/noaa/nws/ncep/viz/rsc/ffa/rsc/FFAResource.java +++ b/ncep/gov.noaa.nws.ncep.viz.rsc.ffa/src/gov/noaa/nws/ncep/viz/rsc/ffa/rsc/FFAResource.java @@ -33,10 +33,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; -//import java.util.Date; -//import java.util.Map.Entry; -//import java.text.SimpleDateFormat; -//import java.util.TimeZone; import org.apache.log4j.Logger; import org.eclipse.swt.graphics.RGB; @@ -67,9 +63,6 @@ import com.raytheon.viz.core.rsc.jts.JTSCompiler.PointStyle; import com.vividsolutions.jts.geom.Envelope; import com.vividsolutions.jts.geom.Geometry; import com.vividsolutions.jts.io.WKBReader; -//import com.vividsolutions.jts.geom.Point; -//import com.vividsolutions.jts.io.ParseException; - /** * FFA resourceResource - Display Flash Flood data from aww data. @@ -86,6 +79,8 @@ import com.vividsolutions.jts.io.WKBReader; * events start and then end in different dates * 16 Feb 2012 555 S. Gurung Added call to setAllFramesAsPopulated() in queryRecords() * 05/23/12 785 Q. Zhou Added getName for legend. + * 17 Aug 2012 655 B. Hebbard Added paintProps as parameter to IDisplayable draw + * 09/11/12 852 Q. Zhou Modified time string and alignment in drawLabel(). * * * @author mgao @@ -805,33 +800,38 @@ else if (FFAConstant.FLOOD_WATCH/*.FLASH_FLOOD_STATEMENT*/.equalsIgnoreCase(each */ if(!ffaRscData.getOutlineEnable()) { drawSymbol(FFAConstant.FILLED_DIAMOND_SYMBOL, graphicsTarget, paintProps, labelLatLon, - color, symbolLineWidth, symbolSizeScale); + color, symbolLineWidth, symbolSizeScale*0.4); } - String[] textArray = new String[3]; + String[] text = new String[3]; + List enabledText = new ArrayList(); if(ffaRscData.getCountyOrZoneNameEnable() ){ - textArray[0]=getCountyOrZoneAndStateNameValue(eachCountyOrZoneAndStateName); + enabledText.add(getCountyOrZoneAndStateNameValue(eachCountyOrZoneAndStateName)); } if(ffaRscData.getTimeEnable() ){ - textArray[1] = getEventTimeStringValue(ffaData.eventTime, ffaData.endTime); + enabledText.add(getEventTimeStringValue(ffaData.eventTime, ffaData.endTime)); } if(ffaRscData.getImmediateCauseEnable() ){ - textArray[2] = getImmediateCauseDesc(ffaData.immediateCause); + enabledText.add(getImmediateCauseDesc(ffaData.immediateCause)); } -for(int i=0; i displayElsPoint = df.createDisplayElements(symbol, paintProps ); for ( IDisplayable each : displayElsPoint ) { - each.draw(graphicsTarget); + each.draw(graphicsTarget, paintProps); each.dispose(); } } @@ -1024,14 +1024,14 @@ for(int i=0; i gw = new ArrayList();//2011-10-05 FrameData's fDa countyGeo= (com.vividsolutions.jts.geom.MultiPolygon)wkbReader.read(wkb1); - if ( countyGeo != null && countyGeo.isValid() && ( ! countyGeo.isEmpty())){ + if ( countyGeo != null && !countyGeo.isEmpty()){ gw.add(countyGeo); } diff --git a/ncep/gov.noaa.nws.ncep.viz.rsc.ffa/src/gov/noaa/nws/ncep/viz/rsc/ffa/rsc/FfaZoneQueryResult.java b/ncep/gov.noaa.nws.ncep.viz.rsc.ffa/src/gov/noaa/nws/ncep/viz/rsc/ffa/rsc/FfaZoneQueryResult.java index 061524fd52..0516154480 100644 --- a/ncep/gov.noaa.nws.ncep.viz.rsc.ffa/src/gov/noaa/nws/ncep/viz/rsc/ffa/rsc/FfaZoneQueryResult.java +++ b/ncep/gov.noaa.nws.ncep.viz.rsc.ffa/src/gov/noaa/nws/ncep/viz/rsc/ffa/rsc/FfaZoneQueryResult.java @@ -136,11 +136,10 @@ public class FfaZoneQueryResult { if( list == null ){ logger.log(Level.WARNING, "_______ No result for fips: "+fips); - return new ArrayList>(); } - return list;//fipsMultiResultMap.get(fips); + return list; } } diff --git a/ncep/gov.noaa.nws.ncep.viz.rsc.hrcn/src/gov/noaa/nws/ncep/viz/rsc/hrcn/rsc/HrcnResource.java b/ncep/gov.noaa.nws.ncep.viz.rsc.hrcn/src/gov/noaa/nws/ncep/viz/rsc/hrcn/rsc/HrcnResource.java index c0ca000ee7..29d3732e89 100644 --- a/ncep/gov.noaa.nws.ncep.viz.rsc.hrcn/src/gov/noaa/nws/ncep/viz/rsc/hrcn/rsc/HrcnResource.java +++ b/ncep/gov.noaa.nws.ncep.viz.rsc.hrcn/src/gov/noaa/nws/ncep/viz/rsc/hrcn/rsc/HrcnResource.java @@ -39,6 +39,7 @@ import com.vividsolutions.jts.geom.Coordinate; * ------------ ---------- ----------- -------------------------- * 04 Oct 2011 466 B. Hebbard Initial creation. * 05/23/12 785 Q. Zhou Added getName for legend. + * 17 Aug 2012 655 B. Hebbard Added paintProps as parameter to IDisplayable draw * * * @author bhebbard @@ -156,7 +157,7 @@ public class HrcnResource extends AbstractNatlCntrsResource displayEls = df.createDisplayElements(tcm, paintProps); for (IDisplayable each : displayEls) { - each.draw(target); + each.draw(target, paintProps); each.dispose(); } } diff --git a/ncep/gov.noaa.nws.ncep.viz.rsc.idft/src/gov/noaa/nws/ncep/viz/rsc/idft/rsc/IDFTResource.java b/ncep/gov.noaa.nws.ncep.viz.rsc.idft/src/gov/noaa/nws/ncep/viz/rsc/idft/rsc/IDFTResource.java index b81233c689..3b3bad27a5 100644 --- a/ncep/gov.noaa.nws.ncep.viz.rsc.idft/src/gov/noaa/nws/ncep/viz/rsc/idft/rsc/IDFTResource.java +++ b/ncep/gov.noaa.nws.ncep.viz.rsc.idft/src/gov/noaa/nws/ncep/viz/rsc/idft/rsc/IDFTResource.java @@ -58,6 +58,7 @@ import com.raytheon.uf.viz.core.rsc.ResourceType; * 04/11 #? B. Yin Re-factor IAttribute * 01/06/2012 530 B. Hebbard In initResource filter DB query by cycle time * 05/23/12 785 Q. Zhou Added getName for legend. + * 08/17/12 655 B. Hebbard Added paintProps as parameter to IDisplayable draw (2) * * * @author gzhang @@ -208,7 +209,7 @@ public class IDFTResource extends AbstractNatlCntrsResource displayElsArrow = df.createDisplayElements( (IVector)idftData.vector , paintProps ); for ( IDisplayable each : displayElsArrow ) { - each.draw(grphTarget); + each.draw(grphTarget, paintProps); each.dispose(); } @@ -218,7 +219,7 @@ public class IDFTResource extends AbstractNatlCntrsResource displayElsPoint = df.createDisplayElements( idftData.pointSymbol , paintProps ); for ( IDisplayable each : displayElsPoint ) { - each.draw(grphTarget); + each.draw(grphTarget, paintProps); each.dispose(); } diff --git a/ncep/gov.noaa.nws.ncep.viz.rsc.intlsig/META-INF/MANIFEST.MF b/ncep/gov.noaa.nws.ncep.viz.rsc.intlsig/META-INF/MANIFEST.MF index 45f48d31bf..f63c19734d 100644 --- a/ncep/gov.noaa.nws.ncep.viz.rsc.intlsig/META-INF/MANIFEST.MF +++ b/ncep/gov.noaa.nws.ncep.viz.rsc.intlsig/META-INF/MANIFEST.MF @@ -12,7 +12,9 @@ Require-Bundle: org.eclipse.ui, com.raytheon.uf.common.dataplugin, com.raytheon.uf.viz.core, gov.noaa.nws.ncep.viz.common, - gov.noaa.nws.ncep.ui.pgen + gov.noaa.nws.ncep.ui.pgen, + com.raytheon.viz.core, + org.geotools Bundle-ActivationPolicy: lazy Bundle-RequiredExecutionEnvironment: JavaSE-1.6 Import-Package: com.raytheon.uf.common.geospatial, diff --git a/ncep/gov.noaa.nws.ncep.viz.rsc.intlsig/src/gov/noaa/nws/ncep/viz/rsc/intlsig/rsc/IntlSigmetResource.java b/ncep/gov.noaa.nws.ncep.viz.rsc.intlsig/src/gov/noaa/nws/ncep/viz/rsc/intlsig/rsc/IntlSigmetResource.java index 1ceeeb6b9c..3271415103 100644 --- a/ncep/gov.noaa.nws.ncep.viz.rsc.intlsig/src/gov/noaa/nws/ncep/viz/rsc/intlsig/rsc/IntlSigmetResource.java +++ b/ncep/gov.noaa.nws.ncep.viz.rsc.intlsig/src/gov/noaa/nws/ncep/viz/rsc/intlsig/rsc/IntlSigmetResource.java @@ -27,6 +27,7 @@ import gov.noaa.nws.ncep.viz.common.dbQuery.NcDirectDbQuery; import gov.noaa.nws.ncep.viz.common.ui.NmapCommon; import gov.noaa.nws.ncep.viz.resources.AbstractNatlCntrsResource; import gov.noaa.nws.ncep.viz.resources.INatlCntrsResource; +import gov.noaa.nws.ncep.viz.resources.AbstractNatlCntrsResource.AbstractFrameData; import gov.noaa.nws.ncep.viz.resources.AbstractNatlCntrsResource.IRscDataObject; import java.awt.Color; @@ -40,12 +41,15 @@ import java.util.HashMap; import java.util.LinkedHashMap; import java.util.List; import java.util.ListIterator; +import java.util.Map; import java.util.Set; import java.util.TimeZone; import org.eclipse.swt.graphics.RGB; import com.raytheon.uf.common.dataplugin.PluginDataObject; +import com.raytheon.uf.common.geospatial.MapUtil; +import com.raytheon.uf.common.geospatial.util.WorldWrapChecker; import com.raytheon.uf.common.time.DataTime; import com.raytheon.uf.common.time.TimeRange; import com.raytheon.uf.edex.decodertools.core.LatLonPoint; @@ -56,15 +60,19 @@ import com.raytheon.uf.viz.core.IGraphicsTarget.TextStyle; import com.raytheon.uf.viz.core.IGraphicsTarget.VerticalAlignment; import com.raytheon.uf.viz.core.catalog.DirectDbQuery.QueryLanguage; import com.raytheon.uf.viz.core.drawables.IFont; +import com.raytheon.uf.viz.core.drawables.IWireframeShape; import com.raytheon.uf.viz.core.drawables.PaintProperties; import com.raytheon.uf.viz.core.exception.VizException; import com.raytheon.uf.viz.core.geom.PixelCoordinate; import com.raytheon.uf.viz.core.map.IMapDescriptor; import com.raytheon.uf.viz.core.rsc.LoadProperties; +import com.raytheon.viz.core.rsc.jts.JTSCompiler; import com.vividsolutions.jts.geom.Coordinate; +import com.vividsolutions.jts.geom.Geometry; import com.vividsolutions.jts.geom.GeometryFactory; import com.vividsolutions.jts.geom.LineString; import com.vividsolutions.jts.geom.Point; +import com.vividsolutions.jts.geom.Polygon; ; /** /** @@ -85,6 +93,13 @@ import com.vividsolutions.jts.geom.Point; * implemented the IRscDataObj interface * 04/11 ? B. Yin Re-factor IAttribute * 05/23/12 785 Q. Zhou Added getName for legend. + * 06/25/2012 758 S. Gurung Added new method drawPolygon(...) to clip polygons that span the edges (in world view). + * Added code to display the latest SIGMET currently in effect, if there are + * 2 or more SIGMETs with same messageID valid at the same time frame. + * 06/27/2012 830 S. Gurung Added fix for the issue: changes in Edit Attributes Dialog not functioning properly. + * 08/17/2012 655 B. Hebbard Added paintProps as parameter to IDisplayable draw + * 10/25/2012 B. Hebbard [per S. Gurung] Replace 3 WorldWrapChecker.getInverseCentralMeridian() calls, + * due to split by RTS in OB12.11.1 into get{High|Low}InverseCentralMeridian() * * * @author Archana @@ -168,7 +183,63 @@ implements INatlCntrsResource{ @Override protected AbstractFrameData createNewFrame( DataTime frameTime, int timeInt ) { return (AbstractFrameData) new FrameData( frameTime, timeInt ); - } + } + + @Override + protected boolean postProcessFrameUpdate() { + + // for each frame... + + for (AbstractFrameData afd : frameDataMap.values()) { + FrameData fd = (FrameData) afd; + + // ...go through all the data time matched to this frame + // to determine, for every messageid, the latest issuance + // of SIGMETs for that messageid + + Map latestSigmetIssuanceTimeForMessageId = new HashMap(); + + for (IntlSigmetRscDataObj isigRDO : fd.condensedIntligLinkedHashMap.values()) { + String sequenceNumber = isigRDO.sequenceNumber.trim(); + if (sequenceNumber != null && !sequenceNumber.isEmpty()) { + String messageID = isigRDO.messageID.trim(); + // null International SIGMET still counts as 'issuance' + DataTime latestSigmetIssuanceForThisMessageID = + latestSigmetIssuanceTimeForMessageId.get(messageID); + if (latestSigmetIssuanceForThisMessageID == null || + isigRDO.issueTime.greaterThan(latestSigmetIssuanceForThisMessageID)) { + latestSigmetIssuanceTimeForMessageId.put(messageID, isigRDO.issueTime); + } + + } + } + + //latestSigmetIssuanceTimeForMessageId = latestSigmetIssuanceTimeForMessageId; + // Now that we've determined the latest issuances for each messageId -- we make a second + // pass through the data time matched to this frame. This time, + // we purge anything superseded by a later issuance. + + String[] keys = new String[1]; + keys = fd.condensedIntligLinkedHashMap.keySet().toArray(keys); + for (String key : keys) { + IntlSigmetRscDataObj isigRDO = fd.condensedIntligLinkedHashMap.get(key); + String sequenceNumber = (isigRDO == null) ? null : isigRDO.sequenceNumber; + if (sequenceNumber != null && !sequenceNumber.isEmpty()) { + String messageID = isigRDO.messageID.trim(); + + DataTime latestSigmetIssuanceForThisMessageID = + latestSigmetIssuanceTimeForMessageId.get(messageID); + if (latestSigmetIssuanceForThisMessageID != null && + latestSigmetIssuanceForThisMessageID.greaterThan(isigRDO.issueTime)) { + fd.condensedIntligLinkedHashMap.remove(key); + } + } + } + + } + + return true; + } /*** * Overridden method to render the International SIGMETs in each frame. @@ -204,6 +275,7 @@ implements INatlCntrsResource{ FrameData currFrameData = (FrameData) frameData; DataTime activeFrameTime = currFrameData.getFrameTime(); Collection condensedISIGCollection= currFrameData.condensedIntligLinkedHashMap.values(); + for(IntlSigmetRscDataObj condensedISIG : condensedISIGCollection){ /* Check for invalid time range*/ @@ -224,322 +296,390 @@ implements INatlCntrsResource{ Coordinate tempSymbolLocationWorldCoord = null; ArrayList weatherHarzardList = condensedISIG.getWeatherHazardEnumList(); - /* Retrieve the symbol specific attributes such as symbol size, width, pattern to be used etc, for all the - * weather hazards in the current international sigmet - **/ - condensedISIG.symbolAttributeSubsetList = condensedISIG.generateListOfSymbolAttributesForAllWeatherHazards( - weatherHarzardList); - - if(condensedISIG.symbolAttributeSubsetList.size() > 0){ - firstSymbolAttributes = condensedISIG.symbolAttributeSubsetList.get(0); - polygonLineColor = firstSymbolAttributes.getSymbolColor(); - polygonLineWidth = firstSymbolAttributes.getLineWidth(); - } - - if(weatherHarzardList.get(0).equals(WeatherHazardType.TEST)){ - lineStyle = LineStyle.SHORT_DASHED; - } - - + boolean enabled = false; + int weatherHarzardListSize = (weatherHarzardList!=null)? weatherHarzardList.size():0; + + for (int i=0; i 1 && !isLocationLookUpFailed ){ - this.drawPolygon(graphicsTarget,condensedISIG.polygonVertexPixelCoordList,polygonLineColor,polygonLineWidth,lineStyle); - - /*Get the pixel coordinate of the lowest vertex of the polygon to render the text */ - textLocation = condensedISIG.getLabelLocation(condensedISIG.polygonVertexPixelCoordList); - - /*Get the centroid of the polygon in world coordinates to render the symbol*/ - tempSymbolLocationWorldCoord = condensedISIG.getCentroidInWorldCoordinates(this.getDescriptor(), - condensedISIG.polygonVertexPixelCoordList); - int distance = condensedISIG.getDistance(); - String polyExtent = condensedISIG.getPolygonExtent(); - if(distance != IDecoderConstantsN.INTEGER_MISSING){ - if(!condensedISIG.isPolygonClosed()){ - /*If a surrounding polygon is to be rendered */ - this.drawPolygonSurroundingLine(graphicsTarget, - this.getDescriptor(), - condensedISIG.polygonVertexWorldCoord, - condensedISIG.polygonVertexPixelCoordList, - polygonLineColor,polygonLineWidth, - LineStyle.SHORT_DASHED,distance,polyExtent); - } - } - - } - - else if(polygonVertexPixelCoordListSize == 1 && !isLocationLookUpFailed){ - - /*Get the location of the single vertex to draw the symbol at that point, but convert it first to world coordinates*/ - PixelCoordinate singlePoint = condensedISIG.polygonVertexPixelCoordList.get(0); - double[] pixLoc = new double[]{singlePoint.getX(), singlePoint.getY()}; - PixelCoordinate symbolPixToWorldCoord = new PixelCoordinate(descriptor.pixelToWorld(pixLoc)); - tempSymbolLocationWorldCoord = new Coordinate(symbolPixToWorldCoord.getX(), symbolPixToWorldCoord.getY()); - if(condensedISIG.getDistance() != IDecoderConstantsN.INTEGER_MISSING){ - - /*This is a weather hazard within a circular area*/ - double radius = condensedISIG.getDistance(); - - /*delta is used to draw the marker at the center of the circle*/ - double delta = offsetY * 0.3; - this.drawCircleWithMarker(graphicsTarget,singlePoint,radius, delta, polygonLineColor, polygonLineWidth); - } - - - /*This is retained from legacy code: - * For a single point (isolated) TEST SIGMET the label's text is preceded with the character 'T'. - **/ - if(weatherHarzardList.size() > 0 - && weatherHarzardList.get(0).equals(WeatherHazardType.TEST)){ - labelList.add("T"); - } - - /*The location of the label should be the same as that of the single vertex, but with a small x and y offset - * to separate it from the symbol*/ - textLocation = singlePoint; - textLocation.addToX(offsetX); - textLocation.addToY(offsetY); - - } - else if(isLocationLookUpFailed){ - /*The question marks are added to ensure that - *the user understands this is a case of location look up failure*/ - labelList.add("??"); - tempSymbolLocationWorldCoord = new Coordinate(condensedISIG.getAlternateSymbolLocationLongitude(),condensedISIG.getAlternateSymbolLocationLatitude()); - double[] worldPixel = new double[]{tempSymbolLocationWorldCoord.x, tempSymbolLocationWorldCoord.y}; - textLocation = new PixelCoordinate( descriptor.worldToPixel(worldPixel)); - textLocation.addToX(offsetX); - textLocation.addToY(offsetY); - } - - - /*Check if the symbols need to be displayed*/ - if(intlSigmetResourceDataObj.symbolEnable){ - - /*If the symbol location is not null and the list of symbols and the list of weather hazards are not empty..*/ - if(tempSymbolLocationWorldCoord != null - && !condensedISIG.symbolAttributeSubsetList.isEmpty() - && !weatherHarzardList.isEmpty()){ - - PixelCoordinate coordOfSymbolInPixel; - DisplayElementFactory df = new DisplayElementFactory( graphicsTarget, descriptor ); - ArrayList displayEls = new ArrayList(0); - String symbolType = "ASTERISK"; - - Coordinate symbolCoordinate = tempSymbolLocationWorldCoord; - int numSymbolsToDisplay = weatherHarzardList.size(); - boolean isDrawText = false; - firstSymbolAttributes = condensedISIG.symbolAttributeSubsetList.get(0); - Color[] symbolColor = { new Color(firstSymbolAttributes.getSymbolColor().red, - firstSymbolAttributes.getSymbolColor().green, - firstSymbolAttributes.getSymbolColor().blue)}; - - - for( int i = 0 ; i < numSymbolsToDisplay ; i++ ){ - /*(Non-Javadoc) - * If the symbol is to be displayed in the Southern Hemisphere, - * and if it is either a hurricane or a tropical storm, then - * different symbols are used than if it were to be rendered in the - * Northern Hemisphere. - */ - if(symbolCoordinate.x < 0){ - if(weatherHarzardList.get(i) == WeatherHazardType.HU){ - symbolType = "HURRICANE_SH"; - } - if(weatherHarzardList.get(i) == WeatherHazardType.TR){ - symbolType = "TROPICAL_STORM_SH"; - } - } - - /* - * (Non-Javadoc) - * For the weather hazards listed below, instead of symbols, a text representation - * of the same is rendered within a box. - * (Note): - * The decision to render WIND/WTSPT hazards as text - * (since no equivalent symbols exist) is an improvement over legacy, - * which does not render them at all. - * For WIND/WTSPT, the text is rendered in the color white, since there is - * no predefined color. - */ - if(weatherHarzardList.get(i) == WeatherHazardType.MW - || weatherHarzardList.get(i) == WeatherHazardType.WS - || weatherHarzardList.get(i) == WeatherHazardType.WIND - || weatherHarzardList.get(i) == WeatherHazardType.WTSPT){ - isDrawText = true; - switch(weatherHarzardList.get(i)){ - case MW: - symbolType = "MTW"; - break; - case WS: - symbolType = "LLWS"; - break; - case WIND: - symbolType = "WIND"; - break; - case WTSPT: - symbolType = "WTSPT"; - break; - default: - break; - } - } - - int symbolWidth = condensedISIG.symbolAttributeSubsetList.get(i).getSymbolWidth(); - double symbolSize = condensedISIG.symbolAttributeSubsetList.get(i).getSymbolSize(); - - if(isDrawText){ - String[] textString = new String[]{symbolType}; - /*(Non-Javadoc) - * The symbol scaling calculation shown below are ad-hoc and not - *very accurate since there is no specific scaling factor - *that exists between the symbols and the fonts used in CAVE*/ - float symbolSizeInNMAP = (float)(7*symbolSize + 2.5); - float fontSize = symbolSizeInNMAP; - Text symbolText = new Text(null, - "Courier", - symbolSizeInNMAP, - TextJustification.CENTER, - symbolCoordinate, - 0.0, - TextRotation.SCREEN_RELATIVE, - textString, - FontStyle.BOLD, - symbolColor[0], - 0,0, - false, - DisplayType.BOX, - "Text", - "General Text" - ); - displayEls = df.createDisplayElements((IText)symbolText,paintProps); - - }else{ - symbolType = condensedISIG.symbolAttributeSubsetList.get(i).getSymbolType(); - Symbol symbol = new Symbol( - null, - symbolColor, - symbolWidth, - symbolSize * 0.60, /* scale per NMAP*/ - false, - symbolCoordinate, - "Symbol", - symbolType); - displayEls = df.createDisplayElements(symbol,paintProps); - } - - if (displayEls != null && !displayEls.isEmpty()) { - for (IDisplayable each : displayEls) { - each.draw(graphicsTarget); - each.dispose(); - } - } - - isDrawText = false; - - - - /*To get the x-offset and y-offset to display more than one symbol without overlapping*/ - coordOfSymbolInPixel = new PixelCoordinate(descriptor.worldToPixel(new double[]{symbolCoordinate.x, symbolCoordinate.y})); - coordOfSymbolInPixel.addToX(offsetX*1.5); - coordOfSymbolInPixel.addToY(offsetY*1.5); - double pixelArr[] = new double[]{coordOfSymbolInPixel.getX(), coordOfSymbolInPixel.getY()}; - double worldArr[] = descriptor.pixelToWorld(pixelArr); - symbolCoordinate = new Coordinate(worldArr[0], worldArr[1]); - } - - } - } - - /*Display the messageID and sequenceNumber*/ - if(intlSigmetResourceDataObj.nameOrNumberEnable){ - /* - * (Non-Javadoc) - * If both the messageID and the sequenceNumber are not null, display them together. - * If the message id alone is not null, display it, but if it is null, - * don't display the sequence number. - */ - if(condensedISIG.getMessageID() != null ) { - String locMessageId = condensedISIG.getMessageID(); - /* - * (Non-Javadoc) - * This is retained from legacy code: - * If any of the sigmets (KZNY/KZMA/KZHU/TJZS) in the Atlantic are encountered, - * the label is preceded with the character 'A'. - * */ - if(condensedISIG.isSIGMETInAtlantic(condensedISIG.getIssueOffice(), - condensedISIG.getOmwo(), - condensedISIG.getAtsu())){ - labelList.add("A"); - } - - if(condensedISIG.getSequenceNumber() != null){ - - labelList.add(new String (locMessageId + " " - + condensedISIG.getSequenceNumber())); - } - else{ - labelList.add(locMessageId); - } - - } - } - - if(intlSigmetResourceDataObj.timeEnable){ - labelList.add( condensedISIG.getStartTimeText()+ "-" + condensedISIG.getEndTimeText()); - } - - if(intlSigmetResourceDataObj.motionEnable){ - if(condensedISIG.getSpeed() != IDecoderConstantsN.INTEGER_MISSING ){ - labelList.add(condensedISIG.getSpeed() + " KT " + condensedISIG.getDirection()); - } - - } - - if(intlSigmetResourceDataObj.flightLevelEnable){ - int lowerFlightLevel = condensedISIG.getFlightLevel1(); - int upperFlightLevel = condensedISIG.getFlightLevel2(); - if(lowerFlightLevel > 0 && upperFlightLevel > 0){ - - labelList.add(lowerFlightLevel + " / " + upperFlightLevel); - - }else{ - if(lowerFlightLevel > 0){ - labelList.add(lowerFlightLevel + ""); - }else if(upperFlightLevel > 0){ - labelList.add(upperFlightLevel + ""); - }else{ - labelList.add(""); - } - } - } - - - if(!labelList.isEmpty() && textLocation != null){ - - for(int j = 0; j < labelList.size(); j++){ - textRGBArray.add(polygonLineColor); - - } - - graphicsTarget.drawStrings( - font, - (labelList.toArray(new String[0])), - textLocation.getX() + offsetX, - textLocation.getY() + offsetY, - 0.0, - TextStyle.NORMAL, - textRGBArray.toArray(new RGB[0]), - HorizontalAlignment.LEFT, - VerticalAlignment.TOP); - - } + switch( weatherHarzardList.get(i) ) { + case TS: + enabled = intlSigmetResourceDataObj.getThunderstormEnable(); + break; + case TB: + enabled = intlSigmetResourceDataObj.getTurbulenceEnable(); + break; + case HU: + enabled = intlSigmetResourceDataObj.getHurricaneEnable(); + break; + case TR: + enabled = intlSigmetResourceDataObj.getTropicalStormEnable(); + break; + case TD: + enabled = intlSigmetResourceDataObj.getTropicalDepressionEnable(); + break; + case VA: + enabled = intlSigmetResourceDataObj.getVolcanicAshCloudEnable(); + break; + case MW: + enabled = intlSigmetResourceDataObj.getMountainWaveEnable(); + break; + case TC: + enabled = intlSigmetResourceDataObj.getTropicalCycloneEnable(); + break; + case SQ: + enabled = intlSigmetResourceDataObj.getSquallLineEnable(); + break; + case CAT: + enabled = intlSigmetResourceDataObj.getCatEnable(); + break; + case IC: + enabled = intlSigmetResourceDataObj.getIcingEnable(); + break; + case GR: + enabled = intlSigmetResourceDataObj.getHailEnable(); + break; + case DS: + enabled = intlSigmetResourceDataObj.getDustStormEnable(); + break; + case SS: + enabled = intlSigmetResourceDataObj.getSandStormEnable(); + break; + case CB: + enabled = intlSigmetResourceDataObj.getCumulonimbusEnable(); + break; + case WS: + enabled = intlSigmetResourceDataObj.getLowLevelWindShearEnable(); + break; + default: + } } - } + + if (enabled) { + + /* Retrieve the symbol specific attributes such as symbol size, width, pattern to be used etc, for all the + * weather hazards in the current international sigmet + **/ + condensedISIG.symbolAttributeSubsetList = condensedISIG.generateListOfSymbolAttributesForAllWeatherHazards( + weatherHarzardList); + + if(condensedISIG.symbolAttributeSubsetList.size() > 0){ + firstSymbolAttributes = condensedISIG.symbolAttributeSubsetList.get(0); + polygonLineColor = firstSymbolAttributes.getSymbolColor(); + polygonLineWidth = firstSymbolAttributes.getLineWidth(); + } + + if(weatherHarzardList.get(0).equals(WeatherHazardType.TEST)){ + lineStyle = LineStyle.SHORT_DASHED; + } + + + + condensedISIG.polygonVertexPixelCoordList = this.generatePixelCoordinateListFromWorldCoordinateList(condensedISIG.polygonVertexWorldCoord); + if(condensedISIG.polygonVertexPixelCoordList != null){ + int polygonVertexPixelCoordListSize = condensedISIG.polygonVertexPixelCoordList.size(); + boolean isLocationLookUpFailed = condensedISIG.isLocationLookUpFailed(); + if(polygonVertexPixelCoordListSize > 1 && !isLocationLookUpFailed ){ + //this.drawPolygon(graphicsTarget,condensedISIG.polygonVertexPixelCoordList,polygonLineColor,polygonLineWidth,lineStyle); + + Coordinate[] polygonCoordinatesList = condensedISIG.getPolygonLatLonCoordinates(); + this.drawPolygon(polygonCoordinatesList, graphicsTarget, polygonLineColor, polygonLineWidth, lineStyle); + + /*Get the pixel coordinate of the lowest vertex of the polygon to render the text */ + textLocation = condensedISIG.getLabelLocation(condensedISIG.polygonVertexPixelCoordList); + + /*Get the centroid of the polygon in world coordinates to render the symbol*/ + /* tempSymbolLocationWorldCoord = condensedISIG.getCentroidInWorldCoordinates(condensedISIG, this.getDescriptor(), + condensedISIG.polygonVertexPixelCoordList);*/ + + tempSymbolLocationWorldCoord = condensedISIG.getCentroidInWorldCoordinates(polygonCoordinatesList, this.getDescriptor(), graphicsTarget); + + int distance = condensedISIG.getDistance(); + String polyExtent = condensedISIG.getPolygonExtent(); + if(distance != IDecoderConstantsN.INTEGER_MISSING){ + if(!condensedISIG.isPolygonClosed()){ + /*If a surrounding polygon is to be rendered */ + this.drawPolygonSurroundingLine(graphicsTarget, + this.getDescriptor(), + condensedISIG.polygonVertexWorldCoord, + condensedISIG.polygonVertexPixelCoordList, + polygonLineColor,polygonLineWidth, + LineStyle.SHORT_DASHED,distance,polyExtent); + } + } + + } + + else if(polygonVertexPixelCoordListSize == 1 && !isLocationLookUpFailed){ + + /*Get the location of the single vertex to draw the symbol at that point, but convert it first to world coordinates*/ + PixelCoordinate singlePoint = condensedISIG.polygonVertexPixelCoordList.get(0); + double[] pixLoc = new double[]{singlePoint.getX(), singlePoint.getY()}; + PixelCoordinate symbolPixToWorldCoord = new PixelCoordinate(descriptor.pixelToWorld(pixLoc)); + tempSymbolLocationWorldCoord = new Coordinate(symbolPixToWorldCoord.getX(), symbolPixToWorldCoord.getY()); + if(condensedISIG.getDistance() != IDecoderConstantsN.INTEGER_MISSING){ + + /*This is a weather hazard within a circular area*/ + double radius = condensedISIG.getDistance(); + + /*delta is used to draw the marker at the center of the circle*/ + double delta = offsetY * 0.3; + this.drawCircleWithMarker(graphicsTarget,singlePoint,radius, delta, polygonLineColor, polygonLineWidth); + } + + + /*This is retained from legacy code: + * For a single point (isolated) TEST SIGMET the label's text is preceded with the character 'T'. + **/ + if(weatherHarzardList.size() > 0 + && weatherHarzardList.get(0).equals(WeatherHazardType.TEST)){ + labelList.add("T"); + } + + /*The location of the label should be the same as that of the single vertex, but with a small x and y offset + * to separate it from the symbol*/ + textLocation = singlePoint; + textLocation.addToX(offsetX); + textLocation.addToY(offsetY); + + } + else if(isLocationLookUpFailed){ + /*The question marks are added to ensure that + *the user understands this is a case of location look up failure*/ + labelList.add("??"); + tempSymbolLocationWorldCoord = new Coordinate(condensedISIG.getAlternateSymbolLocationLongitude(),condensedISIG.getAlternateSymbolLocationLatitude()); + double[] worldPixel = new double[]{tempSymbolLocationWorldCoord.x, tempSymbolLocationWorldCoord.y}; + textLocation = new PixelCoordinate( descriptor.worldToPixel(worldPixel)); + textLocation.addToX(offsetX); + textLocation.addToY(offsetY); + } + + + /*Check if the symbols need to be displayed*/ + if(intlSigmetResourceDataObj.symbolEnable){ + + /*If the symbol location is not null and the list of symbols and the list of weather hazards are not empty..*/ + if(tempSymbolLocationWorldCoord != null + && !condensedISIG.symbolAttributeSubsetList.isEmpty() + && !weatherHarzardList.isEmpty()){ + + PixelCoordinate coordOfSymbolInPixel; + DisplayElementFactory df = new DisplayElementFactory( graphicsTarget, descriptor ); + ArrayList displayEls = new ArrayList(0); + String symbolType = "ASTERISK"; + + Coordinate symbolCoordinate = tempSymbolLocationWorldCoord; + int numSymbolsToDisplay = weatherHarzardList.size(); + boolean isDrawText = false; + firstSymbolAttributes = condensedISIG.symbolAttributeSubsetList.get(0); + Color[] symbolColor = { new Color(firstSymbolAttributes.getSymbolColor().red, + firstSymbolAttributes.getSymbolColor().green, + firstSymbolAttributes.getSymbolColor().blue)}; + + + for( int i = 0 ; i < numSymbolsToDisplay ; i++ ){ + /*(Non-Javadoc) + * If the symbol is to be displayed in the Southern Hemisphere, + * and if it is either a hurricane or a tropical storm, then + * different symbols are used than if it were to be rendered in the + * Northern Hemisphere. + */ + if(symbolCoordinate.x < 0){ + if(weatherHarzardList.get(i) == WeatherHazardType.HU){ + symbolType = "HURRICANE_SH"; + } + if(weatherHarzardList.get(i) == WeatherHazardType.TR){ + symbolType = "TROPICAL_STORM_SH"; + } + } + + /* + * (Non-Javadoc) + * For the weather hazards listed below, instead of symbols, a text representation + * of the same is rendered within a box. + * (Note): + * The decision to render WIND/WTSPT hazards as text + * (since no equivalent symbols exist) is an improvement over legacy, + * which does not render them at all. + * For WIND/WTSPT, the text is rendered in the color white, since there is + * no predefined color. + */ + if(weatherHarzardList.get(i) == WeatherHazardType.MW + || weatherHarzardList.get(i) == WeatherHazardType.WS + || weatherHarzardList.get(i) == WeatherHazardType.WIND + || weatherHarzardList.get(i) == WeatherHazardType.WTSPT){ + isDrawText = true; + switch(weatherHarzardList.get(i)){ + case MW: + symbolType = "MTW"; + break; + case WS: + symbolType = "LLWS"; + break; + case WIND: + symbolType = "WIND"; + break; + case WTSPT: + symbolType = "WTSPT"; + break; + default: + break; + } + } + + int symbolWidth = condensedISIG.symbolAttributeSubsetList.get(i).getSymbolWidth(); + double symbolSize = condensedISIG.symbolAttributeSubsetList.get(i).getSymbolSize(); + + if(isDrawText){ + String[] textString = new String[]{symbolType}; + /*(Non-Javadoc) + * The symbol scaling calculation shown below are ad-hoc and not + *very accurate since there is no specific scaling factor + *that exists between the symbols and the fonts used in CAVE*/ + float symbolSizeInNMAP = (float)(7*symbolSize + 2.5); + float fontSize = symbolSizeInNMAP; + Text symbolText = new Text(null, + "Courier", + symbolSizeInNMAP, + TextJustification.CENTER, + symbolCoordinate, + 0.0, + TextRotation.SCREEN_RELATIVE, + textString, + FontStyle.BOLD, + symbolColor[0], + 0,0, + false, + DisplayType.BOX, + "Text", + "General Text" + ); + displayEls = df.createDisplayElements((IText)symbolText,paintProps); + + }else{ + symbolType = condensedISIG.symbolAttributeSubsetList.get(i).getSymbolType(); + Symbol symbol = new Symbol( + null, + symbolColor, + symbolWidth, + symbolSize * 0.60, /* scale per NMAP*/ + false, + symbolCoordinate, + "Symbol", + symbolType); + displayEls = df.createDisplayElements(symbol,paintProps); + } + + if (displayEls != null && !displayEls.isEmpty()) { + for (IDisplayable each : displayEls) { + each.draw(graphicsTarget, paintProps); + each.dispose(); + } + } + + isDrawText = false; + + + + /*To get the x-offset and y-offset to display more than one symbol without overlapping*/ + coordOfSymbolInPixel = new PixelCoordinate(descriptor.worldToPixel(new double[]{symbolCoordinate.x, symbolCoordinate.y})); + coordOfSymbolInPixel.addToX(offsetX*1.5); + coordOfSymbolInPixel.addToY(offsetY*1.5); + double pixelArr[] = new double[]{coordOfSymbolInPixel.getX(), coordOfSymbolInPixel.getY()}; + double worldArr[] = descriptor.pixelToWorld(pixelArr); + symbolCoordinate = new Coordinate(worldArr[0], worldArr[1]); + } + + } + } + + /*Display the messageID and sequenceNumber*/ + if(intlSigmetResourceDataObj.nameOrNumberEnable){ + /* + * (Non-Javadoc) + * If both the messageID and the sequenceNumber are not null, display them together. + * If the message id alone is not null, display it, but if it is null, + * don't display the sequence number. + */ + if(condensedISIG.getMessageID() != null ) { + String locMessageId = condensedISIG.getMessageID(); + /* + * (Non-Javadoc) + * This is retained from legacy code: + * If any of the sigmets (KZNY/KZMA/KZHU/TJZS) in the Atlantic are encountered, + * the label is preceded with the character 'A'. + * */ + if(condensedISIG.isSIGMETInAtlantic(condensedISIG.getIssueOffice(), + condensedISIG.getOmwo(), + condensedISIG.getAtsu())){ + labelList.add("A"); + } + + if(condensedISIG.getSequenceNumber() != null){ + + labelList.add(new String (locMessageId + " " + + condensedISIG.getSequenceNumber())); + } + else{ + labelList.add(locMessageId); + } + + } + } + + if(intlSigmetResourceDataObj.timeEnable){ + labelList.add( condensedISIG.getStartTimeText()+ "-" + condensedISIG.getEndTimeText()); + } + + if(intlSigmetResourceDataObj.motionEnable){ + if(condensedISIG.getSpeed() != IDecoderConstantsN.INTEGER_MISSING ){ + labelList.add(condensedISIG.getSpeed() + " KT " + condensedISIG.getDirection()); + } + + } + + if(intlSigmetResourceDataObj.flightLevelEnable){ + int lowerFlightLevel = condensedISIG.getFlightLevel1(); + int upperFlightLevel = condensedISIG.getFlightLevel2(); + if(lowerFlightLevel > 0 && upperFlightLevel > 0){ + + labelList.add(lowerFlightLevel + " / " + upperFlightLevel); + + }else{ + if(lowerFlightLevel > 0){ + labelList.add(lowerFlightLevel + ""); + }else if(upperFlightLevel > 0){ + labelList.add(upperFlightLevel + ""); + }else{ + labelList.add(""); + } + } + } + + + if(!labelList.isEmpty() && textLocation != null){ + + for(int j = 0; j < labelList.size(); j++){ + textRGBArray.add(polygonLineColor); + + } + + graphicsTarget.drawStrings( + font, + (labelList.toArray(new String[0])), + textLocation.getX() + offsetX, + textLocation.getY() + offsetY, + 0.0, + TextStyle.NORMAL, + textRGBArray.toArray(new RGB[0]), + HorizontalAlignment.LEFT, + VerticalAlignment.TOP); + + } + + } + } + } } } @@ -601,6 +741,7 @@ implements INatlCntrsResource{ ArrayList polygonVertexPixelCoord, RGB polygonLineColor, int polygonLineWidth, LineStyle lineStyle, int distance, String polygonExtent) throws VizException { + if (polygonVertexWorldCoord != null && polygonVertexWorldCoord.size() > 1) { Coordinate[] polygonWorldCoordinateArray = new Coordinate[polygonVertexWorldCoord .size()]; @@ -619,7 +760,7 @@ implements INatlCntrsResource{ || polygonExtent.contains("WITHIN"))){ distanceNM = distance/2 * METRE_TO_NM_CONVERSION_FACTOR; } - + /*(Non-Javadoc) * Get the coordinates on either side of the line */ @@ -631,7 +772,7 @@ implements INatlCntrsResource{ polygonWorldCoordinateArray, arrayOfVerticesOnEitherSide[0], arrayOfVerticesOnEitherSide[1]); - + /*(Non-Javadoc) * Ideally, it should be easy to just use the existing IntlSigmetResource.drawPolygon() * method coupled with the IGraphicsTarget.drawArc() method. However when doing this, it was @@ -640,7 +781,7 @@ implements INatlCntrsResource{ * Hence the code to render the polygon and its arc point-by-point have been added here. */ - PixelCoordinate prevLoc = null; + /*PixelCoordinate prevLoc = null; for (Coordinate currCoordinate : arrayOfVerticesOnEitherSideForPolygonWithArc[0]) { double[] latLon = { currCoordinate.x, currCoordinate.y }; PixelCoordinate currLoc = new PixelCoordinate(descriptor.worldToPixel(latLon)); @@ -652,14 +793,15 @@ implements INatlCntrsResource{ } prevLoc = currLoc; - } + }*/ + /* * (Non-Javadoc) * prevLoc is set to the last element of the first side of the polygon * The second side is drawn from its last vertex to the first, thereby allowing the * line in-between the first and second sides to be drawn first * */ - for (int j = arrayOfVerticesOnEitherSideForPolygonWithArc[1].length - 1; j >= 0; j--) { + /*for (int j = arrayOfVerticesOnEitherSideForPolygonWithArc[1].length - 1; j >= 0; j--) { Coordinate currCoordinate = arrayOfVerticesOnEitherSideForPolygonWithArc[1][j]; double[] latLon = { currCoordinate.x, currCoordinate.y }; @@ -673,7 +815,40 @@ implements INatlCntrsResource{ } prevLoc = currLoc; + }*/ + + + ArrayList coordinatesList = new ArrayList(); + + for (Coordinate currCoordinate : arrayOfVerticesOnEitherSideForPolygonWithArc[0]) { + coordinatesList.add(new Coordinate(currCoordinate.x, currCoordinate.y)); } + + for (int j = arrayOfVerticesOnEitherSideForPolygonWithArc[1].length-1; j >= 0; j--) { + Coordinate currCoordinate = arrayOfVerticesOnEitherSideForPolygonWithArc[1][j]; + coordinatesList.add(new Coordinate(currCoordinate.x, currCoordinate.y)); + } + + Coordinate[] coordinates = new Coordinate[coordinatesList.size()]; + for (int i=0; i 1){ List sideOfLineList = Arrays.asList(sideOfLineArr); ArrayList sideOfLinePixCoordlist = generatePixelCoordinateListFromWorldCoordinateList(sideOfLineList); drawPolygon(graphicsTarget, sideOfLinePixCoordlist, polygonLineColor, polygonLineWidth, lineStyle); - + + //The following method should be used if we want the polygons that span the edges to be clipped + //Seems this case is extremely rare. No test cases were found. So for now not using the new drawPolygon method for this case. + //this.drawPolygon(sideOfLineArrInLatLonCoordinates, graphicsTarget, polygonLineColor, polygonLineWidth, lineStyle); } } @@ -783,9 +961,37 @@ implements INatlCntrsResource{ } } } - + + /*** + * Draws a polygon with the given line color, line style and line width + * Also, clips the polygons, if necessary. + * @param polygonCoordinatesList - the list of polygon coordinates in Lat/Lon + * @param graphicsTarget - the graphics target + * @param polygonLineColor - the color of the polygon in RGB + * @param polygonLineWidth - the width of the polygon in int + * @param lineStyle - the type of line to drawn + * @throws VizException + */ + private void drawPolygon(Coordinate[] polygonCoordinatesList, IGraphicsTarget target, RGB lineColor, int lineWidth, LineStyle lineStyle) { + + if (polygonCoordinatesList != null) { + IWireframeShape wireframeShape = target.createWireframeShape(false, descriptor); + JTSCompiler jtsCompiler = new JTSCompiler(null, wireframeShape, descriptor); + GeometryFactory gf = new GeometryFactory(); + LineString ls = gf.createLineString(polygonCoordinatesList); + + try { + jtsCompiler.handle(ls, lineColor, true); + wireframeShape.compile(); + target.drawWireframeShape(wireframeShape, lineColor, lineWidth, lineStyle); + } catch (VizException e) { + System.out.println("VizException caught when calling IntlSigmetResource.drawPolygon(...): " + e.getMessage()); + } + wireframeShape.dispose(); + } - + } + /*** * Retrieves only a sub-set of the attributes of the IntlSigmetRecord required to * paint it on the frame. @@ -1041,6 +1247,228 @@ implements INatlCntrsResource{ return centroid; } + + /* Returns the mid-point of a polygon + * @param polygonCoordinatesList - the list of vertices of the polygon in pixel coordinates. + * @param currDescriptor - the descriptor for this resource. + * @param graphicsTarget - the graphics target + * @return the centroid of the Polygon in world coordinates. + */ + + private Coordinate getCentroidInWorldCoordinates(Coordinate[] polygonCoordinatesList, IMapDescriptor currDescriptor, IGraphicsTarget target) { + Coordinate centroid = null; + + if (polygonCoordinatesList != null && polygonCoordinatesList.length > 0) { + GeometryFactory geomFactory = new GeometryFactory(); + LineString lineString = geomFactory.createLineString(polygonCoordinatesList); + Point centroidPoint = lineString.getCentroid(); + + if (isPolygonClosed) { + WorldWrapChecker wwc = new WorldWrapChecker(descriptor.getGridGeometry()); + Point centroidPt = getCentroidForClippedPolygon(geomFactory.createLineString(getPolygonLatLonCoordinates()), wwc, currDescriptor,target); + + if (centroidPt != null) { + centroidPoint = centroidPt; + } + } + + Coordinate centroidCoordinate = centroidPoint.getCoordinate(); + double[] pixLoc = {centroidCoordinate.x, centroidCoordinate.y}; + PixelCoordinate centroidInPixelCoord = new PixelCoordinate(currDescriptor.pixelToWorld(pixLoc)); + centroid = new Coordinate(centroidInPixelCoord.getX(), centroidInPixelCoord.getY()); + + } + + return centroid; + } + + /* Returns the mid-point of clipped polygon; returns null if polygon is not clipped. + * This method takes care of the issue where a symbol for a clipped polygon (displayed at the edges) + * is drawn in the middle of the map area instead of displaying it in the center of the polygon. + * + * This method is copied from class WorldWrapChecker: + * private void wrapCorrect(Geometry g, List geomList, double inverseCentralMeridian) + * with some minor changes added to get the centroid of a clipped geometry. + * + * @param g + * @param checker - the world wrap checker + * @param currDescriptor - the descriptor for this resource. + * @param graphicsTarget - the graphics target + * @return the centroid of the Polygon OR null + */ + private Point getCentroidForClippedPolygon(Geometry g, WorldWrapChecker checker, IMapDescriptor currDescriptor, IGraphicsTarget target) { + + List geomList = new ArrayList(); + if (g.isEmpty() == false) { + // Algorithm: + // Process primitive geometry type (non collection). Algorithm works + // in that it walks the geometry, when two points cross, it adds or + // subtracts 360 to the offset to flatten out the geometry. When + // first part is done, geometries will be continuous and not limited + // to -180 to 180, they will be technically be > neg infinitive, < + // pos infinity given that the algorithm supports wrapping around + // the world multiple times. When we have the continuous geometry, + // we split it up into sections by intersecting with a 360 deg + // inverse central meridian. We then normalize the points for each + // section back to -180 to 180 + boolean handle = false; + if (checker.needsChecking()) { + boolean polygon = g instanceof Polygon; + Coordinate[] coords = g.getCoordinates(); + if (polygon) { + // remove duplicate last point for polygon + coords = Arrays.copyOf(coords, coords.length - 1); + } + int length = coords.length + (polygon ? 0 : -1); + int truLen = coords.length; + double currOffset = 0.0; + double minOffset = 0.0, maxOffset = 0.0; + for (int i = 0; i < length; ++i) { + int ip1 = (i + 1) % truLen; + Coordinate a = coords[i]; + Coordinate b = coords[ip1]; + + if (ip1 != 0) { + b.x += currOffset; + } + + Boolean low = null; + if (a.x - b.x > 180.0) { + low = false; + } else if (b.x - a.x > 180.0) { + low = true; + } else if (checker.check(a.x, b.x)) { + handle = true; + } + + if (low != null) { + handle = true; + // we wrap either low end or high + if (low) { + currOffset -= 360; + b.x -= 360.0; + if (currOffset < minOffset) { + minOffset = currOffset; + } + + } else { + currOffset += 360; + b.x += 360; + if (currOffset > maxOffset) { + maxOffset = currOffset; + } + + } + } + } + if (handle) { + // All coords in geometry should be denormalized now, get + // adjusted envelope, divide envelope into sections, for + // each section, intersect with geometry and add to + // geom list + List sections = new ArrayList(); + List rolls = new ArrayList(); + GeometryFactory gf = g.getFactory(); + double delta = 0.00001; + double start = checker.getLowInverseCentralMeridian() + minOffset; + double end = checker.getHighInverseCentralMeridian() + maxOffset; + double minY = -90, maxY = 90; + while (start < end) { + double useStart = start; + double useEnd = start + 360; + double minX = useStart + delta; + double maxX = (useEnd) - delta; + + Geometry section = gf.createPolygon( + gf.createLinearRing(new Coordinate[] { + new Coordinate(minX, maxY), + new Coordinate(maxX, maxY), + new Coordinate(maxX, minY), + new Coordinate(minX, minY), + new Coordinate(minX, maxY) }), null); + section = section.intersection(g); + + if (section.isEmpty() == false) { + sections.add(section); + rolls.add(useEnd); + + } + start += 360; + } + + if (sections.size() > 0) { + /* if sections.size() > 0, then the geometry is clipped */ + for (int i = 0; i < sections.size(); ++i) { + Geometry section = sections.get(i); + double rollVal = rolls.get(i); + rollLongitudes(section, rollVal, checker.getHighInverseCentralMeridian()); + geomList.add(section); + } + + IWireframeShape wireframeShape = target.createWireframeShape(false, descriptor); + JTSCompiler jtsCompiler = new JTSCompiler(null, wireframeShape, descriptor); + + LineString ls = gf.createLineString(geomList.get(0).getCoordinates()); + + try { + jtsCompiler.handle(ls, new RGB(255, 255, 255), true); + } catch (VizException e) { + System.out.println("VizException caught when calling IntlSigmetResource.getCentroidForClippedPolygon(...): " + e.getMessage()); + } + + //return the centroid of the first section + return geomList.get(0).getCentroid(); + } + } + } + } + return null; + } + + /* + * This method is copied from class WorldWrapChecker: + * private void rollLongitudes(Geometry g, double inverseCentralMeridianUsed, double inverseCentralMeridian) + */ + private void rollLongitudes(Geometry g, double inverseCentralMeridianUsed, + double inverseCentralMeridian) { + double diff = inverseCentralMeridian - inverseCentralMeridianUsed; + if (diff != 0) { + for (Coordinate c : g.getCoordinates()) { + c.x += diff; + } + } + } + + private Coordinate[] getPolygonLatLonCoordinates() { + + if (arrayLatLonPoints != null && arrayLatLonPoints.length > 0) { + + Coordinate[] coordinates = null; + if (isPolygonClosed) { + coordinates = new Coordinate[arrayLatLonPoints.length+1]; + } else { + coordinates = new Coordinate[arrayLatLonPoints.length]; + } + + for(int i = 0; i( intlSigmetResourceDataObj.thunderstormColor, intlSigmetResourceDataObj.thunderstormSymbolWidth, @@ -1483,7 +1911,6 @@ implements INatlCntrsResource{ intlSigmetResourceDataObj.thunderstormEnable, "PAST_WX_09", //refer symbolPatterns.xml intlSigmetResourceDataObj.thunderstormLineWidth)); - break; @@ -1529,8 +1956,8 @@ implements INatlCntrsResource{ case TB:/*Turbulence*/ - - localSymbolAttributeSubsetList.add(new SymbolAttributesSubSet( + + localSymbolAttributeSubsetList.add(new SymbolAttributesSubSet( intlSigmetResourceDataObj.turbulenceColor, intlSigmetResourceDataObj.turbulenceSymbolWidth, intlSigmetResourceDataObj.turbulenceSymbolSize, @@ -1542,8 +1969,8 @@ implements INatlCntrsResource{ break; case HU:/*Hurricane*/ - - localSymbolAttributeSubsetList.add(new SymbolAttributesSubSet( + + localSymbolAttributeSubsetList.add(new SymbolAttributesSubSet( intlSigmetResourceDataObj.hurricaneColor, intlSigmetResourceDataObj.hurricaneSymbolWidth, intlSigmetResourceDataObj.hurricaneSymbolSize, @@ -1555,8 +1982,8 @@ implements INatlCntrsResource{ break; case TR:/*Tropical Storm*/ - - localSymbolAttributeSubsetList.add(new SymbolAttributesSubSet( + + localSymbolAttributeSubsetList.add(new SymbolAttributesSubSet( intlSigmetResourceDataObj.tropicalStormColor, intlSigmetResourceDataObj.tropicalStormSymbolWidth, intlSigmetResourceDataObj.tropicalStormSymbolSize, @@ -1568,8 +1995,8 @@ implements INatlCntrsResource{ break; case TD:/*Tropical Depression*/ - - localSymbolAttributeSubsetList.add(new SymbolAttributesSubSet( + + localSymbolAttributeSubsetList.add(new SymbolAttributesSubSet( intlSigmetResourceDataObj.tropicalDepressionColor, intlSigmetResourceDataObj.tropicalDepressionSymbolWidth, intlSigmetResourceDataObj.tropicalDepressionSymbolSize, @@ -1581,8 +2008,8 @@ implements INatlCntrsResource{ break; case VA:/*Volcanic Ash*/ - - localSymbolAttributeSubsetList.add(new SymbolAttributesSubSet( + + localSymbolAttributeSubsetList.add(new SymbolAttributesSubSet( intlSigmetResourceDataObj.volcanicAshCloudColor, intlSigmetResourceDataObj.volcanicAshCloudSymbolWidth, intlSigmetResourceDataObj.volcanicAshCloudSymbolSize, @@ -1594,8 +2021,8 @@ implements INatlCntrsResource{ break; case MW:/*Mountain Wave*/ - - localSymbolAttributeSubsetList.add(new SymbolAttributesSubSet( + + localSymbolAttributeSubsetList.add(new SymbolAttributesSubSet( intlSigmetResourceDataObj.mountainWaveColor, intlSigmetResourceDataObj.mountainWaveSymbolWidth, intlSigmetResourceDataObj.mountainWaveSymbolSize, @@ -1606,8 +2033,8 @@ implements INatlCntrsResource{ break; case TC:/*Tropical Cyclone*/ - - localSymbolAttributeSubsetList.add(new SymbolAttributesSubSet( + + localSymbolAttributeSubsetList.add(new SymbolAttributesSubSet( intlSigmetResourceDataObj.tropicalCycloneColor, intlSigmetResourceDataObj.tropicalCycloneSymbolWidth, intlSigmetResourceDataObj.tropicalCycloneSymbolSize, @@ -1618,9 +2045,9 @@ implements INatlCntrsResource{ break; - case SQ:/*Cumulonimbus*/ - - localSymbolAttributeSubsetList.add(new SymbolAttributesSubSet( + case SQ:/*SQuall Line*/ + + localSymbolAttributeSubsetList.add(new SymbolAttributesSubSet( intlSigmetResourceDataObj.squallLineColor, intlSigmetResourceDataObj.squallLineSymbolWidth, intlSigmetResourceDataObj.squallLineSymbolSize, @@ -1631,8 +2058,8 @@ implements INatlCntrsResource{ break; case CAT:/*Clear Air Turbulence*/ - - localSymbolAttributeSubsetList.add(new SymbolAttributesSubSet( + + localSymbolAttributeSubsetList.add(new SymbolAttributesSubSet( intlSigmetResourceDataObj.catColor, intlSigmetResourceDataObj.catSymbolWidth, intlSigmetResourceDataObj.catSymbolSize, @@ -1643,7 +2070,7 @@ implements INatlCntrsResource{ break; case IC:/*ICing*/ - + localSymbolAttributeSubsetList.add(new SymbolAttributesSubSet( intlSigmetResourceDataObj.icingColor, intlSigmetResourceDataObj.icingSymbolWidth, @@ -1655,7 +2082,7 @@ implements INatlCntrsResource{ break; case GR:/*Hail*/ - + localSymbolAttributeSubsetList.add(new SymbolAttributesSubSet( intlSigmetResourceDataObj.hailColor, intlSigmetResourceDataObj.hailSymbolWidth, @@ -1667,7 +2094,7 @@ implements INatlCntrsResource{ break; case DS:/*Dust Storm*/ - + localSymbolAttributeSubsetList.add(new SymbolAttributesSubSet( intlSigmetResourceDataObj.dustStormColor, intlSigmetResourceDataObj.dustStormSymbolWidth, @@ -1679,7 +2106,7 @@ implements INatlCntrsResource{ break; case SS:/*Sand Storm*/ - + localSymbolAttributeSubsetList.add(new SymbolAttributesSubSet( intlSigmetResourceDataObj.sandStormColor, intlSigmetResourceDataObj.sandStormSymbolWidth, @@ -1691,7 +2118,7 @@ implements INatlCntrsResource{ break; case CB:/*Cumulonimbus*/ - + localSymbolAttributeSubsetList.add(new SymbolAttributesSubSet( intlSigmetResourceDataObj.cumulonimbusColor, intlSigmetResourceDataObj.cumulonimbusSymbolWidth, @@ -1704,7 +2131,7 @@ implements INatlCntrsResource{ case WS:/*Wind Shear*/ - + localSymbolAttributeSubsetList.add(new SymbolAttributesSubSet( intlSigmetResourceDataObj.lowLevelWindShearColor, intlSigmetResourceDataObj.lowLevelWindShearSymbolWidth, @@ -2113,6 +2540,7 @@ implements INatlCntrsResource{ return legendString + "-No Data"; } return legendString + " "+ NmapCommon.getTimeStringFromDataTime( fd.getFrameTime(), "/"); - } + } + } diff --git a/ncep/gov.noaa.nws.ncep.viz.rsc.mosaic/localization/ncep/Radar/mosaicInfo.txt b/ncep/gov.noaa.nws.ncep.viz.rsc.mosaic/localization/ncep/Radar/mosaicInfo.txt deleted file mode 100644 index 63ff6df6fe..0000000000 --- a/ncep/gov.noaa.nws.ncep.viz.rsc.mosaic/localization/ncep/Radar/mosaicInfo.txt +++ /dev/null @@ -1,76 +0,0 @@ -# mosaicInfo.txt -# -# Information about mosaic products. Fields are: -# -# ID = product ID number -# Lvls = # of data levels -# Lyr = layer: 0, 1, 2, 3 = none, lo, med, high -# Resol = resolution in km -# Range = ? -# Mnemo = mnemonic -# Name = label used in user interface -# Format = format -# Elv = does elevation apply, boolean -# Alt = does altitude apply, boolean -# Azm = does azimuth/range apply, boolean -# Spd = does speed/direction apply, boolean (speed = 0.0-99.9) -# Dsp = Series of single character flags display code uses -# V = Treat as velocity data, allow shear sampling and vrShear -# Z = 16 bit data has predefined Storm/Clear dBZ ranges. -# m = Apply multiplier to 8 bit style info. -# Leading number is default mult; V assumes default of 5. -# S = Rescale existing data style info by scaling coefficients. -# Multiply output of scaling coefficients by leading number, if present, -# to get data values for image counts. -# X = does cross-section apply, boolean -# hrs = does hour/span apply, boolean -# bsp = does big speed/direction apply, boolean (speed = 0.0-999.9) -# mas = does map type and segment number apply, boolean -# aid = AWIPS ID (enumeration removed from Radar.H) -# dAz = Azimuth resolution in deg. Def to 1 for Radial 0 for others. -# -# All booleans must be "y" for true, anything else for false. -# -#ID|Lvls|Lyr|Resol |Range|ProdNam| Name | Format |Elv|Alt|Azm|Spd|Dsp| X |hrs|bsp|mas|aid|unit -27 | 16 | 0 | 4.0 | 0 |CREF_27| Mosaic 4km compo refl(<20dBz) | Raster | | | | | Z | | | | | 0 | dBZ -28 | 16 | 0 | 4.0 | 0 |CREF_28| Mosaic 4km compo refl(>20dBz) | Raster | | | | | Z | | | | | 0 | dBZ -30 | 16 | 0 | 4.0 | 0 |CREF_30| Mosaic 4km compo refl | Raster | | | | | Z | | | | | 0 | dBZ -89 | 16 | 0 | 2.0 | 0 |PRCP1_2| Mosaic 2km 1h precip amount | Raster | | | | | | | | | | 0 | in -90 | 16 | 0 | 4.0 | 0 |PRCP1_4| Mosaic 4km 1h precip amount | Raster | | | | | | | | | | 0 | in -91 | 16 | 0 | 8.0 | 0 |PRCP1_8| Mosaic 8km 1h precip amount | Raster | | | | | | | | | | 0 | in -95 | 16 | 0 | 4.0 | 0 |TOPS_4 | Mosaic 4km cloud top | Raster | | | | | | | | | | 0 | ft*1000 -96 | 16 | 0 | 8.0 | 0 |TOPS_8 | Mosaic 8km cloud top | Raster | | | | | | | | | | 0 | ft*1000 -99 | 16 | 0 | 4.0 | 0 |CS_V2 | Combined Storm version 2 | Raster | | | | | | | | | | 0 | n/a -100| 16 | 0 | 4.0 | 0 |CS_V1 | Combined Storm version 1 | Raster | | | | | | | | | | 0 | n/a -101| 16 | 0 | 4.0 | 0 |PRCP | Mosaic 4km total rainfall | Raster | | | | | | | | | | 0 | in -102| 16 | 0 | 4.0 | 0 |PRCP24 | Mosaic 4km 24h total rainfall | Raster | | | | | | | | | | 0 | in -103| 16 | 0 | 4.0 | 0 |CREF | Mosaic 4km compo refl (precip)| Raster | | | | | Z | | | | | 0 | dBZ -105| 16 | 0 | 2.0 | 0 |PRCP_2 | Mosaic 2km total rainfall | Raster | | | | | Z | | | | | 0 | in -106| 16 | 0 | 2.0 | 0 |PRCP24_2|Mosaic 2km 24h total rainfall | Raster | | | | | | | | | | 0 | in -107| 16 | 0 | 8.0 | 0 |PRCP_8 | Mosaic 8km total rainfall | Raster | | | | | | | | | | 0 | in -108| 16 | 0 | 8.0 | 0 |PRCP24_8|Mosaic 8km 24h total rainfall | Raster | | | | | | | | | | 0 | in -120| 16 | 0 | 4.0 | 0 |HAIL_IDX|Hail Index combined attr | Raster | | | | | | | | | | 0 | n/a -121| 16 | 0 | 4.0 | 0 |MDA |Mesocyclone combined attr(MDA)| Raster | | | | | | | | | | 0 | n/a -122| 16 | 0 | 4.0 | 0 |STI |Storm Track(STI) combined attr| Raster | | | | | | | | | | 0 | n/a -123| 16 | 0 | 4.0 | 0 |TVS |Tornado Vortex Signature attr | Raster | | | | | | | | | | 0 | n/a -137| 16 | 0 | 2.0 | 0 |BREF_UF| Base Reflectivity Unfiltered | Raster | | | | | Z | | | | | 0 | dBZ -138| 16 | 0 | 2.0 | 0 |BREF_CL| Base Reflectivity Clear Air | Raster | | | | | Z | | | | | 0 | dBZ -139| 16 | 0 | 1.0 | 0 |BREF_1 | Base Reflectivity Filtered 1km| Raster | | | | | Z | | | | | 0 | dBZ -140| 16 | 0 | 2.0 | 0 |BREF_2 | Base Reflectivity Filtered 2km| Raster | | | | | Z | | | | | 0 | dBZ -141| 16 | 0 | 4.0 | 0 |BREF_4 | Base Reflectivity Filtered 4km| Raster | | | | | Z | | | | | 0 | dBZ -142| 16 | 0 | 8.0 | 0 |BREF_8 | Base Reflectivity Filtered 8km| Raster | | | | | Z | | | | | 0 | dBZ -148| 16 | 0 | 4.0 | 0 |VIL_4 | 4km Vert integrated liquid | Raster | | | | | | | | | | 0 | kg/m² -149| 16 | 0 | 8.0 | 0 |VIL_8 | 8km Vert integrated liquid | Raster | | | | | | | | | | 0 | kg/m² -190| 16 | 0 | 1.0 | 0 |CREF_190| Mosaic compo refl 1x1km | Raster | | | | | Z | | | | | 0 | dBZ -191| 16 | 0 | 1.0 | 0 |CREF_191| Mosaic compo refl TDWR 1x1km | Raster | | | | | Z | | | | | 0 | dBZ -203| 16 | 0 | 1.0 | 0 |RALA | Mosaic 1km composite rala | Raster | | | | | Z | | | | | 0 | dBZ -209| 16 | 0 | 1.0 | 0 |VIL | Mosaic Vert integrated liquid | Raster | | | | | | | | | | 0 | kg/m² -210| 16 | 0 | 1.0 | 0 |TOPS18 | Mosaic cloud top | Raster | | | | | | | | | | 0 | ft*1000 -211| 16 | 0 | 1.0 | 0 |CREF | Mosaic 1km composite refl | Raster | | | | | Z | | | | | 0 | dBZ -212| 16 | 0 | 1.0 | 0 |TOPS30 | Mosaic cloud top | Raster | | | | | | | | | | 0 | ft*1000 -216|256 | 0 | 2.0 | 0 |BREF_216|Base Reflect Unfiltered 2x2km | Raster | | | | | Z | | | | | 0 | dBZ -220|256 | 0 | 1.0 | 0 |BREF_220|Base Reflect Filtered 1x1km | Raster | | | | | Z | | | | | 0 | dBZ -221|256 | 0 | 1.0 | 0 |BREF_221|Base Reflect Filtered 2x2km | Raster | | | | | Z | | | | | 0 | dBZ -223|256 | 0 | 2.0 | 0 |BREF_223|Base Reflect Unfiltered 2x2km | Raster | | | | | Z | | | | | 0 | dBZ -225|256 | 0 | 1.0 | 0 |BREF_225|Base Reflect TDWR Filtered 1km| Raster | | | | | Z | | | | | 0 | dBZ -226|256 | 0 | 2.0 | 0 |BREF_226|Base Reflect TDWR Filtered 2km| Raster | | | | | Z | | | | | 0 | dBZ diff --git a/ncep/gov.noaa.nws.ncep.viz.rsc.mosaic/localization/ncep/resourceTemplates/RadarMosaic.xml b/ncep/gov.noaa.nws.ncep.viz.rsc.mosaic/localization/ncep/resourceTemplates/RadarMosaic.xml index ad5968c370..fbb05c5ee7 100644 --- a/ncep/gov.noaa.nws.ncep.viz.rsc.mosaic/localization/ncep/resourceTemplates/RadarMosaic.xml +++ b/ncep/gov.noaa.nws.ncep.viz.rsc.mosaic/localization/ncep/resourceTemplates/RadarMosaic.xml @@ -34,9 +34,10 @@ - + diff --git a/ncep/gov.noaa.nws.ncep.viz.rsc.mosaic/plugin.xml b/ncep/gov.noaa.nws.ncep.viz.rsc.mosaic/plugin.xml index a9b65d85cb..6d1f67bd20 100644 --- a/ncep/gov.noaa.nws.ncep.viz.rsc.mosaic/plugin.xml +++ b/ncep/gov.noaa.nws.ncep.viz.rsc.mosaic/plugin.xml @@ -78,6 +78,7 @@ defaultValue="not-specified" paramType="REQUEST_CONSTRAINT"> + * * @author mli @@ -117,6 +118,12 @@ public class MosaicResource extends AbstractNatlCntrsResource * @@ -89,82 +89,9 @@ public class MosaicResourceData extends AbstractNatlCntrsRequestableResourceData // the productName if not set. private Integer productCode=0; - private static MosaicInfoDict infoDict = null; - - // The legend is set from MosaicInfoDict based on - // the product code which is set in the metadataMap. private String legendString = null; - private static void loadRadarInfo() { - String radarDirname = - NcPathManager.getInstance().getStaticFile( - NcPathConstants.MOSAIC_INFO ).getParent(); - - // Note: MosaicInfoDict actually ignores the file and uses - // the directory to find the mosaicInfo.txt file. - infoDict = MosaicInfoDict.getInstance(radarDirname); - } - public MosaicResourceData() { - this.nameGenerator = new AbstractNameGenerator() { - - // This method is not called since MosaicResource is overriding - // getName() - @Override - public String getName(AbstractVizResource resource) { - if( legendString != null ) { - return legendString; - } - - if( infoDict == null ) { - loadRadarInfo(); - if( infoDict == null ) { - legendString = new String( "Radar Mosaic: Product Code "+ - Integer.toString( getProductCode()) ); - return legendString; - } - } - - String prodName = infoDict.getInfo(getProductCode()).getName(); - String unitName = infoDict.getInfo(getProductCode()).getUnit(); - if (unitName == null) { - unitName = " "; - } else { - if (!unitName.contains("(")) { - String temp = " ("; - temp += unitName + ") "; - unitName = temp; - } - if (unitName.contains("/10")) { - unitName = unitName.replace("/10", ""); - } - if (unitName.contains("*1000")) { - unitName = unitName.replace("*1000", ""); - } - } - - legendString = new String( prodName + unitName - + (int) (Math.log(infoDict.getInfo(productCode) - .getNumLevels()) / Math.log(2)) + "-bit " ); - return legendString; -// if (productName.equals("NO DATA")) { -// MosaicRecord currRec = null; -// -// if (currRec != null) { -// if (infoDict == null) { -// loadRadarInfo(); -// } -// -// MosaicInfo info = infoDict.getInfo(currRec -// .getProductCode()); -// productName = info.getName() + " " -// + currRec.getDataTime().getLegendString(); -// } -// } -// return productName; - } - - }; } @Override diff --git a/ncep/gov.noaa.nws.ncep.viz.rsc.mosaic/src/gov/noaa/nws/ncep/viz/rsc/mosaic/rsc/RadarImageResource.java b/ncep/gov.noaa.nws.ncep.viz.rsc.mosaic/src/gov/noaa/nws/ncep/viz/rsc/mosaic/rsc/RadarImageResource.java index 61a72512ea..3b83b64cba 100644 --- a/ncep/gov.noaa.nws.ncep.viz.rsc.mosaic/src/gov/noaa/nws/ncep/viz/rsc/mosaic/rsc/RadarImageResource.java +++ b/ncep/gov.noaa.nws.ncep.viz.rsc.mosaic/src/gov/noaa/nws/ncep/viz/rsc/mosaic/rsc/RadarImageResource.java @@ -97,7 +97,9 @@ import com.vividsolutions.jts.geom.Coordinate; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * 03-04-2011 G. Zhang Initial creation - * 07-11-2022 Greg Hull create initResource to create the colorBarResource. + * 07-11-2011 Greg Hull create initResource to create the colorBarResource. + * 09-04-2012 B. Hebbard Add getGridGeometry() to descriptor per OB12.9.1 RTS + * change IRadialMeshExtension.constructMesh 2nd param * * * @@ -591,8 +593,7 @@ params = /*new ColorMapParameters();//*/ColorMapParameterFactory.build((Object) public IMesh buildMesh(IGraphicsTarget target, RadarTimeRecord timeRecord) throws VizException { return target.getExtension(IRadialMeshExtension.class).constructMesh( - timeRecord.radarCacheObject.getObjectSync(), - descriptor.getGridGeometry()); + timeRecord.radarCacheObject.getObjectSync(), descriptor.getGridGeometry()); } public PixelCoverage buildCoverage(IGraphicsTarget target, diff --git a/ncep/gov.noaa.nws.ncep.viz.rsc.ncgrid/META-INF/MANIFEST.MF b/ncep/gov.noaa.nws.ncep.viz.rsc.ncgrid/META-INF/MANIFEST.MF index a91c6c5bbd..6055f59adf 100644 --- a/ncep/gov.noaa.nws.ncep.viz.rsc.ncgrid/META-INF/MANIFEST.MF +++ b/ncep/gov.noaa.nws.ncep.viz.rsc.ncgrid/META-INF/MANIFEST.MF @@ -27,7 +27,8 @@ Require-Bundle: org.eclipse.ui, gov.noaa.nws.ncep.common.dataplugin.ncgrib;bundle-version="1.0.0", com.raytheon.uf.common.serialization.comm;bundle-version="1.12.1161", gov.noaa.nws.ncep.common.log;bundle-version="1.0.0", - gov.noaa.nws.ncep.viz.gempak;bundle-version="1.0.0" + gov.noaa.nws.ncep.viz.gempak;bundle-version="1.0.0", + gov.noaa.nws.ncep.viz.gempak.nativelib;bundle-version="1.0.0" Bundle-ActivationPolicy: lazy Bundle-RequiredExecutionEnvironment: JavaSE-1.6 Import-Package: com.raytheon.edex.meteoLib, diff --git a/ncep/gov.noaa.nws.ncep.viz.rsc.ncgrid/src/gov/noaa/nws/ncep/viz/rsc/ncgrid/Activator.java b/ncep/gov.noaa.nws.ncep.viz.rsc.ncgrid/src/gov/noaa/nws/ncep/viz/rsc/ncgrid/Activator.java index 2630cd6754..0d0765b90b 100644 --- a/ncep/gov.noaa.nws.ncep.viz.rsc.ncgrid/src/gov/noaa/nws/ncep/viz/rsc/ncgrid/Activator.java +++ b/ncep/gov.noaa.nws.ncep.viz.rsc.ncgrid/src/gov/noaa/nws/ncep/viz/rsc/ncgrid/Activator.java @@ -1,5 +1,6 @@ package gov.noaa.nws.ncep.viz.rsc.ncgrid; - + +import gov.noaa.nws.ncep.viz.gempak.nativelib.LibraryLoader; import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.ui.plugin.AbstractUIPlugin; import org.osgi.framework.BundleContext; @@ -29,6 +30,8 @@ public class Activator extends AbstractUIPlugin { public void start(BundleContext context) throws Exception { super.start(context); plugin = this; + LibraryLoader.load("cnflib"); + LibraryLoader.load("gempak"); } /* diff --git a/ncep/gov.noaa.nws.ncep.viz.rsc.ncgrid/src/gov/noaa/nws/ncep/viz/rsc/ncgrid/contours/GridPointMarkerDisplay.java b/ncep/gov.noaa.nws.ncep.viz.rsc.ncgrid/src/gov/noaa/nws/ncep/viz/rsc/ncgrid/contours/GridPointMarkerDisplay.java index d18497e098..834543a0cc 100644 --- a/ncep/gov.noaa.nws.ncep.viz.rsc.ncgrid/src/gov/noaa/nws/ncep/viz/rsc/ncgrid/contours/GridPointMarkerDisplay.java +++ b/ncep/gov.noaa.nws.ncep.viz.rsc.ncgrid/src/gov/noaa/nws/ncep/viz/rsc/ncgrid/contours/GridPointMarkerDisplay.java @@ -141,7 +141,7 @@ public class GridPointMarkerDisplay implements IRenderable { if (each == null) continue; - each.draw(target); + each.draw(target, paintProps); each.dispose(); } } diff --git a/ncep/gov.noaa.nws.ncep.viz.rsc.ncgrid/src/gov/noaa/nws/ncep/viz/rsc/ncgrid/contours/GridRelativeHiLoDisplay.java b/ncep/gov.noaa.nws.ncep.viz.rsc.ncgrid/src/gov/noaa/nws/ncep/viz/rsc/ncgrid/contours/GridRelativeHiLoDisplay.java index 0ad2880da4..c6bd113b6c 100644 --- a/ncep/gov.noaa.nws.ncep.viz.rsc.ncgrid/src/gov/noaa/nws/ncep/viz/rsc/ncgrid/contours/GridRelativeHiLoDisplay.java +++ b/ncep/gov.noaa.nws.ncep.viz.rsc.ncgrid/src/gov/noaa/nws/ncep/viz/rsc/ncgrid/contours/GridRelativeHiLoDisplay.java @@ -123,7 +123,7 @@ public class GridRelativeHiLoDisplay implements IRenderable { ArrayList elements = df.createDisplayElements( gridPointHiSymbolSet, paintProps); for (IDisplayable each : elements) { - each.draw(target); + each.draw(target, paintProps); each.dispose(); } } else if (hiloBuild.getSymbolHiType() == 1) { @@ -147,7 +147,7 @@ public class GridRelativeHiLoDisplay implements IRenderable { ArrayList elements = df.createDisplayElements( gridPointLoSymbolSet, paintProps); for (IDisplayable each : elements) { - each.draw(target); + each.draw(target, paintProps); each.dispose(); } } else if (hiloBuild.getSymbolLoType() == 1) { diff --git a/ncep/gov.noaa.nws.ncep.viz.rsc.ncgrid/src/gov/noaa/nws/ncep/viz/rsc/ncgrid/dgdriv/GridDBConstants.java b/ncep/gov.noaa.nws.ncep.viz.rsc.ncgrid/src/gov/noaa/nws/ncep/viz/rsc/ncgrid/dgdriv/GridDBConstants.java new file mode 100644 index 0000000000..333208ec60 --- /dev/null +++ b/ncep/gov.noaa.nws.ncep.viz.rsc.ncgrid/src/gov/noaa/nws/ncep/viz/rsc/ncgrid/dgdriv/GridDBConstants.java @@ -0,0 +1,37 @@ +package gov.noaa.nws.ncep.viz.rsc.ncgrid.dgdriv; + +public class GridDBConstants { + public static final String GRID_TBL_NAME = "grid"; + + public static final String PLUGIN_NAME = "pluginName"; + + public static final String INFO = "info"; + + public static final String ID = "id"; + + public static final String INFO_ID = "info.id"; + + public static final String MODEL_NAME_QUERY = "info.datasetId"; + + public static final String EVENT_NAME_QUERY = "info.secondaryId"; + + public static final String ENSEMBLE_ID_QUERY = "info.ensembleId"; + + public static final String NAVIGATION_QUERY = "info.location"; + + public static final String PARAMETER_QUERY = "info.parameter.abbreviation"; + + public static final String LEVEL_ID_QUERY = "info.level.masterLevel.name"; + + public static final String LEVEL_ONE_QUERY = "info.level.levelonevalue"; + + public static final String LEVEL_TWO_QUERY = "info.level.leveltwovalue"; + + public static final String DATA_TIME_QUERY = "dataTime"; + + public static final String REF_TIME_QUERY = DATA_TIME_QUERY+".refTime"; + + public static final String FORECAST_TIME_QUERY = DATA_TIME_QUERY +".fcstTime"; + + public static final String DATA_URI_QUERY = "dataURI"; +} diff --git a/ncep/gov.noaa.nws.ncep.viz.rsc.ncgrid/src/gov/noaa/nws/ncep/viz/rsc/ncgrid/rsc/NcgridResource.java b/ncep/gov.noaa.nws.ncep.viz.rsc.ncgrid/src/gov/noaa/nws/ncep/viz/rsc/ncgrid/rsc/NcgridResource.java index 62a8c1b182..4d763158e0 100644 --- a/ncep/gov.noaa.nws.ncep.viz.rsc.ncgrid/src/gov/noaa/nws/ncep/viz/rsc/ncgrid/rsc/NcgridResource.java +++ b/ncep/gov.noaa.nws.ncep.viz.rsc.ncgrid/src/gov/noaa/nws/ncep/viz/rsc/ncgrid/rsc/NcgridResource.java @@ -12,7 +12,7 @@ import gov.noaa.nws.ncep.gempak.parameters.hlsym.HLSYM; import gov.noaa.nws.ncep.gempak.parameters.intext.TextStringParser; import gov.noaa.nws.ncep.gempak.parameters.title.TITLE; import gov.noaa.nws.ncep.viz.common.Activator; -import gov.noaa.nws.ncep.viz.common.GraphicsAreaPreferences; +import gov.noaa.nws.ncep.viz.common.preferences.GraphicsAreaPreferences; import gov.noaa.nws.ncep.viz.common.ui.HILORelativeMinAndMaxLocator; import gov.noaa.nws.ncep.viz.common.ui.ModelListInfo; import gov.noaa.nws.ncep.viz.common.ui.color.GempakColor; diff --git a/ncep/gov.noaa.nws.ncep.viz.rsc.ncradar/src/gov/noaa/nws/ncep/viz/rsc/ncradar/rsc/AbstractRadarResource.java b/ncep/gov.noaa.nws.ncep.viz.rsc.ncradar/src/gov/noaa/nws/ncep/viz/rsc/ncradar/rsc/AbstractRadarResource.java index 1e71167c7a..bbc4b43f0a 100644 --- a/ncep/gov.noaa.nws.ncep.viz.rsc.ncradar/src/gov/noaa/nws/ncep/viz/rsc/ncradar/rsc/AbstractRadarResource.java +++ b/ncep/gov.noaa.nws.ncep.viz.rsc.ncradar/src/gov/noaa/nws/ncep/viz/rsc/ncradar/rsc/AbstractRadarResource.java @@ -43,6 +43,7 @@ import com.raytheon.uf.viz.core.rsc.capabilities.BlendableCapability; import com.raytheon.uf.viz.core.rsc.capabilities.BlendedCapability; import com.raytheon.uf.viz.core.rsc.capabilities.ColorMapCapability; import com.raytheon.uf.viz.core.rsc.capabilities.ColorableCapability; +import com.raytheon.uf.viz.core.rsc.capabilities.ImagingCapability; import com.raytheon.uf.viz.d2d.core.map.IDataScaleResource; import com.raytheon.viz.awipstools.capabilityInterfaces.IRangeableResource; import gov.noaa.nws.ncep.viz.rsc.ncradar.DefaultVizRadarRecord; @@ -141,13 +142,16 @@ implements IRadarConfigListener, IResourceDataChanged, IRangeableResource, protected AbstractRadarResource(RadarResourceData resourceData, LoadProperties loadProperties) { super(resourceData, loadProperties); - getCapability(ColorableCapability.class); +// getCapability(ColorableCapability.class); resourceData.addChangeListener(this); dataTimes = new ArrayList(); radarRecords = Collections .synchronizedMap(new HashMap()); icao = ""; + getCapability(ColorMapCapability.class).setSuppressingMenuItems(true); + getCapability(ImagingCapability.class).setSuppressingMenuItems(true); + getCapability(ColorableCapability.class).setSuppressingMenuItems(true); } /* diff --git a/ncep/gov.noaa.nws.ncep.viz.rsc.ncradar/src/gov/noaa/nws/ncep/viz/rsc/ncradar/rsc/RadarImageResource.java b/ncep/gov.noaa.nws.ncep.viz.rsc.ncradar/src/gov/noaa/nws/ncep/viz/rsc/ncradar/rsc/RadarImageResource.java index 2137e86b4e..fdbe1bc061 100644 --- a/ncep/gov.noaa.nws.ncep.viz.rsc.ncradar/src/gov/noaa/nws/ncep/viz/rsc/ncradar/rsc/RadarImageResource.java +++ b/ncep/gov.noaa.nws.ncep.viz.rsc.ncradar/src/gov/noaa/nws/ncep/viz/rsc/ncradar/rsc/RadarImageResource.java @@ -23,6 +23,7 @@ import java.text.ParsePosition; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; +import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; @@ -32,13 +33,12 @@ import javax.measure.unit.Unit; import javax.measure.unit.UnitFormat; import org.eclipse.swt.graphics.RGB; -import org.geotools.coverage.grid.GridGeometry2D; -import org.geotools.geometry.jts.ReferencedEnvelope; + import org.geotools.referencing.CRS; -import org.geotools.referencing.crs.DefaultGeographicCRS; + import org.opengis.referencing.FactoryException; import org.opengis.referencing.crs.CoordinateReferenceSystem; -import org.opengis.referencing.datum.PixelInCell; + import org.opengis.referencing.operation.MathTransform; import org.opengis.referencing.operation.TransformException; @@ -82,6 +82,8 @@ import com.raytheon.uf.viz.core.style.DataMappingPreferences.DataMappingEntry; import com.raytheon.viz.awipstools.capabilities.RangeRingsOverlayCapability; import com.raytheon.viz.awipstools.capabilityInterfaces.IRangeableResource; import com.raytheon.viz.core.drawables.ColorMapParameterFactory; +import com.raytheon.viz.core.style.image.ImagePreferences; +import com.raytheon.viz.core.style.image.SamplePreferences; import com.raytheon.viz.core.units.PiecewisePixel; import gov.noaa.nws.ncep.viz.rsc.ncradar.VizRadarRecord; import com.raytheon.viz.radar.interrogators.IRadarInterrogator; @@ -102,7 +104,8 @@ import com.vividsolutions.jts.geom.Coordinate; * 12/16/2011 S. Gurung Added resourceAttrsModified() * 01/03/2011 S. Gurung Changed circle color to black * 04/02/2012 #651 S. Gurung Added fix for applying resource attributes changes. - * + * 06-07-2012 #717 Archana Updated setColorMapParameters() to store label information + * for the colorbar * * * @author sgurung @@ -219,14 +222,30 @@ public abstract class RadarImageResource extends } int numLevels = radarRecord.getNumLevels(); Object[] thresholds = radarRecord.getDecodedThresholds(); + DataMappingPreferences dmPref = new DataMappingPreferences(); + DataMappingEntry dmEntry; + List dmEntriesList = new ArrayList(0); if (numLevels <= 16) { ArrayList pixel = new ArrayList(); ArrayList real = new ArrayList(); for (int i = 0; i < numLevels; i++) { + dmEntry = new DataMappingEntry(); + dmEntry.setPixelValue(new Double(i)); if (thresholds[i] instanceof Float) { pixel.add(i); real.add((Float) thresholds[i]); + dmEntry.setDisplayValue(((Float)thresholds[i]).doubleValue()); + dmEntry.setLabel(((Float)thresholds[i]).toString()); + }else{ + dmEntry.setDisplayValue(Double.NaN); + + if ( ((String)thresholds[i]).compareToIgnoreCase("NO DATA") == 0 ){ + dmEntry.setLabel("ND"); + }else + dmEntry.setLabel((String)thresholds[i]); } + + dmEntriesList.add(dmEntry); } double[] pix = new double[pixel.size()]; @@ -278,6 +297,21 @@ public abstract class RadarImageResource extends rtr.params = colorMapParameters; getCapability(ColorMapCapability.class).setColorMapParameters( colorMapParameters); + if ( dmEntriesList.size() > 0 ){ + DataMappingEntry[] dmEntryArray = new DataMappingEntry[dmEntriesList.size()]; + dmEntriesList.toArray(dmEntryArray); + dmPref.setSerializableEntries(dmEntryArray); + ImagePreferences imgPref = new ImagePreferences(); + imgPref.setDataMapping(dmPref); + SamplePreferences sampPref = new SamplePreferences(); + sampPref.setMinValue(0); + sampPref.setMaxValue(255); + imgPref.setSamplePrefs(sampPref); + colorBar.setImagePreferences(imgPref); + colorBar.setDisplayUnitStr(radarRecord.getUnit()); + colorBar.setAlignLabelInTheMiddleOfInterval(true); + this.cbarResource.getResourceData().setColorBar(colorBar); + } } @@ -295,6 +329,12 @@ public abstract class RadarImageResource extends disposeImage(image); } images.clear(); + if( cbarResource.getResourceData().getColorbar() != null ){ + cbarResource.getResourceData().getColorbar().dispose(); + cbarResource.getResourceData().setColorBar(null); + } + + issueRefresh(); } @Override diff --git a/ncep/gov.noaa.nws.ncep.viz.rsc.ncradar/src/gov/noaa/nws/ncep/viz/rsc/ncradar/rsc/image/RadarRadialResource.java b/ncep/gov.noaa.nws.ncep.viz.rsc.ncradar/src/gov/noaa/nws/ncep/viz/rsc/ncradar/rsc/image/RadarRadialResource.java index 550dca6f90..b7671d0a42 100644 --- a/ncep/gov.noaa.nws.ncep.viz.rsc.ncradar/src/gov/noaa/nws/ncep/viz/rsc/ncradar/rsc/image/RadarRadialResource.java +++ b/ncep/gov.noaa.nws.ncep.viz.rsc.ncradar/src/gov/noaa/nws/ncep/viz/rsc/ncradar/rsc/image/RadarRadialResource.java @@ -57,6 +57,8 @@ import com.vividsolutions.jts.geom.Coordinate; * 12/09/2011 #541 S. Gurung Initial creation * 12/16/2011 S. Gurung Removed resourceAttrsModified() * 03/30/2012 #651 S. Gurung Removed method resourceChanged + * 09-04-2012 B. Hebbard Add getGridGeometry() to descriptor per OB12.9.1 RTS + * change IRadialMeshExtension.constructMesh 2nd param * * * @@ -204,7 +206,7 @@ public class RadarRadialResource extends RadarImageResource { public IMesh buildMesh(IGraphicsTarget target, VizRadarRecord radarRecord) throws VizException { return target.getExtension(IRadialMeshExtension.class).constructMesh( - radarRecord, descriptor.getGridGeometry()); + radarRecord, ((IMapDescriptor) descriptor).getGridGeometry()); } @Override diff --git a/ncep/gov.noaa.nws.ncep.viz.rsc.ncscat/src/gov/noaa/nws/ncep/viz/rsc/ncscat/rsc/NcscatMode.java b/ncep/gov.noaa.nws.ncep.viz.rsc.ncscat/src/gov/noaa/nws/ncep/viz/rsc/ncscat/rsc/NcscatMode.java index 2b78c43306..90f1a81041 100644 --- a/ncep/gov.noaa.nws.ncep.viz.rsc.ncscat/src/gov/noaa/nws/ncep/viz/rsc/ncscat/rsc/NcscatMode.java +++ b/ncep/gov.noaa.nws.ncep.viz.rsc.ncscat/src/gov/noaa/nws/ncep/viz/rsc/ncscat/rsc/NcscatMode.java @@ -26,6 +26,7 @@ import java.util.EnumSet; * ------------ ---------- ----------- -------------------------- * 02 Jun 2010 235B B. Hebbard Initial creation. * 03 Feb 2011 235E B. Hebbard Add support for ambiguity variants. + * 16 Aug 2012 B. Hebbard Add OSCAT / OSCAT_HI * * * @@ -41,6 +42,8 @@ public enum NcscatMode { ASCAT_HI ( 82, false, ByteOrder.BIG_ENDIAN ), EXASCT ( 42, false, ByteOrder.LITTLE_ENDIAN ), EXASCT_HI ( 82, false, ByteOrder.LITTLE_ENDIAN ), + OSCAT ( 36, true, ByteOrder.BIG_ENDIAN ), + OSCAT_HI ( 76, true, ByteOrder.LITTLE_ENDIAN ), WSCAT ( 79, true, ByteOrder.LITTLE_ENDIAN ), UNKNOWN ( 76, true, ByteOrder.BIG_ENDIAN ); diff --git a/ncep/gov.noaa.nws.ncep.viz.rsc.ncscat/src/gov/noaa/nws/ncep/viz/rsc/ncscat/rsc/NcscatResource.java b/ncep/gov.noaa.nws.ncep.viz.rsc.ncscat/src/gov/noaa/nws/ncep/viz/rsc/ncscat/rsc/NcscatResource.java index 48fd037109..f914e7ce24 100644 --- a/ncep/gov.noaa.nws.ncep.viz.rsc.ncscat/src/gov/noaa/nws/ncep/viz/rsc/ncscat/rsc/NcscatResource.java +++ b/ncep/gov.noaa.nws.ncep.viz.rsc.ncscat/src/gov/noaa/nws/ncep/viz/rsc/ncscat/rsc/NcscatResource.java @@ -67,6 +67,8 @@ import com.vividsolutions.jts.geom.Coordinate; * 03 Feb 2011 235E B. Hebbard Add support for ambiguity variants * 16 Nov 2011 B. Hebbard Fix excess rowCount increment in paintFrame() * 05/23/12 785 Q. Zhou Added getName for legend. + * 16 Aug 2012 843 B. Hebbard Added OSCAT + * 17 Aug 2012 655 B. Hebbard Added paintProps as parameter to IDisplayable draw * * * @author bhebbard @@ -251,6 +253,7 @@ public class NcscatResource extends } speed = point.getIsp() / 100.0f; speed *= (3600.0f / 1852.0f); // m/s --> kt //TODO: Use Unit conversions...? + int qualityBits = point.getIql(); switch (ncscatMode) { case QUIKSCAT: case QUIKSCAT_HI: @@ -259,28 +262,29 @@ public class NcscatResource extends // speed = -9999.9f; // ...then do not plot, regardless of user settings // could break; but let's set the flags below anyway... // } - rainQcFlag = (point.getIql() & 0x0008) != 0x0008 && // bit 12 == 0 AND - (point.getIql() & 0x0004) == 0x0004; // bit 13 == 1 rain - highWindSpeedFlag = (point.getIql() & 0x0020) == 0x0020; // bit 10 == 1 - lowWindSpeedFlag = (point.getIql() & 0x0010) == 0x0010; // bit 11 == 1 - availRedunFlag = (point.getIql() & 0x0002) == 0x0002; // bit 14 == 1 availability + rainQcFlag = !getBit(qualityBits, 12) && // bit 12 == 0 AND + getBit(qualityBits, 13); // bit 13 == 1 rain + highWindSpeedFlag = getBit(qualityBits, 10); // bit 10 == 1 + lowWindSpeedFlag = getBit(qualityBits, 11); // bit 11 == 1 + availRedunFlag = getBit(qualityBits, 14); // bit 14 == 1 availability break; case ASCAT: case ASCAT_HI: case EXASCT: case EXASCT_HI: - // qcFlag = (point.getIql() & 0x0800) == 0x0800; // bit 5 == 1 - // rainQcFlag = (point.getIql() & 0x0008) != 0x0008 && // bit 12 == 0 AND - // (point.getIql() & 0x0004) == 0x0004; // bit 13 == 1 - rainQcFlag = (point.getIql() & 0x0800) == 0x0800; // bit 5 == 1 - highWindSpeedFlag = (point.getIql() & 0x0020) == 0x0020; // bit 10 == 1 - lowWindSpeedFlag = (point.getIql() & 0x0010) == 0x0010; // bit 11 == 1 - // availabilityFlag = (point.getIql() & 0x0002) == 0x0002; // bit 14 == 1 - // redundancyFlag = (point.getIql() & 0x0001) == 0x0001; // bit 15 == 1 - availRedunFlag = (point.getIql() & 0x0001) == 0x0001; // bit 15 == 1 redundancy + // qcFlag = getBit(qualityBits, 5); // bit 5 == 1 + // rainQcFlag = !getBit(qualityBits, 12) && // bit 12 == 0 AND + // getBit(qualityBits, 13); // bit 13 == 1 + rainQcFlag = getBit(qualityBits, 5); // bit 5 == 1 + highWindSpeedFlag = getBit(qualityBits, 10); // bit 10 == 1 + lowWindSpeedFlag = getBit(qualityBits, 11); // bit 11 == 1 + // availabilityFlag = getBit(qualityBits, 14); // bit 14 == 1 + // redundancyFlag = getBit(qualityBits, 15); // bit 15 == 1 + availRedunFlag = getBit(qualityBits, 15); // bit 15 == 1 redundancy break; case WSCAT: - rainQcFlag = (point.getIql() & 0x8001) == 0x8001; // bits 0 AND 15 == 1 rain + rainQcFlag = getBit(qualityBits, 0) || + getBit(qualityBits, 15); // bits 0 OR 15 == 1 rain highWindSpeedFlag = false; lowWindSpeedFlag = false; availRedunFlag = false; @@ -293,6 +297,15 @@ public class NcscatResource extends break; } } + + private boolean getBit (int bits, int bitNum) { + int masks[] = {0x8000, 0x4000, 0x2000, 0x1000, + 0x0800, 0x0400, 0x0200, 0x0100, + 0x0080, 0x0040, 0x0020, 0x0010, + 0x0008, 0x0004, 0x0002, 0x0001}; + int mask = masks[bitNum]; + return (bits & mask) != 0; + } } // Structure grouping displayable information for a single row element @@ -564,7 +577,7 @@ public class NcscatResource extends DisplayElementFactory df = new DisplayElementFactory(target, descriptor); ArrayList displayEls = df.createDisplayElements(windVectors, paintProps); for (IDisplayable each : displayEls) { - each.draw(target); + each.draw(target, paintProps); each.dispose(); } diff --git a/ncep/gov.noaa.nws.ncep.viz.rsc.nonconvsigmet/src/gov/noaa/nws/ncep/viz/rsc/nonconvsigmet/rsc/NonConvSigmetResource.java b/ncep/gov.noaa.nws.ncep.viz.rsc.nonconvsigmet/src/gov/noaa/nws/ncep/viz/rsc/nonconvsigmet/rsc/NonConvSigmetResource.java index 5e7e62e1d4..c0b7fe560b 100644 --- a/ncep/gov.noaa.nws.ncep.viz.rsc.nonconvsigmet/src/gov/noaa/nws/ncep/viz/rsc/nonconvsigmet/rsc/NonConvSigmetResource.java +++ b/ncep/gov.noaa.nws.ncep.viz.rsc.nonconvsigmet/src/gov/noaa/nws/ncep/viz/rsc/nonconvsigmet/rsc/NonConvSigmetResource.java @@ -55,6 +55,7 @@ import com.raytheon.uf.viz.core.map.IMapDescriptor; * 18 Nov 2010 307 Greg Hull newRscDataObjsList -> newRscDataObjsQueue * 05 Aug 2011 n/a B. Hebbard Preserve newRscDataObjsQueue during traversal in processCancelRequest * 05/23/12 785 Q. Zhou Added getName for legend. + * 17 Aug 2012 655 B. Hebbard Added paintProps as parameter to IDisplayable draw * * * @author bhebbard @@ -352,7 +353,7 @@ public class NonConvSigmetResource extends DisplayElementFactory df = new DisplayElementFactory( target, descriptor ); ArrayList displayEls = df.createDisplayElements( symbol , paintProps ); for (IDisplayable each : displayEls) { - each.draw(target); + each.draw(target, paintProps); each.dispose(); } } diff --git a/ncep/gov.noaa.nws.ncep.viz.rsc.plotdata/src/gov/noaa/nws/ncep/viz/rsc/plotdata/plotModels/elements/PlotModelElement.java b/ncep/gov.noaa.nws.ncep.viz.rsc.plotdata/src/gov/noaa/nws/ncep/viz/rsc/plotdata/plotModels/elements/PlotModelElement.java index 6c5fadf4d3..cbc248ec1b 100644 --- a/ncep/gov.noaa.nws.ncep.viz.rsc.plotdata/src/gov/noaa/nws/ncep/viz/rsc/plotdata/plotModels/elements/PlotModelElement.java +++ b/ncep/gov.noaa.nws.ncep.viz.rsc.plotdata/src/gov/noaa/nws/ncep/viz/rsc/plotdata/plotModels/elements/PlotModelElement.java @@ -26,6 +26,7 @@ import org.eclipse.swt.graphics.RGB; * * 05/02/12 778 Q. Zhou Changed symbol size form int to double * 06/11/12 654 S. Gurung Changed default textSize to 14 + * 08/23/12 844 S. Gurung Changed default textFont to Standard * * */ @@ -54,7 +55,7 @@ public class PlotModelElement { protected String textSize = "14"; // defaults @XmlAttribute - protected String textFont = "Helvetica"; + protected String textFont = "Standard"; @XmlAttribute protected String textStyle = "Normal"; diff --git a/ncep/gov.noaa.nws.ncep.viz.rsc.plotdata/src/gov/noaa/nws/ncep/viz/rsc/plotdata/rsc/PlotResource2.java b/ncep/gov.noaa.nws.ncep.viz.rsc.plotdata/src/gov/noaa/nws/ncep/viz/rsc/plotdata/rsc/PlotResource2.java index dcc2ab3409..5a5357f0ec 100644 --- a/ncep/gov.noaa.nws.ncep.viz.rsc.plotdata/src/gov/noaa/nws/ncep/viz/rsc/plotdata/rsc/PlotResource2.java +++ b/ncep/gov.noaa.nws.ncep.viz.rsc.plotdata/src/gov/noaa/nws/ncep/viz/rsc/plotdata/rsc/PlotResource2.java @@ -20,10 +20,9 @@ package gov.noaa.nws.ncep.viz.rsc.plotdata.rsc; -import gov.noaa.nws.ncep.viz.common.GraphicsAreaPreferences; import gov.noaa.nws.ncep.viz.resources.AbstractNatlCntrsResource; import gov.noaa.nws.ncep.viz.resources.INatlCntrsResource; -import gov.noaa.nws.ncep.viz.common.Activator; +import gov.noaa.nws.ncep.viz.common.preferences.GraphicsAreaPreferences; import gov.noaa.nws.ncep.viz.common.ui.NmapCommon; import gov.noaa.nws.ncep.viz.rsc.plotdata.plotModels.PlotModelGenerator2; import gov.noaa.nws.ncep.viz.rsc.plotdata.plotModels.StaticPlotInfoPV; @@ -112,6 +111,8 @@ import static java.lang.System.out; * within a predefined Data Area (from Preferences) but outside * of the current display area to improve panning performance * 05/23/2012 785 Q. Zhou Added getName for legend. + * 08/22/2012 #809 sgurung For bgGenerator thread, add stations to queue only when zoomLevel > 0.10 + * (this fixes the issue of slow performance when zooming all the way in, when Data Area is set) * * * @author brockwoo @@ -202,8 +203,6 @@ public class PlotResource2 extends AbstractNatlCntrsResource MAX_DENSITY || threshold < distFloor ); - GeneralEnvelope dataAreaEnvelope = getDataAreaEnvelope(); - LinkedList stationList = new LinkedList(); LinkedList bgStationList = new LinkedList(); List toRemove = new ArrayList(); @@ -233,7 +232,7 @@ public class PlotResource2 extends AbstractNatlCntrsResource 0.10) { newStations = new ArrayList(); for (Station station : bgStationList) { if (station.plotImage == null) { @@ -283,6 +283,7 @@ public class PlotResource2 extends AbstractNatlCntrsResource + + + VAAC_VIS + + + NcIRPixel + + + + + + + + + + + + + + + + + + + + + VAAC_CIRA + + + NcIRPixel + + + + + + + + + + + + + + + + + + + + + + + + + + VAAC_ELLROD + + + NcIRPixel + + + + + + + + + + + + + + + + + + + + + + + + + + VAAC_IR4 + + + NcIRPixel + + + + + + + + + + + + + + + + + + + + + + + + + + VAAC_SPLIT + + + NcIRPixel + + + + + + + + + + + + + + + + + + + + + + + + + VAAC_IR2 + + + NcIRPixel + + + + + + + + + + + + + + + + + + + + + + + + + VAAC_IR + + + NcIRPixel + + + + + + + + + + + + + + + + + + + + + + + + + VAAC_WV + + + NcIRPixel + + + + + + + + + + + + + + + + + + + + + diff --git a/ncep/gov.noaa.nws.ncep.viz.rsc.satellite/src/gov/noaa/nws/ncep/viz/rsc/satellite/rsc/AbstractSatelliteResource.java b/ncep/gov.noaa.nws.ncep.viz.rsc.satellite/src/gov/noaa/nws/ncep/viz/rsc/satellite/rsc/AbstractSatelliteResource.java index eb82720e67..3d5dbd54af 100644 --- a/ncep/gov.noaa.nws.ncep.viz.rsc.satellite/src/gov/noaa/nws/ncep/viz/rsc/satellite/rsc/AbstractSatelliteResource.java +++ b/ncep/gov.noaa.nws.ncep.viz.rsc.satellite/src/gov/noaa/nws/ncep/viz/rsc/satellite/rsc/AbstractSatelliteResource.java @@ -1,18 +1,13 @@ package gov.noaa.nws.ncep.viz.rsc.satellite.rsc; - - import gov.noaa.nws.ncep.edex.common.metparameters.parameterconversion.NcUnits; import gov.noaa.nws.ncep.viz.common.ColorMapUtil; import gov.noaa.nws.ncep.viz.common.ui.NmapCommon; import gov.noaa.nws.ncep.viz.localization.NcPathManager; - import gov.noaa.nws.ncep.viz.resources.AbstractNatlCntrsResource; import gov.noaa.nws.ncep.viz.resources.INatlCntrsResource; - import gov.noaa.nws.ncep.viz.resources.colorBar.ColorBarResource; import gov.noaa.nws.ncep.viz.resources.colorBar.ColorBarResourceData; -//import gov.noaa.nws.ncep.viz.resources.colorBar.LabeledLevel; import gov.noaa.nws.ncep.viz.resources.manager.ResourceName; import gov.noaa.nws.ncep.viz.rsc.satellite.units.NcIRPixelToTempConverter; import gov.noaa.nws.ncep.viz.rsc.satellite.units.NcIRTempToPixelConverter; @@ -23,7 +18,6 @@ import java.io.File; import java.text.ParseException; import java.text.ParsePosition; import java.util.ArrayList; - import java.util.Collections; import java.util.List; @@ -49,7 +43,6 @@ import com.raytheon.uf.common.geospatial.ReferencedCoordinate; import com.raytheon.uf.common.serialization.SerializationException; import com.raytheon.uf.common.serialization.SerializationUtil; import com.raytheon.uf.common.time.DataTime; - import com.raytheon.uf.viz.core.IGraphicsTarget; import com.raytheon.uf.viz.core.VizApp; import com.raytheon.uf.viz.core.drawables.ColorMapParameters; @@ -57,10 +50,8 @@ import com.raytheon.uf.viz.core.drawables.PaintProperties; import com.raytheon.uf.viz.core.drawables.ResourcePair; import com.raytheon.uf.viz.core.exception.VizException; import com.raytheon.uf.viz.core.map.MapDescriptor; - import com.raytheon.uf.viz.core.rsc.IResourceDataChanged; import com.raytheon.uf.viz.core.rsc.LoadProperties; - import com.raytheon.uf.viz.core.rsc.capabilities.ColorMapCapability; import com.raytheon.uf.viz.core.rsc.capabilities.ImagingCapability; import com.raytheon.uf.viz.core.style.AbstractStylePreferences; @@ -79,10 +70,8 @@ import com.raytheon.viz.core.style.image.DataScale; import com.raytheon.viz.core.style.image.ImagePreferences; import com.raytheon.viz.core.style.image.SamplePreferences; import com.raytheon.viz.satellite.SatelliteConstants; - import com.vividsolutions.jts.geom.Coordinate; - /** * Provides satellite raster rendering support * @@ -117,16 +106,18 @@ import com.vividsolutions.jts.geom.Coordinate; * @version 1 */ -public abstract class AbstractSatelliteResource extends AbstractNatlCntrsResource implements - INatlCntrsResource, IResourceDataChanged - { +public abstract class AbstractSatelliteResource extends + AbstractNatlCntrsResource + implements INatlCntrsResource, IResourceDataChanged { protected SatelliteResourceData satRscData; protected FileBasedTileSet baseTile; + protected GridGeometry2D baseGeom; -// private Map fullDataSetMap = new HashMap(); + // private Map fullDataSetMap = new + // HashMap(); // protected String legendStr="Satellite"; // init so not-null @@ -142,15 +133,17 @@ public abstract class AbstractSatelliteResource extends AbstractNatlCntrsResourc protected String viewType; protected ColorBarResource cbarResource; - protected ResourcePair cbarRscPair; + protected ResourcePair cbarRscPair; public FileBasedTileSet getTileSet(){ FrameData fd = (FrameData) this.getCurrentFrame(); return fd.getTileSet(); } + protected class FrameData extends AbstractFrameData { FileBasedTileSet tileSet; + /** * @return the tileSet */ @@ -160,6 +153,7 @@ public abstract class AbstractSatelliteResource extends AbstractNatlCntrsResourc // PluginDataObject satRec; GridGeometry2D gridGeom; + DataTime tileTime; // the time of the data used to create the tileset // used to determine if we need to replace the tile // with a better timematch. @@ -170,10 +164,13 @@ public abstract class AbstractSatelliteResource extends AbstractNatlCntrsResourc } public boolean updateFrameData( IRscDataObject rscDataObj ) { - PluginDataObject satRec = ((DfltRecordRscDataObj)rscDataObj).getPDO(); + PluginDataObject satRec = ((DfltRecordRscDataObj) rscDataObj) + .getPDO(); if( !(satRec instanceof ISpatialEnabled) ) { - System.out.println("AbstractSatelliteResource.updateFrameData: PDO " + - satRec.getClass().toString() + " doesn't implement ISpatialEnabled" ); + System.out + .println("AbstractSatelliteResource.updateFrameData: PDO " + + satRec.getClass().toString() + + " doesn't implement ISpatialEnabled"); return false; } @@ -191,50 +188,56 @@ public abstract class AbstractSatelliteResource extends AbstractNatlCntrsResourc if (baseTile == null) { - if ( getProjectionFromRecord(satRec).equalsIgnoreCase("STR") || - getProjectionFromRecord(satRec).equalsIgnoreCase("MER") || - getProjectionFromRecord(satRec).equalsIgnoreCase("LCC") ) { + if (getProjectionFromRecord(satRec).equalsIgnoreCase( + "STR") + || getProjectionFromRecord(satRec) + .equalsIgnoreCase("MER") + || getProjectionFromRecord(satRec) + .equalsIgnoreCase("LCC")) { /* * for remapped projections such as MER, LCC, STR */ - gridGeom = baseGeom = MapUtil.getGridGeometry(( - (ISpatialEnabled)satRec).getSpatialObject()); - tileSet = baseTile = new McidasFileBasedTileSet(satRec, "Data", - numLevels, 256, gridGeom, AbstractSatelliteResource.this, + gridGeom = baseGeom = MapUtil + .getGridGeometry(((ISpatialEnabled) satRec) + .getSpatialObject()); + tileSet = baseTile = new McidasFileBasedTileSet( + satRec, "Data", numLevels, 256, gridGeom, + AbstractSatelliteResource.this, PixelInCell.CELL_CORNER, viewType); tileTime = satRec.getDataTime(); - } - else { + } else { /* - * for native Satellite projections. Note native projections - * can vary with each image. cannot specify a baseTile or baseGeom. + * for native Satellite projections. Note native + * projections can vary with each image. cannot + * specify a baseTile or baseGeom. */ gridGeom = createNativeGeometry(satRec); - tileSet = new McidasFileBasedTileSet(satRec, "Data", numLevels, 256, - gridGeom, AbstractSatelliteResource.this, + tileSet = new McidasFileBasedTileSet(satRec, + "Data", numLevels, 256, gridGeom, + AbstractSatelliteResource.this, PixelInCell.CELL_CORNER, viewType); tileTime = satRec.getDataTime(); } - } else { // if the tileset is already set, and the new record is // is not a better match then return if( tileSet != null && tileTime != null ) { if( timeMatch(satRec.getDataTime()) >= timeMatch(tileTime) ) { return false; - } - else { // if this is a better match, we need to create a new tile. + } else { // if this is a better match, we need to + // create a new tile. if( tileSet == baseTile ) { tileSet = null; - } - else { + } else { tileSet.dispose(); - tileSet = null; } + tileSet = null; + } } } - tileSet = new McidasFileBasedTileSet(satRec, "Data", baseTile); + tileSet = new McidasFileBasedTileSet(satRec, "Data", + baseTile); tileTime = satRec.getDataTime(); gridGeom = baseGeom; } @@ -249,18 +252,18 @@ public abstract class AbstractSatelliteResource extends AbstractNatlCntrsResourc imageTypes.add( getImageTypeFromRecord( satRec ) ); - Collections.sort(AbstractSatelliteResource.this.dataTimes); List paramList = getParameterList(satRec); String unitStr = getDataUnitsFromRecord(satRec); String locFileName = getLocFilePathForImageryStyleRule(); int imgNum = getImageTypeNumber(satRec); - generateAndStoreColorBarLabelingInformation(paramList, unitStr, imgNum, locFileName); + generateAndStoreColorBarLabelingInformation(paramList, + unitStr, imgNum, locFileName); - } - catch( VizException e ) { - System.out.println("Error processing SatelliteRecord. " + e.getMessage() ); + } catch (VizException e) { + System.out.println("Error processing SatelliteRecord. " + + e.getMessage()); return false; } } @@ -276,9 +279,9 @@ public abstract class AbstractSatelliteResource extends AbstractNatlCntrsResourc } } - // abstract methods used to get Record dependent info from the PDO - // This represents the only differences between Mcidas and Gini Satellite Resources. + // This represents the only differences between Mcidas and Gini Satellite + // Resources. // abstract String getImageTypeFromRecord( PluginDataObject pdo ); @@ -296,14 +299,13 @@ public abstract class AbstractSatelliteResource extends AbstractNatlCntrsResourc abstract String getLocFilePathForImageryStyleRule(); - - /** * Constructor * * @throws VizException */ - public AbstractSatelliteResource(SatelliteResourceData data, LoadProperties props) { + public AbstractSatelliteResource(SatelliteResourceData data, + LoadProperties props) { super(data, props); satRscData = data; satRscData.addChangeListener(this); @@ -340,15 +342,20 @@ public abstract class AbstractSatelliteResource extends AbstractNatlCntrsResourc public String getName() { String legendString = super.getName(); FrameData fd = (FrameData) getCurrentFrame(); - if (fd == null || fd.tileTime == null || fd.tileSet.getMapDescriptor().getFramesInfo().getFrameCount() == 0) { + if (fd == null + || fd.tileTime == null + || fd.tileSet.getMapDescriptor().getFramesInfo() + .getFrameCount() == 0) { return legendString + "-No Data"; } - return legendString + " "+NmapCommon.getTimeStringFromDataTime( fd.tileTime, "/"); + return legendString + " " + + NmapCommon.getTimeStringFromDataTime(fd.tileTime, "/"); } @Override - protected AbstractFrameData createNewFrame( DataTime frameTime, int frameInterval) { + protected AbstractFrameData createNewFrame(DataTime frameTime, + int frameInterval) { return new FrameData( frameTime, frameInterval ); } @@ -356,18 +363,18 @@ public abstract class AbstractSatelliteResource extends AbstractNatlCntrsResourc private void initializeFirstFrame( PluginDataObject record ) throws VizException { - NcSatelliteUnits.register(); NcUnits.register(); - // NOTE : This will replace Raytheons IRPixel (and IRPixelToTempConverter) with ours + // NOTE : This will replace Raytheons IRPixel (and + // IRPixelToTempConverter) with ours // even for D2D's GiniSatResource. - Unit dataUnit = null; String dataUnitStr = getDataUnitsFromRecord( record ); String imgType = null; - DerivedParameterRequest request = (DerivedParameterRequest) record.getMessageData(); + DerivedParameterRequest request = (DerivedParameterRequest) record + .getMessageData(); if (request == null) { imgType = getImageTypeFromRecord( record ); @@ -400,15 +407,16 @@ public abstract class AbstractSatelliteResource extends AbstractNatlCntrsResourc // } // } - // ? This logic came from Raytheon's SatResource. Does it apply to McIdas? + // ? This logic came from Raytheon's SatResource. Does it apply to + // McIdas? String creatingEntity = null; if( imgType.equals(SatelliteConstants.PRECIP)) { creatingEntity = getCreatingEntityFromRecord( record ); //.getCreatingEntity(); - if( creatingEntity.equals(SatelliteConstants.DMSP) || - creatingEntity.equals(SatelliteConstants.POES)) { + if (creatingEntity.equals(SatelliteConstants.DMSP) + || creatingEntity.equals(SatelliteConstants.POES)) { dataUnit = new PolarPrecipWaterPixel(); } else if (creatingEntity.equals(SatelliteConstants.MISC)) { @@ -417,19 +425,20 @@ public abstract class AbstractSatelliteResource extends AbstractNatlCntrsResourc } } - // create the colorMap and set it in the colorMapParameters and init the colorBar + // create the colorMap and set it in the colorMapParameters and init the + // colorBar ColorMapParameters colorMapParameters = new ColorMapParameters(); ColorMap colorMap; try { - colorMap = (ColorMap) ColorMapUtil.loadColorMap( - satRscData.getResourceName().getRscCategory(), - satRscData.getColorMapName() ); + colorMap = (ColorMap) ColorMapUtil.loadColorMap(satRscData + .getResourceName().getRscCategory(), satRscData + .getColorMapName()); } catch (VizException e) { - throw new VizException("Error loading colormap: "+ satRscData.getColorMapName() ); + throw new VizException("Error loading colormap: " + + satRscData.getColorMapName()); } - colorMapParameters.setDisplayUnit( satRscData.getDisplayUnit() ); colorMapParameters.setDataUnit( dataUnit ); @@ -439,11 +448,12 @@ public abstract class AbstractSatelliteResource extends AbstractNatlCntrsResourc colorMapParameters.setColorMapMin(0.0f); colorMapParameters.setColorMapMax(255.0f); - colorMapParameters.setColorMap( colorMap ); getCapability(ColorMapCapability.class).setColorMapParameters( colorMapParameters); + getCapability(ImagingCapability.class).setSuppressingMenuItems(true); + getCapability(ColorMapCapability.class).setSuppressingMenuItems(true); numLevels = 1; int newSzX = ((ISpatialEnabled)record).getSpatialObject().getNx(); @@ -461,7 +471,8 @@ public abstract class AbstractSatelliteResource extends AbstractNatlCntrsResourc // public String getName() { // if(currFrameTime == null ) // return "Satellite - No Data Available"; -// RequestConstraint rc = satRscData.getMetadataMap().get("physicalElement"); + // RequestConstraint rc = + // satRscData.getMetadataMap().get("physicalElement"); // // // TODO : for to11dr11-determine creating entity // return (rc == null ? "Satellite : " : @@ -489,14 +500,15 @@ public abstract class AbstractSatelliteResource extends AbstractNatlCntrsResourc grphTarget.setUseBuiltinColorbar( false ); - // create the colorBar Resource and add it to the resourceList for this descriptor. - cbarRscPair = ResourcePair.constructSystemResourcePair( - new ColorBarResourceData( satRscData.getColorBar() ) ); - - + // create the colorBar Resource and add it to the resourceList for + // this descriptor. + cbarRscPair = ResourcePair + .constructSystemResourcePair(new ColorBarResourceData( + satRscData.getColorBar())); getDescriptor().getResourceList().add( cbarRscPair ); - getDescriptor().getResourceList().instantiateResources( getDescriptor(), true ); + getDescriptor().getResourceList().instantiateResources( + getDescriptor(), true); cbarResource = (ColorBarResource) cbarRscPair.getResource(); @@ -513,8 +525,8 @@ public abstract class AbstractSatelliteResource extends AbstractNatlCntrsResourc } } - public void paintFrame( AbstractFrameData frmData, IGraphicsTarget target, PaintProperties paintProps) - throws VizException { + public void paintFrame(AbstractFrameData frmData, IGraphicsTarget target, + PaintProperties paintProps) throws VizException { // this.displayedDate = paintProps.getDataTime(); // this.target = target; @@ -536,7 +548,8 @@ public abstract class AbstractSatelliteResource extends AbstractNatlCntrsResourc if (colorMapName == null) colorMapName = "Sat/VIS/ZA (Vis Default)"; - params.setColorMap(ColorMapUtil.loadColorMap(ResourceName.SatelliteRscCategory, colorMapName)); + params.setColorMap(ColorMapUtil.loadColorMap( + ResourceName.SatelliteRscCategory, colorMapName)); } tileSet.paint( target, paintProps ); @@ -592,13 +605,11 @@ public abstract class AbstractSatelliteResource extends AbstractNatlCntrsResourc unit == null ? "" : unit.toString()); } } - return String.format("%.1f%s", value, unit == null ? "" : unit - .toString()); + return String.format("%.1f%s", value, + unit == null ? "" : unit.toString()); } - - public Double inspectValue(ReferencedCoordinate coord) - throws VizException { + public Double inspectValue(ReferencedCoordinate coord) throws VizException { FrameData currFrame = (FrameData) getCurrentFrame(); if( currFrame == null ) { @@ -620,7 +631,6 @@ public abstract class AbstractSatelliteResource extends AbstractNatlCntrsResourc return currFrame.tileSet.interrogate(latlon, false); } - protected List getImageTypes() { return imageTypes; } @@ -680,12 +690,10 @@ public abstract class AbstractSatelliteResource extends AbstractNatlCntrsResourc if( isCloudHeightCompatible() ) { if( satRscData.getDisplayUnit() == null ) { return SI.CELSIUS; - } - else { + } else { return (Unit) satRscData.getDisplayUnit(); } - } - else { + } else { return null; } } @@ -698,13 +706,15 @@ public abstract class AbstractSatelliteResource extends AbstractNatlCntrsResourc // update the colorbarPainter with a possibly new colorbar ColorBarFromColormap colorBar = satRscData.getColorBar(); - ColorMapParameters cmapParams = getCapability(ColorMapCapability.class).getColorMapParameters(); + ColorMapParameters cmapParams = getCapability(ColorMapCapability.class) + .getColorMapParameters(); cmapParams.setColorMap( colorBar.getColorMap()); cmapParams.setColorMapName( satRscData.getColorMapName() ); // not currently an attribute but could be. cmapParams.setDisplayUnit( satRscData.getDisplayUnit() ); - getCapability(ColorMapCapability.class).setColorMapParameters( cmapParams ); + getCapability(ColorMapCapability.class).setColorMapParameters( + cmapParams); cbarResource.setColorBar( colorBar ); } @@ -737,7 +747,6 @@ public abstract class AbstractSatelliteResource extends AbstractNatlCntrsResourc // return legendStr; // } - @Override public void resourceChanged(ChangeType type, Object object) { if ( type != null && type == ChangeType.CAPABILITY ){ @@ -752,28 +761,34 @@ public abstract class AbstractSatelliteResource extends AbstractNatlCntrsResourc satRscData.setContrast( imgCap.getContrast() ); issueRefresh(); - - } - else if (object instanceof ColorMapCapability ){ + } else if (object instanceof ColorMapCapability) { ColorMapCapability colorMapCap = getCapability(ColorMapCapability.class); ColorMapCapability newColorMapCap = (ColorMapCapability) object; - colorMapCap.setColorMapParameters(newColorMapCap.getColorMapParameters(), false); - ColorMap theColorMap = ( ColorMap ) colorMapCap.getColorMapParameters().getColorMap(); - String colorMapName = colorMapCap.getColorMapParameters().getColorMapName(); + colorMapCap.setColorMapParameters( + newColorMapCap.getColorMapParameters(), false); + ColorMap theColorMap = (ColorMap) colorMapCap + .getColorMapParameters().getColorMap(); + String colorMapName = colorMapCap.getColorMapParameters() + .getColorMapName(); satRscData.setColorMapName( colorMapName ); - satRscData.getRscAttrSet().setAttrValue( "colorMapName", colorMapName ); + satRscData.getRscAttrSet().setAttrValue("colorMapName", + colorMapName); ColorBarFromColormap cBar = satRscData.getColorBar(); cBar.setColorMap( theColorMap ); - ColorBarFromColormap colorBar = (ColorBarFromColormap) this.cbarResource.getResourceData().getColorbar(); + ColorBarFromColormap colorBar = (ColorBarFromColormap) this.cbarResource + .getResourceData().getColorbar(); if ( colorBar != null ){ - if ( colorBar.getImagePreferences() != null && cBar.getImagePreferences() == null ){ + if (colorBar.getImagePreferences() != null + && cBar.getImagePreferences() == null) { cBar.setImagePreferences(colorBar.getImagePreferences() ); } - cBar.setIsScalingAttemptedForThisColorMap(colorBar.isScalingAttemptedForThisColorMap()); - cBar.setNumPixelsToReAlignLabel(colorBar.getNumPixelsToReAlignLabel()); + cBar.setIsScalingAttemptedForThisColorMap(colorBar + .isScalingAttemptedForThisColorMap()); + cBar.setNumPixelsToReAlignLabel(colorBar + .isAlignLabelInTheMiddleOfInterval()); } satRscData.getRscAttrSet().setAttrValue( "colorBar", cBar ); satRscData.setIsEdited( true ); @@ -785,25 +800,30 @@ public abstract class AbstractSatelliteResource extends AbstractNatlCntrsResourc } - - public void generateAndStoreColorBarLabelingInformation(List parameterList, String dataUnitString, int imageTypeNumber, String localizationFileName ){ + public void generateAndStoreColorBarLabelingInformation( + List parameterList, String dataUnitString, + int imageTypeNumber, String localizationFileName) { double minPixVal = Double.NaN; double maxPixVal = Double.NaN; ParamLevelMatchCriteria matchCriteria = new ParamLevelMatchCriteria(); - ImagePreferences imgPref = new ImagePreferences(); - ColorBarFromColormap colorBar = (ColorBarFromColormap)this.cbarResource.getResourceData().getColorbar(); + ColorBarFromColormap colorBar = (ColorBarFromColormap) this.cbarResource + .getResourceData().getColorbar(); if( colorBar.getColorMap() == null ){ - colorBar.setColorMap((ColorMap)getCapability(ColorMapCapability.class).getColorMapParameters().getColorMap()); + colorBar.setColorMap((ColorMap) getCapability( + ColorMapCapability.class).getColorMapParameters() + .getColorMap()); } matchCriteria.setParameterName(parameterList); - File file = NcPathManager.getInstance().getStaticFile( localizationFileName ); + File file = NcPathManager.getInstance().getStaticFile( + localizationFileName); try { - StyleRuleset styleSet = (StyleRuleset) SerializationUtil.jaxbUnmarshalFromXmlFile(file); + StyleRuleset styleSet = (StyleRuleset) SerializationUtil + .jaxbUnmarshalFromXmlFile(file); if ( styleSet != null ){ List styleRuleList= styleSet.getStyleRules(); @@ -812,18 +832,23 @@ public abstract class AbstractSatelliteResource extends AbstractNatlCntrsResourc MatchCriteria styleMatchCriteria = sr.getMatchCriteria(); if ( styleMatchCriteria.matches(matchCriteria) > 0 ){ - AbstractStylePreferences stylePref = sr.getPreferences(); - if ( stylePref != null && stylePref instanceof ImagePreferences ){ + AbstractStylePreferences stylePref = sr + .getPreferences(); + if (stylePref != null + && stylePref instanceof ImagePreferences) { imgPref = (ImagePreferences) stylePref; /* - * Might need to change this if/when we use the data-scaling + * Might need to change this if/when we use the + * data-scaling */ - SamplePreferences samplePref = imgPref.getSamplePrefs(); + SamplePreferences samplePref = imgPref + .getSamplePrefs(); if ( samplePref != null ){ - minPixVal = imgPref.getSamplePrefs().getMinValue(); - maxPixVal = imgPref.getSamplePrefs().getMaxValue(); - } - else if ( imgPref.getDataScale() != null ){ + minPixVal = imgPref.getSamplePrefs() + .getMinValue(); + maxPixVal = imgPref.getSamplePrefs() + .getMaxValue(); + } else if (imgPref.getDataScale() != null) { DataScale ds = imgPref.getDataScale(); if (ds.getMaxValue() != null ) maxPixVal = ds.getMaxValue().doubleValue(); @@ -831,11 +856,10 @@ public abstract class AbstractSatelliteResource extends AbstractNatlCntrsResourc minPixVal = ds.getMinValue().doubleValue(); } - - colorBar.setImagePreferences(imgPref); if(imgPref.getDisplayUnitLabel() != null){ - colorBar.setDisplayUnitStr(imgPref.getDisplayUnitLabel()); + colorBar.setDisplayUnitStr(imgPref + .getDisplayUnitLabel()); } break; @@ -843,7 +867,6 @@ public abstract class AbstractSatelliteResource extends AbstractNatlCntrsResourc } - } } @@ -858,12 +881,11 @@ public abstract class AbstractSatelliteResource extends AbstractNatlCntrsResourc e1.printStackTrace(); } //these label value calculations are from legacy imlabl.f - if ( ( dataUnitString != null) && ( ( dataUnitString).compareTo("BRIT") == 0 ) + if ((dataUnitString != null) + && ((dataUnitString).compareTo("BRIT") == 0) && ( ( imageTypeNumber == 8 ) || ( imageTypeNumber == 128 ) ) - && ( minPixVal != Double.NaN ) - && ( maxPixVal != Double.NaN ) - && (colorBar != null ) - && (imgPref.getDataMapping() == null)) + && (minPixVal != Double.NaN) && (maxPixVal != Double.NaN) + && (colorBar != null) && (imgPref.getDataMapping() == null)) { @@ -879,19 +901,18 @@ public abstract class AbstractSatelliteResource extends AbstractNatlCntrsResourc entry.setDisplayValue(tmpc); entry.setLabel(String.format("%.1f", tmpc)); dmPref.addEntry(entry); - colorBar.labelPixel(entry.getPixelValue().intValue()); + // colorBar.labelPixel(entry.getPixelValue().intValue()); int ibrit = (imndlv - 1) + ( int ) minPixVal; tmpk = pixelToTemperatureConverter.convert( ibrit ); tmpc = SI.KELVIN.getConverterTo(SI.CELSIUS).convert( tmpk ); - entry = new DataMappingEntry(); entry.setPixelValue(Double.valueOf( imndlv ) ); entry.setDisplayValue( tmpc ); entry.setLabel(String.format("%.1f", tmpc)); dmPref.addEntry( entry ); - colorBar.labelPixel(entry.getPixelValue().intValue()); + // colorBar.labelPixel(entry.getPixelValue().intValue()); NcIRTempToPixelConverter tempToPixConv = new NcIRTempToPixelConverter(); tmpc = -100; @@ -908,13 +929,12 @@ public abstract class AbstractSatelliteResource extends AbstractNatlCntrsResourc if ( ibrit > 0 ){ entry = new DataMappingEntry(); - entry.setPixelValue( Double.valueOf( ibrit ) ); entry.setDisplayValue( tmpc ); entry.setLabel(Integer.toString( (int) tmpc)); dmPref.addEntry( entry ); - colorBar.labelPixel( entry.getPixelValue().intValue() ); + // colorBar.labelPixel( entry.getPixelValue().intValue() ); } @@ -930,19 +950,19 @@ public abstract class AbstractSatelliteResource extends AbstractNatlCntrsResourc } - else if (imgPref.getDataMapping() == null){ //no existing data mapping, so we generate it + else if (imgPref.getDataMapping() == null) { // no existing data + // mapping, so we generate + // it //For all other images, the native units are used for display // if (Double.isNaN(minPixVal) || Double.isNaN(maxPixVal)){ // // } - if(imgPref.getDisplayUnitLabel() != null ) colorBar.setDisplayUnitStr(imgPref.getDisplayUnitLabel()); else colorBar.setDisplayUnitStr(dataUnitString); - int imndlv = (int) Math.min(256, maxPixVal - minPixVal + 1); double ratio = (maxPixVal - minPixVal)/255; DataMappingEntry dmEntry = new DataMappingEntry(); @@ -969,7 +989,6 @@ public abstract class AbstractSatelliteResource extends AbstractNatlCntrsResourc dmEntry.setLabel(Double.toString(level)); dmPref.addEntry(dmEntry); - if( !colorBar.isScalingAttemptedForThisColorMap() ){ imgPref = new ImagePreferences(); imgPref.setDataMapping(dmPref); @@ -983,15 +1002,10 @@ public abstract class AbstractSatelliteResource extends AbstractNatlCntrsResourc } - - colorBar.setNumPixelsToReAlignLabel(4); + colorBar.setAlignLabelInTheMiddleOfInterval(false); if(!colorBar.equals(satRscData.getColorBar())) this.satRscData.setColorBar(colorBar); - } - - - } diff --git a/ncep/gov.noaa.nws.ncep.viz.rsc.svrl/localization/ncep/resourceTemplates/SVRL.xml b/ncep/gov.noaa.nws.ncep.viz.rsc.svrl/localization/ncep/resourceTemplates/SVRL.xml index 8e8b5b19f3..c33188ae46 100644 --- a/ncep/gov.noaa.nws.ncep.viz.rsc.svrl/localization/ncep/resourceTemplates/SVRL.xml +++ b/ncep/gov.noaa.nws.ncep.viz.rsc.svrl/localization/ncep/resourceTemplates/SVRL.xml @@ -6,7 +6,7 @@ isMapLayer="false" isHoverOn="false" isVisible="true" /> - ${frame_interval} + ${frameSpan} ${dfltNumFrames} ${dfltTimeRange} ${timeMatchMethod} @@ -63,7 +63,6 @@ ${Watchxxx9SymbolSize} ${watchBoxTimeEnable} ${watchBoxLabelEnable} - ${watchBoxNumberEnable} ${colorCodeEnable} ${watchBoxOutlineEnable} METADATA diff --git a/ncep/gov.noaa.nws.ncep.viz.rsc.svrl/src/gov/noaa/nws/ncep/viz/rsc/svrl/rsc/SvrlResource.java b/ncep/gov.noaa.nws.ncep.viz.rsc.svrl/src/gov/noaa/nws/ncep/viz/rsc/svrl/rsc/SvrlResource.java index f12783d565..59cd8c7831 100644 --- a/ncep/gov.noaa.nws.ncep.viz.rsc.svrl/src/gov/noaa/nws/ncep/viz/rsc/svrl/rsc/SvrlResource.java +++ b/ncep/gov.noaa.nws.ncep.viz.rsc.svrl/src/gov/noaa/nws/ncep/viz/rsc/svrl/rsc/SvrlResource.java @@ -70,6 +70,22 @@ import gov.noaa.nws.ncep.common.dataplugin.aww.AwwRecord; import gov.noaa.nws.ncep.common.dataplugin.aww.AwwUgc; import gov.noaa.nws.ncep.common.dataplugin.aww.AwwVtec; +/** + * SVRL resource - Display Severe local storm watch data from aww data. + * + * This code has been developed by the SIB for use in the AWIPS2 system. + * + *
+ * SOFTWARE HISTORY
+ * Date         Ticket#    Engineer    Description
+ * ------------ ---------- ----------- --------------------------
+ * 
+ * 09/11/12      852        Q. Zhou     Modified time string and alignment in drawTimeLabelWatchNumber().
+ * 
+ * + * @author qzhou + * @version 1.0 + */ public class SvrlResource extends AbstractNatlCntrsResource< SvrlResourceData, IMapDescriptor> implements INatlCntrsResource, IStationField { @@ -559,7 +575,6 @@ drawCountyOutline2(svrlData,target,color,symbolWidth,lineStyle,paintProps);//T45 } - public void drawTimeLabelWatchNumber(SvrlData svrlData,IGraphicsTarget target,RGB color){ try{ for(int i = 0; i < svrlData.countyNumPoints;i++) { @@ -568,28 +583,31 @@ drawCountyOutline2(svrlData,target,color,symbolWidth,lineStyle,paintProps);//T45 if( labelPix != null ){ - String[] text = new String[3]; - text[0]=" "+svrlData.watchNumber; - text[1]=" "+svrlData.countyNames.get(i); - DataTime evStartTime = new DataTime( svrlData.eventTime.getValidPeriod().getStart() ); - DataTime evEndTime = new DataTime( svrlData.eventTime.getValidPeriod().getEnd() ); - text[2] = " "+evStartTime.toString().substring(11, 16) - + "-" + evEndTime.toString().substring(11, 16); - if(!svrlRscData.getWatchBoxTimeEnable() ){ - text[2] = null; - } + String[] text = new String[2]; + List enabledText = new ArrayList(); - if(!svrlRscData.getWatchBoxLabelEnable() ){ - text[1]=null; + if(svrlRscData.getWatchBoxLabelEnable() ){ + enabledText.add(svrlData.countyNames.get(i)); } - if(!svrlRscData.getWatchBoxNumberEnable()){ - text[0] = null; - } for(int ii=0; ii> list = fipsMultiResultMap.get(fips); if( list == null ){ - logger.log(Level.WARNING, "_______ No result for fips: "+fips); + //logger.log(Level.WARNING, "_______ No result for fips: "+fips); return new ArrayList>(); } - return list;//fipsMultiResultMap.get(fips); + return list; } } diff --git a/ncep/gov.noaa.nws.ncep.viz.rsc.warn/src/gov/noaa/nws/ncep/viz/rsc/warn/rsc/WarnResource.java b/ncep/gov.noaa.nws.ncep.viz.rsc.warn/src/gov/noaa/nws/ncep/viz/rsc/warn/rsc/WarnResource.java index ba57a22530..aa5f14aa81 100644 --- a/ncep/gov.noaa.nws.ncep.viz.rsc.warn/src/gov/noaa/nws/ncep/viz/rsc/warn/rsc/WarnResource.java +++ b/ncep/gov.noaa.nws.ncep.viz.rsc.warn/src/gov/noaa/nws/ncep/viz/rsc/warn/rsc/WarnResource.java @@ -80,6 +80,8 @@ import com.vividsolutions.jts.io.WKBReader; * 08/31/11 #456 Gang Zhang AWW fix * 02/16/2012 #555 S. Gurung Added call to setAllFramesAsPopulated() in queryRecords(). * 05/23/2012 785 Q. Zhou Added getName for legend. + * 08/17/2012 655 B. Hebbard Added paintProps as parameter to IDisplayable draw + * 09/11/2012 854 Q. Zhou Modified time string and alignment in drawLabel(). * * * @author ujosyula @@ -333,7 +335,7 @@ public class WarnResource extends AbstractNatlCntrsResource< WarnResourceData, I DisplayElementFactory df = new DisplayElementFactory( target, descriptor ); ArrayList displayEls = df.createDisplayElements( pointSymbol , paintProps ); for (IDisplayable each : displayEls) { - each.draw(target); + each.draw(target, paintProps); each.dispose(); } @@ -359,28 +361,30 @@ public class WarnResource extends AbstractNatlCntrsResource< WarnResourceData, I if( labelPix != null ){ String[] text = new String[2]; + List enabledText = new ArrayList(); - text[0]=" "+warnData.countyNames.get(i); + if(warnRscData.getCountyNameEnable() ){ + enabledText.add(warnData.countyNames.get(i)); + } + + if(warnRscData.getTimeEnable() ){ DataTime startTime = new DataTime( warnData.eventTime.getValidPeriod().getStart() ); DataTime endTime = new DataTime( warnData.eventTime.getValidPeriod().getEnd() ); - text[1] = " "+startTime.toString().substring(11, 16) - + "-" + endTime.toString().substring(11, 16); - - if(!warnRscData.getTimeEnable() ){ - //text[1] = null; - text[1] = ""; + String temp = startTime.toString().substring(11, 13) +startTime.toString().substring(14, 16) + + "-" + endTime.toString().substring(11, 13) +startTime.toString().substring(14, 16); + enabledText.add(temp); } - if(!warnRscData.getCountyNameEnable() ){ - //text[0]=null; - text[0]=""; - } + for (int j=enabledText.size(); j<2; j++) + enabledText.add(""); + + text = enabledText.toArray(text); target.drawStrings(font, text, labelPix[0], labelPix[1], 0.0, TextStyle.NORMAL, new RGB[] {color, color}, - HorizontalAlignment.CENTER,//T456: .LEFT,2011-08-30 Dave - VerticalAlignment.MIDDLE ); + HorizontalAlignment.LEFT,//T456: .LEFT,2011-08-30 Dave + VerticalAlignment.TOP ); } } } diff --git a/ncep/gov.noaa.nws.ncep.viz.rsc.wcn/src/gov/noaa/nws/ncep/viz/rsc/wcn/rsc/WcnResource.java b/ncep/gov.noaa.nws.ncep.viz.rsc.wcn/src/gov/noaa/nws/ncep/viz/rsc/wcn/rsc/WcnResource.java index b0ce8c0a46..058c41e00f 100644 --- a/ncep/gov.noaa.nws.ncep.viz.rsc.wcn/src/gov/noaa/nws/ncep/viz/rsc/wcn/rsc/WcnResource.java +++ b/ncep/gov.noaa.nws.ncep.viz.rsc.wcn/src/gov/noaa/nws/ncep/viz/rsc/wcn/rsc/WcnResource.java @@ -12,8 +12,6 @@ import java.util.StringTokenizer; import org.eclipse.swt.graphics.RGB; import org.geotools.geometry.jts.ReferencedEnvelope; - -import com.raytheon.uf.common.dataquery.requests.RequestConstraint; import com.raytheon.uf.common.geospatial.MapUtil; import com.raytheon.uf.common.time.DataTime; import com.raytheon.uf.common.time.TimeRange; @@ -74,6 +72,10 @@ import gov.noaa.nws.ncep.common.dataplugin.aww.AwwVtec; * 07/28/11 #450 Greg Hull NcPathManager * 02/16/2012 #555 S. Gurung Added call to setAllFramesAsPopulated() in queryRecords(). * 05/23/2012 785 Q. Zhou Added getName for legend. + * 08/17/2012 655 B. Hebbard Added paintProps as parameter to IDisplayable draw + * 09/30/2012 857 Q. Zhou Displayed watch number. Modified time string and alignment in drawTimeLabelWatchNumber(). + * Added label/time for union. Modified fill alpha to 0.5. + * Remove constraint & metamap in initResource(). * * * @author ujosyula @@ -182,22 +184,26 @@ implements INatlCntrsResource, IStationField { Set awwUgc = awwRecord.getAwwUGC(); for (AwwUgc awwugcs : awwUgc) { wcnStatusData= new WcnRscDataObj(); + wcnStatusData.issueTime =new DataTime(awwRecord.getIssueTime()); wcnStatusData.reportType=awwRecord.getReportType(); wcnStatusData.datauri=awwRecord.getDataURI(); - wcnStatusData.watchNumber=awwRecord.getWatchNumber(); + if(awwRecord.getBullMessage().contains("THUNDERSTORM")){ wcnStatusData.reportType ="THUNDERSTORM"; } else if (awwRecord.getBullMessage().contains("TORNADO")){ wcnStatusData.reportType="TORNADO"; } -if( ! (wcnStatusData.isCounty=isCountyUgs(awwugcs)) ) setMarineZonesFips(awwugcs.getAwwFIPS(),wcnStatusData);//T456 + + if( ! (wcnStatusData.isCounty=isCountyUgs(awwugcs)) ) + setMarineZonesFips(awwugcs.getAwwFIPS(),wcnStatusData);//T456 String ugcline = awwugcs.getUgc();//get the ugc line to find the counties if(ugcline!=null && ugcline!=""){ - + wcnStatusData.watchNumber = awwugcs.getEventTrackingNumber(); wcnStatusData.countyUgc = new ArrayList(); + int i=0; String temp; String countyname= ugcline.substring(0,3); @@ -236,6 +242,7 @@ if( ! (wcnStatusData.isCounty=isCountyUgs(awwugcs)) ) setMarineZonesFips(awwugcs wcnStatusData.evPhenomena =awwVtech.getPhenomena(); wcnStatusData.evProductClass =awwVtech.getProductClass(); wcnStatusData.evSignificance =awwVtech.getSignificance(); + if((awwVtech.getAction().equalsIgnoreCase("COR"))||(awwVtech.getAction().equalsIgnoreCase("CAN")) ||(awwVtech.getAction().equalsIgnoreCase("EXP"))){ modifyList.add(wcnStatusData); @@ -350,9 +357,9 @@ if( ! (wcnStatusData.isCounty=isCountyUgs(awwugcs)) ) setMarineZonesFips(awwugcs stationTable = new StationTable( NcPathManager.getInstance().getStaticFile( NcPathConstants.COUNTY_STN_TBL ).getAbsolutePath() ); - HashMap metadataMap =new HashMap(resourceData.getMetadataMap()); - metadataMap.put("reportType",new RequestConstraint("WATCH_COUNTY_NOTIFICATION")); - resourceData.setMetadataMap(metadataMap); +// HashMap metadataMap =new HashMap(resourceData.getMetadataMap()); +// metadataMap.put("reportType",new RequestConstraint("WATCH_COUNTY_NOTIFICATION")); +// resourceData.setMetadataMap(metadataMap); queryRecords(); } @@ -366,7 +373,11 @@ if( ! (wcnStatusData.isCounty=isCountyUgs(awwugcs)) ) setMarineZonesFips(awwugcs if( paintProps == null ) { return; } -if( areaChangeFlag ){ areaChangeFlag = false; postProcessFrameUpdate(); }//T456: dispose old outlineShape? TODO + + if( areaChangeFlag ){ + areaChangeFlag = false; + postProcessFrameUpdate(); }//T456: dispose old outlineShape? TODO + FrameData currFrameData = (FrameData) frameData; // RGB color = new RGB (155, 155, 155); @@ -501,11 +512,11 @@ if( areaChangeFlag ){ areaChangeFlag = false; postProcessFrameUpdate(); }//T456: Coordinate coord = new Coordinate( wcnData.countyLon[i], wcnData.countyLat[i] ); Symbol pointSymbol = new Symbol(null,colors,symbolWidth, symbolSize*0.4 ,false, - coord,"Symbol","DIAMOND"); + coord,"Symbol","FILLED_DIAMOND"); DisplayElementFactory df = new DisplayElementFactory( target, descriptor ); ArrayList displayEls = df.createDisplayElements( pointSymbol , paintProps ); for (IDisplayable each : displayEls) { - each.draw(target); + each.draw(target, paintProps); each.dispose(); } } @@ -525,32 +536,49 @@ drawCountyOutline2(wcnData,target,symbolColor,symbolWidth,lineStyle,paintProps,1 if(wcnRscData.getWatchBoxUnionEnable()){ drawLabel = false; - double[] labelLatLon = { (wcnData.countyLon[0]+wcnData.countyLon[(wcnData.countyNumPoints)/2])/2, - (wcnData.countyLat[0]+wcnData.countyLat[(wcnData.countyNumPoints)/2])/2 }; + double allX = wcnData.countyLon[0]; + double allY = wcnData.countyLat[0]; + for (int i=1; i enabledText = new ArrayList(); + if(wcnRscData.getWatchBoxNumberEnable()){ - text[0]=" "+wcnData.watchNumber; + enabledText.add(wcnData.watchNumber); } + if(wcnRscData.getWatchBoxTimeEnable()){ DataTime startTime = new DataTime( wcnData.eventTime.getValidPeriod().getStart() ); DataTime endTime = new DataTime( wcnData.eventTime.getValidPeriod().getEnd() ); - text[1] = " "+startTime.toString().substring(11, 16) - + "-" + endTime.toString().substring(11, 16); + String temp = startTime.toString().substring(11, 13) + startTime.toString().substring(14,16) + + "-" + endTime.toString().substring(11, 13) + startTime.toString().substring(14,16); + enabledText.add(temp); } + + for (int i=enabledText.size(); i<2; i++) + enabledText.add(""); + + text = enabledText.toArray(text); + target.drawStrings(font, text, labelPix[0], labelPix[1], 0.0, TextStyle.NORMAL, new RGB[] {color, color}, HorizontalAlignment.LEFT, - VerticalAlignment.MIDDLE ); + VerticalAlignment.TOP ); } + drawCountyOutline2(wcnData,target,color,symbolWidth,lineStyle,paintProps,2); // drawCountyOutline(wcnData,target,color,symbolWidth,lineStyle,paintProps,2); } + else if(wcnRscData.getWatchBoxOutlineEnable() ){ drawCountyOutline2(wcnData,target,color,symbolWidth,lineStyle,paintProps,0);//T456 // drawCountyOutline(wcnData,target,color,symbolWidth,lineStyle,paintProps,0); @@ -665,6 +693,7 @@ drawCountyOutline2(wcnData,target,color,symbolWidth,lineStyle,paintProps,0);//T4 } + @SuppressWarnings("deprecation") public void drawTimeLabelWatchNumber(WcnRscDataObj wcnData,IGraphicsTarget target,RGB color){ try{ for(int i = 0; i < wcnData.countyNumPoints;i++) { @@ -673,23 +702,29 @@ drawCountyOutline2(wcnData,target,color,symbolWidth,lineStyle,paintProps,0);//T4 if( labelPix != null ){ String[] text = new String[3]; - text[0]=" "+wcnData.watchNumber; - text[1]=" "+wcnData.countyNames.get(i); - DataTime startTime = new DataTime( wcnData.eventTime.getValidPeriod().getStart() ); - DataTime endTime = new DataTime( wcnData.eventTime.getValidPeriod().getEnd() ); - text[2] = " "+startTime.toString().substring(11, 16) - + "-" + endTime.toString().substring(11, 16); + List enabledText = new ArrayList(); - if(!wcnRscData.getWatchBoxTimeEnable() ){ - text[2] = ""; + if(wcnRscData.getWatchBoxNumberEnable() ){ + enabledText.add(wcnData.watchNumber); } - if(!wcnRscData.getWatchBoxLabelEnable() ){ - text[1]=""; + + if(wcnRscData.getWatchBoxLabelEnable() ){ + enabledText.add(wcnData.countyNames.get(i)); } - if(!wcnRscData.getWatchBoxNumberEnable() ){ - text[0] = ""; + + if(wcnRscData.getWatchBoxTimeEnable() ){ + DataTime startTime = new DataTime( wcnData.eventTime.getValidPeriod().getStart() ); + DataTime endTime = new DataTime( wcnData.eventTime.getValidPeriod().getEnd() ); + String temp = startTime.toString().substring(11, 13) + startTime.toString().substring(14,16) + + "-" + endTime.toString().substring(11, 13) + startTime.toString().substring(14,16); + enabledText.add(temp); } + for (int j=enabledText.size(); j<3; j++) + enabledText.add(""); + + text = enabledText.toArray(text); + target.drawStrings(font, text, labelPix[0], labelPix[1], 0.0, TextStyle.NORMAL, new RGB[] {color, color, color}, @@ -798,14 +833,15 @@ drawCountyOutline2(wcnData,target,color,symbolWidth,lineStyle,paintProps,0);//T4 WKBReader wkbReader = new WKBReader(); for (Object[] result : results) { int k = 0; - byte[] wkb1=(byte[]) result[k]; MultiPolygon countyGeo = null; try{ countyGeo= (MultiPolygon)wkbReader.read(wkb1); - if ( countyGeo != null && countyGeo.isValid() && ( ! countyGeo.isEmpty())){ -gu.add((MultiPolygon)countyGeo.clone()); gw.add(countyGeo); + + if ( countyGeo != null && !countyGeo.isEmpty()){ + gu.add((MultiPolygon)countyGeo.clone()); + gw.add(countyGeo); } }catch (Exception e) { logger.info("__Error: "+e.getMessage()); } } @@ -886,7 +922,7 @@ gu.add((MultiPolygon)countyGeo.clone()); gw.add(countyGeo); if (shadedShape != null && shadedShape.isDrawable() && drawOutlineOrShadedshapeorUnion==1){ try{ - target.drawShadedShape(shadedShape, paintProps.getAlpha()); + target.drawShadedShape(shadedShape, 0.5f); }catch (VizException e) { logger.info("VizException in drawCountyOutline2() of WcnResource"); } } @@ -985,8 +1021,7 @@ gu.add((MultiPolygon)countyGeo.clone()); gw.add(countyGeo); com.raytheon.uf.viz.core.catalog.LayerProperty prop = new com.raytheon.uf.viz.core.catalog.LayerProperty(); prop.setDesiredProduct(com.raytheon.uf.viz.core.rsc.ResourceType.PLAN_VIEW); prop.setEntryQueryParameters(queryList, false); - prop.setNumberOfImages(15000); // TODO: max # records ?? should we cap - // this ? + prop.setNumberOfImages(15000); // TODO: max # records ?? should we cap this? String script = null; script = com.raytheon.uf.viz.core.catalog.ScriptCreator.createScript(prop); diff --git a/ncep/gov.noaa.nws.ncep.viz.rsc.wou/src/gov/noaa/nws/ncep/viz/rsc/wou/rsc/WouResource.java b/ncep/gov.noaa.nws.ncep.viz.rsc.wou/src/gov/noaa/nws/ncep/viz/rsc/wou/rsc/WouResource.java index ab96966cc0..919c538fd9 100644 --- a/ncep/gov.noaa.nws.ncep.viz.rsc.wou/src/gov/noaa/nws/ncep/viz/rsc/wou/rsc/WouResource.java +++ b/ncep/gov.noaa.nws.ncep.viz.rsc.wou/src/gov/noaa/nws/ncep/viz/rsc/wou/rsc/WouResource.java @@ -42,6 +42,7 @@ import com.vividsolutions.jts.geom.Geometry; import com.vividsolutions.jts.geom.GeometryCollection; import com.vividsolutions.jts.geom.GeometryFactory; import com.vividsolutions.jts.geom.Point; +import com.vividsolutions.jts.geom.Polygon; import com.vividsolutions.jts.io.ParseException; import com.vividsolutions.jts.io.WKBReader; @@ -75,6 +76,10 @@ import gov.noaa.nws.ncep.common.dataplugin.aww.AwwVtec; * 09/28/11 Xilin Guo Made changes to create IWireframeShape for watch number * 12/27/11 Xilin Guo Checked available watch data * 05/23/2012 785 Q. Zhou Added getName for legend. + * 08/17/12 655 B. Hebbard Added paintProps as parameter to IDisplayable draw + * 09/05/12 857 Q. Zhou Displayed watch number. Modified time string and alignment in drawTimeLabelWatchNumber(). + * Added label/time for union. Fixed a bug for querying county. Modified fill alpha to 0.5. + * 09/13/12 857 Q. Zhou Remove constraint & metamap in initResource(). * * * @author ujosyula @@ -89,6 +94,9 @@ implements INatlCntrsResource, IStationField { private WouResourceData wouRscData; private List modifyList ; + //Area change flag + private boolean areaChangeFlag = false; + private class WouRscDataObj implements IRscDataObject { String datauri; //used as a key string DataTime issueTime; // issue time from bulletin @@ -158,6 +166,27 @@ implements INatlCntrsResource, IStationField { int symbolSize; } + /** + * called in the constructor. + */ + private void addRDChangedListener(){ + com.raytheon.viz.ui.editor.AbstractEditor editor = gov.noaa.nws.ncep.viz.ui.display.NmapUiUtils.getActiveNatlCntrsEditor(); + editor.addRenderableDisplayChangedListener(this.new WouDCListener()); + } + + /** + * change the flag so outlineShape can be re-calculated + */ + private class WouDCListener implements com.raytheon.uf.viz.core.IRenderableDisplayChangedListener{ + + @Override + public void renderableDisplayChanged(com.raytheon.uf.viz.core.IDisplayPane pane, + com.raytheon.uf.viz.core.drawables.IRenderableDisplay newRenderableDisplay, DisplayChangeType type) { + + areaChangeFlag = true; + } + } + protected class FrameData extends AbstractFrameData { HashMap wouFrameData; @@ -271,6 +300,7 @@ implements INatlCntrsResource, IStationField { LoadProperties loadProperties ) throws VizException { super(rscData, loadProperties); wouRscData = (WouResourceData) resourceData; + addRDChangedListener(); modifyList = new ArrayList(); } @@ -312,10 +342,10 @@ implements INatlCntrsResource, IStationField { wouStatusData.issueTime =new DataTime(awwRecord.getIssueTime()); wouStatusData.reportType=awwRecord.getReportType(); wouStatusData.datauri=awwRecord.getDataURI(); - wouStatusData.watchNumber=awwRecord.getWatchNumber(); + String ugcline = awwugcs.getUgc();//get the ugc line to find the counties if(ugcline!=null && ugcline!=""){ - + wouStatusData.watchNumber = awwugcs.getEventTrackingNumber(); wouStatusData.countyUgc = new ArrayList(); int i=0; String temp; @@ -354,6 +384,7 @@ implements INatlCntrsResource, IStationField { wouStatusData.evPhenomena =awwVtech.getPhenomena(); wouStatusData.evProductClass =awwVtech.getProductClass(); wouStatusData.evSignificance =awwVtech.getSignificance(); + if((awwVtech.getAction().equalsIgnoreCase("COR"))||(awwVtech.getAction().equalsIgnoreCase("CAN")) ||(awwVtech.getAction().equalsIgnoreCase("EXP"))){ modifyList.add(wouStatusData); @@ -461,15 +492,14 @@ implements INatlCntrsResource, IStationField { stationTable = new StationTable( NcPathManager.getInstance().getStaticFile( NcPathConstants.COUNTY_STN_TBL ).getAbsolutePath() ); - HashMap metadataMap =new HashMap(resourceData.getMetadataMap()); - metadataMap.put("issueOffice",new RequestConstraint("KWNS")); - metadataMap.put("wmoHeader",new RequestConstraint("WOUS64")); - String wou[]={"SEVERE_THUNDERSTORM_WATCH", "TORNADO_WATCH_OUTLINE_UPDATE"}; - RequestConstraint ids = new RequestConstraint(); - ids.setConstraintType(ConstraintType.IN); - ids.setConstraintValueList(wou); - metadataMap.put("reportType",ids); - resourceData.setMetadataMap(metadataMap); + +// HashMap metadataMap =new HashMap(resourceData.getMetadataMap()); +// String wou[]={"SEVERE_THUNDERSTORM_WATCH", "TORNADO_WATCH_OUTLINE_UPDATE"}; +// RequestConstraint ids = new RequestConstraint(); +// ids.setConstraintType(ConstraintType.IN); +// ids.setConstraintValueList(wou); +// metadataMap.put("reportType",ids); +// resourceData.setMetadataMap(metadataMap); queryRecords(); } @@ -509,6 +539,12 @@ implements INatlCntrsResource, IStationField { if( paintProps == null ) { return; } + + if( areaChangeFlag ){ //T456: dispose old outlineShape?/ + areaChangeFlag = false; + postProcessFrameUpdate(); + } + FrameData currFrameData = (FrameData) frameData; RGB color = new RGB (155, 155, 155); @@ -659,10 +695,10 @@ implements INatlCntrsResource, IStationField { if ( wouRscData.getWatchBoxFillEnable() ) { if (wouRscData.thunderstormEnable) { - drawSevereThunderstormWatch (currFrameData, target,paintProps, 2); + drawSevereThunderstormWatch (currFrameData, target,paintProps, 3); } if (wouRscData.tornadoEnable) { - drawTornadoWatch (currFrameData, target,paintProps, color, symbolWidth, 2); + drawTornadoWatch (currFrameData, target,paintProps, color, symbolWidth, 3); } } if ( wouRscData.getWatchBoxUnionEnable() ) { @@ -713,7 +749,7 @@ implements INatlCntrsResource, IStationField { DisplayElementFactory df = new DisplayElementFactory( target, descriptor ); ArrayList displayEls = df.createDisplayElements( pointSymbol , paintProps ); for (IDisplayable each : displayEls) { - each.draw(target); + each.draw(target, paintProps); each.dispose(); } } @@ -745,25 +781,31 @@ implements INatlCntrsResource, IStationField { String geoConstraint = String.format("the_geom_0_001 && ST_SetSrid('BOX3D(%f %f, %f %f)'::box3d,4326)", env.getMinX(), env.getMinY(), env.getMaxX(), env.getMaxY()); + StringBuilder query = new StringBuilder( "select countyname, state, AsBinary(the_geom), AsBinary(the_geom_0_001) from mapdata.county where ("); int i = 0; for ( WouCntyRscData wData : wouCntyDataValues) { if ( ! isDisplay( wData) || wData.g.size() > 0 ) continue; + if ( i != 0 ) { query.append(" OR "); } + query.append("(countyname LIKE '%"); - query.append(wData.countyName.replace("_", " ")); + query.append(wData.countyName.replace("_", " ").replace("'", "\\'")); //Queen_Anne's query.append("%' AND state ='"); query.append(wData.stateName); query.append("')"); i ++; + } + if ( i == 0 ) return; query.append(") AND "); query.append(geoConstraint); query.append(";"); + //System.out.println("query "+query); List results = DirectDbQuery.executeQuery (query.toString(), "maps", QueryLanguage.SQL); WKBReader wkbReader = new WKBReader(); @@ -882,34 +924,34 @@ implements INatlCntrsResource, IStationField { if( labelPix != null ){ String[] text = new String[3]; - text[0]=" "+wData.watchNumber; - text[1]=" "+wData.countyName; - DataTime startTime = new DataTime( wData.eventTime.getValidPeriod().getStart() ); - DataTime endTime = new DataTime( wData.eventTime.getValidPeriod().getEnd() ); - text[2] =" " + startTime.toString().substring(11, 16) + "-" - + endTime.toString().substring(11, 16); + List enabledText = new ArrayList(); - - if(!wouRscData.getWatchBoxTimeEnable() ){ - //text[2] = null; - text[2] = ""; + if(wouRscData.getWatchBoxNumberEnable() ){ + enabledText.add(wData.watchNumber); } - if(!wouRscData.getWatchBoxLabelEnable() ){ - //text[1]=null; - text[1]=""; + if(wouRscData.getWatchBoxLabelEnable() ){ + enabledText.add(wData.countyName); } - if(!wouRscData.getWatchBoxNumberEnable() ){ - //text[0] = null; - text[0] = ""; + if(wouRscData.getWatchBoxTimeEnable() ){ + DataTime startTime = new DataTime( wData.eventTime.getValidPeriod().getStart() ); + DataTime endTime = new DataTime( wData.eventTime.getValidPeriod().getEnd() ); + String temp = startTime.toString().substring(11, 13) + startTime.toString().substring(14,16) + + "-" + endTime.toString().substring(11, 13) + startTime.toString().substring(14,16); + enabledText.add(temp); } + for (int i=enabledText.size(); i<3; i++) + enabledText.add(""); + + text = enabledText.toArray(text); + target.drawStrings(font, text, labelPix[0], labelPix[1], 0.0, TextStyle.NORMAL, new RGB[] {wouData.color, wouData.color, wouData.color}, HorizontalAlignment.LEFT, - VerticalAlignment.MIDDLE ); + VerticalAlignment.TOP ); } } } @@ -934,6 +976,12 @@ implements INatlCntrsResource, IStationField { target.drawWireframeShape(wouData.outlineShape, wouData.color, wouData.symbolWidth,lineStyle); } } + else if ( drawtype == 3) { + if ( wouData.outlineShape != null && wouData.outlineShape.isDrawable() ) { + float alpha = (float) 0.5; + target.drawShadedShape(wouData.shadedShape, alpha); + } + } else { if ( wouData.shadedShape != null && wouData.shadedShape.isDrawable()){ float alpha = paintProps.getAlpha(); @@ -944,16 +992,95 @@ implements INatlCntrsResource, IStationField { } } + @SuppressWarnings("deprecation") private void drawSevereThunderstormWatchUnion (FrameData currFrameData, IGraphicsTarget target ) throws VizException{ LineStyle lineStyle = LineStyle.SOLID; Collection wouCntyDataValues = currFrameData.wouFrameData.values(); if ( wouCntyDataValues.size() <= 0 ) { return; } + for( WouData wouData : wouCntyDataValues ) { if ((wouData.reportType).equalsIgnoreCase("SEVERE_THUNDERSTORM_WATCH") ) { + Collection wouDataValues = wouData.data.values(); + if ( wouDataValues.size() <= 0 ) + continue; if ( wouData.unionShape != null && wouData.unionShape.isDrawable()) { + + List xyCloseList = new ArrayList(); + List timeList = new ArrayList(); + String[] label = new String[2]; + DataTime startTime = null; + DataTime endTime = null; + String time = ""; + String temp = ""; + + for ( WouCntyRscData wData : wouDataValues) { + if ( ! isDisplay( wData) ) + continue; + xyCloseList.add( new Coordinate( wData.countyLon, wData.countyLat)); + + startTime = new DataTime( wData.eventTime.getValidPeriod().getStart() ); + endTime = new DataTime( wData.eventTime.getValidPeriod().getEnd() ); + temp = startTime.toString().substring(11, 13) + startTime.toString().substring(14,16) + + "-" + endTime.toString().substring(11, 13) + startTime.toString().substring(14,16); + + if (time.equalsIgnoreCase("") || !time.equalsIgnoreCase(temp)) { + timeList.add(temp); + time = temp; + } + } + + if ( !xyCloseList.get(0).equals(xyCloseList.get(xyCloseList.size()-1)) ) + xyCloseList.add(xyCloseList.size(), xyCloseList.get(0)); + +// double[] coorArray = new double[xyCloseList.size()]; +// wouData.unionShape.addLabel(wouData.key, coorArray); + + GeometryFactory gf = new GeometryFactory(); + Coordinate[] coorArray = new Coordinate[xyCloseList.size()]; + for(int i=0; i wouDataValues = wouData.data.values(); + if ( wouDataValues.size() <= 0 ) + continue; if ( wouData.unionShape != null && wouData.unionShape.isDrawable()) { + + List xyCloseList = new ArrayList(); + List timeList = new ArrayList(); + String[] label = new String[2]; + DataTime startTime = null; + DataTime endTime = null; + String time = ""; + String temp = ""; + + for ( WouCntyRscData wData : wouDataValues) { + if ( ! isDisplay( wData) ) + continue; + xyCloseList.add( new Coordinate( wData.countyLon, wData.countyLat)); + + startTime = new DataTime( wData.eventTime.getValidPeriod().getStart() ); + endTime = new DataTime( wData.eventTime.getValidPeriod().getEnd() ); + temp = startTime.toString().substring(11, 13) + startTime.toString().substring(14,16) + + "-" + endTime.toString().substring(11, 13) + startTime.toString().substring(14,16); + + if (time.equalsIgnoreCase("") || !time.equalsIgnoreCase(temp)) { + timeList.add(temp); + time = temp; + } + } + + if ( !xyCloseList.get(0).equals(xyCloseList.get(xyCloseList.size()-1)) ) + xyCloseList.add(xyCloseList.size(), xyCloseList.get(0)); + +// double[] coorArray = new double[xyCloseList.size()]; +// wouData.unionShape.addLabel(wouData.key, coorArray); + + GeometryFactory gf = new GeometryFactory(); + Coordinate[] coorArray = new Coordinate[xyCloseList.size()]; + for(int i=0; i * * @author archana @@ -244,8 +245,8 @@ LatLonPoint thisPoint = wqr.getLatLonPoint(eachFipsInfo.getFipsCode());//eachFi .worldToPixel(worldC)); pixCoord.addToY(offsetY*1.75); target.drawString(font, eachWstmRscDataObject.validTimePeriod, pixCoord.getX(), pixCoord.getY(), 0.0, - TextStyle.NORMAL, wstmRscAttr.getColorOfEvent(),HorizontalAlignment.CENTER, - VerticalAlignment.MIDDLE, 0.0); + TextStyle.NORMAL, wstmRscAttr.getColorOfEvent(),HorizontalAlignment.LEFT, + VerticalAlignment.TOP, 0.0); } } @@ -266,8 +267,8 @@ LatLonPoint thisPoint = wqr.getLatLonPoint(eachFipsInfo.getFipsCode());//eachFi } } target.drawString(font, wqr.getZoneName(eachFipsInfo.getFipsCode())/*eachFipsInfo.getZoneName()*/, pixCoord.getX(), pixCoord.getY(), 0.0, - TextStyle.NORMAL, wstmRscAttr.getColorOfEvent(),HorizontalAlignment.CENTER, - VerticalAlignment.MIDDLE, 0.0); + TextStyle.NORMAL, wstmRscAttr.getColorOfEvent(),HorizontalAlignment.LEFT, + VerticalAlignment.TOP, 0.0); } /*If the outline flag is enabled draw the outline else plot the marker at the centroid of the zone's area*/ @@ -291,7 +292,7 @@ drawOutlineForZone2(eachFipsInfo.getFipsCode()/*eachFipsInfo.fipsNumber*/, targe displayEls = df.createDisplayElements(symbol,paintProps); if (displayEls != null && !displayEls.isEmpty()) { for (IDisplayable each : displayEls) { - each.draw(target); + each.draw(target, paintProps); each.dispose(); } } diff --git a/ncep/gov.noaa.nws.ncep.viz.rsc.wtch/src/gov/noaa/nws/ncep/viz/rsc/wtch/rsc/WtchResource.java b/ncep/gov.noaa.nws.ncep.viz.rsc.wtch/src/gov/noaa/nws/ncep/viz/rsc/wtch/rsc/WtchResource.java index f0d68ff166..e985874393 100644 --- a/ncep/gov.noaa.nws.ncep.viz.rsc.wtch/src/gov/noaa/nws/ncep/viz/rsc/wtch/rsc/WtchResource.java +++ b/ncep/gov.noaa.nws.ncep.viz.rsc.wtch/src/gov/noaa/nws/ncep/viz/rsc/wtch/rsc/WtchResource.java @@ -51,6 +51,8 @@ import com.vividsolutions.jts.geom.Coordinate; * ------------ ---------- ----------- -------------------------- * Oct. 26, 2011 Michael Gao Initial creation. * 05/23/2012 785 Q. Zhou Added getName for legend. + * 08/30/12 853 Q. Zhou Displayed watch number. Modified time in getWatchLabelList(). + Fixed label colorCode not change problem. Fixed colorCode not change back problem. * * * @author mgao @@ -595,7 +597,7 @@ public class WtchResource extends AbstractNatlCntrsResource< WtchResourceData, List watchLabelStringList = getWatchLabelList(wtchRscDataObj, wtchResourceData); if(isThereALabelForDrawing(watchLabelStringList)) { drawLabel(wtchRscDataObj, watchLabelStringList, target, - paintProps, lineColor); + paintProps, watchLineColor); } } @@ -650,14 +652,15 @@ public class WtchResource extends AbstractNatlCntrsResource< WtchResourceData, watchLabelStringList.add(String.valueOf(watchNumber)); } } - /* * Now check and append the event start and end time */ if(wtchResourceData.getWatchBoxTimeEnable()) { DataTime watchEventDataTime = wtchRscDataObj.getDataTime(); String watchBoxTimeString = getTimeValueByDataTime(watchEventDataTime); - watchLabelStringList.add(watchBoxTimeString); + + String modifiedTime = watchBoxTimeString.substring(0,2) + watchBoxTimeString.substring(3,8) + watchBoxTimeString.substring(9,11); + watchLabelStringList.add(modifiedTime); //12:15-21:00 -> 1215-2100 } return watchLabelStringList; } @@ -735,8 +738,9 @@ public class WtchResource extends AbstractNatlCntrsResource< WtchResourceData, RGB defaultLineColor, int defaultLineWidth) { RGB lineColor = defaultLineColor; int lineWidth = defaultLineWidth; - int watchNumber = wtchRscDataObj.watchNumber; + + if(wtchResourceData.getColorCodeEnable()){ int lastDigitOfWatchNumber = watchNumber%10; switch(lastDigitOfWatchNumber) { case 0: @@ -800,6 +804,19 @@ public class WtchResource extends AbstractNatlCntrsResource< WtchResourceData, } break; } + } + + else { + if (wtchRscDataObj.reportType.equalsIgnoreCase("SEVERE_THUNDERSTORM_WATCH")){ + lineColor = wtchResourceData.thunderstormColor; + lineWidth = wtchResourceData.getThunderstormLineWidth(); + } + else if (wtchRscDataObj.reportType.equalsIgnoreCase("TORNADO_WATCH_OUTLINE_UPDATE")){ + lineColor = wtchResourceData.tornadoColor; + lineWidth = wtchResourceData.getTornadoLineWidth(); + } + } + LineColorAndWidth lineColorAndWidth = new LineColorAndWidth(lineColor, lineWidth); return lineColorAndWidth; } @@ -822,10 +839,10 @@ public class WtchResource extends AbstractNatlCntrsResource< WtchResourceData, double[] labelPix = descriptor.worldToPixel( labelLatLon ); try { graphicTarget.drawStrings(font, textArray, - labelPix[0], labelPix[1]+3*ratio, 0.0, TextStyle.NORMAL, + labelPix[0], labelPix[1]+4*ratio, 0.0, TextStyle.NORMAL, new RGB[] {labelColor, labelColor, labelColor}, HorizontalAlignment.LEFT, - VerticalAlignment.MIDDLE ); + VerticalAlignment.TOP ); } catch(VizException vize){ logger.error("VizException is thrown when trying to drawLabel for WATCH, error=" + vize.getMessage()); } diff --git a/ncep/gov.noaa.nws.ncep.viz.tools/META-INF/MANIFEST.MF b/ncep/gov.noaa.nws.ncep.viz.tools/META-INF/MANIFEST.MF index 2069599767..b388631a92 100644 --- a/ncep/gov.noaa.nws.ncep.viz.tools/META-INF/MANIFEST.MF +++ b/ncep/gov.noaa.nws.ncep.viz.tools/META-INF/MANIFEST.MF @@ -4,6 +4,8 @@ Bundle-Name: Option Plug-in Bundle-SymbolicName: gov.noaa.nws.ncep.viz.tools;singleton:=true Bundle-Version: 1.0.0.qualifier Bundle-Activator: gov.noaa.nws.ncep.viz.tools.Activator +Eclipse-BuddyPolicy: registered, ext, global +Eclipse-RegisterBuddy: org.apache.log4j, com.raytheon.viz.core, com.raytheon.uf.common.serialization Require-Bundle: org.eclipse.ui, org.eclipse.core.runtime, org.geotools;bundle-version="2.5.2", @@ -13,6 +15,7 @@ Require-Bundle: org.eclipse.ui, javax.measure;bundle-version="1.0.0", com.sun.jna;bundle-version="3.0.9", com.raytheon.viz.alerts, + org.eclipse.core.runtime, com.raytheon.uf.common.colormap;bundle-version="1.11.22", com.raytheon.uf.viz.core.maps;bundle-version="1.12.1174", com.raytheon.viz.core;bundle-version="1.10.13", @@ -27,20 +30,23 @@ Require-Bundle: org.eclipse.ui, gov.noaa.nws.ncep.gempak.parameters;bundle-version="1.0.0", gov.noaa.nws.ncep.common;bundle-version="1.0.0", gov.noaa.nws.ncep.gempak.parameters.core;bundle-version="1.0.0", - gov.noaa.nws.ncep.viz.customprojection;bundle-version="1.0.0" + gov.noaa.nws.ncep.viz.customprojection;bundle-version="1.0.0", + gov.noaa.nws.ncep.viz.gempak.nativelib;bundle-version="1.0.0" Bundle-ActivationPolicy: lazy Bundle-RequiredExecutionEnvironment: JavaSE-1.6 Export-Package: gov.noaa.nws.ncep.viz.tools, + gov.noaa.nws.ncep.viz.tools.aodt, gov.noaa.nws.ncep.viz.tools.colorMapEditor, gov.noaa.nws.ncep.viz.tools.contour, gov.noaa.nws.ncep.viz.tools.contourinterval, gov.noaa.nws.ncep.viz.tools.cursor, gov.noaa.nws.ncep.viz.tools.frame, gov.noaa.nws.ncep.viz.tools.imageProperties, + gov.noaa.nws.ncep.viz.tools.logos, gov.noaa.nws.ncep.viz.tools.loopManagement, gov.noaa.nws.ncep.viz.tools.ncInventoryControl, + gov.noaa.nws.ncep.viz.tools.panZoom, gov.noaa.nws.ncep.viz.tools.predefinedArea -Eclipse-RegisterBuddy: org.apache.log4j Bundle-ClassPath: . Import-Package: gov.noaa.nws.ncep.common.log.logger, gov.noaa.nws.ncep.edex.common.ncinventory, diff --git a/ncep/gov.noaa.nws.ncep.viz.tools/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject b/ncep/gov.noaa.nws.ncep.viz.tools/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject new file mode 100644 index 0000000000..d920f6e973 --- /dev/null +++ b/ncep/gov.noaa.nws.ncep.viz.tools/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject @@ -0,0 +1,3 @@ +gov.noaa.nws.ncep.viz.tools.aodt.AODTResourceData +gov.noaa.nws.ncep.viz.tools.logos.LogosResourceData +gov.noaa.nws.ncep.viz.tools.panZoom.NcZoomToolResourceData \ No newline at end of file diff --git a/ncep/gov.noaa.nws.ncep.viz.tools/plugin.xml b/ncep/gov.noaa.nws.ncep.viz.tools/plugin.xml index cc1e66479b..7fdc84c8a2 100644 --- a/ncep/gov.noaa.nws.ncep.viz.tools/plugin.xml +++ b/ncep/gov.noaa.nws.ncep.viz.tools/plugin.xml @@ -196,10 +196,26 @@ + + + + + + + + + + + + - - @@ -390,16 +400,10 @@ - - @@ -500,6 +504,16 @@ sequence="ALT+I"> + + + + + + * * @author @@ -314,6 +316,9 @@ public class AODTDialog extends Dialog { // Update center location // Calculate temperatures for a tileset of 105 by 105 pixels + // Retrieve raw data from centerLat and centerLon + centerLat = Float.valueOf(lat_txt.getText().trim()).floatValue(); + centerLon = Float.valueOf(lon_txt.getText().trim()).floatValue(); double[] p1 = mapEditor.getDescriptor().worldToPixel(new double[] { centerLon, centerLat }); int rad = NUMX / 2; for (int i = -rad; i <= rad; i++ ) { @@ -377,7 +382,11 @@ public class AODTDialog extends Dialog { } else { output = odt.getOuput(); } - if(output != null)AODTResult.setText(output); + if(output != null){ + font = new Font(AODTResult.getShell().getDisplay(), "Monospace", 10, SWT.NORMAL); + AODTResult.setFont(font); + AODTResult.setText(output); + } if (verifyHistoryFile()) { setHistoryFileCombo(); diff --git a/ncep/gov.noaa.nws.ncep.viz.tools/src/gov/noaa/nws/ncep/viz/tools/hideLoop/HideLoopAction.java b/ncep/gov.noaa.nws.ncep.viz.tools/src/gov/noaa/nws/ncep/viz/tools/hideLoop/HideLoopAction.java index 6df7e1aecd..41dd357205 100644 --- a/ncep/gov.noaa.nws.ncep.viz.tools/src/gov/noaa/nws/ncep/viz/tools/hideLoop/HideLoopAction.java +++ b/ncep/gov.noaa.nws.ncep.viz.tools/src/gov/noaa/nws/ncep/viz/tools/hideLoop/HideLoopAction.java @@ -1,5 +1,7 @@ package gov.noaa.nws.ncep.viz.tools.hideLoop; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; import java.util.*; import org.eclipse.core.commands.ExecutionEvent; @@ -30,7 +32,9 @@ import com.raytheon.uf.viz.core.rsc.ResourceList; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * 09/10 #314 Q. Zhou Initial Creation. - * + * 09-Aug-2012 #839 Archana Updated to toggle the + * colorbar when its corresponding resource + * is toggled on/off. * * * @author Q. Zhou @@ -65,24 +69,61 @@ public class HideLoopAction extends AbstractHandler implements IElementUpdater NCMapDescriptor idtor = (NCMapDescriptor)editor.getDescriptor(); - if( idtor != null) { - ResourceList rscList = idtor.getResourceList(); +// if( idtor != null) { +// ResourceList rscList = idtor.getResourceList(); +// +// for( ResourcePair rp : rscList ) { +// +// if( rp != null && isRemovable( rp.getResource() ) ){ +// if (editor.getHideShow() == true) { +// +// rp.getProperties().setVisible(false); +// } +// else { +// +// rp.getProperties().setVisible(true); +// } +// } +// } +// } - for( ResourcePair rp : rscList ) { + ResourceList theMainList = editor.getActiveDisplayPane().getDescriptor().getResourceList(); - if( rp != null && isRemovable( rp.getResource() ) ){ - if (editor.getHideShow() == true) { + List subListOfResourcesToToggle = new ArrayList(0); + List listOfCorrespondingColorBarResources = new ArrayList(0); - rp.getProperties().setVisible(false); - } - else { - rp.getProperties().setVisible(true); + /* + * Create 2 sublists.One for the colorbar resources and one for the + * requestable resources (non-system and non-map layer resources) + * Set the visibility for all the resources in both lists to false. + */ + + for ( ResourcePair resPair : theMainList){ + + if ( resPair != null && ( ! resPair.getProperties().isSystemResource()) + && !resPair.getProperties().isMapLayer()){ + if(editor.getHideShow()){ + subListOfResourcesToToggle.add(resPair); + resPair.getProperties().setVisible(false); + }else{ + resPair.getProperties().setVisible(true); + } } + else if(resPair.getResource().getClass().getSimpleName().compareTo("ColorBarResource") == 0){ + if(editor.getHideShow()){ + //listOfCorrespondingColorBarResources.add(resPair); + resPair.getProperties().setVisible(false); + }else{ + resPair.getProperties().setVisible(true); } } } + if(subListOfResourcesToToggle.isEmpty()) + return null; + + editor.refresh(); diff --git a/ncep/gov.noaa.nws.ncep.viz.tools/src/gov/noaa/nws/ncep/viz/tools/imageProperties/FadeDisplay.java b/ncep/gov.noaa.nws.ncep.viz.tools/src/gov/noaa/nws/ncep/viz/tools/imageProperties/FadeDisplay.java index 98f01bfd07..c155a70aee 100644 --- a/ncep/gov.noaa.nws.ncep.viz.tools/src/gov/noaa/nws/ncep/viz/tools/imageProperties/FadeDisplay.java +++ b/ncep/gov.noaa.nws.ncep.viz.tools/src/gov/noaa/nws/ncep/viz/tools/imageProperties/FadeDisplay.java @@ -2,7 +2,7 @@ package gov.noaa.nws.ncep.viz.tools.imageProperties; import gov.noaa.nws.ncep.viz.resources.AbstractNatlCntrsResource; import gov.noaa.nws.ncep.viz.ui.display.NCMapEditor; -import gov.noaa.nws.ncep.viz.ui.display.NCPaneManager; +import gov.noaa.nws.ncep.viz.ui.display.NmapUiUtils; import java.util.ArrayList; @@ -23,17 +23,14 @@ import org.eclipse.swt.widgets.Event; import org.eclipse.swt.widgets.Scale; import com.raytheon.uf.viz.core.IDisplayPane; -import com.raytheon.uf.viz.core.IDisplayPaneContainer; -import com.raytheon.uf.viz.core.IVizEditorChangedListener; import com.raytheon.uf.viz.core.drawables.ResourcePair; import com.raytheon.uf.viz.core.rsc.ResourceList; import com.raytheon.uf.viz.core.rsc.capabilities.ImagingCapability; -import com.raytheon.viz.ui.VizWorkbenchManager; -import com.raytheon.viz.ui.editor.ISelectedPanesChangedListener; /** * - * Contribution item added to the status bar which displays the image fading information. + * Contribution item added to the status bar which displays the image fading + * information. * *
  * 
@@ -46,37 +43,36 @@ import com.raytheon.viz.ui.editor.ISelectedPanesChangedListener;
  * 10/04/2010   289        Archana    Added FadeHotKeyListener
  * 03/07/2011   R1G2-9     G. Hull    implement IVizEditorChangedListener, 
  *                                    editor no longer passed from Pane Changed Listener
+ * 06/19/2012   #569       G. Hull    rm IVizEditorChangedListener. update() gets called
+ *                                    from refreshGUIElements which is called from perspective's
+ *                                    IVizEditorChangedListener
+ * 06/21/2012   #632       G. Hull    Change behaviour for multiple images. Activate if all the 
+ *                                    brightness's are the same.
+ * 07/12/2012   ####       G. Hull    rm paneChangeListener. A pane change will now call refreshGUIElements
  *                       
  * 
* * @author Q. Zhou * @version 1 */ -public class FadeDisplay extends ContributionItem implements IVizEditorChangedListener { +public class FadeDisplay extends ContributionItem { private FadeHotKeyListener fadeKeyListener = null; + private Composite comp; + private Scale scale; // = null; + private Button btn0;// = null; + private Button btn50;// = null; + private Font font = new Font(Display.getCurrent(), "Monospace", 10, SWT.NORMAL); - private ArrayList> imageResources=null; - private NCMapEditor activeDisp = null; - private ISelectedPanesChangedListener paneListener = new ISelectedPanesChangedListener() { + private ArrayList> imageResources = null; - @Override - public void selectedPanesChanged(String id, IDisplayPane[] seldPanes) { - if (!id.equals(NCPaneManager.NC_PANE_SELECT_ACTION)) { - return; - } else if (seldPanes == null || seldPanes.length <= 0) { - return; - } - - updateFadeDisplay(); - } - }; + private NCMapEditor activeDisp = null; /** * Constructor @@ -94,7 +90,8 @@ public class FadeDisplay extends ContributionItem implements IVizEditorChangedLi */ @Override public void fill(Composite parent) { - //Shell fadeShell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(); + // Shell fadeShell = + // PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(); comp = new Composite(parent, SWT.NONE); comp.setSize(200, 55); @@ -115,7 +112,6 @@ public class FadeDisplay extends ContributionItem implements IVizEditorChangedLi btn50 = new Button(comp, SWT.PUSH); scale = new Scale(comp, SWT.NONE); - btn0.setLayoutData(new GridData(25, 25)); btn0.setText("0"); btn0.setFont(font); @@ -123,24 +119,27 @@ public class FadeDisplay extends ContributionItem implements IVizEditorChangedLi btn0.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { for( AbstractNatlCntrsResource rsc : imageResources ) { - ImagingCapability imgCap = rsc.getCapability(ImagingCapability.class); + ImagingCapability imgCap = rsc + .getCapability(ImagingCapability.class); imgCap.setBrightness(0); } + scale.setEnabled(true); scale.setSelection(0); activeDisp.refresh(); } }); - btn50.setLayoutData(new GridData(25, 25)); btn50.setText("N"); btn50.setFont(font); btn50.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { for( AbstractNatlCntrsResource rsc : imageResources ) { - ImagingCapability imgCap = rsc.getCapability(ImagingCapability.class); + ImagingCapability imgCap = rsc + .getCapability(ImagingCapability.class); imgCap.setBrightness(100 / 100.0f); } + scale.setEnabled(true); scale.setSelection(100); activeDisp.refresh(); } @@ -156,8 +155,11 @@ public class FadeDisplay extends ContributionItem implements IVizEditorChangedLi scale.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { - if (imageResources != null && imageResources.size() > 0) { - ImagingCapability imgCap = imageResources.get(0) + if (imageResources == null) { + return; + } + for (AbstractNatlCntrsResource imgRsc : imageResources) { + ImagingCapability imgCap = imgRsc .getCapability(ImagingCapability.class); imgCap.setBrightness(scale.getSelection() / 100.0f); } @@ -169,36 +171,9 @@ public class FadeDisplay extends ContributionItem implements IVizEditorChangedLi btn50.setEnabled( false ); scale.setSelection( 0 ); - // add an EditorChangedListener - VizWorkbenchManager.getInstance().addListener(this); - update(); } - public void editorChanged(IDisplayPaneContainer container) { - - if( activeDisp != null ) { - activeDisp.removeSelectedPaneChangedListener( paneListener ); - } - - if( container instanceof NCMapEditor ) { - activeDisp = (NCMapEditor)container; - activeDisp.addSelectedPaneChangedListener( paneListener ); - - scale.setEnabled( false ); - btn0.setEnabled( false ); - btn50.setEnabled( false ); - } - else { - activeDisp = null; - scale.setEnabled( false ); - btn0.setEnabled( false ); - btn50.setEnabled( false ); - } - - updateFadeDisplay(); - } - /** * The display or selected pane has changed so get the new imageResources * and update the widgets with @@ -206,18 +181,17 @@ public class FadeDisplay extends ContributionItem implements IVizEditorChangedLi * @return */ private void updateFadeDisplay() { // -// NCMapEditor ed = NmapUiUtils.getActiveNatlCntrsEditor(); - // if the editor has changed then add a pane listener on this editor and remove - // the old one. - // if( ed != activeDisp ) { - -// if( activeDisp != null ) { -// activeDisp.removeSelectedPaneChangedListener( paneListener ); -// } -// // activeDisp = ed; -// activeDisp.addSelectedPaneChangedListener( paneListener ); -// } + scale.setEnabled(false); + btn0.setEnabled(false); + btn50.setEnabled(false); + + NCMapEditor ed = NmapUiUtils.getActiveNatlCntrsEditor(); + + if (ed instanceof NCMapEditor) { + activeDisp = ed; + } + if( activeDisp == null ) { return; } @@ -230,26 +204,53 @@ public class FadeDisplay extends ContributionItem implements IVizEditorChangedLi ResourceList rscList = pane.getDescriptor().getResourceList(); for( ResourcePair rp : rscList ) { - if( !rp.getProperties().isSystemResource() && - rp.getResource().getCapabilities().hasCapability( ImagingCapability.class )) { - imageResources.add( (AbstractNatlCntrsResource)rp.getResource() ); + if (!rp.getProperties().isSystemResource() + && rp.getResource().getCapabilities() + .hasCapability(ImagingCapability.class)) { + imageResources.add((AbstractNatlCntrsResource) rp + .getResource()); + } + } + } + + int brightness = -1; + + // the buttons will work with multiple resources but + // the scale will only work with more than one resource if all the + // brightness + // values are the same. + if (!imageResources.isEmpty()) { + brightness = (int) (imageResources.get(0) + .getCapability(ImagingCapability.class).getBrightness() * 100f); + + // TODO : It is possible that a rsc has no image and so there may + // not be a conflict. Or there may + // not be an image for the first frame (how does the brightness get + // set then?) + // + for (AbstractNatlCntrsResource imgRsc : imageResources) { + ImagingCapability imgCap = imgRsc + .getCapability(ImagingCapability.class); + if (brightness != (int) (imgCap.getBrightness() * 100f)) { + brightness = -1; + scale.setToolTipText("Fade disabled due to multiple images with different brightnesses."); + break; } } + } else { + scale.setToolTipText(""); } - // the scale will only work with one resource but the buttons will - // work with multiple resources. - scale.setEnabled( (imageResources.size() == 1) ); + scale.setEnabled(brightness != -1); btn0.setEnabled( (imageResources.size() >= 1) ); btn50.setEnabled( (imageResources.size() >= 1) ); - // load the widget with the current value from the image resource or 0 if disabled + // load the widget with the current value from the image resource or 0 + // if disabled if( scale.isEnabled() ) { - ImagingCapability imgCap = imageResources.get(0).getCapability(ImagingCapability.class); - scale.setSelection( (int) (imgCap.getBrightness() * 100.0f) ); - } - else { + scale.setSelection(brightness); + } else { scale.setSelection( 0 ); } } @@ -260,21 +261,14 @@ public class FadeDisplay extends ContributionItem implements IVizEditorChangedLi updateFadeDisplay(); } - - @Override public void dispose() { super.dispose(); - // add an EditorChangedListener - VizWorkbenchManager.getInstance().removeListener(this); } - - private class FadeHotKeyListener extends KeyAdapter{ @Override public void keyPressed(KeyEvent e) { - //no-op } @Override diff --git a/ncep/gov.noaa.nws.ncep.viz.tools/src/gov/noaa/nws/ncep/viz/tools/logos/LogosResourceData.java b/ncep/gov.noaa.nws.ncep.viz.tools/src/gov/noaa/nws/ncep/viz/tools/logos/LogosResourceData.java index e4aafc28d4..319821952d 100644 --- a/ncep/gov.noaa.nws.ncep.viz.tools/src/gov/noaa/nws/ncep/viz/tools/logos/LogosResourceData.java +++ b/ncep/gov.noaa.nws.ncep.viz.tools/src/gov/noaa/nws/ncep/viz/tools/logos/LogosResourceData.java @@ -18,7 +18,7 @@ public class LogosResourceData extends AbstractResourceData { * */ public LogosResourceData() { - // TODO Auto-generated constructor stub + super(); } /* (non-Javadoc) diff --git a/ncep/gov.noaa.nws.ncep.viz.tools/src/gov/noaa/nws/ncep/viz/tools/newEditors/NewDisplayAction.java b/ncep/gov.noaa.nws.ncep.viz.tools/src/gov/noaa/nws/ncep/viz/tools/newEditors/NewDisplayAction.java index 2c6d96ada1..bca893d6fa 100644 --- a/ncep/gov.noaa.nws.ncep.viz.tools/src/gov/noaa/nws/ncep/viz/tools/newEditors/NewDisplayAction.java +++ b/ncep/gov.noaa.nws.ncep.viz.tools/src/gov/noaa/nws/ncep/viz/tools/newEditors/NewDisplayAction.java @@ -28,6 +28,8 @@ import com.raytheon.uf.viz.core.VizApp; * 08/12/11 #450 Greg Hull use the RBD name instead of the filename. * 02/15/2012 #627 Archana Updated the call to addRbd() to accept * a NCMapEditor object as one of the arguments + * 08/16/2012 #655 B. Hebbard (TTR 382) Run rbdLoader sync instead of async, + * to ensure descriptor has valid xforms before paint * * * @author ghull @@ -87,7 +89,9 @@ public class NewDisplayAction extends AbstractHandler { ResourceBndlLoader rbdLoader = new ResourceBndlLoader( "Loading RBD: "+rbd.getRbdName() ); rbdLoader.addRBD( rbd, editor ); - VizApp.runAsync( rbdLoader ); + //TODO -- is there a way we still run async, w/o reintroducing TTR 382? + // VizApp.runAsync( rbdLoader ); + VizApp.runSync( rbdLoader ); } catch ( Exception ve ) { System.out.println("Could not load rbd: " + ve.getMessage()); diff --git a/ncep/gov.noaa.nws.ncep.viz.tools/src/gov/noaa/nws/ncep/viz/tools/panZoom/SuspendZoomHandler.java b/ncep/gov.noaa.nws.ncep.viz.tools/src/gov/noaa/nws/ncep/viz/tools/panZoom/SuspendZoomHandler.java new file mode 100644 index 0000000000..e673ac8dbd --- /dev/null +++ b/ncep/gov.noaa.nws.ncep.viz.tools/src/gov/noaa/nws/ncep/viz/tools/panZoom/SuspendZoomHandler.java @@ -0,0 +1,15 @@ +package gov.noaa.nws.ncep.viz.tools.panZoom; + +import org.eclipse.swt.widgets.Event; + +import com.raytheon.viz.ui.input.InputAdapter; + +public class SuspendZoomHandler extends InputAdapter { + + @Override + public boolean handleMouseWheel(Event event, int x, int y) { + // TODO Auto-generated method stub + return true; + } + +} diff --git a/ncep/gov.noaa.nws.ncep.viz.tools/src/gov/noaa/nws/ncep/viz/tools/panZoom/ZoomManager.java b/ncep/gov.noaa.nws.ncep.viz.tools/src/gov/noaa/nws/ncep/viz/tools/panZoom/ZoomManager.java new file mode 100644 index 0000000000..ada7b30a89 --- /dev/null +++ b/ncep/gov.noaa.nws.ncep.viz.tools/src/gov/noaa/nws/ncep/viz/tools/panZoom/ZoomManager.java @@ -0,0 +1,54 @@ +package gov.noaa.nws.ncep.viz.tools.panZoom; + +import gov.noaa.nws.ncep.viz.ui.display.NCMapDescriptor; + +import org.eclipse.ui.PlatformUI; + +import com.raytheon.uf.viz.core.IDisplayPane; +import com.raytheon.uf.viz.core.IDisplayPaneContainer; +import com.raytheon.uf.viz.core.drawables.IDescriptor; +import com.raytheon.viz.ui.UiUtil; +import com.raytheon.viz.ui.editor.AbstractEditor; +import com.raytheon.viz.ui.editor.ISelectedPanesChangedListener; +import com.raytheon.viz.ui.perspectives.VizPerspectiveListener; + +public class ZoomManager implements ISelectedPanesChangedListener { + + @Override + public void selectedPanesChanged(String id, IDisplayPane[] panes) { + + IDisplayPaneContainer container = getContainer(panes[0]); + + for (IDisplayPane pane : panes) { + IDescriptor desc = pane.getDescriptor(); + if (desc instanceof NCMapDescriptor) { + if (((NCMapDescriptor) desc).getSuspendZoom()) { + ZoomUtil.disableZoom(container); + return; + } + } + } + + ZoomUtil.enableZoom(container); + + } + + private IDisplayPaneContainer getContainer(IDisplayPane pane) { + IDisplayPaneContainer container = null; + + AbstractEditor[] editors = UiUtil.getEditors(PlatformUI.getWorkbench() + .getActiveWorkbenchWindow(), VizPerspectiveListener + .getCurrentPerspectiveManager().getPerspectiveId()); + + for (AbstractEditor ed : editors) { + for (IDisplayPane aPane : ed.getDisplayPanes()) { + if (aPane == pane) { + container = ed; + return container; + } + } + } + + return null; + } +} diff --git a/ncep/gov.noaa.nws.ncep.viz.tools/src/gov/noaa/nws/ncep/viz/tools/panZoom/ZoomStateSourceProvider.java b/ncep/gov.noaa.nws.ncep.viz.tools/src/gov/noaa/nws/ncep/viz/tools/panZoom/ZoomStateSourceProvider.java new file mode 100644 index 0000000000..9c5e00d12c --- /dev/null +++ b/ncep/gov.noaa.nws.ncep.viz.tools/src/gov/noaa/nws/ncep/viz/tools/panZoom/ZoomStateSourceProvider.java @@ -0,0 +1,47 @@ +package gov.noaa.nws.ncep.viz.tools.panZoom; + +import java.util.HashMap; +import java.util.Map; + +import org.eclipse.ui.AbstractSourceProvider; +import org.eclipse.ui.ISources; + +public class ZoomStateSourceProvider extends AbstractSourceProvider { + public final static String ZOOM_STATE = "gov.noaa.nws.ncep.viz.tools.zoomState"; + + private final static String SUSPEND_ZOOM = "suspended"; + + private final static String ZOOM_NOT_SUSPENDED = "notSuspended"; + + private boolean isZoomSuspended = false; + + public ZoomStateSourceProvider() { + } + + @Override + public void dispose() { + } + + @Override + public Map getCurrentState() { + Map currentStateMap = new HashMap(1); + String currentState = isZoomSuspended ? SUSPEND_ZOOM + : ZOOM_NOT_SUSPENDED; + currentStateMap.put(ZOOM_STATE, currentState); + return currentStateMap; + } + + @Override + public String[] getProvidedSourceNames() { + return new String[] { ZOOM_STATE }; + } + + public void setZoomSuspended(boolean _isZoomSuspended) { + if (this.isZoomSuspended == _isZoomSuspended) + return; // no change + this.isZoomSuspended = _isZoomSuspended; + String currentState = this.isZoomSuspended ? SUSPEND_ZOOM + : ZOOM_NOT_SUSPENDED; + fireSourceChanged(ISources.WORKBENCH, ZOOM_STATE, currentState); + } +} diff --git a/ncep/gov.noaa.nws.ncep.viz.tools/src/gov/noaa/nws/ncep/viz/tools/panZoom/ZoomUtil.java b/ncep/gov.noaa.nws.ncep.viz.tools/src/gov/noaa/nws/ncep/viz/tools/panZoom/ZoomUtil.java new file mode 100644 index 0000000000..d6fc42d36f --- /dev/null +++ b/ncep/gov.noaa.nws.ncep.viz.tools/src/gov/noaa/nws/ncep/viz/tools/panZoom/ZoomUtil.java @@ -0,0 +1,91 @@ +package gov.noaa.nws.ncep.viz.tools.panZoom; + +import org.eclipse.ui.IWorkbenchWindow; +import org.eclipse.ui.PlatformUI; +import org.eclipse.ui.services.ISourceProviderService; + +import com.raytheon.uf.viz.core.IDisplayPaneContainer; +import com.raytheon.uf.viz.core.rsc.IInputHandler; +import com.raytheon.uf.viz.core.rsc.IInputHandler.InputPriority; +import com.raytheon.viz.ui.editor.AbstractEditor; +import com.raytheon.viz.ui.editor.EditorInput; +import com.raytheon.viz.ui.editor.ISelectedPanesChangedListener; + +public class ZoomUtil { + + private static final IInputHandler suspendZoom = new SuspendZoomHandler(); + + private static ISelectedPanesChangedListener paneListener = new ZoomManager(); + + /** + * suspend Zoom capabilities + */ + public static void suspendZoom(IDisplayPaneContainer editor) { + + if (editor != null) { + disableZoomWheel(editor); + disableZoomTools(); + + if (editor.getDisplayPanes().length > 1 + && editor instanceof AbstractEditor) { + AbstractEditor ed = (AbstractEditor) editor; + ((EditorInput) ed.getEditorInput()).getPaneManager() + .addSelectedPaneChangedListener(paneListener); + } + } + + } + + /** + * resume Zoom capabilities + */ + public static void allowZoom(IDisplayPaneContainer editor) { + + if (editor != null) { + enableZoomWheel(editor); + enableZoomTools(); + } + } + + public static void disableZoom(IDisplayPaneContainer editor) { + disableZoomTools(); + disableZoomWheel(editor); + } + + public static void enableZoom(IDisplayPaneContainer editor) { + enableZoomTools(); + enableZoomWheel(editor); + } + + public static void disableZoomTools() { + + IWorkbenchWindow workbenchWindow = PlatformUI.getWorkbench() + .getActiveWorkbenchWindow(); + ISourceProviderService spService = (ISourceProviderService) workbenchWindow + .getService(ISourceProviderService.class); + ZoomStateSourceProvider zoomStateSourceProvider = (ZoomStateSourceProvider) spService + .getSourceProvider(ZoomStateSourceProvider.ZOOM_STATE); + zoomStateSourceProvider.setZoomSuspended(true); + } + + public static void enableZoomTools() { + + IWorkbenchWindow workbenchWindow = PlatformUI.getWorkbench() + .getActiveWorkbenchWindow(); + ISourceProviderService spService = (ISourceProviderService) workbenchWindow + .getService(ISourceProviderService.class); + ZoomStateSourceProvider zoomStateSourceProvider = (ZoomStateSourceProvider) spService + .getSourceProvider(ZoomStateSourceProvider.ZOOM_STATE); + zoomStateSourceProvider.setZoomSuspended(false); + + } + + private static void disableZoomWheel(IDisplayPaneContainer editor) { + editor.registerMouseHandler(suspendZoom, InputPriority.RESOURCE); + } + + private static void enableZoomWheel(IDisplayPaneContainer editor) { + editor.unregisterMouseHandler(suspendZoom); + } + +} diff --git a/ncep/gov.noaa.nws.ncep.viz.tools/src/gov/noaa/nws/ncep/viz/tools/predefinedArea/PredefinedAreaAction.java b/ncep/gov.noaa.nws.ncep.viz.tools/src/gov/noaa/nws/ncep/viz/tools/predefinedArea/PredefinedAreaAction.java index 17ca733fb5..a639aa7eb4 100644 --- a/ncep/gov.noaa.nws.ncep.viz.tools/src/gov/noaa/nws/ncep/viz/tools/predefinedArea/PredefinedAreaAction.java +++ b/ncep/gov.noaa.nws.ncep.viz.tools/src/gov/noaa/nws/ncep/viz/tools/predefinedArea/PredefinedAreaAction.java @@ -1,8 +1,7 @@ - package gov.noaa.nws.ncep.viz.tools.predefinedArea; -import gov.noaa.nws.ncep.viz.localization.NcPathManager; import gov.noaa.nws.ncep.viz.resources.manager.PredefinedAreasMngr; +import gov.noaa.nws.ncep.viz.tools.panZoom.ZoomUtil; import gov.noaa.nws.ncep.viz.ui.display.NCDisplayPane; import gov.noaa.nws.ncep.viz.ui.display.NCMapDescriptor; import gov.noaa.nws.ncep.viz.ui.display.NCMapEditor; @@ -10,8 +9,6 @@ import gov.noaa.nws.ncep.viz.ui.display.NCMapRenderableDisplay; import gov.noaa.nws.ncep.viz.ui.display.NmapUiUtils; import gov.noaa.nws.ncep.viz.ui.display.PredefinedArea; -import java.io.File; - import org.eclipse.core.commands.AbstractHandler; import org.eclipse.core.commands.ExecutionEvent; import org.eclipse.core.commands.ExecutionException; @@ -23,13 +20,10 @@ import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.MessageBox; import org.eclipse.ui.PlatformUI; -import com.raytheon.uf.common.localization.PathManagerFactory; -import com.raytheon.uf.common.serialization.SerializationUtil; import com.raytheon.uf.viz.core.IDisplayPane; -import com.raytheon.uf.viz.core.exception.VizException; +import com.raytheon.uf.viz.core.globals.VizGlobalsManager; import com.raytheon.viz.core.CorePlugin; - /** * Load the scale bundle and merge it into the existing bundle * @@ -52,6 +46,7 @@ import com.raytheon.viz.core.CorePlugin; * Oct 14, 2009 B. Hebbard Added proper zooming to the newly selected area * Oct 27, 2009 G. Hull Moved out of perspectives project * Feb 26. 2010 G. Hull retrieve PredefinedArea instead of a Bundle file + * Sep 10. 2012 B. Yin Remove the call to setRenderableDisplay which creates a new GLTarget * * * @@ -88,27 +83,42 @@ public class PredefinedAreaAction extends AbstractHandler { NCMapEditor editor = NmapUiUtils.getActiveNatlCntrsEditor(); // get the panes to set the area in. - NCDisplayPane[] displayPanes = (NCDisplayPane[]) ( editor.arePanesGeoSynced() ? - editor.getDisplayPanes() : editor.getSelectedPanes() ); + NCDisplayPane[] displayPanes = (NCDisplayPane[]) (editor + .arePanesGeoSynced() ? editor.getDisplayPanes() : editor + .getSelectedPanes()); try { - PredefinedArea pArea = PredefinedAreasMngr.getPredefinedArea(areaName); + PredefinedArea pArea = PredefinedAreasMngr + .getPredefinedArea(areaName); NCMapRenderableDisplay dispPane = pArea.getPredefinedArea(); for( IDisplayPane pane : displayPanes ) { - NCMapRenderableDisplay existingDisplay = (NCMapRenderableDisplay) pane.getRenderableDisplay(); - NCMapDescriptor existingMD = (NCMapDescriptor) existingDisplay.getDescriptor(); + NCMapRenderableDisplay existingDisplay = (NCMapRenderableDisplay) pane + .getRenderableDisplay(); + NCMapDescriptor existingMD = (NCMapDescriptor) existingDisplay + .getDescriptor(); - // Note: setGridGeometry does an implicit reproject of all resources + // Note: setGridGeometry does an implicit reproject of all + // resources // on the descriptor, so don't need to do this explicitly - existingMD.setGridGeometry( dispPane.getDescriptor().getGridGeometry()); + existingMD.setGridGeometry(dispPane.getDescriptor() + .getGridGeometry()); + + existingDisplay.setZoomLevel(dispPane.getZoomLevel()); + existingDisplay.setMapCenter(dispPane.getMapCenter()); + existingDisplay.setPredefinedAreaName(dispPane + .getPredefinedAreaName()); + + pane.setZoomLevel( dispPane.getZoomLevel()); + pane.scaleToClientArea(); + existingDisplay.recenter(dispPane.getMapCenter()); + existingDisplay.getView().zoom( dispPane.getZoomLevel()); + + existingMD.setSuspendZoom(false); + ZoomUtil.allowZoom(editor); + VizGlobalsManager.getCurrentInstance().updateUI(editor); - NCMapRenderableDisplay newDisplay = new NCMapRenderableDisplay(existingMD); - newDisplay.setZoomLevel( dispPane.getZoomLevel() ); - newDisplay.setMapCenter( dispPane.getMapCenter() ); - newDisplay.setPredefinedAreaName( dispPane.getPredefinedAreaName() ); - pane.setRenderableDisplay(newDisplay); } editor.refresh(); @@ -118,8 +128,10 @@ public class PredefinedAreaAction extends AbstractHandler { "Error occurred during bundle load.", e); ErrorDialog.openError(Display.getCurrent().getActiveShell(), "ERROR", "Error occurred during bundle load.", status); - CorePlugin.getDefault().getLog().log( - new Status(IStatus.ERROR, CorePlugin.PLUGIN_NAME, + CorePlugin + .getDefault() + .getLog() + .log(new Status(IStatus.ERROR, CorePlugin.PLUGIN_NAME, "Error occurred during bundle load", e)); } } diff --git a/ncep/gov.noaa.nws.ncep.viz.tools/src/gov/noaa/nws/ncep/viz/tools/predefinedArea/SatelliteAreaAction.java b/ncep/gov.noaa.nws.ncep.viz.tools/src/gov/noaa/nws/ncep/viz/tools/predefinedArea/SatelliteAreaAction.java index 38fc2105ea..e36cf36f3b 100644 --- a/ncep/gov.noaa.nws.ncep.viz.tools/src/gov/noaa/nws/ncep/viz/tools/predefinedArea/SatelliteAreaAction.java +++ b/ncep/gov.noaa.nws.ncep.viz.tools/src/gov/noaa/nws/ncep/viz/tools/predefinedArea/SatelliteAreaAction.java @@ -1,28 +1,21 @@ - package gov.noaa.nws.ncep.viz.tools.predefinedArea; -import gov.noaa.nws.ncep.viz.ui.display.NmapUiUtils; import gov.noaa.nws.ncep.viz.rsc.satellite.rsc.AbstractSatelliteResource; import gov.noaa.nws.ncep.viz.rsc.satellite.rsc.GiniSatResource; import gov.noaa.nws.ncep.viz.rsc.satellite.rsc.McidasSatResource; -import gov.noaa.nws.ncep.viz.rsc.satellite.rsc.SatelliteResourceData; +import gov.noaa.nws.ncep.viz.tools.panZoom.ZoomUtil; import gov.noaa.nws.ncep.viz.ui.display.NCDisplayPane; import gov.noaa.nws.ncep.viz.ui.display.NCMapDescriptor; import gov.noaa.nws.ncep.viz.ui.display.NCMapEditor; import gov.noaa.nws.ncep.viz.ui.display.NCMapRenderableDisplay; -import gov.noaa.nws.ncep.viz.ui.display.PredefinedArea; +import gov.noaa.nws.ncep.viz.ui.display.NmapUiUtils; import java.util.Iterator; import org.eclipse.core.commands.AbstractHandler; import org.eclipse.core.commands.ExecutionEvent; import org.eclipse.core.commands.ExecutionException; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Status; -import org.eclipse.jface.dialogs.ErrorDialog; -import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.swt.SWT; -import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.MessageBox; import org.eclipse.ui.PlatformUI; import org.geotools.coverage.grid.GeneralGridEnvelope; @@ -30,19 +23,17 @@ import org.geotools.coverage.grid.GeneralGridGeometry; import org.geotools.coverage.grid.GridGeometry2D; import com.raytheon.uf.common.dataquery.requests.RequestConstraint; -import com.raytheon.uf.common.serialization.SerializationUtil; import com.raytheon.uf.viz.core.IDisplayPane; +import com.raytheon.uf.viz.core.PixelExtent; import com.raytheon.uf.viz.core.drawables.ResourcePair; import com.raytheon.uf.viz.core.exception.VizException; import com.raytheon.uf.viz.core.rsc.ResourceList; -import com.raytheon.viz.core.CorePlugin; - /** * Searches the current Editor for an AbstractSatelliteResource, and changes the - * Coordinate Reference System in the mapDescriptor to the same CRS of the satellite Image. - * This will mostly be used to display non-remapped satellite images in their native - * projection. + * Coordinate Reference System in the mapDescriptor to the same CRS of the + * satellite Image. This will mostly be used to display non-remapped satellite + * images in their native projection. * *
  * SOFTWARE HISTORY
@@ -58,12 +49,18 @@ import com.raytheon.viz.core.CorePlugin;
  */
 public class SatelliteAreaAction extends AbstractHandler {
 
+    public static final String DISPLAY_MODE = "displayMode";
+
+    public static final String SIZE_OF_IMAGE = "sizeOfImage";
+
     public SatelliteAreaAction() {
     }
 
     @Override
     public Object execute(ExecutionEvent event) throws ExecutionException {
          
+        String mode = event.getParameter(DISPLAY_MODE);
+
     	// Is current Editor a Map Editor?
         NCMapEditor editor = NmapUiUtils.getActiveNatlCntrsEditor();
     	if ( editor == null ) 
@@ -73,13 +70,13 @@ public class SatelliteAreaAction extends AbstractHandler {
     	boolean geoSyncedPanes = editor.arePanesGeoSynced();
 
     	// get the panes to reproject.
-        NCDisplayPane[] displayPanes = (NCDisplayPane[]) 
-        		( geoSyncedPanes ?  editor.getDisplayPanes() : 
-        		                    editor.getSelectedPanes() );
+        NCDisplayPane[] displayPanes = (NCDisplayPane[]) (geoSyncedPanes ? editor
+                .getDisplayPanes() : editor.getSelectedPanes());
 
         AbstractSatelliteResource satResource = null;
         					
-        // If the geoSync flag is set then we need to check if there is one or more 
+        // If the geoSync flag is set then we need to check if there is one or
+        // more
         // sat resources in the any of the selected panes. 
     	// 
     	if( geoSyncedPanes ) {
@@ -91,18 +88,20 @@ public class SatelliteAreaAction extends AbstractHandler {
     			if( satResource == null ) {   
     				AbstractSatelliteResource tmpSatRsc = getSatResource( pane );
     				
-            		// if a sat rsc is found, save the area name if we can get the geometry.
-            		// It is possible for the satellite image to not have a geometry if the 
-            		// image is outside the current area or if there isn't a time matched image
-            		if( tmpSatRsc != null &&
-            			tmpSatRsc.getImageGeometry() != null ) {
+                    // if a sat rsc is found, save the area name if we can get
+                    // the geometry.
+                    // It is possible for the satellite image to not have a
+                    // geometry if the
+                    // image is outside the current area or if there isn't a
+                    // time matched image
+                    if (tmpSatRsc != null
+                            && tmpSatRsc.getImageGeometry() != null) {
                 		
             			satResource = tmpSatRsc;
             			satAreaName = getSatAreaName( tmpSatRsc );
                     	satRscFound = true;                			
             		}
-        		}
-    			else {
+                } else {
     				// if there are multiple panes with a sat resources with
     				// different area names then prompt
     				// the user whether to use the first sat or not continue
@@ -111,14 +110,14 @@ public class SatelliteAreaAction extends AbstractHandler {
     					String otherSatAreaName = getSatAreaName( getSatResource( pane ) );
     					
     					if( !satAreaName.equals( otherSatAreaName ) ) {
-    			            MessageBox mb = new MessageBox(PlatformUI.getWorkbench()
-    			            		.getActiveWorkbenchWindow().getShell(), SWT.OK);
+                            MessageBox mb = new MessageBox(PlatformUI
+                                    .getWorkbench().getActiveWorkbenchWindow()
+                                    .getShell(), SWT.OK);
     			            mb.setText("Information");
-    			            mb.setMessage(    	   	
-    			            		"The Geo-Sync Panes option is set for this RBD and there are\n"+
-    	   							"multiple selected panes with conflicting satellite areas.\n\n"+
-    	   							"Either deselect the Geo-Sync panes option or select just the\n"+
-    	   							"one pane with the satellite that you want to set the area to.\n");
+                            mb.setMessage("The Geo-Sync Panes option is set for this RBD and there are\n"
+                                    + "multiple selected panes with conflicting satellite areas.\n\n"
+                                    + "Either deselect the Geo-Sync panes option or select just the\n"
+                                    + "one pane with the satellite that you want to set the area to.\n");
     			            mb.open();
     			            return null;
     					}
@@ -131,9 +130,9 @@ public class SatelliteAreaAction extends AbstractHandler {
                 MessageBox mb = new MessageBox(PlatformUI.getWorkbench()
                 		.getActiveWorkbenchWindow().getShell(), SWT.OK);
                 mb.setText("Error");
-                mb.setMessage("Unable to change the Display Area. \n"+
-                		"No Satellite Resources are Loaded\n"+
-                		"in the selected Panes.");
+                mb.setMessage("Unable to change the Display Area. \n"
+                        + "No Satellite Resources are Loaded\n"
+                        + "in the selected Panes.");
                 mb.open();
                 return null;
     		}
@@ -150,11 +149,11 @@ public class SatelliteAreaAction extends AbstractHandler {
         	if( !geoSyncedPanes ) {
             	satResource = getSatResource( pane );        	
             	
-            	// if not geoSynced and no satellite then don't do anything for this pane
+                // if not geoSynced and no satellite then don't do anything for
+                // this pane
             	if( satResource == null ) {
             		continue;
-            	} 		
-            	else if( satResource.getImageGeometry() == null ) {        	
+                } else if (satResource.getImageGeometry() == null) {
                     MessageBox mb = new MessageBox(PlatformUI.getWorkbench()
                     		.getActiveWorkbenchWindow().getShell(), SWT.OK);
                     mb.setText("Error");
@@ -171,26 +170,37 @@ public class SatelliteAreaAction extends AbstractHandler {
         	GeneralGridGeometry gridgeom = satResource.getImageGeometry();
         	int xdimArea = gridgeom.getGridRange().getSpan(0);
         	int ydimArea = gridgeom.getGridRange().getSpan(1);
-        	double xdimImage = (int)gridgeom.getEnvelope().getSpan(0);
-        	double ydimImage = (int)gridgeom.getEnvelope().getSpan(1);
-        	double largest = Math.max( xdimImage/xdimArea, ydimImage/ydimArea);
-        	
-        	int scale = ( largest > 1.0 ? (int)Math.ceil(largest) : 1 );
             	
             /*
              * Update mapDescriptor with new satellite CRS
              */
-        	NCMapRenderableDisplay existingDisplay = (NCMapRenderableDisplay) pane.getRenderableDisplay();
-        	NCMapDescriptor existingMD = (NCMapDescriptor) existingDisplay.getDescriptor();
+            NCMapRenderableDisplay existingDisplay = (NCMapRenderableDisplay) pane
+                    .getRenderableDisplay();
+            NCMapDescriptor existingMD = (NCMapDescriptor) existingDisplay
+                    .getDescriptor();
 
         	try {
-        		existingMD.setGridGeometry(new GridGeometry2D(new GeneralGridEnvelope(new int[] {
-        				0, 0 }, new int[] { xdimArea*scale, ydimArea*scale }, false), gridgeom.getEnvelope() ) );
+                existingMD.setGridGeometry(new GridGeometry2D(
+                        new GeneralGridEnvelope(new int[] { 0, 0 }, new int[] {
+                                xdimArea, ydimArea }, false), gridgeom
+                                .getEnvelope()));
 
-        		double[] center = existingMD.pixelToWorld( new double[] {xdimArea*scale/2, ydimArea*scale/2, 0.} );
+                double[] center = existingMD.pixelToWorld(new double[] {
+                        xdimArea / 2, ydimArea / 2, 0. });
 
-        		NCMapRenderableDisplay newDisplay = new NCMapRenderableDisplay(existingMD);
+                NCMapRenderableDisplay newDisplay = new NCMapRenderableDisplay(
+                        existingMD);
+
+                if (isSizeOfImageMode(mode)) {
+                    newDisplay.setExtent(new PixelExtent(pane.getBounds()));
+                    existingMD.setSuspendZoom(true);
+                    ZoomUtil.suspendZoom(editor);
+                } else {
         		newDisplay.setZoomLevel(1.0);
+                    existingMD.setSuspendZoom(false);
+                    ZoomUtil.allowZoom(editor);
+                }
+
         		newDisplay.setMapCenter(center);
         		newDisplay.setPredefinedAreaName("Satellite");
         		pane.setRenderableDisplay(newDisplay);
@@ -238,19 +248,25 @@ public class SatelliteAreaAction extends AbstractHandler {
     private String getSatAreaName( AbstractSatelliteResource satRsc ) {
 		// McIdas and GINI store the area differently.
 		if( satRsc instanceof McidasSatResource ) {
-			 RequestConstraint reqCnst = satRsc.getResourceData().
-			 		getMetadataMap().get( "areaName" );
+            RequestConstraint reqCnst = satRsc.getResourceData()
+                    .getMetadataMap().get("areaName");
 			 if( reqCnst != null ) {
 				 return reqCnst.getConstraintValue();
 			 }
-		}
-		else if( satRsc instanceof GiniSatResource ) {
-			RequestConstraint reqCnst = satRsc.getResourceData().
-							getMetadataMap().get( "sectorID" );
+        } else if (satRsc instanceof GiniSatResource) {
+            RequestConstraint reqCnst = satRsc.getResourceData()
+                    .getMetadataMap().get("sectorID");
 			if( reqCnst != null ) {
 				return reqCnst.getConstraintValue();
 			}	
 		}
 		return "";
     }
+
+    private boolean isSizeOfImageMode(String mode) {
+        if (mode != null && mode.equalsIgnoreCase(SIZE_OF_IMAGE)) {
+            return true;
+        }
+        return false;
+    }
 }
\ No newline at end of file
diff --git a/ncep/gov.noaa.nws.ncep.viz.ui.display/META-INF/MANIFEST.MF b/ncep/gov.noaa.nws.ncep.viz.ui.display/META-INF/MANIFEST.MF
index 0b1f524a26..dc312a8154 100644
--- a/ncep/gov.noaa.nws.ncep.viz.ui.display/META-INF/MANIFEST.MF
+++ b/ncep/gov.noaa.nws.ncep.viz.ui.display/META-INF/MANIFEST.MF
@@ -20,5 +20,6 @@ Import-Package: com.raytheon.uf.common.colormap,
  com.raytheon.uf.viz.core.maps,
  com.raytheon.uf.viz.core.maps.display,
  com.raytheon.uf.viz.core.rsc.legend,
+ gov.noaa.nws.ncep.gempak.parameters.colorbar,
  javax.measure.unit,
  javax.vecmath
diff --git a/ncep/gov.noaa.nws.ncep.viz.ui.display/src/gov/noaa/nws/ncep/viz/ui/display/ColorBar.java b/ncep/gov.noaa.nws.ncep.viz.ui.display/src/gov/noaa/nws/ncep/viz/ui/display/ColorBar.java
index 8b85bd23c5..c3271b6f09 100644
--- a/ncep/gov.noaa.nws.ncep.viz.ui.display/src/gov/noaa/nws/ncep/viz/ui/display/ColorBar.java
+++ b/ncep/gov.noaa.nws.ncep.viz.ui.display/src/gov/noaa/nws/ncep/viz/ui/display/ColorBar.java
@@ -13,8 +13,11 @@ import org.eclipse.swt.graphics.RGB;
 import org.eclipse.swt.widgets.Display;
 
 import com.raytheon.uf.common.serialization.ISerializableObject;
-import gov.noaa.nws.ncep.viz.common.RGBColorAdapter;
 
+import gov.noaa.nws.ncep.gempak.parameters.colorbar.ColorBarAttributesBuilder;
+import gov.noaa.nws.ncep.viz.common.RGBColorAdapter;
+import gov.noaa.nws.ncep.gempak.parameters.colorbar.ColorBarOrientation;
+import gov.noaa.nws.ncep.gempak.parameters.colorbar.ColorBarAnchorLocation;
 /**
  *  An ColorBar for use by FFG, LTNG and other resources which assign colors to 
  *  defined interval ranges. 
@@ -29,6 +32,14 @@ import gov.noaa.nws.ncep.viz.common.RGBColorAdapter;
  * 06/07/12      #794       Archana       Added a Boolean flag called reverseOrder to enable/disable
  *                                        reversing the order of colors in the color-bar.
  * 06/07/12      #717       Archana       Added the overridden methods getDisplayUnitStr() and getNumPixelsToReAlignLabel()                                                                           
+ * 06/18/12      #743       Archana       Added attributes to implement GEMPAK's CLRBAR parameter:
+ *                                                                       xPixelCoordFraction, yPixelCoordFraction,drawColorBar,
+ *                                                                       isDrawBoxAroundColorBar. added the corresponding setter/getter methods
+ *                                                                       Added setAttibutesFromColorBarAttributesBuilder()                                      
+ *07/18/12       #717       Archana       Refactored numPixelsToReAlignLabel to alignLabelInTheMiddleOfInterval
+ *                                                                        and added the corresponding setter/getter methods 
+ *09/11/12        #743  Archana           Minor update in the method setAttributesFromColorBarAttributesBuilder() to set
+ *                                                                       the pixel width correctly.
  * 
  * 
* @@ -59,19 +70,19 @@ public class ColorBar implements IColorBar, ISerializableObject { private Boolean showLabels = true; @XmlElement - private Boolean reverseOrder = false; + private Boolean reverseOrder = true; @XmlElement - private Boolean drawToScale = false; + private Boolean drawToScale = true; @XmlElement private ColorBarOrientation orientation = ColorBarOrientation.Vertical; @XmlElement - private ColorBarAnchorLocation anchorLoc = ColorBarAnchorLocation.UpperLeft; + private ColorBarAnchorLocation anchorLoc = ColorBarAnchorLocation.LowerLeft; private static final Float defaultLength = .5f; - private static final int defaultWidth = 15; + private static final int defaultWidth = 15; //change to 0.01 @XmlElement private Float lengthAsRatio = defaultLength; // as a ratio of the screen size @@ -82,6 +93,48 @@ public class ColorBar implements IColorBar, ISerializableObject { @XmlElement private int numDecimals=0; + @XmlElement + private Boolean drawColorBar = true; + + @XmlElement + private Boolean drawBoxAroundColorBar = true; + + private double xPixelCoordFraction = 0.005; + + private double yPixelCoordFraction = 0.05; + + private boolean alignLabelInTheMiddleOfInterval = false; + /** + * + * @return the drawColorBar + */ + public final Boolean isDrawColorBar() { + return drawColorBar; + } + + /** + * @param drawColorBar the drawColorBar to set + */ + public final void setDrawColorBar(Boolean drawColorBar) { + this.drawColorBar = drawColorBar; + } + + /** + * @return the drawBoxAroundColorBar + */ + public final Boolean isDrawBoxAroundColorBar() { + return drawBoxAroundColorBar; + } + + /** + * @param drawBoxAroundColorBar the drawBoxAroundColorBar to set + */ + public final void setDrawBoxAroundColorBar(Boolean drawBoxAroundColorBar) { + this.drawBoxAroundColorBar = drawBoxAroundColorBar; + } + + private ColorBarAttributesBuilder colorBarAttributesBuilder = null; + private Display display=null; // the Display used to create the Colors in the intervals public ColorBar() { @@ -107,6 +160,12 @@ public class ColorBar implements IColorBar, ISerializableObject { widthInPixels = cbar.widthInPixels; numDecimals = cbar.numDecimals; reverseOrder = cbar.reverseOrder; + colorBarAttributesBuilder = cbar.colorBarAttributesBuilder; + drawColorBar = cbar.drawColorBar; + drawBoxAroundColorBar = cbar.drawBoxAroundColorBar; + xPixelCoordFraction = cbar.xPixelCoordFraction; + yPixelCoordFraction = cbar.yPixelCoordFraction; + alignLabelInTheMiddleOfInterval = cbar.alignLabelInTheMiddleOfInterval; for( int i=0 ; i * * @author ghull @@ -56,7 +68,7 @@ public class ColorBarFromColormap implements IColorBar, ISerializableObject { private ColorBarOrientation orientation = ColorBarOrientation.Vertical; @XmlElement - private ColorBarAnchorLocation anchorLoc = ColorBarAnchorLocation.UpperLeft; + private ColorBarAnchorLocation anchorLoc = ColorBarAnchorLocation.LowerLeft; // @XmlElement // private String colorMapName = null; @@ -92,12 +104,12 @@ public class ColorBarFromColormap implements IColorBar, ISerializableObject { @XmlElement String displayUnitStr = null; - @XmlElement - @XmlJavaTypeAdapter(IntegerListAdapter.class) - private ArrayList labeledPixels = new ArrayList(); +// @XmlElement +// @XmlJavaTypeAdapter(IntegerListAdapter.class) +// private ArrayList labeledPixels = new ArrayList(); private static final Float defaultLength = .5f; - private static final int defaultWidth = 10; + private static final int defaultWidth = 10; //change to 0.01 @XmlElement private Float lengthAsRatio = defaultLength; // as a ratio of the screen @@ -112,6 +124,18 @@ public class ColorBarFromColormap implements IColorBar, ISerializableObject { private Boolean isScalingAttemptedForThisColorMap = false; + private ColorBarAttributesBuilder colorBarAttributesBuilder; + + @XmlElement + private Boolean drawColorBar = true; + + @XmlElement + private Boolean drawBoxAroundColorBar = true; + + private double xPixelCoordFraction = 0.005; + + private double yPixelCoordFraction = 0.05; + /** * @param isScalingAttemptedForThisColorMap the isScalingAttemptedForThisColorMap to set */ @@ -120,7 +144,6 @@ public class ColorBarFromColormap implements IColorBar, ISerializableObject { this.isScalingAttemptedForThisColorMap = isScalingAttemptedForThisColorMap; } - private int numPixelsToReAlignLabel; /** * @return the isScalingAttemptedForThisColorMap @@ -129,6 +152,14 @@ public class ColorBarFromColormap implements IColorBar, ISerializableObject { return isScalingAttemptedForThisColorMap.booleanValue(); } + private boolean alignLabelInTheMiddleOfInterval; + + @Override + public void setAlignLabelInTheMiddleOfInterval(boolean b){ + alignLabelInTheMiddleOfInterval = b; + } + + public ColorBarFromColormap() { } @@ -150,19 +181,17 @@ public class ColorBarFromColormap implements IColorBar, ISerializableObject { lengthAsRatio = cbar.lengthAsRatio; widthInPixels = cbar.widthInPixels; reverseOrder = cbar.reverseOrder; - numPixelsToReAlignLabel = cbar.numPixelsToReAlignLabel; + alignLabelInTheMiddleOfInterval = cbar.alignLabelInTheMiddleOfInterval; isScalingAttemptedForThisColorMap = cbar.isScalingAttemptedForThisColorMap; + colorBarAttributesBuilder = cbar.colorBarAttributesBuilder; + alignLabelInTheMiddleOfInterval = cbar.alignLabelInTheMiddleOfInterval; if (cbar.displayUnitStr != null ) displayUnitStr = new String(cbar.displayUnitStr); colorMap = null; if( cbar.getColorMap() != null ) { setColorMap(cbar.getColorMap()); } -// for( int p=0 ; pdmEntriesList = dmPref.getEntries(); + if (dmEntriesList != null && !dmEntriesList.isEmpty()){ + Iterator itr = dmEntriesList.iterator(); + + while(itr.hasNext()){ + if(itr.next().equals(new Double(p))){ + itr.remove(); + break; + } + } } } return false; } public boolean isPixelLabeled(int p) { - return labeledPixels.contains(new Integer(p)); + if(imagePreferences == null) + return false; + + DataMappingPreferences dmPref = imagePreferences.getDataMapping(); + + if( dmPref == null ) + return false; + + if (dmPref.getLabelValueForDataValue((double)p) == null ) + return false; + else + return true; +// return labeledPixels.contains(new Integer(p)); } - public void removeAllLabels() { - labeledPixels.clear(); - } +// public void removeAllLabels() { +// labeledPixels.clear(); +// } public float getDiscreteRange() { return getNumIntervals(); @@ -483,21 +536,39 @@ public class ColorBarFromColormap implements IColorBar, ISerializableObject { return widthInPixels; } + /** + * For a pixel p, applies the corresponding label lblStr + */ public void labelInterval(int p, String lblStr) { if (lblStr != null) { - labelPixel(p); + labelPixel(p,lblStr); } else { unlabelPixel(p); } } - public void labelPixel(int p) { // , String lblStr ) { - for (Integer pix : labeledPixels) { - if (p == pix) { - return; // already labeled + public void labelPixel(int p,String lblStr) { // , String lblStr ) { + + if ( lblStr == null || imagePreferences == null ) + return; + + DataMappingPreferences dmPref = imagePreferences.getDataMapping(); + if(dmPref != null){ + ListdmEntriesList = dmPref.getEntries(); + if (dmEntriesList != null && !dmEntriesList.isEmpty()){ + if(!dmEntriesList.contains(new Double(p))){ + DataMappingEntry dmEntry = new DataMappingEntry(); + dmEntry.setPixelValue((double)p); + dmEntry.setLabel(lblStr); + dmEntriesList.add(dmEntry); + DataMappingEntry[] entryArray = new DataMappingEntry[dmEntriesList.size()]; + dmEntriesList.toArray(entryArray); + dmPref.setSerializableEntries(entryArray); + imagePreferences.setDataMapping(dmPref); + } } } - labeledPixels.add(p); + } public boolean isIntervalLabeled(int intrvl) { @@ -509,8 +580,6 @@ public class ColorBarFromColormap implements IColorBar, ISerializableObject { } public void setLengthAsRatio(Float l) { - if ( l > 0.95 ) - l = 0.98f; lengthAsRatio = l; } @@ -534,8 +603,8 @@ public class ColorBarFromColormap implements IColorBar, ISerializableObject { + ((dataUnits == null) ? 0 : dataUnits.hashCode()); result = prime * result + ((labelColor == null) ? 0 : labelColor.hashCode()); - result = prime * result - + ((labeledPixels == null) ? 0 : labeledPixels.hashCode()); +// result = prime * result +// + ((labeledPixels == null) ? 0 : labeledPixels.hashCode()); result = prime * result + ((lengthAsRatio == null) ? 0 : lengthAsRatio.hashCode()); result = prime * result @@ -555,6 +624,8 @@ public class ColorBarFromColormap implements IColorBar, ISerializableObject { result = prime * result + ((isScalingAttemptedForThisColorMap == null) ? 0 : isScalingAttemptedForThisColorMap.hashCode()); + result = prime * result + + ((colorBarAttributesBuilder == null) ? 0 : colorBarAttributesBuilder.hashCode()); return result; } @@ -596,11 +667,11 @@ public class ColorBarFromColormap implements IColorBar, ISerializableObject { return false; } else if (!labelColor.equals(other.labelColor)) return false; - if (labeledPixels == null) { - if (other.labeledPixels != null) - return false; - } else if (!labeledPixels.equals(other.labeledPixels)) - return false; +// if (labeledPixels == null) { +// if (other.labeledPixels != null) +// return false; +// } else if (!labeledPixels.equals(other.labeledPixels)) +// return false; if (lengthAsRatio == null) { if (other.lengthAsRatio != null) return false; @@ -642,7 +713,12 @@ public class ColorBarFromColormap implements IColorBar, ISerializableObject { } else if (!isScalingAttemptedForThisColorMap.equals(other.isScalingAttemptedForThisColorMap)) return false; - //isScalingAttemptedForThisColorMap + + if (colorBarAttributesBuilder == null) { + if (other.colorBarAttributesBuilder != null) + return false; + } else if (!colorBarAttributesBuilder.equals(other.colorBarAttributesBuilder)) + return false; return true; } @@ -701,11 +777,131 @@ public class ColorBarFromColormap implements IColorBar, ISerializableObject { } @Override - public int getNumPixelsToReAlignLabel(){ - return numPixelsToReAlignLabel; + public boolean isAlignLabelInTheMiddleOfInterval(){ + return alignLabelInTheMiddleOfInterval; } - public void setNumPixelsToReAlignLabel(int n){ - numPixelsToReAlignLabel = n; + public void setNumPixelsToReAlignLabel(boolean n){ + alignLabelInTheMiddleOfInterval = n; } + + /** + * @return the colorBarAttributesBuilder + */ + public final ColorBarAttributesBuilder getColorBarAttributesBuilder() { + return colorBarAttributesBuilder; + } + + /** + * @param colorBarAttributesBuilder the colorBarAttributesBuilder to set + */ + public final void setColorBarAttributesBuilder( + ColorBarAttributesBuilder colorBarAttributesBuilder) { + this.colorBarAttributesBuilder = colorBarAttributesBuilder; + } + + @Override + public void setOrientation(ColorBarOrientation orientation) { + this.orientation = orientation; + + } + + @Override + public void setAnchorLoc(ColorBarAnchorLocation anchorLoc) { + this.anchorLoc = anchorLoc; + } + + @Override + public void setAttributesFromColorBarAttributesBuilder( + ColorBarAttributesBuilder colorBarAttributesBuilder) { + /* + * To be used when the GEMPAK parameter IMCBAR is implemented + */ + if (colorBarAttributesBuilder != null ){ + + setLengthAsRatio( (float) colorBarAttributesBuilder.getLength()); + setWidthInPixels( new Integer ( (int) colorBarAttributesBuilder.getWidth() * 1000)); + setAnchorLoc(colorBarAttributesBuilder.getAnchorLocation()); + setOrientation(colorBarAttributesBuilder.getColorBarOrientation()); + + setXPixelCoordFraction(colorBarAttributesBuilder.getX()); + setYPixelCoordFraction(colorBarAttributesBuilder.getY()); + setLabelColor(colorBarAttributesBuilder.getColor()); + setDrawBoxAroundColorBar(colorBarAttributesBuilder.isDrawBoxAroundColorBar()); + setDrawColorBar(colorBarAttributesBuilder.isDrawColorBar() ); + } + } + + /** + * @return the drawColorBar + */ + public final Boolean isDrawColorBar() { + return drawColorBar; + } + + /** + * @param drawColorBar the drawColorBar to set + */ + public final void setDrawColorBar(Boolean drawColorBar) { + this.drawColorBar = drawColorBar; + } + + /** + * @return the drawBoxAroundColorBar + */ + public final Boolean isDrawBoxAroundColorBar() { + return drawBoxAroundColorBar; + } + + /** + * @param drawBoxAroundColorBar the drawBoxAroundColorBar to set + */ + public final void setDrawBoxAroundColorBar(Boolean drawBoxAroundColorBar) { + this.drawBoxAroundColorBar = drawBoxAroundColorBar; + } + + /** + * @return the xPixelCoordFraction + */ + public final double getXPixelCoordFraction() { + return xPixelCoordFraction; + } + + /** + * @param xPixelCoordFraction the xPixelCoordFraction to set + */ + public final void setXPixelCoordFraction(double xPixelCoordFraction) { + this.xPixelCoordFraction = xPixelCoordFraction; + } + + /** + * @return the yPixelCoordFraction + */ + public final double getYPixelCoordFraction() { + return yPixelCoordFraction; + } + + /** + * @param yPixelCoordFraction the yPixelCoordFraction to set + */ + public final void setYPixelCoordFraction(double yPixelCoordFraction) { + this.yPixelCoordFraction = yPixelCoordFraction; + } + + + @Override + public void removeAllLabels() { + if(imagePreferences == null ) + return; + + DataMappingPreferences dmPref = imagePreferences.getDataMapping(); + + if(dmPref == null ) + return; + + dmPref.getEntries().clear(); + + } + + } diff --git a/ncep/gov.noaa.nws.ncep.viz.ui.display/src/gov/noaa/nws/ncep/viz/ui/display/IColorBar.java b/ncep/gov.noaa.nws.ncep.viz.ui.display/src/gov/noaa/nws/ncep/viz/ui/display/IColorBar.java index e75663239c..f5c91908eb 100644 --- a/ncep/gov.noaa.nws.ncep.viz.ui.display/src/gov/noaa/nws/ncep/viz/ui/display/IColorBar.java +++ b/ncep/gov.noaa.nws.ncep.viz.ui.display/src/gov/noaa/nws/ncep/viz/ui/display/IColorBar.java @@ -8,7 +8,9 @@ import org.eclipse.swt.graphics.Color; import org.eclipse.swt.graphics.RGB; import org.eclipse.swt.widgets.Display; - +import gov.noaa.nws.ncep.gempak.parameters.colorbar.ColorBarAnchorLocation; +import gov.noaa.nws.ncep.gempak.parameters.colorbar.ColorBarOrientation; +import gov.noaa.nws.ncep.gempak.parameters.colorbar.ColorBarAttributesBuilder; /** * An Interface to define the methods needed to edit and paint ColorBars. * @@ -23,6 +25,16 @@ import org.eclipse.swt.widgets.Display; * getDisplayUnitStr() and * getNumPixelsToReAlignLabel() * + * 06/18/12 #743 Archana Added the following methods: + * isDrawColorBar(),setDrawColorBar(), + * isDrawBoxAroundColorBar(), + * setDrawBoxAroundColorBar(), + * setXPixelCoordFraction(),getXPixelCoordFraction(), + * setYPixelCoordFraction(),getYPixelCoordFraction(), + * + * + * + * * * * @author ghull @@ -31,15 +43,18 @@ import org.eclipse.swt.widgets.Display; public interface IColorBar { - public static enum ColorBarOrientation { - Vertical, Horizontal - } +// public static enum ColorBarOrientation { +// Vertical, Horizontal +// } +// +// public static enum ColorBarAnchorLocation { +// UpperLeft, /*UpperCenter,*/ UpperRight, +// /*CenterLeft, CenterCenter, CenterRight,*/ +// LowerLeft, /* LowerCenter,*/ LowerRight +// } - public static enum ColorBarAnchorLocation { - UpperLeft, /*UpperCenter,*/ UpperRight, - /*CenterLeft, CenterCenter, CenterRight,*/ - LowerLeft, /* LowerCenter,*/ LowerRight - } + public abstract void setColorBarAttributesBuilder(ColorBarAttributesBuilder colorBarAttributesBuilder); + public abstract ColorBarAttributesBuilder getColorBarAttributesBuilder(); public abstract int getNumIntervals(); @@ -86,8 +101,9 @@ public interface IColorBar { public abstract String getDisplayUnitStr(); - public abstract int getNumPixelsToReAlignLabel(); + public abstract boolean isAlignLabelInTheMiddleOfInterval(); + public abstract void setAlignLabelInTheMiddleOfInterval(boolean b); // Methods to get/set values for the colorBar intervals and colors // public abstract boolean isValueInInterval( int c, Float value, Unit units ); @@ -133,5 +149,24 @@ public interface IColorBar { public abstract void setColorDevice( Display disp ); public abstract void dispose(); + + public abstract void setAttributesFromColorBarAttributesBuilder(ColorBarAttributesBuilder colorBarAttributesBuilder); + + public abstract void setDrawColorBar(Boolean b); + + public abstract Boolean isDrawColorBar(); + + public abstract Boolean isDrawBoxAroundColorBar(); + + public abstract void setDrawBoxAroundColorBar(Boolean drawBoxAroundColorBar); + + public abstract void setYPixelCoordFraction(double yPixelCoordFraction) ; + + public abstract void setXPixelCoordFraction(double xPixelCoordFraction) ; + + public abstract double getXPixelCoordFraction(); + + public abstract double getYPixelCoordFraction(); + } diff --git a/ncep/gov.noaa.nws.ncep.viz.ui.display/src/gov/noaa/nws/ncep/viz/ui/display/NCLegendHandler.java b/ncep/gov.noaa.nws.ncep.viz.ui.display/src/gov/noaa/nws/ncep/viz/ui/display/NCLegendHandler.java index 4aed2d973f..8cc463b3f9 100644 --- a/ncep/gov.noaa.nws.ncep.viz.ui.display/src/gov/noaa/nws/ncep/viz/ui/display/NCLegendHandler.java +++ b/ncep/gov.noaa.nws.ncep.viz.ui.display/src/gov/noaa/nws/ncep/viz/ui/display/NCLegendHandler.java @@ -19,33 +19,26 @@ **/ package gov.noaa.nws.ncep.viz.ui.display; + +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.util.ArrayList; + +import java.util.List; + import org.eclipse.swt.SWT; import org.eclipse.swt.widgets.Event; - -import com.raytheon.uf.common.status.UFStatus.Priority; import com.raytheon.uf.viz.core.IDisplayPane; -import com.raytheon.uf.viz.core.IDisplayPaneContainer; -import com.raytheon.uf.viz.core.IExtent; -import com.raytheon.uf.viz.core.IGraphicsTarget; -import com.raytheon.uf.viz.core.VizApp; -import com.raytheon.uf.viz.core.drawables.IDescriptor; import com.raytheon.uf.viz.core.drawables.IRenderableDisplay; import com.raytheon.uf.viz.core.drawables.ResourcePair; -import com.raytheon.uf.viz.core.exception.VizException; -import com.raytheon.uf.viz.core.rsc.AbstractResourceData; import com.raytheon.uf.viz.core.rsc.AbstractVizResource; import com.raytheon.uf.viz.core.rsc.ResourceList; -import com.raytheon.uf.viz.core.rsc.IInputHandler.InputPriority; import com.raytheon.uf.viz.core.rsc.capabilities.BlendableCapability; import com.raytheon.uf.viz.core.rsc.capabilities.BlendedCapability; -import com.raytheon.uf.viz.core.rsc.capabilities.ColorMapCapability; import com.raytheon.uf.viz.core.rsc.capabilities.EditableCapability; -import com.raytheon.uf.viz.core.rsc.capabilities.IMiddleClickCapableResource; -import com.raytheon.viz.ui.cmenu.AbstractRightClickAction; -import com.raytheon.viz.ui.cmenu.ChooseColorAction; -import com.raytheon.viz.ui.cmenu.ColorEditDialogAction; import com.raytheon.viz.ui.input.EditableManager; + /** * This handler is responsible for picking up mouse clicks and key press events on resources in * the legend @@ -57,6 +50,15 @@ import com.raytheon.viz.ui.input.EditableManager; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * 02/03/2012 S. Gurung Initial creation + * 06/25/2012 827 Archana Updated handleKeyUp() to + * toggle the display of the + * resources based on the + * UP/DOWN arrow key pressed. + * 07/27/2012 695 B. Yin Added middle mouse click to toggle editable resource. + * 08/09/2012 839 Archana Updated to toggle the colorbar when + * its corresponding resource is toggled on/off. + * + * * * * @@ -75,14 +77,17 @@ public class NCLegendHandler extends AbstractNCLegendInputHandler { private ResourcePair mouseDownRsc = null; - private int currentRscIndex = 0; + private static int currentRscIndex = 0; private boolean isShiftDown = false; + private static boolean isFirstTime = true; + + @Override public boolean handleMouseDown(int x, int y, int mouseButton) { - if (mouseButton ==1) { + if (mouseButton ==1 || mouseButton ==2) { //IDisplayPaneContainer editor = getResourceContainer(); //if (prefManager.handleClick(HIDE_RESOURCE_PREF, mouseButton)) { NCMapEditor editor = NmapUiUtils.getActiveNatlCntrsEditor(); //AbstractEditor @@ -99,9 +104,9 @@ public class NCLegendHandler extends AbstractNCLegendInputHandler { @Override public boolean handleMouseUp(int x, int y, int mouseButton) { - if (mouseButton ==1) { - NCMapEditor editor = NmapUiUtils.getActiveNatlCntrsEditor(); //AbstractEditor + NCMapEditor editor = NmapUiUtils.getActiveNatlCntrsEditor(); //AbstractEditor + if (mouseButton ==1) { if( editor != null && editor instanceof NCMapEditor ) { IDisplayPane activePane = editor.getActiveDisplayPane(); IRenderableDisplay display = editor.getActiveDisplayPane() @@ -110,14 +115,66 @@ public class NCLegendHandler extends AbstractNCLegendInputHandler { activePane.getTarget(), x, y); if (rsc != null && rsc == mouseDownRsc) { + mouseDownRsc = null; toggleVisibility(rsc); + try { + Method getColorBarMethod = rsc.getResourceData().getClass().getMethod("getColorBar"); + if( getColorBarMethod != null ){ + Object colorBar = getColorBarMethod.invoke(rsc.getResourceData()); + if ( colorBar != null ){ + ResourceList theMainList = NmapUiUtils.getActiveNatlCntrsEditor().getActiveDisplayPane().getDescriptor().getResourceList(); + for ( ResourcePair resourcePair : theMainList){ + + if (resourcePair.getResource().getClass().getSimpleName().compareTo("ColorBarResource") == 0 ){ + Method rscDataColorBarMethod = resourcePair.getResourceData().getClass().getMethod("getColorbar" ); + Object colorBarFromCBarResource = rscDataColorBarMethod.invoke( resourcePair.getResourceData()); + if (colorBarFromCBarResource.equals(colorBar)){ + if ( rsc.getProperties().isVisible() ){ + resourcePair.getProperties().setVisible(true); + } + else{ + resourcePair.getProperties().setVisible(false); + } + break; + } + } + } + } + } + } catch (SecurityException e) { + // TODO Auto-generated catch block + + } catch (NoSuchMethodException e) { + // TODO Auto-generated catch block + + } catch(InvocationTargetException e){ + + }catch (IllegalAccessException e ){ + + } editor.refresh(); return true; } } } + else if (mouseButton == 2 ){ + + if (mouseDownRsc != null && mouseDownRsc.getResource() + .hasCapability(EditableCapability.class)) { + // check / make editable + EditableManager.makeEditable( + mouseDownRsc.getResource(), + !mouseDownRsc.getResource() + .getCapability(EditableCapability.class) + .isEditable()); + mouseDownRsc = null; + + editor.refresh(); + return true; + } + } return false; } @@ -149,62 +206,164 @@ public class NCLegendHandler extends AbstractNCLegendInputHandler { @Override public boolean handleKeyUp(int keyCode) { + if ( keyCode != SWT.SHIFT && keyCode != SWT.ARROW_UP && keyCode != SWT.ARROW_DOWN ) { + return false; + } + + if ( keyCode == SWT.SHIFT ) { - isShiftDown = false; + isShiftDown = true; } - NCMapEditor editor = NmapUiUtils.getActiveNatlCntrsEditor(); //AbstractEditor - if ( (keyCode==SWT.ARROW_UP) || (keyCode==SWT.ARROW_DOWN) ) { + NCMapEditor editor = NmapUiUtils.getActiveNatlCntrsEditor(); + ResourceList theMainList = editor.getActiveDisplayPane().getDescriptor().getResourceList(); + + List subListOfResourcesToToggle = new ArrayList(0); + List listOfCorrespondingColorBarResources = new ArrayList(0); if ( isShiftDown ) { /* - * Make all resources visible + * Pressing the Shift key with either the up or the down arrow key makes + * all the non-system/non map layer resources visible. */ - ResourceList rl = editor.getActiveDisplayPane().getDescriptor().getResourceList(); - for (int i=0; i < rl.size(); i++ ) { - rl.get(i).getProperties().setVisible(true); + if (( keyCode == SWT.ARROW_UP || keyCode == SWT.ARROW_DOWN)){ + for ( ResourcePair resPair : theMainList){ + resPair.getProperties().setVisible(true); } + } + }else{ + + /* + * Create 2 sublists.One for the colorbar resources and one for the + * requestable resources (non-system and non-map layer resources) + * Set the visibility for all the resources in both lists to false. + */ + + for ( ResourcePair resPair : theMainList){ + + if ( ! resPair.getProperties().isSystemResource() + && !resPair.getProperties().isMapLayer()){ + subListOfResourcesToToggle.add(resPair); + resPair.getProperties().setVisible(false); + } + else if(resPair.getResource().getClass().getSimpleName().compareTo("ColorBarResource") == 0){ + listOfCorrespondingColorBarResources.add(resPair); + resPair.getProperties().setVisible(false); } + } + + if(subListOfResourcesToToggle.isEmpty()) + return false; + + int listSize = subListOfResourcesToToggle.size(); + + if ( keyCode == SWT.ARROW_UP ){ + /*The navigation seems counter-intuitive. Yet this works since + *the elements displayed in the legend resource are listed from + *bottom-up + * + *The very first time either the up arrow is pressed + *the currentRscIndex gets initialized to the first element in the list + *Subsequently, if the up arrow is pressed, the index is incremented. + *If it points beyond the index of the last resource, + *then it gets reset to the index of the first resource + */ + if ( isFirstTime || isShiftDown) + currentRscIndex = 0; else { - ResourceList rl = editor.getActiveDisplayPane().getDescriptor().getResourceList(); + currentRscIndex++; + if(currentRscIndex > (listSize - 1)) + currentRscIndex = 0; + } - int incr = 1; - if (keyCode==SWT.ARROW_DOWN) incr = -1; + }else if (keyCode == SWT.ARROW_DOWN ){ /* - * look for next non map/system layer resource + *The very first time either the down arrow is pressed + *the currentRscIndex gets initialized to the index of the last + *resource in the list + *Subsequently, if the down arrow is pressed, the index is decremented. + *If it points beyond the index of the first resource, + *then it gets set to the index of the last resource */ - int search = currentRscIndex; - do { - search += incr; - if ( search < 0 ) search = rl.size() - 1; - if ( search >= rl.size() ) search = 0; - if ( ! rl.get(search).getProperties().isMapLayer() ) { - currentRscIndex = search; - break; + + if(isFirstTime || isShiftDown) + currentRscIndex = listSize - 1; + else{ + currentRscIndex--; + if( currentRscIndex < 0 ) + currentRscIndex = listSize - 1; } - } while ( search != currentRscIndex ); - /* - * turn off all non map/system layer resources + } + + + /*Make the resource visible*/ + ResourcePair rscToSetVisible = subListOfResourcesToToggle.get(currentRscIndex); + rscToSetVisible.getProperties().setVisible(true); + + /*If rscToSetVisible has a color bar,find the matching colorbar from listOfCorrespondingColorBarResources + *and make it visible as well. */ - for (int i=0; i < rl.size(); i++ ) { - if ( rl.get(i).getProperties().isMapLayer() || rl.get(i).getProperties().isSystemResource()) - rl.get(i).getProperties().setVisible(true); - else - rl.get(i).getProperties().setVisible(false); + try { + + + Method[] arrayOfMethods = rscToSetVisible.getResourceData().getClass().getMethods(); + for(Method thisMethod: arrayOfMethods ){ + if(thisMethod.getName().compareTo("getColorBar") == 0){ + Object resClrBar = thisMethod.invoke(rscToSetVisible.getResourceData()); + if(resClrBar != null ){ + for(ResourcePair cBarResPair: listOfCorrespondingColorBarResources ){ + Method getColorBarMethod = cBarResPair.getResourceData().getClass().getMethod("getColorbar"); + Object clrBar = getColorBarMethod.invoke(cBarResPair.getResourceData()); + if(resClrBar.equals(clrBar)){ + cBarResPair.getProperties().setVisible(true); + break; + } } + } + } + } + - // re-enable selected resource. - rl.get(currentRscIndex).getProperties().setVisible(true); + } catch (SecurityException e) { + + e.printStackTrace(); + } catch (NoSuchMethodException e) { + + e.printStackTrace(); } - editor.refresh(); + catch (IllegalArgumentException e) { + + e.printStackTrace(); + } catch (IllegalAccessException e) { + + e.printStackTrace(); + } catch (InvocationTargetException e) { + + e.printStackTrace(); + } + + if ( isFirstTime && ( ( keyCode == SWT.ARROW_DOWN ) || ( keyCode == SWT.ARROW_UP ) )) + isFirstTime = false; } + + + if( isShiftDown ){ + /* + *If the shift key was used to make all the resources + *visible again, the isFirstTime boolean is set to true + *So in effect the currentRscIndex is reset to either the first or the last + *non system/non map layer resource depending on which arrow key is + *subsequently pressed. + */ isShiftDown = false; + isFirstTime = true; + } return false; } @@ -246,9 +405,47 @@ public class NCLegendHandler extends AbstractNCLegendInputHandler { .toggle(rp); } } + return; } } rp.getProperties().setVisible(!rp.getProperties().isVisible()); } } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ncep/gov.noaa.nws.ncep.viz.ui.display/src/gov/noaa/nws/ncep/viz/ui/display/NCLegendResource.java b/ncep/gov.noaa.nws.ncep.viz.ui.display/src/gov/noaa/nws/ncep/viz/ui/display/NCLegendResource.java index f483007d40..8224d74577 100644 --- a/ncep/gov.noaa.nws.ncep.viz.ui.display/src/gov/noaa/nws/ncep/viz/ui/display/NCLegendResource.java +++ b/ncep/gov.noaa.nws.ncep.viz.ui.display/src/gov/noaa/nws/ncep/viz/ui/display/NCLegendResource.java @@ -39,6 +39,7 @@ import com.raytheon.uf.viz.core.rsc.IInputHandler; import com.raytheon.uf.viz.core.rsc.LoadProperties; import com.raytheon.uf.viz.core.rsc.ResourceList; import com.raytheon.uf.viz.core.rsc.IInputHandler.InputPriority; +import com.raytheon.uf.viz.core.rsc.capabilities.EditableCapability; import com.raytheon.uf.viz.core.rsc.legend.AbstractLegendResource; import com.raytheon.viz.ui.cmenu.AbstractRightClickAction; import com.raytheon.viz.ui.cmenu.EnableDisableAction; @@ -58,6 +59,7 @@ import com.raytheon.viz.ui.cmenu.RemoveResourceAction; * Added mouse handlers, initInternal, toggleVisibility. See D2DLegendResource * 02/06/2011 S. Gurung Separated/moved input handler code to class NCLegendHandler * 02/29/2011 651 Archana Added the overridden method fillContextMenu() + * 07/27/2012 695 B. Yin Added editable capability for resource legends * * * @author ghull @@ -110,6 +112,12 @@ public class NCLegendResource extends continue; } else { legend.label = rsc.getName(); + //if the resource is editable, add (Editable) to the legend string + if (rsc.hasCapability(EditableCapability.class) + && rsc.getCapability(EditableCapability.class) + .isEditable()) { + legend.label += " (Editable) "; + } legend.resource = resourcePair; } @@ -195,58 +203,58 @@ public class NCLegendResource extends return super.checkLabelSpace(descriptor, target, x, y); } - @Override - protected void fillContextMenu(IMenuManager menuManager, - ResourcePair selectedResource) { - - MoveUpAction upAction = new MoveUpAction(); - MoveDownAction downAction = new MoveDownAction(); - EnableDisableAction enableDisableAction = new EnableDisableAction(); - RemoveResourceAction rrAction = new RemoveResourceAction(); - NCMapEditor container = NmapUiUtils.getActiveNatlCntrsEditor(); - - upAction.setContainer(container); - upAction.setSelectedRsc(selectedResource); - downAction.setContainer(container); - downAction.setSelectedRsc(selectedResource); - enableDisableAction.setContainer(container); - enableDisableAction.setSelectedRsc(selectedResource); - rrAction.setContainer(container); - rrAction.setSelectedRsc(selectedResource); - - AbstractVizResource thisResource = selectedResource.getResource(); - //Cyclic dependancy work-around.. - Object editRscAttrsAction = null; - Method[] arrayOfMethods = thisResource.getClass().getMethods(); - for ( Method m : arrayOfMethods ){ - if ( m.getName().compareTo("resourceAttrsModified") == 0){ - try { - editRscAttrsAction = Class.forName("gov.noaa.nws.ncep.viz.resources.attributes.EditResourceAttrsAction").newInstance(); - ( ( AbstractRightClickAction ) editRscAttrsAction ).setContainer(container); - ( ( AbstractRightClickAction ) editRscAttrsAction ).setSelectedRsc(selectedResource); - break; - } catch (InstantiationException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (IllegalAccessException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (ClassNotFoundException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - } - } - - if ( editRscAttrsAction != null ) - menuManager.add( ( IAction )editRscAttrsAction); - - menuManager.add(upAction); - menuManager.add(downAction); - menuManager.add(enableDisableAction); - menuManager.add(rrAction); - - } +// @Override +// protected void fillContextMenu(IMenuManager menuManager, +// ResourcePair selectedResource) { +// +// MoveUpAction upAction = new MoveUpAction(); +// MoveDownAction downAction = new MoveDownAction(); +// EnableDisableAction enableDisableAction = new EnableDisableAction(); +// RemoveResourceAction rrAction = new RemoveResourceAction(); +// NCMapEditor container = NmapUiUtils.getActiveNatlCntrsEditor(); +// +// upAction.setContainer(container); +// upAction.setSelectedRsc(selectedResource); +// downAction.setContainer(container); +// downAction.setSelectedRsc(selectedResource); +// enableDisableAction.setContainer(container); +// enableDisableAction.setSelectedRsc(selectedResource); +// rrAction.setContainer(container); +// rrAction.setSelectedRsc(selectedResource); +// +// AbstractVizResource thisResource = selectedResource.getResource(); +// //Cyclic dependancy work-around.. +// Object editRscAttrsAction = null; +// Method[] arrayOfMethods = thisResource.getClass().getMethods(); +// for ( Method m : arrayOfMethods ){ +// if ( m.getName().compareTo("resourceAttrsModified") == 0){ +// try { +// editRscAttrsAction = Class.forName("gov.noaa.nws.ncep.viz.resources.attributes.EditResourceAttrsAction").newInstance(); +// ( ( AbstractRightClickAction ) editRscAttrsAction ).setContainer(container); +// ( ( AbstractRightClickAction ) editRscAttrsAction ).setSelectedRsc(selectedResource); +// break; +// } catch (InstantiationException e) { +// // TODO Auto-generated catch block +// e.printStackTrace(); +// } catch (IllegalAccessException e) { +// // TODO Auto-generated catch block +// e.printStackTrace(); +// } catch (ClassNotFoundException e) { +// // TODO Auto-generated catch block +// e.printStackTrace(); +// } +// +// } +// } +// +// if ( editRscAttrsAction != null ) +// menuManager.add( ( IAction )editRscAttrsAction); +// +// menuManager.add(upAction); +// menuManager.add(downAction); +// menuManager.add(enableDisableAction); +// menuManager.add(rrAction); +// +// } } \ No newline at end of file diff --git a/ncep/gov.noaa.nws.ncep.viz.ui.display/src/gov/noaa/nws/ncep/viz/ui/display/NCMapDescriptor.java b/ncep/gov.noaa.nws.ncep.viz.ui.display/src/gov/noaa/nws/ncep/viz/ui/display/NCMapDescriptor.java index 4fcec3c55e..bde3b735d4 100644 --- a/ncep/gov.noaa.nws.ncep.viz.ui.display/src/gov/noaa/nws/ncep/viz/ui/display/NCMapDescriptor.java +++ b/ncep/gov.noaa.nws.ncep.viz.ui.display/src/gov/noaa/nws/ncep/viz/ui/display/NCMapDescriptor.java @@ -7,15 +7,9 @@ */ package gov.noaa.nws.ncep.viz.ui.display; - - - - import java.lang.reflect.Method; import java.text.SimpleDateFormat; import java.util.Calendar; -import java.util.HashSet; -import java.util.Set; import java.util.TimeZone; import javax.xml.bind.annotation.XmlAccessType; @@ -24,7 +18,6 @@ import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; -import org.eclipse.ui.PlatformUI; import org.geotools.coverage.grid.GridGeometry2D; import org.opengis.referencing.FactoryException; import org.opengis.referencing.crs.CoordinateReferenceSystem; @@ -32,16 +25,12 @@ import org.opengis.referencing.operation.TransformException; import com.raytheon.uf.common.time.DataTime; import com.raytheon.uf.viz.core.AbstractTimeMatcher; -import com.raytheon.uf.viz.core.IDisplayPane; -import com.raytheon.uf.viz.core.datastructure.LoopProperties; import com.raytheon.uf.viz.core.drawables.IDescriptor; import com.raytheon.uf.viz.core.drawables.ResourcePair; -import com.raytheon.uf.viz.core.drawables.IDescriptor.IFrameChangedListener; import com.raytheon.uf.viz.core.exception.VizException; import com.raytheon.uf.viz.core.map.MapDescriptor; import com.raytheon.uf.viz.core.rsc.AbstractRequestableResourceData; import com.raytheon.uf.viz.core.rsc.AbstractVizResource; -import com.raytheon.viz.ui.editor.AbstractEditor; import com.vividsolutions.jts.geom.Coordinate; /** @@ -82,6 +71,8 @@ public class NCMapDescriptor extends MapDescriptor { @XmlElement private Boolean autoUpdate = false; + private Boolean suspendZoom = false; + public Boolean isAutoUpdate() { return autoUpdate; } @@ -93,6 +84,14 @@ public class NCMapDescriptor extends MapDescriptor { } } + public Boolean getSuspendZoom() { + return suspendZoom; + } + + public void setSuspendZoom(Boolean suspendZoom) { + this.suspendZoom = suspendZoom; + } + public NCMapDescriptor() throws VizException { super(); } @@ -253,7 +252,6 @@ public class NCMapDescriptor extends MapDescriptor { } } - /*** * Overridden method to refresh all the contribution items in the status bar * each time the index of the frame changes during looping. @@ -266,31 +264,23 @@ public class NCMapDescriptor extends MapDescriptor { // bsteffen remove Override as super calss does not have this method TODO // make sure this works // @Override - /* Chin this is not supported since 11.5 - public void handleDataTimeIndex(LoopProperties loopProperties) - throws VizException { - - int localDateIndex = getCurrentFrame(); - // bsteffen removed call to super, as super does not ahve this. - // super.handleDataTimeIndex(loopProperties); - if (localDateIndex != getCurrentFrame()) { - // Chin: fixed a race condition that when user switch editor to - // NON-NCMapEditor editor, - // for example NsharpSkewtEditor, and the last looping notice event - // arrived to here. - // At such scenario, current active editor is NsharpSkewtEditor. If - // just blindly - // type cast to NCMapEditor, then a type cast error exception will - // be thrown. - AbstractEditor editor = (AbstractEditor) (PlatformUI.getWorkbench() - .getActiveWorkbenchWindow().getActivePage() - .getActiveEditor()); - if (editor instanceof NCMapEditor) { - NCMapEditor nmapEditor = (NCMapEditor) editor; - nmapEditor.refreshGUIElements(); - } - } - }*/ + /* + * Chin this is not supported since 11.5 public void + * handleDataTimeIndex(LoopProperties loopProperties) throws VizException { + * + * int localDateIndex = getCurrentFrame(); // bsteffen removed call to + * super, as super does not ahve this. // + * super.handleDataTimeIndex(loopProperties); if (localDateIndex != + * getCurrentFrame()) { // Chin: fixed a race condition that when user + * switch editor to // NON-NCMapEditor editor, // for example + * NsharpSkewtEditor, and the last looping notice event // arrived to here. + * // At such scenario, current active editor is NsharpSkewtEditor. If // + * just blindly // type cast to NCMapEditor, then a type cast error + * exception will // be thrown. AbstractEditor editor = (AbstractEditor) + * (PlatformUI.getWorkbench() .getActiveWorkbenchWindow().getActivePage() + * .getActiveEditor()); if (editor instanceof NCMapEditor) { NCMapEditor + * nmapEditor = (NCMapEditor) editor; nmapEditor.refreshGUIElements(); } } } + */ // @SuppressWarnings("deprecation") // @Override // public void checkDrawTime(LoopProperties loopProperties) { @@ -305,10 +295,13 @@ public class NCMapDescriptor extends MapDescriptor { // if (loopProperties.isLooping() && loopProperties.isShouldDraw()) { // int currentFrame = this.getCurrentFrame(); // int totalFrames = this.getFrameCount(); -// System.out.println("NcMapD checkDrawTime curFram="+currentFrame+ " totalFrame="+totalFrames); + // System.out.println("NcMapD checkDrawTime curFram="+currentFrame+ + // " totalFrame="+totalFrames); // -// IDescriptor.FrameChangeMode mode = IDescriptor.FrameChangeMode.valueOf("TIME_ONLY"); -// IDescriptor.FrameChangeOperation operation = IDescriptor.FrameChangeOperation.valueOf("NEXT"); + // IDescriptor.FrameChangeMode mode = + // IDescriptor.FrameChangeMode.valueOf("TIME_ONLY"); + // IDescriptor.FrameChangeOperation operation = + // IDescriptor.FrameChangeOperation.valueOf("NEXT"); // for (IFrameChangedListener lstnr : listenerSet) { // lstnr.frameChanged(operation, mode); // } diff --git a/ncep/gov.noaa.nws.ncep.viz.ui.display/src/gov/noaa/nws/ncep/viz/ui/display/NCMapEditor.java b/ncep/gov.noaa.nws.ncep.viz.ui.display/src/gov/noaa/nws/ncep/viz/ui/display/NCMapEditor.java index 2fa9004bf7..95e9793fa3 100644 --- a/ncep/gov.noaa.nws.ncep.viz.ui.display/src/gov/noaa/nws/ncep/viz/ui/display/NCMapEditor.java +++ b/ncep/gov.noaa.nws.ncep.viz.ui.display/src/gov/noaa/nws/ncep/viz/ui/display/NCMapEditor.java @@ -20,10 +20,15 @@ package gov.noaa.nws.ncep.viz.ui.display; +import java.util.ArrayList; +import java.util.Arrays; import java.util.HashMap; +import java.util.List; import gov.noaa.nws.ncep.viz.common.AbstractNcEditor; import gov.noaa.nws.ncep.viz.common.EditorManager; +import gov.noaa.nws.ncep.viz.common.preferences.NcepGeneralPreferencesPage; +import gov.noaa.nws.ncep.viz.common.ui.NmapCommon; //import gov.noaa.nws.ncep.viz.ui.display.NCMapDescriptor.IFrameChangedListener; import gov.noaa.nws.ncep.viz.ui.display.NCPaneManager.PaneLayout; @@ -35,6 +40,7 @@ import org.eclipse.core.commands.NotHandledException; import org.eclipse.core.commands.common.NotDefinedException; import org.eclipse.jface.action.IContributionItem; import org.eclipse.jface.action.SubStatusLineManager; +import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.swt.widgets.Composite; import org.eclipse.ui.IEditorInput; import org.eclipse.ui.IEditorSite; @@ -91,6 +97,9 @@ import com.raytheon.viz.ui.panes.PaneManager; * 07/15/11 C Chen add implements AbstractNcEditor. fix looping buttons not coordinated issue * 11/11/11 ghull remove frameChangeListener from all descriptors * 12/02/11 #571 ghull check for activePage in refreshGUIElements and in dispose() + * 07/12/12 ### ghull call refreshGUIElements on paneChange. Select all panes at once instead of selecting/deselecting. + * 07/31/12 #631 ghull check promptOnClose preference to set isDirty. + * * * * @author chammack @@ -288,7 +297,6 @@ public class NCMapEditor extends VizMultiPaneEditor implements AbstractNcEditor } contributePerspectiveActions(); - } // @@ -410,24 +418,33 @@ public class NCMapEditor extends VizMultiPaneEditor implements AbstractNcEditor // way of a radio behaviour. public void selectPane(IDisplayPane selPane, boolean radioBehaviour) { - // first select the given pane - if (!isSelectedPane(selPane)) { - ((NCPaneManager) editorInput.getPaneManager()) - .selectPane((NCDisplayPane) selPane); - } + // get a list of the panes to be selected. + // + List seldPanes; - // if radio behavour then deselect all the other panes. - // (if the selPane is not found then if (radioBehaviour) { - IDisplayPane[] dispPanes = getDisplayPanes(); + seldPanes = new ArrayList(); + seldPanes.add( selPane ); + } + else { + IDisplayPane[] dispPanes = getSelectedPanes(); //getDisplayPanes(); + seldPanes = new ArrayList( Arrays.asList( dispPanes ) ); - for (IDisplayPane pane : dispPanes) { - if (pane != selPane && isSelectedPane(pane)) { - ((NCPaneManager) editorInput.getPaneManager()) - .deselectPane(pane); + if( seldPanes.contains( selPane ) && + seldPanes.size() > 1 ) { + seldPanes.remove( selPane ); } + else { + seldPanes.add( selPane ); } } + + if( !seldPanes.isEmpty() ) { + ((NCPaneManager) editorInput.getPaneManager()) + .selectPanes( seldPanes ); + } + + refreshGUIElements(); } // Currently this just sets the listener for 1 (the active) pane. @@ -455,13 +472,15 @@ public class NCMapEditor extends VizMultiPaneEditor implements AbstractNcEditor // // // Note: this will not get called unless the editor is dirty and - // currently - // // we never do this. // // Also Note that this will bypass raytheon's disableClose so that if we // // implement // // isDirty and still want to allow some of our Editors to not be closed // // (nsharp?), then // // we will need to override disableClose. + @Override + public int promptToSaveOnClose() { + return super.promptToSaveOnClose(); + } // @Override // public int promptToSaveOnClose() { // if (PlatformUI.getWorkbench().isClosing()) { @@ -484,27 +503,28 @@ public class NCMapEditor extends VizMultiPaneEditor implements AbstractNcEditor // // @Override public boolean isDirty() { - // // for( IDisplayPane pane : getDisplayPanes() ) { - // // IRenderableDisplay display = pane.getRenderableDisplay(); - // // if (display != null) { - // // for (ResourcePair rp : display.getDescriptor() - // // .getResourceList()) { - // // if( rp.getResource() instanceof AbstractNatlCntrsResource ) { - // // if( ((AbstractNatlCntrsResource)rp.getResource()).isDirty() ) { - // // return true; - // // } - // // } - // // // raytheons test... - // // ResourceProperties props = rp.getProperties(); - // // if (!props.isSystemResource() && !props.isMapLayer()) { - // // return true; - // // } - // // } - // // } - // // } - return false; + +// for( IDisplayPane pane : getDisplayPanes() ) { +// IRenderableDisplay display = pane.getRenderableDisplay(); +// if (display != null) { +// for (ResourcePair rp : display.getDescriptor() +// .getResourceList()) { +// if( rp.getResource() instanceof AbstractNatlCntrsResource ) { +// if( ((AbstractNatlCntrsResource)rp.getResource()).isDirty() ) { +// return true; +// } +// } +// // raytheons test... +// ResourceProperties props = rp.getProperties(); +// if (!props.isSystemResource() && !props.isMapLayer()) { +// return true; +// } +// } +// } +// } + return NmapCommon.getNcepPreferenceStore().getBoolean( NcepGeneralPreferencesPage.PromptOnDisplayClose ); } - // + public String getApplicationName() { return applicationName; } diff --git a/ncep/gov.noaa.nws.ncep.viz.ui.display/src/gov/noaa/nws/ncep/viz/ui/display/NCPaneManager.java b/ncep/gov.noaa.nws.ncep.viz.ui.display/src/gov/noaa/nws/ncep/viz/ui/display/NCPaneManager.java index 8fc40b40bd..30a6489a27 100644 --- a/ncep/gov.noaa.nws.ncep.viz.ui.display/src/gov/noaa/nws/ncep/viz/ui/display/NCPaneManager.java +++ b/ncep/gov.noaa.nws.ncep.viz.ui.display/src/gov/noaa/nws/ncep/viz/ui/display/NCPaneManager.java @@ -3,6 +3,7 @@ package gov.noaa.nws.ncep.viz.ui.display; import java.awt.image.BufferedImage; import java.util.ArrayList; import java.util.HashSet; +import java.util.List; import java.util.Set; import javax.xml.bind.annotation.XmlAccessType; @@ -56,8 +57,11 @@ import com.vividsolutions.jts.geom.Coordinate; * * SOFTWARE HISTORY * - * Date Ticket# Engineer Description ------------ ---------- ----------- - * -------------------------- 03/07/11 R1G2-9 Greg Hull Created + * Date Ticket# Engineer Description + * ------------ ---------- ----------- -------------------------- + * 03/07/11 R1G2-9 Greg Hull Created + * 07/18/12 #649 Shova Gurung Fixed echo/virtual cursor display issue. + * 09/13/12 ? B. Yin Refresh only for multiple panes * * * @@ -201,7 +205,11 @@ public class NCPaneManager extends PaneManager { } } + //Refresh only for multiple panes. + if ( getNumberofPanes() > 1 ){ + refresh(); + } return false; } @@ -234,12 +242,13 @@ public class NCPaneManager extends PaneManager { inputManager = new InputManager(this); + // sgurung: moved the following code to initializeComponents(...) // Enable the inspect adapters // handles the VirtualCursor and selecting the panes - if (paneContainer instanceof NCMapEditor) { + /*if (paneContainer instanceof NCMapEditor) { inputManager.registerMouseHandler(new NcPaneMouseHandler( (NCMapEditor) paneContainer), InputPriority.PERSPECTIVE); - } + }*/ displayPanes = new ArrayList(); selectedPanes = new ArrayList(); @@ -268,6 +277,13 @@ public class NCPaneManager extends PaneManager { parentComposite = parent; parentComposite.setLayout(gl); + // Enable the inspect adapters + // handles the VirtualCursor and selecting the panes + if (paneContainer instanceof NCMapEditor) { + inputManager.registerMouseHandler(new NcPaneMouseHandler( + (NCMapEditor) paneContainer), InputPriority.PERSPECTIVE); + } + // create the Composites for the panes ahead of time be // Composite canvasComp = new Composite(composite, SWT.NONE); // GridLayout gl = new GridLayout(1, false); @@ -402,37 +418,54 @@ public class NCPaneManager extends PaneManager { // if not already selected then if (!selectedPanes.contains(pane)) { selectedPanes.add((NCDisplayPane) pane); - } - for (ISelectedPanesChangedListener lstnr : listeners) { - lstnr.selectedPanesChanged(NC_PANE_SELECT_ACTION, - getSelectedPanes(NC_PANE_SELECT_ACTION)); - } - - refresh(); +// for( ISelectedPanesChangedListener lstnr : listeners ) { +// lstnr.selectedPanesChanged(NC_PANE_SELECT_ACTION, +// getSelectedPanes(NC_PANE_SELECT_ACTION)); +// } +// refresh(); } public void selectPane(NCDisplayPane pane) { - System.out.println("NCPaneManager selecting pane " + pane.hashCode()); +// System.out.println("NCPaneManager selecting pane " + pane.hashCode()); setSelectedPane(NC_PANE_SELECT_ACTION, pane); } - // if this pane is in the list of selected panes, remove it - // and call the listeners. - public void deselectPane(IDisplayPane pane) { - if (selectedPanes.contains(pane)) { - selectedPanes.remove(pane); + public void selectPanes( List seldPanes ) { + + if( seldPanes.isEmpty() ) { + return; + } + + selectedPanes.clear(); + + for( IDisplayPane p : seldPanes ) { + setSelectedPane(NC_PANE_SELECT_ACTION, p ); + } for (ISelectedPanesChangedListener lstnr : listeners) { lstnr.selectedPanesChanged(NC_PANE_SELECT_ACTION, getSelectedPanes(NC_PANE_SELECT_ACTION)); } - - refresh(); - } } + + // if this pane is in the list of selected panes, remove it + // and call the listeners. +// public void deselectPane(IDisplayPane pane) { +// if (selectedPanes.contains(pane)) { +// selectedPanes.remove(pane); +// +// for (ISelectedPanesChangedListener lstnr : listeners) { +// lstnr.selectedPanesChanged(NC_PANE_SELECT_ACTION, +// getSelectedPanes(NC_PANE_SELECT_ACTION)); +// } +// +// refresh(); +// } +// } + // This method is part of the IPaneManager interface but // for the NC Perspective multiple panes may be selected. // Here we'll return the first selected pane in the list diff --git a/ncep/gov.noaa.nws.ncep.viz.ui.display/src/gov/noaa/nws/ncep/viz/ui/display/NmapUiUtils.java b/ncep/gov.noaa.nws.ncep.viz.ui.display/src/gov/noaa/nws/ncep/viz/ui/display/NmapUiUtils.java index ac94ad6958..1566b63d18 100644 --- a/ncep/gov.noaa.nws.ncep.viz.ui.display/src/gov/noaa/nws/ncep/viz/ui/display/NmapUiUtils.java +++ b/ncep/gov.noaa.nws.ncep.viz.ui.display/src/gov/noaa/nws/ncep/viz/ui/display/NmapUiUtils.java @@ -49,6 +49,7 @@ import com.raytheon.viz.ui.editor.EditorInput; * 02/10/2011 Chin Chen handle multiple editor copies dispose issue * 03/08/2011 migration Greg Hull move Display Name methods to DisplayNameManager * 05/17/2012 #791 Quan Zhou Added findEmptyEditor() to check if default editor is empty + * 08/09/2012 837 Archana Updated getNcDisplayID() to fix a NumberFormatException * * * @author ghull @@ -316,7 +317,13 @@ public class NmapUiUtils { if (indx == -1 || indx > 3) { return -1; } else { - return Integer.parseInt(displayTitle.substring(0, indx)); + try{ + int displayID = Integer.parseInt(displayTitle.substring(0, indx)); + return displayID; + + }catch(NumberFormatException e ){ + return -1; + } } } diff --git a/ncep/gov.noaa.nws.ncep.viz.ui.perspectives/META-INF/MANIFEST.MF b/ncep/gov.noaa.nws.ncep.viz.ui.perspectives/META-INF/MANIFEST.MF index ab051ff267..1dfc6346f3 100644 --- a/ncep/gov.noaa.nws.ncep.viz.ui.perspectives/META-INF/MANIFEST.MF +++ b/ncep/gov.noaa.nws.ncep.viz.ui.perspectives/META-INF/MANIFEST.MF @@ -9,7 +9,7 @@ Require-Bundle: org.eclipse.ui, org.eclipse.core.runtime, org.geotools, com.raytheon.viz.core;bundle-version="1.11.7", - com.raytheon.viz.ui;bundle-version="1.11.7", + com.raytheon.viz.ui, gov.noaa.nws.ncep.viz.ui.display;bundle-version="1.0.0", gov.noaa.nws.ncep.viz.localization;bundle-version="1.0.0", gov.noaa.nws.ncep.viz.resources, @@ -21,7 +21,8 @@ Require-Bundle: org.eclipse.ui, com.raytheon.uf.common.dataplugin.satellite;bundle-version="1.0.0", com.raytheon.uf.viz.application;bundle-version="1.0.0", gov.noaa.nws.ncep.viz.resourceManager;bundle-version="1.0.0", - gov.noaa.nws.ncep.staticdataprovider;bundle-version="1.0.0" + gov.noaa.nws.ncep.staticdataprovider;bundle-version="1.0.0", + com.raytheon.viz.ui.personalities.awips Eclipse-LazyStart: true Export-Package: gov.noaa.nws.ncep.viz.ui.perspectives;uses:="org.eclipse.ui,org.eclipse.ui.plugin,org.osgi.framework" Import-Package: com.raytheon.viz.alerts.observers, diff --git a/ncep/gov.noaa.nws.ncep.viz.ui.perspectives/plugin.xml b/ncep/gov.noaa.nws.ncep.viz.ui.perspectives/plugin.xml index a4ba7517f6..05228c002f 100644 --- a/ncep/gov.noaa.nws.ncep.viz.ui.perspectives/plugin.xml +++ b/ncep/gov.noaa.nws.ncep.viz.ui.perspectives/plugin.xml @@ -49,9 +49,9 @@ + id="NCCAVE" + label="CAVE" + mnemonic="C"> @@ -71,7 +71,7 @@ + value="CREATE_RBD"> + + + + + + + + + + + + + + + + + - @@ -121,7 +157,7 @@ label="Preferences..." style="push" mnemonic="f"> - + --> @@ -137,7 +173,7 @@ label="Print Reverse Image..." style="push"> - @@ -146,7 +182,7 @@ label="Exit..." style="push" mnemonic="E"> - + --> + + label="Fit to Screen"> + + + + + + +