<div dir="ltr">Wendi,<div>Here is the header of a control file I am using to plot WRF output:</div><div><br></div><div>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">dset /lfs1/projects/wrfruc/jdduda/WRF_HRRRX/run/wrfout_d01_2019-04-%d2_%h2_00_00</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">dtype netcdf</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">undef -9999</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">options template</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">title<span class="gmail-Apple-converted-space"> </span>OUTPUT FROM WRF V3.9pre#2 MODEL - scalar fields - by Jeff Duda</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">pdef 1799 1059 lcc <span class="gmail-Apple-converted-space"> </span>21.13812 -122.71953 1 1 <span class="gmail-Apple-converted-space"> </span>38.50000 <span class="gmail-Apple-converted-space"> </span>38.50000<span class="gmail-Apple-converted-space"> </span>-97.50000 3000.00000 3000.00000</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">xdef<span class="gmail-Apple-converted-space"> </span>1799 linear -134.09862 0.04068774</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">ydef<span class="gmail-Apple-converted-space"> </span>1059 linear <span class="gmail-Apple-converted-space"> </span>21.13812 0.02972887</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">zdef 50 linear 1 1.0</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">tdef 19 linear 17Z25APR2019 1HR</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">VARS<span class="gmail-Apple-converted-space"> </span>252</span></p><p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><br></span></p><p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">The domain is on a Lambert conformal projection, as can be determined from examining the PDEF line. To determine the delta-x and delta-y values, I dumped out the latitude and longitude values from the output file. Knowing how a Lambert projection works, I know the minimum longitude value occurs at the grid point of the topmost row and leftmost column (NW corner of the domain), and the maximum occurs on the other end of that same row. The minimum longitude occurs either in the SW or SE corner (depending on what you set for the standard and center lons/lats), but I knew from my setup that either the SW or SE corner would suffice. The maximum latitude occurs halfway through the topmost row.</span></p><p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><br>So I obtained the max and min lat and lon values, took the difference between them , then divided by either 1799 or 1059, which happens to be nx and ny, respectively, in my WRF file (but you can technically use any values you want). </span></p><p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><br></span></p><p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">Jeff Duda</span></p></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jun 20, 2019 at 7:06 PM wendi harjupa <<a href="mailto:wendiharjupa@gmail.com">wendiharjupa@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Dear Mr. Jeff,<div><br></div><div>Thank you very much for your response.</div><div><br></div><div>I am very sorry for more question,</div><div>Would you mind to give me an example for your explanation?</div><div>or it ever asked before by other members, would you share me the link?</div><div><br></div><div>Best regards,</div><div>wendi</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jun 21, 2019 at 2:27 AM Jeff Duda <<a href="mailto:jeffduda319@gmail.com" target="_blank">jeffduda319@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Keep in mind that it's generally a good idea (but is not strictly required) that the following relationship is held in the XDEF and YDEF lines:<div><br></div><div>max_x = min_x + dx*nx</div><div>max_y = min_y + dy*ny</div><div><br></div><div>What I usually do is find the maximum and minimum latitudes and longitudes anywhere in the geographic domain and then divide the difference in those by whatever you set for NX or NY. Use that as the step value. XDEF and YDEF are largely cosmetic for irregular grids, though. What is most important for getting your data to show up correctly is having a PDEF entry with the correct values for whatever your projection is. If your data are not projected in a way that Grads can support then I'm not sure you can do this using GrADS.</div><div><br></div><div>Jeff Duda</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jun 20, 2019 at 1:46 AM wendi harjupa <<a href="mailto:wendiharjupa@gmail.com" target="_blank">wendiharjupa@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Dear GrADS users,<div><br></div><div>I need your help with this problem.</div><div>I have two-dimensional data, which have no linear resolution, such below;</div><div><br></div><div>1. The first, second, third and the last coordinate longitude data are 21.2887, 121.29860, 121.30840 and 148.76140, respectively.</div><div>2. The first, second, third and the last coordinate latitude data are 22.70906, 22.70909, 22.70911 and </div><div>46.19549, respectively.</div><div><br></div><div>I want to make the control file for the data to plot it by grads,</div><div><br></div><div>XDEF LEVEL 2800 121.28870 XXXX</div><div>YDEF LEVEL 2400 22.70906 YYYY</div><div><br></div><div>What number should I use to change XXXX and YYYY?</div><div>and is there special command should I use to handle the irregular spatial resolution?</div><div><br></div><div>Very appreciate for your help.</div><div>Thank you very much.</div><div>Best regards,</div><div>wendi</div><div> <br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jun 19, 2019 at 9:17 PM wendi harjupa <<a href="mailto:wendiharjupa@gmail.com" target="_blank">wendiharjupa@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Dear GrADS user,<div><br></div><div>I want to plot the data which has irregular lon and lat...</div><div>I donot want to interpolate the data, so I just want to plot it as the original data.</div><div><br></div><div>My question is how to make the control file for the irregular lon and lat data.</div><div>I attach two data through this email,</div><div>1. asci data which shows the different of lon and lat of the data.</div><div>2. Binary format data of the asci data.</div><div><br></div><div>Thank you very much for your help.</div><div><br></div><div>best regards</div><div>wendi</div><div class="gmail_chip gmail_drive_chip" style="width:396px;height:18px;max-height:18px;background-color:rgb(245,245,245);padding:5px;font-family:arial;font-weight:bold;font-size:13px;border:1px solid rgb(221,221,221);line-height:1"><a href="https://drive.google.com/file/d/1HDCQXO30JwIRCaxTL-H1pf6eibRvhTpp/view?usp=drive_web" style="display:inline-block;max-width:366px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-decoration-line:none;padding:1px 0px;border:none" target="_blank"><img style="vertical-align: bottom; border: none;" src="https://ssl.gstatic.com/docs/doclist/images/icon_10_generic_list.png"> <span dir="ltr" style="vertical-align:bottom;text-decoration:none">RDCA20150803_0305.bin</span></a><img style="opacity: 0.55; float: right; display: none;"></div><div class="gmail_chip gmail_drive_chip" style="width:396px;height:18px;max-height:18px;background-color:rgb(245,245,245);padding:5px;font-family:arial;font-weight:bold;font-size:13px;border:1px solid rgb(221,221,221);line-height:1"><a href="https://drive.google.com/file/d/1l0vSZLO0Z21aBlfuMLF2UJM02m0kXTtC/view?usp=drive_web" style="display:inline-block;max-width:366px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-decoration-line:none;padding:1px 0px;border:none" target="_blank"><img style="vertical-align: bottom; border: none;" src="https://ssl.gstatic.com/docs/doclist/images/icon_10_generic_list.png"> <span dir="ltr" style="vertical-align:bottom;text-decoration:none">RDCA20150803_0305.txt</span></a><img style="opacity: 0.55; float: right; display: none;"></div></div>
</blockquote></div>
_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail-m_-6809535065308758319gmail-m_8519307016994192344gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><font size="2"><span>Jeff Duda, Research Scientist</span></font></div><div dir="ltr"><font size="2"><span></span></font>University of Colorado Boulder</div><div dir="ltr"><font size="2"><span></span></font>Cooperative Institute for Research in Environmental Sciences</div><div dir="ltr">NOAA/OAR/ESRL/Global Systems Division<br><font size="2"><span>
<span>Boulder, CO<br></span></span></font>
</div></div></div></div></div></div></div></div>
_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
</blockquote></div>
_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><font size="2"><span>Jeff Duda, Research Scientist</span></font></div><div dir="ltr"><font size="2"><span></span></font>University of Colorado Boulder</div><div dir="ltr"><font size="2"><span></span></font>Cooperative Institute for Research in Environmental Sciences</div><div dir="ltr">NOAA/OAR/ESRL/Global Systems Division<br><font size="2"><span>
<span>Boulder, CO<br></span></span></font>
</div></div></div></div></div></div></div></div>