Re: Drawing streamlines freezes NCL script

From: Dave Allured <dave.allured_at_nyahnyahspammersnyahnyah>
Date: Wed, 15 Apr 2009 19:54:10 -0600

Samuel,

Here is one problem. For overlays you need the following two
resources for *each* plot function call, before the overlay command:

   res_at_gsnDraw = False ; don't draw yet
   res_at_gsnFrame = False ; don't advance frame yet

In your code excerpt I can't tell whether these are set for res, but
they are definitely missing for resS.

If the problem persists, then more diagnostic info is needed.
Please insert print statements between the last 5 lines of the
program to find out exactly where NCL is hanging. Also try to make
the streamline plot directly without using overlay. Also, what
array sizes are are you using?

Additional helpful info would be printVarSummary output for your
data arrays just before the plot functions, and print() output for
the plot resource variables. HTH.

Dave Allured
CU/CIRES Climate Diagnostics Center (CDC)
http://cires.colorado.edu/science/centers/cdc/
NOAA/ESRL/PSD, Climate Analysis Branch (CAB)
http://www.cdc.noaa.gov/psd1/

Samuel Leung wrote:
> Hello NCL team,
>
> I faced a problem overlaying streamlines on a map. I used
> gsn_csm_streamline to draw the streamlines.
>
> When I ran the ncl for generating the images, the ncl stopped at the
> line where gsn_csm_streamline is located, and the postscript file
> generated then became bigger and bigger in filesize. This status
> seemed not to have an end as I saw the filesize of the postscript file
> can reach in giga byte (normally a 10MB postscript is adequate for
> making the images I am working on). I needed to terminate the ncl by
> myself and no images were obtained.
>
> The scripts I used for the streamline are as follows. It is also in
> the end of the ncl.
> -----------------------
> ...
> plot = gsn_csm_vector_scalar_map(wks,
> uu,vv,rh,res)
>
> resS = True
> resS_at_gsnTickMarksOn = False
>
> resS_at_vpWidthF = 0.879
> resS_at_vpHeightF = 0.7
> resS_at_vpXF = 0.102
> resS_at_vpYF = 0.922
>
> resS_at_stMinStepFactorF = 2 ; 2
> resS_at_stLengthCheckCount = 4 ; 35
> resS_at_stCrossoverCheckCount = -1
> resS_at_stMinDistanceF = 0.2
> resS_at_stArrowLengthF = 0.01 ; changes the size of the
> arrows.
> resS_at_stLineThicknessF = 1.5 ; changes the line thickness
> resS_at_stMinArrowSpacingF = 0.3
>
> resS_at_stLineColor = "black" ; changes color
> resS_at_gsnRightString = ""
> resS_at_gsnLeftString = ""
> resS_at_gsnCenterString = ""
> ;resS_at_tfDoNDCOverlay = True
>
> plotS = gsn_csm_streamline(wks,uu,vv,resS)
> overlay(plot,plotS)
> draw(plot)
>
> frame(wks)
>
> end
> -----------------------
>
> I tried to comment the gsn_csm_streamline and the map itself can be
> generated successfully. I thought the streamline drawing part is the
> root cause of the problem.
>
> This problem can be skipped by setting a larger stMinDistanceF value
> but it will result as almost no streamlines drawn.
>
> The ncl version I am using is 4.2.0.a033. I also tried 5.0.0 but it
> looked like no difference.
>
> Thanks in advance for your help.
>
> Regards,
> Samuel Leung
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Apr 15 2009 - 19:54:10 MDT

This archive was generated by hypermail 2.2.0 : Thu Apr 16 2009 - 10:05:49 MDT