[ncl-talk] wrf_usr_ll_to_ij problem (inside domain, I/J not extracted correctly)

Rick Brownrigg brownrig at ucar.edu
Tue May 28 11:13:45 MDT 2019


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)?

Hope that helps..
Rick

On Mon, May 27, 2019 at 7:37 PM LSL <lslrsgis at whu.edu.cn> wrote:

> Dear NCL Community,
>
>
> 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.
>
>
> For example, the first line in file (2)
> REP-SITE-LIST-LAT-LON-XY-REVISED-ECO.TXT attached:
>
> ID LAT LON I J I_MAX-I J_MAX-J LON_S LAT_S LAT_R LON_R LAT_R’ LON_R’
>
> 52101 43.44 93.04 2 67 59 23 92.87 43.52 26.06 115.21 42.11 101.25
>
>
> To verify the I,J calculated, three pairs of lat/lon are reconstructed as
> follows:
>
>
> LAT_S/LON_S are calculated from wrf_usr_ij_to_ll(J,I)
>
> LAT_R/LON_R are calculated from XLAT(I,J), XLONG(I,J)
>
> LAT_R’/LON_R’ are calculated from XLAT(I_MAX-I,J_MAX-J),
> XLONG(I_MAX-I,J_MAX-J)
>
>
> Any indication is appreciated. Thanks.
>
> LSL
>
>
> P.S. Three fiels are attached:
>
> (1)extract_list_CMA_sites_within_WRF_D01_latlon_XY_VERSION001.ncl
> --extraction code
>
> (2)PREP-SITE-LIST-LAT-LON-XY-REVISED-ECO.TXT --extraction results
>
> (3)SURF_CLI_CHN_MUL_DAY-PRE-13011-SITE-LIST.TXT --CMA station list (with
> lat/lon)
>
>
> (4)wrfout_d01.nc --wrfout file, big as 8.4M, not attached
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190528/1907f147/attachment.html>


More information about the ncl-talk mailing list