<div dir="ltr">Hi Malcolm,<div>One thing to check, is to make sure the input latitudes and longitudes are in the same direction and within the same range as the regridded latitudes and longitudes. Your input coordinates are:</div><div>lat: [20.26178..53.24607]<br>lon: [225..300]<br></div><div><br></div><div>Do your target grid longitudes fall within 225-300E? And do the latitudes fall within 20-53N?</div><div>What is the output from :</div><div>printMinMax(lat2d,0)</div><div>printMinMax(lon2d,0)</div><div><br></div><div>Adam</div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, May 12, 2021 at 10:18 AM Wilson, Malcolm Tyree via ncl-talk <<a href="mailto:ncl-talk@mailman.ucar.edu">ncl-talk@mailman.ucar.edu</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">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Hi again, </div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
rgird2rcm ran fine without any errors, thank you! However, I'm still getting back nothing but filled values (every point is a fill value) in the returned, interpolated array. I even adjusted the data type of fi to double to see if that was causing issues, but
 the same issue appears. Below is the code that I'm using now, along with the data summary of both fi and the output (fi after interpolation) arrays. I'm wondering if this is supposed to happen, or is there something I'm missing? Thanks!</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
;Interpolation
<div><br>
</div>
<div>  f = addfile ("~/<a href="http://small_hus_may_pert_2010-2050.nc" target="_blank">small_hus_may_pert_2010-2050.nc</a>","r")</div>
<div>  g = addfile ("~/<a href="http://hrrr.t00z.wrfprsf00.nc" target="_blank">hrrr.t00z.wrfprsf00.nc</a>","r")</div>
<div><br>
</div>
<div>  lat = f->lat</div>
<div>  lon = f->lon</div>
<div><br>
</div>
<div>  lat2d = g->gridlat_0              ; (N,M)</div>
<div>  lon2d = g->gridlon_0</div>
<div><br>
</div>
<div>  ;LATD = todouble(lat2d)       ; (N*M)</div>
<div>  ;LOND = (lon2d)</div>
<div><br>
</div>
<div>  fi = f->hus_pert</div>
<div><br>
</div>
<div>  hrrr_grid_data = rgrid2rcm_Wrap(lat,lon,fi,lat2d,lon2d, 0)</div>
<div><br>
</div>
  printVarSummary(hrrr_grid_data)<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Variable: fi
<div>Type: float</div>
<div>Total Size: 228384 bytes</div>
<div>            57096 values</div>
<div>Number of Dimensions: 4</div>
<div>Dimensions and sizes:   [time | 1] x [lev | 26] x [lat | 36] x [lon | 61]</div>
<div>Coordinates:</div>
<div>            time: [ 0.. 0]</div>
<div>            lev: [0.9925562..0.00354464]</div>
<div>            lat: [20.26178..53.24607]</div>
<div>            lon: [225..300]</div>
<div>Number Of Attributes: 1</div>
  units :       kg/kg<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Variable: hrrr_grid_data
<div>Type: float</div>
<div>Total Size: 198134664 bytes</div>
<div>            49533666 values</div>
<div>Number of Dimensions: 4</div>
<div>Dimensions and sizes:   [time | 1] x [lev | 26] x [ygrid_0 | 1059] x [xgrid_0 | 1799]</div>
<div>Coordinates:</div>
<div>            time: [ 0.. 0]</div>
<div>            lev: [0.9925562..0.00354464]</div>
<div>Number Of Attributes: 3</div>
<div>  _FillValue :  9.96921e+36</div>
<div>  units :       kg/kg</div>
  ncl : rgrid2rcm used for interpolation<br>
</div>
<div id="gmail-m_6953475202701232283appendonsend"></div>
<hr style="display:inline-block;width:98%">
<div id="gmail-m_6953475202701232283divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> 아나유즈바시츠 <<a href="mailto:ajuzbasic@pusan.ac.kr" target="_blank">ajuzbasic@pusan.ac.kr</a>><br>
<b>Sent:</b> Wednesday, May 12, 2021 8:06 AM<br>
<b>To:</b> Wilson, Malcolm Tyree <<a href="mailto:mtw5270@psu.edu" target="_blank">mtw5270@psu.edu</a>><br>
<b>Cc:</b> <a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a> <<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>><br>
<b>Subject:</b> Re: [ncl-talk] Interpolating CCSM grid to RAP/HRRR grid</font>
<div> </div>
</div>
<div>
<div dir="ltr">Hi Malcom,<br>
<br>
Apologies, I mixed it up. The function you need is rgrid2rcm, which is, as you said, opposite of rcm2rgrid. This one: 
<a href="https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.ncl.ucar.edu%2FDocument%2FFunctions%2FBuilt-in%2Frgrid2rcm.shtml&data=04%7C01%7Cmtw5270%40psu.edu%7C9f1ea306fc124903ca7308d9153e5a20%7C7cf48d453ddb4389a9c1c115526eb52e%7C0%7C1%7C637564179828314466%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=dHzt0YSIMNPq61oYEX2kWf9Y%2FRKjSuhSqB11FZwZI1A%3D&reserved=0" target="_blank">
http://www.ncl.ucar.edu/Document/Functions/Built-in/rgrid2rcm.shtml</a>. This should do what you want, without giving you all the missing values.<br>
<br>
<br>
</div>
<br>
<div>
<div dir="ltr">On Wed, May 12, 2021 at 9:00 PM Wilson, Malcolm Tyree <<a href="mailto:mtw5270@psu.edu" target="_blank">mtw5270@psu.edu</a>> wrote:<br>
</div>
<blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Hi, </div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
So, I'm trying to re-grid from a rectilinear grid (CCSM) to a curvilinear grid (HRRR). The CCSM had one-dimensional coordinates arrays while the HRRR has 2-dimensional coordinate arrays. So, the opposite of what rcm2rgrid is doing, which is why I tried using
 linint2_points_Wrap instead. Thanks!</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
-Malcolm W. </div>
<div id="gmail-m_6953475202701232283x_gmail-m_-5297571870115876021appendonsend"></div>
<hr style="display:inline-block;width:98%">
<div id="gmail-m_6953475202701232283x_gmail-m_-5297571870115876021divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> 아나유즈바시츠 <<a href="mailto:ajuzbasic@pusan.ac.kr" target="_blank">ajuzbasic@pusan.ac.kr</a>><br>
<b>Sent:</b> Tuesday, May 11, 2021 10:42 PM<br>
<b>To:</b> Wilson, Malcolm Tyree <<a href="mailto:mtw5270@psu.edu" target="_blank">mtw5270@psu.edu</a>><br>
<b>Cc:</b> <a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a> <<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>><br>
<b>Subject:</b> Re: [ncl-talk] Interpolating CCSM grid to RAP/HRRR grid</font>
<div> </div>
</div>
<div>
<div dir="ltr">Hi Malcom,<br>
<br>
It seems to me that you are trying to regrid from curvilinear grid (with 2D lat and lon) to rectilinear grid. You should rcm2rgrid function for that, not linint, as the linint one is meant to interpolate from one rectilinear grid to another. <br>
 Try to use this <a href="https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.ncl.ucar.edu%2FDocument%2FFunctions%2FContributed%2Frcm2rgrid_Wrap.shtml&data=04%7C01%7Cmtw5270%40psu.edu%7C9f1ea306fc124903ca7308d9153e5a20%7C7cf48d453ddb4389a9c1c115526eb52e%7C0%7C1%7C637564179828324453%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=gqC2iltJNNr6mxVcQVabWp6xmzOj8i%2FbICeZ%2Fz9QRP4%3D&reserved=0" target="_blank">
https://www.ncl.ucar.edu/Document/Functions/Contributed/rcm2rgrid_Wrap.shtml</a></div>
<br>
<div>
<div dir="ltr">On Wed, May 12, 2021 at 10:51 AM Wilson, Malcolm Tyree via ncl-talk <<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a>> wrote:<br>
</div>
<blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span style="margin:0px;font-size:12pt;background-color:rgb(255,255,255)">Hello Everyone,</span>
<div style="margin:0px;font-size:12pt;background-color:rgb(255,255,255)"><br>
</div>
<div style="margin:0px;font-size:12pt;background-color:rgb(255,255,255)">I've been trying to interpolate humidity and temperature data from CCSM to the RAP/HRRR grid using NCL (specifically using the function linint2_points and linint2_points_Wrap). I created
 a script that should interpolate the data from CCSM to the HRRR grid, but the script returned an array that contains nothing but filled values (9.96921e+36) and no data of the variable field I'm interpolating. I don't understand this happened, and I used both
 the <span style="margin:0px;background-color:rgb(255,255,255);display:inline">linint2_points and linint2_points_Wrap functions. Is this supposed to happen, or and I'm missing something? Below is the code I used. Any advice would be appreciated. Thanks!</span></div>
<div style="margin:0px;font-size:12pt;background-color:rgb(255,255,255)"><br>
</div>
<div style="margin:0px;font-size:12pt;background-color:rgb(255,255,255)">-Malcolm W.<br>
</div>
<div style="margin:0px;font-size:12pt;background-color:rgb(255,255,255)"><span style="margin:0px;background-color:rgb(255,255,255);display:inline"><br>
</span></div>
<div style="margin:0px;font-size:12pt;background-color:rgb(255,255,255)"><span style="margin:0px;background-color:rgb(255,255,255);display:inline">  f = addfile ("~/<a href="https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fsmall_hus_may_pert_2010-2050.nc%2F&data=04%7C01%7Cmtw5270%40psu.edu%7C9f1ea306fc124903ca7308d9153e5a20%7C7cf48d453ddb4389a9c1c115526eb52e%7C0%7C1%7C637564179828324453%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=ogr4icTWYUSpDkU0ZLWAKBEu2kQvuJTYCsxC6yx90w4%3D&reserved=0" target="_blank">small_hus_may_pert_2010-2050.nc</a>","r")
<div style="margin:0px">  g = addfile ("~/<a href="https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fhrrr.t00z.wrfprsf00.nc%2F&data=04%7C01%7Cmtw5270%40psu.edu%7C9f1ea306fc124903ca7308d9153e5a20%7C7cf48d453ddb4389a9c1c115526eb52e%7C0%7C1%7C637564179828334443%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=tS66RAR%2FoHbgmc0P4E%2FBjOsuUG9pX5jjbsza0WJu5Rk%3D&reserved=0" target="_blank">hrrr.t00z.wrfprsf00.nc</a>","r")</div>
<div style="margin:0px"><br>
</div>
<div style="margin:0px">  lat = f->lat      ;(length=36)</div>
<div style="margin:0px">  lon = f->lon    ;(length=61)</div>
<div style="margin:0px"><br>
</div>
<div style="margin:0px">  lat2d = g->gridlat_0              ; (shape: (1059,1799))</div>
<div style="margin:0px">  lon2d = g->gridlon_0           <span> </span><span style="margin:0px;background-color:rgb(255,255,255);display:inline">; (shape: (1059,1799))</span></div>
<div style="margin:0px"><br>
</div>
<div style="margin:0px">  LAT1D = ndtooned(lat2d)       </div>
<div style="margin:0px">  LON1D = ndtooned(lon2d)</div>
<div style="margin:0px"><br>
</div>
<div style="margin:0px">  fi = f->hus_pert ;(humidity data I'm interpolating) </div>
<div style="margin:0px"><br>
</div>
<div style="margin:0px">  fo = linint2_points_Wrap(lon,lat,fi, False, LON1D,LAT1D, 0)</div>
<div style="margin:0px"><br>
</div>
  hrrr_data = onedtond( ndtooned(fo), (/1,26,1059,1799/) ) ;(conatins nothing but filled values)</span></div>
<br>
</div>
</div>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmailman.ucar.edu%2Fmailman%2Flistinfo%2Fncl-talk&data=04%7C01%7Cmtw5270%40psu.edu%7C9f1ea306fc124903ca7308d9153e5a20%7C7cf48d453ddb4389a9c1c115526eb52e%7C0%7C1%7C637564179828344441%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=b2Q%2FEzHUPoBZAvWT0jgZNGC7MdZYbyT6bkUc%2F%2BkUnPE%3D&reserved=0" rel="noreferrer" target="_blank">https://mailman.ucar.edu/mailman/listinfo/ncl-talk</a></blockquote>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>

_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="https://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">https://mailman.ucar.edu/mailman/listinfo/ncl-talk</a></blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div><div><span><font color="#888888">Adam Phillips <br></font></span></div><span><font color="#888888">Associate Scientist,  </font></span><span><font color="#888888">Climate and Global Dynamics Laboratory, NCAR<br></font></span></div></div><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli/" target="_blank">www.cgd.ucar.edu/staff/asphilli/</a>   </font></span><span><font color="#888888">303-497-1726 </font></span></div><span><font color="#888888"></font></span><div><div><span><font color="#888888"><br></font></span><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli" target="_blank"></a></font></span></div></div></div></div></div></div></div></div></div></div></div>