Output PNGs in different sizes

From: Jonas Kaufmann <jonas.kaufmann_at_nyahnyahspammersnyahnyah>
Date: Mon Jun 18 2012 - 10:17:32 MDT

Hello,

I am trying to generate PNGs in different sizes from GRIB weather
data. The map should always show the same area, but the output PNG
files should have different sizes. I know that I can call the output
function (like gsn_csm_vector_scalar_map) in a loop, but I am looking
to get a better performance than this approach.

In the "Animation" examples, I see that I can set some variables
afterwards and then simply call draw and frame for the next animation
step. However it seems that these options are not available for
wkWidth and wkHeight.

Here are some snippets of my script:

wks_type = "png"
wks_type@wkWidth = 256
wks_type@wkHeight = 256
wks = gsn_open_wks(wks_type,outfile)
[...]
;;; first image: 256x256px
plot = gsn_csm_vector_scalar_map(wks, wind_u, wind_v, wind_speed, res1)
draw(plot)
frame(wks)

;;; second image: 512x512px
setvalues wks
        "wkHeight" : 512
        "wkWidth" : 512
end setvalues
draw(plot)
frame(wks)

I get images in my outfile name with "000001", "000002" etc. appended,
but they are always the same size, the one that I originally set. Is
there a way to change the PNG output size with setvalues? Or is there
another way to achieve a better performance for my task than simply
calling the gsn_csm_vector_scalar_map method in a loop?

Thank you for your help!

Best regards

Jonas
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Jun 18 12:11:32 2012

This archive was generated by hypermail 2.1.8 : Mon Jun 25 2012 - 09:57:23 MDT