<div dir="ltr">Thank you so much Mary....surely I will go through the link provided by you....If come across any problem, will let you know</div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Sep 23, 2017 at 12:36 AM, Mary Haley <span dir="ltr"><<a href="mailto:haley@ucar.edu" target="_blank">haley@ucar.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-size:small">Please see this page:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default"><a href="http://www.ncl.ucar.edu/Applications/wrfgsn.shtml" target="_blank">http://www.ncl.ucar.edu/<wbr>Applications/wrfgsn.shtml</a><br></div><div class="gmail_default"><br></div><div class="gmail_default">and look at the first example (wrf_gsn_1.ncl and wrf_nogsn_1.ncl) and the second example (wrf_gsn_2.ncl).</div><div class="gmail_default"><br></div><div class="gmail_default">These show how to use gsn to plot data and it compares the plot with using WRF functions.</div><div class="gmail_default"><br></div><div class="gmail_default">In the wrf_gsn_1.ncl plot, you can see that the gsnLeft/RightString resources are being set automatically, because the data has a description and units attribute.</div><div class="gmail_default"><br></div><div class="gmail_default">Try this script as a start on your own data, and also look at wrf_gsn_2.ncl to see how to further customize your plot.</div><div class="gmail_default"><br></div><div class="gmail_default">If you are unable to get the plot to look as nice as you want, email <a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a> again with your new script and what you want it to look like, and we can help further.</div><div class="gmail_default"><br></div><div class="gmail_default">Good luck,</div><div class="gmail_default"><br></div><div class="gmail_default">--Mary</div><div class="gmail_default"><br></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Sep 22, 2017 at 3:21 AM, swati shewale <span dir="ltr"><<a href="mailto:shewaleswati16@gmail.com" target="_blank">shewaleswati16@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thank you Mary... its wrf file, I just renamed it for my convenience. Actually I am able to plot it using wrf function but unable to put left/right/centre strings, as those are related to gsn functions. so to overcome the difficulty of left/right/centre, I thought to make a plot using gsn functions injstead of wrf functions. but inbuilt wrf functions gives nicer plots than gsn one. <br></div><div class="m_-2339647836215231960HOEnZb"><div class="m_-2339647836215231960h5"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Sep 22, 2017 at 3:48 AM, Mary Haley <span dir="ltr"><<a href="mailto:haley@ucar.edu" target="_blank">haley@ucar.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-size:small">It's hard for somebody to simply look at a script to see if it's correct or not. I do see some errors, but even if I correct the errors, I can't be sure it's 100% correct without having access to your data.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">The problems are:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">[1]</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Your data file is called "<a href="http://patna_data.nc" target="_blank">patna_data.nc</a>". You are using wrf_xxxx functions to plot this data. Since WRF-ARW output files are normally called something like "wrfout_d02_2005-08-29_00:00:0<wbr>0", I can't be sure that you are actually plotting WRF-ARW data. You can only use wrf_xxx plotting functions on WRF-ARW data.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">[2] </div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">You have:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><div class="gmail_default"> t = a->T2(0:7,:,:)</div><div class="gmail_default"> ter = dim_avg_n( ter1, 0 )</div><div class="gmail_default"> ter = ter - 273</div><div class="gmail_default"><br></div><div class="gmail_default">I don't know what your objective, so I don't know if the above is correct. However, you are calling "dim_avg_n" on "ter1" which doesn't exist. Did you mean:</div><div class="gmail_default"><br></div><div class="gmail_default"><div class="gmail_default"> ter = dim_avg_n( t, 0 )</div><div><br></div><div>The above will take an average of the first 8 times teps of your data, assuming that the leftmost dimension of T2 represents time.</div><div><br></div><div>Further, you should use the _Wrap version of this function, so metadata is maintained:</div><div><br></div><div><div class="gmail_default"> ter = dim_avg_n_Wrap( t, 0 )</div></div><div class="gmail_default"><br></div><div class="gmail_default">[3]</div><div class="gmail_default"><br></div><div class="gmail_default">You have:</div><div class="gmail_default"><br></div><div class="gmail_default">ter = ter - 273</div><div class="gmail_default"><br></div><div class="gmail_default">Since you are changing the units, you should update the "units" attribute to something like this:</div><div class="gmail_default"><br></div><div class="gmail_default">ter@units = "degC"</div><div class="gmail_default"><br></div><div class="gmail_default"><br></div><div class="gmail_default">The rest of the script looks okay, but again, the wrf_contour and wrf_map_overlays procedures will only work if you are actually plotting WRF-ARW data.</div><span class="m_-2339647836215231960m_-2864771192035228902HOEnZb"><font color="#888888"><div class="gmail_default"><br></div><div class="gmail_default">--Mary</div><div class="gmail_default"><br></div><div><br></div></font></span></div></div></div><div class="m_-2339647836215231960m_-2864771192035228902HOEnZb"><div class="m_-2339647836215231960m_-2864771192035228902h5"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 7, 2017 at 10:02 PM, swati shewale <span dir="ltr"><<a href="mailto:shewaleswati16@gmail.com" target="_blank">shewaleswati16@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thank you. I will try with your script. yesterday I tried it with below script. Please have a look and let me know, whether it is correct or not.<br></div><div class="m_-2339647836215231960m_-2864771192035228902m_3935797057477022920HOEnZb"><div class="m_-2339647836215231960m_-2864771192035228902m_3935797057477022920h5"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Sep 8, 2017 at 12:54 AM, Mary Haley <span dir="ltr"><<a href="mailto:haley@ucar.edu" target="_blank">haley@ucar.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-size:small">If I understand you correctly, then you need to reshape your X array so that it is NTIM x 8 x NLAT x NLON, and then you can average across the second dimension from the left.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">I've attached a modified version of your script, which is UNTESTED. You may need to modify it to do the right thing with regard to copying over the required metadata. I did this a little with copy_VarAtts, and copy_coords.</div><span class="m_-2339647836215231960m_-2864771192035228902m_3935797057477022920m_4671570295632187386HOEnZb"><font color="#888888"><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">--Mary</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><br></div></font></span></div><div class="m_-2339647836215231960m_-2864771192035228902m_3935797057477022920m_4671570295632187386HOEnZb"><div class="m_-2339647836215231960m_-2864771192035228902m_3935797057477022920m_4671570295632187386h5"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 7, 2017 at 3:42 AM, swati shewale <span dir="ltr"><<a href="mailto:shewaleswati16@gmail.com" target="_blank">shewaleswati16@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Hiii,<br></div>using ncrcat I have single file containing 24 time step (3hrly, 3 days). Now I want to plot temperature variable (average for each day, spatial, panel plot). I am unable to take out time step for 1st day (0:7) and then do average of it...then second day (8:15) ...likewise for third day (16:23). I wrote a script, in that it takes average over all time steps. what changes should I make so that I can get average over specific time step? attached herewith script.<br></div>summary of variable temperature is as follow. <br><div><div><div><div><br>Variable: X<br>Type: float<br>Total Size: 5658552 bytes<br> 1414638 values<br>Number of Dimensions: 3<br>Dimensions and sizes: [Time | 23] x [south_north | 201] x [west_east | 306]<br>Coordinates: <br>Number Of Attributes: 6<br> FieldType : 104<br> MemoryOrder : XY <br> description : TEMP at 2 M<br> units : K<br> stagger : <br> coordinates : XLONG XLAT XTIME<br><br><br></div></div></div></div></div><div class="m_-2339647836215231960m_-2864771192035228902m_3935797057477022920m_4671570295632187386m_5293424139597906667HOEnZb"><div class="m_-2339647836215231960m_-2864771192035228902m_3935797057477022920m_4671570295632187386m_5293424139597906667h5"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 7, 2017 at 3:04 PM, swati shewale <span dir="ltr"><<a href="mailto:shewaleswati16@gmail.com" target="_blank">shewaleswati16@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thank you. I will try with it.<br></div><div class="m_-2339647836215231960m_-2864771192035228902m_3935797057477022920m_4671570295632187386m_5293424139597906667m_-2218844466176671755HOEnZb"><div class="m_-2339647836215231960m_-2864771192035228902m_3935797057477022920m_4671570295632187386m_5293424139597906667m_-2218844466176671755h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 6, 2017 at 8:39 PM, Mary Haley <span dir="ltr"><<a href="mailto:haley@ucar.edu" target="_blank">haley@ucar.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-size:small">The error message is telling you that there's something wrong with argument 0 passed to wrf_contour. Argument 0 refers to the first argument in the list, which is "a(itime)" in this case.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">The issue is that when you use addfiles to open a series of files, you need to use square brackets, [], to access a single file, and not curved brackets, (). This is because addfiles returns a "List" object, and lists in NCL need to be access with square brackets.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">You have:</div><div class="gmail_default" style="font-size:small">
<p class="m_-2339647836215231960m_-2864771192035228902m_3935797057477022920m_4671570295632187386m_5293424139597906667m_-2218844466176671755m_1990489812457881473m_-4200623425211831713gmail-p1"><span class="m_-2339647836215231960m_-2864771192035228902m_3935797057477022920m_4671570295632187386m_5293424139597906667m_-2218844466176671755m_1990489812457881473m_-4200623425211831713gmail-s1"><span class="m_-2339647836215231960m_-2864771192035228902m_3935797057477022920m_4671570295632187386m_5293424139597906667m_-2218844466176671755m_1990489812457881473m_-4200623425211831713gmail-Apple-converted-space"> </span>contour = </span><span class="m_-2339647836215231960m_-2864771192035228902m_3935797057477022920m_4671570295632187386m_5293424139597906667m_-2218844466176671755m_1990489812457881473m_-4200623425211831713gmail-s2">wrf_contour</span><span class="m_-2339647836215231960m_-2864771192035228902m_3935797057477022920m_4671570295632187386m_5293424139597906667m_-2218844466176671755m_1990489812457881473m_-4200623425211831713gmail-s1">(a(itime),wks,t,t_r<wbr>es)</span></p><p class="m_-2339647836215231960m_-2864771192035228902m_3935797057477022920m_4671570295632187386m_5293424139597906667m_-2218844466176671755m_1990489812457881473m_-4200623425211831713gmail-p1"><span class="m_-2339647836215231960m_-2864771192035228902m_3935797057477022920m_4671570295632187386m_5293424139597906667m_-2218844466176671755m_1990489812457881473m_-4200623425211831713gmail-s1">and this should be:</span></p><p class="m_-2339647836215231960m_-2864771192035228902m_3935797057477022920m_4671570295632187386m_5293424139597906667m_-2218844466176671755m_1990489812457881473m_-4200623425211831713gmail-p1"><span class="m_-2339647836215231960m_-2864771192035228902m_3935797057477022920m_4671570295632187386m_5293424139597906667m_-2218844466176671755m_1990489812457881473m_-4200623425211831713gmail-s1">
</span></p><p class="m_-2339647836215231960m_-2864771192035228902m_3935797057477022920m_4671570295632187386m_5293424139597906667m_-2218844466176671755m_1990489812457881473m_-4200623425211831713gmail-p1"><span class="m_-2339647836215231960m_-2864771192035228902m_3935797057477022920m_4671570295632187386m_5293424139597906667m_-2218844466176671755m_1990489812457881473m_-4200623425211831713gmail-s1"><span class="m_-2339647836215231960m_-2864771192035228902m_3935797057477022920m_4671570295632187386m_5293424139597906667m_-2218844466176671755m_1990489812457881473m_-4200623425211831713gmail-Apple-converted-space"> </span>contour = </span><span class="m_-2339647836215231960m_-2864771192035228902m_3935797057477022920m_4671570295632187386m_5293424139597906667m_-2218844466176671755m_1990489812457881473m_-4200623425211831713gmail-s2">wrf_contour</span><span class="m_-2339647836215231960m_-2864771192035228902m_3935797057477022920m_4671570295632187386m_5293424139597906667m_-2218844466176671755m_1990489812457881473m_-4200623425211831713gmail-s1">(a[itime],wks,t,t_r<wbr>es)</span></p><span class="m_-2339647836215231960m_-2864771192035228902m_3935797057477022920m_4671570295632187386m_5293424139597906667m_-2218844466176671755m_1990489812457881473HOEnZb"><font color="#888888"><p class="m_-2339647836215231960m_-2864771192035228902m_3935797057477022920m_4671570295632187386m_5293424139597906667m_-2218844466176671755m_1990489812457881473m_-4200623425211831713gmail-p1"><span class="m_-2339647836215231960m_-2864771192035228902m_3935797057477022920m_4671570295632187386m_5293424139597906667m_-2218844466176671755m_1990489812457881473m_-4200623425211831713gmail-s1">--Mary</span></p><p class="m_-2339647836215231960m_-2864771192035228902m_3935797057477022920m_4671570295632187386m_5293424139597906667m_-2218844466176671755m_1990489812457881473m_-4200623425211831713gmail-p1"><span class="m_-2339647836215231960m_-2864771192035228902m_3935797057477022920m_4671570295632187386m_5293424139597906667m_-2218844466176671755m_1990489812457881473m_-4200623425211831713gmail-s1"><br></span></p></font></span></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="m_-2339647836215231960m_-2864771192035228902m_3935797057477022920m_4671570295632187386m_5293424139597906667m_-2218844466176671755m_1990489812457881473h5">On Mon, Sep 4, 2017 at 4:40 AM, swati shewale <span dir="ltr"><<a href="mailto:shewaleswati16@gmail.com" target="_blank">shewaleswati16@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="m_-2339647836215231960m_-2864771192035228902m_3935797057477022920m_4671570295632187386m_5293424139597906667m_-2218844466176671755m_1990489812457881473h5"><div dir="ltr"><div>Hiiii<br><br></div>I want to do panel plotting using WRF output. I have total 8 files, each contains single time step (one day, 3 hrly datafiles so total 8 files). out of eight times I want to plot 6 time step (panel plot) for variable slp and temperature.<br><br>It shows below error.<br><br>fatal:Argument type mismatch on argument (0) of (wrf_contour) can not coerce<br>fatal:["Execute.c":8567]:Execu<wbr>te: Error occurred at or near line 44 in file temp.ncl<br>(0) Error: gsn_panel: all of the plots passed to gsn_panel appear to be invalid<br><br> Attached herewith script. <br><br>Thank you in advance. Any help will be appreciated<div><div><br><br></div></div></div>
<br></div></div><span>______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailma<wbr>n/listinfo/ncl-talk</a><br>
<br></span></blockquote></div><br></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>