From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>

Date: Wed Oct 09 2013 - 14:23:51 MDT

Date: Wed Oct 09 2013 - 14:23:51 MDT

On Oct 7, 2013, at 1:17 AM, sangeeta maharjan <sangeetamaharjan@gmail.com> wrote:

*> Dear Mary,
*

*>
*

*> Thanks for your mail. I have added the codes as in your last mail in
*

*> my script. On executing the script, I got extra information as
*

*> follows,
*

*>
*

*> (0) Working on time: 2013-02-15_18:00:00
*

*> (0) ymin_ter / ymax_ter = 800/6000
*

*> (0) ymin_tc / ymax_tc = 0/29
*

*> (0) ymin_rh / ymax_rh = 0/29
*

*> (0) ymin_tc2 / ymax_tc2 = 0/29
*

*> (0) ymin_rh2 / ymax_rh2 = 0/29
*

*> (0) ymin_vct / ymax_vct = 0/29
*

*> (0) Working on time: 2013-02-15_19:00:00
*

*> (0) ymin_ter / ymax_ter = 800/6000
*

*> (0) ymin_tc / ymax_tc = 0/29
*

*> (0) ymin_rh / ymax_rh = 0/29
*

*> (0) ymin_tc2 / ymax_tc2 = 0/29
*

*> (0) ymin_ to rh2 / ymax_rh2 = 0/29
*

*> (0) ymin_vct / ymax_vct = 0/29
*

*> (0) Working on time: 2013-02-15_20:00:00
*

*> (0) ymin_ter / ymax_ter = 800/6000
*

*> (0) ymin_tc / ymax_tc = 0/29
*

*> (0) ymin_rh / ymax_rh = 0/29
*

*> (0) ymin_tc2 / ymax_tc2 = 0/29
*

*> (0) ymin_rh2 / ymax_rh2 = 0/29
*

*> (0) ymin_vct / ymax_vct = 0/29
*

*>
*

*> The plot generated by the script has clearly mentioned that the
*

*> Potential Temperature contours : 298 to 317 by 1 but ymin_tc /
*

*> ymax_tc = 0/29.
*

*>
*

*> Can you help to manage my codes ?
*

I think you just need to set the trYMinF and trYMaxF resources for each plot, or else not set them at all, if the actual min/max of each plot maps into the min/max of the other plots.

For example, if you have a data array "data1" that goes from 5 to 29 in the Y axis, and another data array "data2" that goes from 800 to 6000 in the Y axis, but you need value "0" of data1 to map into value 800, and value 29 to map into value 6000, then you would need to set:

res@trYMinF = 0.

res@trYMaxF = 29.

plot1 = wrf_contour(a,wks,data1,res)

res@trYMinF = 800.

res@trYMaxF = 6000.

plot2 = wrf_contour(a,wks,data2,res)

Then, later, when you call "wrf_overlays", the Y axis of data1 will be forced to go from 0 to 29, and will be mapped into the Y axis of data2, which goes from 800 to 6000.

--Mary

*>
*

*> Sangeeta Maharjan.
*

*>
*

*>
*

*> On 10/1/13, Mary Haley <haley@ucar.edu> wrote:
*

*>> Dear Sangeeta,
*

*>>
*

*>> You have to be careful when using gsn_csm_xy to overlay an XY plot on WRF
*

*>> plots using wrf_overlays, because I believe wrf_overlays simply lines up the
*

*>> four corners of all of your plots, and doesn't do any kind of mathematical
*

*>> calculation to project the data from one plot into the space of another
*

*>> plot. wrf_overlays assumes that your plots already are in the exact same
*

*>> range as each other.
*

*>>
*

*>> When you create contour_ter using gsn_csm_xy, you need to make sure the Y
*

*>> axis min/max values (and ditto for the X axis values) are the same as they
*

*>> are for all of the other WRF contour plots. I see that you are sort of doing
*

