Changeset 566 for palm/trunk/SCRIPTS/NCL/timeseries.ncl
- Timestamp:
- Sep 30, 2010 1:37:58 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SCRIPTS/NCL/timeseries.ncl
r534 r566 25 25 print("Neither the personal configuration file '.ncl.config' exists in") 26 26 print("~/palm/current_version") 27 print("nor the default configuration file '.ncl.config.default' exists in") 27 print("nor the default configuration file '.ncl.config.default' "+\ 28 "exists in") 28 29 print(palm_bin_path + "/NCL") 29 30 print(" ") … … 60 61 end if 61 62 62 if (format_out .NE. "x11" .AND. format_out .NE. "pdf" .AND. format_out .NE. "eps" .AND. format_out .NE. "ps" .AND. format_out .NE. "epsi" .AND. format_out .NE. "ncgm" .AND. format_out .NE. "png")then 63 if (format_out .NE. "x11" .AND. format_out .NE. "pdf" .AND. \ 64 format_out .NE. "eps" .AND. format_out .NE. "ps" .AND. \ 65 format_out .NE. "epsi" .AND. format_out .NE. "ncgm" .AND. \ 66 format_out .NE. "png")then 63 67 print(" ") 64 68 print("'format_out = "+format_out+"' is invalid and set to'x11'") … … 104 108 if (start_f .EQ. -1)then 105 109 print(" ") 106 print("'start_f' must be one of the cyclic numbers (at least 0) of your input file(s)") 110 print("'start_f' must be one of the cyclic numbers (at least 0) of "+\ 111 "your input file(s)") 107 112 print(" ") 108 113 exit … … 110 115 if (end_f .EQ. -1)then 111 116 print(" ") 112 print("'end_f' must be one of the cyclic numbers (at least 0) of your input file(s)") 117 print("'end_f' must be one of the cyclic numbers (at least 0) of "+\ 118 "your input file(s)") 113 119 print(" ") 114 120 exit … … 191 197 if (start_time_step .GE. t_all(nt-1)/3600) 192 198 print(" ") 193 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") 199 print("'start_time_step' = "+ start_time_step +\ 200 "h is equal or greater than last time step = " + \ 201 t_all(nt-1)+"s = "+t_all(nt-1)/3600+"h") 194 202 print(" ") 195 203 print("Select another 'start_time_step'") … … 199 207 if (start_time_step .LT. t_all(0)/3600) 200 208 print(" ") 201 print("'start_time_step' = "+ start_time_step +"h is lower than first time step = " + t_all(0)+"s = "+t_all(0)/3600+"h") 209 print("'start_time_step' = "+ start_time_step +\ 210 "h is lower than first time step = " + t_all(0)+"s = "+\ 211 t_all(0)/3600+"h") 202 212 print(" ") 203 213 print("Select another 'start_time_step'") … … 207 217 end if 208 218 do i=0,nt-2 209 if (start_time_step .GE. (t_all(i)-delta_t/2)/3600 .AND. start_time_step .LT. (t_all(i)+delta_t/2)/3600)then 219 if (start_time_step .GE. (t_all(i)-delta_t/2)/3600 .AND. \ 220 start_time_step .LT. (t_all(i)+delta_t/2)/3600)then 210 221 st=i 211 222 break 212 223 end if 213 224 end do 214 if (start_time_step .GE. t_all(nt-1)-delta_t/2 .AND. start_time_step .LT. t_all(nt-1)) then 225 if (start_time_step .GE. t_all(nt-1)-delta_t/2 .AND. \ 226 start_time_step .LT. t_all(nt-1)) then 215 227 st=nt-2 216 228 end if … … 233 245 if (end_time_step .LE. t_all(0)/3600) 234 246 print(" ") 235 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") 247 print("'end_time_step' = "+end_time_step+ \ 248 "h is lower or equal than first time step = " + \ 249 t_all(0)+"s = "+t_all(0)/3600+"h") 236 250 print(" ") 237 251 print("Select another 'end_time_step'") … … 241 255 if (end_time_step .GT. t_all(nt-1)/3600) 242 256 print(" ") 243 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") 257 print("'end_time_step' = "+ end_time_step +\ 258 "h is greater than last time step = " + t_all(nt-1)+"s = "+\ 259 t_all(nt-1)/3600+"h") 244 260 print(" ") 245 261 print("Select another 'end_time_step'") … … 249 265 if (end_time_step .LE. start_time_step/3600) 250 266 print(" ") 251 print("'end_time_step' = "+ end_time_step +"h is equal or lower than 'start_time_step' = "+start_time_step+"h") 267 print("'end_time_step' = "+ end_time_step +\ 268 "h is equal or lower than 'start_time_step' = "+\ 269 start_time_step+"h") 252 270 print(" ") 253 271 print("Select another 'start_time_step' or 'end_time_step'") … … 257 275 end if 258 276 do i=0,nt-1 259 if (end_time_step .GE. (t_all(i)-delta_t/2)/3600 .AND. end_time_step .LT. (t_all(i)+delta_t/2)/3600)then 277 if (end_time_step .GE. (t_all(i)-delta_t/2)/3600 .AND. \ 278 end_time_step .LT. (t_all(i)+delta_t/2)/3600)then 260 279 et=i 261 280 break … … 278 297 279 298 print(" ") 280 print("Output of time steps from "+t_all(start_time_step)/3600+" h = "+t_all(start_time_step)+" s => index = "+start_time_step) 281 print(" till "+t_all(end_time_step)/3600+" h = "+t_all(end_time_step)+" s => index = "+end_time_step) 299 print("Output of time steps from "+t_all(start_time_step)/3600+" h = "+\ 300 t_all(start_time_step)+" s => index = "+start_time_step) 301 print(" till "+t_all(end_time_step)/3600+" h = "+\ 302 t_all(end_time_step)+" s => index = "+end_time_step) 282 303 print(" ") 283 304 … … 300 321 res@tmYLLabelFont = "helvetica" 301 322 res@xyLineColors = (/237/) 323 res@trXMaxF = t_all(start_time_step) 324 res@trXMinF = t_all(end_time_step) 302 325 303 326 res@lgLabelFontHeightF = 0.02 … … 405 428 406 429 do j = 0, comma -2 407 vNam_temp(j) = charactertostring(var_char(indices(j)+1:indices(j+1)-1)) 430 vNam_temp(j) = charactertostring(\ 431 var_char(indices(j)+1:indices(j+1)-1)) 408 432 end do 409 433 … … 458 482 maxi(varn) = max(data(varn,:)) 459 483 460 if (vNam(varn) .EQ. "E" .OR. vNam(varn) .EQ. "Es" .OR. vNam(varn) .EQ. "E*") then 484 if (vNam(varn) .EQ. "E" .OR. vNam(varn) .EQ. "Es" .OR. \ 485 vNam(varn) .EQ. "E*") then 461 486 if (mini(varn) .EQ. maxi(varn)) then 462 487 if (min(data(varn,:)) .EQ. 0)then … … 497 522 end if 498 523 499 if (vNam(varn) .EQ. "umax" .OR. vNam(varn) .EQ. "vmax" .OR. vNam(varn) .EQ. "wmax") then 524 if (vNam(varn) .EQ. "umax" .OR. vNam(varn) .EQ. "vmax" .OR. \ 525 vNam(varn) .EQ. "wmax") then 500 526 if (mini(varn) .EQ. maxi(varn)) then 501 527 if (mini(varn) .EQ. 0)then … … 535 561 end if 536 562 537 if (vNam(varn) .EQ. "wpptp0" .OR. vNam(varn) .EQ. "wpptp" .OR. vNam(varn) .EQ. "wpt"\ 538 .OR. vNam(varn) .EQ. "w"+dq+"pt"+dq+"0" .OR. vNam(varn) .EQ. "w"+dq+"pt"+dq ) then 563 if (vNam(varn) .EQ. "wpptp0" .OR. vNam(varn) .EQ. "wpptp" .OR. \ 564 vNam(varn) .EQ. "wpt" .OR. vNam(varn) .EQ. \ 565 "w"+dq+"pt"+dq+"0" .OR. vNam(varn) .EQ. "w"+dq+"pt"+dq ) then 539 566 if (mini(varn) .EQ. maxi(varn)) then 540 567 if (min(data(varn,:)) .EQ. 0)then … … 581 608 if (isStrSubset(data@long_name," SR " ))then 582 609 print(" ") 583 print("If you have outputs of statistic regions you cannot overlay variables;") 610 print("If you have outputs of statistic regions you cannot overlay "+\ 611 "variables;") 584 612 print("'over' is set to 0" ) 585 613 print(" ") … … 690 718 end if 691 719 692 if (vNam(varn) .EQ. "wpptp0" .OR. vNam(varn) .EQ. "w"+dq+"pt"+dq+"0" ) 720 if (vNam(varn) .EQ. "wpptp0" .OR. \ 721 vNam(varn) .EQ. "w"+dq+"pt"+dq+"0" ) 693 722 w0=0 694 723 res@xyLineColors = (/237/) … … 759 788 760 789 ; *************************************************** 761 ; legend for combined plot790 ; legend for overlaid plot 762 791 ; *************************************************** 763 792 … … 777 806 annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres) 778 807 end if 779 if ((vNam(varn) .EQ. "Es" .OR. vNam(varn) .EQ. "E*") .AND. E .NE. 1) then 808 if ((vNam(varn) .EQ. "Es" .OR. vNam(varn) .EQ. "E*") .AND. \ 809 E .NE. 1) then 780 810 Es=1 781 811 overlay(plot_E,plot_Es) … … 784 814 785 815 ; *************************************************** 786 ; legend for combined plot816 ; legend for overlaid plot 787 817 ; *************************************************** 788 818 … … 803 833 end if 804 834 805 if ((vNam(varn) .EQ. "us" .OR. vNam(varn) .EQ. "u*") .AND. ws .NE. 1) then 835 if ((vNam(varn) .EQ. "us" .OR. vNam(varn) .EQ. "u*") .AND. \ 836 ws .NE. 1) then 806 837 us=1 807 838 overlay(plot_us,plot_ws) … … 810 841 811 842 ; *************************************************** 812 ; legend for combined plot843 ; legend for overlaid plot 813 844 ; *************************************************** 814 845 … … 828 859 annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres) 829 860 end if 830 if ((vNam(varn) .EQ. "ws" .OR. vNam(varn) .EQ. "w*") .AND. us .NE. 1) then 861 if ((vNam(varn) .EQ. "ws" .OR. vNam(varn) .EQ. "w*") .AND. \ 862 us .NE. 1) then 831 863 ws=1 832 864 overlay(plot_us,plot_ws) … … 835 867 836 868 ; *************************************************** 837 ; legend for combinedplot869 ; legend for overlaid plot 838 870 ; *************************************************** 839 871 … … 864 896 865 897 ; *************************************************** 866 ; legend for combined plot898 ; legend for overlaid plot 867 899 ; *************************************************** 868 900 … … 875 907 lgres@lgDashIndexes = (/0,0,0/) 876 908 lgres@lgLineColors = (/237,144,80/) 877 lbid = gsn_create_legend(wks_ps,3,(/"umax","vmax","wmax"/),lgres) 909 lbid = gsn_create_legend(\ 910 wks_ps,3,(/"umax","vmax","wmax"/),lgres) 878 911 879 912 amres = True … … 892 925 893 926 ; *************************************************** 894 ; legend for combined plot927 ; legend for overlaid plot 895 928 ; *************************************************** 896 929 … … 903 936 lgres@lgDashIndexes = (/0,0,0/) 904 937 lgres@lgLineColors = (/237,144,80/) 905 lbid = gsn_create_legend( wks_ps,3,(/"umax","vmax","wmax"/),lgres)906 938 lbid = gsn_create_legend(\ 939 wks_ps,3,(/"umax","vmax","wmax"/),lgres) 907 940 amres = True 908 941 amres@amParallelPosF = 0.6 … … 920 953 921 954 ; *************************************************** 922 ; legend for combined plot955 ; legend for overlaid plot 923 956 ; *************************************************** 924 957 … … 931 964 lgres@lgDashIndexes = (/0,0,0/) 932 965 lgres@lgLineColors = (/237,144,80/) 933 lbid = gsn_create_legend( wks_ps,3,(/"umax","vmax","wmax"/),lgres)934 966 lbid = gsn_create_legend(\ 967 wks_ps,3,(/"umax","vmax","wmax"/),lgres) 935 968 amres = True 936 969 amres@amParallelPosF = 0.6 … … 947 980 948 981 ; *************************************************** 949 ; legend for combined plot982 ; legend for overlaid plot 950 983 ; *************************************************** 951 984 … … 958 991 lgres@lgDashIndexes = (/0,0,0/) 959 992 lgres@lgLineColors = (/237,144,80/) 960 lbid = gsn_create_legend(wks_ps,2,(/"z_i_wpt","z_i_pt"/),lgres) 993 lbid = gsn_create_legend(wks_ps,2,(/"z_i_wpt","z_i_pt"/),lgres) 961 994 962 995 amres = True … … 972 1005 973 1006 ; *************************************************** 974 ; legend for combined plot1007 ; legend for overlaid plot 975 1008 ; *************************************************** 976 1009 … … 983 1016 lgres@lgDashIndexes = (/0,0,0/) 984 1017 lgres@lgLineColors = (/237,144,80/) 985 lbid = gsn_create_legend(wks_ps,2,(/"z_i_wpt","z_i_pt"/),lgres) 1018 lbid = gsn_create_legend(wks_ps,2,(/"z_i_wpt","z_i_pt"/),lgres) 986 1019 987 1020 amres = True … … 1000 1033 1001 1034 ; *************************************************** 1002 ; legend for combined plot1035 ; legend for overlaid plot 1003 1036 ; *************************************************** 1004 1037 … … 1011 1044 lgres@lgDashIndexes = (/0,0,0/) 1012 1045 lgres@lgLineColors = (/237,144,80/) 1013 lbid = gsn_create_legend( wks_ps,3,(/"wpptp0","wpptp","wpt"/),lgres)1014 1046 lbid = gsn_create_legend(\ 1047 wks_ps,3,(/"wpptp0","wpptp","wpt"/),lgres) 1015 1048 amres = True 1016 1049 amres@amParallelPosF = 0.6 … … 1019 1052 end if 1020 1053 end if 1021 if ((vNam(varn) .EQ. "wpptp" .OR. vNam(varn) .EQ. "w"+dq+"pt"+dq) .AND. w0 .NE. 1) 1054 if ((vNam(varn) .EQ. "wpptp" .OR. \ 1055 vNam(varn) .EQ. "w"+dq+"pt"+dq) .AND. w0 .NE. 1) 1022 1056 if (wt .NE. 1) then 1023 1057 wp=1 … … 1028 1062 1029 1063 ; *************************************************** 1030 ; legend for combined plot1064 ; legend for overlaid plot 1031 1065 ; *************************************************** 1032 1066 … … 1039 1073 lgres@lgDashIndexes = (/0,0,0/) 1040 1074 lgres@lgLineColors = (/237,144,80/) 1041 lbid = gsn_create_legend(wks_ps,3,(/"wpptp0","wpptp","wpt"/),lgres) 1075 lbid = gsn_create_legend(\ 1076 wks_ps,3,(/"wpptp0","wpptp","wpt"/),lgres) 1042 1077 1043 1078 amres = True … … 1056 1091 1057 1092 ; *************************************************** 1058 ; legend for combined plot1093 ; legend for overlaid plot 1059 1094 ; *************************************************** 1060 1095 … … 1067 1102 lgres@lgDashIndexes = (/0,0,0/) 1068 1103 lgres@lgLineColors = (/237,144,80/) 1069 lbid = gsn_create_legend( wks_ps,3,(/"wpptp0","wpptp","wpt"/),lgres)1070 1104 lbid = gsn_create_legend(\ 1105 wks_ps,3,(/"wpptp0","wpptp","wpt"/),lgres) 1071 1106 amres = True 1072 1107 amres@amParallelPosF = 0.6 … … 1076 1111 end if 1077 1112 1078 if ((vNam(varn) .EQ. "pt_0_" .OR. vNam(varn) .EQ. "pt(0)") .AND. pz .NE. 1) then 1113 if ((vNam(varn) .EQ. "pt_0_" .OR. vNam(varn) .EQ. "pt(0)") .AND. \ 1114 pz .NE. 1) then 1079 1115 p=1 1080 1116 overlay(plot_pt_0_,plot_pt_zp_) … … 1083 1119 1084 1120 ; *************************************************** 1085 ; legend for combined plot1121 ; legend for overlaid plot 1086 1122 ; *************************************************** 1087 1123 … … 1094 1130 lgres@lgDashIndexes = (/0,0,0/) 1095 1131 lgres@lgLineColors = (/237,144,80/) 1096 lbid = gsn_create_legend(wks_ps,2,(/"pt_0_","pt_zp_"/),lgres) 1132 lbid = gsn_create_legend(wks_ps,2,(/"pt_0_","pt_zp_"/),lgres) 1097 1133 1098 1134 amres = True … … 1101 1137 annoid1 = gsn_add_annotation(plot_ps(n),lbid,amres) 1102 1138 end if 1103 if ((vNam(varn) .EQ. "pt_zp_" .OR. vNam(varn) .EQ. "pt(zp)") .AND. p .NE. 1) then 1139 if ((vNam(varn) .EQ. "pt_zp_" .OR. vNam(varn) .EQ. "pt(zp)") .AND.\ 1140 p .NE. 1) then 1104 1141 pz=1 1105 1142 overlay(plot_pt_0_,plot_pt_zp_) … … 1108 1145 1109 1146 ; *************************************************** 1110 ; legend for combined plot1147 ; legend for overlaid plot 1111 1148 ; *************************************************** 1112 1149 … … 1119 1156 lgres@lgDashIndexes = (/0,0,0/) 1120 1157 lgres@lgLineColors = (/237,144,80/) 1121 lbid = gsn_create_legend(wks_ps,2,(/"pt_0_","pt_zp_"/),lgres) 1158 lbid = gsn_create_legend(wks_ps,2,(/"pt_0_","pt_zp_"/),lgres) 1122 1159 1123 1160 amres = True … … 1128 1165 1129 1166 if(vNam(varn) .NE. "pt_zp_" .AND. vNam(varn) .NE. "pt(zp)" .AND. \ 1130 vNam(varn) .NE. "pt_0_" .AND. vNam(varn) .NE. "pt(0)" .AND. \ 1131 vNam(varn) .NE. "wpt" .AND. vNam(varn) .NE. "wpptp" .AND. \ 1132 vNam(varn) .NE. "w"+dq+"pt"+dq .AND. vNam(varn) .NE. "wpptp0" .AND. \ 1133 vNam(varn) .NE. "w"+dq+"pt"+dq+"0" .AND. vNam(varn) .NE. "z_i_pt" .AND.\ 1134 vNam(varn) .NE. "z_i_wpt" .AND. vNam(varn) .NE. "wmax" .AND. \ 1135 vNam(varn) .NE. "vmax" .AND. vNam(varn) .NE. "umax" .AND. \ 1136 vNam(varn) .NE. "ws" .AND. vNam(varn) .NE. "w*" .AND. \ 1137 vNam(varn) .NE. "us" .AND. vNam(varn) .NE. "u*" .AND. \ 1138 vNam(varn) .NE. "Es" .AND. vNam(varn) .NE. "E*" .AND. \ 1167 vNam(varn) .NE. "pt_0_" .AND. vNam(varn) .NE. "pt(0)" .AND. \ 1168 vNam(varn) .NE. "wpt" .AND. vNam(varn) .NE. "wpptp" .AND. \ 1169 vNam(varn) .NE. "w"+dq+"pt"+dq .AND. \ 1170 vNam(varn) .NE. "wpptp0" .AND. \ 1171 vNam(varn) .NE. "w"+dq+"pt"+dq+"0" .AND. \ 1172 vNam(varn) .NE. "z_i_pt" .AND. \ 1173 vNam(varn) .NE. "z_i_wpt" .AND. vNam(varn) .NE. "wmax" .AND. \ 1174 vNam(varn) .NE. "vmax" .AND. vNam(varn) .NE. "umax" .AND. \ 1175 vNam(varn) .NE. "ws" .AND. vNam(varn) .NE. "w*" .AND. \ 1176 vNam(varn) .NE. "us" .AND. vNam(varn) .NE. "u*" .AND. \ 1177 vNam(varn) .NE. "Es" .AND. vNam(varn) .NE. "E*" .AND. \ 1139 1178 vNam(varn) .NE. "E") then 1140 1179 … … 1230 1269 no_frames = 0 1231 1270 1232 if ((format_out .EQ. "eps" .OR. format_out .EQ. "epsi") .AND. n .gt. no_rows*no_columns) then 1271 if ((format_out .EQ. "eps" .OR. format_out .EQ. "epsi") .AND. \ 1272 n .gt. no_rows*no_columns) then 1233 1273 gsn_panel(wks_ps,plot_ps(1:n),(/n,1/),resP) 1234 1274 print(" ") … … 1241 1281 no_frames = no_frames + 1 1242 1282 else 1243 gsn_panel(wks_ps, plot_ps(np:np+no_rows*no_columns-1),(/no_rows,no_columns/),resP) 1283 gsn_panel(wks_ps, plot_ps(np:np+no_rows*no_columns-1),\ 1284 (/no_rows,no_columns/),resP) 1244 1285 no_frames = no_frames + 1 1245 1286 end if
Note: See TracChangeset
for help on using the changeset viewer.