[pyngl-talk] Ngl wrf_ll_to_ij

Fearon, Dr. Matthew, Contractor, Code 7533 matthew.fearon.ctr at nrlmry.navy.mil
Thu Jun 28 11:37:50 MDT 2018


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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/pyngl-talk/attachments/20180628/8a5853ff/attachment.html>


More information about the pyngl-talk mailing list