<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ks_c_5601-1987">
<style type="text/css" id="owaParaStyle"></style>
</head>
<body fpstyle="1" ocsi="0">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Hi Bill (and Rick),
<div><br>
</div>
<div>Thank you so much for looking into this! It is much appreciated. </div>
<div><br>
</div>
<div>Best regards,</div>
<div>Kacie</div>
<div>
<div><br>
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="">
<div style=""><font face="monospace" size="3" style="">---</font></div>
<div style=""><font face="monospace" size="3"><br>
</font></div>
<font face="monospace" size="3" style=""><font style="">Kacie N. Shourd, M.S.</font>
</font>
<div style=""><span style="background-color:rgb(255,255,255)"><font face="monospace" size="3">µå¸²</font></span></div>
<div style=""><span style="background-color:rgb(255,255,255)"><font face="monospace" size="3"><br>
</font></span></div>
<div style=""><span style="background-color:rgb(255,255,255)"><font face="monospace" size="3">Staff Research Scientist</font></span></div>
<div style=""><span style="background-color:rgb(255,255,255)"><font face="monospace" size="3">Division of Atmospheric Science</font></span></div>
<div style=""><span style="background-color:rgb(255,255,255)"><font face="monospace" size="3">Desert Research Institute, Reno, NV</font></span></div>
<div style="">
<div style="background-color:rgb(255,255,255)"><font face="monospace" size="3">Kacie.Shourd@dri.edu<br>
</font></div>
<div style="background-color:rgb(255,255,255)"><font face="monospace" size="3" style="">Work: <font style="">(775) 674-7049</font></font></div>
</div>
</div>
</div>
</div>
</div>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div id="divRpF782695" style="direction: ltr;"><font face="Tahoma" size="2" color="#000000"><b>From:</b> Bill Ladwig [ladwig@ucar.edu]<br>
<b>Sent:</b> Thursday, April 12, 2018 10:05 AM<br>
<b>To:</b> Kacie Shourd<br>
<b>Cc:</b> ncl-talk (ncl-talk@ucar.edu)<br>
<b>Subject:</b> Re: [ncl-talk] Cross sections w/ smoothed terrain.... New issue???<br>
</font><br>
</div>
<div></div>
<div>
<div dir="ltr">Hi Kacie,
<div><br>
</div>
<div>Rick and I both looked over this problem and came up with a solution, but you won't be able to use the wrf_contour routines with it. You have to use the gsn_csm_contour routines instead. The root cause of the problem is that the example you are using does
a bit of a hack to get the RH contours on to a scatter plot for terrain. It tries to cap the height of the terrain plot to a value that you specify (i.e. zmax), then tries to crop the data for RH to fit in that terrain scatter plot area. To make a long story
short, as you go higher up in WRF, the grid boxes get taller. When cropped, there's a bunch of extra slop depending on how the WRF grid aligns with the zmax you chose, since the chosen value for zmax might be in the middle of a grid box. At the end of the
day, there's going to be misalignment between the contour plot for terrain and the contour plot of RH, since those contours aren't being drawn with an identical y-axis. The example page warns of this with "<span style="color:rgb(0,0,0); font-family:Verdana,Arial,Helvetica,sans-serif; font-size:14.4px; text-align:justify">Users
are </span><strong style="color:rgb(0,0,0); font-family:Verdana,Arial,Helvetica,sans-serif; font-size:14.4px; text-align:justify"><em>STRONGLY CAUTIONED</em></strong><span style="color:rgb(0,0,0); font-family:Verdana,Arial,Helvetica,sans-serif; font-size:14.4px; text-align:justify"> that
these scripts are EXPERIMENTAIL and the terrain may not plot in exactly the right location.". </span></div>
<br>
To fix the problem, we're going to supply the RH cross section with coordinate data for the "Vertical" dimension. Once the RH cross section has the height information, it's easy for NCL to plot the terrain and RH on the same y-axis. (Not having the cross section
height coordinate information is the real cause of this problem and why the hack was required for the example you used. In the future, I will be adding a new cross section routine to NCL that mirrors what wrf-python is doing, so these kind of plots will be
easier in the future.)
<div><br>
</div>
<div>Attached is a script (new_cross_section.ncl) that shows how we did it. Note that if you decide you still want to modify WRFUserARW.ncl to improve the vertical resolution of the cross section (as we did), you'll also need to modify new_cross_section.ncl
to match. I've attached the modified WRFUserARW.ncl that we used for version 6.4.0 (make sure you copy the WRFUserARW.ncl that came with your NCL distribution if you aren't using 6.4.0). You can just keep the modified version of WRFUserARW.ncl in the same
directory as new_cross_section.ncl and the script will load it at the top.</div>
<div><br>
</div>
<div>The plots I attached below show the cross sections for the original data (contour_rh) and the data with the missing values filled (contour_rh2) so you can see the differences. The script itself is still a bit messy, but I removed most of the stuff that
wasn't needed to make these plots. Let me know if you have any questions.</div>
<div><br>
</div>
<div>Hope this helps,</div>
<div><br>
</div>
<div>Bill</div>
<div><br>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Mon, Apr 9, 2018 at 12:05 PM, Kacie Shourd <span dir="ltr">
<<a href="mailto:Kacie.Shourd@dri.edu" target="_blank">Kacie.Shourd@dri.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
<div>
<div style="direction:ltr; font-family:Tahoma; color:#000000; font-size:10pt">Hi everyone,<br>
<br>
It's been a while since anyone posted to this thread, but I tried the suggested fix (modifying my WRFUserARW.ncl line 382) to no avail! There is still a good chunk of data missing above the terrain. See the attached output images. The wider image is the default
with "dz=0.01*z_max" and the skinnier image is with "dz=0.00001*z_max".<br>
<br>
Attempted fix:<span class=""><br>
<br>
"Have you modified line ~382 in WRFUserARW.ncl yet? dz can be decreased from the default value of 0.01:
</span>
<div dir="ltr"><span class="">
<div><br>
</div>
<div>...else</div>
<div> z_max = max(z)</div>
<div> z_min = 0.</div>
<div><span style="white-space:pre-wrap"></span><i><font color="FF0000"><b>; Changed to:</b></font></i></div>
<i><font color="FF0000"><b></b></font></i></span>
<div><i><font color="FF0000"><b><span style="white-space:pre-wrap"></span>dz = 0.00001 * z_max</b></font></i></div>
<span class="">
<div> ; From:</div>
<div><i><b><font color="FF0000"> ;dz = 0.01 * z_max</font></b></i></div>
<div> nlevels = tointeger( z_max/dz )</div>
<div> z_var2d = new( (/nlevels/), typeof(z))</div>
<div> z_var2d(0) = z_min</div>
<div> end if"<br>
</div>
</span></div>
<div><br>
There are quite noticeable differences between the two plots, but no improvement to the terrain. I am close to giving up on this, but thought I would reach out one more time. I have changed other things in the "wrf_intrpd_3d" function also without luck. As
mentioned before, the missing data near the terrain was not an issue in a colleague's RIP plot, so I know it is not the data.<br>
<br>
Best,<span class=""><br>
Kacie<br>
<br>
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div>
<div><font size="3" face="monospace">---</font></div>
<div><font size="3" face="monospace"><br>
</font></div>
<font size="3" face="monospace"><font>Kacie N. Shourd, M.S.</font> </font>
<div><span style="background-color:rgb(255,255,255)"><font size="3" face="monospace">µå¸²</font></span></div>
<div><span style="background-color:rgb(255,255,255)"><font size="3" face="monospace"><br>
</font></span></div>
<div><span style="background-color:rgb(255,255,255)"><font size="3" face="monospace">Staff Research Scientist</font></span></div>
<div><span style="background-color:rgb(255,255,255)"><font size="3" face="monospace">Division of Atmospheric Science</font></span></div>
<div><span style="background-color:rgb(255,255,255)"><font size="3" face="monospace">Desert Research Institute, Reno, NV</font></span></div>
<div>
<div style="background-color:rgb(255,255,255)"><font size="3" face="monospace"><a href="mailto:Kacie.Shourd@dri.edu" target="_blank">Kacie.Shourd@dri.edu</a><br>
</font></div>
<div style="background-color:rgb(255,255,255)"><font size="3" face="monospace">Work: <font>(775) 674-7049</font></font></div>
</div>
</div>
</div>
</div>
</span></div>
<div style="font-family:Times New Roman; color:#000000; font-size:16px"><span class="">
<hr>
<div id="m_6616180150320500559divRpF583454" style="direction:ltr"><font size="2" face="Tahoma" color="#000000"><b>From:</b> Scott Capps [<a href="mailto:scapps@atmosdatasolutions.com" target="_blank">scapps@atmosdatasolutions.com</a><wbr>]<br>
<b>Sent:</b> Tuesday, March 27, 2018 4:47 PM<br>
<b>To:</b> Kacie Shourd<br>
<b>Cc:</b> ncl-talk (<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>)<br>
<b>Subject:</b> Re: [ncl-talk] Cross sections w/ smoothed terrain.... New issue???<br>
</font><br>
</div>
<div></div>
</span>
<div>
<div class="h5">
<div>
<div dir="ltr">
<div>Have you modified line ~382 in WRFUserARW.ncl yet? dz can be decreased from the default value of 0.01:</div>
<div><br>
</div>
<div>...else</div>
<div> z_max = max(z)</div>
<div> z_min = 0.</div>
<div><span style="white-space:pre-wrap"></span>; Changed to:</div>
<div><span style="white-space:pre-wrap"></span>dz = 0.002 * z_max</div>
<div> ; From:</div>
<div> ;dz = 0.01 * z_max</div>
<div> nlevels = tointeger( z_max/dz )</div>
<div> z_var2d = new( (/nlevels/), typeof(z))</div>
<div> z_var2d(0) = z_min</div>
<div> end if</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Tue, Mar 27, 2018 at 4:36 PM, Kacie Shourd <span dir="ltr">
<<a href="mailto:Kacie.Shourd@dri.edu" target="_blank">Kacie.Shourd@dri.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
<div>
<div style="direction:ltr; font-family:Tahoma; color:#000000; font-size:10pt">Hi NCL friends,<br>
<br>
Attached is an image of the current output I am getting trying to plot a vertical cross section with WRF data in NCL. Also attached is my code, and I can upload the WRF data file for anyone who needs it.
<br>
<br>
I have used this script tons of times in the past with no issue (i.e. no "missing" data near the ground, or at least the terrain was smoothed to cover that up) and am hoping to figure out what's wrong.
<br>
<br>
Could it be the data file I have? If yes, is there a simple way I can extrapolate the RH values to below the ground?
<br>
<br>
Is it the version of NCL I am running?? I used to run this script in v6.4 but am using v6.3 at the moment.
<br>
<br>
A colleague of mine made a plot with the same WRF file in RIP and did not have this issue. I would prefer to plot this up in NCL if possible as I think the plots come out nicer and this is going into a document for some pretty important folks...<br>
<br>
Thanks,<br>
Kacie<br>
<div><br>
<div style="font-family:Tahoma; font-size:13px">
<div>
<div><font size="3" face="monospace">---</font></div>
<div><font size="3" face="monospace"><br>
</font></div>
<font size="3" face="monospace"><font>Kacie N. Shourd, M.S.</font> </font>
<div><span style="background-color:rgb(255,255,255)"><font size="3" face="monospace">µå¸²</font></span></div>
<div><span style="background-color:rgb(255,255,255)"><font size="3" face="monospace"><br>
Staff Research Scientist<br>
</font></span></div>
<div><span style="background-color:rgb(255,255,255)"><font size="3" face="monospace">Division of Atmospheric Science</font></span></div>
<div><span style="background-color:rgb(255,255,255)"><font size="3" face="monospace">Desert Research Institute, Reno, NV</font></span></div>
<div>
<div style="background-color:rgb(255,255,255)"><font size="3" face="monospace"><a href="mailto:Kacie.Shourd@dri.edu" target="_blank">Kacie.Shourd@dri.edu</a><br>
</font></div>
<div style="background-color:rgb(255,255,255)"><font size="3" face="monospace">Work: <font><a href="tel:(775)%20674-7049" value="+17756747049" target="_blank">(775) 674-7049</a></font></font></div>
</div>
</div>
</div>
</div>
</div>
<br>
<font size="2" face="Arial">PUBLIC RECORDS NOTICE: In accordance with NRS Chapter 239, this email and responses, unless otherwise made confidential by law, may be subject to the Nevada Public Records laws and may be disclosed to the public upon request.</font>
</div>
<br>
______________________________<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="https://linkprotect.cudasvc.com/url?a=http://mailman.ucar.edu/mailman/listinfo/ncl-talk&c=E,1,FvUIVgD7EH9G1hQSxvgiu9p8mf_4k0kEcTABmKT6pVBB-FhMwRwnE4yuShuTwXhNqoezMpeYqatYxdSV83pHVm7uAsGw71owTjHKYqPf7g,,&typo=1" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailma<wbr>n/listinfo/ncl-talk</a><br>
<br>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
<div class="m_6616180150320500559gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr"><b><font size="4">Scott Capps</font></b>
<div>Principal</div>
<div><a href="https://linkprotect.cudasvc.com/url?a=http://www.atmosphericdatasolutions.com&c=E,1,ii7FITA5DOfDJKepvgGfOku-AGID3DnAJtS5iWd_oBwb_PIKnfs-1V1XTcN2ZiESPh4EGugxUHZb3Vv0bmuUu2W6sV9LogTv0Nw4PDekVE-r4rFAJI2KDnz5K5wQ&typo=1" target="_blank">Atmospheric
Data Solutions</a></div>
<div><a href="mailto:scapps@atmosdatasolutions.com" target="_blank">scapps@atmosdatasolutions.com</a>
<div>cell: (949) 910-4385</div>
<div><br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
______________________________<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/<wbr>mailman/listinfo/ncl-talk</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</div>
</div>
</body>
</html>