*>> this using:
*

*>>
*

*>> opts_ter@trYMaxF = zmax*1000
*

*>>
*

*>> is zmax*1000 the exact value of upper Y limit of all your contour plots?
*

*>> What about the exact lower Y limit of all your plots? This needs to be the
*

*>> same as well
*

*>>
*

*>> You can verify what the trYMinF and trYMaxF values for all of your plots
*

*>> with this code:
*

*>>
*

*>> ;---Retrieve the Y limits for each plot and print them out
*

*>> getvalues contour_ter
*

*>> "trYMinF" : ymin_ter
*

*>> "trYMaxF" : ymax_ter
*

*>> end getvalues
*

*>> getvalues contour_tc
*

*>> "trYMinF" : ymin_tc
*

*>> "trYMaxF" : ymax_tc
*

*>> end getvalues
*

*>> getvalues contour_rh
*

*>> "trYMinF" : ymin_rh
*

*>> "trYMaxF" : ymax_rh
*

*>> end getvalues
*

*>> getvalues contour_tc2
*

*>> "trYMinF" : ymin_tc2
*

*>> "trYMaxF" : ymax_tc2
*

*>> end getvalues
*

*>> getvalues contour_rh2
*

*>> "trYMinF" : ymin_rh2
*

*>> "trYMaxF" : ymax_rh2
*

*>> end getvalues
*

*>> getvalues vector
*

*>> "trYMinF" : ymin_vct
*

*>> "trYMaxF" : ymax_vct
*

*>> end getvalues
*

*>>
*

*>> print("ymin_ter / ymax_ter = " + ymin_ter + "/" + ymax_ter)
*

*>> print("ymin_tc / ymax_tc = " + ymin_tc + "/" + ymax_tc)
*

*>> print("ymin_rh / ymax_rh = " + ymin_rh + "/" + ymax_rh)
*

*>> print("ymin_tc2 / ymax_tc2 = " + ymin_tc2 + "/" + ymax_tc2)
*

*>> print("ymin_rh2 / ymax_rh2 = " + ymin_rh2 + "/" + ymax_rh2)
*

*>> print("ymin_vct / ymax_vct = " + ymin_vct + "/" + ymax_vct)
*

*>>
*

*>> If these are not all the same, then your overlaid plots are going to be
*

*>> incorrect.
*

*>>
*

*>> --Mary
*

*>>
*

*>> On Sep 30, 2013, at 4:41 AM, sangeeta maharjan <sangeetamaharjan@gmail.com>
*

*>> wrote:
*

*>>
*

*>>> Dear ncl-users
*

*>>>
*

*>>> I used the wrf_CrossSection_add_smooth_terain4.ncl from Ncl Examples
*

*>>> Scripts available in the internet. I have made minor changes, adding
*

*>>> wind vector information and replaced temperature by potential
*

*>>> temperature. From generated plot , it is seen that the terrain plot
*

*>>> is fine but as we move to crosssection plot the height of the terrain
*

*>>> contour is much lower than it has be be.
*

*>>>
*

*>>> For eg, the terrain contour in between 27.6 to 29.9 must be around
*

*>>> 1350 m instead it only about 500 m.
*

*>>>
*

*>>> For your kind reference, I have attached the ncl script and generated
*

*>>> plot.
*

*>>>
*

*>>> I would appreciate any help on it.
*

*>>>
*

*>>> Thanks.
*

*>>> Sangeeta Maharjan.
*

*>>> <cros_sec_plot.pdf><practise_csection_pressure.ncl>_______________________________________________
*

*>>> 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
*

_______________________________________________

ncl-talk mailing list

List instructions, subscriber options, unsubscribe:

http://mailman.ucar.edu/mailman/listinfo/ncl-talk

Received on Wed Oct 9 14:24:00 2013

*
This archive was generated by hypermail 2.1.8
: Tue Oct 22 2013 - 10:35:27 MDT
*