Changeset 957


Ignore:
Timestamp:
Jul 20, 2012 10:57:49 AM (12 years ago)
Author:
heinze
Message:

png output adjusted for NCL versions higher than 5.2.1

Location:
palm/trunk/SCRIPTS/NCL
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SCRIPTS/NCL/cross_sections.ncl

    r827 r957  
    22202220     png_output = new((/no_frames/), string)
    22212221     j = 0
    2222      do i=0, no_frames-1
    2223        j = i + 1
    2224        if (j .LE. 9) then
    2225          png_output(i) = file_out+".00000"+j+".png"
    2226        end if
    2227        if (j .GT. 9 .AND. j .LE. 99) then
    2228          png_output(i) = file_out+".0000"+j+".png"
    2229        end if
    2230        if (j .GT. 99 .AND. j .LE. 999) then
    2231          png_output(i) = file_out+".000"+j+".png"
    2232        end if
    2233        if (j .GT. 999) then
    2234          png_output(i) = file_out+".00"+j+".png"
    2235        end if
    2236 
    2237        ;using imagemagick's convert for reducing the white
    2238        ;space around the plot
    2239        cmd = "convert -geometry 1000x1000 -density 300 -trim " +  \
    2240               png_output(i) + " " + png_output(i)
     2222
     2223     if (no_frames .eq. 1) then
     2224        if (ncl_version .GE. 6 ) then
     2225           png_output(0) = file_out+".png"
     2226        else
     2227           png_output(0) = file_out+".00000"+1+".png"
     2228        end if
     2229        ;using imagemagick's convert for reducing the white
     2230        ;space around the plot
     2231        cmd = "convert -geometry 1000x1000 -density 300 -trim " +  \
     2232              png_output(0) + " " + png_output(0)
    22412233       system(cmd)
    2242      end do
     2234     else
     2235
     2236       do i=0, no_frames-1
     2237         j = i + 1
     2238         if (j .LE. 9) then
     2239           png_output(i) = file_out+".00000"+j+".png"
     2240         end if
     2241         if (j .GT. 9 .AND. j .LE. 99) then
     2242           png_output(i) = file_out+".0000"+j+".png"
     2243         end if
     2244         if (j .GT. 99 .AND. j .LE. 999) then
     2245           png_output(i) = file_out+".000"+j+".png"
     2246         end if
     2247         if (j .GT. 999) then
     2248           png_output(i) = file_out+".00"+j+".png"
     2249         end if
     2250
     2251         ;using imagemagick's convert for reducing the white
     2252         ;space around the plot
     2253         cmd = "convert -geometry 1000x1000 -density 300 -trim " +  \
     2254                png_output(i) + " " + png_output(i)
     2255         system(cmd)
     2256       end do
     2257     end if
    22432258
    22442259     print(" ")
     
    22502265     print(" ")
    22512266   end if
    2252  
     2267
    22532268end
  • palm/trunk/SCRIPTS/NCL/profiles.ncl

    r951 r957  
    13771377      res@tmYLMinorPerMajor = 4
    13781378
    1379       resP                        = True
    1380       resP@txFont                 = "helvetica"
    1381       resP@txString               = f_att@title
    1382       resP@txFuncCode             = "~"
    1383       resP@txFontHeightF          = 0.015
     1379      resP                            = True
     1380      resP@gsnMaximize                = True
     1381      resP@gsnPanelXWhiteSpacePercent = 3.0
     1382      resP@gsnPanelYWhiteSpacePercent = 2.0
     1383      resP@txFont                     = "helvetica"
     1384      resP@txString                   = f_att@title
     1385      resP@txFuncCode                 = "~"
     1386      resP@txFontHeightF              = 0.015
    13841387
    13851388      ; ***************************************************
     
    46374640   end if
    46384641
    4639     if (format_out .EQ. "png" ) then
     4642
     4643   if (format_out .EQ. "png" ) then
    46404644     png_output = new((/no_frames/), string)
    46414645     j = 0
    4642      do i=0, no_frames-1
    4643        j = i + 1
    4644        if (j .LE. 9) then
    4645          png_output(i) = file_out+".00000"+j+".png"
    4646        end if
    4647        if (j .GT. 9 .AND. j .LE. 99) then
    4648          png_output(i) = file_out+".0000"+j+".png"
    4649        end if
    4650        if (j .GT. 99 .AND. j .LE. 999) then
    4651          png_output(i) = file_out+".000"+j+".png"
    4652        end if
    4653        if (j .GT. 999) then
    4654          png_output(i) = file_out+".00"+j+".png"
    4655        end if
    4656 
    4657        ;using imagemagick's convert for reducing the white
    4658        ;space around the plot
    4659        cmd = "convert -geometry 1000x1000 -density 300 -trim " +  \
    4660               png_output(i) + " " + png_output(i)
     4646
     4647     if (no_frames .eq. 1) then
     4648        if (ncl_version .GE. 6 ) then
     4649           png_output(0) = file_out+".png"
     4650        else
     4651           png_output(0) = file_out+".00000"+1+".png"
     4652        end if
     4653        ;using imagemagick's convert for reducing the white
     4654        ;space around the plot
     4655        cmd = "convert -geometry 1000x1000 -density 300 -trim " +  \
     4656              png_output(0) + " " + png_output(0)
    46614657       system(cmd)
    4662      end do
     4658     else
     4659
     4660       do i=0, no_frames-1
     4661         j = i + 1
     4662         if (j .LE. 9) then
     4663           png_output(i) = file_out+".00000"+j+".png"
     4664         end if
     4665         if (j .GT. 9 .AND. j .LE. 99) then
     4666           png_output(i) = file_out+".0000"+j+".png"
     4667         end if
     4668         if (j .GT. 99 .AND. j .LE. 999) then
     4669           png_output(i) = file_out+".000"+j+".png"
     4670         end if
     4671         if (j .GT. 999) then
     4672           png_output(i) = file_out+".00"+j+".png"
     4673         end if
     4674
     4675         ;using imagemagick's convert for reducing the white
     4676         ;space around the plot
     4677         cmd = "convert -geometry 1000x1000 -density 300 -trim " +  \
     4678                png_output(i) + " " + png_output(i)
     4679         system(cmd)
     4680       end do
     4681     end if
    46634682
    46644683     print(" ")
  • palm/trunk/SCRIPTS/NCL/spectra.ncl

    r827 r957  
    751751     png_output = new((/no_frames/), string)
    752752     j = 0
    753      do i=0, no_frames-1
    754        j = i + 1
    755        if (j .LE. 9) then
    756          png_output(i) = file_out+".00000"+j+".png"
    757        end if
    758        if (j .GT. 9 .AND. j .LE. 99) then
    759          png_output(i) = file_out+".0000"+j+".png"
    760        end if
    761        if (j .GT. 99 .AND. j .LE. 999) then
    762          png_output(i) = file_out+".000"+j+".png"
    763        end if
    764        if (j .GT. 999) then
    765          png_output(i) = file_out+".00"+j+".png"
    766        end if
    767 
    768        ;using imagemagick's convert for reducing the white
    769        ;space around the plot
    770        cmd = "convert -geometry 1000x1000 -density 300 -trim " +  \
    771               png_output(i) + " " + png_output(i)
     753
     754     if (no_frames .eq. 1) then
     755        if (ncl_version .GE. 6 ) then
     756           png_output(0) = file_out+".png"
     757        else
     758           png_output(0) = file_out+".00000"+1+".png"
     759        end if
     760        ;using imagemagick's convert for reducing the white
     761        ;space around the plot
     762        cmd = "convert -geometry 1000x1000 -density 300 -trim " +  \
     763              png_output(0) + " " + png_output(0)
    772764       system(cmd)
    773      end do
     765     else
     766
     767       do i=0, no_frames-1
     768         j = i + 1
     769         if (j .LE. 9) then
     770           png_output(i) = file_out+".00000"+j+".png"
     771         end if
     772         if (j .GT. 9 .AND. j .LE. 99) then
     773           png_output(i) = file_out+".0000"+j+".png"
     774         end if
     775         if (j .GT. 99 .AND. j .LE. 999) then
     776           png_output(i) = file_out+".000"+j+".png"
     777         end if
     778         if (j .GT. 999) then
     779           png_output(i) = file_out+".00"+j+".png"
     780         end if
     781
     782         ;using imagemagick's convert for reducing the white
     783         ;space around the plot
     784         cmd = "convert -geometry 1000x1000 -density 300 -trim " +  \
     785                png_output(i) + " " + png_output(i)
     786         system(cmd)
     787       end do
     788     end if
    774789
    775790     print(" ")
Note: See TracChangeset for help on using the changeset viewer.