Re: providing args to NCL script

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Thu Oct 06 2011 - 16:54:02 MDT

The wrf_user_ll_to_ij function was written by wrfhelp@ucar.edu
I see no obvious reason for the failure. Perhaps adding the
following will at least clarify that the requested lat/lon are
in the range of the grid.

    xlat = f->XLAT(0,:,:)
    xlon = f->XLONG(0,:,:)

     printVarSummary(xlat)
     printMinMax(xlat, True)

     printVarSummary(xlon)
     printMinMax(xlon, True)

Just for debug, you should add just before the call to wrf_user_ll_to_ij

print(stevelon)
print(stevelat)

> loc=wrf_user_ll_to_ij(a,stevelon,stevelat,True) ;jul15

Then, you know that you are feeding the correct info to
the function.

Good luck

On 10/6/11 4:24 PM, steve kirby wrote:
> Dennis,
> thanks for the reference - but, still having an issue - please see the
> below:
> % ncl stevelat=32. stevelon=-106. ext*ncl (command line)
> NCL script snippet:
> loc=wrf_user_ll_to_ij(a,stevelon,stevelat,True) ;jul15
> print(loc)
> locX=loc(0)-1
> locY=loc(1)-1
>
> print("VERIFY LAT,LON VALUES")
> (line 75) print(XLAT(0,locY,locX)+ " " + XLONG(0,locY,locX))
> result:
> fatal:Subscript out of range, error in subscript #2
> fatal:An error occurred reading XLAT
> fatal:Execute: Error occurred at or near line 75 in file
> extract_wrf_profile_for_metcm.ncl
> --Steve
>
> *From:* steve kirby <thin_runner@yahoo.com>
> *To:* "ncl-talk@ucar.edu" <ncl-talk@ucar.edu>
> *Sent:* Thursday, October 6, 2011 3:48 PM
> *Subject:* [ncl-talk] providing args to NCL script
>
> Hi,
> I was wondering if I can pass arguments to a NCL script when it is called?
> For example, "ncl extractWRFparams.ncl 32.5 -106.2", i.e., I have
> latitude,longitude as args, for where I want the WRF data interpolated to.
> And if so, how are they recognized in the NCL script (in shell script it
> would be $1 and $2)?
> --Steve
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Oct 6 16:54:08 2011

This archive was generated by hypermail 2.1.8 : Sun Oct 09 2011 - 13:05:26 MDT