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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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(" ")
Note: See TracChangeset for help on using the changeset viewer.