Re: subtraction function

From: Eric D. Robinson <edrobins_at_nyahnyahspammersnyahnyah>
Date: Sun Jan 10 2010 - 08:23:20 MST

Jonathan,
It sounds like you are trying to take the difference of two files, which
contain both data variables and coordinate variables. For example, a
file with say temperature, humidity, and lat and lon arrays. If you just
want to take the difference between temp and humidity, but not between
the variables with the coordinates, I think you can still use
nco/ncdiff. With my example... I think it would look something like this...

ncdiff -v lat,lon -x file1.nc file2.nc out_file.nc

Alternatively, reading in the variables taking the differences and
dumping them back out from ncl would do it too...

Hope that helps...

-Eric

Dennis Shea wrote:
> 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
>>
> _______________________________________________
> 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 Sun Jan 10 08:23:26 2010

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