Changeset 162 for palm/trunk/SCRIPTS/NCL/timeseries.ncl
- Timestamp:
- Apr 30, 2008 1:41:13 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SCRIPTS/NCL/timeseries.ncl
r161 r162 63 63 if ( .not. isvar("over") ) then ; switches overlaying plots on 64 64 over = 0 65 if (stringtointeger(parameter( 73)) .NE. 0) then66 over = stringtointeger(parameter( 73))67 if (stringtointeger(parameter( 73)) .NE. 1) then65 if (stringtointeger(parameter(37)) .NE. 0) then 66 over = stringtointeger(parameter(37)) 67 if (stringtointeger(parameter(37)) .NE. 1) then 68 68 print(" ") 69 69 print("Please set 'over' to 0 or 1") … … 93 93 t_all = f->time 94 94 nt = dimsizes(t_all) 95 delta_t=t_all(nt-1)/nt 95 96 96 97 ; **************************************************** … … 99 100 100 101 if ( .not. isvar("start_time_step") ) then 101 start_time_step = 0 102 if (parameter(13) .NE. "1") then 103 if (parameter(13) .LE. "0") 104 print(" ") 105 print("Begin with time step 1") 102 start_time_step=t_all(0)/3600 103 if (parameter(13) .NE. "t(0)") then 104 if (stringtodouble(parameter(13)) .GE. t_all(nt-1)/3600) 105 print(" ") 106 print("'start_time_step' = "+ parameter(13) +"h is equal or greater than last time step = " + t_all(nt-1)+"s = "+t_all(nt-1)/3600+"h") 107 print(" ") 108 print("Please select another 'start_time_step'") 106 109 print(" ") 107 110 exit 108 111 end if 109 if (stringtointeger(parameter(13)) .GE. nt) 110 print(" ") 111 print("'start_time_step' = "+ parameter(13) +" is greater than available time steps = " + (nt-1)) 112 if (stringtofloat(parameter(13)) .LT. t_all(0)/3600) 113 print(" ") 114 print("'start_time_step' = "+ parameter(13) +"h is lower than first time step = " + t_all(0)+"s = "+t_all(0)/3600+"h") 115 print(" ") 116 print("Please select another 'start_time_step'") 112 117 print(" ") 113 118 exit 114 119 end if 115 start_time_step = stringtointeger(parameter(13))-1120 start_time_step=stringtodouble(parameter(13)) 116 121 end if 117 122 else 118 if (start_time_step .LE. 0) 119 print(" ") 120 print("Begin with time step 1") 123 if (start_time_step .GE. t_all(nt-1)/3600) 124 print(" ") 125 print("'start_time_step' = "+ start_time_step +"h is equal or greater than last time step = " + t_all(nt-1)+"s = "+t_all(nt-1)/3600+"h") 126 print(" ") 127 print("Please select another 'start_time_step'") 121 128 print(" ") 122 129 exit 123 130 end if 124 if (start_time_step .GE. nt) 125 print(" ") 126 print("'start_time_step' = "+ start_time_step +" is greater than available time steps = " + (nt-1)) 131 if (start_time_step .LT. t_all(0)/3600) 132 print(" ") 133 print("'start_time_step' = "+ start_time_step +"h is lower than first time step = " + t_all(0)+"s = "+t_all(0)/3600+"h") 134 print(" ") 135 print("Please select another 'start_time_step'") 127 136 print(" ") 128 137 exit 129 138 end if 130 start_time_step = start_time_step - 1131 139 end if 132 140 start_time_step = start_time_step*3600 141 do i=0,nt-2 142 if (start_time_step .GE. t_all(i)-delta_t/2 .AND. start_time_step .LT. t_all(i)+delta_t/2)then 143 st=i 144 break 145 end if 146 end do 147 if (start_time_step .GE. t_all(nt-1)-delta_t/2 .AND. start_time_step .LT. t_all(nt-1)) then 148 st=nt-2 149 end if 150 133 151 ; **************************************************** 134 152 ; end of time step and different types of mistakes that could be done … … 136 154 137 155 if ( .not. isvar("end_time_step") ) then 138 end_time_step = nt-1 139 if (parameter(15) .NE. "nt") then 140 if (parameter(15) .LE. "0") 141 print(" ") 142 print("'end_time_step' = "+parameter(15)+ " is too small; 'end_time_step' should be at least 1 ") 156 end_time_step = t_all(nt-1)/3600 157 if (parameter(15) .NE. "t(end)") then 158 if (stringtodouble(parameter(15)) .LE. t_all(0)/3600) 159 print(" ") 160 print("'end_time_step' = "+parameter(15)+ "h is lower or equal than first time step = " + t_all(0)+"s = "+t_all(0)/3600+"h") 161 print(" ") 162 print("Please select another 'end_time_step'") 143 163 print(" ") 144 164 exit 145 165 end if 146 if (stringtointeger(parameter(15)) .GE. nt) 147 print(" ") 148 print("'end_time_step' = "+ parameter(15) +" is greater than available time steps = " + (nt-1)) 166 if (stringtodouble(parameter(15)) .GT. t_all(nt-1)/3600) 167 print(" ") 168 print("'end_time_step' = "+ parameter(15) +"h is greater than last time step = " + t_all(nt-1)+"s = "+t_all(nt-1)/3600+"h") 169 print(" ") 170 print("Please select another 'end_time_step'") 149 171 print(" ") 150 172 exit 151 173 end if 152 if (stringtointeger(parameter(15)) .LT. stringtointeger(parameter(13)) ) 153 print(" ") 154 print("'end_time_step' = "+ parameter(15) +" is lower than 'start_time_step' = "+parameter(13)) 174 if (stringtodouble(parameter(15)) .LE. start_time_step/3600) 175 print(" ") 176 print("'end_time_step' = "+ parameter(15) +"h is equal or lower than 'start_time_step' = "+parameter(13)+"h") 177 print(" ") 178 print("Please select another 'start_time_step' or 'end_time_step'") 155 179 print(" ") 156 180 exit 157 181 end if 158 end_time_step = stringto integer(parameter(15))-1182 end_time_step = stringtodouble(parameter(15)) 159 183 end if 160 184 else 161 if (end_time_step .LE. 0) 162 print(" ") 163 print("'end_time_step' = "+end_time_step+ " is too small; 'end_time_step' should be at least 1 ") 185 if (end_time_step .LE. t_all(0)/3600) 186 print(" ") 187 print("'end_time_step' = "+end_time_step+ "h is lower or equal than first time step = " + t_all(0)+"s = "+t_all(0)/3600+"h") 188 print(" ") 189 print("Please select another 'end_time_step'") 164 190 print(" ") 165 191 exit 166 192 end if 167 if (end_time_step .GE. nt) 168 print(" ") 169 print("'end_time_step' = "+ end_time_step +" is greater than available time steps = "+(nt-1)) 193 if (end_time_step .GT. t_all(nt-1)/3600) 194 print(" ") 195 print("'end_time_step' = "+ end_time_step +"h is greater than last time step = " + t_all(nt-1)+"s = "+t_all(nt-1)/3600+"h") 196 print(" ") 197 print("Please select another 'end_time_step'") 170 198 print(" ") 171 199 exit 172 200 end if 173 if (end_time_step .LT. start_time_step) 174 print(" ") 175 print("'end_time_step' = "+end_time_step +" is lower than 'start_time_step' = "+start_time_step) 201 if (end_time_step .LE. start_time_step/3600) 202 print(" ") 203 print("'end_time_step' = "+ end_time_step +"h is equal or lower than 'start_time_step' = "+start_time_step+"h") 204 print(" ") 205 print("Please select another 'start_time_step' or 'end_time_step'") 176 206 print(" ") 177 207 exit 178 208 end if 179 end_time_step = end_time_step - 1 180 end if 209 end if 210 end_time_step = end_time_step*3600 211 do i=0,nt-1 212 if (end_time_step .GE. t_all(i)-delta_t/2 .AND. end_time_step .LT. t_all(i)+delta_t/2)then 213 et=i 214 break 215 end if 216 end do 217 218 delete(start_time_step) 219 start_time_step=round(st,3) 220 delete(end_time_step) 221 end_time_step=round(et,3) 181 222 182 223 t = f->time(start_time_step:end_time_step) … … 266 307 plot_splptz = gsn_csm_xy(wks_ps,t,data_0(:),res) 267 308 end if 268 309 310 count_var=0 269 311 do varn = dim-1,0,1 270 312 … … 284 326 285 327 if(check) then 286 328 count_var=count_var+1 329 287 330 data_all = f ->$vNam(varn)$ 288 331 unit(varn) = data_all@units … … 432 475 end do 433 476 477 if (count_var .EQ. 0) then 478 print(" ") 479 print("Please select a variable 'var=' or use the default value") 480 print(" ") 481 print("Your selection '"+var+"' does not exist on the input file") 482 print(" ") 483 exit 484 end if 485 434 486 do varn = dim-1,0,1 435 487 … … 457 509 res@tiXAxisFontHeightF = 0.07 458 510 res@txFontHeightF = 0.07 459 res@tiYAxisFontHeightF = 0.07 460 res@xyLabelMode = "Custom" 461 511 res@tiYAxisFontHeightF = 0.07 462 512 463 513 if (vNam(varn) .EQ. "E") 464 514 E=0 465 515 res@xyLineColors = (/237/) 466 res@xyExplicitLabels = "E"467 516 res@xyLineLabelFontHeightF = 0.05 468 517 res@xyLineLabelFontColor = 237 … … 474 523 Es=0 475 524 res@xyLineColors = (/144/) 476 res@xyExplicitLabels = "Es"477 525 res@xyLineLabelFontHeightF = 0.05 478 526 res@xyLineLabelFontColor = 144 … … 483 531 us=0 484 532 res@xyLineColors = (/237/) 485 res@xyExplicitLabels = "us"486 533 res@xyLineLabelFontHeightF = 0.05 487 534 res@xyLineLabelFontColor = 237 … … 493 540 ws=0 494 541 res@xyLineColors = (/144/) 495 res@xyExplicitLabels = "ws"496 542 res@xyLineLabelFontHeightF = 0.05 497 543 res@xyLineLabelFontColor = 144 … … 502 548 u=0 503 549 res@xyLineColors = (/237/) 504 res@xyExplicitLabels = "umax"505 550 res@xyLineLabelFontHeightF = 0.05 506 551 res@xyLineLabelFontColor = 237 … … 512 557 v=0 513 558 res@xyLineColors = (/144/) 514 res@xyExplicitLabels = "vmax"515 559 res@xyLineLabelFontHeightF = 0.05 516 560 res@xyLineLabelFontColor = 144 … … 520 564 w=0 521 565 res@xyLineColors = (/80/) 522 res@xyExplicitLabels = "wmax"523 566 res@xyLineLabelFontHeightF = 0.05 524 567 res@xyLineLabelFontColor = 80 … … 529 572 zw=0 530 573 res@xyLineColors = (/237/) 531 res@xyExplicitLabels = "z_i_wpt"532 574 res@xyLineLabelFontHeightF = 0.05 533 575 res@xyLineLabelFontColor = 237 … … 539 581 z=0 540 582 res@xyLineColors = (/144/) 541 res@xyExplicitLabels = "z_i_pt"542 583 res@xyLineLabelFontHeightF = 0.05 543 584 res@xyLineLabelFontColor = 144 … … 548 589 w0=0 549 590 res@xyLineColors = (/237/) 550 res@xyExplicitLabels = "wpptp0"551 591 res@xyLineLabelFontHeightF = 0.05 552 592 res@xyLineLabelFontColor = 237 … … 558 598 wp=0 559 599 res@xyLineColors = (/144/) 560 res@xyExplicitLabels = "wpptp"561 600 res@xyLineLabelFontHeightF = 0.05 562 601 res@xyLineLabelFontColor = 144 … … 566 605 wt=0 567 606 res@xyLineColors = (/80/) 568 res@xyExplicitLabels = "wpt"569 607 res@xyLineLabelFontHeightF = 0.05 570 608 res@xyLineLabelFontColor = 80 … … 575 613 p=0 576 614 res@xyLineColors = (/237/) 577 res@xyExplicitLabels = "pt_0_"578 615 res@xyLineLabelFontHeightF = 0.05 579 616 res@xyLineLabelFontColor = 237 … … 585 622 pz=0 586 623 res@xyLineColors = (/144/) 587 res@xyExplicitLabels = "pt_zp_"588 624 res@xyLineLabelFontHeightF = 0.05 589 625 res@xyLineLabelFontColor = 144 … … 594 630 x=0 595 631 res@xyLineColors = (/237/) 596 res@xyExplicitLabels = "splptx"597 632 res@xyLineLabelFontHeightF = 0.05 598 633 res@xyLineLabelFontColor = 237 … … 604 639 y=0 605 640 res@xyLineColors = (/144/) 606 res@xyExplicitLabels = "splpty"607 641 res@xyLineLabelFontHeightF = 0.05 608 642 res@xyLineLabelFontColor = 144 … … 612 646 z=0 613 647 res@xyLineColors = (/80/) 614 res@xyExplicitLabels = "splptz"615 648 res@xyLineLabelFontHeightF = 0.05 616 649 res@xyLineLabelFontColor = 80 … … 645 678 overlay(plot_E,plot_Es) 646 679 n=n+1 647 plot_ps(n) = plot_E 680 plot_ps(n) = plot_E 681 682 ; *************************************************** 683 ; legend for combined plot 684 ; *************************************************** 685 686 lgres = True 687 lgMonoDashIndex = False 688 lgres@lgLabelFont = "helvetica" 689 lgres@lgLabelFontHeightF = .1 690 lgres@vpWidthF = 0.4 691 lgres@vpHeightF = 0.4 692 lgres@lgDashIndexes = (/0,0,0/) 693 lgres@lgLineColors = (/237,144,80/) 694 lbid = gsn_create_legend(wks_ps,2,(/"E","Es"/),lgres) 695 696 amres = True 697 amres@amParallelPosF = 0.6 698 amres@amOrthogonalPosF = -0.2 699 annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres) 648 700 end if 649 701 if (vNam(varn) .EQ. "Es" .AND. E .NE. 1) then … … 651 703 overlay(plot_E,plot_Es) 652 704 n=n+1 653 plot_ps(n) = plot_E 705 plot_ps(n) = plot_E 706 707 ; *************************************************** 708 ; legend for combined plot 709 ; *************************************************** 710 711 lgres = True 712 lgMonoDashIndex = False 713 lgres@lgLabelFont = "helvetica" 714 lgres@lgLabelFontHeightF = .1 715 lgres@vpWidthF = 0.4 716 lgres@vpHeightF = 0.4 717 lgres@lgDashIndexes = (/0,0,0/) 718 lgres@lgLineColors = (/237,144,80/) 719 lbid = gsn_create_legend(wks_ps,2,(/"E","Es"/),lgres) 720 721 amres = True 722 amres@amParallelPosF = 0.6 723 amres@amOrthogonalPosF = -0.2 724 annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres) 654 725 end if 655 726 … … 659 730 n=n+1 660 731 plot_ps(n) = plot_us 732 733 ; *************************************************** 734 ; legend for combined plot 735 ; *************************************************** 736 737 lgres = True 738 lgMonoDashIndex = False 739 lgres@lgLabelFont = "helvetica" 740 lgres@lgLabelFontHeightF = .1 741 lgres@vpWidthF = 0.4 742 lgres@vpHeightF = 0.4 743 lgres@lgDashIndexes = (/0,0,0/) 744 lgres@lgLineColors = (/237,144,80/) 745 lbid = gsn_create_legend(wks_ps,2,(/"us","ws"/),lgres) 746 747 amres = True 748 amres@amParallelPosF = 0.6 749 amres@amOrthogonalPosF = -0.2 750 annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres) 661 751 end if 662 752 if (vNam(varn) .EQ. "ws" .AND. us .NE. 1) then … … 665 755 n=n+1 666 756 plot_ps(n) = plot_us 757 758 ; *************************************************** 759 ; legend for combined plot 760 ; *************************************************** 761 762 lgres = True 763 lgMonoDashIndex = False 764 lgres@lgLabelFont = "helvetica" 765 lgres@lgLabelFontHeightF = .1 766 lgres@vpWidthF = 0.4 767 lgres@vpHeightF = 0.4 768 lgres@lgDashIndexes = (/0,0,0/) 769 lgres@lgLineColors = (/237,144,80/) 770 lbid = gsn_create_legend(wks_ps,2,(/"us","ws"/),lgres) 771 772 amres = True 773 amres@amParallelPosF = 0.6 774 amres@amOrthogonalPosF = -0.2 775 annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres) 667 776 end if 668 777 … … 674 783 n=n+1 675 784 plot_ps(n) = plot_umax 785 786 ; *************************************************** 787 ; legend for combined plot 788 ; *************************************************** 789 790 lgres = True 791 lgMonoDashIndex = False 792 lgres@lgLabelFont = "helvetica" 793 lgres@lgLabelFontHeightF = .1 794 lgres@vpWidthF = 0.4 795 lgres@vpHeightF = 0.4 796 lgres@lgDashIndexes = (/0,0,0/) 797 lgres@lgLineColors = (/237,144,80/) 798 lbid = gsn_create_legend(wks_ps,3,(/"umax","vmax","wmax"/),lgres) 799 800 amres = True 801 amres@amParallelPosF = 0.6 802 amres@amOrthogonalPosF = -0.2 803 annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres) 676 804 end if 677 805 end if … … 683 811 n=n+1 684 812 plot_ps(n) = plot_umax 813 814 ; *************************************************** 815 ; legend for combined plot 816 ; *************************************************** 817 818 lgres = True 819 lgMonoDashIndex = False 820 lgres@lgLabelFont = "helvetica" 821 lgres@lgLabelFontHeightF = .1 822 lgres@vpWidthF = 0.4 823 lgres@vpHeightF = 0.4 824 lgres@lgDashIndexes = (/0,0,0/) 825 lgres@lgLineColors = (/237,144,80/) 826 lbid = gsn_create_legend(wks_ps,3,(/"umax","vmax","wmax"/),lgres) 827 828 amres = True 829 amres@amParallelPosF = 0.6 830 amres@amOrthogonalPosF = -0.2 831 annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres) 685 832 end if 686 833 end if … … 692 839 n=n+1 693 840 plot_ps(n) = plot_umax 841 842 ; *************************************************** 843 ; legend for combined plot 844 ; *************************************************** 845 846 lgres = True 847 lgMonoDashIndex = False 848 lgres@lgLabelFont = "helvetica" 849 lgres@lgLabelFontHeightF = .1 850 lgres@vpWidthF = 0.4 851 lgres@vpHeightF = 0.4 852 lgres@lgDashIndexes = (/0,0,0/) 853 lgres@lgLineColors = (/237,144,80/) 854 lbid = gsn_create_legend(wks_ps,3,(/"umax","vmax","wmax"/),lgres) 855 856 amres = True 857 amres@amParallelPosF = 0.6 858 amres@amOrthogonalPosF = -0.2 859 annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres) 694 860 end if 695 861 end if … … 699 865 overlay(plot_z_i_wpt,plot_z_i_pt) 700 866 n=n+1 701 plot_ps(n) = plot_z_i_wpt 867 plot_ps(n) = plot_z_i_wpt 868 869 ; *************************************************** 870 ; legend for combined plot 871 ; *************************************************** 872 873 lgres = True 874 lgMonoDashIndex = False 875 lgres@lgLabelFont = "helvetica" 876 lgres@lgLabelFontHeightF = .1 877 lgres@vpWidthF = 0.4 878 lgres@vpHeightF = 0.4 879 lgres@lgDashIndexes = (/0,0,0/) 880 lgres@lgLineColors = (/237,144,80/) 881 lbid = gsn_create_legend(wks_ps,2,(/"z_i_wpt","z_i_pt"/),lgres) 882 883 amres = True 884 amres@amParallelPosF = 0.6 885 amres@amOrthogonalPosF = -0.2 886 annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres) 702 887 end if 703 888 if (vNam(varn) .EQ. "z_i_pt" .AND. zw .NE. 1) then … … 705 890 overlay(plot_z_i_wpt,plot_z_i_pt) 706 891 n=n+1 707 plot_ps(n) = plot_z_i_wpt 892 plot_ps(n) = plot_z_i_wpt 893 894 ; *************************************************** 895 ; legend for combined plot 896 ; *************************************************** 897 898 lgres = True 899 lgMonoDashIndex = False 900 lgres@lgLabelFont = "helvetica" 901 lgres@lgLabelFontHeightF = .1 902 lgres@vpWidthF = 0.4 903 lgres@vpHeightF = 0.4 904 lgres@lgDashIndexes = (/0,0,0/) 905 lgres@lgLineColors = (/237,144,80/) 906 lbid = gsn_create_legend(wks_ps,2,(/"z_i_wpt","z_i_pt"/),lgres) 907 908 amres = True 909 amres@amParallelPosF = 0.6 910 amres@amOrthogonalPosF = -0.2 911 annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres) 708 912 end if 709 913 … … 715 919 n=n+1 716 920 plot_ps(n) = plot_wpptp0 921 922 ; *************************************************** 923 ; legend for combined plot 924 ; *************************************************** 925 926 lgres = True 927 lgMonoDashIndex = False 928 lgres@lgLabelFont = "helvetica" 929 lgres@lgLabelFontHeightF = .1 930 lgres@vpWidthF = 0.4 931 lgres@vpHeightF = 0.4 932 lgres@lgDashIndexes = (/0,0,0/) 933 lgres@lgLineColors = (/237,144,80/) 934 lbid = gsn_create_legend(wks_ps,3,(/"wpptp0","wpptp","wpt"/),lgres) 935 936 amres = True 937 amres@amParallelPosF = 0.6 938 amres@amOrthogonalPosF = -0.2 939 annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres) 717 940 end if 718 941 end if … … 723 946 overlay(plot_wpptp0,plot_wpt) 724 947 n=n+1 725 plot_ps(n) = plot_wpptp0 948 plot_ps(n) = plot_wpptp0 949 950 ; *************************************************** 951 ; legend for combined plot 952 ; *************************************************** 953 954 lgres = True 955 lgMonoDashIndex = False 956 lgres@lgLabelFont = "helvetica" 957 lgres@lgLabelFontHeightF = .1 958 lgres@vpWidthF = 0.4 959 lgres@vpHeightF = 0.4 960 lgres@lgDashIndexes = (/0,0,0/) 961 lgres@lgLineColors = (/237,144,80/) 962 lbid = gsn_create_legend(wks_ps,3,(/"wpptp0","wpptp","wpt"/),lgres) 963 964 amres = True 965 amres@amParallelPosF = 0.6 966 amres@amOrthogonalPosF = -0.2 967 annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres) 726 968 end if 727 969 end if … … 732 974 overlay(plot_wpptp0,plot_wpt) 733 975 n=n+1 734 plot_ps(n) = plot_wpptp0 976 plot_ps(n) = plot_wpptp0 977 978 ; *************************************************** 979 ; legend for combined plot 980 ; *************************************************** 981 982 lgres = True 983 lgMonoDashIndex = False 984 lgres@lgLabelFont = "helvetica" 985 lgres@lgLabelFontHeightF = .1 986 lgres@vpWidthF = 0.4 987 lgres@vpHeightF = 0.4 988 lgres@lgDashIndexes = (/0,0,0/) 989 lgres@lgLineColors = (/237,144,80/) 990 lbid = gsn_create_legend(wks_ps,3,(/"wpptp0","wpptp","wpt"/),lgres) 991 992 amres = True 993 amres@amParallelPosF = 0.6 994 amres@amOrthogonalPosF = -0.2 995 annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres) 735 996 end if 736 997 end if … … 740 1001 overlay(plot_pt_0_,plot_pt_zp_) 741 1002 n=n+1 742 plot_ps(n) = plot_pt_0_ 1003 plot_ps(n) = plot_pt_0_ 1004 1005 ; *************************************************** 1006 ; legend for combined plot 1007 ; *************************************************** 1008 1009 lgres = True 1010 lgMonoDashIndex = False 1011 lgres@lgLabelFont = "helvetica" 1012 lgres@lgLabelFontHeightF = .1 1013 lgres@vpWidthF = 0.4 1014 lgres@vpHeightF = 0.4 1015 lgres@lgDashIndexes = (/0,0,0/) 1016 lgres@lgLineColors = (/237,144,80/) 1017 lbid = gsn_create_legend(wks_ps,2,(/"pt_0_","pt_zp_"/),lgres) 1018 1019 amres = True 1020 amres@amParallelPosF = 0.6 1021 amres@amOrthogonalPosF = -0.2 1022 annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres) 743 1023 end if 744 1024 if (vNam(varn) .EQ. "pt_zp_" .AND. p .NE. 1) then … … 746 1026 overlay(plot_pt_0_,plot_pt_zp_) 747 1027 n=n+1 748 plot_ps(n) = plot_pt_0_ 1028 plot_ps(n) = plot_pt_0_ 1029 1030 ; *************************************************** 1031 ; legend for combined plot 1032 ; *************************************************** 1033 1034 lgres = True 1035 lgMonoDashIndex = False 1036 lgres@lgLabelFont = "helvetica" 1037 lgres@lgLabelFontHeightF = .1 1038 lgres@vpWidthF = 0.4 1039 lgres@vpHeightF = 0.4 1040 lgres@lgDashIndexes = (/0,0,0/) 1041 lgres@lgLineColors = (/237,144,80/) 1042 lbid = gsn_create_legend(wks_ps,2,(/"pt_0_","pt_zp_"/),lgres) 1043 1044 amres = True 1045 amres@amParallelPosF = 0.6 1046 amres@amOrthogonalPosF = -0.2 1047 annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres) 749 1048 end if 750 1049 … … 755 1054 overlay(plot_splptx,plot_splptz) 756 1055 n=n+1 757 plot_ps(n) = plot_splptx 1056 plot_ps(n) = plot_splptx 1057 1058 ; *************************************************** 1059 ; legend for combined plot 1060 ; *************************************************** 1061 1062 lgres = True 1063 lgMonoDashIndex = False 1064 lgres@lgLabelFont = "helvetica" 1065 lgres@lgLabelFontHeightF = .1 1066 lgres@vpWidthF = 0.4 1067 lgres@vpHeightF = 0.4 1068 lgres@lgDashIndexes = (/0,0,0/) 1069 lgres@lgLineColors = (/237,144,80/) 1070 lbid = gsn_create_legend(wks_ps,3,(/"splptx","splpty","splptz"/),lgres) 1071 1072 amres = True 1073 amres@amParallelPosF = 0.6 1074 amres@amOrthogonalPosF = -0.2 1075 annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres) 758 1076 end if 759 1077 end if … … 765 1083 n=n+1 766 1084 plot_ps(n) = plot_splptx 1085 1086 ; *************************************************** 1087 ; legend for combined plot 1088 ; *************************************************** 1089 1090 lgres = True 1091 lgMonoDashIndex = False 1092 lgres@lgLabelFont = "helvetica" 1093 lgres@lgLabelFontHeightF = .1 1094 lgres@vpWidthF = 0.4 1095 lgres@vpHeightF = 0.4 1096 lgres@lgDashIndexes = (/0,0,0/) 1097 lgres@lgLineColors = (/237,144,80/) 1098 lbid = gsn_create_legend(wks_ps,3,(/"splptx","splpty","splptz"/),lgres) 1099 1100 amres = True 1101 amres@amParallelPosF = 0.6 1102 amres@amOrthogonalPosF = -0.2 1103 annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres) 767 1104 end if 768 1105 end if … … 773 1110 overlay(plot_splptx,plot_splptz) 774 1111 n=n+1 775 plot_ps(n) = plot_splptx 1112 plot_ps(n) = plot_splptx 1113 1114 ; *************************************************** 1115 ; legend for combined plot 1116 ; *************************************************** 1117 1118 lgres = True 1119 lgMonoDashIndex = False 1120 lgres@lgLabelFont = "helvetica" 1121 lgres@lgLabelFontHeightF = .1 1122 lgres@vpWidthF = 0.4 1123 lgres@vpHeightF = 0.4 1124 lgres@lgDashIndexes = (/0,0,0/) 1125 lgres@lgLineColors = (/237,144,80/) 1126 lbid = gsn_create_legend(wks_ps,3,(/"splptx","splpty","splptz"/),lgres) 1127 1128 amres = True 1129 amres@amParallelPosF = 0.6 1130 amres@amOrthogonalPosF = -0.2 1131 annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres) 776 1132 end if 777 1133 end if … … 840 1196 ; merge plots onto one page 841 1197 ; *************************************************** 842 1198 843 1199 if (format_out .EQ. "eps" .OR. format_out .EQ. "epsi") then 844 1200 gsn_panel(wks_ps,plot_ps(1:n),(/n,1/),resP)
Note: See TracChangeset
for help on using the changeset viewer.