Re: subtraction function

From: <shea_at_nyahnyahspammersnyahnyah>
Date: Mon Jan 11 2010 - 08:00:17 MST

    x4(Time, bottom_top, south_north, west_east)
    x4avg(bottom_top, south_north, west_east)

    xDiff = x4 - conform(x4, x4avg, (/1,2,3/) )
    copy_VarMeta(x4, xDiff)

> co(Time, bottom_top, south_north, west_east)
>
>
> I want to take a ten - day average of co at 12z. I then want to
> subtract this average from the individual 12 z time in that period.
> This will be the anamolous field. I want to make a vertical cross
> section of the anamolies.
>
> When I did the subtraction in nco using ncbo and ncdiff. The
> difference of co was taken, but it also seems to have taken the
> difference of the XLAT and XLON. I think this happened because co is a
> variable with lat/lon (bottom_top) coordinates, (I could be
> misinterpreting the use of ncdiff and ncbo).
>
> Hencem I was asking if the subtraction could be done in ncl. I hope I
> have provided more clarity this time.
>
> Thanks,
> Jonathan
>
>
> Quoting Dennis Shea <shea@ucar.edu>:
>
>> I agree with Huang. It is not clear what you want to do.
>> It does sound like conform is what ou need.
>>
>> If you have:
>>
>> x3(Times,lat,lon) and xBase(lat,lon)
>>
>> xDiff = x3 - conform(x3, xBase, (/1,2/) )
>> copy_VarMeta(x3, xDiff)
>>
>> http://www.ncl.ucar.edu/Document/Functions/Built-in/conform.shtml
>>
>> Good Luck
>>
>> ph0007@ustc.edu wrote:
>>> Hi, Jonathan
>>>
>>> I'm not really sure what you want to do. I guess the function "conform"
>>> could help you.
>>>
>>> Please see the document about details.
>>>
>>> Huang Ping
>>>
>>>
>>> 2010-01-10
>>> ------------------------------------------------------------------------
>>> ------------------------------------------------------------------------
>>> *发件人:* jwsmith
>>> *发送时间:* 2010-01-10 13:16:56
>>> *收件人:* ncl-talk
>>> *抄送:*
>>> *主题:* [ncl-talk] subtraction function
>>> Hello ncl
>>> I see that there is a sum function in ncl. Is there a subtraction
>>> fuction? I need to subtract a wrfout that contains the average of
>>> fields from an single wrf model time. The ncbo and ncdiff functions
>>> in nco did not work because the files contain lat/lon coordinates. Is
>>> it possible to something like this in ncl?
>>> Jonathan
>>> Jonathan Wynn Smith
>>> Doctoral Student in Howard University
>>> Program in Atmospheric Sciences (HUPAS)
>>> 2008 ASP Graduate Student Visitor
>>> 2006 ASP Summer Colloquium Participant
>>> 408 Thirkield Building
>>> 2355 6th St. NW
>>> Washington, DC 20059
>>> E-mail: jw_smith@howard.edu or jwsmith9@gmail.com
>>> Cell Phone: 336-601-4563
>>> ----------------------------------------------------------------
>>> This message was sent using IMP, the Internet Messaging Program.
>>> _______________________________________________
>>> 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
>>
>>
>>
>
>
>
> Jonathan Wynn Smith
>
> Doctoral Student in Howard University
> Program in Atmospheric Sciences (HUPAS)
> 2008 ASP Graduate Student Visitor
> 2006 ASP Summer Colloquium Participant
>
> 408 Thirkield Building
> 2355 6th St. NW
> Washington, DC 20059
>
> E-mail: jw_smith@howard.edu or jwsmith9@gmail.com
> Cell Phone: 336-601-4563
>
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
>

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Jan 11 08:01:54 2010

This archive was generated by hypermail 2.1.8 : Tue Jan 12 2010 - 15:38:20 MST