Changeset 526 for palm/trunk/SCRIPTS/NCL/timeseries.ncl
- Timestamp:
- Mar 30, 2010 2:04:38 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SCRIPTS/NCL/timeseries.ncl
r418 r526 33 33 34 34 begin 35 36 ;*************************************************** 37 ; Retrieving the double quote character 38 ;*************************************************** 39 40 dq=str_get_dq() 35 41 36 42 ;*************************************************** … … 344 350 plot_pt_0_ = gsn_csm_xy(wks_ps,t,data_0(:),res) 345 351 plot_pt_zp_ = gsn_csm_xy(wks_ps,t,data_0(:),res) 346 plot_splptx = gsn_csm_xy(wks_ps,t,data_0(:),res)347 plot_splpty = gsn_csm_xy(wks_ps,t,data_0(:),res)348 plot_splptz = gsn_csm_xy(wks_ps,t,data_0(:),res)349 352 end if 350 353 … … 435 438 maxi(varn) = max(data(varn,:)) 436 439 437 if (vNam(varn) .EQ. "E" .OR. vNam(varn) .EQ. "Es" ) then440 if (vNam(varn) .EQ. "E" .OR. vNam(varn) .EQ. "Es" .OR. vNam(varn) .EQ. "E*") then 438 441 if (mini(varn) .EQ. maxi(varn)) then 439 442 if (min(data(varn,:)) .EQ. 0)then … … 454 457 end if 455 458 456 if (vNam(varn) .EQ. "us" .OR. vNam(varn) .EQ. "ws") then 459 if (vNam(varn) .EQ. "us" .OR. vNam(varn) .EQ. "ws"\ 460 .OR. vNam(varn) .EQ. "u*" .OR. vNam(varn) .EQ. "w*") then 457 461 if (mini(varn) .EQ. maxi(varn)) then 458 462 if (min(data(varn,:)) .EQ. 0)then … … 511 515 end if 512 516 513 if (vNam(varn) .EQ. "wpptp0" .OR. vNam(varn) .EQ. "wpptp" .OR. vNam(varn) .EQ. "wpt") then 517 if (vNam(varn) .EQ. "wpptp0" .OR. vNam(varn) .EQ. "wpptp" .OR. vNam(varn) .EQ. "wpt"\ 518 .OR. vNam(varn) .EQ. "w"+dq+"pt"+dq+"0" .OR. vNam(varn) .EQ. "w"+dq+"pt"+dq ) then 514 519 if (mini(varn) .EQ. maxi(varn)) then 515 520 if (min(data(varn,:)) .EQ. 0)then … … 530 535 end if 531 536 532 if (vNam(varn) .EQ. "pt_0_" .OR. vNam(varn) .EQ. "pt_zp_") then 537 if (vNam(varn) .EQ. "pt_0_" .OR. vNam(varn) .EQ. "pt_zp_"\ 538 .OR. vNam(varn) .EQ. "pt(0)" .OR. vNam(varn) .EQ. "pt(zp)") then 533 539 if (mini(varn) .EQ. maxi(varn)) then 534 540 if (min(data(varn,:)) .EQ. 0)then … … 547 553 minp=min((/minp,mini(varn)/)) 548 554 maxp=max((/maxp,maxi(varn)/)) 549 end if550 551 if (vNam(varn) .EQ. "splptx" .OR. vNam(varn) .EQ. "splpty" .OR. vNam(varn) .EQ. "splptz") then552 if (mini(varn) .EQ. maxi(varn)) then553 if (min(data(varn,:)) .EQ. 0)then554 mini(varn)= mini(varn)-0.1555 maxi(varn)= maxi(varn)+0.1556 end if557 if (min(data(varn,:)) .LT. 0)then558 mini(varn)= mini(varn)-1.+(mini(varn))/2559 maxi(varn)= maxi(varn)+1.-(maxi(varn))/2560 end if561 if (min(data(varn,:)) .GT. 0)then562 mini(varn)= mini(varn)-1.-(mini(varn))/2563 maxi(varn)= maxi(varn)+1.+(maxi(varn))/2564 end if565 end if566 mins=min((/mins,mini(varn)/))567 maxs=max((/maxs,maxi(varn)/))568 555 end if 569 556 … … 617 604 plot_E = gsn_csm_xy(wks_ps,t,data(varn,:),res) 618 605 end if 619 if (vNam(varn) .EQ. "Es" )606 if (vNam(varn) .EQ. "Es" .OR. vNam(varn) .EQ. "E*") 620 607 Es=0 621 608 res@xyLineColors = (/144/) … … 625 612 end if 626 613 627 if (vNam(varn) .EQ. "us" )614 if (vNam(varn) .EQ. "us" .OR. vNam(varn) .EQ. "u*") 628 615 us=0 629 616 res@xyLineColors = (/237/) … … 634 621 plot_us = gsn_csm_xy(wks_ps,t,data(varn,:),res) 635 622 end if 636 if (vNam(varn) .EQ. "ws" )623 if (vNam(varn) .EQ. "ws" .OR. vNam(varn) .EQ. "w*") 637 624 ws=0 638 625 res@xyLineColors = (/144/) … … 683 670 end if 684 671 685 if (vNam(varn) .EQ. "wpptp0" )672 if (vNam(varn) .EQ. "wpptp0" .OR. vNam(varn) .EQ. "w"+dq+"pt"+dq+"0" ) 686 673 w0=0 687 674 res@xyLineColors = (/237/) … … 692 679 plot_wpptp0 = gsn_csm_xy(wks_ps,t,data(varn,:),res) 693 680 end if 694 if (vNam(varn) .EQ. "wpptp" )681 if (vNam(varn) .EQ. "wpptp" .OR. vNam(varn) .EQ. "w"+dq+"pt"+dq) 695 682 wp=0 696 683 res@xyLineColors = (/144/) … … 707 694 end if 708 695 709 if (vNam(varn) .EQ. "pt_0_" )696 if (vNam(varn) .EQ. "pt_0_" .OR. vNam(varn) .EQ. "pt(0)") 710 697 p=0 711 698 res@xyLineColors = (/237/) … … 716 703 plot_pt_0_ = gsn_csm_xy(wks_ps,t,data(varn,:),res) 717 704 end if 718 if (vNam(varn) .EQ. "pt_zp_" )705 if (vNam(varn) .EQ. "pt_zp_" .OR. vNam(varn) .EQ. "pt(zp)") 719 706 pz=0 720 707 res@xyLineColors = (/144/) … … 722 709 res@xyLineLabelFontColor = 144 723 710 plot_pt_zp_ = gsn_csm_xy(wks_ps,t,data(varn,:),res) 724 end if725 726 if (vNam(varn) .EQ. "splptx")727 x=0728 res@xyLineColors = (/237/)729 res@xyLineLabelFontHeightF = 0.05730 res@xyLineLabelFontColor = 237731 res@trYMaxF = maxs732 res@trYMinF = mins733 plot_splptx = gsn_csm_xy(wks_ps,t,data(varn,:),res)734 end if735 if (vNam(varn) .EQ. "splpty")736 y=0737 res@xyLineColors = (/144/)738 res@xyLineLabelFontHeightF = 0.05739 res@xyLineLabelFontColor = 144740 plot_splpty = gsn_csm_xy(wks_ps,t,data(varn,:),res)741 end if742 if (vNam(varn) .EQ. "splptz")743 z=0744 res@xyLineColors = (/80/)745 res@xyLineLabelFontHeightF = 0.05746 res@xyLineLabelFontColor = 80747 plot_splptz = gsn_csm_xy(wks_ps,t,data(varn,:),res)748 711 end if 749 712 … … 787 750 lgres@lgDashIndexes = (/0,0,0/) 788 751 lgres@lgLineColors = (/237,144,80/) 789 lbid = gsn_create_legend(wks_ps,2,(/"E","E s"/),lgres)752 lbid = gsn_create_legend(wks_ps,2,(/"E","E*"/),lgres) 790 753 791 754 amres = True … … 794 757 annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres) 795 758 end if 796 if ( vNam(varn) .EQ. "Es".AND. E .NE. 1) then759 if ((vNam(varn) .EQ. "Es" .OR. vNam(varn) .EQ. "E*") .AND. E .NE. 1) then 797 760 Es=1 798 761 overlay(plot_E,plot_Es) … … 812 775 lgres@lgDashIndexes = (/0,0,0/) 813 776 lgres@lgLineColors = (/237,144,80/) 814 lbid = gsn_create_legend(wks_ps,2,(/"E","E s"/),lgres)777 lbid = gsn_create_legend(wks_ps,2,(/"E","E*"/),lgres) 815 778 816 779 amres = True … … 820 783 end if 821 784 822 if ( vNam(varn) .EQ. "us".AND. ws .NE. 1) then785 if ((vNam(varn) .EQ. "us" .OR. vNam(varn) .EQ. "u*") .AND. ws .NE. 1) then 823 786 us=1 824 787 overlay(plot_us,plot_ws) … … 838 801 lgres@lgDashIndexes = (/0,0,0/) 839 802 lgres@lgLineColors = (/237,144,80/) 840 lbid = gsn_create_legend(wks_ps,2,(/"u s","ws"/),lgres)803 lbid = gsn_create_legend(wks_ps,2,(/"u*","w*"/),lgres) 841 804 842 805 amres = True … … 845 808 annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres) 846 809 end if 847 if ( vNam(varn) .EQ. "ws".AND. us .NE. 1) then810 if ((vNam(varn) .EQ. "ws" .OR. vNam(varn) .EQ. "w*") .AND. us .NE. 1) then 848 811 ws=1 849 812 overlay(plot_us,plot_ws) … … 863 826 lgres@lgDashIndexes = (/0,0,0/) 864 827 lgres@lgLineColors = (/237,144,80/) 865 lbid = gsn_create_legend(wks_ps,2,(/"u s","ws"/),lgres)828 lbid = gsn_create_legend(wks_ps,2,(/"u*","w*"/),lgres) 866 829 867 830 amres = True … … 1008 971 end if 1009 972 1010 if ( vNam(varn) .EQ. "wpptp0".AND. wp .NE. 1)973 if ((vNam(varn) .EQ. "wpptp0" .OR. vNam(varn) .EQ. "w"+dq+"pt"+dq+"0") .AND. wp .NE. 1) 1011 974 if (wt .NE. 1) then 1012 975 w0=1 … … 1036 999 end if 1037 1000 end if 1038 if ( vNam(varn) .EQ. "wpptp".AND. w0 .NE. 1)1001 if ((vNam(varn) .EQ. "wpptp" .OR. vNam(varn) .EQ. "w"+dq+"pt"+dq) .AND. w0 .NE. 1) 1039 1002 if (wt .NE. 1) then 1040 1003 wp=1 … … 1093 1056 end if 1094 1057 1095 if ( vNam(varn) .EQ. "pt_0_".AND. pz .NE. 1) then1058 if ((vNam(varn) .EQ. "pt_0_" .OR. vNam(varn) .EQ. "pt(0)") .AND. pz .NE. 1) then 1096 1059 p=1 1097 1060 overlay(plot_pt_0_,plot_pt_zp_) … … 1118 1081 annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres) 1119 1082 end if 1120 if ( vNam(varn) .EQ. "pt_zp_".AND. p .NE. 1) then1083 if ((vNam(varn) .EQ. "pt_zp_" .OR. vNam(varn) .EQ. "pt(zp)") .AND. p .NE. 1) then 1121 1084 pz=1 1122 1085 overlay(plot_pt_0_,plot_pt_zp_) … … 1143 1106 annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres) 1144 1107 end if 1145 1146 if (vNam(varn) .EQ. "splptx" .AND. y .NE. 1) 1147 if (z .NE.1 ) then 1148 x=1 1149 overlay(plot_splptx,plot_splpty) 1150 overlay(plot_splptx,plot_splptz) 1151 n=n+1 1152 plot_ps(n) = plot_splptx 1153 1154 ; *************************************************** 1155 ; legend for combined plot 1156 ; *************************************************** 1157 1158 lgres = True 1159 lgMonoDashIndex = False 1160 lgres@lgLabelFont = "helvetica" 1161 lgres@lgLabelFontHeightF = .1 1162 lgres@vpWidthF = 0.4 1163 lgres@vpHeightF = 0.4 1164 lgres@lgDashIndexes = (/0,0,0/) 1165 lgres@lgLineColors = (/237,144,80/) 1166 lbid = gsn_create_legend(wks_ps,3,(/"splptx","splpty","splptz"/),lgres) 1167 1168 amres = True 1169 amres@amParallelPosF = 0.6 1170 amres@amOrthogonalPosF = -0.2 1171 annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres) 1172 end if 1173 end if 1174 if (vNam(varn) .EQ. "splpty" .AND. x .NE. 1) 1175 if(z .NE.1 ) then 1176 y=1 1177 overlay(plot_splptx,plot_splpty) 1178 overlay(plot_splptx,plot_splptz) 1179 n=n+1 1180 plot_ps(n) = plot_splptx 1181 1182 ; *************************************************** 1183 ; legend for combined plot 1184 ; *************************************************** 1185 1186 lgres = True 1187 lgMonoDashIndex = False 1188 lgres@lgLabelFont = "helvetica" 1189 lgres@lgLabelFontHeightF = .1 1190 lgres@vpWidthF = 0.4 1191 lgres@vpHeightF = 0.4 1192 lgres@lgDashIndexes = (/0,0,0/) 1193 lgres@lgLineColors = (/237,144,80/) 1194 lbid = gsn_create_legend(wks_ps,3,(/"splptx","splpty","splptz"/),lgres) 1195 1196 amres = True 1197 amres@amParallelPosF = 0.6 1198 amres@amOrthogonalPosF = -0.2 1199 annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres) 1200 end if 1201 end if 1202 if (vNam(varn) .EQ. "splptz" .AND. y .NE. 1) 1203 if(x .NE.1 ) then 1204 z=1 1205 overlay(plot_splptx,plot_splpty) 1206 overlay(plot_splptx,plot_splptz) 1207 n=n+1 1208 plot_ps(n) = plot_splptx 1209 1210 ; *************************************************** 1211 ; legend for combined plot 1212 ; *************************************************** 1213 1214 lgres = True 1215 lgMonoDashIndex = False 1216 lgres@lgLabelFont = "helvetica" 1217 lgres@lgLabelFontHeightF = .1 1218 lgres@vpWidthF = 0.4 1219 lgres@vpHeightF = 0.4 1220 lgres@lgDashIndexes = (/0,0,0/) 1221 lgres@lgLineColors = (/237,144,80/) 1222 lbid = gsn_create_legend(wks_ps,3,(/"splptx","splpty","splptz"/),lgres) 1223 1224 amres = True 1225 amres@amParallelPosF = 0.6 1226 amres@amOrthogonalPosF = -0.2 1227 annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres) 1228 end if 1229 end if 1230 1231 if(vNam(varn) .NE. "splptz" .AND. vNam(varn) .NE. "splpty" .AND. vNam(varn) .NE. "splptx" .AND. vNam(varn) .NE. "pt_zp_" .AND. vNam(varn) .NE. "pt_0_" .AND. vNam(varn) .NE. "wpt" .AND. vNam(varn) .NE. "wpptp" .AND. vNam(varn) .NE. "wpptp0" .AND. vNam(varn) .NE. "z_i_pt" .AND. vNam(varn) .NE. "z_i_wpt" .AND. vNam(varn) .NE. "wmax" .AND. vNam(varn) .NE. "vmax" .AND. vNam(varn) .NE. "umax" .AND. vNam(varn) .NE. "ws" .AND. vNam(varn) .NE. "us" .AND. vNam(varn) .NE. "Es" .AND. vNam(varn) .NE. "E") then 1108 1109 if(vNam(varn) .NE. "pt_zp_" .AND. vNam(varn) .NE. "pt(zp)" .AND. \ 1110 vNam(varn) .NE. "pt_0_" .AND. vNam(varn) .NE. "pt(0)" .AND. \ 1111 vNam(varn) .NE. "wpt" .AND. vNam(varn) .NE. "wpptp" .AND. \ 1112 vNam(varn) .NE. "w"+dq+"pt"+dq .AND. vNam(varn) .NE. "wpptp0" .AND. \ 1113 vNam(varn) .NE. "w"+dq+"pt"+dq+"0" .AND. vNam(varn) .NE. "z_i_pt" .AND.\ 1114 vNam(varn) .NE. "z_i_wpt" .AND. vNam(varn) .NE. "wmax" .AND. \ 1115 vNam(varn) .NE. "vmax" .AND. vNam(varn) .NE. "umax" .AND. \ 1116 vNam(varn) .NE. "ws" .AND. vNam(varn) .NE. "w*" .AND. \ 1117 vNam(varn) .NE. "us" .AND. vNam(varn) .NE. "u*" .AND. \ 1118 vNam(varn) .NE. "Es" .AND. vNam(varn) .NE. "E*" .AND. \ 1119 vNam(varn) .NE. "E") then 1120 1232 1121 n=n+1 1233 1122 res@xyLineColors = (/237/)
Note: See TracChangeset
for help on using the changeset viewer.