wrf_user_latlon_to_ij usage

From: Chris Klich <caklich_at_nyahnyahspammersnyahnyah>
Date: Fri Sep 02 2011 - 13:16:13 MDT

Hi, I am currently using an older version of NCL (version 5.0.0) due to
library issues on my network cluster. Therefore, I am not able to use
wrf_ij_to_ll yet, which would most likely do what I need to do. However, I
am trying to find the i,j point closest to my ref_lat and ref_lon for my
inner (second) domain. Because I am using WRF/Chem, I need to know the
center point in domain 2 to build my chemical emissions. As of right now, I
am just guessing lat/lon points and running the script:

*load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRF_contributed.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"

begin

a = addfile("/sully/r0/cklich/WRF/wrfout_d02_2008-04-18_06:00:00.nc","r")
;Open file for reading

loc = wrf_user_latlon_to_ij(a, 40, 145)
print("Y/X location is: " +loc)

end*

until I receive the i,j that is exactly in the middle of the domain. For
example, if the grid size is 250x250, I guess points until I receive an i,j
that is 125, 125. However, I have also read that this function's array is
base 0, not base 1. Does this mean when I use this function I have to guess
points until it is 124,124? Also, is there any easier way this can be done
until I am able to upgrade NCL?

Thank you.

-- 
Christopher Klich
Graduate Student
Florida State University
(908) 208-9743

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Sep 2 13:16:21 2011

This archive was generated by hypermail 2.1.8 : Wed Sep 07 2011 - 10:58:58 MDT