Re: gradient computation

From: Mateus Teixeira <mateus.teixeira_at_nyahnyahspammersnyahnyah>
Date: Mon, 6 Jul 2009 23:44:31 -0300

Dennis,

I forgot to mention, I get the idea from the link
http://grads.iges.org/grads/gadoc/gradfunccdiff.html

Best regards,

Mateus

2009/7/6 Dennis Shea <shea_at_ucar.edu>

> I must leave but this might be more clear
>
> ; compute K/deg_of_lat
> dT_dLat = center_finite_diff( T( lon|:, lat|: ), lat, False, 0 )
>
> ; convert to K/m: one deg lat @ 45N is approx 111.123e3 meters
> dT_dLat = dT_dLat/111.123e3
> dT_dLat_at_units = "K/m"
>
> Of course, this could be done in one statement.
>
> If this works, please post to the ncl-talk question.
>
> THX
> D
> >
>
> Mateus Teixeira wrote:
>
>> Dennis,
>>
>> Couldn't it be as below
>>
>> dy = center_finite_diff( lat, 1., False, 0 ) * 6.37e6 * acos( -1. )/180.
>> dyND = conform( T, dy, 1 )
>> dTy = center_finite_diff( T( lon|:, lat|: ), 1., False, 0 )
>>
>> dTy_dyND = dTy / dyND
>>
>>
>> Mateus
>>
>>
>>
>> 2009/7/6 Dennis Shea <shea_at_ucar.edu <mailto:shea_at_ucar.edu>>
>>
>> What I sent you was incorrect.
>> I will have to think about this.
>>
>> D
>>
>> Mateus Teixeira wrote:
>>
>> Dear NCL users,
>>
>> I have a temperature field that is not equally spaced in y, but
>> it is in x. I'm not sure how to compute its gradient in y
>> direction. I'm wondering if I can apply this
>>
>> dphi = center_finite_diff( lat, 1., False, 0 ) * 6.37e6 * acos(
>> -1. )/180. dT_dy = center_finite_diff( T( lon|:, lat|: ),
>> dphi, False, 0 )
>>
>> or I just use
>>
>> dT_dy = center_finite_diff( T( lon|:, lat|: ), lat *
>> acos(-1.)/180., False, 0 ) / 6.37e6
>>
>> Thanks.
>>
>>
>> Best regards,
>>
>> -- Mateus da Silva Teixeira
>>
>> Registered Linux User #466740
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> ncl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>>
>>
>>
>> --
>> Mateus da Silva Teixeira
>>
>> Registered Linux User #466740
>>
>

-- 
Mateus da Silva Teixeira
Registered Linux User #466740

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Jul 06 2009 - 20:44:31 MDT

This archive was generated by hypermail 2.2.0 : Tue Jul 07 2009 - 11:13:18 MDT