[ncl-talk] plotting I J variables from the WRF out file

Rick Brownrigg brownrig at ucar.edu
Sun May 10 19:45:10 MDT 2020


Hi,

Please do not reply directly back to me, but rather to the group as a whole
-- they provide a broader pool of expertise to draw upon.

I *think* wrf_user_ij_to_ll work() will do what you want, but it will
likely require some experimentation. Liberal use of printVarSummary() is
your best friend ;-)

Rick



On Sun, May 10, 2020 at 3:03 PM ali mughal <mughalali655 at gmail.com> wrote:

> Dear Rick
>
> Thanks for the reply.
>
> In continuation to my previous email, I asked that in the shared the first
> two columns represent I,j values of the WRF grid. If i have to evaluate 2m
> air temperature on the same I,j values will wrf_user_ij_to_ll work or do I
> need to use some other method.
>
> Regards
>
> On Sunday, May 10, 2020, Rick Brownrigg <brownrig at ucar.edu> wrote:
>
>> Hi,
>>
>> There are at least two problems. One is that str_get_field() returns
>> strings, and so "data" in the call to gsn_csm_contour_map() is a string,
>> and this is the source of the error message. Try adding these 3 lines:
>>
>> lat := stringtofloat(lat)
>> lon := stringtofloat(lon)
>> data := stringtofloat(data)
>>
>> The other problem is that the min/max bounds are inappropriate for the
>> data -- I get a blank plot. If I used the true min/max I get a mostly
>> centered over Siberia:
>>
>> res at mpMinLatF = min(lat) ;-6.080154 ; range to zoom in on
>> res at mpMaxLatF = max(lat) ;10.04061
>> res at mpMinLonF = min(lon) ;95.908
>> res at mpMaxLonF = max(lon) ;112.092
>>
>> Finally, the values for lat/lon in the file look suspect -- is this
>> really a 1-degree grid? I might have guessed they are row/column values.
>>
>> Good luck,
>> Rick
>>
>>
>> On Sun, May 10, 2020 at 2:23 AM ali mughal via ncl-talk <
>> ncl-talk at ucar.edu> wrote:
>>
>>> Dear Users
>>>
>>> I have csv file attached with the data available at specific grids of
>>> the WRF outfile.Could any one help how to correct my attached code in NCL?
>>>
>>> When I try to run the code, I get the following error message
>>>
>>> (0)     This file has 4825 rows and 3 columns.
>>> fatal:Argument type mismatch on argument (1) of (gsn_csm_contour_map)
>>> can not coerce
>>> fatal:["Execute.c":8578]:Execute: Error occurred at or near line 64 in
>>> file test_1.ncl
>>>
>>>
>>> Later I want to use the same code to be modified to calculate 2m air
>>> temperature at the same I J grids.
>>>
>>> Regards
>>> _______________________________________________
>>> 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/20200510/b9af9586/attachment.html>


More information about the ncl-talk mailing list