Re: Need help with wrf_user_intrp3d

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Mon Aug 26 2013 - 09:46:57 MDT

Sangeeta,

You need to debug your code yourself and learn how to find these errors. Usually I put in a bunch of "printVarSummary" statements to see what size my variables are.

It looks to me like you are calling wrf_user_intrp3d with a variable that is 4D, and it's expecting a 3D array. My guess is "Zcat" is the problem, since it is 4D.

This is why I said you need to loop across the levels. You can't pass them in as one array.

Please direct future questions about using wrf_user_intrp3d to wrfhelp@ucar.edu.

Thanks,

--Mary

On Aug 25, 2013, at 12:43 AM, sangeeta maharjan <sangeetamaharjan@gmail.com> wrote:

> Hi Mary
>
> Thanks for the mail. As per your suggestion I used new statement. My
> former problem was solved but still got error like
>
> fatal:Number of subscripts on rhs do not match number of dimensions of
> variable,(3) Subscripts used, (4) Subscripts expected
> fatal:["Execute.c":7556]:Execute: Error occurred at or near line 249
> in file $NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl
>
> But I couldnot figure out my mistakes. I have attached my script
> herewith for your reference.
>
>
> On 8/22/13, Mary Haley <haley@ucar.edu> wrote:
>> Sangeeta,
>>
>> If you read the documentation for wrf_user_intrp3d:
>>
>> http://www.ncl.ucar.edu/Document/Functions/WRF_arw/wrf_user_intrp3d.shtml
>>
>> the "Description" section says:
>>
>> This function interpolates data from model levels to either a horizonal
>> or vertical plane.
>>
>> This basically means that your 3D array will be interpolated to a 2D array,
>> which is exactly what is happening in your case.
>>
>> Perhaps you need to create a 3D array yourself with the "new" statement, and
>> then call wrf_user_intrp3d in a loop across your three heights.
>>
>> I've CC'ed wrfhelp. Please correspond with them if you have further
>> questions on your script.
>>
>> --Mary
>>
>>
>> Begin forwarded message:
>>
>>> From: sangeeta maharjan <sangeetamaharjan@gmail.com>
>>> Subject: Re: (no subject)
>>> Date: August 22, 2013 4:50:33 AM MDT
>>> To: ncl-talk <ncl-talk@ucar.edu>
>>>
>>> Dear NCL Users,
>>> I missed to attach my ncl script in the previous mail. It has been
>>> attached here. Please find it .
>>> Thanks.
>>> Sangeeta Maharjan.
>>>
>>> On 8/22/13, sangeeta maharjan <sangeetamaharjan@gmail.com> wrote:
>>>> Dear NCL users,
>>>>
>>>> I need to interpolate the u and v component of uvmet to heights of
>>>> 30m, 60m and 80m inorder to calculate the wind speed at the
>>>> corresponding heights. I tried to interpolate with my best knowledge
>>>> but it didn't happen. u_int and v_int are my variables holding
>>>> interpolated values of u and v component. I was expecting the
>>>> dimension of u_int and v_int to be [Time | 715] x [bottom_top | 3]
>>>> x [south_north | 51] x [west_east | 51] but unfortunately they are of
>>>> [Time | 715] x [south_north | 51] x [west_east | 51] dimension
>>>> only. Can you please kindly go through my ncl script to identify the
>>>> problems.
>>>>
>>>> Thanks & Regards,
>>>> Sangeeta Maharjan.
>>>> _______________________________________________
>>>> ncl-talk mailing list
>>>> List instructions, subscriber options, unsubscribe:
>>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>>
>>
> <forum.ncl>_______________________________________________
> 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 Mon Aug 26 09:47:06 2013

This archive was generated by hypermail 2.1.8 : Fri Aug 30 2013 - 14:04:57 MDT