<div dir="ltr"><div>Hi -- I don't really know the answer to your question. I do note wrf_user_ll_to_ij() is considered deprecated in the latest version of NCL, and it is recommended to use wrf_user_ll_to_xy() instead. Also, are you taking into account that wrf_user_ll_to_ij() returns a 1-based index (the recommended function returns a 0-based index)?  <br></div><div><br></div><div>Hope that helps..</div><div>Rick<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, May 27, 2019 at 7:37 PM LSL <<a href="mailto:lslrsgis@whu.edu.cn">lslrsgis@whu.edu.cn</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 bgcolor="#FFFFFF">
    Dear NCL Community,
    <div class="gmail-m_-7688987409912985110moz-forward-container">
      <div class="gmail-m_-7688987409912985110moz-forward-container">
        <p style="margin-bottom:0in;line-height:100%"><br>
        </p>
        <p style="margin-bottom:0in;line-height:100%">I am writing
          for a wrf_usr_ll_to_ij problem. I am trying to extract
          stations within WRF domain 01, and converting lat/lon to i/j.
          However, I found the i/j are not correctly converted, since
          XLAT(i,j), XLONG(i,j) are not the same as the original
          lat/lon.</p>
        <p style="margin-bottom:0in;line-height:100%"><br>
        </p>
        <p style="margin-bottom:0in;line-height:100%">For example,
          the first line in file (2)
          REP-SITE-LIST-LAT-LON-XY-REVISED-ECO.TXT attached:</p>
        <p style="margin-bottom:0in;line-height:100%"><font style="font-size:10pt" size="2">ID LAT LON I J I_MAX-I
            J_MAX-J LON_S LAT_S LAT_R LON_R LAT_R’ LON_R’ </font> </p>
        <p style="margin-bottom:0in;line-height:100%"><font style="font-size:10pt" size="2">52101 43.44 93.04 2 67 59
            23 92.87 43.52 26.06 115.21 42.11 101.25</font></p>
        <p style="margin-bottom:0in;line-height:100%"><br>
        </p>
        <p style="margin-bottom:0in;line-height:100%">To verify the
          I,J calculated, three pairs of lat/lon are reconstructed as
          follows:</p>
        <p style="margin-bottom:0in;line-height:100%"><br>
        </p>
        <p style="margin-bottom:0in;line-height:100%"><font style="font-size:10pt" size="2">LAT_S/LON_S are calculated
            from wrf_usr_ij_to_ll(J,I)</font></p>
        <p style="margin-bottom:0in;line-height:100%"><font style="font-size:10pt" size="2">LAT_R/LON_R are calculated
            from XLAT(I,J), XLONG(I,J)</font></p>
        <p style="margin-bottom:0in;line-height:100%"><font style="font-size:10pt" size="2">LAT_R’/LON_R’ are
            calculated from XLAT(I_MAX-I,J_MAX-J),
            XLONG(I_MAX-I,J_MAX-J)</font></p>
        <p style="margin-bottom:0in;line-height:100%"><br>
        </p>
        <p style="margin-bottom:0in;line-height:100%">Any indication
          is appreciated. Thanks.</p>
        <p style="margin-bottom:0in;line-height:100%">LSL<br>
        </p>
        <p style="margin-bottom:0in;line-height:100%"><br>
        </p>
        <p style="margin-bottom:0in;line-height:100%">P.S. Three
          fiels are attached:</p>
        <p style="margin-bottom:0in;line-height:100%">(1)extract_list_CMA_sites_within_WRF_D01_latlon_XY_VERSION001.ncl
          --extraction code</p>
        <p style="margin-bottom:0in;line-height:100%">(2)PREP-SITE-LIST-LAT-LON-XY-REVISED-ECO.TXT
          --extraction results</p>
        <p style="margin-bottom:0in;line-height:100%">(3)SURF_CLI_CHN_MUL_DAY-PRE-13011-SITE-LIST.TXT
          --CMA station list (with lat/lon)</p>
        <p style="margin-bottom:0in;line-height:100%"><br>
        </p>
        <p style="margin-bottom:0in;line-height:100%">(4)<a href="http://wrfout_d01.nc" target="_blank">wrfout_d01.nc</a>
          --wrfout file, big as 8.4M, not attached<br>
        </p>
        <p style="margin-bottom:0in;line-height:100%">
          
        </p>
        
        <p>
          </p>
      </div>
    </div>
  </div>

_______________________________________________<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/mailman/listinfo/ncl-talk</a><br>
</blockquote></div>