Changeset 532 for palm/trunk/SCRIPTS
- Timestamp:
- Apr 21, 2010 1:33:38 PM (15 years ago)
- Location:
- palm/trunk/SCRIPTS/NCL
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SCRIPTS/NCL/.ncl.config.default
r526 r532 136 136 ; 137 137 ; format of the output file; 138 ; supported file formats: x11, pdf, ps, eps, epsi or ncgm138 ; supported file formats: x11, pdf, ps, eps, epsi ncgm or png 139 139 ; 140 140 ; data type: string … … 811 811 ; OPTIONAL --format_out-- OUTPUT FORMAT 812 812 ; 813 ; supported file formats: x11, pdf, ps, eps, epsi or ncgm813 ; supported file formats: x11, pdf, ps, eps, epsi, ncgm or png 814 814 ; 815 815 ; data type: string … … 1849 1849 ; 1850 1850 ; format of the output file; 1851 ; supported file formats: x11, pdf, ps, eps, epsi or ncgm1851 ; supported file formats: x11, pdf, ps, eps, epsi, ncgm or png 1852 1852 ; 1853 1853 ; data type: string … … 2287 2287 ; 2288 2288 ; format of the output file; 2289 ; supported file formats: x11, pdf, ps, eps, epsi or ncgm2289 ; supported file formats: x11, pdf, ps, eps, epsi, ncgm or png 2290 2290 ; 2291 2291 ; data type: string -
palm/trunk/SCRIPTS/NCL/cross_sections.ncl
r529 r532 35 35 begin 36 36 37 ;*************************************************** 38 ; Retrieving the NCL version used 39 ;*************************************************** 40 41 ncl_version_ch = systemfunc("ncl -V") 42 ncl_version = stringtofloat(ncl_version_ch) 43 37 44 ; *************************************************** 38 45 ; Retrieving the double quote character … … 54 61 end if 55 62 56 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" )then63 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 57 64 print(" ") 58 65 print("'format_out = "+format_out+"' is invalid and set to'x11'") 59 66 print(" ") 60 67 format_out="x11" 68 end if 69 70 if (ncl_version .LE. 5.1 .AND. format_out .EQ. "png") then 71 print(" ") 72 print("Output of png files not available") 73 print("png output is avaiable with NCL version 5.2.0 and higher ") 74 print("NCL version used: " + ncl_version_ch) 75 print(" ") 76 exit 61 77 end if 62 78 … … 336 352 cs_res@gsnDraw = False 337 353 cs_res@gsnFrame = False 338 cs_res@gsnMaximize = True354 cs_res@gsnMaximize = True 339 355 340 356 cs_res@tmXBLabelFontHeightF = font_size … … 1446 1462 ; open workstation(s) 1447 1463 ; *************************************************** 1464 1465 if ( format_out .EQ. "pdf" .OR. format_out .EQ. "ps" ) then 1466 format_out@wkPaperSize = "A4" 1467 end if 1468 if ( format_out .EQ. "png" ) then 1469 format_out@wkWidth = 1000 1470 format_out@wkHeight = 1000 1471 end if 1448 1472 1449 1473 wks_ps = gsn_open_wks(format_out,file_out) … … 1807 1831 ; merge plots onto one page 1808 1832 ; *************************************************** 1833 1834 no_frames = 0 1835 1809 1836 if (vector .EQ. 1 .AND. plotvec .EQ. "plotvec") then 1810 1837 if ((format_out .EQ. "eps" .OR. format_out .EQ. "epsi") .AND. no_time*no_layer*(no_var+1) .gt. no_rows*no_columns) then … … 1817 1844 if ( np + no_rows*no_columns .gt. dim_plot-1) then 1818 1845 gsn_panel(wks_ps, plot(np:dim_plot-1),(/no_rows,no_columns/),cs_resP) 1846 no_frames = no_frames + 1 1819 1847 else 1820 1848 gsn_panel(wks_ps, plot(np:np+no_rows*no_columns-1),(/no_rows,no_columns/),cs_resP) 1849 no_frames = no_frames + 1 1821 1850 end if 1822 1851 end do … … 1832 1861 if ( np + no_rows*no_columns .gt. dim_plot-1) then 1833 1862 gsn_panel(wks_ps, plot(np:dim_plot-1),(/no_rows,no_columns/),cs_resP) 1863 no_frames = no_frames + 1 1834 1864 else 1835 1865 gsn_panel(wks_ps, plot(np:np+no_rows*no_columns-1),(/no_rows,no_columns/),cs_resP) 1866 no_frames = no_frames + 1 1836 1867 end if 1837 1868 end do … … 1839 1870 end if 1840 1871 1841 print(" ") 1842 print("Output to: " + file_out +"."+ format_out) 1843 print(" ") 1872 if (format_out .EQ. "png" ) then 1873 png_output = new((/no_frames/), string) 1874 j = 0 1875 do i=0, no_frames-1 1876 j = i + 1 1877 if (j .LE. 9) then 1878 png_output(i) = file_out+".00000"+j+".png" 1879 end if 1880 if (j .GT. 9 .AND. j .LE. 99) then 1881 png_output(i) = file_out+".0000"+j+".png" 1882 end if 1883 if (j .GT. 99 .AND. j .LE. 999) then 1884 png_output(i) = file_out+".000"+j+".png" 1885 end if 1886 if (j .GT. 999) then 1887 png_output(i) = file_out+".00"+j+".png" 1888 end if 1889 1890 ;using imagemagick's convert for reducing the white 1891 ;space around the plot 1892 cmd = "convert -geometry 1000x1000 -density 300 -trim " + \ 1893 png_output(i) + " " + png_output(i) 1894 system(cmd) 1895 end do 1896 1897 print(" ") 1898 print("Output to: "+ png_output) 1899 print(" ") 1900 else 1901 print(" ") 1902 print("Output to: " + file_out +"."+ format_out) 1903 print(" ") 1904 end if 1844 1905 1845 1906 end -
palm/trunk/SCRIPTS/NCL/profiles.ncl
r526 r532 33 33 34 34 begin 35 36 ;*************************************************** 37 ; Retrieving the NCL version used 38 ;*************************************************** 39 40 ncl_version_ch = systemfunc("ncl -V") 41 ncl_version = stringtofloat(ncl_version_ch) 35 42 36 43 ;*************************************************** … … 241 248 242 249 243 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" )then250 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 244 251 print(" ") 245 252 print("'format_out = "+format_out+"' is invalid and set to'x11'") … … 247 254 format_out="x11" 248 255 end if 256 257 if (ncl_version .LE. 5.1 .AND. format_out .EQ. "png") then 258 print(" ") 259 print("Output of png files not available") 260 print("png output is avaiable with NCL version 5.2.0 and higher ") 261 print("NCL version used: " + ncl_version_ch) 262 print(" ") 263 exit 264 end if 249 265 250 266 if (over .NE. 0 .AND. over .NE. 1) then … … 1088 1104 res@gsnDraw = False 1089 1105 res@gsnFrame = False 1090 res@gsnPaperOrientation = "portrait"1091 res@gsnPaperWidth = 8.271092 res@gsnPaperHeight = 11.691093 res@gsnPaperMargin = 0.791094 1106 res@txFont = "helvetica" 1095 1107 res@tiMainFont = "helvetica" … … 1164 1176 end if 1165 1177 1178 if ( format_out .EQ. "pdf" .OR. format_out .EQ. "ps" ) then 1179 format_out@wkPaperSize = "A4" 1180 end if 1181 if ( format_out .EQ. "png" ) then 1182 format_out@wkWidth = 1000 1183 format_out@wkHeight = 1000 1184 end if 1185 1166 1186 wks=gsn_open_wks(format_out,file_out) 1167 1187 gsn_define_colormap(wks,"rainbow+white") … … 4092 4112 end do 4093 4113 4114 no_frames = 0 4115 4094 4116 if ((format_out .EQ. "eps" .OR. format_out .EQ. "epsi") .AND. n .gt. no_rows*no_columns) then 4095 4117 gsn_panel(wks,plot_,(/n,1/),resP) … … 4101 4123 if( (i+no_rows*no_columns) .gt. (n-1)) then 4102 4124 gsn_panel(wks,plot_(i:n-1),(/no_rows,no_columns/),resP) 4125 no_frames = no_frames + 1 4103 4126 else 4104 4127 gsn_panel(wks,plot_(i:i+no_rows*no_columns-1),(/no_rows,no_columns/),resP) 4128 no_frames = no_frames + 1 4105 4129 end if 4106 4130 end do 4107 4131 end if 4108 4132 4109 print(" ") 4110 print("Output to: " + file_out +"."+ format_out) 4111 print(" ") 4133 if (format_out .EQ. "png" ) then 4134 png_output = new((/no_frames/), string) 4135 j = 0 4136 do i=0, no_frames-1 4137 j = i + 1 4138 if (j .LE. 9) then 4139 png_output(i) = file_out+".00000"+j+".png" 4140 end if 4141 if (j .GT. 9 .AND. j .LE. 99) then 4142 png_output(i) = file_out+".0000"+j+".png" 4143 end if 4144 if (j .GT. 99 .AND. j .LE. 999) then 4145 png_output(i) = file_out+".000"+j+".png" 4146 end if 4147 if (j .GT. 999) then 4148 png_output(i) = file_out+".00"+j+".png" 4149 end if 4150 4151 ;using imagemagick's convert for reducing the white 4152 ;space around the plot 4153 cmd = "convert -geometry 1000x1000 -density 300 -trim " + \ 4154 png_output(i) + " " + png_output(i) 4155 system(cmd) 4156 end do 4157 4158 print(" ") 4159 print("Output to: "+ png_output) 4160 print(" ") 4161 else 4162 print(" ") 4163 print("Output to: " + file_out +"."+ format_out) 4164 print(" ") 4165 end if 4112 4166 4113 4167 end -
palm/trunk/SCRIPTS/NCL/spectra.ncl
r526 r532 34 34 35 35 ;*************************************************** 36 ; Retrieving the NCL version used 37 ;*************************************************** 38 39 ncl_version_ch = systemfunc("ncl -V") 40 ncl_version = stringtofloat(ncl_version_ch) 41 42 ;*************************************************** 36 43 ; Retrieving the double quote character 37 44 ;*************************************************** … … 52 59 end if 53 60 54 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" )then61 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 55 62 print(" ") 56 63 print("'format_out = "+format_out+"' is invalid and set to'x11'") … … 58 65 format_out="x11" 59 66 end if 67 68 if (ncl_version .LE. 5.1 .AND. format_out .EQ. "png") then 69 print(" ") 70 print("Output of png files not available") 71 print("png output is avaiable with NCL version 5.2.0 and higher ") 72 print("NCL version used: " + ncl_version_ch) 73 print(" ") 74 exit 75 end if 60 76 61 77 if (log_x .NE. 0 .AND. log_x .NE. 1)then … … 340 356 res@gsnDraw = False 341 357 res@gsnFrame = False 342 res@gsnPaperOrientation = "portrait"343 res@gsnPaperWidth = 8.27344 res@gsnPaperHeight = 11.69345 res@gsnPaperMargin = 0.79346 358 res@txFont = "helvetica" 347 359 res@tiMainFont = "helvetica" … … 417 429 if ( dash .eq. 0 ) then 418 430 res@xyMonoDashPattern = True 431 end if 432 433 if ( format_out .EQ. "pdf" .OR. format_out .EQ. "ps" ) then 434 format_out@wkPaperSize = "A4" 435 end if 436 if ( format_out .EQ. "png" ) then 437 format_out@wkWidth = 1000 438 format_out@wkHeight = 1000 419 439 end if 420 440 … … 664 684 end if 665 685 666 print(" ") 667 print("Output to: " + file_out +"."+ format_out) 668 print(" ") 686 if (format_out .EQ. "png" ) then 687 png_output = new((/no_frames/), string) 688 j = 0 689 do i=0, no_frames-1 690 j = i + 1 691 if (j .LE. 9) then 692 png_output(i) = file_out+".00000"+j+".png" 693 end if 694 if (j .GT. 9 .AND. j .LE. 99) then 695 png_output(i) = file_out+".0000"+j+".png" 696 end if 697 if (j .GT. 99 .AND. j .LE. 999) then 698 png_output(i) = file_out+".000"+j+".png" 699 end if 700 if (j .GT. 999) then 701 png_output(i) = file_out+".00"+j+".png" 702 end if 703 704 ;using imagemagick's convert for reducing the white 705 ;space around the plot 706 cmd = "convert -geometry 1000x1000 -density 300 -trim " + \ 707 png_output(i) + " " + png_output(i) 708 system(cmd) 709 end do 710 711 print(" ") 712 print("Output to: "+ png_output) 713 print(" ") 714 else 715 print(" ") 716 print("Output to: " + file_out +"."+ format_out) 717 print(" ") 718 end if 669 719 670 720 end -
palm/trunk/SCRIPTS/NCL/timeseries.ncl
r526 r532 35 35 36 36 ;*************************************************** 37 ; Retrieving the NCL version used 38 ;*************************************************** 39 40 ncl_version_ch = systemfunc("ncl -V") 41 ncl_version = stringtofloat(ncl_version_ch) 42 43 ;*************************************************** 37 44 ; Retrieving the double quote character 38 45 ;*************************************************** … … 53 60 end if 54 61 55 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" )then62 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 56 63 print(" ") 57 64 print("'format_out = "+format_out+"' is invalid and set to'x11'") … … 59 66 format_out="x11" 60 67 end if 68 69 if (ncl_version .LE. 5.1 .AND. format_out .EQ. "png") then 70 print(" ") 71 print("Output of png files not available") 72 print("png output is avaiable with NCL version 5.2.0 and higher ") 73 print("NCL version used: " + ncl_version_ch) 74 print(" ") 75 exit 76 end if 61 77 62 78 if (over .NE. 0 .AND. over .NE. 1) then … … 275 291 res@gsnDraw = False 276 292 res@gsnFrame = False 277 res@gsnPaperOrientation = "portrait"278 res@gsnPaperWidth = 8.27279 res@gsnPaperHeight = 11.69280 res@gsnPaperMargin = 0.79281 293 res@tmXBMode = True 282 294 res@tmYLMode = True … … 308 320 ; *************************************************** 309 321 322 if ( format_out .EQ. "pdf" .OR. format_out .EQ. "ps" ) then 323 format_out@wkPaperSize = "A4" 324 end if 325 if ( format_out .EQ. "png" ) then 326 format_out@wkWidth = 1000 327 format_out@wkHeight = 1000 328 end if 329 310 330 wks_ps = gsn_open_wks(format_out,file_out) 311 331 gsn_define_colormap(wks_ps,"rainbow+white") … … 1207 1227 ; merge plots onto one page 1208 1228 ; *************************************************** 1229 1230 no_frames = 0 1209 1231 1210 1232 if ((format_out .EQ. "eps" .OR. format_out .EQ. "epsi") .AND. n .gt. no_rows*no_columns) then … … 1217 1239 if ( np + no_rows*no_columns .gt. n) then 1218 1240 gsn_panel(wks_ps, plot_ps(np:n),(/no_rows,no_columns/),resP) 1241 no_frames = no_frames + 1 1219 1242 else 1220 1243 gsn_panel(wks_ps, plot_ps(np:np+no_rows*no_columns-1),(/no_rows,no_columns/),resP) 1244 no_frames = no_frames + 1 1221 1245 end if 1222 1246 end do 1223 1247 end if 1224 1248 1225 print(" ") 1226 print("Output to: " + file_out +"."+ format_out) 1227 print(" ") 1249 if (format_out .EQ. "png" ) then 1250 png_output = new((/no_frames/), string) 1251 j = 0 1252 do i=0, no_frames-1 1253 j = i + 1 1254 if (j .LE. 9) then 1255 png_output(i) = file_out+".00000"+j+".png" 1256 end if 1257 if (j .GT. 9 .AND. j .LE. 99) then 1258 png_output(i) = file_out+".0000"+j+".png" 1259 end if 1260 if (j .GT. 99 .AND. j .LE. 999) then 1261 png_output(i) = file_out+".000"+j+".png" 1262 end if 1263 if (j .GT. 999) then 1264 png_output(i) = file_out+".00"+j+".png" 1265 end if 1266 1267 ;using imagemagick's convert for reducing the white 1268 ;space around the plot 1269 cmd = "convert -geometry 1000x1000 -density 300 -trim " + \ 1270 png_output(i) + " " + png_output(i) 1271 system(cmd) 1272 end do 1273 1274 print(" ") 1275 print("Output to: "+ png_output) 1276 print(" ") 1277 else 1278 print(" ") 1279 print("Output to: " + file_out +"."+ format_out) 1280 print(" ") 1281 end if 1282 1228 1283 1229 1284 end
Note: See TracChangeset
for help on using the changeset viewer.