[pyngl-talk] Ngl wrf_ll_to_ij

Bill Ladwig ladwig at ucar.edu
Thu Jun 28 12:03:21 MDT 2018


The WRF features in PyNGL were never officially released and are now
deprecated. Please use wrf-python instead:

http://wrf-python.readthedocs.io/en/latest/user_api/generated/wrf.ll_to_xy_proj.html#wrf.ll_to_xy_proj

If it throws number conversion errors at you, you'll need to supply
numerical arguments for all of the projection parameters (even if they
aren't used). This will be fixed in an upcoming release.

Regards,

Bill

On Thu, Jun 28, 2018 at 11:37 AM, Fearon, Dr. Matthew, Contractor, Code
7533 via pyngl-talk <pyngl-talk at ucar.edu> wrote:

> Hello,
>
>
>
> Trying to use wrf_ll_to_ij in Python with Ngl. Not sure of the syntax and
> getting “argument parsing failed”. Here’s my attempt. Any help is much
> appreciated.
>
> Thanks,
>
> Matt
>
>
>
>
>
>     res           = 18000
>
>     opt           = Ngl.Resources()
>
>
>
>     opt.MAP_PROJ  = 2    #[1=Lambert, 2=polar stereographic, 3=mercator,
> 6=lat-lon]  (required)
>
>     opt.TRUELAT1  = 90 #60   #required for MAP_PROJ = 1, 2, 3 (defaults to
> 0 otherwise)
>
>     #opt.TRUELAT2  = 80   #required for MAP_PROJ = 6 (defaults to 0
> otherwise)
>
>     opt.STAND_LON = -2   #Standard longitude used in model projection
> (required)
>
>     opt.REF_LON   = -2   #A reference longitude and latitude (required)
>
>     opt.REF_LAT   = 80
>
>     opt.KNOWNI    = 130  #The I and J locations of REF_LON, EF_LAT
> (required), Python index starts at zero
>
>     opt.KNOWNJ    = 134
>
>     opt.POLE_LAT  = 90   #optional for MAP_PROJ = 6 (defaults to 90
> otherwise)
>
>     opt.POLE_LON  = -2   #optional for MAP_PROJ = 6 (defaults to 0
> otherwise)
>
>     opt.DX        = res  #required for MAP_PROJ = 1, 2, 3 (defaults to 0
> otherwise)
>
>     opt.DY        = res
>
>
>
>
>
>     loc  = Ngl.wrf_ll_to_ij(-2,60,opt)
>
>     print loc
>
>
>
> _______________________________________________
> pyngl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/pyngl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/pyngl-talk/attachments/20180628/ec42d67b/attachment.html>


More information about the pyngl-talk mailing list